- 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-23-2021 04:47 AM
Hi Brad,
There were 3 group approvals before the workflow gets restarted and end right away. So, there was approval pending from one of the groups.
I was surprised after analyzing the functionality as sometimes it is working as expected but sometimes it fails like this above failure result.
Thanks.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-23-2021 06:07 AM
Are you able to re-create this test case? Maybe ALL requests pending approval from one of the groups will behave this way? Is your Wait for field on the Approval Coordinator "All child activities to be approved"? Are more approval records generated after the restart? If not then approved and/or requested approvals should result in the requested state by the business rule. It sounds like it's hitting the Approval Coordinator then the wait for condition is satisfied when it should not be.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-26-2021 01:17 AM
Hi Brad,
This issue has been resolved. I have added 'wait for condition' activity at last which resolved the issue. Thanks for your time.
Thanks.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-26-2021 03:42 AM
You are welcome, glad to hear you got that last case working.