NovaeonStudio's picture
Initial release
507714c verified
|
Raw History Blame Contribute Delete
8.95 kB
metadata
license:
  - cc-by-4.0
  - mit
  - agpl-3.0
pretty_name: >-
  P2P Process Models (BPMN): mined as-is purchase-to-pay and to-be change
  pre-check
language:
  - en
  - de
task_categories:
  - other
tags:
  - process-mining
  - bpmn
  - bpmn-2.0
  - purchase-to-pay
  - bpi-challenge-2019
  - agent-mining
  - conformance-checking
  - human-in-the-loop
  - flowable
size_categories:
  - n<1K
source_datasets:
  - >-
    BPI Challenge 2019 (van Dongen, 4TU.ResearchData,
    doi:10.4121/uuid:d06aff4b-79f0-45e6-8ec8-e19730c248f1)
configs:
  - config_name: activities_triage
    default: true
    data_files:
      - split: train
        path: data/aktivitaeten_triage.csv
  - config_name: edges
    data_files:
      - split: train
        path: data/kanten.csv
  - config_name: agent_runs_log
    data_files:
      - split: train
        path: data/agent_runs_log.csv

P2P Process Models (BPMN)

Two BPMN 2.0 models and the numbers behind them:

  1. As-is purchase-to-pay process, mined from the public BPI Challenge 2019 event log (1.6 million events), with a per-activity triage: human, workflow or agent.
  2. To-be "change pre-check" process: an assistant summarises a change, proposes a risk and submits it; only a human approves. The model runs in the open-source engine Flowable, and the engine itself blocks the agent from approving.

Published by Novaeon · Lab: https://novaeon.studio/lab/

Not affiliated with or endorsed by SAP, Salesforce or ServiceNow; trademarks belong to their owners.

Key numbers (from data/kennzahlen.json)

Fact Value
Raw log 1,595,923 events · 251,734 cases (purchase order items) · 42 activities
After time filter (cases fully within 2018-01-01 … 2019-01-31) 251,463 cases · 1,587,802 events
Record Invoice Receipt events 226,943, of which 217,515 recorded by user accounts (95.85 %; the log does not show whether a person or an interface used the account)
Payment block in 55,241 of 55,601 cases with goods receipt, invoice and block removal, the block was still in place when goods receipt and invoice were both booked (median time until removal afterwards: 5.4 days; amounts were not checked)
Triage 1 of 42 steps is a pure agent case (Record Invoice Receipt); 4 are "agent prepares, human decides", 12 workflow, 2 workflow (to be clarified), 21 human, 2 external. Steps that move money or create commitments stay with a human.
As-is BPMN Inductive Miner (noise threshold 0.2) on the 44 most frequent variants (79.8 % of cases); token-replay fitness 0.964 on a random sample of 20,000 cases; valid against the OMG BPMN 2.0 XSD
To-be BPMN in Flowable 8.0.0 16/16 checks passed (normal case; high risk routed to the CAB; every attempt of the agent to approve itself refused or without effect; prompt injection without effect)
Agent mining 4/4 real engine runs fit the to-be model (fitness 1.0); a constructed deviating case (pre-check skipped, approval by the agent) is detected as non-fitting

Files

