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
Section titled “The workflow”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: 1schemaVersion: 5sdk: '1.0.0'key: capture-cost-centername: Kostenstelle erfassentemplate: customtrigger: documentType: incoming-invoicefields: []start: capturesteps: - 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