Skip to content

Transformer ‐ User

Jeldrik Merkelbach edited this page Jul 8, 2024 · 31 revisions

The following documentation outlines the basic transformation behavior and constraints. It details the supported elements and transformation rules.

Swagger documentation and Bruno Collection

You can find the Swagger documentation here. Please take note that Swagger only works if the XML does not contain any line breaks and all quotation marks are escaped with a backslash as shown in the examples. Furthermore, the error cases are not correctly displayed in Swagger. For a better experience please use the Bruno Collection which you can find here.

BPMN Transformation

The sections below explain which BPMN elements are transformed into which Petri/workflow net elements.

BPMN Input Constraints

While Petri nets have a mathematical foundation, BPMN diagrams have fewer semantic constraints compared to Petri nets. As a result, not all BPMN constructs can be easily converted to Petri nets and some may require specific constraints. The input BPMN must adhere to the following constraints to ensure a successful transformation:

  • BPMN Standard 2.0
  • Syntactically correct XML, e.g., only supported tags or matching opening/closing tag names
  • All OR-gates that are opened should be closed. Depending on the complexity and amount of gates used, this may not always be necessary, but in certain cases, the transformation could fail or be incorrect.
  • Subprocesses must have exactly one start and end flow
  • Multiple input or output flows are only allowed for gateways
  • Unsupported elements are not allowed

To Workflow net

Supported elements

BPMN Petrinet
BPMN Start Event Petrinet Start Event
BPMN End Event Petrinet End Event
BPMN Task Petrinet Task
BPMN Process Workflow Subprocess
BPMN OR join/split There are no equivalent mappings for OR Gates. OR Gates will be replaced with a combination of AND and XOR Gates before the actual transformation, and these new elements will be transformed with the rules described above. Beware that the replacement uses a heuristic which could fail for overly complex diagrams. See an example under this table.
BPMN AND Join Workflow AND Join
BPMN AND Split Workflow AND Split
BPMN XOR Join Workflow XOR Join
BPMN XOR Split Workflow XOR Split
BPMN AND-Split-Join Workflow AND-Split-Join
BPMN XOR-Split-Join Workflow XOR-Split-Join
Message Event Message Event
Timer Event Timer Event
TaskMessage Event Combination
Event and following task combination
TaskMessage Event Combination
TaskTimer Event Combination
Event and following task combination
TaskTimer Event Combination
Swimlane Trigger Resource

Example for Handling OR-Gateways

BPMN:

OR Gateway BPMN

Transformed Petri net:

OR Gateway Petrinet

Unmentioned Elements

The transformation rules shown above include only a subset of all possible BPMN elements. Many BPMN elements cannot be transformed because there are no equivalent elements in the Petri/workflow net standard. This includes elements that are part of the control flow, such as ExtensionElements or BusinessRuleTasks. If such an element is encountered the transformation will fail.

There are also elements like TextAnnotations that are not part of the control flow. While these elements cannot be transformed, they can be ignored without affecting the basic function of the BPMN diagram.

Petrinet Transformation

Petrinet Input Constraints

Compared to the BPMN to Petrinet transformation, nearly all Petrinet and Workflow extension elements can be easily converted to BPMN elements. Because of this, the rules and constraints are simpler.

  • Syntactically correct
  • Semantically correct
  • Subprocesses must have at least one connected path from start to end

Mapping to BPMN

Petrinet BPMN
alt text
Zero incoming arcs
alt text
alt text
Zero outgoing arcs
alt text
alt text alt text
alt text
Exactly one incoming and outgoing arc
Will be removed if not part of a gateway.
alt text
Silent transition
Will be removed if not part of a gateway.
alt text
More than one outgoing and/or incoming arc
alt text
alt text
More than one outgoing and/or incoming arc
alt text
alt text alt text
Task and Split
Split with implicit task (named gateway).
Task and Split
Task and Join
Join with implicit task (named gateway).
Task and Join
Task and JoinSplit
Join/split with implicit task (named gateway).
Task and JoinSplit

If the Petrinet contains WoPeD-specific workflow operators, they will be handled with the following logic:

Workflow Net BPMN
alt text alt text
alt text alt text
alt text alt text
alt text alt text
alt text alt text
alt text alt text
alt text alt text
alt text alt text
TaskTimer and Split TaskMessage and Split
TaskTimer and Split TaskTimer and Split
Trigger Resource Swimlane
Unkown Resource
Elements without roles in Unkown Participant lane.
Unkown Lane
Message Event Message Event
Timer Event Timer Event
TaskMessage Event Combination
Trigger transition as task.
TaskMessage Event Combination
TaskTimer Event Combination
Trigger transition as task.
TaskTimer Event Combination
Trigger Resource Swimlane
ID Ausnahme Beschreibung Exceptionparameter
0 UnexpectedError Unerwarteter Fehler ----
1 NotSupportedBPMNElement BPMN-Element wird nicht unterstützt Name von Element
2 MissingEnvironmentVariable Fehlende Umgebungsvariable Name von Variable
3 TokenCheckUnsuccessful Token-Überprüfung nicht erfolgreich ----
4 UnexpectedQueryParameter Unerwarteter Abfrageparameter Name von Query Parameter
5 UnnamedLane Für jede Lane muss ein Name existieren ----
6 UnknownIntermediateCatchEvent Unbekannten Intermediate-Event-Typ benutzt ----
7 WrongSubprocessDegree Subprozesse müssen genau 1 Ein- und Ausgang besitzen ----
8 ORGatewayDetectionIssue Fehler bei der SPLIT-JOIN Erkennung eines OR-Gateways ----
9 SubprocessWrongInnerSourceSinkDegree Im Subprozess darf Quelle keinen eingehenden und Senke keinen ausgehenden Bogen besitzen ----
10 UnknownResourceOrganizationMapping Die Ressourcen müssen zur selben Organisation gehören ----
11 InvalidInputXML Ungültiger Eingabe-XML-Inhalt ----
12 PrivateInternalException Interne Fehler, die nicht für Benutzer sichtbar sein sollen ----
13 InternalTransformationException Interne Fehler während der Transformation ----
14 NoRequestTokensAvailable Aktuell keine Token für ein Transformations-Request verfügbar ----