Uploaded image for project: 'jBPM'
  1. jBPM
  2. JBPM-3418

The order of parameters/results mapping of custom work item node is inconsistent

    XMLWordPrintable

Details

    • Enhancement
    • Resolution: Done
    • Major
    • jBPM 5.3
    • jBPM 5.1
    • Designer, Eclipse
    • Compatibility/Configuration
    • Low

    Description

      every time saved the changed bpmn2 file, the order of parameters/results mapping of custom workitem node is inconsistent, this happens on subprocedure node, user task node.

      It's a nightmare to compare and merge the diff while team working on the same bpmn file, since there is lots of lines not changed logically.

      Analysis:
      In drools eclipse plugin, the BPMNModelEditor.java calls org.jbpm.bpmn2.xml.XmlBPMNProcessDumper.dump(WorkflowProcess, int) to persist the model to xml file (bpmn file)
      The model org.drools.definition.process.WorkflowProcess (kind of DOM in memory) is created by org.jbpm.compiler.xml.XmlProcessReader which parse the xml file into a DOM in memory.
      The WorkflowProcess internally heavily uses java.util.HashMap, that cause the inconsistent when persist the DOM to xml file.

      From my understanding, when saving bpmn files, it should follow rules to sort the parameters/results mapping, variables, etc, so that we can get an consistent order manner, for example:
      1. Input order, for example, the end-user input "foo", "bar", then the order in bpmn files is "foo", "bar" as well
      2. Or, order by alphabet, for example, "bar", "foo",
      3. And so on...

      Attachments

        1. CallActivityHandler.java
          8 kB
        2. SortUtils.java
          5 kB
        3. UserTaskHandler.java
          8 kB
        4. WorkItemNodeHandler.java
          12 kB
        5. XmlBPMNProcessDumper.java
          38 kB

        Activity

          People

            kverlaen@redhat.com Kris Verlaenen
            missedone_jira Nick Tan (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: