Validation Reference
Complete reference for validation rules and error handling in the Process Editor.
Table of contents
- Overview
- Modeling Rules (Runtime Prevention)
- Linting Rules (Real-time Validation)
- Export Validation (Pre-Export Checks)
- Error Display and Resolution
- Validation Configuration
- Best Practices for Validation
Overview
The Process Editor uses multi-layer validation to ensure process integrity:
- Modeling Rules: Prevent invalid operations during editing
- Linting Rules: Real-time validation with detailed error messages
- Export Validation: Final checks before generating MachineSpec JSON
Modeling Rules (Runtime Prevention)
These rules prevent invalid operations during modeling and are enforced immediately:
Element Creation Rules
Start Events:
- ✅ Can be created when no Start Event exists
- ❌ Cannot create multiple Start Events
- ❌ Cannot create if one already exists
Tasks:
- ✅ Can always be created
- ✅ Can be connected to any other element
End Events:
- ✅ Can always be created
- ✅ Multiple End Events allowed
Boundary Timers:
- ✅ Can attach to Tasks only
- ❌ Cannot attach to Start Events, End Events, or other elements
Connection Rules
From Start Events:
- ✅ Can connect to Tasks
- ❌ Cannot connect to End Events
- ❌ Cannot have multiple outgoing connections
- ❌ Cannot have incoming connections
From Tasks:
- ✅ Can connect to Tasks
- ✅ Can connect to End Events
- ✅ Multiple outgoing connections allowed
To End Events:
- ✅ Can receive connections from Tasks
- ✅ Can receive connections from Start Events
- ❌ Cannot have outgoing connections
Context Menu Rules
Start Event Context Menu:
- Shows “Append Task” only if no outgoing connection exists
- Shows “Connect” only if no outgoing connection exists
- Hides options when already connected
Task Context Menu:
- Shows all standard options (Append Task, Append End Event, etc.)
- Shows “Attach Boundary Timer” option
End Event Context Menu:
- Shows only “Connect” (for incoming connections)
- No append options (cannot have outgoing flows)
Linting Rules (Real-time Validation)
These rules run continuously and show detailed error messages:
subset-only
Purpose: Ensures only supported BPMN elements are used
Validates:
- No unsupported BPMN elements (gateways, intermediate events, etc.)
- Only allowed element types in the diagram
Error Messages:
"Element type 'bpmn:ExclusiveGateway' is not supported""Remove unsupported elements from the diagram"
Resolution: Remove or replace unsupported elements with supported alternatives
single-initial-task
Purpose: Ensures exactly one initial state exists
Validates:
- Exactly one Task with no incoming Sequence Flows
- At least one Task exists in the diagram
Error Messages:
"No initial task found (task with no incoming flows)""Multiple initial tasks found, only one allowed"
Resolution:
- Add a Task with no incoming flows
- Remove extra initial Tasks by adding incoming flows
deterministic-transitions
Purpose: Prevents ambiguous transitions from the same state
Validates:
- No duplicate event names on outgoing flows from the same Task
- Each event name is unique per source Task
Error Messages:
"Duplicate event 'APPROVE' from task 'review_task'""Each outgoing flow must have a unique event name"
Resolution: Change event names to be unique (e.g., APPROVE_MANAGER, APPROVE_SYSTEM)
terminal-no-outgoing
Purpose: Ensures End Events are truly terminal
Validates:
- End Events have no outgoing Sequence Flows
- End Events are properly terminal
Error Messages:
"End event cannot have outgoing flows""Remove outgoing connections from end events"
Resolution: Remove outgoing flows from End Events
timer-valid
Purpose: Validates timer configuration and placement
Validates:
- Timers only attached to Tasks
- Valid ISO 8601 duration or datetime format
- Timer has associated event name
Error Messages:
"Timer must be attached to a Task""Invalid ISO duration format: 'P14X'""Timer must have an event name"
Resolution:
- Move timer to a Task
- Fix ISO format (e.g.,
P14Dfor 14 days) - Add event name in timer properties
unique-ids
Purpose: Ensures all identifiers are unique
Validates:
- Element IDs are unique across the diagram
- Flow IDs are unique across the diagram
- Timer IDs are unique across the diagram
Error Messages:
"Duplicate element ID: 'task_review'""Duplicate flow ID: 'flow_approve'""Duplicate timer ID: 'timer_deadline'"
Resolution: Change duplicate IDs to be unique
state-name-valid
Purpose: Validates state naming conventions
Validates:
- Tasks have
data-state-nameattribute - State names follow snake_case convention
- State names are unique within the process
Error Messages:
"Task must have a state name""State name must be snake_case: 'WaitingApproval'""Duplicate state name: 'waiting_approval'"
Resolution:
- Add state name in properties panel
- Convert to snake_case (e.g.,
waiting_approval) - Make state names unique
Export Validation (Pre-Export Checks)
These rules run before export and block export if errors exist:
Process Structure
Initial State Validation:
- Must have exactly one initial state
- Initial state must be reachable
Terminal State Validation:
- Must have at least one terminal state (End Event)
- All terminal states must be reachable from initial state
Connectivity Validation:
- All states must be connected to the main flow
- No orphaned elements (unreachable from initial state)
Metadata Completeness
Required Fields:
- All Tasks must have
data-state-name - All Sequence Flows must have
data-event - All Timers must have complete configuration
Format Validation:
- State names must be valid identifiers
- Event names must be valid identifiers
- ISO formats must be parseable
Semantic Consistency
Event Uniqueness:
- No duplicate events from the same state
- Event names follow naming conventions
Timer Consistency:
- Timer events don’t conflict with flow events
- Timer configurations are valid
Error Display and Resolution
Error Severity Levels
Error (🔴):
- Blocks export functionality
- Must be resolved before proceeding
- Examples: Missing initial state, duplicate events
Warning (🟡):
- Allows export but indicates potential issues
- Should be reviewed and resolved
- Examples: Missing descriptions, unconventional naming
Info (🔵):
- Informational messages
- Suggestions for improvement
- Examples: Best practice recommendations
Error Location
Element Highlighting:
- Click error in validation pane to highlight element
- Problematic elements shown with red border
- Tooltip shows error details
Properties Panel Integration:
- Invalid fields highlighted in properties panel
- Inline validation messages
- Real-time feedback as you type
Common Error Patterns
“No initial state found”
Cause: No Task without incoming flows
Solutions:
- Add a new Task at the beginning
- Remove incoming flow from existing Task
- Connect Start Event to first Task
“Duplicate event ‘APPROVE’”
Cause: Multiple flows from same Task with same event name
Solutions:
- Rename events to be specific (
APPROVE_MANAGER,APPROVE_SYSTEM) - Combine flows if they should be the same transition
- Use guards to differentiate conditions
“Invalid ISO duration ‘P14X’”
Cause: Malformed ISO 8601 duration
Solutions:
- Use correct format:
P14D(14 days) - Check ISO 8601 reference for valid patterns
- Use duration calculator tools
“State name must be snake_case”
Cause: State name doesn’t follow naming convention
Solutions:
- Convert to lowercase:
WaitingApproval→waiting_approval - Replace spaces with underscores:
Waiting Approval→waiting_approval - Remove special characters:
Waiting-Approval!→waiting_approval
Validation Configuration
Custom Rule Configuration
The validation system can be configured via .bpmnlintrc:
1
2
3
4
5
6
7
8
9
10
11
12
{
"extends": "bpmnlint:recommended",
"rules": {
"subset-only": "error",
"single-initial-task": "error",
"deterministic-transitions": "error",
"terminal-no-outgoing": "error",
"timer-valid": "error",
"unique-ids": "error",
"state-name-valid": "error"
}
}
Rule Severity Levels
"error": Blocks export, shows as red"warn": Allows export, shows as yellow"off": Disables the rule
Performance Considerations
Large Diagrams:
- Validation may be slower on diagrams with >50 elements
- Consider breaking complex processes into smaller ones
Real-time Validation:
- Debounced to avoid excessive validation calls
- Runs after 500ms of inactivity
Best Practices for Validation
Proactive Validation
- Design First: Plan your process structure before modeling
- Validate Early: Check validation pane regularly while modeling
- Fix Immediately: Resolve errors as soon as they appear
- Test Round-trips: Export and re-import to verify integrity
Error Prevention
- Follow Conventions: Use established naming patterns
- Use Templates: Start from validated templates
- Incremental Building: Add elements one at a time
- Regular Validation: Check validation pane after each change
Debugging Complex Errors
- Isolate Issues: Temporarily remove elements to identify problems
- Check Dependencies: Verify all referenced elements exist
- Validate Externally: Use JSON schema validators for MachineSpec
- Use Version Control: Compare with known-good versions
Performance Optimization
- Minimize Elements: Use only necessary BPMN elements
- Simplify Flows: Avoid overly complex branching
- Batch Changes: Make multiple related changes before validation
- Regular Cleanup: Remove unused elements and flows