cancel
Showing results for 
Search instead for 
Did you mean: 

Querying Process Instance with unexpected errors

russinholi
Champ in-the-making
Champ in-the-making
Hi all,

I'd like to know how to query, if it's possible, only process instances that occurred unexpected errors, for example if in a Service Task the bean called threw a NullPointerException.

If I query all unfinished processes using HistoricProcessInstanceQuery or query all active processes instance using ProcessInstanceQuery, those instances with the unexpected error are returned, but they are mixed with other instances that are really active.

I need to indentify those instances with error, is it possible?


Regards,
2 REPLIES 2

r3dge
Champ in-the-making
Champ in-the-making
hi,

Perhaps should you add a simple process instance variable when an error occurs (execution.setVariable("Error",true)). You will be able to query process instances that have this variable.

russinholi
Champ in-the-making
Champ in-the-making
Hi r3dge,

thanks for your tip, I will try it.