Skip to content

Commit

Permalink
Merge branch 'master' into feature/cml-saga-concept
Browse files Browse the repository at this point in the history
  • Loading branch information
mLeveIST committed Sep 15, 2023
2 parents 25916d2 + 314b9ca commit 384a52a
Show file tree
Hide file tree
Showing 35 changed files with 518 additions and 32 deletions.
6 changes: 5 additions & 1 deletion .github/workflows/build_master.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
name: Build (master)
name: Build & Publish Snapshots (master Branch)

on:
push:
Expand All @@ -9,6 +9,7 @@ on:

jobs:
build_standalone:
name: Build Standalone Libraries (DSL, LSP)
if: startsWith(github.event.head_commit.message, '[Tycho]') == false && startsWith(github.event.head_commit.message, '[maven-release-plugin] prepare release v') == false
runs-on: ubuntu-latest

Expand Down Expand Up @@ -37,6 +38,7 @@ jobs:
uses: codecov/codecov-action@v1

build_eclipse:
name: Build Eclipse Plugin
if: startsWith(github.event.head_commit.message, '[Tycho]') == false && startsWith(github.event.head_commit.message, '[maven-release-plugin] prepare release v') == false
runs-on: ubuntu-latest

Expand All @@ -61,6 +63,7 @@ jobs:
run: ./mvnw clean verify

publish_standalone_lib:
name: Publish Snapshots of Libraries (DSL Standalone Lib, LSP)
if: startsWith(github.event.head_commit.message, '[Tycho]') == false && startsWith(github.event.head_commit.message, '[maven-release-plugin] prepare release v') == false
runs-on: ubuntu-latest

Expand Down Expand Up @@ -103,6 +106,7 @@ jobs:
OSSRH_PASSWORD: ${{ secrets.OSSRH_PASSWORD }}

publish_eclipse_snapshot:
name: Publish Snapshot of Eclipse Plugin (P2 repo)
if: startsWith(github.event.head_commit.message, '[Tycho]') == false && startsWith(github.event.head_commit.message, '[maven-release-plugin] prepare release v') == false
runs-on: ubuntu-latest

Expand Down
4 changes: 3 additions & 1 deletion .github/workflows/build_standard.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
name: Build (standard)
name: Build (non-master branch)

on:
push:
Expand All @@ -8,6 +8,7 @@ on:

jobs:
build_standalone:
name: Build Standalone Libraries (DSL, LSP)
runs-on: ubuntu-latest

steps:
Expand Down Expand Up @@ -35,6 +36,7 @@ jobs:
uses: codecov/codecov-action@v1

build_eclipse:
name: Build Eclipse Plugin
runs-on: ubuntu-latest

steps:
Expand Down
3 changes: 2 additions & 1 deletion .github/workflows/release-trigger.yml
Original file line number Diff line number Diff line change
@@ -1,10 +1,11 @@
name: Context Mapper Release Trigger
name: Trigger Release (manual)

on:
workflow_dispatch:

jobs:
prepare_release:
name: Prepare Release
runs-on: ubuntu-latest

steps:
Expand Down
4 changes: 4 additions & 0 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ on:

jobs:
build_standalone:
name: Build Standalone Libraries (DSL, LSP)
runs-on: ubuntu-latest

steps:
Expand Down Expand Up @@ -34,6 +35,7 @@ jobs:
uses: codecov/codecov-action@v1

build_eclipse:
name: Build Eclipse Plugin
runs-on: ubuntu-latest

steps:
Expand All @@ -57,6 +59,7 @@ jobs:
run: ./mvnw clean verify

publish_standalone_lib:
name: Publish Libraries to Maven Central (DSL Standalone Lib, LSP)
runs-on: ubuntu-latest

needs:
Expand Down Expand Up @@ -98,6 +101,7 @@ jobs:
OSSRH_PASSWORD: ${{ secrets.OSSRH_PASSWORD }}

publish_eclipse:
name: Publish Eclipse Plugin (P2 repo)
runs-on: ubuntu-latest

