Workflow Issue: A workflow is struck in an activity and doesnot advance to its next activity.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎03-05-2018 05:49 AM
I have a workflow that contains activities such as catalog tasks and switches.
My workflow has been working good for many months but recently I saw a workflow context that stopped at the catalog task, and doesn't advance to the next activity (a switch) upon the task closure.
I see a log entry in that context that says "After running a sequence of activities we expected a 'last executing' record to predict the future stages from".
I tried Nudge option but got the same log entry again in the content. Only one workflow context has this issue, others are just fine.
Can someone help me on this logged error?
- Labels:
-
Workflow
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎08-04-2022 03:35 PM
Hi
I know this post is super old, but thought I might try since this thread is the only reference in the universe to the specific error message I'm getting.
"After running a sequence of activities we expected a 'last executing' record to predict the future stages from"
I get that at the end of the workflow logs in a 'catalog task' activity (meant to create a TASK). No task is created, just that mysterious incomplete log from the Engine. Do you have any suggestions? I've tried a number of things with no luck. Thank you!
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎01-02-2019 05:41 PM
on the switch activity please check the options of the switch and the possible options of the variable.
It is my belief that you passed a value for which the switch has no path for

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎01-04-2019 01:25 AM
Thanks - it was passing the variable name rather than value which was odd. It was random and there was no consistency with when or why it was happening. I have deleted the switch in the workflow, renamed the variable value in the hope that it doesnt happen again.
Just needed to look to see if there was a way in which I could deleted and reinsert the activity so that I could nudge the workflow as per the above script?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎01-04-2019 05:17 AM
i'm not sure you can nudge it past this point. maybe you can update the workflow activity content with the value that you want it to go down and then nudge it. AKA make that activity think that its done. After all, its all table data.
Other option would be to restart the workflow with the new workflow. todo this use this script
var wkfw = new Workflow();
fixme = new GlideRecord('{{table}}');
fixme.addQuery('sys_id', '{{sys_id of record}}');
fixme.query();
while (fixme.next())
{
var x = new WorkflowApprovalUtils().reset(fixme, "res");
var context = new Workflow().startFlow(wkfw.getWorkflowFromName('{{NAME of workflow}}'), fixme, 'update');
}
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎05-06-2019 08:49 AM
Hi,
I had the same issue and was able to fix it
My situation is the following:
I have a UI-Action setting the state from 2 -> 3
I have a workflow condition, waiting for state==3 ... so the workflow now continues.
next was a "run-script" with the following code:
new myClass().myFunction(current);
The last statement of myFunction(), was an current.update() after changing the current.state from 3 -> 4. Whereas in my code I named current = request ;
current.state = 4
current.update();
I was able to fix the issue after deleting the current.update()
the state changed automatically on "4"
plz mark as helpful