How bpmn-io/bpmn-moddle works
Main Components
a. Core Components:
• BPMN-Moddle Core Engine
• XML Parser/Writer
• BPMN 2.0 Meta-model Validator
• Schema Definitions Handler
b. Supporting Components:
• Resource Loaders
• Extension Handlers
• Test Framework
┌─────────────────────────────────────────────┐
• Client Application │
• ┘
• ↕
┌─────────────────────────────────────────────┐
• BPMN-Moddle Public API │
• (fromXML, toXML, create, etc.) │
• ┘
• ↕
┌─────────────────────────────────────────────┐
• Core Components │
• ┬─────────────┬────────────┤
• BPMN Moddle │ XML Parser │ Validator │
• Engine │ Writer │ │
• ┴─────────────┴────────────┘
• ↕
┌─────────────────────────────────────────────┐
• Schema Definitions │
• ┬─────────────┬────────────────┤
• BPMN 2.0 │ BPMNDI │ DC/DI │
• ┴─────────────┴────────────────┘
Key Elements to Highlight
a. Data Flow:
• XML Input → Parser → BPMN Model → Writer → XML Output
• Schema Validation Flow
• Extension Processing Flow
b. Integration Points:
• External Schema Loading
• Extension Mechanism
• Moddle/Moddle-XML Integration
Important Details
• Relationship with dependent libraries (moddle and moddle-xml)
• Extension points for custom BPMN elements
• Validation process against BPMN 2.0 meta-model
• How the library handles both reading and writing operations
Implementation Notes
• Browser and NodeJS compatibility
• Asynchronous operation handling
• Schema validation requirements (Java SDK dependency)
• Extension mechanism for custom elements