From b81016af2cd87416465a2b217c70ca73579d6dc3 Mon Sep 17 00:00:00 2001 From: Tihomir Surdilovic Date: Tue, 9 Mar 2021 10:31:14 -0500 Subject: [PATCH 1/6] update examples in readme Signed-off-by: Tihomir Surdilovic --- README.md | 37 ++++++++++++++++++------------------- 1 file changed, 18 insertions(+), 19 deletions(-) diff --git a/README.md b/README.md index 20babf07..1487b4ca 100644 --- a/README.md +++ b/README.md @@ -117,16 +117,15 @@ functions: states: - name: Greet type: operation - actionMode: sequential actions: - functionRef: refName: greetingFunction arguments: - name: ".greet.name" + name: "${ .greet.name }" actionDataFilter: - dataResultsPath: ".payload.greeting" + results: "${ .payload.greeting }" stateDataFilter: - output: ".greeting" + output: "${ .greeting }" end: true ``` @@ -158,7 +157,6 @@ assertTrue(workflow.getStates().get(0) instanceof OperationState); OperationState operationState = (OperationState) workflow.getStates().get(0); assertEquals("Greet", operationState.getName()); assertEquals(DefaultState.Type.OPERATION, operationState.getType()); - ... ``` @@ -167,20 +165,21 @@ assertEquals(DefaultState.Type.OPERATION, operationState.getType()); You can also programmatically create Workflow instances, for example: ``` java -Workflow workflow = new Workflow().withId("test-workflow").withName("test-workflow-name").withVersion("1.0") +Workflow workflow = new Workflow() + .withId("test-workflow") + .withName("test-workflow-name") + .withVersion("1.0") + .withStart(new Start().withStateName("MyDelayState")) .withFunctions(new Functions(Arrays.asList( new FunctionDefinition().withName("testFunction") .withOperation("testSwaggerDef#testOperationId"))) ) .withStates(Arrays.asList( - new DelayState().withName("delayState").withType(DELAY) - .withStart( - new Start().withKind(Start.Kind.DEFAULT) - ) + new DelayState().withName("MyDelayState").withType(DELAY) + .withTimeDelay("PT1M") .withEnd( - new End().withKind(End.Kind.DEFAULT) + new End().withTerminate(true) ) - .withTimeDelay("PT1M") ) ); ``` @@ -218,16 +217,16 @@ boolean isValidWorkflow = workflowValidator.setSource("WORKFLOW_MODEL_JSON/YAML" If you build your Workflow programmatically, you can validate it as well: ``` java -Workflow workflow = new Workflow().withId("test-workflow").withVersion("1.0") +Workflow workflow = new Workflow() + .withId("test-workflow") + .withVersion("1.0") + .withStart(new Start().withStateName("MyDelayState")) .withStates(Arrays.asList( - new DelayState().withName("delayState").withType(DefaultState.Type.DELAY) - .withStart( - new Start().withKind(Start.Kind.DEFAULT) - ) + new DelayState().withName("MyDelayState").withType(DefaultState.Type.DELAY) + .withTimeDelay("PT1M") .withEnd( - new End().withKind(End.Kind.DEFAULT) + new End().withTerminate(true) ) - .withTimeDelay("PT1M") )); ); From 266f72d9d6ae538721ad5bcde9c06e48ca2e9145 Mon Sep 17 00:00:00 2001 From: Ricardo Zanini Date: Tue, 16 Mar 2021 18:12:54 -0300 Subject: [PATCH 2/6] Replacing commons-logging with slf4j in transitive dependencies Signed-off-by: Ricardo Zanini --- api/pom.xml | 4 ++++ pom.xml | 11 +++++++++++ validation/pom.xml | 4 ++++ 3 files changed, 19 insertions(+) diff --git a/api/pom.xml b/api/pom.xml index aa480f4e..b3ecddb6 100644 --- a/api/pom.xml +++ b/api/pom.xml @@ -18,6 +18,10 @@ org.slf4j slf4j-api + + org.slf4j + jcl-over-slf4j + com.fasterxml.jackson.core jackson-core diff --git a/pom.xml b/pom.xml index f6da6784..f190ad45 100644 --- a/pom.xml +++ b/pom.xml @@ -71,6 +71,11 @@ slf4j-api ${version.org.slf4j} + + org.slf4j + jcl-over-slf4j + ${version.org.slf4j} + com.fasterxml.jackson.core jackson-core @@ -100,6 +105,12 @@ com.github.erosb everit-json-schema ${json.schema.validation.version} + + + commons-logging + commons-logging + + org.json diff --git a/validation/pom.xml b/validation/pom.xml index 887b9705..95146d41 100644 --- a/validation/pom.xml +++ b/validation/pom.xml @@ -18,6 +18,10 @@ org.slf4j slf4j-api + + org.slf4j + jcl-over-slf4j + io.serverlessworkflow From 69c917f01a4cd006bf24ce3374078659379fbd49 Mon Sep 17 00:00:00 2001 From: Tihomir Surdilovic Date: Sat, 20 Mar 2021 13:28:02 -0400 Subject: [PATCH 3/6] 2.0.x branch prepare Signed-off-by: Tihomir Surdilovic --- README.md | 16 +++++------ api/pom.xml | 2 +- diagram/pom.xml | 2 +- pom.xml | 67 +++++++++++++++++++++++++++++++++++++++++----- spi/pom.xml | 2 +- validation/pom.xml | 2 +- 6 files changed, 73 insertions(+), 18 deletions(-) diff --git a/README.md b/README.md index 1487b4ca..406455ad 100644 --- a/README.md +++ b/README.md @@ -58,25 +58,25 @@ b) Add the following dependencies to your pom.xml `dependencies` section: io.serverlessworkflow serverlessworkflow-api - 2.0.0-SNAPSHOT + 2.0.x io.serverlessworkflow serverlessworkflow-spi - 2.0.0-SNAPSHOT + 2.0.x io.serverlessworkflow serverlessworkflow-validation - 2.0.0-SNAPSHOT + 2.0.x io.serverlessworkflow serverlessworkflow-diagram - 2.0.0-SNAPSHOT + 2.0.x ``` @@ -91,10 +91,10 @@ maven { url "https://oss.sonatype.org/content/repositories/snapshots" } b) Add the following dependencies to your build.gradle `dependencies` section: ```text -implementation("io.serverlessworkflow:serverlessworkflow-api:2.0.0-SNAPSHOT") -implementation("io.serverlessworkflow:serverlessworkflow-spi:2.0.0-SNAPSHOT") -implementation("io.serverlessworkflow:serverlessworkflow-validation:2.0.0-SNAPSHOT") -implementation("io.serverlessworkflow:serverlessworkflow-diagram:2.0.0-SNAPSHOT") +implementation("io.serverlessworkflow:serverlessworkflow-api:2.0.x") +implementation("io.serverlessworkflow:serverlessworkflow-spi:2.0.x") +implementation("io.serverlessworkflow:serverlessworkflow-validation:2.0.x") +implementation("io.serverlessworkflow:serverlessworkflow-diagram:2.0.x") ``` ### How to Use diff --git a/api/pom.xml b/api/pom.xml index b3ecddb6..7477a02d 100644 --- a/api/pom.xml +++ b/api/pom.xml @@ -6,7 +6,7 @@ io.serverlessworkflow serverlessworkflow-parent - 2.0.0-SNAPSHOT + 2.0.x serverlessworkflow-api diff --git a/diagram/pom.xml b/diagram/pom.xml index e89a9cde..46bb2e5d 100644 --- a/diagram/pom.xml +++ b/diagram/pom.xml @@ -6,7 +6,7 @@ io.serverlessworkflow serverlessworkflow-parent - 2.0.0-SNAPSHOT + 2.0.x serverlessworkflow-diagram diff --git a/pom.xml b/pom.xml index f190ad45..233b11e3 100644 --- a/pom.xml +++ b/pom.xml @@ -5,7 +5,7 @@ io.serverlessworkflow serverlessworkflow-parent - 2.0.0-SNAPSHOT + 2.0.x 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 @@ -186,7 +200,6 @@ - maven-deploy-plugin @@ -244,14 +257,56 @@ org.apache.maven.plugins - maven-failsafe-plugin - ${version.failsafe.plugin} + maven-source-plugin + 3.0.1 + + + attach-sources + + jar + + + + + + org.apache.maven.plugins + maven-javadoc-plugin + 2.10.4 - -Xmx1024m -XX:MaxPermSize=256m + 8 + -Xdoclint:none + + + attach-javadocs + + jar + + + + + + org.apache.maven.plugins + maven-gpg-plugin + 1.6 + + + sign-artifacts + verify + + sign + + + + --batch + --pinentry-mode + loopback + + + + - diff --git a/spi/pom.xml b/spi/pom.xml index da5821a8..4159f940 100644 --- a/spi/pom.xml +++ b/spi/pom.xml @@ -6,7 +6,7 @@ io.serverlessworkflow serverlessworkflow-parent - 2.0.0-SNAPSHOT + 2.0.x serverlessworkflow-spi diff --git a/validation/pom.xml b/validation/pom.xml index 95146d41..906c04aa 100644 --- a/validation/pom.xml +++ b/validation/pom.xml @@ -6,7 +6,7 @@ io.serverlessworkflow serverlessworkflow-parent - 2.0.0-SNAPSHOT + 2.0.x serverlessworkflow-validation From b81afbc2c9b80fd3370f2cc1f250d385b6794bb2 Mon Sep 17 00:00:00 2001 From: Tihomir Surdilovic Date: Sat, 20 Mar 2021 13:54:15 -0400 Subject: [PATCH 4/6] 2.0.0.Final relase updates Signed-off-by: Tihomir Surdilovic --- README.md | 16 ++++++++-------- api/pom.xml | 4 +++- diagram/pom.xml | 4 +++- pom.xml | 2 +- spi/pom.xml | 4 +++- validation/pom.xml | 4 +++- 6 files changed, 21 insertions(+), 13 deletions(-) diff --git a/README.md b/README.md index 406455ad..f0adf42c 100644 --- a/README.md +++ b/README.md @@ -58,25 +58,25 @@ b) Add the following dependencies to your pom.xml `dependencies` section: io.serverlessworkflow serverlessworkflow-api - 2.0.x + 2.0.0.Final io.serverlessworkflow serverlessworkflow-spi - 2.0.x + 2.0.0.Final io.serverlessworkflow serverlessworkflow-validation - 2.0.x + 2.0.0.Final io.serverlessworkflow serverlessworkflow-diagram - 2.0.x + 2.0.0.Final ``` @@ -91,10 +91,10 @@ maven { url "https://oss.sonatype.org/content/repositories/snapshots" } b) Add the following dependencies to your build.gradle `dependencies` section: ```text -implementation("io.serverlessworkflow:serverlessworkflow-api:2.0.x") -implementation("io.serverlessworkflow:serverlessworkflow-spi:2.0.x") -implementation("io.serverlessworkflow:serverlessworkflow-validation:2.0.x") -implementation("io.serverlessworkflow:serverlessworkflow-diagram:2.0.x") +implementation("io.serverlessworkflow:serverlessworkflow-api:2.0.0.Final") +implementation("io.serverlessworkflow:serverlessworkflow-spi:2.0.0.Final") +implementation("io.serverlessworkflow:serverlessworkflow-validation:2.0.0.Final") +implementation("io.serverlessworkflow:serverlessworkflow-diagram:2.0.0.Final") ``` ### How to Use diff --git a/api/pom.xml b/api/pom.xml index 7477a02d..fbe78c72 100644 --- a/api/pom.xml +++ b/api/pom.xml @@ -6,11 +6,13 @@ io.serverlessworkflow serverlessworkflow-parent - 2.0.x + 2.0.0.Final serverlessworkflow-api Serverless Workflow :: API + ${project.parent.version} + jar Java SDK for Serverless Workflow Specification diff --git a/diagram/pom.xml b/diagram/pom.xml index 46bb2e5d..f3e5c246 100644 --- a/diagram/pom.xml +++ b/diagram/pom.xml @@ -6,11 +6,13 @@ io.serverlessworkflow serverlessworkflow-parent - 2.0.x + 2.0.0.Final serverlessworkflow-diagram Serverless Workflow :: Diagram + ${project.parent.version} + jar Java SDK for Serverless Workflow Specification diff --git a/pom.xml b/pom.xml index 233b11e3..114cf077 100644 --- a/pom.xml +++ b/pom.xml @@ -5,7 +5,7 @@ io.serverlessworkflow serverlessworkflow-parent - 2.0.x + 2.0.0.Final pom Serverless Workflow :: Parent diff --git a/spi/pom.xml b/spi/pom.xml index 4159f940..3d502ea1 100644 --- a/spi/pom.xml +++ b/spi/pom.xml @@ -6,11 +6,13 @@ io.serverlessworkflow serverlessworkflow-parent - 2.0.x + 2.0.0.Final serverlessworkflow-spi Serverless Workflow :: SPI + ${project.parent.version} + jar Java SDK for Serverless Workflow Specification diff --git a/validation/pom.xml b/validation/pom.xml index 906c04aa..f017adfb 100644 --- a/validation/pom.xml +++ b/validation/pom.xml @@ -6,11 +6,13 @@ io.serverlessworkflow serverlessworkflow-parent - 2.0.x + 2.0.0.Final serverlessworkflow-validation Serverless Workflow :: Validation + ${project.parent.version} + jar Java SDK for Serverless Workflow Specification From 1fa518f87e59f562f5334aa0db52f21fee47c15b Mon Sep 17 00:00:00 2001 From: Tihomir Surdilovic Date: Sat, 20 Mar 2021 14:01:52 -0400 Subject: [PATCH 5/6] update readme for 2.0.0.Final release Signed-off-by: Tihomir Surdilovic --- README.md | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/README.md b/README.md index f0adf42c..8694aaeb 100644 --- a/README.md +++ b/README.md @@ -18,9 +18,8 @@ to parse and validate workflow definitions as well as generate the workflow diag | Latest Releases | Conformance to spec version | | :---: | :---: | -| [1.0.1.Final](https://github.com/serverlessworkflow/sdk-java/releases/) | [v0.5](https://github.com/serverlessworkflow/specification/tree/0.5.x) | -| [1.0.2.Final](https://github.com/serverlessworkflow/sdk-java/releases/) | [v0.5](https://github.com/serverlessworkflow/specification/tree/0.5.x) + [Compensation support](https://github.com/serverlessworkflow/specification/blob/master/specification.md#Workflow-Compensation) | -| [1.0.3.Final](https://github.com/serverlessworkflow/sdk-java/releases/) | [v0.5](https://github.com/serverlessworkflow/specification/tree/0.5.x) + [Compensation support](https://github.com/serverlessworkflow/specification/blob/master/specification.md#Workflow-Compensation) + [Update to start/end definitions](https://github.com/serverlessworkflow/sdk-java/commit/1addf8d66450830cbc3542c8dfb968b3791aba6f) | +| [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) | ### Getting Started From d8b0800675e15b407bcc350faa53c5603c8d2661 Mon Sep 17 00:00:00 2001 From: Tihomir Surdilovic Date: Sat, 20 Mar 2021 14:09:42 -0400 Subject: [PATCH 6/6] Update 2.0.x branch Signed-off-by: Tihomir Surdilovic --- README.md | 16 ++++++++-------- api/pom.xml | 2 +- diagram/pom.xml | 2 +- pom.xml | 2 +- spi/pom.xml | 2 +- validation/pom.xml | 2 +- 6 files changed, 13 insertions(+), 13 deletions(-) diff --git a/README.md b/README.md index 8694aaeb..a720252e 100644 --- a/README.md +++ b/README.md @@ -57,25 +57,25 @@ b) Add the following dependencies to your pom.xml `dependencies` section: io.serverlessworkflow serverlessworkflow-api - 2.0.0.Final + 2.0.x io.serverlessworkflow serverlessworkflow-spi - 2.0.0.Final + 2.0.x io.serverlessworkflow serverlessworkflow-validation - 2.0.0.Final + 2.0.x io.serverlessworkflow serverlessworkflow-diagram - 2.0.0.Final + 2.0.x ``` @@ -90,10 +90,10 @@ maven { url "https://oss.sonatype.org/content/repositories/snapshots" } b) Add the following dependencies to your build.gradle `dependencies` section: ```text -implementation("io.serverlessworkflow:serverlessworkflow-api:2.0.0.Final") -implementation("io.serverlessworkflow:serverlessworkflow-spi:2.0.0.Final") -implementation("io.serverlessworkflow:serverlessworkflow-validation:2.0.0.Final") -implementation("io.serverlessworkflow:serverlessworkflow-diagram:2.0.0.Final") +implementation("io.serverlessworkflow:serverlessworkflow-api:2.0.x") +implementation("io.serverlessworkflow:serverlessworkflow-spi:2.0.x") +implementation("io.serverlessworkflow:serverlessworkflow-validation:2.0.x") +implementation("io.serverlessworkflow:serverlessworkflow-diagram:2.0.x") ``` ### How to Use diff --git a/api/pom.xml b/api/pom.xml index fbe78c72..9a698fd9 100644 --- a/api/pom.xml +++ b/api/pom.xml @@ -6,7 +6,7 @@ io.serverlessworkflow serverlessworkflow-parent - 2.0.0.Final + 2.0.x serverlessworkflow-api diff --git a/diagram/pom.xml b/diagram/pom.xml index f3e5c246..67e0151a 100644 --- a/diagram/pom.xml +++ b/diagram/pom.xml @@ -6,7 +6,7 @@ io.serverlessworkflow serverlessworkflow-parent - 2.0.0.Final + 2.0.x serverlessworkflow-diagram diff --git a/pom.xml b/pom.xml index 114cf077..233b11e3 100644 --- a/pom.xml +++ b/pom.xml @@ -5,7 +5,7 @@ io.serverlessworkflow serverlessworkflow-parent - 2.0.0.Final + 2.0.x pom Serverless Workflow :: Parent diff --git a/spi/pom.xml b/spi/pom.xml index 3d502ea1..2f267f03 100644 --- a/spi/pom.xml +++ b/spi/pom.xml @@ -6,7 +6,7 @@ io.serverlessworkflow serverlessworkflow-parent - 2.0.0.Final + 2.0.x serverlessworkflow-spi diff --git a/validation/pom.xml b/validation/pom.xml index f017adfb..d083dff2 100644 --- a/validation/pom.xml +++ b/validation/pom.xml @@ -6,7 +6,7 @@ io.serverlessworkflow serverlessworkflow-parent - 2.0.0.Final + 2.0.x serverlessworkflow-validation