RITM closed incomplete but task is open and showing cancelled error in workflow
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎06-08-2022 03:33 PM
Hi All,
I have a requirement, where 3 tasks will be created at the same time. The condition is, if any one of the task is closed incomplete, the other two tasks also need to be closed incomplete and set the RITM to closed incomplete. If all the three is closed closed complete, then another task will be created. I have created the workflow using branch and join activity as shown below.
Upon, rejecting/closed incomplete of any one of the task, The RITM is set to closed incomplete (which is working fine) but tasks still showing open and showing this error
And,
Task is still showing open under RITM.
Any changes needed to workflow are any script changes ?
Thanks,

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎06-08-2022 03:49 PM
Hello,
You're not addressing the catalog tasks in your flow? Meaning...by set value, run script or anything. You're just addressing the RITM, so with that said, the tasks wouldn't just randomly get addressed and set to closed, etc.?
You'd need to consider using a run script activity to query the sc_task table, find the open/active sc_task(s) and then set the state value to the relevant value and update: https://developer.servicenow.com/dev.do#!/reference/api/paris/server/no-namespace/c_GlideRecordScope...
You'd do all of this before you set the RITM closed. So use a run script, then perhaps a timer activity of maybe 30 seconds to let the database be updated, then use the setValue for the RITM.
Please mark reply as Helpful/Correct, if applicable. Thanks!
Please consider marking my reply as Helpful and/or Accept Solution, if applicable. Thanks!
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎10-02-2023 01:39 PM
Hey,
What about if you have a condition such as:
If it is a mix of sctasks, then:
If any are Closed Complete, then RITM and Request Closed Complete
Else RITM and Request Closed Incomplete