Multiple Tasks with different wait condition

AllenJaikkA
Tera Contributor

Hi! We had this requirement to trigger tasks and if some of the task is closed the other one gets triggered. There are 10 tasks that will fire right after the ticket is submitted. If 4 of the task is closed, say we need to know if Task 5,6,7 and 8 is closed. 15 new tasks will be created and the tricky part is there is a wait condition for triggering the next tasks and if all of the tasks are closed, thats the time that the RITM will be closed. I tried using do the following in parallel with unchecked wait in the task but the flow reads it as completed already even though the ticket is still open. Do we have any other options? Thank you 

5 REPLIES 5

VaishnaviK43271
Tera Contributor

Hi @AllenJaikkA !!

Trigger

  • Service catalog

Look Up Record on Requested Item Table

 

STEP 1 Create Task 1–5

  • Create Catalog Task → 1

  • Create Catalog Task → 2

  • Create Catalog Task → 3

  • Create Catalog Task → 4

  • Create Catalog Task → 5

STEP 2 Wait Until Task 1–3 Are Closed

Wait for Condition

VaishnaviK43271_0-1767856814642.png

 

STEP 3 Create Task 6–8

  • Create Catalog Task → 6

  • Create Catalog Task → 7

  • Create Catalog Task → 8

STEP 4 Wait Until Task 7 Is Closed

Wait for Condition

  • Table: sc_task

  • Conditions:

    • Task identifier = Task 7

    • State = Closed

  • Wait until record count = 0

STEP 5 Create Task 9–10

  • Create Catalog Task → 9

  • Create Catalog Task → 10

STEP 6 Wait Until ALL Tasks Are Closed

Wait for Condition

  • Table: sc_task

  • Conditions:

    • State = Closed

  • Wait until record count = 0

STEP 7 Close the RITM

  • Update Record → RITM

  • State = Closed Complete

Mark it helpful if this helps you to understand. Accept solution if this give you the answer you're looking for.

Thank You