Skip to content

Commit 08ac3e9

Browse files
author
socadk
committed
Release v5.4.6
1 parent 4e5a6b0 commit 08ac3e9

File tree

96 files changed

+3160
-675
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

96 files changed

+3160
-675
lines changed

README.md

Lines changed: 5 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -18,25 +18,23 @@ This is the "hello world" of cross-platform service contracting, specified in MD
1818
~~~
1919
API description HelloWorldAPI
2020
21-
data type SampleDTO {ID, D}
21+
data type SampleDTO {ID, "someData": D<string>}
2222
2323
endpoint type HelloWorldEndpoint
2424
exposes
2525
operation sayHello
2626
expecting payload D<string>
2727
delivering payload SampleDTO
2828
29-
API provider HelloWorldAPIProvider1
30-
offers HelloWorldEndpoint
31-
32-
API client HelloWorldAPIClient1
33-
consumes HelloWorldEndpoint
29+
API provider HelloWorldAPIProvider
30+
offers HelloWorldEndpoint at endpoint location "http://localhost:8080"
31+
via protocol HTTP binding resource Home at "/hello"
3432
~~~
3533

3634
As the example shows, the MDSL grammar defines two related specification languages:
3735

3836
1. An *API description language*: API `endpoints type`s (a.k.a. service contracts types) can be defined, including their operations; API client and providers of instances of these endpoint types can be specified elaborately, including Service Level Agreements (SLAs).
39-
2. A *data contract language* providing a type system for DTRs in request and response messages (which is very compact): `data type SampleDTO {ID, D}`.
37+
2. A *data contract language* providing a type system for DTRs in request and response messages (which is very compact): `data type SampleDTO {ID, "someData": D<string>}`. This type definition pairs an ID (without a name) with some string data.
4038

4139
These two languages can be used independently of each other; for instance, data contracts for operations in contract types can also be specified in JSON Schema (or XML Schema). Specifications do not have to be complete to be useful (e.g., in early stages of service design); tools will be expected to check that, use defaults, etc.
4240

changelog.md

Lines changed: 15 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,19 @@
11
## MDSL Change Log (and Release Notes)
22

3+
V5.4.6, February 2022
4+
5+
* Blog posts featuring quick fixes and flow modeling extensions in action:
6+
* <https://ozimmer.ch/practices/2022/01/20/StoryDrivenServiceDesignDemo.html>
7+
* <https://ozimmer.ch/practices/2022/01/13/EventDrivenServiceDesignDemo.html>
8+
* (from 2021) <https://medium.com/olzzio/domain-driven-service-design-with-context-mapper-and-mdsl-d5a0fc6091c2>
9+
* MDSL2JaamSim and JaamSim2MDSL transformations/template-based generation and supporting genmodel extensions
10+
* <https://ozimmer.ch//practices/2022/02/01/ProcessOrientedServiceDesignDemo.html>
11+
* Documentation enhancements
12+
* Bug fix AND SketchMiner generation (getter for case check, not instanceof)
13+
* bug fix fgm process view: AND->JOIN events do not terminate flow
14+
* JaamSim layout improvements (FTL template V2.4.2)
15+
* Sample model for P-SOAD blog post
16+
317
V5.4.5, January 2022
418

519
* Improved quick fixes (INFORMATION_HOLDER_RESOURCE operation generation, addWishList for AP and TR requests)
@@ -227,4 +241,4 @@ V0.93b, May 10, 2019 (experimental):
227241
* Only `V<int>` supported as parameter role/type pair, `Value<int>` removed to avoid confusion with `<<stereotypes>>`
228242
* `<<Identifier>>` and `<<Link>>` and `<<Metadata>>` now available as pattern stereotypes (`<<Entity>>` was supported already)
229243

