How to process with workflow with conditional task generation?

Apurva Jogal
Kilo Sage

Hi, 
The scenario I am dealing with right now is where multiple tasks are generated upon selection of certain variables. These variables are independent from each other. The RITM should be closed only when all SCTASKs created according to the conditions are closed. 

I have tried using Join activity, but it does not work since Join will move to complete only when all the lines going to the activity are executed which is not happening in this scenario.

 

Can anyone help me with how to achieve the desired outcome?

1 ACCEPTED SOLUTION

Apurva Jogal
Kilo Sage

Hi, 
I have referred to this link -  Wait for Closure of all Tasks in Graphical Workflow and used Wait Condition Activity instead of Join Activity to achieve the required outcome. 



Thank you everyone for replying to my post and helping me!

View solution in original post

3 REPLIES 3

Mark Manders
Mega Patron

Just create a new flow triggering on closure of an sc_task. Validate if no other tasks are open for this RITM and if not, close it. If so, end flow.

Or do it with a BR. You can't do this within the workflow because of the issue you described yourself.


Please mark any helpful or correct solutions as such. That helps others find their solutions.
Mark

Ankur Bawiskar
Tera Patron
Tera Patron

@Apurva Jogal 

you can use after update BR on sc_task for your specific catalog item

check this link where I shared sample script few years ago

How can we close RITM when all the catalog task is closed for that item? 

If my response helped please mark it correct and close the thread so that it benefits future readers.

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

Apurva Jogal
Kilo Sage

Hi, 
I have referred to this link -  Wait for Closure of all Tasks in Graphical Workflow and used Wait Condition Activity instead of Join Activity to achieve the required outcome. 



Thank you everyone for replying to my post and helping me!