ASK FOR APPORVAL LOGIC FALURE

naresh59
Tera Contributor

Hi Team,

I am facing an issue with the **Ask For Approval** step in Flow Designer when dynamically generating approvers through a Script Step.

**Requirement**
We have a catalog item where multiple owners are selected in a variable. Based on certain conditions (grade, VIP, etc.), we determine which users should receive approval. All selected valid owners must receive an approval request, and the flow should wait until **all approvers approve**.

**Current Implementation**

1. A **Script Step** is used before the Ask For Approval action to determine the list of approvers.
2. The script evaluates the `certain feilds variables and checks the owner grade from the `hr` table.
3. The script builds a dynamic approval rule and returns it as output.

Example output from the script:

ApprovesAllU[sys ID,sys ID,sys ID]

This value is passed to the **Ask For Approval → Rules** field using a data pill.

**Observed Behavior**

* The Ask For Approval step creates all approval records correctly.
* Three approval records are generated.
* However, when the **first approver approves**, the flow continues to the next step.
* The remaining approvers automatically become **No longer required**.
* The flow does **not wait until all approvers approve**, even though the rule is `ApprovesAllU`.

**What I Have Verified**

* The rule format is correct (`ApprovesAllU[user1,user2,user3]`).
* The script output is populated correctly in the flow execution details.
* Approval records are generated successfully in the `sysapproval_approver` table.

**Expected Behavior**
The flow should wait until **all approvers approve** the request before moving to the next step.

**Question**
Is there any additional configuration required in the **Ask For Approval** step to ensure the flow waits for **all approvers**, or is there a better approach to dynamically pass multiple approvers from a Script Step?

Any guidance would be appreciated.

1 REPLY 1

GlideFather
Tera Patron

Hi @naresh59,

 

you said this is scripted logics, then it would be helpful to share it... it's uneasy to help without seeing it.

 

However the Flow Designer (or the Workflow studio if you will) has predefined this in the Ask for approval step.

 

You can set specific approval condition for Accept only, Reject only or both equally (do you want the conditions to be same for approval and rejection?)

Screenshot 2026-03-11 at 17.06.10.png

 

Once you have this, you can select the rules: specific percentage or amount of approvers, just one, all of them...

 

Screenshot 2026-03-11 at 17.06.16.png

 

If you are scripting the approval list, then it can be done as a flow variable and the flow variable will be added to this step

 

This is simplified example, I have done something similar 2 years ago, feel free to discuss

_____
100 % GlideFather experience and 0 % generative AI