Event ModelingDomain Specific Language (DSL) for writing Event Modeling models. The DSL in textual format can be translated to various outputs, mainly to a diagram. Event Modeling model is defined in a text with prefered What is Event Modeling?
You can read more at Event Modeling web page. Event Modeling diagram is composed of a few main entities:
Entities are organized in swimlanes forming a timeline usually based on the following patterns:
You can find more details in the cheat sheet. The purpose of the Domain Specific Language (DSL) supporting the drawing of the Event Modeling diagram is the rapid creation. Relations among the entities are inferred by default, so the distraction while you design is limited. Further detail to the entities can be added gradually. Basic SyntaxThe DSL supports two types of syntaxes - compact and relaxed one. Both will be mentioned in the examples and both can be used interchangeably. TimelineThe timeline is the key part of the diagram and it is composed of Time Frame definitions. Speedy Time Frame typing is the key of the compact notation. For compact notation you type the
Each Time Frame is referenced by a unique number in order to distinguish one from another and also to be able to reference it when needed. Depending on the complexity of the diagram it should be enough to have just two digit number or more. Imagine you are typing a BASIC program on your ZX Spectrum always starting with a two digit number, but the order of the numbers does not matter, just the uniqueness in the whole timeline. The Time Frame also contains an Entity Identifier, e.g. in case of Relaxed notation would look like this:
Inline dataIt is possible to provide data examples for individual Time Frames. An Inline Data is wrapped in curly brackets on the same line as the Time Frame. Compact version:
Relaxed version:
Data blockIf you need to provide more complex data description, you can define the Data Block separately. Data Block is referenced from a Time Frame by providing the identifier inside of double-square brackets In case the same entity is repeated you need to uniquely identify the data blocks, therefore the Data Block identifier is suffixed with a number. Compact version:
Relaxed version:
Resetting the flowBy default the diagram builds the relations based on the inference. But modeling a more complex business flow requires to break such inference from time to time. For that you can use a different type of Time Frame called Reset Frame. It is represented by a Compact version:
Relaxed version:
Multiple relationsThere are situations where you need to specify multiple relations for an entity. For example when a Read Model is built of multiple Events. You can use
Event Modeling patternsThis chapter briefly summarizes each Event Modeling pattern. State Change
State View
Translation
Details of the SyntaxEntity typesEntity type is determined by the third column in the Time Frame grammar. Compact version:
Relaxed version:
Entities are assigned to default swimlanes unless a Namespace is specified in the Entity Identifier. There are the following types available:
Swimlanes and NamespacesThere are three basic Swimlanes inferred from the Entity Type.
As your diagram grows and you explore the depths of a particular software system, you want to categorize your Entities as well. In order to do that, you can use Namespace identifier as part of the Entity Identifier.
Namespace is the first part before the
Data block data typesA Data is always wrapped in curly brackets. It can be prepended by a data type in backticks. The pattern applies for Inline Data as well as for Data Block.
or for Data Block
Supported types are:
Related ResourcesThere is an attempt to integrate the DSL into Mermaid. |