We have implemented a properties panel with a number of custom properties and are setting those by updating the business object directly. Since this prevents us from using undo / redo, I would like to change this to use the updateProperties function as recommended.
Here is where I run into a problem though: I don’t really know what the function expects and how to translate the behaviour we have so far into it. Let’s take this example:
<bpmn2:serviceTask id="Activity_0sa3w5i" name="Send E-Mail" activiti:async="true">
<bpmn2:extensionElements>
<activiti:field name="subject">
<activiti:string>test</activiti:string>
</activiti:field>
</bpmn2:extensionElements>
</bpmn2:serviceTask>
How would I use updateProperties to set the string “test” for the field subject? And how would it behave if the extensionElements and / or the field do not exist yet?
I know I can update f.e. the name with the following function, but I don’t even have an idea what the call for extension elements would look like.
modeling.updateProperties(element, {
name: "Unsend E-Mail"
});
}