I have created a custom incident handler and made a corresponding entry in bpm-platform.xml. The custom incident handler is called perfectly fine.
But, if I restart the camunda - the custom incident handler is not called and if I again redeploy the workflow (bpm.xml) and start that workflow, then again custom incident handler is called.
Every time camunda tomcat server is started , IncidentHandlerProcessEnginePlugin preinit method and getIncidentHandlerType of TestIncidentHandler is called.
But every time after the server restart - I need to deploy the workflow (bpm.xml) and start that flow to trigger the custom incident handler to be invoked.
Otherwise, if I dont deploy the workflow after the server restart - custom incident handler is not invoked. I did the following steps -
created a jar with the following two classes and put in tomcat/lib.