Rethinking an Approval Workflow

JGuerrero0323
Tera Expert

Hi community,

I'm looking for your input on a workflow I've designed and how to improve it. I'm trying to create a subflow to handle an approval process, but I've run into a design issue.

 

My Current Workflow Logic

 

The core logic of my current process is simple, but it's causing me some scalability problems. It works like this:

  • The user fills out a request form.

     

     

  • The workflow then checks a condition:

    • If the user has checked a box for "Attaching Approval Email" (meaning a pre-approved reference is uploaded), the flow continues to the next step. 

      JGuerrero0323_1-1757128831880.png
    • Else, the workflow triggers a request for approval. Once approved, it proceeds to the exact same flow as the first option.

The main problem with this is that I have to build the same "next steps" twice, which makes maintenance difficult. My goal is to use a single subflow that handles the "next steps" so I only have to build it once. Screenshot 2025-09-06 124148.png

 

My Goal and Question to the Community

 

I want to create a more efficient and reusable process, ideally by using a single subflow for the post-approval logic.

How would you handle a requirement like this? I'm open to different approaches that could make this process better for my team.

What do you think is a better way to structure this to avoid duplicating code? Are there any design patterns or best practices I should consider?

2 REPLIES 2

Bhuvan
Tera Sage

@JGuerrero0323 

 

1. Create a subflow and move the 4 actions repeated in both the conditions viz., Package Software, Policy Request, Add/Remove Existing Policy and Add/Remove users

 

2. Create a IF condition in the flow to check whether Approval email is attached. If it evaluates to true, call the subflow

 

3. Create Else condition in the flow and request ask for approval and once approved, call the subflow

 

Below is a sample Flow -> Subflow logic to make you visually imagine the steps, update based on your requirements

Bhuvan_1-1757132957450.png

I hope you appreciate the efforts to provide you with detailed information. If my response helped to guide you or answer your query, please mark it helpful & accept the solution.

 

Thanks,

Bhuvan

Chavan AP
Tera Guru

Please try the following approach:

 

Create a subflow that includes all the actions you want to perform. Then, call this subflow as shown below:

 

Screenshot 2025-09-06 at 07.24.34.png

Chavan AP
[ Architect | Certified Professional]

Was this response helpful? If so, please mark it as Helpful and Accept as Solution to help others find answers.