REST call task - Handling server time out

cancel
Showing results for 
Search instead for 
Did you mean: 
Highlighted
Active Member II

REST call task - Handling server time out

Hi all,

I'm using a Rest call task in my process and trying to send an email to a user when the target server is down, or there is connection time out for any reason. How can I capture the this time-out event? I'd like to handle the event to change the flow in the process; is this possible?

 

Thanks

4 Replies
Highlighted
Senior Member

Re: REST call task - Handling server time out

better use service task that does the rest call and throws BPMN error that can "catched" in the process using boundary catch event

Regards,
Abbas
Highlighted
Active Member II

Re: REST call task - Handling server time out

Thank you Abbas,

In the end I implemented the rest call inside a sub-process and put a boundary timer event in the sub-process, so if the REST call is not working for more than x minutes it will cancell the subprocess and execute additional actions. 

Thanks anyway.

Jose

Highlighted
Community Manager
Community Manager

Re: REST call task - Handling server time out

Hi @jose_leon_coupa 

Glad you found a solution. Would you be able to add the source code or outline the approach in more detail to help other people?

Cheers,

Digital Community Manager, Alfresco Software.
Problem solved? Click Accept as Solution!
Highlighted
Active Member II

Re: REST call task - Handling server time out

Hi Eddy,

Below is the diagram of the approach I used. If the REST call is not working for within 1 min, the timer boundary will terminate the subprocess and trigger additional actions. Hope this helps.

Screenshot 2020-09-21 085032.png