- 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 11:38 AM
Hi,
When you say not working, what is happening? Is it not fetching the records in step5? If thats the case, then move step 5 to 4.3 so that it runs only after the tasks are created.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
09-18-2020 12:49 PM
Hi Asifnoor,
It looks like it is passing Step 5, but stays waiting in Step 6.
I've closed the 3 SCTASKs on 1 RITM, but the related RITM does not move onto Step 7. I have been waiting for at least 5 minutes.
Step 5 = Lookup Active = True and Request Item.Item = <my item name>.
I guess there are a lot of open records.
Any other ideas to try?

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
09-18-2020 01:03 PM
I think your step5 is not correct.
Why is it saying 726 records in step 6 when there are suppose to be only 3 or 4 records.
Can you check the lookup conditions once.
Mark the comment as a correct answer and also helpful if it helps to solve the problem.

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
09-18-2020 01:04 PM
Hi
I guess your loop is wrong in logic but working correctly according to your config.
It is not sure, that the RITMs in the second loop are fetched in the order you created them in the first loop.
You create three SC Task for EACH RITM. That means is some cases, the wait for condition will not trigger until the last SC Task was closed.
But anyhow, this is your expected result, isn't it? So, try to close ALL your tasks, then (latest), the flow will advance and move on.
Let me know if that is correct.
BR
Dirk