Workflow Stuck in loop

Brian Lancaster
Tera Sage

We have a workflow and in it if the manager did not exist it would create a task to update the manager in service now.   In one particular workflow the approval was not setup correctly so every time it went for approval it, it would create this task.   I have updated the workflow and published it but these task seem to be using the old workflow.   Is there anyway to force them into the new version of the workflow?

1 ACCEPTED SOLUTION

Correct, if you want to 'close' the loop, you can go to 'Active Context' under Live Workflow and kill/delete the ones that are still executing.   But you would have to create new tickets if you want the new workflow followed.


View solution in original post

9 REPLIES 9

I don't see workflow correct version anywhere when I go into workflow contexts.


So, the active context section contains the 'snapshots' I was referring to.   (when you click show workflow from a ticket, this is what it is opening).



You should see an active context in executing for each and every one of your workflows stuck in a loop.



You will only see the newer version show up in this list as you create new tickets (make sure the new one is checked in or you are testing with the same user who had checked it out).


Sorry for confusion due to language.



In my comment correct version meant for version of workflow which is attached to request on which you want fix the issue.



Each time a workflow in updated a new version is created for that.


if you updated your workflow 3 times 3 version will be there. and each time there will be request attached to different versions as well.



Hence you will need to find the version of workflow on which you want do the fix. You can find that by through the request on which you are facing issue.


To cancel the workflow that is running



1)     Locate the "sys_id" of your task record.


2)     Access the "wf_context" table.


3)     Search that table where "id" = sys_id of the task record


4)     A list of workflow context should show up for that task


5)     Locate the workflow which is looping and change the "State" to cancelled.



As mentioned by "robert pastore" you will need to create a new task to have the new version of that workflow to attach.



Please refer to the below question for some extra information.


Re: Cancel active workflow if not newest version


Hi, do you have a suggestion for a mass cancel of workflows?



Thank you,


Heather Swearingen