flowable-engine
flowable-engine copied to clipboard
[DMN] COLLECT hit policy with `alwaysUseArraysForDmnMultiHitPolicies` returns null/value instead of array
Description
BPMN/CMMN dmn service task for COLLECT hit policy returns
(protected boolean alwaysUseArraysForDmnMultiHitPolicies = true;):
| hits | output |
|---|---|
| none hit | null |
| one item hit | itemValue |
| multiple hits | array of values |
The issue is also related to #2286 test: https://github.com/martin-grofcik/flowable-engine/commit/704b6bb1bec7055c708c525880ab2097bc104a55
Expected behavior
BPMN/CMMN dmn service task for COLLECT hit policy returns:
| hits | output |
|---|---|
| none hit | empty json array [] |
| one item hit | one item json array ["itemValue"] |
| multiple hits | array of values ["itemA", "ItemB"....] |
Code
DmnActivityBehavior
} else {
boolean multipleResults = decisionExecutionAuditContainer.isMultipleResults() && processEngineConfiguration.isAlwaysUseArraysForDmnMultiHitPolicies();
@tijsrademakers, @jbarrez : What is your opinion? I can contribute with fix.