Hi all!
I’m continuing to work with bpmn-js, trying to create custom properties. I’ve done a couple of them for tasks, and I’m trying to create a custom Property in a Pool/Participant. But what I really need is that the property, saved as a bpmn2:extension, needs to be saved as extension of the process itself, not as an exception of the participant.
I’ll try to explain myself. I can do this:
<bpmn2:definitions xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:bpmn2="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:di="http://www.omg.org/spec/DD/20100524/DI" id="sample-diagram" targetNamespace="http://bpmn.io/schema/bpmn" xsi:schemaLocation="http://www.omg.org/spec/BPMN/20100524/MODEL BPMN20.xsd">
<bpmn2:message id="Message_144bdea" name="Yeah!" />
<bpmn2:collaboration id="Collaboration_0iod4d2">
<bpmn2:participant id="_participant" name="Generic Participant" processRef="_appointment_process_test">
<bpmn2:extensionElements>
<dm:userExtension username="Someone">
</dm:userExtension>
</bpmn2:extensionElements>
</bpmn2:participant>
</bpmn2:collaboration>
<bpmn2:process id="_process_test" name="This is a test" isExecutable="false">
...
</bpmn2:process>
But what I really want is this:
<bpmn2:definitions xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:bpmn2="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:di="http://www.omg.org/spec/DD/20100524/DI" id="sample-diagram" targetNamespace="http://bpmn.io/schema/bpmn" xsi:schemaLocation="http://www.omg.org/spec/BPMN/20100524/MODEL BPMN20.xsd">
<bpmn2:message id="Message_144bdea" name="Yeah!" />
<bpmn2:collaboration id="Collaboration_0iod4d2">
<bpmn2:participant id="_participant" name="Generic Participant" processRef="_appointment_process_test">
</bpmn2:participant>
</bpmn2:collaboration>
<bpmn2:process id="_process_test" name="This is a test" isExecutable="false">
<bpmn2:extensionElements>
<dm:userExtension username="Someone">
</dm:userExtension>
</bpmn2:extensionElements>
...
</bpmn2:process>
Is it possible to do something like this?
EDIT (Sep 19th 2018): I’m actually have an answer to this and it is, yes, I can do that. I know that because the software Camunda Modeler actually does that in its BPMN Modeler. Which is why I change my own question to: HOW can I do that?