Path Content License
models/ist-prozess.bpmn as-is P2P model (mined) CC BY 4.0
models/change-vorpruefung.bpmn to-be change pre-check model with lanes human / agent / system, executable in Flowable CC BY 4.0
models/change-vorpruefung-colored.bpmn same model with colours, used for rendering CC BY 4.0
graphics/*.svg, graphics/*.png process map (DFG), as-is BPMN, to-be BPMN, opportunity map CC BY 4.0
data/kennzahlen.json all key figures (volumes, throughput times, variants, rework, bottlenecks, effects, triage counts) CC BY 4.0
data/kanten.csv directly-follows edges with counts and waiting times CC BY 4.0
data/aktivitaeten_triage.csv per-activity statistics, triage class and reason (aggregates only, no account IDs) CC BY 4.0
data/agent_mining.json conformance results of the engine runs against the to-be model CC BY 4.0
data/agent_runs_log.csv event log of the 4 Flowable test runs (fictional lab users) CC BY 4.0
data/test-ausgabe.txt full output of the Flowable test run (16/16) CC BY 4.0
data/xsd-check.txt XSD validation result of both models CC BY 4.0
scripts/mining/xes_to_parquet.py XES → parquet conversion (stdlib + pandas) MIT
scripts/mining/mining.py key figures, triage, effects — imports PM4Py AGPL-3.0
scripts/mining/grafiken.py DFG, Inductive Miner BPMN, opportunity map — imports PM4Py AGPL-3.0
scripts/engine/agent_mining.py conformance check of engine runs — imports PM4Py AGPL-3.0
scripts/engine/agent.py rule-based pre-check agent as Flowable external worker (no language model) MIT
scripts/engine/flowable.py minimal Flowable REST client (stdlib) MIT
scripts/engine/test_proof.py the 16 engine checks MIT
scripts/bpmn/xsd_check.py validation against BPMN20.xsd (lxml) MIT
scripts/render/render.mjs, package.json headless rendering with bpmn-js MIT
scripts/graphviz.Dockerfile Graphviz image for the DFG MIT

Each script carries an SPDX header. License texts: LICENSE (CC BY 4.0 notice), LICENSE-MIT, LICENSE-AGPL-3.0.

Passwords in scripts/engine/*.py (rest-admin/test, lab-…) are throwaway values for a local in-memory Flowable container (rest-admin/test is the image default). Users such as cm-ben and cab-anna are fictional lab users.

How the engine enforces the human

  1. The agent is an external worker; it can only fetch and complete jobs of topic change-vorpruefung. Approval is a user task, not a job.
  2. A complete task listener checks inside the engine transaction that the current user belongs to the candidate group (cab or change-manager); otherwise the engine aborts.
  3. A create task listener resets entscheidung to "offen" when the approval task is created, so variables written earlier by the agent have no effect.
  4. Without a decision "genehmigt" or "abgelehnt" not even a human can complete the task.

The refusal currently surfaces as HTTP 500 with a clear message; production use would map it to 403.

Reproduce

Download BPI Challenge 2019 (BPI_Challenge_2019.xes, MD5 4eb909242351193a61e1c15b9c3cc814) from 4TU.ResearchData, then: xes_to_parquet.py → mining.py → grafiken.py. For part B start flowable/flowable-rest 8.0.0, deploy models/change-vorpruefung.bpmn, create users/groups, run engine/test_proof.py and engine/agent_mining.py. Tools: Python 3.12, PM4Py 2.7.23.13, pandas, lxml, Flowable 8.0.0, bpmn-js 18, Graphviz. Comments and activity labels of the to-be model are in German.

Limitations

  • Purchase-to-pay of one company (2018), not ITSM. The log has completion timestamps only, so effects are given in counts and waiting time, never in hours or money.
  • The triage combines data with openly marked assumptions (which steps move money, which inputs are unstructured, that goods receipt is physical).
  • Waiting time until Clear Invoice is mostly payment terms, not a process defect.
  • The agent in part B is rule-based; the guardrails sit in the engine and apply equally to a language-model agent.
  • Do not use the source log to rank or evaluate employees (EU AI Act Annex III no. 4(b); in Germany also works council co-determination). Account IDs were used only to recognise technical accounts and are not published.

Source and license

  • Source data: van Dongen, B. F. (2019). BPI Challenge 2019. 4TU.ResearchData. Dataset. https://doi.org/10.4121/uuid:d06aff4b-79f0-45e6-8ec8-e19730c248f1. License: CC BY 4.0.
  • Data, models and graphics here: CC BY 4.0. The as-is model, figures and statistics are derived from BPI 2019 by Novaeon (filtered, aggregated, mined); the original log is not redistributed. The to-be model is Novaeon's own work.
  • Scripts: MIT, except the three scripts importing PM4Py, which are AGPL-3.0 (see table).

Deutsch (Kurzfassung)

Zwei BPMN-2.0-Modelle mit Kennzahlen: der aus dem öffentlichen BPI-2019-Log gefundene Ist-Prozess Purchase-to-Pay und der Soll-Prozess „Change-Vorprüfung“ (Agent fasst zusammen, schlägt Risiko vor, reicht ein; freigeben darf nur ein Mensch), ausführbar in Flowable.

  • 226.943 Rechnungserfassungen, davon 217.515 durch Benutzerkonten.
  • In 55.241 von 55.601 Fällen mit Wareneingang, Rechnung und Sperr-Aufhebung lag die Zahlsperre noch, als beides gebucht war.
  • 1 von 42 Schritten ist ein reiner Agent-Fall; Schritte, die Geld bewegen, bleiben beim Menschen.
  • Flowable: 16/16 Prüfungen bestanden; die Engine verweigert jede Selbstfreigabe des Agenten.
  • Lizenz: Daten, Modelle und Grafiken CC BY 4.0 (abgeleitet aus BPI Challenge 2019, van Dongen, 4TU.ResearchData, CC BY 4.0). Skripte MIT; mining.py, grafiken.py und agent_mining.py importieren PM4Py und stehen unter AGPL-3.0.

Novaeon · https://novaeon.studio/lab/