Approval results (Approval)
Purpose
The Approval mechanism records approval decisions in Cabinee business processes.
It lets you:
- store approvers’ decisions
- keep an approval history
- show approval results on the ticket card
- use approver decisions in process logic
Each user decision is stored separately and linked to a ticket (Ticket).
How the mechanism works
An approval is recorded when a user task is completed.
If the user task is configured as an approval task, Cabinee automatically:
- reads the result from the task form
- identifies the user who made the decision
- determines the approval attempt number
- determines the approval stage
- stores the approval result
This happens without extra process logic.
Configuring an approval task
To make a user task work as an approval task, fill in Extension Properties.
This is configured in the Modeler.
Extension Properties
| Property | Value |
|---|---|
unibpm.usertask.type | approval |
unibpm.approval.decision | ${decision} |
unibpm.approval.comment | ${comment} |
unibpm.approval.attempt | ${approvalAttempt} |
unibpm.approval.stage | ${approvalStage} |
Property meaning
| Property | Description |
|---|---|
unibpm.usertask.type | Marks the task as an approval task |
unibpm.approval.decision | Expression or static value with the approval result |
unibpm.approval.comment | Expression or static value with the approver comment |
unibpm.approval.attempt | Expression or static value with the approval attempt number |
unibpm.approval.stage | Expression or static value with the approval stage name |
Values can be set:
- as an expression that references a process variable
- as a static value
Example expressions:
${decision}
${comment}
${approvalAttempt}
Example static values:
APPROVED
MANAGER_APPROVAL
1
Expressions currently support only simple process variable references in the
${variableName}format.
Form variables
The user task form must pass these variables:
| Variable | Purpose |
|---|---|
decision | approval result |
comment | user comment |
Example decision values
The system does not restrict possible values.
Example:
| Value | Description |
|---|---|
| APPROVED | approved |
| REJECTED | rejected |
| APPROVED_WITH_RISK | approved under the approver’s responsibility |
| NEEDS_REVISION | revision required |
Multiple approvers
Cabinee supports approval by several users.
This is usually modeled as a Multi Instance User Task.
Each approver receives their own task and decides independently.
Each decision is stored separately.
Approval attempts
If a ticket is sent back for revision, approval can run again.
To separate approval rounds, use the variable named in the unibpm.approval.attempt extension property.
The variable must be numeric (Integer).
Increase its value for every new approval round.
Example expression that increments the variable (it can be declared in the process scope via an Output Parameter of the BPMN element that precedes the approval task):
${execution.hasVariable('approvalAttempt') ? approvalAttempt + 1 : 1}
This lets the system keep the history of all attempts and analyze the current round correctly.
Approval stages
A process can contain several approval stages.
For example:
MANAGER_APPROVAL
HR_APPROVAL
DIRECTOR_APPROVAL
LEGAL_APPROVAL
The stage name can be passed:
- through a process variable
- as a static value
Example static value:
MANAGER_APPROVAL
This separates results of different approval stages.
Approval history
All decisions are stored in the ticket approval history.
The history includes:
| Field | Description |
|---|---|
| approver | user |
| decision | approval result |
| comment | comment |
| date | date and time of the decision |
| attempt | approval attempt |
| stage | approval stage |
Example in the user interface
Approval history can be shown on a ticket tab.
| Approver | Decision | Comment | Date |
|---|---|---|---|
| Manager | APPROVED | ok | 10.03 |
| HR | APPROVED | 10.03 |
Process modeling recommendations
One approver
Use a single user task.
User Task
│
▼
Gateway
Several approvers
Use a Multi Instance User Task.
Multi Instance User Task
│
▼
Gateway
Each approver decides independently.
Using approval results
Approval results can be used:
- in gateway conditions
- in service tasks
- in process logic
The exact logic depends on the process model.
Typical scenarios
The approval mechanism is used in processes for:
- leave requests
- procurement
- contracts
- tickets
- business trips
- internal documents
Advantages
- no extra process logic is required
- the full approval history is stored
- several approvers are supported
- configuration is done through the task form
- results are easy to show in the UI