Skip to content

Commit 916890d

Browse files
authored
Merge pull request #155 from tsurdilo/release4.0
updates for 4.0 final
2 parents 328e979 + 40529dc commit 916890d

File tree

7 files changed

+163
-124
lines changed

7 files changed

+163
-124
lines changed

README.md

+25-40
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ to parse and validate workflow definitions as well as generate the workflow diag
2020

2121
| Latest Releases | Conformance to spec version |
2222
| :---: | :---: |
23-
| 4.0.0-SNAPSHOT (main branch) | [v0.8](https://github.com/serverlessworkflow/specification/tree/0.8.x) |
23+
| [4.0.0.Final](https://github.com/serverlessworkflow/sdk-java/releases/) | [v0.8](https://github.com/serverlessworkflow/specification/tree/0.8.x) |
2424
| [3.0.0.Final](https://github.com/serverlessworkflow/sdk-java/releases/) | [v0.7](https://github.com/serverlessworkflow/specification/tree/0.7.x) |
2525
| [2.0.0.Final](https://github.com/serverlessworkflow/sdk-java/releases/) | [v0.6](https://github.com/serverlessworkflow/specification/tree/0.6.x) |
2626
| [1.0.3.Final](https://github.com/serverlessworkflow/sdk-java/releases/) | [v0.5](https://github.com/serverlessworkflow/specification/tree/0.5.x) |
@@ -43,71 +43,50 @@ To use it in your projects you can:
4343

4444
#### Maven projects:
4545

46-
a) Add the following repository to your pom.xml `repositories` section:
47-
48-
```xml
49-
<repository>
50-
<id>oss.sonatype.org-snapshot</id>
51-
<url>http://oss.sonatype.org/content/repositories/snapshots</url>
52-
<releases>
53-
<enabled>false</enabled>
54-
</releases>
55-
<snapshots>
56-
<enabled>true</enabled>
57-
</snapshots>
58-
</repository>
59-
```
60-
61-
b) Add the following dependencies to your pom.xml `dependencies` section:
46+
Add the following dependencies to your pom.xml `dependencies` section:
6247

6348
```xml
6449
<dependency>
6550
<groupId>io.serverlessworkflow</groupId>
6651
<artifactId>serverlessworkflow-api</artifactId>
67-
<version>4.0.0-SNAPSHOT</version>
52+
<version>4.0.0.Final</version>
6853
</dependency>
6954

7055
<dependency>
7156
<groupId>io.serverlessworkflow</groupId>
7257
<artifactId>serverlessworkflow-spi</artifactId>
73-
<version>4.0.0-SNAPSHOT</version>
58+
<version>4.0.0.Final</version>
7459
</dependency>
7560

7661
<dependency>
7762
<groupId>io.serverlessworkflow</groupId>
7863
<artifactId>serverlessworkflow-validation</artifactId>
79-
<version>4.0.0-SNAPSHOT</version>
64+
<version>4.0.0.Final</version>
8065
</dependency>
8166

8267
<dependency>
8368
<groupId>io.serverlessworkflow</groupId>
8469
<artifactId>serverlessworkflow-diagram</artifactId>
85-
<version>4.0.0-SNAPSHOT</version>
70+
<version>4.0.0.Final</version>
8671
</dependency>
8772

8873
<dependency>
8974
<groupId>io.serverlessworkflow</groupId>
9075
<artifactId>serverlessworkflow-util</artifactId>
91-
<version>4.0.0-SNAPSHOT</version>
76+
<version>4.0.0.Final</version>
9277
</dependency>
9378
```
9479

9580
#### Gradle projects:
9681

97-
a) Add the following repositories to your build.gradle `repositories` section:
98-
99-
```text
100-
maven { url "https://oss.sonatype.org/content/repositories/snapshots" }
101-
```
102-
103-
b) Add the following dependencies to your build.gradle `dependencies` section:
82+
Add the following dependencies to your build.gradle `dependencies` section:
10483

10584
```text
106-
implementation("io.serverlessworkflow:serverlessworkflow-api:4.0.0-SNAPSHOT")
107-
implementation("io.serverlessworkflow:serverlessworkflow-spi:4.0.0-SNAPSHOT")
108-
implementation("io.serverlessworkflow:serverlessworkflow-validation:4.0.0-SNAPSHOT")
109-
implementation("io.serverlessworkflow:serverlessworkflow-diagram:4.0.0-SNAPSHOT")
110-
implementation("io.serverlessworkflow:serverlessworkflow-util:4.0.0-SNAPSHOT")
85+
implementation("io.serverlessworkflow:serverlessworkflow-api:4.0.0.Final")
86+
implementation("io.serverlessworkflow:serverlessworkflow-spi:4.0.0.Final")
87+
implementation("io.serverlessworkflow:serverlessworkflow-validation:4.0.0.Final")
88+
implementation("io.serverlessworkflow:serverlessworkflow-diagram:4.0.0.Final")
89+
implementation("io.serverlessworkflow:serverlessworkflow-util:4.0.0.Final")
11190
```
11291

11392
### How to Use
@@ -296,36 +275,42 @@ Here are some generated diagrams from the specification examples (with legend en
296275
Workflow utils provide a number of useful methods for extracting information from workflow definitions.
297276
Once you have a `Workflow` instance, you can use it
298277
##### Get Starting State
299-
```Java
278+
279+
```java
300280
State startingState = WorkflowUtils.getStartingState(workflow);
301281
```
302282
##### Get States by State Type
303-
```Java
283+
284+
```java
304285
List<State> states = WorkflowUtils.getStates(workflow, DefaultState.Type.EVENT);
305286
```
306287
##### Get Consumed-Events, Produced-Events and their count
307-
```Java
288+
289+
```java
308290
List<EventDefinition> consumedEvents = WorkflowUtils.getWorkflowConsumedEvents(workflow);
309291
int consumedEventsCount = WorkflowUtils.getWorkflowConsumedEventsCount(workflow);
310292

311293
List<EventDefinition> producedEvents = WorkflowUtils.getWorkflowProducedEvents(workflow);
312294
int producedEventsCount = WorkflowUtils.getWorkflowProducedEventsCount(workflow);
313295
```
314296
##### Get Defined Consumed-Events, Defined Produced-Events and their count
315-
```Java
297+
298+
```java
316299
List<EventDefinition> consumedEvents = WorkflowUtils.getWorkflowConsumedEventsCount(workflow);
317300
int consumedEventsCount = WorkflowUtils.getWorkflowConsumedEventsCount(workflow);
318301

319302
List<EventDefinition> producedEvents = WorkflowUtils.getWorkflowProducedEvents(workflow);
320303
int producedEventsCount = WorkflowUtils.getWorkflowProducedEventsCount(workflow);
321304
```
322305
##### Get Function definitions which is used by an action
323-
```Java
306+
307+
```java
324308
FunctionDefinition finalizeApplicationFunctionDefinition =
325309
WorkflowUtils.getFunctionDefinitionsForAction(workflow, "finalizeApplicationAction");
326310
```
327311
##### Get Actions which uses a Function definition
328-
```Java
312+
313+
```java
329314
List<Action> actionsForFunctionDefinition =
330315
WorkflowUtils.getActionsForFunctionDefinition(workflow, functionRefName);
331316
```

api/pom.xml

+1-1
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
<parent>
77
<groupId>io.serverlessworkflow</groupId>
88
<artifactId>serverlessworkflow-parent</artifactId>
9-
<version>4.0.0-SNAPSHOT</version>
9+
<version>4.0.0.Final</version>
1010
</parent>
1111

1212
<artifactId>serverlessworkflow-api</artifactId>

diagram/pom.xml

+1-1
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
<parent>
77
<groupId>io.serverlessworkflow</groupId>
88
<artifactId>serverlessworkflow-parent</artifactId>
9-
<version>4.0.0-SNAPSHOT</version>
9+
<version>4.0.0.Final</version>
1010
</parent>
1111

1212
<artifactId>serverlessworkflow-diagram</artifactId>

0 commit comments

Comments
 (0)