Flow & Structure Elements
The BPMN control-flow vocabulary layered under the typed elements: containers, events, gateways and connections.
Underneath the typed elements sits the standard BPMN control-flow vocabulary: containers, events, gateways, and the connections between them. In the editor these are the Workflow (BPMN) category of the Types overlay. Every one of them accepts a dai:notes description documenting what the element represents, and all of them nest freely inside containers at any depth.
Containers (SubProcess) — the nesting primitive
bpmn:subProcess is the primary structural tool. Use it freely at any depth to express containment, scope, domain boundaries, or logical clustering. Containers can contain other containers, any typed element, events, and gateways.
A container with no dai:type is a plain, untyped group:
<bpmn:subProcess id="Group_1" name="Group Name" dai:notes="What this group represents.">
<!-- nested elements -->
</bpmn:subProcess>
A typed container is any typed element that has children — an Agent with its tools, an Epic with its stories, a VPC with its subnets. It carries exactly the same dai:type and values it would carry as a bpmn:task; whether an element is a task or a sub-process is decided only by whether it has children.
In DAI Studio you don’t place groups as such: drop elements onto a Task (or any typed element) and it becomes a container; remove its last child and it turns back into a task. Markdown notes are the one exception — they never take children. See Structuring with Nested Groups.
Task — the generic step
A plain bpmn:task with no dai:type is a generic step — a work item that doesn’t fit a more specific type:
<bpmn:task id="Task_validate" name="Validate order"
dai:notes="Check that all required fields are present and that every line item satisfies the Price Rule." />
Any task can be switched to a typed element by setting its dai:type — in DAI Studio, with the type picker (T, or ⇋ in the Properties panel header or the element’s action menu). Changing type never changes whether an element is a task or a container.
Start Events
A workflow can begin in five ways:
| Type | XML | When to use |
|---|---|---|
| Start | <bpmn:startEvent id="…" name="…" dai:notes="…" /> | Starts immediately or by direct invocation. |
| Message Start | <bpmn:startEvent …><bpmn:messageEventDefinition messageRef="…" /></bpmn:startEvent> | Triggered by a specific incoming message from an external system. |
| Timer Start | <bpmn:startEvent …><bpmn:timerEventDefinition><bpmn:timeCycle>R/PT24H</bpmn:timeCycle></bpmn:timerEventDefinition></bpmn:startEvent> | Triggered on a schedule or after a delay — the timer definition is an ISO 8601 duration or datetime (e.g. R/PT24H, PT15M, 2026-01-01T00:00:00Z). DAI Studio’s Timer Definition field is stored as <dai:field key="timerDefinition">. |
| Conditional Start | <bpmn:startEvent …><bpmn:conditionalEventDefinition><bpmn:condition>queue.length > 0</bpmn:condition></bpmn:conditionalEventDefinition></bpmn:startEvent> | Triggered when a boolean expression becomes true (e.g. ${variable == true}). DAI Studio’s Condition field is stored as <dai:field key="condition">. |
| Signal Start | <bpmn:startEvent …><bpmn:signalEventDefinition signalRef="…" /></bpmn:startEvent> | Triggered by a named broadcast signal. |
End Event
Marks where a workflow path terminates:
<bpmn:endEvent id="End_1" name="Done" dai:notes="All lines confirmed." />
Intermediate Events
Between start and end, six intermediate event kinds are available:
| Type | XML pattern |
|---|---|
| Intermediate | <bpmn:intermediateThrowEvent id="…" name="…" dai:notes="…" /> |
| Message Catch | <bpmn:intermediateCatchEvent …><bpmn:messageEventDefinition messageRef="…" /></bpmn:intermediateCatchEvent> |
| Message Throw | <bpmn:intermediateThrowEvent …><bpmn:messageEventDefinition messageRef="…" /></bpmn:intermediateThrowEvent> |
| Timer | <bpmn:intermediateCatchEvent …><bpmn:timerEventDefinition>…</bpmn:timerEventDefinition></bpmn:intermediateCatchEvent> |
| Signal Catch | <bpmn:intermediateCatchEvent …><bpmn:signalEventDefinition signalRef="…" /></bpmn:intermediateCatchEvent> |
| Signal Throw | <bpmn:intermediateThrowEvent …><bpmn:signalEventDefinition signalRef="…" /></bpmn:intermediateThrowEvent> |
Gateways
Decision (exclusive gateway) — routes execution down exactly one outgoing path based on conditions:
<bpmn:exclusiveGateway id="Gateway_1" name="Valid?"
dai:notes="Route to fulfilment if validation passes; otherwise reject." />
Parallel (fork/join) — splits execution into simultaneous branches (fork) or waits for all incoming branches (join). All outgoing paths are taken; no conditions are evaluated:
<bpmn:parallelGateway id="Gateway_2" name="Fetch in parallel" />
Use two parallel gateways to fork and then rejoin a set of parallel steps.
Connections
bpmn:sequenceFlow connects elements and controls execution order. An optional name labels the branch leaving a gateway — the label is what the AI reads as the branch condition:
<bpmn:sequenceFlow id="Flow_1" sourceRef="Start_1" targetRef="Task_1" />
<bpmn:sequenceFlow id="Flow_2" sourceRef="Gateway_1" targetRef="Task_2" name="yes" />
<bpmn:sequenceFlow id="Flow_3" sourceRef="Gateway_1" targetRef="Task_3" name="no" />
See also
- Annotations & Data — side-channel elements that annotate the flow
- Element Types — the typed vocabulary carried by these structures