I develop a bigraph editor with bpmn
and moddle
. In this case, there are a lot of problems such as elements replacement and validation rules updates. But at first, I can’t manage a problem with custom properties. I do follows:
- Define new properties descriptor and register it as
moddleExtensions
- Create props and add them to a specific element:
...
var props = moddle.create('bigraph:NewProperties');
elem.businessObject.extensionElements = moddle.create('bpmn:ExtensionElements');
elem.businessObject.extensionElements.get('values').push(props);
Q1: How could I integrate new properties for the opened and created elements? Currently, I catch commandStack.shape.create.postExecute
event and update properties for the specific element.
Q2. Is at any approach to dynamically add new properties for elements? As I understand new properties require JSON
descriptor and a new instance of BpmnModeler
respectively.
Thanks in advance