I’m rather new to bpmn-js, and I couldn’t understand how I can create a subprocess with service tasks inside.In order to better explain what I want to achieve, here is an example of what I want to achieve:
I already have a custom palette entry to call the function to create a subprocess, but I don’t know how to pre-populate the subprocess with other elements like shown in the image above.
EDIT: I could achieve this with the following snippet:
However, now I can’t figure how to change the properties of the service tasks. I want to change the implementation type to a connector and change the connector properties, including the input and output parameters. How can I achieve this?
firstly, thank you for your response. I haven’t tried updateProperties API before, but I have followed steps from this thread, and now I’m seeing ERROR Error: “unknown type camunda:connector” in console.
Snippet:
let extensionElements = moddle.create('bpmn:ExtensionElements');
let connector = moddle.create('camunda:connector');
extensionElements.values.push(connector);
....
modeling.updateProperties(testServiceTask1, {
extensionElements: extensionElements
})