Configure Conditional Multi-Level Approval¶
Goal¶
Send every request to a first reviewer and require a second approval only when the amount reaches a defined threshold.
What You Will Learn¶
- express approval policy as mutually exclusive route conditions
- assign each approval level through a separate role
- test both the short and extended approval paths
Difficulty and Estimated Time¶
- Difficulty: Intermediate
- Estimated time: 20 minutes
Assumed Knowledge¶
You should understand tasks, actions, routes, roles, forms, XML paths, and JavaScript route expressions.
Required Reading¶
Prerequisites¶
- permission to import a process definition
- test users or groups for the
First ReviewerandSecond Reviewerroles
Example Overview¶
1 2 | |
The threshold is illustrative. In a production process, keep policy values in reviewed configuration when business administrators must change them without editing process logic.
Steps¶
Create the Shared Request Data¶
Add Description and decimal Amount fields to the Request data model and expose them on the submission form.
Configure the First Approval Routes¶
Add two routes to the Approve action. The routes must be mutually exclusive:
1 | |
1 | |
The first expression routes directly to Complete; the second routes to Second Approval. Keeping the conditions mutually exclusive prevents the same action from creating both downstream tasks.
Assign the Approval Roles¶
Assign First Reviewer to the first approval task and Second Reviewer to the second. Configure both roles after import; the downloadable definition intentionally contains no tenant-specific identity.
How It Works¶
Route validation is evaluated when the approval action is selected. Only the route whose amount expression evaluates to true is followed. Each approval level remains a separate task, so ownership, instructions, deadlines, and audit history are explicit.
Verify the Result¶
- Import the definition and configure both roles.
- Submit an amount of
5000; confirm that only the first reviewer approves it beforeComplete. - Submit an amount of
15000; confirm that the second approval task is created. - Confirm that users outside each reviewer role cannot complete that level.
Failure and Edge Cases¶
- Submit an empty or invalid amount and confirm that form validation rejects it.
- Test exactly
10000and confirm that it follows the second-level path. - Ensure a policy change cannot leave a gap or overlap between the two expressions.
Security and Portability Notes¶
- Resolve approvers through tenant-bound roles, never fixed user IDs.
- Enforce the threshold on server-evaluated routes; client visibility rules are not an authorization boundary.
- Keep the two expressions complementary and review them together whenever the policy changes.
Download and Try It Yourself¶
Download the conditional approval definition.
Troubleshooting¶
- Both tasks are created: Check that the two route expressions cannot both be true.
- No route is followed: Confirm that
Amountexists and parses as a number. - A task is unassigned: Configure the corresponding reviewer role in the target domain.