230-
Also see GitHub [release notes](https://github.com/Microservice-API-Patterns/MDSL-Specification/releases).
244+
Also see GitHub [release notes](https://github.com/Microservice-API-Patterns/MDSL-Specification/releases).

docs/flows.md

Lines changed: 18 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ copyright: Olaf Zimmermann, 2021. All rights reserved.
99
Orchestration Flows
1010
===================
1111

12-
_Note:_ The status of the language concepts specified here is [*Experimental Preview*](https://microservice-api-patterns.org/patterns/evolution/ExperimentalPreview.html). Concepts and their tool support might still change in future versions of MDSL.
12+
_Note:_ The status of the language concepts specified here is [*Experimental Preview*](https://microservice-api-patterns.org/patterns/evolution/ExperimentalPreview.html). Concepts and their tool support have been validated, for instance via code generation to multiple target languages (see below). They are rather stable now; many examples and test cases exist. However, they might still change in future versions of MDSL.
1313

1414
## Use Cases (When to Specify)
1515

@@ -22,12 +22,14 @@ _Note:_ The status of the language concepts specified here is [*Experimental Pre
2222
<!--
2323
Early "E-SOAD":
2424
25-
* Application flows in inside a service
25+
* Application flows inside a service
2626
* Service orchestration, API operation call sequencing
2727
* EIP-style integration flows (asynch., pipes and filters)
2828
* Testing (mocking, staging)
2929
-->
3030

31+
*News (Jan 13, 2022)*: The blog post and demo script ["Event-Driven Service Design: Five Steps from Event Storming to OpenAPI and Camel Flow"](https://ozimmer.ch/practices/2022/01/13/EventDrivenServiceDesignDemo.html) features the MDSL flow modeling concepts in action.
32+
3133
## Simple Flow Steps
3234

3335
The following basic flow was generated from the [sample story scenario](./scenarios) with one of the quick fix [transformations](./soad.md) in the [MDSL tools](./tools.md):
@@ -73,21 +75,29 @@ command Command1 emits event Event1 o Event2
7375
command Command2 emits event Event1 x Event2
7476
~~~
7577

76-
Two or more events may be part of a join/aggregate step:
78+
Two or more events may be part of a join, modeling the [Aggregator](https://www.enterpriseintegrationpatterns.com/Aggregator.html) pattern:
7779

7880
~~~
79-
event Command1Done + Command2Done triggers command JoinCommand
80-
event Event1 + Event2 + FlowTerminated trigger command TerminateCommand + CleanupCommand
81+
event Command1Done + Command2Done trigger command JoinedContinuationCommand
8182
~~~
8283

83-
Note that commands cannot be joined in a single rule. To express alternative event emission (by different commands), it is possible to write:
84+
Event joining *may* express that something can only happen when two (or more) commands have been executed previously.
85+
86+
Unlike events, commands cannot be joined in a single rule. Alternative event emission (by two or more commands) can be expressed:
8487

8588
~~~
8689
command Command1 emits event Event1
8790
command Command2 emits event Event1
8891
~~~
8992

90-
Event joining is required to express that something can only happen when two commands have been executed.
93+
The same works for events:
94+
95+
~~~
96+
event Event 1 triggers Command1
97+
event Event 2 triggers Command1
98+
~~~
99+
100+
Either Event1 or Event2 (or both) trigger Command1.
91101

92102
## Versioning
93103

@@ -105,7 +115,7 @@ The [Version Identifier](https://microservice-api-patterns.org/patterns/evolutio
105115

106116
## Grammar Excerpts
107117

108-
*Note:* This is an optional language concept. The flow grammar is subject to change still.
118+
<!-- *Note:* This is an optional language concept. The flow grammar is subject to change still. -->
109119

110120
### Flow and flow steps (with technology binding)
111121

docs/generators/async-api.md

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -275,7 +275,13 @@ More information on the `asyncapi-generator` that we used in this example can be
275275

276276
- The generator does not support security policies.
277277
- A channel can only transfer messages of one data type.
278-
- The generator is not yet supported in the CLI.
278+
- The generator does not work when invoked in the Command Line Interface (CLI).
279+
280+
<!--
281+
Xtext/Xtend problem: generated class experiences NullPointer exception in
282+
io.mdsl.generator.asyncapi.AsyncApiGenerator.compile(AsyncApiGenerator.java:160), line is:
283+
QualifiedName _fullyQualifiedName = this._iQualifiedNameProvider.getFullyQualifiedName(serviceSpecificationInstance);
284+
-->
279285

280286
# Other Generators
281287
Also checkout our other generators:

docs/generators/graphql.md

Lines changed: 33 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -17,10 +17,10 @@ In Eclipse, the generator resides in the MDSL context menu:
1717

1818
<a href="./.../../media/eclipse-graphql-generator-context-menu.png">![GraphQL Generator Context Menu in Eclipse](./.../../media/eclipse-graphql-generator-context-menu.png)</a>
1919

20-
If you work with the CLI, the following command generates the GraphQL specification:
20+
The following CLI command generates the GraphQL specification:
2121

2222
```bash
23-
./mdsl -i model.mdsl -g graphql
23+
mdsl -i model.mdsl -g graphql
2424
```
2525

2626
_Hint:_ Both tools generate the Graphql file into the `src-gen` folder which is located in the projects root directory (Eclipse) or the directory from which the `mdsl` command has been called (CLI). Both tools create the directory automatically in case it does not already exist.
@@ -149,7 +149,7 @@ To validate whether the generated `*.graphql` file, many IDE plugins/extensions
149149
* [GraphQL extensions for Visual Studio Code](https://marketplace.visualstudio.com/items?itemName=GraphQL.vscode-graphql)
150150
* [graphqleditor.com](https://graphqleditor.com/)
151151

152-
The [graphqleditor.com](https://graphqleditor.com/) online tool provides an editor that compiles the schema and features a graphical representation of the model (a login/account might be required):
152+
[graphqleditor.com](https://graphqleditor.com/) provides an editor that compiles the schema and features a graphical representation of the model (an account might be required):
153153

154154
<a target="_blank" href="./../media/graphqleditor.com-screenshot.png">![graphqleditor.com Screenshot](./../media/graphqleditor.com-screenshot.png)</a>
155155

@@ -223,7 +223,7 @@ server.listen().then(({ url }) => {
223223

224224
```
225225

226-
Finally, you just have to implement some resolvers that actually return some data. For our example above, we implemented the following resolver that answers the _lookupPapersFromAuthor_ query:
226+
Finally, implement some resolvers that actually return some data. For our example above, we implemented the following resolver that answers the _lookupPapersFromAuthor_ query:
227227

228228
```js
229229
const papers = {
@@ -309,7 +309,7 @@ mutation createPaper {
309309
**Note:** The mutation implementation just returns a fake object and does not persist the new paper item. It can therefore not be queried after the insertion mutation has been executed.
310310

311311
#### Client
312-
Based on [this tutorial](https://www.apollographql.com/docs/react/get-started/) we can now also create a simple React client that calls the query implemented above.
312+
Based on [this tutorial](https://www.apollographql.com/docs/react/get-started/), we can now also create a simple React client that calls the query implemented above.
313313

314314
Just create a project and initialize it with the following commands:
315315

@@ -400,7 +400,7 @@ function App() {
400400
render(<App />, document.getElementById("root"));
401401
```
402402

403-
**Note** that we used the URL `localhost:4000` to connect to our Apollo server started above.
403+
Note that we used the URL `localhost:4000` to connect to our Apollo server started above.
404404

405405
When adding the following start scripts to your `package.json` file, you can start the client with `npm start`:
406406

@@ -429,10 +429,10 @@ An easy way to get an impression of how the code generator works is by using the
429429

430430
<a target="_blank" href="./../media/code-generator-live-demo.png">![Code Generator Live Demo](./../media/code-generator-live-demo.png)</a>
431431

432-
We created an example Java (Spring Boot) application that uses the code generator. You find the complete example project [here](https://github.com/Microservice-API-Patterns/MDSL-Specification/tree/master/examples/graphql-example/spring-boot-example/).
432+
There is an example Java (Spring Boot) application that uses the code generator. You find the complete example project [here](https://github.com/Microservice-API-Patterns/MDSL-Specification/tree/master/examples/graphql-example/spring-boot-example/).
433433

434434
#### Create Spring Boot (Java) Application
435-
First, we created a classic Spring Boot project with [Spring initializr](https://start.spring.io/) (Gradle project).
435+
Start with a classic Spring Boot project with [Spring Initializr](https://start.spring.io/) (Gradle project).
436436

437437
In order to use the code generator, add the following Gradle plugin:
438438

@@ -476,6 +476,8 @@ Then, create a `package.json` file for calling the generator via yarn:
476476
}
477477
```
478478

479+
Note that the dependencies might been updated when you read this; use a version that suits you. <!-- TODO v55 use latest ones (see https://github.com/Microservice-API-Patterns/MDSL-Specification/security/dependabot) -->
480+
479481
In addition, create a `codegen.yml` file to configure the code generator:
480482

481483
```yml
@@ -491,7 +493,15 @@ generates:
491493
492494
As you can see, we expect the GraphQL schema under `src/main/resources/schema.graphql`. We copied our example schema from the top of this page into the corresponding folder.
493495

494-
Now we can call `./gradlew yarn` to call the generator for the first time. From this time on, `./gradlew clean build` will always generate the sources into the `io.mdsl.graphql.javaexampleapp.generated` package.
496+
Now we can call
497+
498+
> `gradlew yarn` <!-- TODO v55 not working, lock file needs to be crated first (manual step) -->
499+
500+
to invoke the generator for the first time. From now on,
501+
502+
> `gradlew clean build`
503+
504+
will always generate the sources into the `io.mdsl.graphql.javaexampleapp.generated` package.
495505

496506
Based on the generated types we implemented one of the resolver interfaces. Again, the _lookupPapersFromAuthor_ operation:
497507

@@ -567,13 +577,24 @@ public class GraphQLProvider {
567577
}
568578
```
569579

570-
**Note** that we had to provide implementations for our custom scalars (_Void_ and _Raw_). You find it in our [example project](https://github.com/Microservice-API-Patterns/MDSL-Specification/tree/master/examples/graphql-example/spring-boot-example/).
580+
Note that we had to provide implementations for our custom scalars (_Void_ and _Raw_). You find it in our [example project](https://github.com/Microservice-API-Patterns/MDSL-Specification/tree/master/examples/graphql-example/spring-boot-example/).
571581

572-
The Spring Boot application can now be started with `./gradlew clean bootRun` (please adopt the command invocation to your OS). As soon as the application is started, you can run the same query as we did before with Apollo. The following screenshot shows our test with Postman:
582+
The Spring Boot application can now be started with `gradlew clean bootRun` (please adopt the command invocation to your OS). As soon as the application is started, you can run the same query as we did before with Apollo. The following screenshot shows our test with Postman:
573583

574584
<a target="_blank" href="./../media/spring-boot-test-with-postman.png">![Test Spring Boot server with Postman](./../media/spring-boot-test-with-postman.png)</a>
575585

576-
That's it. This was a short introduction what you can do with the GraphQL schemas generated by the MDSL tool. Try it out with your own MDSL model, or let [Context Mapper](https://contextmapper.org/docs/mdsl/) generate one for your from your Domain-Driven Design [bounded contexts](https://contextmapper.org/docs/bounded-context/)!
586+
<!--
587+
query {
588+
lookupPapersFromAuthor(anonymousInput: {anonymous1: "Olaf Zimmermann"}) {
589+
entries {
590+
title
591+
authors
592+
venue
593+
}
594+
}
595+
-->
596+
597+
This was a short introduction what you can do with the GraphQL schemas generated by the MDSL tool. Try it out with your own MDSL model, or let [Context Mapper](https://contextmapper.org/docs/mdsl/) generate one for your from your Domain-Driven Design [bounded contexts](https://contextmapper.org/docs/bounded-context/)!
577598

578599

579600
# Other Generators

docs/generators/jolie.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -20,20 +20,20 @@ In Eclipse, you find the generator in the MDSL context menu:
2020

2121
<a href="./../media/eclipse-jolie-generator-context-menu.png">![Jolie Generator Context Menu in Eclipse](./../media/eclipse-jolie-generator-context-menu.png)</a>
2222

23-
If you work with the CLI, the following command generates the Jolie specification:
23+
When working with the CLI, the following command generates the Jolie specification:
2424

2525
```bash
26-
./mdsl -i model.mdsl -g jolie
26+
mdsl -i model.mdsl -g jolie
2727
```
2828

29-
_Hint:_ Both tools generate the Graphql file into the `src-gen` folder which is located in the projects root directory (Eclipse) or the directory from which the `mdsl` command has been called (CLI). Both tools create the directory automatically in case it does not already exist.
29+
_Hint:_ Both plugin and CLI generate the file into the `src-gen` folder located in the project root directory (Eclipse plugin) or the directory from which the `mdsl` command has been called (CLI). The directory is created automatically in case it does not already exist.
3030

3131
## Example
3232
The following example illustrates what the generator produces for an exemplary MDSL contract.
3333

3434
You find the complete sources (incl. generated `*.ol` (Jolie) file) of this example [here](https://github.com/Microservice-API-Patterns/MDSL-Specification/tree/master/examples/jolie-example).
3535

36-
We use the following MDSL model which was an outcome of this [blogpost](https://ozimmer.ch/practices/2020/06/10/ICWEKeynoteAndDemo.html) to illustrate our generator outputs:
36+
We use the following MDSL model, featured in this [blog post](https://ozimmer.ch/practices/2020/06/10/ICWEKeynoteAndDemo.html), to illustrate our generator outputs:
3737

3838
```
3939
API description ReferenceManagementServiceAPI

0 commit comments

Comments
 (0)