RITM and SCTASKS State
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-30-2023 09:42 AM
I am working on a catalog item where the requirement is to create two parallel sctasks. If one of the task is set to closed incomplete, then another sctask and also the ritm state is being changed to closed incomplete. Thus the ritm stage is set to request cancelled.
But the reqs is to wait for the second sctask to get over and RITM state should be set as per the below conditions.
Both sctasks - Closed complete = Ritm - closed complete
One sctask closed incomplete/skipped and one sctask is closed complete = Ritm - closed complete
Both sctasks closed incomplete/skipped = Ritm - closed incomplete.
Need advise on how this can be accomplished.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-30-2023 10:10 AM
Hi Sravya,
You can achieve this by modifying corresponding workflow
Create one JOIN and add both sctask to that then add that JOIN to Run script activity .
In that Run script GLIDE SCTASK and query current RITM and if condition check for Sctask state, according to that update RITM state
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-30-2023 10:17 AM
Hi @sravya vemula ,
If you want to make the solution for all request and catalog task, then create a BR and call script include to achieve this by addition logical conditions.
If only for single request then use workflow, it is best option to di that. Create task parallel and wait for both task to get closed and add join (it will help to wait when all flows are met) and run the script.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-30-2023 04:04 PM
hi,
Flow designer will be the best option for that. In Create catalog task there is wait checkbox and if you select it flow will be waiting till sctask is not closed
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-31-2023 07:48 AM
Wait, uses Active to decide when to continue the flow, and it isn't going to check the state of the other tasks, and there may be a variable number of tasks. https://docs.servicenow.com/bundle/utah-build-workflows/page/administer/flow-designer/reference/crea...
Basically, you're trying to set the Request state when all Tasks are complete/incomplete.
I would consider something like:
-Trigger on SC_Task update
-Use the relationship from Task to Request, to find the other Task
-Check Task 2 against your logic (if task 1 AND task 2 = something then set Request state)