Manuscript Offprint

arXiv:2611.07945

tok: a textual concrete syntax of BPMN and DMN for humans and AI agents

Marek Deja

Open access. PaperVantage converted this article to text, so layout and figures may differ from the original. This text is shared under the same licence.

Abstract

tok is a plain-text notation for Business Process Model and Notation (BPMN) 2.0.2 process models and Decision Model and Notation (DMN) 1.5 decisions. One engine checks a tok document against both standards, compiles the document to XML with an automatic diagram, and serves language-model applications through the Model Context Protocol. The paper classifies the notation as an alternative concrete syntax of the BPMN and DMN metamodels and reports one study. A tok model takes 2.2 times fewer tokens than the smallest BPMN XML of 893 files exported by 37 tools and 7.7 times fewer than the files as exported. The checker signals 98.2% of 1411 injected faults, against 85.8% for the XML Schema with bpmmlint. Four language models new to tok write valid tok from a one-page reference for 85.7 to 100% of 87 process descriptions from two datasets and valid BPMN XML for every description, and the strongest model writes tok with 25% and 19% fewer tokens than BPMN XML. As agents with a lean skill and one checker tool, the models write valid tok for 97.6 to 100% of the descriptions, the strongest model spends 21% and 14% fewer tokens on tok than on BPMN XML, and a skill which sends the model to read the reference through a tool costs 1.7 to 2.8 times the tokens of the lean skill. Of 47 event logs simulated from public models, 44 fit their source models, and tok imports every model discovered from the logs.

1 Introduction

Organisations keep models of their processes as information objects, which document work, support analysis and compliance, configure process engines and teach students how work is organised (Dumas et al., 2018). Business Process Model and Notation (BPMN) 2.0.2 is the standard notation for process models, with an XML format for the exchange of models and their diagrams between tools (Object Management Group, 2014), and Decision Model and Notation (DMN) 1.5 is the companion standard for the decisions taken inside processes (Object Management Group, 2024). Practice uses a small part of the BPMN vocabulary, as zur Muehlen and Recker (2008) found that a few core constructs account for most of the elements in the models of their sample, and a survey of practitioners reports the uptake of the notation together with the difficulties of its users (Recker, 2010).

A process model has three readers with different needs. A person reads a diagram and changes the model in a tool, a process engine and an exchange partner read the XML file, and a language model, the newest reader, writes and reads whatever text the prompt contains. The exchange format serves the second reader, because a correct file needs unique identifiers, references in both directions between nodes and flows, the element order of the schema and, for a diagram, the coordinates of every shape and every bend of an edge. People therefore read, review and compare the files with difficulty, since reading a notation is a skill of its own (Petre, 1995) and the comprehension of a process description depends on the notation and on the training of the reader (Ottensooser et al., 2012; Figl, 2017), and a version-control difference of a small change to a drawn model consists mostly of geometry, a known cost of versioning graphical models (Altmanninger et al., 2009). The third reader meets the same cost, in that a model written from scratch in BPMN XML spends most of its output on syntax and references and valid BPMN XML remains a hurdle for open models (Lauer et al., 2026), and research on process modelling with language models therefore works through intermediate representations, for example process code in the POWL language translated to BPMN by a converter (Kourani et al., 2024), and evaluates conversational modelling and process tasks (Klievtsova et al., 2023; Grohs et al., 2024). The intermediate representations serve the model, while the person keeps the diagram and the file, so that the three readers of one process still hold three artefacts.

tok is a plain-text notation for the content of BPMN 2.0.2 and DMN 1.5, written for the three readers at once. A tok document states pools, lanes, events, activities, gateways, sequence and message flows, data, decisions, forms and simulation parameters in short lines, one statement per line, and one engine compiles the document to BPMN XML with an automatic diagram layout, SVG pictures, DMN files, Camunda 8 forms and simulated event logs. The engine reads BPMN and DMN files drawn in other tools and prints the files as tok, checks documents and BPMN files against the rules of both standards, and offers the same operations to language-model applications through a Model Context Protocol (MCP) server (Model Context Protocol, 2025). The proposition behind the design is that one symbolic notation over the metamodel of the standard, with a checker which answers every text with a diagnostic at the line and the element concerned, serves as the shared code of a person, a tool and a language model, so that the document which the person keeps is the text which the model writes, and the file which the tool reads is compiled from both.

The paper makes four contributions, and the first contribution is the notation and its engine, described as a design which covers the syntax, the levels and conformance classes, the checker and the interfaces, and which shows how a textual notation stays exact against two standards. The second contribution is a classification of tok in formal language theory, model-driven engineering, semiotics and the theory of communication, which explains why the translation between tok and the standards is exact and why the diagnostics of the checker work as common ground between a writer and the engine. The third contribution is one study with six measurements, namely the size of tok against BPMN XML in the tokens that language models read, the detection of injected modelling faults, the writing of process models by four language models from two sets of texts, a process-mining demonstration, the speed of the engine and its conformance suites, which together put numbers on the price and the benefit of the notation for each of the three readers. The fourth contribution consists of the material of the study, which makes the software, the data and the scripts available for further work. The results support the proposition in measured terms, in that a tok model takes 2.2 times fewer tokens than the smallest BPMN XML of 893 tool files and 7.7 times fewer than the files as exported, the checker signals 98.2 % of 1411 injected faults against 85.8 % for the XML validators. Four language models which meet tok for the first time write valid tok from one page of reference for 85.7 to 100 % of 87 texts, with 25 % and 19 % fewer tokens than BPMN XML for the strongest model; as agents with a lean skill and one checker tool the models write valid tok for 97.6 to 100 % of the texts, and the strongest model spends 21 % and 14 % fewer tokens on tok than the same agent spends on BPMN XML; and 44 of 47 event logs simulated from public models fit their source models under replay.

References (80)