camunda / zeebe-bpmn-moddle

Zeebe moddle extensions for BPMN 2.0
MIT License
14 stars 7 forks source link

feat: support templated root elements #46

Closed barmac closed 1 year ago

barmac commented 1 year ago
<?xml version="1.0" encoding="UTF-8"?>
<definitions xmlns="http://www.omg.org/spec/BPMN/20100524/MODEL"
          xmlns:zeebe="http://camunda.org/schema/zeebe/1.0"
          targetNamespace="http://bpmn.io/schema/bpmn">
  <message zeebe:modelerTemplate="templateId"/>
  <error zeebe:modelerTemplate="templateId"/>
  <signal zeebe:modelerTemplate="templateId"/>
  <escalation zeebe:modelerTemplate="templateId"/>
</definitions>

Related to https://github.com/camunda/camunda-modeler/issues/3403

philippfromme commented 1 year ago

Why not reuse the existing type? Any reason why there's no support for version and icon? Icons could for example be displayed for messages (that can't be modeled at the moment).

image

barmac commented 1 year ago

Why not reuse the existing type?

This is to not add version and icon to the root elements. We are adding this property to distinguish root elements created traditionally and created with templated elements. While the former can be shared and reused, the latter have a 1:1 relationship with the elements. There is no need for version or icon as it's handled in the linked element.

image

barmac commented 1 year ago

So there are no root element templates, but rather flow node templates which define linked root element.

philippfromme commented 1 year ago

So it's basically a flag an could also be isTemplated="true"?

barmac commented 1 year ago

It could be.