Flow Designer: Parallel Catalog Tasks — stop waiting on first reject
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
3 weeks ago
Hi ,
I’m using Flow Designer with “Do the following in parallel” action to create two Catalog Tasks (SCTASKs) at the same time. Each task has its own catalog variable (variables are on the Catalog Item , not on the SCTASK table):
• Task A uses Variable 1 (approve / reject)
• Task B uses Variable 2 (approve / reject)
I need this behavior:
1. If Variable 1 = Approved, then wait for Variable 2 to be decided (and vice versa).
2. If either Variable 1 or Variable 2 = Rejected, then stop waiting immediately and close things out (close/complete the SCTASKs and cancel/close the RITM / request).
Because the tasks can be worked in any order, I need the flow to handle “first reject wins” and “otherwise wait until both approve”.
Question: What’s the best way to implement this in Flow Designer?
• Can Flow Designer wait for whichever decision happens first (approve/reject) across parallel branches, and then conditionally terminate the other branch?
Any guidance or best-practice suggestions would be greatly appreciated.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
3 weeks ago
Don't do this in parallel. Just create both tasks and uncheck the 'wait for completion' box. That way you can have them both created.
Set a 'wait for condition' below the task creation that you set to all options (task 1 approve or reject, task 2 approve or reject). Then use an if to check if any of the tasks is set to reject (lookup both records). If so, close everything.
If not create an 'if/else' to check on the task that is not yet done (if task 1 is approved, wait for task 2 - if task 2 is approved, wait for task 1) and for both if/else, set a flow variable checkbox 'approve' after the wait if it's approved.
Then you final if/else: if flow variable is not true (so rejected) close everything, else do whatever you want because both are approved.
Please mark any helpful or correct solutions as such. That helps others find their solutions.
Mark
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
2 weeks ago
Thanks a lot for the approach — I really appreciate it. I tried implementing it, but I’m stuck on the Wait for condition part.
In Flow Designer, Wait for Catalog Task Condition only lets me select one SCTASK record. So when I add the wait right after creating Task 1, the flow pauses there and Task 2 never gets created.
What I need is: create both SCTASKs first, then wait for either one to reach a closed state (Closed Complete / Closed Incomplete / Closed Skipped), and only then read that task’s catalog variable (Approve/Reject). If either variable = Reject, I want to stop waiting and close/cancel everything.
Am I misunderstanding your intended flow order, or is there a better pattern to “wait on whichever task finishes first” without blocking creation of the second task? Thanks again!
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
2 weeks ago
@Mark Manders Thanks a lot for the approach — I really appreciate it. I tried implementing it, but I’m stuck on the Wait for condition part.
In Flow Designer, Wait for Catalog Task Condition only lets me select one SCTASK record. So when I add the wait right after creating Task 1, the flow pauses there and Task 2 never gets created.
What I need is: create both SCTASKs first, then wait for either one to reach a closed state (Closed Complete / Closed Incomplete / Closed Skipped), and only then read that task’s catalog variable (Approve/Reject). If either variable = Reject, I want to stop waiting and close/cancel everything.
Am I misunderstanding your intended flow order, or is there a better pattern to “wait on whichever task finishes first” without blocking creation of the second task? Thanks again!
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
2 weeks ago
@Mark Manders Thank you for your response and guidance earlier. I explored another approach in the meantime and was able to resolve the issue by implementing it the following way. Sharing it here in case it helps others facing a similar situation
- Create Task A (Wait: False)
- Create Task B (Wait: False)
- Do Until (RITM State is Closed Complete OR Closed Incomplete):
- Wait for 1 Minute
- Look Up Records (Tasks for this RITM where State = Closed Incomplete)
- If (Count > 0):
- Update Record (RITM): State = Closed Incomplete.
- Update Records (Tasks): Set all Open tasks to Closed Incomplete and add your Work Note.
- Else If (Check for Success):
- Look Up Records (Tasks for this RITM where State = Open OR WIP)
- If (Count == 0):
- Update Record (RITM): State = Closed Complete
