Process format reference
CompileFlow accepts TBBPM and a documented subset of BPMN 2.0. Use this reference to compare their syntax, choose supported elements, and check which behavior needs attention when converting between formats.
1. Format identity
Section titled “1. Format identity”| Dimension | TBBPM | BPMN 2.0 |
|---|---|---|
| Full name | Taobao Business Process Model | Business Process Model and Notation 2.0 |
| Standardization | Specification maintained by CompileFlow (see TBBPM Specification) | OMG formal specification |
| Portability | CompileFlow-native | Standard BPMN vocabulary and model exchange; execution depends on the supported subset and extensions |
| Designed for | Automation-focused CompileFlow definitions | Definitions using the documented BPMN subset |
2. Execution model
Section titled “2. Execution model”The format does not determine whether a flow can resume after a restart. ProcessEngine keeps invocation state in
memory; Durable saves execution state for the elements it supports.
Both formats use the same execution backends. In COMPILED mode, ProcessEngine generates Java source, compiles it
with the JDK, and loads the result. In INTERPRETED mode, it executes a prepared program. Durable uses a separate API
and runtime. See Process Model Architecture for the internal compilation stages.
The formats differ in syntax, supported elements, loop behavior, model exchange, and where extensions can appear.
For integer-valued execution attributes such as maxAttempts, maxReconcileAttempts, maxIterations, and
loopMaximum, use ASCII decimal digits with an optional leading sign and no surrounding whitespace. For example,
2, +2, and 02 represent the same number; 2.0, 2e0, non-ASCII digits, and 2 are rejected.
The numeric value must also satisfy the range specified for that attribute. This syntax is checked even when XML
schema validation is disabled. The invocation-policy backoffMultiplier accepts finite decimal or decimal-exponent notation, with no surrounding whitespace (for example 2, 2.0, 2e0). Hexadecimal floats, Java type suffixes, NaN, and infinity are rejected. Its numeric value must be at least 1.0. These lexical rules apply to execution attributes, not to Java expressions or variable-value conversion.
3. Element correspondence
Section titled “3. Element correspondence”3.1 Flow control
Section titled “3.1 Flow control”| Feature | TBBPM | BPMN 2.0 | Notes |
|---|---|---|---|
| Start node | <start> |
<startEvent> |
Equivalent |
| End node | <end> |
<endEvent> |
Equivalent |
3.2 Task nodes
Section titled “3.2 Task nodes”| Feature | TBBPM | BPMN 2.0 (CompileFlow-supported subset) | Notes |
|---|---|---|---|
| Auto task | <autoTask> with first-class <action> |
<serviceTask> with namespaced <cf:action> |
Both formats use the same built-in action implementations |
| Script task | <scriptTask> with an action |
<scriptTask scriptFormat="..."><script>...</script> |
Same script registry; format-native XML shapes |
| Node-ID trigger entry | <waitTask> |
No direct equivalent in this subset | ProcessTrigger.at(nodeId) |
| Event-qualified trigger entry | <waitTask event="…"> |
receiveTask or message intermediateCatchEvent |
ProcessTrigger.on(nodeId, event) |
| Durable timer | <timerTask> |
intermediate timer catch | ProcessEngine rejects the entire definition during preparation, even if a branch would skip the Timer |
| Effect Action | Task action with execution="effect" |
cf:action or script-task attribute; see below |
Durable execution mode, not a separate node |
| User task | not supported (TBBPM targets automated flows) | rejected as unsupported | CompileFlow does not provide an engine-native human-task lifecycle |
ProcessEngine starts a new invocation at an eligible entry. Supply its state on each call. The event selector is the exact TBBPM event or the referenced BPMN message.name; messageRef identifies the declaration. Durable saves state and issues a distinct WaitToken on each visit. Replaying a token for a previous visit cannot complete a later visit. A Durable Timer becomes eligible for processing at its due time. No external callback is required, but the due time does not guarantee that the Run resumes at that exact instant.
For a BPMN service task, put execution="effect" on its cf:action. For a BPMN script task, put
cf:execution="effect" on the scriptTask itself.
3.3 Gateways
Section titled “3.3 Gateways”| Feature | TBBPM | BPMN 2.0 | Notes |
|---|---|---|---|
| Exclusive gateway | <exclusive> |
<exclusiveGateway> |
Equivalent |
| Parallel gateway | <parallel> |
<parallelGateway> |
Equivalent only within the gateway topology rules below |
| Inclusive gateway | <inclusive> |
<inclusiveGateway> |
Equivalent within the supported structured gateway and branch-selection rules |
| Event-based gateway | not supported | not supported by CompileFlow subset | Requires multi-subscription race semantics outside the supported profiles |
| Complex gateway | not supported | not supported by CompileFlow subset | Out of scope |
For an exclusive or inclusive split, TBBPM identifies its optional default by a transition without a condition attribute. To designate a default in BPMN, set the gateway’s default reference to an outgoing sequenceFlow; that flow must not declare a condition. Every other outgoing flow of that exclusive or inclusive split must declare a Java condition. A blank condition is not equivalent to omission. When converting, set or remove the default reference explicitly.
A TBBPM parallel join waits for all logical branches activated by its matching split. In BPMN, a parallel join requires a token
on every incoming Sequence Flow (BPMN 2.0.2, §13.4.1). CompileFlow therefore
accepts a BPMN parallel region only when each logical branch reaches its matching parallel join through one incoming
flow. If exclusive alternatives inside one branch would enter that join through different flows, first merge those
alternatives with an exclusiveGateway, then connect that merge to the parallel join. The compiler rejects the ambiguous
shape before runtime preparation. Two outgoing flows from the split cannot enter the same nonempty branch. Separate
direct flows from the split to its join are allowed: each represents an empty branch and supplies its own incoming flow.
This restriction does not turn an inclusive join into an all-incoming parallel join.
A TBBPM branch may merge its exclusive alternatives directly at its matching parallel join. Converting that shape to BPMN requires the explicit exclusive merge described above; renaming the nodes alone would change the synchronization rule.
3.4 Sub-processes and loops
Section titled “3.4 Sub-processes and loops”| Feature | TBBPM | BPMN 2.0 (CompileFlow-supported subset) | Notes |
|---|---|---|---|
| Embedded process / process call | <subBpm> / <bpmCall> |
<subProcess> / <callActivity> |
Both formats distinguish scope from invocation |
| foreach | <foreach> |
<multiInstanceLoopCharacteristics> |
Sequential in both engines; parallel only in Durable |
| while loop | <while> |
<standardLoopCharacteristics> |
Conditional loops; timing and limit semantics differ (see §7) |
break |
<break> |
no direct equivalent in this subset | TBBPM-unique |
continue |
<continue> |
no direct equivalent in this subset | TBBPM-unique |
| Parallel multi-instance | execution="parallel" |
isSequential="false" |
Durable-only; List input, bounded active iterations, optional ordered aggregation |
3.5 Other
Section titled “3.5 Other”| Feature | TBBPM | BPMN 2.0 (CompileFlow-supported subset) | Notes |
|---|---|---|---|
| Annotation | <note> |
textAnnotation is rejected |
TBBPM notes are design-time elements; the documented BPMN subset does not preserve text annotations |
| Data object | not supported | not supported by CompileFlow subset | Use process variables |
| Message / signal | waitTask with event |
receiveTask or intermediate message catch; signals unsupported |
Event-qualified ordinary trigger or exact Durable Wait completion |
| Deployment identity | Kept outside XML in ProcessRef and deploy metadata |
Kept outside XML in ProcessRef and deploy metadata |
Same engine contract |
Durable records a separate Wait each time execution reaches one of these waiting nodes; completion uses that Wait’s
token. Neither format supplies general message broadcasts, signal broadcasts, or message correlation. ProcessEngine
does not provide broker behavior.
4. Actions
Section titled “4. Actions”TBBPM supports three action types: class, bean, and script. An autoTask invokes a business method.
The following alternatives call the same method but obtain its target from different sources.
TBBPM declaration inside an autoTask |
Instance used by the call |
|---|---|
<action type="class" class="com.example.UserService" method="getUser"/> |
Each invocation constructs a new UserService through its public no-argument constructor. |
<action type="bean" bean="userService" class="com.example.UserService" method="getUser"/> |
The host’s ProcessComponentResolver supplies the object named userService of the declared type. Spring Boot uses its application context and preserves the configured bean scope. |
A TBBPM scriptTask contains an action with type="script". To write a Java method body in the flow, select language="java" and place the body in code. See the TBBPM Specification.
BPMN 2.0 service tasks use the same action model under standard extension elements:
<serviceTask id="task1"> <extensionElements> <cf:action type="bean" bean="userService" class="com.example.UserService" method="getUser"/> </extensionElements></serviceTask>Both formats use the same action implementations and script executors. Core includes the Java script executor, which
runs trusted code inside the application process and provides no sandbox. Adding the optional compileflow-script-qlexpress
module enables QLExpress through the standard Extension service declaration in its JAR; see Quick Start.
For MVEL, add compileflow-script-mvel and select mvel as the language. The executors differ in syntax, input handling,
and runtime checks; see the extension guide.
TBBPM uses direct elements; BPMN keeps CompileFlow extension data namespaced. BPMN scriptTask uses its standard
scriptFormat and script fields. For Java source, set scriptFormat="java" and place the method body in script. See the BPMN Extension Specification
for the complete cf: contract.
5. TBBPM profile
Section titled “5. TBBPM profile”TBBPM defines automation flows specifically for CompileFlow. Actions appear directly in tasks without BPMN extension
containers, and loops can use break and continue. The repository includes TBBPM examples and documents their editor behavior.
6. BPMN profile
Section titled “6. BPMN profile”BPMN definitions use standard XML elements for the supported subset and DI geometry for exchanging diagram layout.
CompileFlow-specific execution settings use the cf: namespace. Standard BPMN syntax alone does not make a definition
executable in CompileFlow. For example, a BPMN timer with timeCycle can pass XML and model validation, but semantic preparation rejects it; use timeDuration or timeDate for a Durable Timer. Successful parsing alone does not establish runtime support.
The Workbench editable subset is narrower than the backend execution subset. Its flow nodes are startEvent, endEvent,
serviceTask, scriptTask, receiveTask, exclusiveGateway, parallelGateway, inclusiveGateway, callActivity, and
subProcess. Workbench supports receiveTask authoring, but rejects intermediateCatchEvent during visual import,
including message and timer catches supported by the backend. It does not silently convert or discard those events.
For conditionExpression and loopCondition, an explicit language="java" requires xsi:type resolving to BPMN
tFormalExpression. Workbench preserves a gateway’s optional gatewayDirection and checks it against the connections;
the attribute does not override routing or topology rules.
BPMNDI waypoints are authoritative for connection endpoints and bends. The Workbench workbench-edge processing
instruction supplements named ports only when they cannot be derived from DI; it does not override DI bends or derived
ports. See XML Editing and Export for the import and export rules.
CompileFlow only executes the BPMN 2.0 subset listed above. Definitions using unsupported nodes such as user tasks, transactions, and choreographies fail parsing or
preflightwith a clear error. Parallel multi-instance is supported only by Durable execution; optional ordered aggregation uses CompileFlow’s explicit output extensions. TBBPMbreak,continue, and built-in business attributes have no direct mapping to CompileFlow’s BPMN subset.
7. Format mapping boundaries
Section titled “7. Format mapping boundaries”7.1 TBBPM → BPMN 2.0
Section titled “7.1 TBBPM → BPMN 2.0”These node mappings require compatible identifiers and the gateway topology rules:
start/end, autoTask→serviceTask, exclusive→exclusiveGateway, parallel→
parallelGateway, inclusive→inclusiveGateway, subBpm→subProcess, bpmCall→callActivity, foreach→
multiInstanceLoopCharacteristics.
The TBBPM process code becomes the BPMN process.id. A code shared by both formats must start with an ASCII letter.
For example, migrating 2026.orders to orders.2026 changes the process code. Update process calls and external
ProcessRef callers. When using Deploy, publish under the new coordinates. Existing Durable Runs continue with their
original definitions and call bindings. Node IDs follow a separate rule. Each BPMN ID must be an XML NCName. If a
TBBPM node ID such as 1 becomes node_1, update sequence flows, diagram references and any external trigger that
addresses that node. See BPMN called processes and data integrity.
TBBPM while and BPMN standardLoopCharacteristics both express conditional iteration, but are not lossless direct
mappings. TBBPM checks the condition before each iteration (BEFORE), requires maxIterations, and fails if the condition
remains true after that many completed iterations (FAIL). BPMN uses testBefore="true" for BEFORE; omitted or false
testBefore checks after the body (AFTER). BPMN loopMaximum is optional when a loopCondition is present, and reaching
a supplied maximum completes the loop normally (STOP). A conversion must preserve these timing and termination rules
explicitly.
No supported BPMN equivalent exists for break or continue; those constructs must be expressed with supported elements
when the BPMN subset is required.
7.2 BPMN 2.0 → TBBPM
Section titled “7.2 BPMN 2.0 → TBBPM”The direct mappings listed above can be inverted where their conditions hold. BPMN multiInstanceLoopCharacteristics maps to TBBPM foreach.
The conditional-loop differences also apply in this direction: replacing standardLoopCharacteristics with while
requires an explicit adaptation of condition timing and limit behavior. Unsupported BPMN nodes such as user tasks,
transactions, and choreographies have no direct counterpart among supported TBBPM nodes.
8. Performance
Section titled “8. Performance”Both TBBPM and BPMN use the same runtime backends. A cache miss requires runtime preparation: COMPILED generates and
compiles the process class; INTERPRETED prepares its execution program and may compile action or expression adapters.
Later executions can reuse the runtime prepared for the same definition and compilation settings. The benchmark guide documents the JMH
classes, setup boundaries, and reporting rules.
Use that guide’s runnable commands when measuring a particular definition or comparing formats.
9. Protocol evolution
Section titled “9. Protocol evolution”The process language, business Process versions, and the kernel’s persisted formats are distinct contracts. The definition’s
code identifies the business Process; ProcessRef.Version pins a published business definition. Neither is a language
version. TBBPM and CompileFlow’s BPMN extensions follow the schemas and semantic rules of the engine release; a deployment
alias does not select language semantics.
Maintainers treat elements, attributes, enumeration values, defaults, evaluation order, state merges, and failure handling as public protocol. Changing the meaning of a valid definition or rejecting a previously valid definition is a breaking change. Such evolution requires an explicit version boundary, migration guidance, and cross-format and cross-runtime regression tests, rather than silently changing parser defaults. Definition digests pin the original source; semantic fingerprints and Durable persistence formats have their own version and recovery contracts, and do not substitute for language versioning.
Release checks should run the schema and implementation parity check, Engine/Workbench shared protocol fixtures, and cross-runtime behavior tests. Advisory diagnostics and purely visual metadata must not alter executable semantics.
10. Further reading
Section titled “10. Further reading”- TBBPM Specification — formal TBBPM format reference
- BPMN Extension Specification — CompileFlow extension syntax and execution rules
- When to use CompileFlow — suitable use cases and limitations
- Supported Surfaces
- Extension Guide