Hello, I have task with child elements
When i want to change task type, for example for “Service Task” some child elements are removed
How can i avoid this?
There are not any implementation of this removing in my project.
How are you changing the type of the element?
via pop-up menu
I’m not sure why your custom extension elements are lost on replace. They shouldn’t get lost as this example shows: Keep Custom Extensions on Replace - CodeSandbox
Can you share your diagram?
I managed to solve this problem. But I found another similar.
For example, i have bpmn:multiInstanceLoopCharacteristics
when i`m changing this type to sequential
then the attributes are removed
I change the type all the same using the pop-up menu
Could this be related to the implementation of the modeler itself?
XML example
<bpmn:definitions xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:bpmn="http://www.omg.org/spec/BPMN/20100524/MODEL" xmlns:bpmndi="http://www.omg.org/spec/BPMN/20100524/DI" xmlns:dc="http://www.omg.org/spec/DD/20100524/DC" xmlns:camunda="http://camunda.org/schema/1.0/bpmn" id="Definitions_1" targetNamespace="http://bpmn.io/schema/bpmn">
<bpmn:process id="Process_0xxhxzl">
<bpmn:subProcess id="Activity_19h7v7w">
<bpmn:multiInstanceLoopCharacteristics camunda:collection="22222222" camunda:elementVariable="3333333333">
<bpmn:loopCardinality xsi:type="bpmn:tFormalExpression">111111</bpmn:loopCardinality>
<bpmn:completionCondition xsi:type="bpmn:tFormalExpression">44444444</bpmn:completionCondition>
</bpmn:multiInstanceLoopCharacteristics>
</bpmn:subProcess>
</bpmn:process>
<bpmndi:BPMNDiagram id="BPMNDiagram_1">
<bpmndi:BPMNPlane id="BPMNPlane_1" bpmnElement="Process_0xxhxzl">
<bpmndi:BPMNShape id="Activity_01fof9v_di" bpmnElement="Activity_19h7v7w" isExpanded="true">
<dc:Bounds x="480" y="100" width="210" height="80"/>
</bpmndi:BPMNShape>
</bpmndi:BPMNPlane>
</bpmndi:BPMNDiagram>
</bpmn:definitions>
This is a bug in bpmn-js. The properties of bpmn:MultiInstanceLoopCharacteristics
shouldn’t get lost when changing from parallel to sequential. I’ve created a GitHub issue for this: Multi-Instance Properties Lost When Changing Between Parallel and Sequential · Issue #1581 · bpmn-io/bpmn-js · GitHub
We’ll let you know when this is fixed. Thanks for reporting.