- Create a new instance of the CMMN element
- Set attributes and child elements of the element instance
- Add the newly created element instance to the corresponding parent element
CMMN Model API
Create a Model
To create a new CMMN model from scratch, you have to create an empty CMMN model instance with the following method:
To create a new CMMN model from scratch, you have to create an empty CMMN model instance with the following method:
The next step is to create a CMMN definitions element. Set the target namespace on it and add it
to the newly created empty model instance.
Usually you want to add a case to your model. This follows
the same 3 steps as the creation of the CMMN definitions element:
To simplify this repeating procedure, you can use a helper method like this one.
Validate the model against the CMMN 1.1 specification and convert it to
an XML string or save it to a file or stream.