flowable-engine icon indicating copy to clipboard operation
flowable-engine copied to clipboard

[DMN] COLLECT hit policy with `alwaysUseArraysForDmnMultiHitPolicies` returns null/value instead of array

Open martin-grofcik opened this issue 4 years ago • 1 comments

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();

martin-grofcik avatar Nov 16 '21 07:11 martin-grofcik

@tijsrademakers, @jbarrez : What is your opinion? I can contribute with fix.

martin-grofcik avatar Nov 18 '21 14:11 martin-grofcik