Flow multi level approval steps
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
2 hours ago
We are migrating our workflow to flows. In some of our workflows, we have this approval process which sends multi-level approval tasks. For specific forms, when a user submitted a request, it will send approval task to user's manager. We have a custom field also in sys_user table for Next Level Manager. When a user's manager wasn't able to approve the request within specific period of time, it will send the next approval to the Next Level Manager but still leaving the first approval task open and can be approved.
Is there any way we could do this without the flow getting stuck? I've been using Ask for Approval action and since it waits for the approval to be approved/reject, it gets stuck on that part even if the next approval was already approved.
Process:
1. Requestor submits a request
2. Approval task sent to requested for's manager
3. While waiting for it to be approved, a countdown is running at the same time
4. When it passed the count down, new approval task will be sent to Next Level Manager
5. Request can be approved by either requested for's manager or next level manager. As long as it has been approved, flow should move forward
6. After the approval, catalog task will be created
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
an hour ago
It's going to be a bit long, but let me outline two possible approaches for you.
Both options allow you to achieve this in Flow Designer, but they handle the logic differently.
Option 1: Using "Do the following in Parallel" (Recommended for No-Script)
You can use the Do the following in Parallel flow logic combined with a Wait for a duration timer. This allows you to handle the countdown and the next-level approval within a single flow without needing separate custom fields or extra scripts.
How it works:
Add a Do the following in Parallel block.
Branch A: Add the Ask for Approval action for Manager $\alpha$. (Set approval rule to Any approve).
Branch B: Add a Wait for a duration action (set to 6 hours). Right after the timer, add another Ask for Approval action for Manager $\beta$.
After the Parallel block, add your Create Catalog Task action.
Risk / Consideration for Option 1:
Since this keeps the flow active and "waiting" in the background for 6 hours, having a massive volume of requests running this flow simultaneously could potentially impact system performance. If you expect hundreds of these requests to be open at the exact same time, you should monitor the flow engine performance.
Option 2: Using a Secondary Flow (Your Original Idea)
Your idea of using a secondary flow (Flow B) to handle the 6-hour timeout is also a solid and very clean architectural approach, especially if you want to avoid long-running flows.
How it works:
Flow A (Main): Triggers the approval for Manager $\alpha$. You will need a custom flag field (e.g., u_auto_passed) on the record. If Flow A moves forward, it checks this flag. If True, it routes the next approval to Manager $\beta$.
Flow B (Timeout Controller): Triggers 6 hours after the request creation. If Manager $\alpha$'s approval is still pending, Flow B sets the flag u_auto_passed to True and programmatically approves or moves the process forward.
Conclusion
If you want a pure configuration-based solution without managing multiple flows and custom flags, Option 1 (Parallel) is the easiest to implement. However, if you are concerned about keeping flows in a "waiting" state for a long time, Option 2 is the safer route for high-volume environments.
Hope this gives you a good starting point!