Node Types Overview
The Vyuh Workflow Engine provides a rich vocabulary of node types for modeling any business process.
Node Type Summary
| Type | Builder Method | Description |
|---|---|---|
| Start | .start() | Entry point for workflow |
| End | .end() | Terminal point |
| Task | .task() | Automated work execution |
| User Task | .userTask() | Human task (inbox item) |
| Signal Wait | .signalWait() | Wait for external signal |
| Exclusive Gateway | .oneOf() | Route to ONE path (XOR) |
| Race Gateway | .anyOf() | Race paths, first wins (OR) |
| Parallel Gateway | .allOf() | Route to ALL paths (AND) |
Basic Flow Example
dart
final workflow = WorkflowBuilder('BASIC', 'Basic Flow')
.start('begin')
.task('processData', ...)
.userTask('review', ...)
.oneOf('decide', [...])
.end('success')
.end('failure')
.connect('begin', 'processData')
.connect('processData', 'review')
.connect('review', 'decide')
.build();Node Categories
Control Flow Nodes
- Start - Single entry point
- End - Terminal points (can have multiple)
Activity Nodes
- Task - Automated tasks
- User Task - Human interaction tasks
Wait Nodes
- Signal Wait - Wait for external signals
Gateway Nodes
- Exclusive (oneOf) - Route to exactly ONE path
- Race (anyOf) - Race paths, first to complete wins
- Parallel (allOf) - Fork/join for concurrent execution
Node Structure
All nodes share common properties via WorkflowNode:
dart
class WorkflowNode {
final String id; // Unique identifier
final String name; // Human-readable name
final NodeType type; // Node type enum
final NodeConfiguration? config; // Type-safe configuration
}Node configurations are type-safe with specific classes for each node type:
dart
switch (node.config) {
case TaskNodeConfiguration config:
print('Task executor: ${config.schemaType}');
case UserTaskNodeConfiguration config:
print('User task title: ${config.title}');
case GatewayNodeConfiguration config:
print('Gateway branches: ${config.branches.length}');
// ... other configuration types
}Next Steps
- Start & End - Entry and terminal points
- Task Nodes - Automated work
- User Tasks - Human tasks
- Signal Wait - External triggers
- Gateways - Routing and parallelism