Close the RITM after all the catalog tasks are closed

divyadhanda
Tera Contributor

I have a requirement in which I need to generate 6 tasks in parallel.

 

Since I am using flow designer, I have checked the wait checkbox under each catalog task action.  At the same time, RITM should get closed complete after all the tasks are complete. 

Since I have checked the wait checkbox, it's not waiting and executing the if condition in 12th line number and returning false. 

divyadhanda_0-1764075639000.png

Actually, it needs to wait till all the tasks completion. How can I close the RITM only after all the tasks are complete.

1 ACCEPTED SOLUTION

@divyadhanda 

it's already shared and self-explanatory

Still sharing it again

-> Lookup Records on sc_task with that filter Condition

AnkurBawiskar_0-1764081074086.png

 

-> Iterate on the above using For Each

AnkurBawiskar_1-1764081105391.png

 

-> then use Wait for Condition and select your record which is there in this iteration and use Active=false

AnkurBawiskar_2-1764081170325.png

 

AnkurBawiskar_3-1764081196167.png

 

💡 If my response helped, please mark it as correct and close the thread 🔒— this helps future readers find the solution faster! 🙏

Regards,
Ankur
Certified Technical Architect  ||  9x ServiceNow MVP  ||  ServiceNow Community Leader

View solution in original post

8 REPLIES 8

@divyadhanda 

it's already shared and self-explanatory

Still sharing it again

-> Lookup Records on sc_task with that filter Condition

AnkurBawiskar_0-1764081074086.png

 

-> Iterate on the above using For Each

AnkurBawiskar_1-1764081105391.png

 

-> then use Wait for Condition and select your record which is there in this iteration and use Active=false

AnkurBawiskar_2-1764081170325.png

 

AnkurBawiskar_3-1764081196167.png

 

💡 If my response helped, please mark it as correct and close the thread 🔒— this helps future readers find the solution faster! 🙏

Regards,
Ankur
Certified Technical Architect  ||  9x ServiceNow MVP  ||  ServiceNow Community Leader

@divyadhanda 

Hope you are doing good.

Did my reply answer your question?

💡 If my response helped, please mark it as correct and close the thread 🔒— this helps future readers find the solution faster! 🙏

Regards,
Ankur
Certified Technical Architect  ||  9x ServiceNow MVP  ||  ServiceNow Community Leader

Hi Ankur,

RITM gets closed only after all the tasks are closed complete, but i could see error in the log.

Also, if any of the task is closed inclomplete then RITM should get closed incomplete.

Can you help me on this?

divyadhanda_1-1764135336905.png

 

 

 

 

 

Hi Ankur,

Thank you for your detailed response 😀

The above flow designer part which you have shared, helped a lot on the RITM closure.

I actually had one more condition as below and the update should happen only after all the 6 tasks are closed/cancelled.

1. RITM should get closed incomplete, if any one of the tasks are cancelled.

2. RITM should get closed complete, if all tasks are closed.

So, I further added a condition, and it is also working.

Sharing the same here, so that it will be useful to others as well.

divyadhanda_0-1764140622477.png

Thanks again 😀