How to disable validation for BPMN models in java?

Hello folks. Using the java AP of Camunda, I do some modifications on bpmn files and then save them. In some cases I get exceptions as a result of the applied change (invalid dom exception), e.g. if an association is removed, it also must be removed from the incoming/outgoing set of the elements. This adds alot of complexity as whatever you do must result in a valid model. I want to see if the API has an option to disable it, as I couldn’t find it from the available documentation.

Any comments are appreciated.

Hey @mahdi_nikoo :wave:
The exceptions are thrown since you are “deploying” a new version of the bpmn model to the engine which results into an error.
Do you have set the auto deployment to on? Which version of Camunda are you using?


Hi @Hafflgav, thanks for your reply!
Actually I’m not deploying the models to any engine, as I don’t deal with the runtime aspect of the models. I’m just doing some analysis on model level.

I’m looking for a way to disable the validation step which seems to occur before you want to save a version of the (modified) BPMN file. I’m using java API of Camunda (camunda-bpm-examples/bpmn-model-api/parse-bpmn at master · camunda/camunda-bpm-examples · GitHub) to parse the model files.