Model validation and warnings

Bpmn.validateModel() is run before deployment and succeeds but then Camunda keeps complaining in the logs:

ENGINE-09004 Warnings during parsing:
* Exclusive Gateway 'Gateway' has outgoing sequence flow 'SequenceFlow_3' without condition which is not the default flow. We assume it to be the default flow, but it is bad modeling practice, better set the default flow in your gateway.

How can the process be checked for warnings like that at deployment time?

@f_a you can create a Deployment Listener that you can validate your BPMN and throw a error that will cause the deployment to fail.

Something like https://github.com/camunda/camunda-bpm-examples/tree/master/process-engine-plugin/bpmn-parse-listener

Thanks @StephenOTT. I will give this a try, its not clear to me at the moment if this performs the same validation that produces the warnings in the log or if I would have to implement my own parsing rules.

Well depends on what you want to do with those errros. Are you trying to stop the deployment if those warnings are present?

Exactly, I would like to check if any of these warnings apply and stop the deployment.

then i would run the validation method (you will see it in the BPMN parsing listener), and then do a check on what errors and warnings are found, and if warnings are found then throw a IllegaState error