- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-22-2021 11:25 AM
Hello,
I am facing very weird issue while restarting the workflow.
I am restarting the workflow when the change state moves to Draft by clicking on Re-Draft button. So using UI Action I am just setting the values like change state, clearing start/end date etc. and for starting the workflow I am using after business rule. Please refer below screenshots.
I am writing the business rule in scoped application that's why used global prefix.
I am getting below issues :
1. Sometimes workflow working fine after restarting.
2. Sometimes workflow getting stuck in begin after restarting.
3. Sometimes workflow gets completed with all activity as restarted but only set fields and end activity as finished then workflow will not start.
Please help me in identifying where I am going wrong?
Thanks.
Solved! Go to Solution.
- Labels:
-
Change Management
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-22-2021 12:13 PM
I have restarted workflows in a simple Fix Script for a few RITMS, and we always add an update line after the restart so that the workflow doesn't get stuck. It's similar to the Nudge button when viewing the workflow context. I'm not sure if you can do this all in one line, so I'll show you the syntax that has worked for us.
var wflow = new global.Workflow();
wflow.restartWorkflow(current);
wflow.runFlows(current, "update"); //the update is just going to nudge the workflow
If something is still amiss sometimes, what does it look like if you Show Workflow from the RITM to see the active or completed context? Are any activities blue/completed or green/running?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-22-2021 12:13 PM
I have restarted workflows in a simple Fix Script for a few RITMS, and we always add an update line after the restart so that the workflow doesn't get stuck. It's similar to the Nudge button when viewing the workflow context. I'm not sure if you can do this all in one line, so I'll show you the syntax that has worked for us.
var wflow = new global.Workflow();
wflow.restartWorkflow(current);
wflow.runFlows(current, "update"); //the update is just going to nudge the workflow
If something is still amiss sometimes, what does it look like if you Show Workflow from the RITM to see the active or completed context? Are any activities blue/completed or green/running?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-22-2021 09:13 PM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-23-2021 12:51 AM
Workflow getting restarted now. It works perfectly fine now. But sometimes it is not getting restarted and gets completed when I am trying to Re-Draft it.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-23-2021 04:31 AM
This context does seem to indicate that it did get restarted. Did it go all the way to the end right away due to no open approvals? It doesn't look like your business rule conditions or script cover approvals already approvd/completed (or skipped due to no/an invalid approver). What activity was the workflow on just before it was re-started? You might be able to determine more of what happened here from the Workflow Context link on the RITM, on the Workflow Activity History, or maybe Workflow Log...