Skip to content

Two of three approve

A new contract goes to the management, accounting and purchasing at once. As soon as two have approved, it is approved and the third task is withdrawn. If two reject it, two approvals can no longer be reached and the contract is rejected. Whoever uploaded the contract doesn’t approve it themselves.

The workflow starts for every document of the type contract. Its file workflow.yaml:

$schema: 'https://docs.acriva.de/schemas/workflow.schema.json'
format: 1
schemaVersion: 5
sdk: '1.0.0'
key: parallel-approval
name: Freigabe 2 von 3
template: custom
trigger:
documentType: contract
fields: []
start: approval
steps:
- kind: humanTask
name: approval
label: Freigabe 2 von 3
taskKind: approve
assignees: []
fallback:
kind: role
role: Geschäftsführung
options:
excludeRequester: true
excludeActorsOfSteps: []
pickFile: false
next: approved
onRejected: rejected
parallelApproval:
mode: quorum
quorum: 2
approvers:
- kind: role
role: Geschäftsführung
- kind: role
role: Buchhaltung
- kind: member
member: einkauf@example.com
- kind: end
name: approved
label: Freigegeben
outcome: approved
- kind: end
name: rejected
label: Zurückgewiesen
outcome: rejected