From f2dfdc8adbb1c096bccd1f4e891a58c874ace194 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?C=C3=A9sar=20Demicheli?= Date: Fri, 25 Oct 2024 11:53:01 +0200 Subject: [PATCH 1/3] Adding support for Bounded Context Canvas v5 and Aggregate Design Canvas v1.1. --- .../contextmapper/dsl/ContextMappingDSL.xtext | 88 ++++++++++++++++++- 1 file changed, 84 insertions(+), 4 deletions(-) diff --git a/org.contextmapper.dsl/src/org/contextmapper/dsl/ContextMappingDSL.xtext b/org.contextmapper.dsl/src/org/contextmapper/dsl/ContextMappingDSL.xtext index 28786cb6..eae3f408 100644 --- a/org.contextmapper.dsl/src/org/contextmapper/dsl/ContextMappingDSL.xtext +++ b/org.contextmapper.dsl/src/org/contextmapper/dsl/ContextMappingDSL.xtext @@ -58,14 +58,20 @@ BoundedContext: (('domainVisionStatement' ('=')? domainVisionStatement=STRING)? & ('type' ('=')? type=BoundedContextType)? & (('responsibilities' ('=')? responsibilities+=STRING) ("," responsibilities+=STRING)*)? & + (('businessDecisions' ('=')? businessDecisions+=STRING) ("," businessDecisions+=STRING)*)? & + (('assumptions' ('=')? assumptions+=STRING) ("," assumptions+=STRING)*)? & + (('verificationMetrics' ('=')? verificationMetrics+=STRING) ("," verificationMetrics+=STRING)*)? & + (('openQuestions' ('=')? openQuestions+=STRING) ("," openQuestions+=STRING)*)? & ('implementationTechnology' ('=')? implementationTechnology=STRING)? & ('knowledgeLevel' ('=')? knowledgeLevel=KnowledgeLevel)?) ('businessModel' ('=')? businessModel=STRING)? & - ('evolution' ('=')? evolution=Evolution)? & + ('evolution' ('=')? evolution=Evolution)?& + ('roleType' ('=')? roleType=ContextRoleType)? & ((application = Application)? & (modules += SculptorModule)* & (aggregates += Aggregate)* & - (domainServices += Service)*) + (domainServices += Service)* & + (domainTerms += DomainTerm)*) CLOSE )? ; @@ -176,6 +182,8 @@ Aggregate : "Aggregate" name=ID (OPEN ( (('responsibilities' ('=')? responsibilities+=STRING) ("," responsibilities+=STRING)*)? & + (('invariants' ('=')? invariants+=STRING) ("," invariants+=STRING)*)? & + (('policies' ('=')? policies+=STRING) ("," policies+=STRING)*)? & ( (('useCases' ('=')? userRequirements += [UseCase]) ("," userRequirements += [UseCase])*) | (('userStories' ('=')? userRequirements += [UserStory]) ("," userRequirements += [UserStory])*) | @@ -190,7 +198,9 @@ Aggregate : ('storageSimilarity' ('=')? storageSimilarity=Similarity)? & ('securityCriticality' ('=')? securityCriticality=Criticality)? & ('securityZone' ('=')? securityZone=STRING)? & - ('securityAccessGroup' ('=')? securityAccessGroup=STRING)? + ('securityAccessGroup' ('=')? securityAccessGroup=STRING)? & + (throughput = Throughput)? & + (size = Size)? ) ((services+=Service) | (resources+=Resource) | @@ -199,6 +209,63 @@ Aggregate : CLOSE)? ; +Throughput: + "Throughput" name=ID (OPEN + ((commandHandlingRate = CommandHandlingRate)? & + (totalClientsNumber = TotalClientsNumber)? & + (concurrencyConflictChance = ConcurrencyConflictChance)?) + CLOSE) +; + +Size: + "Size" name=ID (OPEN + ((eventGrowthRate = EventGrowthRate)? & + (singleInstanceLifetime = SingleInstanceLifetime)? & + (eventsPersistedCount = EventsPersistedCount)?) + CLOSE) +; + +CommandHandlingRate: + "CommandHandlingRate" name=ID (OPEN + (averageMax=AverageMax) + CLOSE) +; + +TotalClientsNumber: + "TotalClientsNumber" name=ID (OPEN + (averageMax=AverageMax) + CLOSE) +; + +ConcurrencyConflictChance: + "ConcurrencyConflictChance" name=ID (OPEN + (averageMax=AverageMax) + CLOSE) +; + +EventGrowthRate: + "EventGrowthRate" name=ID (OPEN + (averageMax=AverageMax) + CLOSE) +; + +SingleInstanceLifetime: + "SingleInstanceLifetime" name=ID (OPEN + (averageMax=AverageMax) + CLOSE) +; + +EventsPersistedCount: + "EventsPersistedCount" name=ID (OPEN + (averageMax=AverageMax) + CLOSE) +; + +AverageMax: + ('average' ('=')? average=STRING)? & + ('maximum' ('=')? maximum=STRING)? +; + Application: "Application" (name=ID)? (OPEN ((commands+=CommandEvent)* & @@ -482,6 +549,15 @@ Action: 'action' action=STRING type=('ACT'|'MONITOR'|STRING) ; +DomainTerm: + "DomainTerm" (name=ID)? (OPEN + ( + ('term' ('=')? term=STRING) & + ('description' ('=')? description=STRING) + ) + CLOSE) +; + enum UpstreamRole: PUBLISHED_LANGUAGE = 'PL' | OPEN_HOST_SERVICE = 'OHS' @@ -511,8 +587,12 @@ enum DownstreamGovernanceRights: INFLUENCER | OPINION_LEADER | VETO_RIGHT | DECISION_MAKER | MONOPOLIST ; +enum ContextRoleType : + DRAFT | EXECUTION | ANALYSIS | GATEWAY | OTHER +; + enum KnowledgeLevel : - META="META" | CONCRETE="CONCRETE" + META="META" | CONCRETE="CONCRETE" ; enum Volatility : From 7b599534c167d5771872ca72c4a431f2fa3358ee Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?C=C3=A9sar=20Demicheli?= Date: Sun, 27 Oct 2024 21:34:20 +0100 Subject: [PATCH 2/3] Removing name from Throughput, Size and their children objects in order to simplify syntax since they're meant to be declared only once or never, not twice or more to require identification. --- .../contextmapper/dsl/ContextMappingDSL.xtext | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/org.contextmapper.dsl/src/org/contextmapper/dsl/ContextMappingDSL.xtext b/org.contextmapper.dsl/src/org/contextmapper/dsl/ContextMappingDSL.xtext index eae3f408..be690ada 100644 --- a/org.contextmapper.dsl/src/org/contextmapper/dsl/ContextMappingDSL.xtext +++ b/org.contextmapper.dsl/src/org/contextmapper/dsl/ContextMappingDSL.xtext @@ -210,7 +210,7 @@ Aggregate : ; Throughput: - "Throughput" name=ID (OPEN + "Throughput" (OPEN ((commandHandlingRate = CommandHandlingRate)? & (totalClientsNumber = TotalClientsNumber)? & (concurrencyConflictChance = ConcurrencyConflictChance)?) @@ -218,7 +218,7 @@ Throughput: ; Size: - "Size" name=ID (OPEN + "Size" (OPEN ((eventGrowthRate = EventGrowthRate)? & (singleInstanceLifetime = SingleInstanceLifetime)? & (eventsPersistedCount = EventsPersistedCount)?) @@ -226,37 +226,37 @@ Size: ; CommandHandlingRate: - "CommandHandlingRate" name=ID (OPEN + "CommandHandlingRate" (OPEN (averageMax=AverageMax) CLOSE) ; TotalClientsNumber: - "TotalClientsNumber" name=ID (OPEN + "TotalClientsNumber" (OPEN (averageMax=AverageMax) CLOSE) ; ConcurrencyConflictChance: - "ConcurrencyConflictChance" name=ID (OPEN + "ConcurrencyConflictChance" (OPEN (averageMax=AverageMax) CLOSE) ; EventGrowthRate: - "EventGrowthRate" name=ID (OPEN + "EventGrowthRate" (OPEN (averageMax=AverageMax) CLOSE) ; SingleInstanceLifetime: - "SingleInstanceLifetime" name=ID (OPEN + "SingleInstanceLifetime" (OPEN (averageMax=AverageMax) CLOSE) ; EventsPersistedCount: - "EventsPersistedCount" name=ID (OPEN + "EventsPersistedCount" (OPEN (averageMax=AverageMax) CLOSE) ; From bb0ff8d78cf9739dcde2eeebdfafbed9096231b6 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?C=C3=A9sar=20Demicheli?= Date: Sun, 2 Mar 2025 11:57:17 +0100 Subject: [PATCH 3/3] Fixed spacing. --- .../src/org/contextmapper/dsl/ContextMappingDSL.xtext | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/org.contextmapper.dsl/src/org/contextmapper/dsl/ContextMappingDSL.xtext b/org.contextmapper.dsl/src/org/contextmapper/dsl/ContextMappingDSL.xtext index be690ada..b397bc5d 100644 --- a/org.contextmapper.dsl/src/org/contextmapper/dsl/ContextMappingDSL.xtext +++ b/org.contextmapper.dsl/src/org/contextmapper/dsl/ContextMappingDSL.xtext @@ -65,7 +65,7 @@ BoundedContext: ('implementationTechnology' ('=')? implementationTechnology=STRING)? & ('knowledgeLevel' ('=')? knowledgeLevel=KnowledgeLevel)?) ('businessModel' ('=')? businessModel=STRING)? & - ('evolution' ('=')? evolution=Evolution)?& + ('evolution' ('=')? evolution=Evolution)? & ('roleType' ('=')? roleType=ContextRoleType)? & ((application = Application)? & (modules += SculptorModule)* &