Not close the RITM until Manual task(s) are closed

Mallika Bhupath
Tera Contributor

All,

 

I have multiple catalog items where users create manual task(s) in addition to the task(s) that are generated by the workflow. However, when the user closes the workflow generated tasks before the manual tasks, the RITM closes and the XML shows active = false. But the manual tasks are still open.

 

How do I prevent the RITM from closing if any of the manual tasks or the workflow tasks are open and only close the RITM when all the associated tasks are closed?

 

TIA!

Mallika

3 REPLIES 3

Elijah Aromola
Mega Sage

You would need to add a step to your flow/workflow to query the related tasks and make sure they're all inactive before you close the RITM.

Dr Atul G- LNG
Tera Patron
Tera Patron

Hi @Mallika Bhupath 

 

As @Elijah Aromola  suggested, either add a step in flow to check all SCtask status or write a BR for same condition.

https://www.servicenow.com/community/itsm-forum/how-to-check-the-task-close-before-closing-the-chang...

https://www.servicenow.com/community/developer-forum/check-for-change-task-is-closed-before-closing-...

 

*************************************************************************************************************
If my response proves useful, please indicate its helpfulness by selecting " Accept as Solution" and " Helpful." This action benefits both the community and me.

Regards
Dr. Atul G. - Learn N Grow Together
ServiceNow Techno - Functional Trainer
LinkedIn: https://www.linkedin.com/in/dratulgrover
YouTube: https://www.youtube.com/@LearnNGrowTogetherwithAtulG
Topmate: https://topmate.io/atul_grover_lng [ Connect for 1-1 Session]

****************************************************************************************************************

Stefan Georgiev
Tera Guru

Hello @Mallika Bhupath ,

I am not sure if you are using a flow or workflow for the case, but if you are using a flow you can do the following:

 

  1. Use a Lookup records activity and get all tasks that are assigned to you RITM/SCTASK or other type of record that you assign manually tasks.
  2. Run a For each of the Lookup Records <you manual tasks>
  3. Set a Wait for conditions ==> State == Cloded Complete 
  4. After the For Each Update the RITM and end the Flow

    Something like this

 

StefanGeorgiev_2-1702474069510.png

Hope that this helps you!

If the provided information answers your question, please consider marking it as Helpful and Accepting the Solution so other community users can find it faster.

All the Best,
Stefan