zeebe-io / zeebe-modeler

Desktop Application for modeling Zeebe Workflows with BPMN
MIT License
221 stars 49 forks source link

Input parameters are not removed from XML when morphing Service Task into Receive Task #248

Closed barmac closed 4 years ago

barmac commented 4 years ago

Describe the Bug

Although input parameters are no longer accessible in the properties panel when Service Task is morphed into Receive Task, they are still present in the XML.

Steps to Reproduce

  1. Create a Service Task
  2. Add input parameters

Task's XML at this point looks like this:

    <bpmn:serviceTask id="Activity_07bz79w">
      <bpmn:extensionElements>
        <zeebe:ioMapping>
          <zeebe:input source="= source" target="target" />
        </zeebe:ioMapping>
      </bpmn:extensionElements>
    </bpmn:serviceTask>
  1. Morph into Receive Task
  2. Check XML:
    <bpmn:receiveTask id="Activity_07bz79w">
      <bpmn:extensionElements>
        <zeebe:ioMapping>
          <zeebe:input source="= source" target="target" />
        </zeebe:ioMapping>
      </bpmn:extensionElements>
    </bpmn:receiveTask>

Extension elements should be removed so it should look like this:

    <bpmn:receiveTask id="Activity_07bz79w" />

Expected Behavior

Input parameters should be removed. User can still recover them via undo.

Environment

MaxTru commented 4 years ago

The same issue applies for calledElement when morphing from a callActivity to something else.

As @barmac explained to me, we need to fix this in zeebe-bpmn-moddle, compare https://github.com/camunda/camunda-bpmn-moddle/blob/master/lib/extension.js#L27

azeghers commented 4 years ago

What we need:

MaxTru commented 4 years ago

Closed by #274