camunda / camunda-modeler

An integrated modeling solution for BPMN, DMN and Forms based on bpmn.io.
https://camunda.com/products/modeler
MIT License
1.5k stars 481 forks source link

Change in Multi-Instance marker should retrain Property Data #4310

Open NPDeehan opened 5 months ago

NPDeehan commented 5 months ago

Problem you would like to solve

When creating a multi-instance activity selecting the mulit-instance parallel marker (for example) then displays the properties required for execution of that symbol. When you change the symbol to multi-instnace sequential marker all data entered in those properties are removed even though both markers require the same properties. image

Proposed solution

Retrain properties when switching between multi-instance markers

Alternatives considered

Only copying all the data manually before switching over. Or copying the element itself to retain the information

Additional context

No response

nikku commented 5 months ago

Thanks for opening this bug. I agree that all properties that are applicable in both scenarios shall be retained (cf. design principles).

We'd want to fix this in a dedicated replace behavior in either bpmn-js or camunda-bpmn-js-behaviors.

philippfromme commented 9 hours ago

Root cause analysis

Properties like Input collection are part of a zeebe:LoopCharacteristics extension element. Our behaviors look into the allowedIn property (defined in zeebe-bpmn-moddle) to figure out whether a property can be copied to a new target. Our convention is that the types in allowedIn refer to flow elements (e.g. bpmn:ServiceTask). The behaviors then check whether the parent flow element of the new element the property is to be copied to is one of these flow elements. When using the replace feature this is fine because the parent exists. However, when changing the loop characteristics without replacing the flow element the new element doesn't have a parent at the time of the check. The behaviors therefore don't allow copying the zeebe:LoopCharacteristics extension element.

To do