awml / supplier-invoices

A supplier's invoice, matched and paid

Public · Version 1 of 1
Fork

workflow.yaml

workflow.yaml is AWML 0.4, as it was pushed. The registry draws, checks and fits it converted to AWML 0.8.

# Supplier invoices, matched and paid. The invoice and the supplier's bank details stay with
# accounts payable. The purchase orders and goods receipts sit in procurement's wider scope, so
# the match may read them. A finance approver releases each payment run, whose exceptions reach
# them already explained, and that step is their yes. The company is fictional.
awml: "0.4"
title: A supplier's invoice, matched and paid
scopes:
  - { id: procurement, label: "procurement: + buyers", processing: { anthropic: any } }
  - { id: finance, label: "finance: accounts payable, approvers", in: procurement, processing: { anthropic: any } }
parts:
  - { id: arrives, kind: trigger, label: "An invoice arrives", wait: PT4H, in: finance }
  - { id: mailbox, kind: connector, label: "The AP mailbox", in: finance }
  - { id: read, kind: ai, op: bring-in, label: "Read the supplier, amounts and PO number", in: finance }
  - { id: orders, kind: context, label: "Purchase orders and goods receipts", at: erp/procurement, in: procurement }
  - { id: match, kind: code, op: check, label: "Match against the PO and the goods receipt", in: finance }
  - { id: explain, kind: ai, op: prepare, label: "Explain the mismatch", in: finance }
  - { id: approve, kind: person, op: do, label: "Approve the exceptions and release the run", in: finance }
  - { id: pay, kind: outside, label: "Pay the supplier: Ask", in: finance }
lines:
  - { from: arrives, to: read, kind: start }
  - { from: mailbox, to: read, kind: data }
  - { from: read, to: match, kind: data }
  - { from: orders, to: match, kind: data }
  - { from: match, to: approve, kind: data, label: "[matched]" }
  - { from: match, to: explain, kind: data, label: "[mismatch]" }
  - { from: explain, to: approve, kind: data, label: "the reason" }
  - { from: approve, to: pay, kind: data }