How bpmn-io/variable-resolver works
Main Components
a. Core Components:
• VariableProvider (Base Class)
• VariableResolver Service
• Platform-specific Resolvers:
• ZeebeVariableResolver
• CamundaVariableResolver
b. Integration Layer:
• BPMN-JS Integration Point
• Moddle Extensions Interface
c. Utility Components:
• Variable Extractors
• Scope Management
• Caching System
• ┌─────────────────────────────────────────┐
• Client Application │
• ┘
• ↓
• ┌─────────────────────────────────────────┐
• BPMN-JS Core │
• ┘
• ↓
• ┌─────────────────────────────────────────┐
• Variable Resolver Module │
• ┌───────────────┐ ┌──────────────┐ │
• VariableProvider│←───│VariableResolver│ │
• ┘ └──────────────┘ │
• ↓ ↓ │
• ┌───────────────┐ ┌──────────────┐ │
• Zeebe Resolver │ │Camunda Resolver│ │
• ┘ └──────────────┘ │
• ┘
• ↓
• ┌─────────────────────────────────────────┐
• ┘
Important Relationships
a. Extension Points:
• How custom VariableProviders can be plugged in
• Extension mechanism for both Zeebe and Camunda platforms
b. Data Flow:
• Variable resolution flow from BPMN elements to consumer
• Caching mechanisms
• Scope inheritance patterns
• ┌─────────────────┐
• Raw Variables │→→→│ Merge Logic │→→→│ Resolved Variables │
• ┘ └────────────┘ └──────────────────┘
• ┌─────────────┐
• Process │
• Scope │
• ┬───────┘
• ↓
• ┌─────────────┐
• Element │
• Scope │
• ┘
Implementation Details to Highlight
• Variable extraction mechanisms
• Async operation support
• Integration with BPMN-JS modeler
• Platform-specific adapters