Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

no longer set category job for every element on xml if category was set in config enableCategory #3734

Open
wants to merge 3 commits into
base: main
Choose a base branch
from

Conversation

nhatanh2996
Copy link

…et on config

Check List:

  • Unit tests: YES / NO / NA
  • Documentation: YES / NO / NA

Object categoryValue = categoryExpression.getValue(variableContainer);
if (categoryValue != null) {
job.setCategory(categoryValue.toString());
if(CollectionUtils.isEmpty(cmmnEngineConfiguration.getEnabledJobCategories())){
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
if(CollectionUtils.isEmpty(cmmnEngineConfiguration.getEnabledJobCategories())){
if (CollectionUtils.isEmpty(cmmnEngineConfiguration.getEnabledJobCategories())) {

The project standards are to use spaces

}
}
}else{
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
}else{
} else {

if (categoryValue != null) {
job.setCategory(categoryValue.toString());

if(CollectionUtils.isEmpty(processEngineConfiguration.getEnabledJobCategories())){
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
if(CollectionUtils.isEmpty(processEngineConfiguration.getEnabledJobCategories())){
if (CollectionUtils.isEmpty(processEngineConfiguration.getEnabledJobCategories())) {

}
}
}else{
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
}else{
} else {

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ok I forgot format, hihi

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@dbmalkovsky done, pls re-check

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@tijsrademakers pls review this

@tijsrademakers
Copy link
Contributor

Hi, thanks for the PR. If we want to have a default job category then it should be a new configuration property in the process engine and cmmn engine configuration. We should not just pick the first one in the list of enabled job categories. Is that something you would like to change in the PR?

@nhatanh2996
Copy link
Author

Hi, thanks for the PR. If we want to have a default job category then it should be a new configuration property in the process engine and cmmn engine configuration. We should not just pick the first one in the list of enabled job categories. Is that something you would like to change in the PR?

ya maybe we need to new config for default jobCategory. wait my update

@nhatanh2996
Copy link
Author

@tijsrademakers re-check pls

@tijsrademakers
Copy link
Contributor

The idea of the default job category looks good, but would be good to check if the default job category is in the enabled job categories already before adding it. And when checking the BPMN/CMMN extension element, this should always happen also when the default job category is set. Because it should always be possible to overwrite the default job category with the BPMN/CMMN extension element.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants