cancel
Showing results for 
Search instead for 
Did you mean: 

Exception Handling in Asynchronous Task

bala1010
Champ in-the-making
Champ in-the-making
Hi,

We have asynchronous service task just before an end event in our activiti process. When there is any exception in async task,
it is not caught by 'error end event' or 'error boundary event' and also process is never ended.

As per understanding from user guide, if process reaches the async task , process will be put on wait-state and it will ends
only if it get acknowledgement from the async task. What if I didn't get the acknowledgement due to error?

It is working as stated when the async task completes successfully.

so my questions are
1) How to handle the exception in async service task?
2) If any runtime exception occurs in async task, is there a way to stop the process manually because
I don't want to load my server with too many active process instance?

I have attached the BPMN file [ loanProcess.txt ] with this post .
1 REPLY 1

jbarrez
Star Contributor
Star Contributor
>  What if I didn't get the acknowledgement due to error?

The async task will be retried 3 times (configurable amount) and then it's considered dead.

1) you can catch it and map it to a Bpmn Error

2) You can query for jobs that have an exception.