[jboss-jira] [JBoss JIRA] (DROOLS-3475) [DMN Designer] Ensure integrity of DecisionService node

Michael Anstis (Jira) issues at jboss.org
Wed Apr 1 09:58:57 EDT 2020


     [ https://issues.redhat.com/browse/DROOLS-3475?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Michael Anstis reassigned DROOLS-3475:
--------------------------------------

    Assignee: Guilherme Gomes  (was: Michael Anstis)


> [DMN Designer] Ensure integrity of DecisionService node
> -------------------------------------------------------
>
>                 Key: DROOLS-3475
>                 URL: https://issues.redhat.com/browse/DROOLS-3475
>             Project: Drools
>          Issue Type: Enhancement
>          Components: DMN Editor
>    Affects Versions: 7.15.0.Final
>            Reporter: Michael Anstis
>            Assignee: Guilherme Gomes
>            Priority: Major
>              Labels: drools-tools
>
> The {{DecisionService}} node contains lists of {{DMNElementReference}} for "Output Decisions", "Encapsulated Decisions", "Input Decision" and "Input Data". These are currently only populated when unmarshalling a DMN XML file to Stunner model. Their members are not maintained as and when Users add, delete etc nodes that could affect them. They are used as reference when marshalling back from Stunner to DML XML to maintain the positional information \[*\] of such references.
> The {{DecisionService}} node reference lists should be updated as and when the User interacts with the diagram (e.g. add/remove "Output Decision" to/from the "Decision Service", add/remove "Encapsulated Decision" to/from the "Decision Service", add/remove an "Input Data" or "Input Decision" reference to/from the "Decision Service" or move the "splitter" in such a way that could affect the "Output/Encapsulated" Decisions. This will require (at least) custom commands for add/remove child, add connection and update property (splitter location).
> \[*\] See [here|https://github.com/kiegroup/kie-wb-common/blob/master/kie-wb-common-dmn/kie-wb-common-dmn-backend/src/main/java/org/kie/workbench/common/dmn/backend/definition/v1_1/DecisionServiceConverter.java#L86] that uses the order of the references set-up during marshalling from XML to Stunner to ensure identical references maintain the same index in the list marshalled from Stunner to XML. This is a DMN Specification requirement that "positional information" is preserved (without using this transient mechanism it would otherwise be impossible to preserve the index order as XML->Stunner looses the lists and Stunner->XML walks the graph to add element references to the Decision Service. The original ordering is lost by the conversion from {{List}} to _Graph_ to {{List}}.
> This "workaround" to preserve ordering should NOT be required when the integrity of {{DecisionService}} Node's element references is maintained by custom commands.



--
This message was sent by Atlassian Jira
(v7.13.8#713008)


More information about the jboss-jira mailing list