- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
12-05-2017 06:36 AM
Hi All,
I've created a new workflow for a catalog Item. The Catalog item has 5 checkbox variables. Each checkbox decides if a task is generated. We have scenarios however that once the ITEM has been submitted we might need to manually create further tasks.
I've created a wait condition script to check all tasks are closed before moving to a run script to close the ITEM.
For example If 2 checkboxes on the catalog item were true, 2 tasks get generated. We then manually create a 3rd task.
If the manually created task is closed before either of the workflow generated tasks the workflow works fine.
If the manually created task is the last task to be closed the workflow remains stuck at the wait condition. If I then go into the workflow context and 'nudge' the workflow, the wait condition runs and the workflow completes.
Is there a way to amend the workflow or some other means to get the workflow to complete without having to manually nudge the workflow?
Below is the workflow and the wait condition script:
Any help is greatly appreciated
Thanks
Sam
Solved! Go to Solution.
- Labels:
-
Scripting and Coding
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
12-05-2017 09:37 AM
Hi Andrii,
Thanks for all your help on this. I have managed to get this working following trawling through many articles on here. one had a link to the following:
Condition Activities - ServiceNow Wiki
section 4.4 example script got this working.
Thanks
Sam
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
12-05-2017 08:10 AM
I think you case requires detailed troubleshooting.
Plus you may need to provide screenshot of your ritm's workflow when it hanged (there should be related link "Show Workflow") - that might be helpful as well.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
12-05-2017 08:19 AM
Hi Andrii,
I've tried to detail below all the information, but let me know if there is anything else than can help to troubleshoot:
Business Rule
RITM
The workflow created SCTASK0051086 & SCTASK0051085. I then Manually created SCTASK0051087. Once all 3 tasks were open I then closed SCTASK0051086, then SCTASK0051085, then SCTASK0051087. All of these were closed using the close task UI Action within each tasks form.
Workflow stuck at wait condition
Workflow Context
If I then nudge workflow from here it then completes:
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
12-05-2017 08:23 AM
Ok, I see. Good details.
Business Rule should solve this. May be there is something that omits business rule.
what is inside those "Catalog Task" boxes?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
12-05-2017 08:24 AM
And what is inside Wait activity?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
12-05-2017 08:28 AM
