Reevaluation in Flow Designer
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-03-2024 03:25 PM
Here is my use case: I'm trying to create a flow that generates three tasks for a case in this order:
- The flow creates a case.
- The flow creates Task1.
- The flow checks a true/false field in the case form. If the user selects "yes," the flow creates Task2.
- The flow waits for Task1 to complete, and also for Task2 to complete if it exists (i.e., if the user selected "yes" and Task2 was generated). Then, the flow generates Task3.
The challenge is how to monitor the yes/no field value for the creation of Task2. If I use a wait-for condition, the flow will stop at that wait step and will wait for the condition to be met, meaning it will never trigger Task3 if the user doesn't select "yes". Alternatively, using an If logic instead of a wait action. Since the flow is sequential, after creating Task1, the flow will immediately evaluate the If condition. If the user hasn't selected "yes" by that time, the flow will skip the creation of Task2 and only wait for the completion of Task1 to create Task3.
How can I overcome this challenge? Specifically, how can I create Task1, monitor the yes/no field for the creation of Task2 (at lease for the period of time that task1 is still open), and then create Task3 whenever Task1 is completed and Task2 is completed if it exists?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-04-2024 12:50 AM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-04-2024 01:15 AM
A couple more things:
- The flow uses field "Approval" in place of the "Yes"/"No" flag field you will be using
- the Flow can be optimized by:
- updating a field on the Case record before creating Task 3.
- updating the condition in step 7➛8 adding a condition for the field updated @ (i), so that the second parallel branch "completes" not only if the Case is closed or the "Yes"/"No" flag field is set to "Yes", but also as soon as it is no longer opportune to create Task 2; which in turn will allow the Flow context to complete as soon as Task 3 is closed.