needs:
Expand Down
6 changes: 4 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,8 @@ The Context Mapper project has originally been developed as part of research pro
* Generate [graphical Context Maps](https://contextmapper.org/docs/context-map-generator/)
* Generate [PlantUML](http://plantuml.com/) component diagram from context map
* Generate [PlantUML](http://plantuml.com/) class diagram from bounded context and/or subdomain (tactic DDD)
* Generate [PlantUML](http://plantuml.com/) state diagrams for aggregate states
* Generate [PlantUML](http://plantuml.com/) use case diagrams
* Generate [MDSL](https://socadk.github.io/MDSL/) (micro-) service contracts out of DDD context maps
* Generate [generic text files](https://contextmapper.org/docs/generic-freemarker-generator/) using [Freemarker](https://freemarker.apache.org/) templates
* Generate [ServiceCutter](https://github.com/ServiceCutter/ServiceCutter) input files for service decomposition proposals
Expand Down Expand Up @@ -62,15 +64,15 @@ If you want to use the Context Mapper DSL (CML) language and the generator tools

**Gradle:**
```gradle
implementation 'org.contextmapper:context-mapper-dsl:6.8.0'
implementation 'org.contextmapper:context-mapper-dsl:6.9.0'
```

**Maven:**
```xml
<dependency>
<groupId>org.contextmapper</groupId>
<artifactId>context-mapper-dsl</artifactId>
<version>6.8.0</version>
<version>6.9.0</version>
</dependency>
```
In our [context-mapper-standalone-example](https://github.com/ContextMapper/context-mapper-standalone-example) repository you find an example project showing how to include the library within your project. It further contains code examples illustrating how to use the CML models and the generator tools (PlantUML, MDSL, etc.).
Expand Down
2 changes: 1 addition & 1 deletion org.contextmapper.dsl.feature/feature.xml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
<feature
id="org.contextmapper.dsl.feature"
label="Context Mapper DSL Editor"
version="6.8.1.qualifier"
version="6.9.1.qualifier"
provider-name="Context Mapper Project Team"
plugin="org.contextmapper.dsl.ui">

Expand Down
2 changes: 1 addition & 1 deletion org.contextmapper.dsl.feature/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
<parent>
<groupId>org.contextmapper.dsl</groupId>
<artifactId>org.contextmapper.dsl.parent</artifactId>
<version>6.8.1-SNAPSHOT</version>
<version>6.9.1-SNAPSHOT</version>
</parent>
<artifactId>org.contextmapper.dsl.feature</artifactId>
<packaging>eclipse-feature</packaging>
Expand Down
2 changes: 1 addition & 1 deletion org.contextmapper.dsl.ide.tests/META-INF/MANIFEST.MF
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ Automatic-Module-Name: org.contextmapper.dsl.ide.tests
Bundle-ManifestVersion: 2
Bundle-Name: org.contextmapper.dsl.ide.tests
Bundle-Vendor: Context Mapper
Bundle-Version: 6.8.1.qualifier
Bundle-Version: 6.9.1.qualifier
Bundle-SymbolicName: org.contextmapper.dsl.ide.tests; singleton:=true
Bundle-ActivationPolicy: lazy
Require-Bundle: org.contextmapper.dsl,
Expand Down
2 changes: 1 addition & 1 deletion org.contextmapper.dsl.ide.tests/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
<parent>
<groupId>org.contextmapper.dsl</groupId>
<artifactId>org.contextmapper.dsl.parent</artifactId>
<version>6.8.1-SNAPSHOT</version>
<version>6.9.1-SNAPSHOT</version>
</parent>
<artifactId>org.contextmapper.dsl.ide.tests</artifactId>
<packaging>eclipse-test-plugin</packaging>
Expand Down
2 changes: 1 addition & 1 deletion org.contextmapper.dsl.ide/META-INF/MANIFEST.MF
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ Automatic-Module-Name: org.contextmapper.dsl.ide
Bundle-ManifestVersion: 2
Bundle-Name: org.contextmapper.dsl.ide
Bundle-Vendor: Context Mapper
Bundle-Version: 6.8.1.qualifier
Bundle-Version: 6.9.1.qualifier
Bundle-SymbolicName: org.contextmapper.dsl.ide; singleton:=true
Bundle-ActivationPolicy: lazy
Require-Bundle: org.contextmapper.dsl,
Expand Down
2 changes: 1 addition & 1 deletion org.contextmapper.dsl.ide/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
<parent>
<groupId>org.contextmapper.dsl</groupId>
<artifactId>org.contextmapper.dsl.parent</artifactId>
<version>6.8.1-SNAPSHOT</version>
<version>6.9.1-SNAPSHOT</version>
</parent>
<artifactId>org.contextmapper.dsl.ide</artifactId>
<packaging>eclipse-plugin</packaging>
Expand Down
2 changes: 1 addition & 1 deletion org.contextmapper.dsl.repository/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
<parent>
<groupId>org.contextmapper.dsl</groupId>
<artifactId>org.contextmapper.dsl.parent</artifactId>
<version>6.8.1-SNAPSHOT</version>
<version>6.9.1-SNAPSHOT</version>
</parent>
<artifactId>org.contextmapper.dsl.repository</artifactId>
<packaging>eclipse-repository</packaging>
Expand Down
2 changes: 1 addition & 1 deletion org.contextmapper.dsl.target/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
<parent>
<groupId>org.contextmapper.dsl</groupId>
<artifactId>org.contextmapper.dsl.parent</artifactId>
<version>6.8.1-SNAPSHOT</version>
<version>6.9.1-SNAPSHOT</version>
</parent>
<artifactId>org.contextmapper.dsl.target</artifactId>
<packaging>eclipse-target-definition</packaging>
Expand Down
2 changes: 1 addition & 1 deletion org.contextmapper.dsl.tests/META-INF/MANIFEST.MF
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ Automatic-Module-Name: org.contextmapper.dsl.tests
Bundle-ManifestVersion: 2
Bundle-Name: org.contextmapper.dsl.tests
Bundle-Vendor: Context Mapper
Bundle-Version: 6.8.1.qualifier
Bundle-Version: 6.9.1.qualifier
Bundle-SymbolicName: org.contextmapper.dsl.tests; singleton:=true
Bundle-ActivationPolicy: lazy
Require-Bundle: org.contextmapper.dsl,
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
UseCase Get_paid_for_car_accident { // title
actor "Claimant" // primary actor
secondaryActors "Insurance Employee"
scope "Insurance company" // scope
level "Summary" // level
benefit "A claimant submits a claim and and gets paid from the insurance company." // story (brief summary)
interactions
"submit" a "Claim", // step 1: claimant submits claim
"verifyExistanceOf" "Policy", // step 2: insurance company verifies that valid policy exists
"assign" an "Agent" for a "Claim", // step 3: agent is assigned to claim
"verify" "Policy", // step 4: agent verifies all details are within policy guidelines
"pay" "Claimant", // step 5 (1): claimant gets paid
"close" "Claim" // step 5 (2): file/claim gets closed
}

UseCase Order_Offer_for_new_Insurance {
actor "Claimant"
}

UseCase Just_do_something {
actor "Chiller"
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
UseCase Get_paid_for_car_accident { // title
secondaryActors "Insurance Employee"
scope "Insurance company" // scope
level "Summary" // level
benefit "A claimant submits a claim and and gets paid from the insurance company." // story (brief summary)
interactions
"submit" a "Claim", // step 1: claimant submits claim
"verifyExistanceOf" "Policy", // step 2: insurance company verifies that valid policy exists
"assign" an "Agent" for a "Claim", // step 3: agent is assigned to claim
"verify" "Policy", // step 4: agent verifies all details are within policy guidelines
"pay" "Claimant", // step 5 (1): claimant gets paid
"close" "Claim" // step 5 (2): file/claim gets closed
}

UseCase Order_Offer_for_new_Insurance {
actor "Claimant"
}

UseCase Just_do_something {
actor "Chiller"
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
UseCase Get_paid_for_car_accident { // title
actor "Claimant" // primary actor
scope "Insurance company" // scope
level "Summary" // level
benefit "A claimant submits a claim and and gets paid from the insurance company." // story (brief summary)
interactions
"submit" a "Claim", // step 1: claimant submits claim
"verifyExistanceOf" "Policy", // step 2: insurance company verifies that valid policy exists
"assign" an "Agent" for a "Claim", // step 3: agent is assigned to claim
"verify" "Policy", // step 4: agent verifies all details are within policy guidelines
"pay" "Claimant", // step 5 (1): claimant gets paid
"close" "Claim" // step 5 (2): file/claim gets closed
}

UseCase Order_Offer_for_new_Insurance {
actor "Claimant"
}

UseCase Just_do_something {
actor "Chiller"
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
UseCase Get_paid_for_car_accident { // title
actor "Claimant" // primary actor
secondaryActors "Insurance Employee"
scope "Insurance company" // scope
level "Summary" // level
interactions
"submit" a "Claim", // step 1: claimant submits claim
"verifyExistanceOf" "Policy", // step 2: insurance company verifies that valid policy exists
"assign" an "Agent" for a "Claim", // step 3: agent is assigned to claim
"verify" "Policy", // step 4: agent verifies all details are within policy guidelines
"pay" "Claimant", // step 5 (1): claimant gets paid
"close" "Claim" // step 5 (2): file/claim gets closed
}

UseCase Order_Offer_for_new_Insurance {
actor "Claimant"
}

UseCase Just_do_something {
actor "Chiller"
}
2 changes: 1 addition & 1 deletion org.contextmapper.dsl.tests/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
<parent>
<groupId>org.contextmapper.dsl</groupId>
<artifactId>org.contextmapper.dsl.parent</artifactId>
<version>6.8.1-SNAPSHOT</version>
<version>6.9.1-SNAPSHOT</version>
</parent>
<artifactId>org.contextmapper.dsl.tests</artifactId>
<packaging>eclipse-test-plugin</packaging>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,13 +15,12 @@
*/
package org.contextmapper.dsl.generators.plantuml;

import static org.junit.jupiter.api.Assertions.assertFalse;
import static org.junit.jupiter.api.Assertions.assertThrows;
import static org.junit.jupiter.api.Assertions.assertTrue;

import java.io.IOException;

import static org.junit.jupiter.api.Assertions.assertFalse;

import org.contextmapper.dsl.AbstractCMLInputFileTest;
import org.contextmapper.dsl.contextMappingDSL.BoundedContext;
import org.contextmapper.dsl.contextMappingDSL.ContextMap;
Expand All @@ -31,7 +30,6 @@
import org.contextmapper.dsl.contextMappingDSL.Subdomain;
import org.contextmapper.dsl.generator.PlantUMLGenerator;
import org.contextmapper.dsl.generator.exception.GeneratorInputException;
import org.contextmapper.dsl.generator.exception.NoContextMapDefinedException;
import org.contextmapper.dsl.generators.mocks.ContextMappingModelResourceMock;
import org.contextmapper.dsl.generators.mocks.IFileSystemAccess2Mock;
import org.contextmapper.dsl.generators.mocks.IGeneratorContextMock;
Expand Down Expand Up @@ -168,6 +166,32 @@ void canCreateStateDiagram4AggregateIfAvailable() throws IOException {
// then
assertTrue(filesystem.getGeneratedFilesSet().contains("testmodel_BC_InsuranceQuotes_QuoteRequest_StateDiagram.puml"));
}

@Test
void canCreateUseCaseDiagram4UseCasesIfAvailable() throws IOException {
// given
ContextMappingModel model = getOriginalResourceOfTestCML("use-case-diagram-generation-test-1.cml").getContextMappingModel();

// when
IFileSystemAccess2Mock filesystem = new IFileSystemAccess2Mock();
this.generator.doGenerate(new ContextMappingModelResourceMock(model, "testmodel", "cml"), filesystem, new IGeneratorContextMock());

// then
assertTrue(filesystem.getGeneratedFilesSet().contains("testmodel_UseCases.puml"));
}

@Test
void canCreateSequenceDiagram4UseCaseInteractionsIfAvailable() throws IOException {
// given
ContextMappingModel model = getOriginalResourceOfTestCML("use-case-diagram-generation-test-1.cml").getContextMappingModel();

// when
IFileSystemAccess2Mock filesystem = new IFileSystemAccess2Mock();
this.generator.doGenerate(new ContextMappingModelResourceMock(model, "testmodel", "cml"), filesystem, new IGeneratorContextMock());

// then
assertTrue(filesystem.getGeneratedFilesSet().contains("testmodel_UseCase_Get_paid_for_car_accident_Interactions.puml"));
}

@Test
void expectExceptionForEmptyResource() {
Expand Down
Loading

0 comments on commit 384a52a

Please sign in to comment.