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

[DmnServiceTask] dmn table key as expression

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

Problem description: Cmmn/Bpmn dmnService task does not define dmnTable as an expression. Dmn reference must be a reference to existing dmn model in the application. Partially related issue is: https://forum.flowable.org/t/modeler-dmn-reference-lost-after-bpmn-import/8598 In the case when dmn table is not recognized in export/import of the individual process/case model the information is lost because reference does not exist. In this case we can store the information in dmn table key.

Solution proposal: Adding a new property Decision table key for dmnService tasks in modeler with export/import. image

Alternative: Add expression to dmn model popup. image

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

@tijsrademakers, @jbarrez : Is the pull request OK? Can it be merged to master? Do you see any issue in it?

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

@martin-grofcik, what happens if you fill-in both the decision table reference and the decision table key? Also if we do this, then we should do the same for the decision service reference.

tijsrademakers avatar Nov 18 '21 14:11 tijsrademakers

Hi @tijsrademakers,

there is a precedence:

        // When decision table key is present, can be still overridden by decision table/service references
        String decisionModelKey = getPropertyValueAsString(PROPERTY_DECISIONTABLE_REFERENCE_KEY_DEFINITION, elementNode);

and tests: modules/flowable-cmmn-json-converter/src/test/resources/test.dmnTaskModelReferencePriority.json

Decision table key has the lowest prio. Always overriden by table/service references.

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

Hi @martin-grofcik, ok that's fine. Then I think the missing part is to do it also for the decision service reference.

tijsrademakers avatar Nov 18 '21 15:11 tijsrademakers