cancel
Showing results for 
Search instead for 
Did you mean: 

Best practice for retry on fail

mahmut
Champ in-the-making
Champ in-the-making
Hi,

I have to develop some workflows using activiti and some of the tasks have to make soap calls.
If a soap call fails, because e.g. the soap server just not respondig, the task should retry the call after a predefined time.
What is the best practice for building "retrying tasks"?

Thanks.
Mahmut
2 REPLIES 2

trademak
Star Contributor
Star Contributor
Hi,

You could implement error handling logic that connects to the same service task in case an exception is thrown.
When asynchronous execution is also possible you could use the async="true" attribute. Then the job handler will retry to a maximum of 3 times.

Best regards,

mahmut
Champ in-the-making
Champ in-the-making
On asynchronous execution the job is executed immediately one after another, so if the soap service is offline even for a few seconds, the job will fail.
Therefore I think an error handling logic will be the better choice…

Thanks.