- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-31-2023 12:20 PM - edited 07-31-2023 12:50 PM
Hi all,
For a RITM Mutiple Sc task is create now how to set the ritm state to closed incomplete if any of the Sc task state is closed incomplete similarly for closed skipped.
Thanks,
@Sonam Tiwari could you please help on this
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-01-2023 12:46 AM
Hi @William08 ,
To you main flow you, you can add a subflow in the below manner and pass it the ritm record.
The subflow looks something like this
Initializing a flow var in second step so that futher in for each step we can track all the states of child tasks from which we then need to check if any one is closed complete or incomplete or skipped.
and so on.
I had to use bit of script because couldn't track all the child states at once to check one of them is in a specific state like (complete, incomplete or skipped).
Not always a good idea to do too much scripting in flows if not required.
This is working fine for me. Please test once.
Also as @sleepycrown said, we have alternative ways to do it and BR is one of them as well. Like you can attach this subflow to any other flow with similar requirement, same way you can make use of BRs to have a common solution.
Thanks

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-02-2023 12:46 AM
Hi,
I would recommend setting the state in the Flow/Workflow based on the outcome of the SCTASK.
I believe it is considered bad practice to create custom business rules on the sc_req_item table, because there is so many other things going on in these tables concerning stages and states.
I've spent some time looking for a reference for this, but cannot find it at the moment (believe it was on the Docs).
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-02-2023 08:01 AM
If you can provide reference that indicates it’s not a good practice to have BR on sc_req_item, I would appreciate it as I cannot find it either. I’ve never seen it mentioned nor from ServiceNow. There are plenty of baseline rules on many tables in the platform; with good run conditions and a concise script, there should be no issues. Empirically, I’ve not noticed any of my BRs on sc_req_item causing any performance impact and never shows up in long running jobs/processes. It’s also never showed up in my instance health reports from ServiceNow.
I mean, this is what business rules are for…
“A business rule is a server-side script that runs when a record is displayed, inserted, updated, or deleted, or when a table is queried.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-31-2023 02:17 PM
Hi there,
There are many ways to accomplish this. I recently created a solution for my organization based on the same problem statement. I ended up creating a before business rule that runs on sc_req_item that evaluates it's child sc_tasks for their state, setting the RITM state based on that, and doing the same from the RITM to the sc_request. For example, if all child sc_task records are Closed Incomplete, the RITM becomes Closed Incomplete, and if all RITMs are Closed Incomplete, the sc_request also becomes Closed Incomplete.
There is a baseline business rule called task closer that is responsible for setting a default state upon completion; however, this doesn't allow you to dynamically set the state based on the state(s) of the related child records. I left this in place and execute my business rule at a higher order (so after task closer).
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-03-2023 10:50 AM
Hi @sleepycrown Thanks a lot
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-01-2023 12:46 AM
Hi @William08 ,
To you main flow you, you can add a subflow in the below manner and pass it the ritm record.
The subflow looks something like this
Initializing a flow var in second step so that futher in for each step we can track all the states of child tasks from which we then need to check if any one is closed complete or incomplete or skipped.
and so on.
I had to use bit of script because couldn't track all the child states at once to check one of them is in a specific state like (complete, incomplete or skipped).
Not always a good idea to do too much scripting in flows if not required.
This is working fine for me. Please test once.
Also as @sleepycrown said, we have alternative ways to do it and BR is one of them as well. Like you can attach this subflow to any other flow with similar requirement, same way you can make use of BRs to have a common solution.
Thanks

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-14-2024 07:53 AM
this subflow is giving internal server error while i try to test it