Skip to content

Have the cost center entered

Before an invoice goes to approval, accounting adds the cost center and the invoice number: the Capture task can only be completed once both required fields are filled in. Then the cost center’s responsible person approves.

The workflow starts for every document of the type incoming-invoice. Its file workflow.yaml:

$schema: 'https://docs.acriva.de/schemas/workflow.schema.json'
format: 1
schemaVersion: 5
sdk: '1.0.0'
key: capture-cost-center
name: Kostenstelle erfassen
template: custom
trigger:
documentType: incoming-invoice
fields: []
start: capture
steps:
- kind: humanTask
name: capture
label: Kostenstelle erfassen
taskKind: capture
assignees: []
fallback:
kind: role
role: Buchhaltung
options:
excludeRequester: false
excludeActorsOfSteps: []
pickFile: false
next: approval
requiredFields:
fields:
- invoice.costCenter
- invoiceNumber
requireComment: false
- kind: humanTask
name: approval
label: Freigabe Kostenstelle
taskKind: approve
assignees:
- when: null
assignee:
kind: costCenterResponsible
fallback:
kind: role
role: Geschäftsführung
options:
excludeRequester: true
excludeActorsOfSteps: []
pickFile: false
next: approved
onRejected: rejected
- kind: end
name: approved
label: Freigegeben
outcome: approved
- kind: end
name: rejected
label: Zurückgewiesen
outcome: rejected