AnsweredAssumed Answered

Error Listener ?

Question asked by thomasl on Oct 9, 2013
Latest reply on Oct 10, 2013 by thomasl
Hello,

I have a system in which BPM scripts may be added by external users and are likely to throw technical exceptions (invalid scriptTask for instance). I understood that if RuntimeService.startProcessInstanceById (for instance) fails and throws an exception, the Activiti transaction is rolled back and no process instance exists in the database.
In such a case, the message in the thrown ActivitiException is sometimes not detailed enough to provide debugging information and I am looking for a hook to be able to retrieve information form the Activiti Engine after the process failed (exception in ScriptTaskActivityBehavior for instance) but before the transaction is rolled back. I have tried adding an ExecutionListener on the process but found out that it works only when the process succeeded. Is there any kind of error listener mechanism in which I may be able to run process queries such as retrieving executed activities list or process variables when an exception occurs ?

Thanks,

Tom

Outcomes