- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-23-2020 10:52 PM
I have a custom choice in the sc_task if that choice is selected the workflow is stopping if the task state is change to closed cancelled(custom choice)
I have created a BR on sc_task to start the work flow again
i have used
Workflow().broadcastEventToCurrentsContexts(gr, 'update', null)
to start the workflow again but the workflow is not starting again any ideas how to stat the workflow again
Thank you,
Gowtham
Solved! Go to Solution.
- Labels:
-
Service Catalog
-
Workflow
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
09-03-2020 08:42 AM
Please use this workaround and this should work fine.
Business rul
Table: sc_task
When: after update
Condition: State changes to Close Cancelled
(function executeRule(current, previous /*null when async*/) {
var wf = new Workflow();
var ri = new GlideRecord("sc_req_item");
if (ri.get(current.request_item)) {
wf.runFlows(ri, 'update');
}
})(current, previous);
Reference:
activity.result = '10' not working for custom state values
Regards
Ankur
Ankur
✨ Certified Technical Architect || ✨ 9x ServiceNow MVP || ✨ ServiceNow Community Leader
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-23-2020 11:52 PM
Hi Gowtham,
workflow will proceed once you use that script only when there is some wait for condition in RITM workflow
after the 3 set values step you need to use wait for condition script in order to pause the workflow
once the BR triggers the workflow will proceed from the paused activity
Regards
Ankur
Ankur
✨ Certified Technical Architect || ✨ 9x ServiceNow MVP || ✨ ServiceNow Community Leader
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-23-2020 11:58 PM
I have Wait for Completion in the Catalog Task Activity ,i dont have any wait conditions other than that
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-24-2020 12:18 AM
Hi Gowtham,
you have used Wait for Completion in Catalog Task Activity.
So you added the extra condition for custom choice?
please share the image for catalog task activity condition you configured for custom choice
Regards
Ankur
Ankur
✨ Certified Technical Architect || ✨ 9x ServiceNow MVP || ✨ ServiceNow Community Leader
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-24-2020 12:23 AM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-24-2020 12:24 AM
Hi Gowtham,
Did you check the choice value is proper i.e. activity.result == '10'
Regards
Ankur
Ankur
✨ Certified Technical Architect || ✨ 9x ServiceNow MVP || ✨ ServiceNow Community Leader