Book a Demo

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:

  1. reads the result from the task form
  2. identifies the user who made the decision
  3. determines the approval attempt number
  4. determines the approval stage
  5. 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

PropertyValue
unibpm.usertask.typeapproval
unibpm.approval.decision${decision}
unibpm.approval.comment${comment}
unibpm.approval.attempt${approvalAttempt}
unibpm.approval.stage${approvalStage}

Property meaning

PropertyDescription
unibpm.usertask.typeMarks the task as an approval task
unibpm.approval.decisionExpression or static value with the approval result
unibpm.approval.commentExpression or static value with the approver comment
unibpm.approval.attemptExpression or static value with the approval attempt number
unibpm.approval.stageExpression 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:

VariablePurpose
decisionapproval result
commentuser comment

Example decision values

The system does not restrict possible values.

Example:

ValueDescription
APPROVEDapproved
REJECTEDrejected
APPROVED_WITH_RISKapproved under the approver’s responsibility
NEEDS_REVISIONrevision 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:

FieldDescription
approveruser
decisionapproval result
commentcomment
datedate and time of the decision
attemptapproval attempt
stageapproval stage

Example in the user interface

Approval history can be shown on a ticket tab.

ApproverDecisionCommentDate
ManagerAPPROVEDok10.03
HRAPPROVED10.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