Change Moddle Definition programmatically


I use Moddle Extension of Properties Panel as Camunda Plugin. I want to implement the possibility for user to define new Moddle Properties from UI.

Is it possible to change Moddle Definition programmatically? Can anyone provide an example?

Thanks in advance for any help!

Can you explain a little bit about what you mean by this?

Yes, sure. I want to extend the moddle definitions in the runtime. In the example from above we have magic.json with the moddle definitions. I want to add for the type “BewitchedStartEvent” in the array “properties” a new property on the fly. I added a form in Camunda Modeler, where a user can enter the name, type, and so on of the property (see screen). After click on the “add”-button this property should be added to the moddle definitions.


As far as I know moddle schema cannot be updated on runtime. However, maybe you don’t need that feature? camunda:properties can work without adjusting the schema:


    <bpmn:serviceTask id="Activity_1ktsv2d">
          <camunda:property name="a" value="b" />