no longer set category job for every element on xml if category was set in config enableCategory#3734
no longer set category job for every element on xml if category was set in config enableCategory#3734nhatanh2996 wants to merge 3 commits intoflowable:mainfrom
Conversation
| Object categoryValue = categoryExpression.getValue(variableContainer); | ||
| if (categoryValue != null) { | ||
| job.setCategory(categoryValue.toString()); | ||
| if(CollectionUtils.isEmpty(cmmnEngineConfiguration.getEnabledJobCategories())){ |
There was a problem hiding this comment.
| if(CollectionUtils.isEmpty(cmmnEngineConfiguration.getEnabledJobCategories())){ | |
| if (CollectionUtils.isEmpty(cmmnEngineConfiguration.getEnabledJobCategories())) { |
The project standards are to use spaces
| } | ||
| } | ||
| } | ||
| }else{ |
There was a problem hiding this comment.
| }else{ | |
| } else { |
| if (categoryValue != null) { | ||
| job.setCategory(categoryValue.toString()); | ||
|
|
||
| if(CollectionUtils.isEmpty(processEngineConfiguration.getEnabledJobCategories())){ |
There was a problem hiding this comment.
| if(CollectionUtils.isEmpty(processEngineConfiguration.getEnabledJobCategories())){ | |
| if (CollectionUtils.isEmpty(processEngineConfiguration.getEnabledJobCategories())) { |
| } | ||
| } | ||
| } | ||
| }else{ |
There was a problem hiding this comment.
| }else{ | |
| } else { |
|
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 |
|
@tijsrademakers re-check pls |
|
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. |
…et on config
Check List: