- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
09-18-2020 11:17 AM
Hello there!
Hoping to see if anyone has any thoughts on how to make this work in Flow Designer, ( maybe a Custom action or subflow). I have created this Flow that is scheduled to trigger on a monthly basis, and steps 5-7 are not working out for me.
Step 2 - creates a REQ
Step 3 - look up datacenter records (let’s say there are 10)
Step 4 - For the 10 datacenters found
Step 4.1 - Create a RITM
Step 4.2 - Do the following (create 3 SCTASKs and associate to the RITM above)
After all the tickets are created
Step 5 - 7 Lookup any of the subtasks created in Step 4.2, when there is a change: State = Closed Complete. Check the other Catalog Tasks that share the same RITM. When all Catalog Tasks that share the same RITM are State = Closed Complete, update the related RITM in step 7.
Anybody have ideas to make Steps 5-7 work with a different configuration?
Thanks in advance!
Solved! Go to Solution.

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
09-19-2020 05:25 AM
Hi
Yes, this is absolutely possible.
One thing, that I personally learned from my experience, was that I needed to split up my requirements into smaller chunks of work.
For your case, I recommend to split the waiting for closing your SC Tasks from the Flow and put a matching logic into a BR.
The solution might look like this:
> For the creation of your RITMs and Tasks, keep your Flow.
> Cut out the waiting portion from the Flow and replace that logic like explained in the next steps
> create a BR, which runs AFTER UPDATE on the sc_task table.
> inside that BR, only trigger the BR when the state of the Task changes to closed
> inside the BR, GlideRecord to check, if there is another Task for the SAME RITM, where the CURRENT task is attached to.
> if yes, set the RITM to closed as well.
That is quite simple and straigh forward.
If you need support in creating the BR, let me know. I can create the example for you. Or you take that challenge yourself.
Let me know, if that answers your question and mark my answer as correct and helpful.
Have fun and Enjoy
BR
Dirk
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
09-18-2020 01:25 PM
Hi Dirk,
I think I understand what you are saying, but looks like I need to change it a bit to get it to work this way:
I am trying to achieve: The flow should be checking when any of the 30 SCTASKs are closed. If I close all 3 SCTASKs for 1 RITM, close that RITM. The other 9 RITMs could still be open and their subtasks can be closed at any time. The Flow should stay in progress/checking until all 10 RITMs are closed.
Is this possible?

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
09-18-2020 01:45 PM
Hi,
I am not sure if that is something you can do with single wait for condition.
You might have to have 2-3 loops with 1st loop fetching the ritms, then have a inner loop which goes through each ritm and fetch its tasks
then loop through the tasks again and under that add a wait for condition
That way, whenever the tasks associated to one ritm is closed, that ritm will be closed.
Kindly mark the comment as a correct answer and helpful if this helps to solve the problem.

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
09-18-2020 01:47 PM
Also note that a wait flow consumes more system resources. check out this link

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
09-19-2020 05:25 AM
Hi
Yes, this is absolutely possible.
One thing, that I personally learned from my experience, was that I needed to split up my requirements into smaller chunks of work.
For your case, I recommend to split the waiting for closing your SC Tasks from the Flow and put a matching logic into a BR.
The solution might look like this:
> For the creation of your RITMs and Tasks, keep your Flow.
> Cut out the waiting portion from the Flow and replace that logic like explained in the next steps
> create a BR, which runs AFTER UPDATE on the sc_task table.
> inside that BR, only trigger the BR when the state of the Task changes to closed
> inside the BR, GlideRecord to check, if there is another Task for the SAME RITM, where the CURRENT task is attached to.
> if yes, set the RITM to closed as well.
That is quite simple and straigh forward.
If you need support in creating the BR, let me know. I can create the example for you. Or you take that challenge yourself.
Let me know, if that answers your question and mark my answer as correct and helpful.
Have fun and Enjoy
BR
Dirk
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
09-29-2020 04:35 PM
Sorry for the delay, thanks for the step by step details! This is exactly what I want to achieve and it works.