@@ -20,7 +20,7 @@ to parse and validate workflow definitions as well as generate the workflow diag
20
20
21
21
| Latest Releases | Conformance to spec version |
22
22
| :---: | :---: |
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 ) |
24
24
| [ 3.0.0.Final] ( https://github.com/serverlessworkflow/sdk-java/releases/ ) | [ v0.7] ( https://github.com/serverlessworkflow/specification/tree/0.7.x ) |
25
25
| [ 2.0.0.Final] ( https://github.com/serverlessworkflow/sdk-java/releases/ ) | [ v0.6] ( https://github.com/serverlessworkflow/specification/tree/0.6.x ) |
26
26
| [ 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:
43
43
44
44
#### Maven projects:
45
45
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:
62
47
63
48
``` xml
64
49
<dependency >
65
50
<groupId >io.serverlessworkflow</groupId >
66
51
<artifactId >serverlessworkflow-api</artifactId >
67
- <version >4.0.0-SNAPSHOT </version >
52
+ <version >4.0.0.Final </version >
68
53
</dependency >
69
54
70
55
<dependency >
71
56
<groupId >io.serverlessworkflow</groupId >
72
57
<artifactId >serverlessworkflow-spi</artifactId >
73
- <version >4.0.0-SNAPSHOT </version >
58
+ <version >4.0.0.Final </version >
74
59
</dependency >
75
60
76
61
<dependency >
77
62
<groupId >io.serverlessworkflow</groupId >
78
63
<artifactId >serverlessworkflow-validation</artifactId >
79
- <version >4.0.0-SNAPSHOT </version >
64
+ <version >4.0.0.Final </version >
80
65
</dependency >
81
66
82
67
<dependency >
83
68
<groupId >io.serverlessworkflow</groupId >
84
69
<artifactId >serverlessworkflow-diagram</artifactId >
85
- <version >4.0.0-SNAPSHOT </version >
70
+ <version >4.0.0.Final </version >
86
71
</dependency >
87
72
88
73
<dependency >
89
74
<groupId >io.serverlessworkflow</groupId >
90
75
<artifactId >serverlessworkflow-util</artifactId >
91
- <version >4.0.0-SNAPSHOT </version >
76
+ <version >4.0.0.Final </version >
92
77
</dependency >
93
78
```
94
79
95
80
#### Gradle projects:
96
81
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:
104
83
105
84
``` 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 ")
111
90
```
112
91
113
92
### How to Use
@@ -296,36 +275,42 @@ Here are some generated diagrams from the specification examples (with legend en
296
275
Workflow utils provide a number of useful methods for extracting information from workflow definitions.
297
276
Once you have a ` Workflow ` instance, you can use it
298
277
##### Get Starting State
299
- ``` Java
278
+
279
+ ``` java
300
280
State startingState = WorkflowUtils . getStartingState(workflow);
301
281
```
302
282
##### Get States by State Type
303
- ``` Java
283
+
284
+ ``` java
304
285
List<State > states = WorkflowUtils . getStates(workflow, DefaultState . Type . EVENT );
305
286
```
306
287
##### Get Consumed-Events, Produced-Events and their count
307
- ``` Java
288
+
289
+ ``` java
308
290
List<EventDefinition > consumedEvents = WorkflowUtils . getWorkflowConsumedEvents(workflow);
309
291
int consumedEventsCount = WorkflowUtils . getWorkflowConsumedEventsCount(workflow);
310
292
311
293
List<EventDefinition > producedEvents = WorkflowUtils . getWorkflowProducedEvents(workflow);
312
294
int producedEventsCount = WorkflowUtils . getWorkflowProducedEventsCount(workflow);
313
295
```
314
296
##### Get Defined Consumed-Events, Defined Produced-Events and their count
315
- ``` Java
297
+
298
+ ``` java
316
299
List<EventDefinition > consumedEvents = WorkflowUtils . getWorkflowConsumedEventsCount(workflow);
317
300
int consumedEventsCount = WorkflowUtils . getWorkflowConsumedEventsCount(workflow);
318
301
319
302
List<EventDefinition > producedEvents = WorkflowUtils . getWorkflowProducedEvents(workflow);
320
303
int producedEventsCount = WorkflowUtils . getWorkflowProducedEventsCount(workflow);
321
304
```
322
305
##### Get Function definitions which is used by an action
323
- ``` Java
306
+
307
+ ``` java
324
308
FunctionDefinition finalizeApplicationFunctionDefinition =
325
309
WorkflowUtils . getFunctionDefinitionsForAction(workflow, " finalizeApplicationAction" );
326
310
```
327
311
##### Get Actions which uses a Function definition
328
- ``` Java
312
+
313
+ ``` java
329
314
List<Action > actionsForFunctionDefinition =
330
315
WorkflowUtils . getActionsForFunctionDefinition(workflow, functionRefName);
331
316
```
0 commit comments