Types & Validation
Stateway lets you declare types, enumerations, and validation rules directly inside your BPMN process definition. The .bpmn file becomes the single source of truth: it describes what the process does and what data it accepts at every step.
Inline Types
A type in Stateway is a named schema embedded inside a `` element. Types are declared once at the top of the BPMN document and referenced from data objects, task inputs, and task outputs.
Data Objects
A data object is a process-level variable with a declared type. It bridges an inline type and the actual runtime value stored in the process instance.
I/O Specification
An I/O Specification declares the typed inputs and outputs of a specific task, independent of the process-level variable names. It is the local contract for one activity.
Validation
Stateway validates typed variables at every point where data enters or transitions inside a process. There are no blind spots: if a variable has a declared type, it is checked every time it is written.
Data Stores
A DataStore lets one process read variables from instances of another process — directly in the BPMN diagram, without writing a service task or HTTP call.
Error Handling
When validation fails during process execution, Stateway fires a BPMN error event with errorCode = "ValidationError". You can catch it with a boundary event on the failing activity, or let it propagate to put the instance in error state.
Form Schema Migration
If your process definitions already use stateway:FormSchema on userTask elements, you don't need to change anything. Stateway is fully backward-compatible.
Recipes
3 items