camunda / zeebe-bpmn-moddle

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

`zeebe:PropertiesHolder` Does Not Include Flow Elements Like Data Store Reference #43

Closed philippfromme closed 1 year ago

philippfromme commented 1 year ago

Unlike camunda-bpmn-moddle zeebe-bpmn-moddle has an abstract zeebe:PropertiesHolder type for elements that can have zeebe:Properties extension elements. However, this type only extends bpmn:FlowNode elements which excludes data object references and other flow items.

// zeebe:PropertiesHolder extends bpmn:FlowNode

// ServiceTask > Task > Activity > FlowNode > FlowElement > BaseElement
const serviceTask = moddle.create("bpmn:ServiceTask");

console.log(serviceTask.$instanceOf("zeebe:PropertiesHolder")); // true

// DataStoreReference > FlowElement > BaseElement
const dataStoreReference = moddle.create("bpmn:DataStoreReference");

console.log(dataStoreReference.$instanceOf("zeebe:PropertiesHolder")); // false

The zeebe:PropertiesHolder type is used by the properties panel to decide if the Extension properties group should be displayed. No such check exists for Camunda 7, meaning that extension properties can be added to any element that can be selected and shown in the properties panel, so the check might not be necessary in the first place. Regardless, the zeebe:PropertiesHolder type should be fixed to extend bpmn:FlowElement.


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

philippfromme commented 1 year ago

@nikku Since you added the zeebe:PropertiesHolder what do you think about the proposed fix?

philippfromme commented 1 year ago

@saig0 confirmed that the engine does in fact allow zeebe:Properties extensions on all elements (it simply ignores them). Therefore, we can remove the zeebe:PropertiesHolder type and the respective check in the properties panel.