From 40529dc49b6af92ff1dd12b5cd1e01290f8ef832 Mon Sep 17 00:00:00 2001 From: Tihomir Surdilovic Date: Sun, 28 Nov 2021 20:36:16 -0500 Subject: [PATCH] updates for 4.0 final Signed-off-by: Tihomir Surdilovic --- README.md | 65 ++++++-------- api/pom.xml | 2 +- diagram/pom.xml | 2 +- pom.xml | 212 ++++++++++++++++++++++++++++----------------- spi/pom.xml | 2 +- utils/pom.xml | 2 +- validation/pom.xml | 2 +- 7 files changed, 163 insertions(+), 124 deletions(-) diff --git a/README.md b/README.md index efb425dc..66ec8760 100644 --- a/README.md +++ b/README.md @@ -20,7 +20,7 @@ to parse and validate workflow definitions as well as generate the workflow diag | Latest Releases | Conformance to spec version | | :---: | :---: | -| 4.0.0-SNAPSHOT (main branch) | [v0.8](https://github.com/serverlessworkflow/specification/tree/0.8.x) | +| [4.0.0.Final](https://github.com/serverlessworkflow/sdk-java/releases/) | [v0.8](https://github.com/serverlessworkflow/specification/tree/0.8.x) | | [3.0.0.Final](https://github.com/serverlessworkflow/sdk-java/releases/) | [v0.7](https://github.com/serverlessworkflow/specification/tree/0.7.x) | | [2.0.0.Final](https://github.com/serverlessworkflow/sdk-java/releases/) | [v0.6](https://github.com/serverlessworkflow/specification/tree/0.6.x) | | [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: #### Maven projects: -a) Add the following repository to your pom.xml `repositories` section: - -```xml - - oss.sonatype.org-snapshot - http://oss.sonatype.org/content/repositories/snapshots - - false - - - true - - -``` - -b) Add the following dependencies to your pom.xml `dependencies` section: +Add the following dependencies to your pom.xml `dependencies` section: ```xml io.serverlessworkflow serverlessworkflow-api - 4.0.0-SNAPSHOT + 4.0.0.Final io.serverlessworkflow serverlessworkflow-spi - 4.0.0-SNAPSHOT + 4.0.0.Final io.serverlessworkflow serverlessworkflow-validation - 4.0.0-SNAPSHOT + 4.0.0.Final io.serverlessworkflow serverlessworkflow-diagram - 4.0.0-SNAPSHOT + 4.0.0.Final io.serverlessworkflow serverlessworkflow-util - 4.0.0-SNAPSHOT + 4.0.0.Final ``` #### Gradle projects: -a) Add the following repositories to your build.gradle `repositories` section: - -```text -maven { url "https://oss.sonatype.org/content/repositories/snapshots" } -``` - -b) Add the following dependencies to your build.gradle `dependencies` section: +Add the following dependencies to your build.gradle `dependencies` section: ```text -implementation("io.serverlessworkflow:serverlessworkflow-api:4.0.0-SNAPSHOT") -implementation("io.serverlessworkflow:serverlessworkflow-spi:4.0.0-SNAPSHOT") -implementation("io.serverlessworkflow:serverlessworkflow-validation:4.0.0-SNAPSHOT") -implementation("io.serverlessworkflow:serverlessworkflow-diagram:4.0.0-SNAPSHOT") -implementation("io.serverlessworkflow:serverlessworkflow-util:4.0.0-SNAPSHOT") +implementation("io.serverlessworkflow:serverlessworkflow-api:4.0.0.Final") +implementation("io.serverlessworkflow:serverlessworkflow-spi:4.0.0.Final") +implementation("io.serverlessworkflow:serverlessworkflow-validation:4.0.0.Final") +implementation("io.serverlessworkflow:serverlessworkflow-diagram:4.0.0.Final") +implementation("io.serverlessworkflow:serverlessworkflow-util:4.0.0.Final") ``` ### How to Use @@ -296,15 +275,18 @@ Here are some generated diagrams from the specification examples (with legend en Workflow utils provide a number of useful methods for extracting information from workflow definitions. Once you have a `Workflow` instance, you can use it ##### Get Starting State -```Java + +```java State startingState = WorkflowUtils.getStartingState(workflow); ``` ##### Get States by State Type -```Java + +```java List states = WorkflowUtils.getStates(workflow, DefaultState.Type.EVENT); ``` ##### Get Consumed-Events, Produced-Events and their count -```Java + +```java List consumedEvents = WorkflowUtils.getWorkflowConsumedEvents(workflow); int consumedEventsCount = WorkflowUtils.getWorkflowConsumedEventsCount(workflow); @@ -312,7 +294,8 @@ State startingState = WorkflowUtils.getStartingState(workflow); int producedEventsCount = WorkflowUtils.getWorkflowProducedEventsCount(workflow); ``` ##### Get Defined Consumed-Events, Defined Produced-Events and their count -```Java + +```java List consumedEvents = WorkflowUtils.getWorkflowConsumedEventsCount(workflow); int consumedEventsCount = WorkflowUtils.getWorkflowConsumedEventsCount(workflow); @@ -320,12 +303,14 @@ State startingState = WorkflowUtils.getStartingState(workflow); int producedEventsCount = WorkflowUtils.getWorkflowProducedEventsCount(workflow); ``` ##### Get Function definitions which is used by an action -```Java + +```java FunctionDefinition finalizeApplicationFunctionDefinition = WorkflowUtils.getFunctionDefinitionsForAction(workflow, "finalizeApplicationAction"); ``` ##### Get Actions which uses a Function definition -```Java + +```java List actionsForFunctionDefinition = WorkflowUtils.getActionsForFunctionDefinition(workflow, functionRefName); ``` \ No newline at end of file diff --git a/api/pom.xml b/api/pom.xml index b20aaf22..3f3be1e8 100644 --- a/api/pom.xml +++ b/api/pom.xml @@ -6,7 +6,7 @@ io.serverlessworkflow serverlessworkflow-parent - 4.0.0-SNAPSHOT + 4.0.0.Final serverlessworkflow-api diff --git a/diagram/pom.xml b/diagram/pom.xml index 41f8337a..3c2bdb77 100644 --- a/diagram/pom.xml +++ b/diagram/pom.xml @@ -6,7 +6,7 @@ io.serverlessworkflow serverlessworkflow-parent - 4.0.0-SNAPSHOT + 4.0.0.Final serverlessworkflow-diagram diff --git a/pom.xml b/pom.xml index 5ef1c788..098504c4 100644 --- a/pom.xml +++ b/pom.xml @@ -5,7 +5,7 @@ io.serverlessworkflow serverlessworkflow-parent - 4.0.0-SNAPSHOT + 4.0.0.Final pom Serverless Workflow :: Parent @@ -24,6 +24,20 @@ + + scm:git:git://github.com/serverlessworkflow/sdk-java.git + scm:git:git@github.com:serverlessworkflow/sdk-java.git + https://github.com/serverlessworkflow/sdk-java + + + + + tsurdilo + Tihomir Surdilovic + + + + api spi @@ -65,7 +79,6 @@ 8059 0.17.0 2.9 - true - - - - maven-deploy-plugin - ${version.deploy.plugin} - - 10 - - - - org.apache.maven.plugins - maven-enforcer-plugin - ${version.enforcer.plugin} - - - enforce-versions - - enforce - - - - - ${version.maven} - - - ${version.jdk} - - - - - - - - maven-compiler-plugin - ${version.compiler.plugin} - - true - true - - -Xlint:unchecked - - - - - org.jsonschema2pojo - jsonschema2pojo-maven-plugin - ${version.jsonschema2pojo-maven-plugin} - - - org.apache.maven.plugins - maven-surefire-plugin - ${version.surefire.plugin} - - -Xmx1024m -XX:MaxPermSize=256m - - - - org.apache.maven.plugins - maven-failsafe-plugin - ${version.failsafe.plugin} - - -Xmx1024m -XX:MaxPermSize=256m - - - - org.apache.maven.plugins - maven-checkstyle-plugin - ${version.checkstyle.plugin} - - - com.coveo - fmt-maven-plugin - ${version.fmt-maven-plugin} - - - + + + maven-deploy-plugin + ${version.deploy.plugin} + + 10 + + + + org.apache.maven.plugins + maven-enforcer-plugin + ${version.enforcer.plugin} + + + enforce-versions + + enforce + + + + + ${version.maven} + + + ${version.jdk} + + + + + + + + maven-compiler-plugin + ${version.compiler.plugin} + + true + true + + -Xlint:unchecked + + + + + org.jsonschema2pojo + jsonschema2pojo-maven-plugin + ${version.jsonschema2pojo-maven-plugin} + + + org.apache.maven.plugins + maven-surefire-plugin + ${version.surefire.plugin} + + -Xmx1024m -XX:MaxPermSize=256m + + + + org.apache.maven.plugins + maven-checkstyle-plugin + ${version.checkstyle.plugin} + + + com.coveo + fmt-maven-plugin + ${version.fmt-maven-plugin} + + + org.apache.maven.plugins + maven-source-plugin + 3.0.1 + + + attach-sources + + jar + + + + + + org.apache.maven.plugins + maven-javadoc-plugin + 2.10.4 + + 8 + -Xdoclint:none + + + + attach-javadocs + + jar + + + + + + org.apache.maven.plugins + maven-gpg-plugin + 1.6 + + + sign-artifacts + verify + + sign + + + + --batch + --pinentry-mode + loopback + + + + + + @@ -312,4 +366,4 @@ - + \ No newline at end of file diff --git a/spi/pom.xml b/spi/pom.xml index e713102e..51a5fd61 100644 --- a/spi/pom.xml +++ b/spi/pom.xml @@ -6,7 +6,7 @@ io.serverlessworkflow serverlessworkflow-parent - 4.0.0-SNAPSHOT + 4.0.0.Final serverlessworkflow-spi diff --git a/utils/pom.xml b/utils/pom.xml index be6a7444..c0eac7de 100644 --- a/utils/pom.xml +++ b/utils/pom.xml @@ -6,7 +6,7 @@ io.serverlessworkflow serverlessworkflow-parent - 4.0.0-SNAPSHOT + 4.0.0.Final serverlessworkflow-util diff --git a/validation/pom.xml b/validation/pom.xml index 7219d952..dff52628 100644 --- a/validation/pom.xml +++ b/validation/pom.xml @@ -6,7 +6,7 @@ io.serverlessworkflow serverlessworkflow-parent - 4.0.0-SNAPSHOT + 4.0.0.Final serverlessworkflow-validation