Need help on error handling

My structure is like this

i have defined all the worker implementation in a basicworker file
and created and subscribed topic to each specific service tasks
but now i want to throw a error for each service tasks and pass Error code and then catch the error code and implement logic on the caught event
but i looked online and it says to use BPMNerror Class but not sure if there is any reference for throwing BPMN error from the process or where and what package need to imported


Hi @vishucamunda,

at the end your client has to call to signal the error to the process engine.

If you use the External task client for Java, you have to call this method in your handler:

The process will now continue with the outgoing sequence flow of the attached Error event.

Hope this helps, Ingo