Note: The status of these language concept is Experimental Preview. The grammar and the tool support might change, in breaking ways, in future versions of MDSL.
Use Cases (When to Specify)
- Rapid prototyping (for instance, of event storming results coming in from Context Mapper)
- API call sequencing
- Integration flows, as input for middleware such as Apache Camel
This is an optional language concept. The flow grammar is subject to change as this is a technology preview.
Flow and flow steps (with technology binding)
Orchestration: 'flow' name=ID ('realizes' scenario=[IntegrationScenario])? ('type' type=FlowType)? steps+=FlowStep* flowBinding=OrchestrationBinding? ;
enum FlowType: APPLICATION_FLOW | INTEGRATION_FLOW | SERVICE_ORCHESTRATION | API_CALL_SEQUENCING | EVENT_SOURCING ;
OrchestrationBinding: 'binding' /* 'flow' */ 'to' (eptb+=EndpointTypeBinding|cb+=ChannelBinding)+ ('implemented' 'as' ft=FlowTechnology)? ;
FlowTechnology: 'APACHE_CAMEL_ROUTE' | 'SPRING_INTEGRATION_FLOW' | 'BPMN_PROCESS' | 'BPEL_PROCESS' | 'YET_ANOTHER_FLOW_LANGUAGE' | 'PLAIN_PROGRAMMING' | STRING ;
Event types and command types
Only event types and command types that have been declared can be used in flows. The syntax for these declarations is similar to that of the data types used in endpoint contracts:
EventTypes: 'event' 'type' events+=EventType (',' events+=EventType)* ; EventType: name=ID (content=ElementStructure)? // the domain data reported ('version' svi=SemanticVersioningIdentifier)? ; CommandTypes: 'command' 'type' commands+=CommandType (',' commands+=CommandType)* ; CommandType: name=ID (subject=ElementStructure)? // in/out data or business object/item ('version' svi=SemanticVersioningIdentifier)? ;
Event, command, and data types can be versioned, just like entire API descriptions and endpoint types:
event type something_has_happened version "v1", CRUDSomeBusinessObjectTrigger version "v1" event type startProcessCompleted version "v1" command type startProcess version "v1"
flow Scenario1Flow realizes Scenario1 event something_has_happened triggers command startProcess command startProcess emits event startProcessCompleted event CRUDSomeBusinessObjectTrigger triggers command CRUDSomeBusinessObject event startProcessCompleted triggers command startProcessCompletedProcessor command CRUDSomeBusinessObject emits event CRUDSomeBusinessObjectCompleted
See section “Processes and Event/Command Flows” in the CML language reference for explanations.
- Language specification:
- Quick reference, tutorial and tools
- MDSL homepage
Copyright: Olaf Zimmermann, 2018-2021. All rights reserved. See license information.