How jjocram/arms-simulation-engine works
Main Components
A. Core Simulation Engine:
• BPMN Elements Layer
• Process Execution Layer
• Token Management System
• Metrics Collection System
B. Web Service Layer:
• HTTP Interface
• Request/Response Handling
• Serialization Components
Component Details and Relationships
A. Core Simulation Engine Components:
1. BPMN Elements Layer:
• Relationships between BPMNElement (base class) and its implementations:
• Activities
• Events (Start, End, Time)
• Gateways (Exclusive, Parallel)
• To Process.kt as the orchestrator
2. Process Execution Layer:
• And Transition components
• Activity Execution handling
• Token flow management
3. Token Management System:
• Different token types:
• ControlToken
• ProductToken
• ResourceToken
• Token flow between elements
4. Metrics Collection System:
• ResourceMetric
• TimeDeltaMetric
• ActivityExecutorExtension
B. Web Service Layer:
• Application entry point
• Routing configuration
• Metric result handling
• Serialization utilities
Specific Implementation Details
[Web Service Layer]
• ↓
[BPMN Parser (XMLProcess)]
• ↓
[Simulation Engine Core]
• ↓
[Metrics Collection]
The simulation flow should be represented as:
Important Architectural Patterns to Highlight
• Clear separation between the web service interface and the simulation engine
• Token-based execution model
• Extensible metrics collection system
• Demonstrate the inheritance hierarchy of BPMN elements