How to "nudge" a Flow that is with the "presumed interrupted" error

Hugo Gomes
Mega Guru

Hi everyone,

We had an issue in a client where Flows get a "Presumed Interrupted" error. And according to ServiceNow's support article, one of the solutions was to create a subflow with the remaining of the Flow and trigger it again.

I have done some reasearch and testing and it is possible to "nudge" the Flow and continue it with two simple steps:

- First, you need to change the state of the context to something valid, for example, "In Progress".
- And then you can nudge it by running this line of code, "sn_fd.FlowAPI.nudgeFlow('<sys_flow_context.sys_id>', 1);".

So if you want a script to do it, it would be something like this:

var flowContextId = '<sys_flow_context.sys_id>';

var gr = new GlideRecord("sys_flow_context");
gr.addQuery("sys_id", flowContextId);
gr.query();
if (gr.next()) {
    gr.state = IN_PROGRESS;
    gr.update();
}

var nf = sn_fd.FlowAPI.nudgeFlow(flowContextId, 1);


Hope it helps!

Hugo



0 REPLIES 0