Create participant with particular extensions

Dear all,
I would like to have 4 classes of participants which have specific properties (specified by and XML schema). Is there a way to do such thing in the BPMN modeler?
Thanks

Can you please tell more about your goal? A sketch would also be appreciated.

Depending on what you want to achieve, custom elements might be a good starting point here. But as @barmac said, please provide a detailed explanation of your use case and we might be able to help your more specific.

Hi everyone, thank you for the quick response. You can see a mockup on how I would envision the prototype attached. Basically when I select a Poll/Participant I would like then to select between 4 types of classes. Each of them will have certain properties according to an XML schema. This will result with different properties name in the properties tab. When populating those properties also the Participant will then show those. The thing is that I am really new to Java Script, therefore the examples are not that clear to me, I guess the react-properties-panel is the right one. But I have no idea of where I should add this. Thanks a lot for the help!!

Btw, is there any why to upload small videos here?

Mockup of the solution

Have a look at the Element Templates documentation. If this sounds like what you need, I encourage you to try to implement the solution and get back if you get stuck.

Hi everyone, I was able to get into the Templates documentation and I got how to create my specific properties. However, seems that Templates cannot be defined for bpmn:participant. I need to insert some custom properties there. How can I achieve that?

The link you provided me is for CAMUDA, maybe bpmn-js leaves me more possibilities? Or even, can I use the bpmn:process for this task?

Moreover, is there a way to specify that one kind of template should be used as default when creating a new element?

It is actually possible to define a template for bpmn:Participant. I was able to create such a template and use it in Camunda Modeler:

image

The template JSON is:

{
  "name": "Participant",
  "description": "",
  "id": "515ab556-dbbb-420f-89f5-b595527c5fd7",
  "isDefault": true,
  "appliesTo": [
    "bpmn:Participant"
  ],
  "properties": [
    {
      "label": "Enforced documentation",
      "type": "String",
      "value": "cannot be empty",
      "binding": {
        "type": "property",
        "name": "documentation"
      },
      "constraints": {
        "notEmpty": true
      }
    }
  ]
}

The template above enforces value of the bpmn:documentation field for all newly created Participants. This is achieved thanks to the Default Templates feature.

Please feel free to copy the template and adjust it to your needs. Also, don’t hesitate to come back and share your project via CodeSandbox if you get stuck at some point.

1 Like