
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-05-2023 07:21 AM
Hello Gurus. Can someone please give me a COMPLETE and DETAILED solution for the following common problem?
I have a flow. In the flow various service catalog Tasks are automatically generated. And maybe while working on those tasks, some users MANUALLY generate some additional service catalog tasks.
At the end of the flow, if ALL TASKS ARE CLOSED, I want to update my sc_req_item state. I should do that, right?
Question
What is the Standard / Proper / Elegant way to achieve this? I'm having trouble finding a complete solution. I see a complex business rule here . I think it is an "After Update" business rule on the sc_task table... But WHY do I have to drop out of the Flow and use a Business Rule??? Then it seems like future developers will be wondering how items are magically getting closed.
Wouldn't it be better to have a Flow Action of some sort, so everything is clear and visible IN the flow? Has anyone created such an action, and if so, could you share please? Or if that is a bad way of doing things, can someone please explain WHY Flow itself cannot be used to model this? Thanks!!
Solved! Go to Solution.

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-05-2023 07:31 AM
Hi @G24,
Create a subflow.
Input: RITM (reference to sc_re_item)
Output : Active found True / false (default is true)
Action Look up Record on sc_task table, active is true, ritm is current ritm.
- If any active task found,
Create wait for condition, active of that task is false.
End flow
If no task found set Output Active found to false.
In your main flow after you have finished with your automic tasks and logic:
Create a do the following until.
Call the subflow in it.
Do the following until condition : subflow output Active found is false.
After that proceed with closing the ritm.
Help others to find a correct solution by marking the appropriate response as accepted solution and helpful.

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-06-2023 11:51 AM
Building on what was proposed by @Peter Bodelier solution is as follows:
Create a reusable "Gather Task Status" SubFlow which can be reused and will either 1) WAIT on an unfinished task if one exists, or 2) Return a flag indicating that all tasks were in fact completed. I added some integers also, to indicate how many Complete, Incomplete, and Skipped tasks there were, but that is icing on the cake, and could be skipped.
The overall subflow looks like this:
The inputs and outputs look like this:
Individual flow actions look as follows:
The subflow is used inside of a regular Catalog flow as follows:
The details of those Flow actions are as follows:
Then at runtime, after all tasks are closed Closed Complete, Closed Incomplete, or Closed Skipped, like this:
The Catalog Item will be closed, like this. Woohoo! ...
Optional updating of comment field looks as follows:
The End. Please mark helpful if this helped you in some way!

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-05-2023 07:31 AM
Hi @G24,
Create a subflow.
Input: RITM (reference to sc_re_item)
Output : Active found True / false (default is true)
Action Look up Record on sc_task table, active is true, ritm is current ritm.
- If any active task found,
Create wait for condition, active of that task is false.
End flow
If no task found set Output Active found to false.
In your main flow after you have finished with your automic tasks and logic:
Create a do the following until.
Call the subflow in it.
Do the following until condition : subflow output Active found is false.
After that proceed with closing the ritm.
Help others to find a correct solution by marking the appropriate response as accepted solution and helpful.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-08-2024 05:39 AM
Hi @Peter Bodelier ,
I was trying your solution. But unable to do the step after this:
Please help me here.
Thanks,
Sam

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-06-2023 11:51 AM
Building on what was proposed by @Peter Bodelier solution is as follows:
Create a reusable "Gather Task Status" SubFlow which can be reused and will either 1) WAIT on an unfinished task if one exists, or 2) Return a flag indicating that all tasks were in fact completed. I added some integers also, to indicate how many Complete, Incomplete, and Skipped tasks there were, but that is icing on the cake, and could be skipped.
The overall subflow looks like this:
The inputs and outputs look like this:
Individual flow actions look as follows:
The subflow is used inside of a regular Catalog flow as follows:
The details of those Flow actions are as follows:
Then at runtime, after all tasks are closed Closed Complete, Closed Incomplete, or Closed Skipped, like this:
The Catalog Item will be closed, like this. Woohoo! ...
Optional updating of comment field looks as follows:
The End. Please mark helpful if this helped you in some way!

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-08-2023 11:53 PM
Nicely implemented!
Help others to find a correct solution by marking the appropriate response as accepted solution and helpful.