Error Handling for flow Execution

gaurav72
Tera Contributor

I have a subflow in which an action makes a REST call and sometimes due to host unresponsive issue overall flow Execution fails. I want to take an corrective action when flow fails.

I tired using Error Handler in flow designer but it do not run as my Action which makes REST call is in incomplete state not failed state.

Is there any other method than Error Handler which can help monitor my flow and take corrective action if it fails.

4 REPLIES 4

Logan Poynter
Mega Sage
Mega Sage
Could you update your action to error check if the REST call fails, then pass that back into the flow for Error Handler to react to? Incomplete state just means the flow is expecting some sort of return from the Action. https://docs.servicenow.com/bundle/sandiego-servicenow-platform/page/administer/flow-designer/concept/action-error-evaluation.html

Problem is it directly go in Not Run instead of fail state, that is why Error Handler is not taking action

find_real_file.png

I'd suggest checking into Retry Policies to see if that helps in any way if you have not already. Going directly to Not Run would seemingly indicate it's not going into the step itself in the flow and would be an effect of a preceding flow step. 

TJLillo
Kilo Guru
Are you using a retry policy on the REST step? If it's a custom action, you can also set the error message and code conditionally in Rome. Then you could handle it with an if statement in your subflow. San Diego is going to introduce try/catch for flows I believe as well. See REST step documentation. https://docs.servicenow.com/bundle/rome-servicenow-platform/page/administer/flow-designer/reference/rest-request-action-designer.html