- 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-24-2020 04:30 AM
hi
when i tried this same scenario in my personal instance its working but When i tried in my Work Instance it is not working
While trying in my Work Instance is there any thing other than these to be considered
Thank you,
Gowtham
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-24-2020 05:53 AM
Hi
I tried it on my personal instance its working but when i try it on my work instance its not working ,should i consider any other conditions while trying on the work instance
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-24-2020 06:01 AM
Please check any other BR is blocking the update operation
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 06:42 AM
There is no BR's blocking the update but There is another BR cancelling the workflow when the state is closed cancelled does this have effect on my BR
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-24-2020 08:14 AM
Hi Gowtham,
that could be the reason
Regards
Ankur
Ankur
✨ Certified Technical Architect || ✨ 9x ServiceNow MVP || ✨ ServiceNow Community Leader