Aborting a Process Flow based on HTTP Status Code

Requirement: To automatically abort a Process flow when the WS Rest Consumer returns a status code that isn't 200?

Solution: Following custom plugin with a below code can be used to abort a process flow.

import com.adeptia.indigo.services.ServiceException;
throw new ServiceException("Error while posting data to Web Service");

In the Process flow, make the following changes:-

1. After the Rest Consumer, put a Gateway condition and check the HTTP "Status Code" value, if the value is 200 then return True, else False.
2. On the False flow, put the custom plugin. The execution of this plugin will abort the process flow.

Have more questions? Submit a request


Article is closed for comments.