flowable / flowable-engine

A compact and highly efficient workflow and Business Process Management (BPM) platform for developers, system admins and business users.
https://www.flowable.org
Apache License 2.0
8.01k stars 2.63k forks source link

[DmnServiceTask] dmn table key as expression #3106

Open martin-grofcik opened 3 years ago

martin-grofcik commented 3 years ago

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 commented 3 years ago

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

tijsrademakers commented 3 years ago

@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.

martin-grofcik commented 3 years ago

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.

tijsrademakers commented 3 years ago

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