From 40529dc49b6af92ff1dd12b5cd1e01290f8ef832 Mon Sep 17 00:00:00 2001
From: Tihomir Surdilovic <tihomir@temporal.io>
Date: Sun, 28 Nov 2021 20:36:16 -0500
Subject: [PATCH 001/109] updates for 4.0 final

Signed-off-by: Tihomir Surdilovic <tihomir@temporal.io>
---
 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
-<repository>
-    <id>oss.sonatype.org-snapshot</id>
-    <url>http://oss.sonatype.org/content/repositories/snapshots</url>
-    <releases>
-        <enabled>false</enabled>
-    </releases>
-    <snapshots>
-        <enabled>true</enabled>
-    </snapshots>
-</repository>
-```
-
-b) Add the following dependencies to your pom.xml `dependencies` section:
+Add the following dependencies to your pom.xml `dependencies` section:
 
 ```xml
 <dependency>
     <groupId>io.serverlessworkflow</groupId>
     <artifactId>serverlessworkflow-api</artifactId>
-    <version>4.0.0-SNAPSHOT</version>
+    <version>4.0.0.Final</version>
 </dependency>
 
 <dependency>
     <groupId>io.serverlessworkflow</groupId>
     <artifactId>serverlessworkflow-spi</artifactId>
-    <version>4.0.0-SNAPSHOT</version>
+    <version>4.0.0.Final</version>
 </dependency>
 
 <dependency>
     <groupId>io.serverlessworkflow</groupId>
     <artifactId>serverlessworkflow-validation</artifactId>
-    <version>4.0.0-SNAPSHOT</version>
+    <version>4.0.0.Final</version>
 </dependency>
 
 <dependency>
     <groupId>io.serverlessworkflow</groupId>
     <artifactId>serverlessworkflow-diagram</artifactId>
-    <version>4.0.0-SNAPSHOT</version>
+    <version>4.0.0.Final</version>
 </dependency>
 
 <dependency>
     <groupId>io.serverlessworkflow</groupId>
     <artifactId>serverlessworkflow-util</artifactId>
-    <version>4.0.0-SNAPSHOT</version>
+    <version>4.0.0.Final</version>
 </dependency>
 ```
 
 #### 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<State> states = WorkflowUtils.getStates(workflow, DefaultState.Type.EVENT);
 ```
 ##### Get Consumed-Events, Produced-Events and their count
-```Java
+
+```java
  List<EventDefinition> 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<EventDefinition> 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<Action> 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 @@
     <parent>
         <groupId>io.serverlessworkflow</groupId>
         <artifactId>serverlessworkflow-parent</artifactId>
-        <version>4.0.0-SNAPSHOT</version>
+        <version>4.0.0.Final</version>
     </parent>
 
     <artifactId>serverlessworkflow-api</artifactId>
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 @@
     <parent>
         <groupId>io.serverlessworkflow</groupId>
         <artifactId>serverlessworkflow-parent</artifactId>
-        <version>4.0.0-SNAPSHOT</version>
+        <version>4.0.0.Final</version>
     </parent>
 
     <artifactId>serverlessworkflow-diagram</artifactId>
diff --git a/pom.xml b/pom.xml
index 5ef1c788..098504c4 100644
--- a/pom.xml
+++ b/pom.xml
@@ -5,7 +5,7 @@
 
     <groupId>io.serverlessworkflow</groupId>
     <artifactId>serverlessworkflow-parent</artifactId>
-    <version>4.0.0-SNAPSHOT</version>
+    <version>4.0.0.Final</version>
     <packaging>pom</packaging>
 
     <name>Serverless Workflow :: Parent</name>
@@ -24,6 +24,20 @@
         </license>
     </licenses>
 
+    <scm>
+        <connection>scm:git:git://github.com/serverlessworkflow/sdk-java.git</connection>
+        <developerConnection>scm:git:git@github.com:serverlessworkflow/sdk-java.git</developerConnection>
+        <url>https://github.com/serverlessworkflow/sdk-java</url>
+    </scm>
+
+    <developers>
+        <developer>
+            <id>tsurdilo</id>
+            <name>Tihomir Surdilovic</name>
+        </developer>
+    </developers>
+
+
     <modules>
         <module>api</module>
         <module>spi</module>
@@ -65,7 +79,6 @@
         <version.plantuml>8059</version.plantuml>
         <version.graphviz>0.17.0</version.graphviz>
         <version.fmt-maven-plugin>2.9</version.fmt-maven-plugin>
-
         <!-- Checkstyle props -->
         <checkstyle.failOnViolation>true</checkstyle.failOnViolation>
         <checkstyle.header.template><![CDATA[
@@ -212,82 +225,123 @@
     </dependencyManagement>
 
     <build>
-        <pluginManagement>
-            <plugins>
-                <plugin>
-                    <artifactId>maven-deploy-plugin</artifactId>
-                    <version>${version.deploy.plugin}</version>
-                    <configuration>
-                        <retryFailedDeploymentCount>10</retryFailedDeploymentCount>
-                    </configuration>
-                </plugin>
-                <plugin>
-                    <groupId>org.apache.maven.plugins</groupId>
-                    <artifactId>maven-enforcer-plugin</artifactId>
-                    <version>${version.enforcer.plugin}</version>
-                    <executions>
-                        <execution>
-                            <id>enforce-versions</id>
-                            <goals>
-                                <goal>enforce</goal>
-                            </goals>
-                            <configuration>
-                                <rules>
-                                    <requireMavenVersion>
-                                        <version>${version.maven}</version>
-                                    </requireMavenVersion>
-                                    <requireJavaVersion>
-                                        <version>${version.jdk}</version>
-                                    </requireJavaVersion>
-                                </rules>
-                            </configuration>
-                        </execution>
-                    </executions>
-                </plugin>
-                <plugin>
-                    <artifactId>maven-compiler-plugin</artifactId>
-                    <version>${version.compiler.plugin}</version>
-                    <configuration>
-                        <showDeprecation>true</showDeprecation>
-                        <showWarnings>true</showWarnings>
-                        <compilerArgs>
-                            <arg>-Xlint:unchecked</arg>
-                        </compilerArgs>
-                    </configuration>
-                </plugin>
-                <plugin>
-                    <groupId>org.jsonschema2pojo</groupId>
-                    <artifactId>jsonschema2pojo-maven-plugin</artifactId>
-                    <version>${version.jsonschema2pojo-maven-plugin}</version>
-                </plugin>
-                <plugin>
-                    <groupId>org.apache.maven.plugins</groupId>
-                    <artifactId>maven-surefire-plugin</artifactId>
-                    <version>${version.surefire.plugin}</version>
-                    <configuration>
-                       <argLine>-Xmx1024m -XX:MaxPermSize=256m</argLine>
-                    </configuration>
-                </plugin>
-                <plugin>
-                    <groupId>org.apache.maven.plugins</groupId>
-                    <artifactId>maven-failsafe-plugin</artifactId>
-                    <version>${version.failsafe.plugin}</version>
-                    <configuration>
-                       <argLine>-Xmx1024m -XX:MaxPermSize=256m</argLine>
-                    </configuration>
-                </plugin>
-                <plugin>
-                    <groupId>org.apache.maven.plugins</groupId>
-                    <artifactId>maven-checkstyle-plugin</artifactId>
-                    <version>${version.checkstyle.plugin}</version>
-                </plugin>
-                <plugin>
-                    <groupId>com.coveo</groupId>
-                    <artifactId>fmt-maven-plugin</artifactId>
-                    <version>${version.fmt-maven-plugin}</version>
-                </plugin>
-            </plugins>
-        </pluginManagement>
+        <plugins>
+            <plugin>
+                <artifactId>maven-deploy-plugin</artifactId>
+                <version>${version.deploy.plugin}</version>
+                <configuration>
+                    <retryFailedDeploymentCount>10</retryFailedDeploymentCount>
+                </configuration>
+            </plugin>
+            <plugin>
+                <groupId>org.apache.maven.plugins</groupId>
+                <artifactId>maven-enforcer-plugin</artifactId>
+                <version>${version.enforcer.plugin}</version>
+                <executions>
+                    <execution>
+                        <id>enforce-versions</id>
+                        <goals>
+                            <goal>enforce</goal>
+                        </goals>
+                        <configuration>
+                            <rules>
+                                <requireMavenVersion>
+                                    <version>${version.maven}</version>
+                                </requireMavenVersion>
+                                <requireJavaVersion>
+                                    <version>${version.jdk}</version>
+                                </requireJavaVersion>
+                            </rules>
+                        </configuration>
+                    </execution>
+                </executions>
+            </plugin>
+            <plugin>
+                <artifactId>maven-compiler-plugin</artifactId>
+                <version>${version.compiler.plugin}</version>
+                <configuration>
+                    <showDeprecation>true</showDeprecation>
+                    <showWarnings>true</showWarnings>
+                    <compilerArgs>
+                        <arg>-Xlint:unchecked</arg>
+                    </compilerArgs>
+                </configuration>
+            </plugin>
+            <plugin>
+                <groupId>org.jsonschema2pojo</groupId>
+                <artifactId>jsonschema2pojo-maven-plugin</artifactId>
+                <version>${version.jsonschema2pojo-maven-plugin}</version>
+            </plugin>
+            <plugin>
+                <groupId>org.apache.maven.plugins</groupId>
+                <artifactId>maven-surefire-plugin</artifactId>
+                <version>${version.surefire.plugin}</version>
+                <configuration>
+                    <argLine>-Xmx1024m -XX:MaxPermSize=256m</argLine>
+                </configuration>
+            </plugin>
+            <plugin>
+                <groupId>org.apache.maven.plugins</groupId>
+                <artifactId>maven-checkstyle-plugin</artifactId>
+                <version>${version.checkstyle.plugin}</version>
+            </plugin>
+            <plugin>
+                <groupId>com.coveo</groupId>
+                <artifactId>fmt-maven-plugin</artifactId>
+                <version>${version.fmt-maven-plugin}</version>
+            </plugin>
+            <plugin>
+                <groupId>org.apache.maven.plugins</groupId>
+                <artifactId>maven-source-plugin</artifactId>
+                <version>3.0.1</version>
+                <executions>
+                    <execution>
+                        <id>attach-sources</id>
+                        <goals>
+                            <goal>jar</goal>
+                        </goals>
+                    </execution>
+                </executions>
+            </plugin>
+            <plugin>
+                <groupId>org.apache.maven.plugins</groupId>
+                <artifactId>maven-javadoc-plugin</artifactId>
+                <version>2.10.4</version>
+                <configuration>
+                    <source>8</source>
+                    <additionalparam>-Xdoclint:none</additionalparam>
+                </configuration>
+                <executions>
+                    <execution>
+                        <id>attach-javadocs</id>
+                        <goals>
+                            <goal>jar</goal>
+                        </goals>
+                    </execution>
+                </executions>
+            </plugin>
+            <plugin>
+                <groupId>org.apache.maven.plugins</groupId>
+                <artifactId>maven-gpg-plugin</artifactId>
+                <version>1.6</version>
+                <executions>
+                    <execution>
+                        <id>sign-artifacts</id>
+                        <phase>verify</phase>
+                        <goals>
+                            <goal>sign</goal>
+                        </goals>
+                        <configuration>
+                            <gpgArguments>
+                                <arg>--batch</arg>
+                                <arg>--pinentry-mode</arg>
+                                <arg>loopback</arg>
+                            </gpgArguments>
+                        </configuration>
+                    </execution>
+                </executions>
+            </plugin>
+        </plugins>
     </build>
 
     <distributionManagement>
@@ -312,4 +366,4 @@
             </snapshots>
         </pluginRepository>
     </pluginRepositories>
-</project>
+</project>
\ 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 @@
     <parent>
         <groupId>io.serverlessworkflow</groupId>
         <artifactId>serverlessworkflow-parent</artifactId>
-        <version>4.0.0-SNAPSHOT</version>
+        <version>4.0.0.Final</version>
     </parent>
 
     <artifactId>serverlessworkflow-spi</artifactId>
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 @@
     <parent>
         <groupId>io.serverlessworkflow</groupId>
         <artifactId>serverlessworkflow-parent</artifactId>
-        <version>4.0.0-SNAPSHOT</version>
+        <version>4.0.0.Final</version>
     </parent>
 
     <artifactId>serverlessworkflow-util</artifactId>
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 @@
     <parent>
         <groupId>io.serverlessworkflow</groupId>
         <artifactId>serverlessworkflow-parent</artifactId>
-        <version>4.0.0-SNAPSHOT</version>
+        <version>4.0.0.Final</version>
     </parent>
 
     <artifactId>serverlessworkflow-validation</artifactId>

From 54ac33d23b84bd367431aa844f15000d8e08b3e2 Mon Sep 17 00:00:00 2001
From: Tihomir Surdilovic <tihomir@temporal.io>
Date: Sun, 28 Nov 2021 20:57:34 -0500
Subject: [PATCH 002/109] change version to 4.0.x

Signed-off-by: Tihomir Surdilovic <tihomir@temporal.io>
---
 README.md          | 45 +++++++++++++++++++++++++++++++++------------
 api/pom.xml        |  2 +-
 diagram/pom.xml    |  2 +-
 pom.xml            |  2 +-
 spi/pom.xml        |  2 +-
 utils/pom.xml      |  2 +-
 validation/pom.xml |  2 +-
 7 files changed, 39 insertions(+), 18 deletions(-)

diff --git a/README.md b/README.md
index 66ec8760..3e731d42 100644
--- a/README.md
+++ b/README.md
@@ -43,50 +43,71 @@ To use it in your projects you can:
 
 #### Maven projects:
 
-Add the following dependencies to your pom.xml `dependencies` section:
+a) Add the following repository to your pom.xml `repositories` section:
+
+```xml
+<repository>
+    <id>oss.sonatype.org-snapshot</id>
+    <url>http://oss.sonatype.org/content/repositories/snapshots</url>
+    <releases>
+        <enabled>false</enabled>
+    </releases>
+    <snapshots>
+        <enabled>true</enabled>
+    </snapshots>
+</repository>
+```
+
+b) Add the following dependencies to your pom.xml `dependencies` section:
 
 ```xml
 <dependency>
     <groupId>io.serverlessworkflow</groupId>
     <artifactId>serverlessworkflow-api</artifactId>
-    <version>4.0.0.Final</version>
+    <version>4.0.x</version>
 </dependency>
 
 <dependency>
     <groupId>io.serverlessworkflow</groupId>
     <artifactId>serverlessworkflow-spi</artifactId>
-    <version>4.0.0.Final</version>
+    <version>4.0.x</version>
 </dependency>
 
 <dependency>
     <groupId>io.serverlessworkflow</groupId>
     <artifactId>serverlessworkflow-validation</artifactId>
-    <version>4.0.0.Final</version>
+    <version>4.0.x</version>
 </dependency>
 
 <dependency>
     <groupId>io.serverlessworkflow</groupId>
     <artifactId>serverlessworkflow-diagram</artifactId>
-    <version>4.0.0.Final</version>
+    <version>4.0.x</version>
 </dependency>
 
 <dependency>
     <groupId>io.serverlessworkflow</groupId>
     <artifactId>serverlessworkflow-util</artifactId>
-    <version>4.0.0.Final</version>
+    <version>4.0.x</version>
 </dependency>
 ```
 
 #### Gradle projects:
 
-Add the following dependencies to your build.gradle `dependencies` section:
+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:
 
 ```text
-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")
+implementation("io.serverlessworkflow:serverlessworkflow-api:4.0.x")
+implementation("io.serverlessworkflow:serverlessworkflow-spi:4.0.x")
+implementation("io.serverlessworkflow:serverlessworkflow-validation:4.0.x")
+implementation("io.serverlessworkflow:serverlessworkflow-diagram:4.0.x")
+implementation("io.serverlessworkflow:serverlessworkflow-util:4.0.x")
 ```
 
 ### How to Use 
diff --git a/api/pom.xml b/api/pom.xml
index 3f3be1e8..6dfbc378 100644
--- a/api/pom.xml
+++ b/api/pom.xml
@@ -6,7 +6,7 @@
     <parent>
         <groupId>io.serverlessworkflow</groupId>
         <artifactId>serverlessworkflow-parent</artifactId>
-        <version>4.0.0.Final</version>
+        <version>4.0.x</version>
     </parent>
 
     <artifactId>serverlessworkflow-api</artifactId>
diff --git a/diagram/pom.xml b/diagram/pom.xml
index 3c2bdb77..5cd03836 100644
--- a/diagram/pom.xml
+++ b/diagram/pom.xml
@@ -6,7 +6,7 @@
     <parent>
         <groupId>io.serverlessworkflow</groupId>
         <artifactId>serverlessworkflow-parent</artifactId>
-        <version>4.0.0.Final</version>
+        <version>4.0.x</version>
     </parent>
 
     <artifactId>serverlessworkflow-diagram</artifactId>
diff --git a/pom.xml b/pom.xml
index 098504c4..8f3ef74a 100644
--- a/pom.xml
+++ b/pom.xml
@@ -5,7 +5,7 @@
 
     <groupId>io.serverlessworkflow</groupId>
     <artifactId>serverlessworkflow-parent</artifactId>
-    <version>4.0.0.Final</version>
+    <version>4.0.x</version>
     <packaging>pom</packaging>
 
     <name>Serverless Workflow :: Parent</name>
diff --git a/spi/pom.xml b/spi/pom.xml
index 51a5fd61..a2d1532d 100644
--- a/spi/pom.xml
+++ b/spi/pom.xml
@@ -6,7 +6,7 @@
     <parent>
         <groupId>io.serverlessworkflow</groupId>
         <artifactId>serverlessworkflow-parent</artifactId>
-        <version>4.0.0.Final</version>
+        <version>4.0.x</version>
     </parent>
 
     <artifactId>serverlessworkflow-spi</artifactId>
diff --git a/utils/pom.xml b/utils/pom.xml
index c0eac7de..4fab2886 100644
--- a/utils/pom.xml
+++ b/utils/pom.xml
@@ -6,7 +6,7 @@
     <parent>
         <groupId>io.serverlessworkflow</groupId>
         <artifactId>serverlessworkflow-parent</artifactId>
-        <version>4.0.0.Final</version>
+        <version>4.0.x</version>
     </parent>
 
     <artifactId>serverlessworkflow-util</artifactId>
diff --git a/validation/pom.xml b/validation/pom.xml
index dff52628..399a0abf 100644
--- a/validation/pom.xml
+++ b/validation/pom.xml
@@ -6,7 +6,7 @@
     <parent>
         <groupId>io.serverlessworkflow</groupId>
         <artifactId>serverlessworkflow-parent</artifactId>
-        <version>4.0.0.Final</version>
+        <version>4.0.x</version>
     </parent>
 
     <artifactId>serverlessworkflow-validation</artifactId>

From 6dea9e462841c900fcc09adba6c0a9623b4e931d Mon Sep 17 00:00:00 2001
From: manick02 <manickavasagam.sundaram@gmail.com>
Date: Wed, 1 Dec 2021 09:31:34 +0530
Subject: [PATCH 003/109] Removing workflow name and startstart mandatory
 checks as they become optional from spec version 0.8

Signed-off-by: manick02 <manickavasagam.sundaram@gmail.com>
---
 .../validation/WorkflowValidatorImpl.java     | 24 +++++++----------
 .../test/WorkflowValidationTest.java          | 27 +++++++++++++++----
 2 files changed, 31 insertions(+), 20 deletions(-)

diff --git a/validation/src/main/java/io/serverlessworkflow/validation/WorkflowValidatorImpl.java b/validation/src/main/java/io/serverlessworkflow/validation/WorkflowValidatorImpl.java
index 130e4c24..010033ba 100644
--- a/validation/src/main/java/io/serverlessworkflow/validation/WorkflowValidatorImpl.java
+++ b/validation/src/main/java/io/serverlessworkflow/validation/WorkflowValidatorImpl.java
@@ -116,16 +116,6 @@ public List<ValidationError> validate() {
         addValidationError("Workflow id should not be empty", ValidationError.WORKFLOW_VALIDATION);
       }
 
-      if (workflow.getName() == null || workflow.getName().trim().isEmpty()) {
-        addValidationError(
-            "Workflow name should not be empty", ValidationError.WORKFLOW_VALIDATION);
-      }
-
-      if (workflow.getStart() == null) {
-        addValidationError(
-            "Workflow must define a starting state", ValidationError.WORKFLOW_VALIDATION);
-      }
-
       if (workflow.getVersion() == null || workflow.getVersion().trim().isEmpty()) {
         addValidationError(
             "Workflow version should not be empty", ValidationError.WORKFLOW_VALIDATION);
@@ -137,12 +127,16 @@ public List<ValidationError> validate() {
 
       if (workflow.getStates() != null && !workflow.getStates().isEmpty()) {
         boolean existingStateWithStartProperty = false;
-        String startProperty = workflow.getStart().getStateName();
-        for (State s : workflow.getStates()) {
-          if (s.getName().equals(startProperty)) {
-            existingStateWithStartProperty = true;
-            break;
+        if (workflow.getStart() != null) {
+          String startProperty = workflow.getStart().getStateName();
+          for (State s : workflow.getStates()) {
+            if (s.getName().equals(startProperty)) {
+              existingStateWithStartProperty = true;
+              break;
+            }
           }
+        } else {
+          existingStateWithStartProperty = true;
         }
         if (!existingStateWithStartProperty) {
           addValidationError(
diff --git a/validation/src/test/java/io/serverlessworkflow/validation/test/WorkflowValidationTest.java b/validation/src/test/java/io/serverlessworkflow/validation/test/WorkflowValidationTest.java
index 8baf9dfa..8d532c76 100644
--- a/validation/src/test/java/io/serverlessworkflow/validation/test/WorkflowValidationTest.java
+++ b/validation/src/test/java/io/serverlessworkflow/validation/test/WorkflowValidationTest.java
@@ -67,13 +67,10 @@ public void testFromIncompleteWorkflow() {
     WorkflowValidator workflowValidator = new WorkflowValidatorImpl();
     List<ValidationError> validationErrors = workflowValidator.setWorkflow(workflow).validate();
     Assertions.assertNotNull(validationErrors);
-    Assertions.assertEquals(2, validationErrors.size());
-
-    Assertions.assertEquals(
-        "Workflow name should not be empty", validationErrors.get(0).getMessage());
+    Assertions.assertEquals(1, validationErrors.size());
     Assertions.assertEquals(
         "No state name found that matches the workflow start definition",
-        validationErrors.get(1).getMessage());
+        validationErrors.get(0).getMessage());
   }
 
   @Test
@@ -147,4 +144,24 @@ public void testOperationStateNoFunctionRef() {
         "Operation State action functionRef does not reference an existing workflow function definition",
         validationErrors.get(0).getMessage());
   }
+
+  @Test
+  public void testValidatateWorkflowWithNoStartStateandNameSpecified() {
+    Workflow workflow =
+        new Workflow()
+            .withId("test-workflow")
+            .withVersion("1.0")
+            .withStates(
+                Arrays.asList(
+                    new SleepState()
+                        .withName("sleepState")
+                        .withType(SLEEP)
+                        .withEnd(new End())
+                        .withDuration("PT1M")));
+
+    WorkflowValidator workflowValidator = new WorkflowValidatorImpl();
+    List<ValidationError> validationErrors = workflowValidator.setWorkflow(workflow).validate();
+    Assertions.assertNotNull(validationErrors);
+    Assertions.assertEquals(0, validationErrors.size());
+  }
 }

From aaba7f61a731ad54e36a1e45437c9b2e80a08a9d Mon Sep 17 00:00:00 2001
From: manick02 <manickavasagam.sundaram@gmail.com>
Date: Wed, 1 Dec 2021 10:00:23 +0530
Subject: [PATCH 004/109] IterationParam made optional as per version V.8.0 of
 specification

Signed-off-by: manick02 <manickavasagam.sundaram@gmail.com>
---
 .../validation/WorkflowValidatorImpl.java     |  7 ---
 .../test/WorkflowValidationTest.java          | 49 ++++++++++++++++++-
 2 files changed, 48 insertions(+), 8 deletions(-)

diff --git a/validation/src/main/java/io/serverlessworkflow/validation/WorkflowValidatorImpl.java b/validation/src/main/java/io/serverlessworkflow/validation/WorkflowValidatorImpl.java
index 010033ba..f226c9a8 100644
--- a/validation/src/main/java/io/serverlessworkflow/validation/WorkflowValidatorImpl.java
+++ b/validation/src/main/java/io/serverlessworkflow/validation/WorkflowValidatorImpl.java
@@ -319,13 +319,6 @@ public List<ValidationError> validate() {
                           "ForEach state should have a valid inputCollection",
                           ValidationError.WORKFLOW_VALIDATION);
                     }
-
-                    if (forEachState.getIterationParam() == null
-                        || forEachState.getIterationParam().isEmpty()) {
-                      addValidationError(
-                          "ForEach state should have a valid iteration parameter",
-                          ValidationError.WORKFLOW_VALIDATION);
-                    }
                   }
 
                   if (s instanceof CallbackState) {
diff --git a/validation/src/test/java/io/serverlessworkflow/validation/test/WorkflowValidationTest.java b/validation/src/test/java/io/serverlessworkflow/validation/test/WorkflowValidationTest.java
index 8d532c76..221af19c 100644
--- a/validation/src/test/java/io/serverlessworkflow/validation/test/WorkflowValidationTest.java
+++ b/validation/src/test/java/io/serverlessworkflow/validation/test/WorkflowValidationTest.java
@@ -146,7 +146,7 @@ public void testOperationStateNoFunctionRef() {
   }
 
   @Test
-  public void testValidatateWorkflowWithNoStartStateandNameSpecified() {
+  public void testValidatateWorkflowForOptionalStartStateAndWorkflowName() {
     Workflow workflow =
         new Workflow()
             .withId("test-workflow")
@@ -164,4 +164,51 @@ public void testValidatateWorkflowWithNoStartStateandNameSpecified() {
     Assertions.assertNotNull(validationErrors);
     Assertions.assertEquals(0, validationErrors.size());
   }
+
+  @Test
+  public void testValidateWorkflowForOptionalIterationParam() {
+    WorkflowValidator workflowValidator = new WorkflowValidatorImpl();
+    List<ValidationError> validationErrors =
+        workflowValidator
+            .setSource(
+                "{\n"
+                    + "\"id\": \"checkInbox\",\n"
+                    + "  \"name\": \"Check Inbox Workflow\",\n"
+                    + "\"description\": \"Periodically Check Inbox\",\n"
+                    + "\"version\": \"1.0\",\n"
+                    + "\"start\": \"CheckInbox\",\n"
+                    + "\"functions\": [\n"
+                    + "\n"
+                    + "],\n"
+                    + "\"states\": [\n"
+                    + "    {\n"
+                    + "        \"name\": \"CheckInbox\",\n"
+                    + "        \"type\": \"operation\",\n"
+                    + "        \"actionMode\": \"sequential\",\n"
+                    + "        \"actions\": [\n"
+                    + "            {\n"
+                    + "                \"functionRef\": {\n"
+                    + "                    \"refName\": \"checkInboxFunction\"\n"
+                    + "                }\n"
+                    + "            }\n"
+                    + "        ],\n"
+                    + "        \"transition\": {\n"
+                    + "            \"nextState\": \"SendTextForHighPrioriry\"\n"
+                    + "        }\n"
+                    + "    },\n"
+                    + "    {\n"
+                    + "        \"name\": \"SendTextForHighPrioriry\",\n"
+                    + "        \"type\": \"foreach\",\n"
+                    + "        \"inputCollection\": \"${ .message }\",\n"
+                    + "        \"end\": {\n"
+                    + "            \"kind\": \"default\"\n"
+                    + "        }\n"
+                    + "    }\n"
+                    + "]\n"
+                    + "}")
+            .validate();
+
+    Assertions.assertNotNull(validationErrors);
+    Assertions.assertEquals(1, validationErrors.size()); // validation error raised for functionref not for iterationParam
+  }
 }

From 5f58c3f96d8babd45acf41554bd4a6392efb6abe Mon Sep 17 00:00:00 2001
From: Tihomir Surdilovic <tihomir@temporal.io>
Date: Wed, 1 Dec 2021 09:21:59 -0500
Subject: [PATCH 005/109] fix small spelling

Signed-off-by: Tihomir Surdilovic <tihomir@temporal.io>
---
 .../validation/test/WorkflowValidationTest.java                 | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/validation/src/test/java/io/serverlessworkflow/validation/test/WorkflowValidationTest.java b/validation/src/test/java/io/serverlessworkflow/validation/test/WorkflowValidationTest.java
index 221af19c..b9094bb1 100644
--- a/validation/src/test/java/io/serverlessworkflow/validation/test/WorkflowValidationTest.java
+++ b/validation/src/test/java/io/serverlessworkflow/validation/test/WorkflowValidationTest.java
@@ -146,7 +146,7 @@ public void testOperationStateNoFunctionRef() {
   }
 
   @Test
-  public void testValidatateWorkflowForOptionalStartStateAndWorkflowName() {
+  public void testValidateWorkflowForOptionalStartStateAndWorkflowName() {
     Workflow workflow =
         new Workflow()
             .withId("test-workflow")

From b7874abd25d5885d8e1f1c0c88e51ef6ef4f72d3 Mon Sep 17 00:00:00 2001
From: Tihomir Surdilovic <tihomir@temporal.io>
Date: Wed, 1 Dec 2021 09:27:42 -0500
Subject: [PATCH 006/109] small formatting fix

Signed-off-by: Tihomir Surdilovic <tihomir@temporal.io>
---
 .../validation/test/WorkflowValidationTest.java               | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/validation/src/test/java/io/serverlessworkflow/validation/test/WorkflowValidationTest.java b/validation/src/test/java/io/serverlessworkflow/validation/test/WorkflowValidationTest.java
index b9094bb1..601e667b 100644
--- a/validation/src/test/java/io/serverlessworkflow/validation/test/WorkflowValidationTest.java
+++ b/validation/src/test/java/io/serverlessworkflow/validation/test/WorkflowValidationTest.java
@@ -209,6 +209,8 @@ public void testValidateWorkflowForOptionalIterationParam() {
             .validate();
 
     Assertions.assertNotNull(validationErrors);
-    Assertions.assertEquals(1, validationErrors.size()); // validation error raised for functionref not for iterationParam
+    Assertions.assertEquals(
+        1,
+        validationErrors.size()); // validation error raised for functionref not for iterationParam
   }
 }

From 034b7fcbe0a2f009e2307ebff9cb68116d98ea19 Mon Sep 17 00:00:00 2001
From: Tihomir Surdilovic <tihomir@temporal.io>
Date: Sun, 12 Dec 2021 08:49:13 -0500
Subject: [PATCH 007/109] adding jar plugin

Signed-off-by: Tihomir Surdilovic <tihomir@temporal.io>
---
 pom.xml | 13 +++++++++++++
 1 file changed, 13 insertions(+)

diff --git a/pom.xml b/pom.xml
index 8f3ef74a..9c88d595 100644
--- a/pom.xml
+++ b/pom.xml
@@ -79,6 +79,7 @@
         <version.plantuml>8059</version.plantuml>
         <version.graphviz>0.17.0</version.graphviz>
         <version.fmt-maven-plugin>2.9</version.fmt-maven-plugin>
+        <version.jar.plugin>3.2.0</version.jar.plugin>
         <!-- Checkstyle props -->
         <checkstyle.failOnViolation>true</checkstyle.failOnViolation>
         <checkstyle.header.template><![CDATA[
@@ -290,6 +291,18 @@
                 <artifactId>fmt-maven-plugin</artifactId>
                 <version>${version.fmt-maven-plugin}</version>
             </plugin>
+            <plugin>
+                <groupId>org.apache.maven.plugins</groupId>
+                <artifactId>maven-jar-plugin</artifactId>
+                <version>${version.jar.plugin}</version>
+                <executions>
+                    <execution>
+                        <goals>
+                            <goal>test-jar</goal>
+                        </goals>
+                    </execution>
+                </executions>
+            </plugin>
             <plugin>
                 <groupId>org.apache.maven.plugins</groupId>
                 <artifactId>maven-source-plugin</artifactId>

From cf049fa74f797dadbd43524a9c56f44b8dfbc52d Mon Sep 17 00:00:00 2001
From: Tihomir Surdilovic <tihomir@temporal.io>
Date: Sun, 12 Dec 2021 09:02:38 -0500
Subject: [PATCH 008/109] fixing jar plugin

Signed-off-by: Tihomir Surdilovic <tihomir@temporal.io>
---
 api/pom.xml | 11 +++++++++++
 pom.xml     |  7 -------
 2 files changed, 11 insertions(+), 7 deletions(-)

diff --git a/api/pom.xml b/api/pom.xml
index 6dfbc378..3d060b5d 100644
--- a/api/pom.xml
+++ b/api/pom.xml
@@ -175,6 +175,17 @@
                     </execution>
                 </executions>
             </plugin>
+            <plugin>
+                <groupId>org.apache.maven.plugins</groupId>
+                <artifactId>maven-jar-plugin</artifactId>
+                <executions>
+                    <execution>
+                        <goals>
+                            <goal>test-jar</goal>
+                        </goals>
+                    </execution>
+                </executions>
+            </plugin>
         </plugins>
     </build>
 </project>
diff --git a/pom.xml b/pom.xml
index 9c88d595..cae23fab 100644
--- a/pom.xml
+++ b/pom.xml
@@ -295,13 +295,6 @@
                 <groupId>org.apache.maven.plugins</groupId>
                 <artifactId>maven-jar-plugin</artifactId>
                 <version>${version.jar.plugin}</version>
-                <executions>
-                    <execution>
-                        <goals>
-                            <goal>test-jar</goal>
-                        </goals>
-                    </execution>
-                </executions>
             </plugin>
             <plugin>
                 <groupId>org.apache.maven.plugins</groupId>

From 2d37a622ce5ceaa34134d0f9c700edefaf00f678 Mon Sep 17 00:00:00 2001
From: Tihomir Surdilovic <tihomir@temporal.io>
Date: Sun, 12 Dec 2021 11:54:03 -0500
Subject: [PATCH 009/109] 4.0.1.Final release

Signed-off-by: Tihomir Surdilovic <tihomir@temporal.io>
---
 README.md          | 47 +++++++++++++---------------------------------
 api/pom.xml        |  2 +-
 diagram/pom.xml    |  2 +-
 pom.xml            |  3 +--
 spi/pom.xml        |  2 +-
 utils/pom.xml      |  2 +-
 validation/pom.xml |  2 +-
 7 files changed, 19 insertions(+), 41 deletions(-)

diff --git a/README.md b/README.md
index 3e731d42..8c5b94b6 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.Final](https://github.com/serverlessworkflow/sdk-java/releases/) | [v0.8](https://github.com/serverlessworkflow/specification/tree/0.8.x) |
+| [4.0.1.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
-<repository>
-    <id>oss.sonatype.org-snapshot</id>
-    <url>http://oss.sonatype.org/content/repositories/snapshots</url>
-    <releases>
-        <enabled>false</enabled>
-    </releases>
-    <snapshots>
-        <enabled>true</enabled>
-    </snapshots>
-</repository>
-```
-
-b) Add the following dependencies to your pom.xml `dependencies` section:
+Add the following dependencies to your pom.xml `dependencies` section:
 
 ```xml
 <dependency>
     <groupId>io.serverlessworkflow</groupId>
     <artifactId>serverlessworkflow-api</artifactId>
-    <version>4.0.x</version>
+    <version>4.0.1.Final</version>
 </dependency>
 
 <dependency>
     <groupId>io.serverlessworkflow</groupId>
     <artifactId>serverlessworkflow-spi</artifactId>
-    <version>4.0.x</version>
+    <version>4.0.1.Final</version>
 </dependency>
 
 <dependency>
     <groupId>io.serverlessworkflow</groupId>
     <artifactId>serverlessworkflow-validation</artifactId>
-    <version>4.0.x</version>
+    <version>4.0.1.Final</version>
 </dependency>
 
 <dependency>
     <groupId>io.serverlessworkflow</groupId>
     <artifactId>serverlessworkflow-diagram</artifactId>
-    <version>4.0.x</version>
+    <version>4.0.1.Final</version>
 </dependency>
 
 <dependency>
     <groupId>io.serverlessworkflow</groupId>
     <artifactId>serverlessworkflow-util</artifactId>
-    <version>4.0.x</version>
+    <version>4.0.1.Final</version>
 </dependency>
 ```
 
 #### 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.x")
-implementation("io.serverlessworkflow:serverlessworkflow-spi:4.0.x")
-implementation("io.serverlessworkflow:serverlessworkflow-validation:4.0.x")
-implementation("io.serverlessworkflow:serverlessworkflow-diagram:4.0.x")
-implementation("io.serverlessworkflow:serverlessworkflow-util:4.0.x")
+implementation("io.serverlessworkflow:serverlessworkflow-api:4.0.1.Final")
+implementation("io.serverlessworkflow:serverlessworkflow-spi:4.0.1.Final")
+implementation("io.serverlessworkflow:serverlessworkflow-validation:4.0.1.Final")
+implementation("io.serverlessworkflow:serverlessworkflow-diagram:4.0.1.Final")
+implementation("io.serverlessworkflow:serverlessworkflow-util:4.0.1.Final")
 ```
 
 ### How to Use 
diff --git a/api/pom.xml b/api/pom.xml
index 3d060b5d..2653033e 100644
--- a/api/pom.xml
+++ b/api/pom.xml
@@ -6,7 +6,7 @@
     <parent>
         <groupId>io.serverlessworkflow</groupId>
         <artifactId>serverlessworkflow-parent</artifactId>
-        <version>4.0.x</version>
+        <version>4.0.1.Final</version>
     </parent>
 
     <artifactId>serverlessworkflow-api</artifactId>
diff --git a/diagram/pom.xml b/diagram/pom.xml
index 5cd03836..9529182c 100644
--- a/diagram/pom.xml
+++ b/diagram/pom.xml
@@ -6,7 +6,7 @@
     <parent>
         <groupId>io.serverlessworkflow</groupId>
         <artifactId>serverlessworkflow-parent</artifactId>
-        <version>4.0.x</version>
+        <version>4.0.1.Final</version>
     </parent>
 
     <artifactId>serverlessworkflow-diagram</artifactId>
diff --git a/pom.xml b/pom.xml
index cae23fab..ce1547cd 100644
--- a/pom.xml
+++ b/pom.xml
@@ -5,7 +5,7 @@
 
     <groupId>io.serverlessworkflow</groupId>
     <artifactId>serverlessworkflow-parent</artifactId>
-    <version>4.0.x</version>
+    <version>4.0.1.Final</version>
     <packaging>pom</packaging>
 
     <name>Serverless Workflow :: Parent</name>
@@ -37,7 +37,6 @@
         </developer>
     </developers>
 
-
     <modules>
         <module>api</module>
         <module>spi</module>
diff --git a/spi/pom.xml b/spi/pom.xml
index a2d1532d..b59ca438 100644
--- a/spi/pom.xml
+++ b/spi/pom.xml
@@ -6,7 +6,7 @@
     <parent>
         <groupId>io.serverlessworkflow</groupId>
         <artifactId>serverlessworkflow-parent</artifactId>
-        <version>4.0.x</version>
+        <version>4.0.1.Final</version>
     </parent>
 
     <artifactId>serverlessworkflow-spi</artifactId>
diff --git a/utils/pom.xml b/utils/pom.xml
index 4fab2886..a37ac550 100644
--- a/utils/pom.xml
+++ b/utils/pom.xml
@@ -6,7 +6,7 @@
     <parent>
         <groupId>io.serverlessworkflow</groupId>
         <artifactId>serverlessworkflow-parent</artifactId>
-        <version>4.0.x</version>
+        <version>4.0.1.Final</version>
     </parent>
 
     <artifactId>serverlessworkflow-util</artifactId>
diff --git a/validation/pom.xml b/validation/pom.xml
index 399a0abf..75ba70fe 100644
--- a/validation/pom.xml
+++ b/validation/pom.xml
@@ -6,7 +6,7 @@
     <parent>
         <groupId>io.serverlessworkflow</groupId>
         <artifactId>serverlessworkflow-parent</artifactId>
-        <version>4.0.x</version>
+        <version>4.0.1.Final</version>
     </parent>
 
     <artifactId>serverlessworkflow-validation</artifactId>

From 54c882d06ea6dd08423f5111a368b4e264c3d27e Mon Sep 17 00:00:00 2001
From: Tihomir Surdilovic <tihomir@temporal.io>
Date: Sun, 12 Dec 2021 12:00:30 -0500
Subject: [PATCH 010/109] update to 4.0.x

Signed-off-by: Tihomir Surdilovic <tihomir@temporal.io>
---
 README.md          | 45 +++++++++++++++++++++++++++++++++------------
 api/pom.xml        |  2 +-
 diagram/pom.xml    |  2 +-
 pom.xml            |  2 +-
 spi/pom.xml        |  2 +-
 utils/pom.xml      |  2 +-
 validation/pom.xml |  2 +-
 7 files changed, 39 insertions(+), 18 deletions(-)

diff --git a/README.md b/README.md
index 8c5b94b6..39b5f173 100644
--- a/README.md
+++ b/README.md
@@ -43,50 +43,71 @@ To use it in your projects you can:
 
 #### Maven projects:
 
-Add the following dependencies to your pom.xml `dependencies` section:
+a) Add the following repository to your pom.xml `repositories` section:
+
+```xml
+<repository>
+    <id>oss.sonatype.org-snapshot</id>
+    <url>http://oss.sonatype.org/content/repositories/snapshots</url>
+    <releases>
+        <enabled>false</enabled>
+    </releases>
+    <snapshots>
+        <enabled>true</enabled>
+    </snapshots>
+</repository>
+```
+
+b) Add the following dependencies to your pom.xml `dependencies` section:
 
 ```xml
 <dependency>
     <groupId>io.serverlessworkflow</groupId>
     <artifactId>serverlessworkflow-api</artifactId>
-    <version>4.0.1.Final</version>
+    <version>4.0.x</version>
 </dependency>
 
 <dependency>
     <groupId>io.serverlessworkflow</groupId>
     <artifactId>serverlessworkflow-spi</artifactId>
-    <version>4.0.1.Final</version>
+    <version>4.0.x</version>
 </dependency>
 
 <dependency>
     <groupId>io.serverlessworkflow</groupId>
     <artifactId>serverlessworkflow-validation</artifactId>
-    <version>4.0.1.Final</version>
+    <version>4.0.x</version>
 </dependency>
 
 <dependency>
     <groupId>io.serverlessworkflow</groupId>
     <artifactId>serverlessworkflow-diagram</artifactId>
-    <version>4.0.1.Final</version>
+    <version>4.0.x</version>
 </dependency>
 
 <dependency>
     <groupId>io.serverlessworkflow</groupId>
     <artifactId>serverlessworkflow-util</artifactId>
-    <version>4.0.1.Final</version>
+    <version>4.0.x</version>
 </dependency>
 ```
 
 #### Gradle projects:
 
-Add the following dependencies to your build.gradle `dependencies` section:
+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:
 
 ```text
-implementation("io.serverlessworkflow:serverlessworkflow-api:4.0.1.Final")
-implementation("io.serverlessworkflow:serverlessworkflow-spi:4.0.1.Final")
-implementation("io.serverlessworkflow:serverlessworkflow-validation:4.0.1.Final")
-implementation("io.serverlessworkflow:serverlessworkflow-diagram:4.0.1.Final")
-implementation("io.serverlessworkflow:serverlessworkflow-util:4.0.1.Final")
+implementation("io.serverlessworkflow:serverlessworkflow-api:4.0.x")
+implementation("io.serverlessworkflow:serverlessworkflow-spi:4.0.x")
+implementation("io.serverlessworkflow:serverlessworkflow-validation:4.0.x")
+implementation("io.serverlessworkflow:serverlessworkflow-diagram:4.0.x")
+implementation("io.serverlessworkflow:serverlessworkflow-util:4.0.x")
 ```
 
 ### How to Use 
diff --git a/api/pom.xml b/api/pom.xml
index 2653033e..3d060b5d 100644
--- a/api/pom.xml
+++ b/api/pom.xml
@@ -6,7 +6,7 @@
     <parent>
         <groupId>io.serverlessworkflow</groupId>
         <artifactId>serverlessworkflow-parent</artifactId>
-        <version>4.0.1.Final</version>
+        <version>4.0.x</version>
     </parent>
 
     <artifactId>serverlessworkflow-api</artifactId>
diff --git a/diagram/pom.xml b/diagram/pom.xml
index 9529182c..5cd03836 100644
--- a/diagram/pom.xml
+++ b/diagram/pom.xml
@@ -6,7 +6,7 @@
     <parent>
         <groupId>io.serverlessworkflow</groupId>
         <artifactId>serverlessworkflow-parent</artifactId>
-        <version>4.0.1.Final</version>
+        <version>4.0.x</version>
     </parent>
 
     <artifactId>serverlessworkflow-diagram</artifactId>
diff --git a/pom.xml b/pom.xml
index ce1547cd..c367de45 100644
--- a/pom.xml
+++ b/pom.xml
@@ -5,7 +5,7 @@
 
     <groupId>io.serverlessworkflow</groupId>
     <artifactId>serverlessworkflow-parent</artifactId>
-    <version>4.0.1.Final</version>
+    <version>4.0.x</version>
     <packaging>pom</packaging>
 
     <name>Serverless Workflow :: Parent</name>
diff --git a/spi/pom.xml b/spi/pom.xml
index b59ca438..a2d1532d 100644
--- a/spi/pom.xml
+++ b/spi/pom.xml
@@ -6,7 +6,7 @@
     <parent>
         <groupId>io.serverlessworkflow</groupId>
         <artifactId>serverlessworkflow-parent</artifactId>
-        <version>4.0.1.Final</version>
+        <version>4.0.x</version>
     </parent>
 
     <artifactId>serverlessworkflow-spi</artifactId>
diff --git a/utils/pom.xml b/utils/pom.xml
index a37ac550..4fab2886 100644
--- a/utils/pom.xml
+++ b/utils/pom.xml
@@ -6,7 +6,7 @@
     <parent>
         <groupId>io.serverlessworkflow</groupId>
         <artifactId>serverlessworkflow-parent</artifactId>
-        <version>4.0.1.Final</version>
+        <version>4.0.x</version>
     </parent>
 
     <artifactId>serverlessworkflow-util</artifactId>
diff --git a/validation/pom.xml b/validation/pom.xml
index 75ba70fe..399a0abf 100644
--- a/validation/pom.xml
+++ b/validation/pom.xml
@@ -6,7 +6,7 @@
     <parent>
         <groupId>io.serverlessworkflow</groupId>
         <artifactId>serverlessworkflow-parent</artifactId>
-        <version>4.0.1.Final</version>
+        <version>4.0.x</version>
     </parent>
 
     <artifactId>serverlessworkflow-validation</artifactId>

From 8daef86b2af11411f453a6f5890bf8d1ce70ffc0 Mon Sep 17 00:00:00 2001
From: Tihomir Surdilovic <tihomir@temporal.io>
Date: Tue, 14 Dec 2021 13:04:36 -0500
Subject: [PATCH 011/109] Adding support for annotations prop

Signed-off-by: Tihomir Surdilovic <tihomir@temporal.io>
---
 .../api/serializers/WorkflowSerializer.java        |  4 ++++
 api/src/main/resources/schema/workflow.json        |  8 ++++++++
 .../api/test/MarkupToWorkflowTest.java             | 14 ++++++++++++++
 api/src/test/resources/features/annotations.json   |  6 ++++++
 api/src/test/resources/features/annotations.yml    |  8 ++++++++
 5 files changed, 40 insertions(+)
 create mode 100644 api/src/test/resources/features/annotations.json
 create mode 100644 api/src/test/resources/features/annotations.yml

diff --git a/api/src/main/java/io/serverlessworkflow/api/serializers/WorkflowSerializer.java b/api/src/main/java/io/serverlessworkflow/api/serializers/WorkflowSerializer.java
index b45871fa..dfa94688 100644
--- a/api/src/main/java/io/serverlessworkflow/api/serializers/WorkflowSerializer.java
+++ b/api/src/main/java/io/serverlessworkflow/api/serializers/WorkflowSerializer.java
@@ -63,6 +63,10 @@ public void serialize(Workflow workflow, JsonGenerator gen, SerializerProvider p
       gen.writeStringField("version", workflow.getVersion());
     }
 
+    if (workflow.getAnnotations() != null && !workflow.getAnnotations().isEmpty()) {
+      gen.writeObjectField("annotations", workflow.getAnnotations());
+    }
+
     if (workflow.getDataInputSchema() != null) {
       if (workflow.getDataInputSchema().getSchema() != null
           && workflow.getDataInputSchema().getSchema().length() > 0
diff --git a/api/src/main/resources/schema/workflow.json b/api/src/main/resources/schema/workflow.json
index 19164ca5..a3bb762b 100644
--- a/api/src/main/resources/schema/workflow.json
+++ b/api/src/main/resources/schema/workflow.json
@@ -27,6 +27,14 @@
       "type": "string",
       "description": "Workflow version"
     },
+    "annotations": {
+      "type": "array",
+      "description": "List of helpful terms describing the workflows intended purpose, subject areas, or other important qualities",
+      "minItems": 1,
+      "items": {
+        "type": "string"
+      }
+    },
     "dataInputSchema": {
       "$ref": "datainputschema/datainputschema.json",
       "description": "Workflow data input schema"
diff --git a/api/src/test/java/io/serverlessworkflow/api/test/MarkupToWorkflowTest.java b/api/src/test/java/io/serverlessworkflow/api/test/MarkupToWorkflowTest.java
index 2c6da083..e87532df 100644
--- a/api/src/test/java/io/serverlessworkflow/api/test/MarkupToWorkflowTest.java
+++ b/api/src/test/java/io/serverlessworkflow/api/test/MarkupToWorkflowTest.java
@@ -838,4 +838,18 @@ public void testFunctionInvoke(String workflowLocation) {
     assertNotNull(action3.getEventRef().getInvoke());
     assertEquals(EventRef.Invoke.ASYNC, action3.getEventRef().getInvoke());
   }
+
+  @ParameterizedTest
+  @ValueSource(strings = {"/features/annotations.json", "/features/annotations.yml"})
+  public void testAnnotations(String workflowLocation) {
+    Workflow workflow = Workflow.fromSource(WorkflowTestUtils.readWorkflowFile(workflowLocation));
+
+    assertNotNull(workflow);
+    assertNotNull(workflow.getId());
+    assertNotNull(workflow.getName());
+
+    assertNotNull(workflow.getAnnotations());
+    List<String> annotations = workflow.getAnnotations();
+    assertEquals(4, annotations.size());
+  }
 }
diff --git a/api/src/test/resources/features/annotations.json b/api/src/test/resources/features/annotations.json
new file mode 100644
index 00000000..90ed6dd1
--- /dev/null
+++ b/api/src/test/resources/features/annotations.json
@@ -0,0 +1,6 @@
+{
+  "id" : "test-workflow",
+  "name" : "test-workflow-name",
+  "version" : "1.0",
+  "annotations": ["a", "b", "c", "d"]
+}
\ No newline at end of file
diff --git a/api/src/test/resources/features/annotations.yml b/api/src/test/resources/features/annotations.yml
new file mode 100644
index 00000000..54e359ae
--- /dev/null
+++ b/api/src/test/resources/features/annotations.yml
@@ -0,0 +1,8 @@
+id: test-workflow
+name: test-workflow-name
+version: '1.0'
+annotations:
+  - a
+  - b
+  - c
+  - d

From 5be6e37c1c70fd9971de4f95db04fe7fecf6f664 Mon Sep 17 00:00:00 2001
From: Maciej Swiderski <swiderski.maciej@gmail.com>
Date: Mon, 10 Jan 2022 14:55:31 +0100
Subject: [PATCH 012/109] allow to use custom workflow template for generatig
 diagrams

Signed-off-by: Maciej Swiderski <swiderski.maciej@gmail.com>
---
 README.md                                     | 16 ++++++
 .../api/interfaces/WorkflowDiagram.java       |  2 +
 .../diagram/WorkflowDiagramImpl.java          | 13 ++++-
 .../diagram/utils/WorkflowToPlantuml.java     |  5 +-
 .../CustomTemplateWorkflowDiagramTest.java    | 50 +++++++++++++++++++
 .../templates/plantuml/custom-template.txt    | 46 +++++++++++++++++
 6 files changed, 129 insertions(+), 3 deletions(-)
 create mode 100644 diagram/src/test/java/io/serverlessworkflow/diagram/test/CustomTemplateWorkflowDiagramTest.java
 create mode 100644 diagram/src/test/resources/templates/plantuml/custom-template.txt

diff --git a/README.md b/README.md
index 39b5f173..11aaabff 100644
--- a/README.md
+++ b/README.md
@@ -267,6 +267,22 @@ String diagramSVG = workflowDiagram.getSvgDiagram();
 `diagramSVG` includes the diagram SVG source which you can then decide to save to a file, 
 print, or process further.
 
+In case default visualization of the workflow is not sufficient you can provide custom workflow template to be 
+used while generating the SVG file. Easiest is to start off from the default template and customize it to your needs.
+
+Custom template must be on the classpath in `templates/plantuml` directory and must use `.txt` extension. Next
+template is set on `WorkflowDiagram` instance as shown below.
+
+``` java
+Workflow workflow = Workflow.fromSource(source);
+
+WorkflowDiagram workflowDiagram = new WorkflowDiagramImpl();
+workflowDiagram.setWorkflow(workflow);
+workflowDiagram.setTemplate("custom-template");
+
+String diagramSVG = workflowDiagram.getSvgDiagram();
+```
+
 By default the diagram legend is now shown. If you want to enable it you can do:
 
 ``` java
diff --git a/api/src/main/java/io/serverlessworkflow/api/interfaces/WorkflowDiagram.java b/api/src/main/java/io/serverlessworkflow/api/interfaces/WorkflowDiagram.java
index 6bba312c..0c62d4d2 100644
--- a/api/src/main/java/io/serverlessworkflow/api/interfaces/WorkflowDiagram.java
+++ b/api/src/main/java/io/serverlessworkflow/api/interfaces/WorkflowDiagram.java
@@ -22,6 +22,8 @@ public interface WorkflowDiagram {
 
   WorkflowDiagram setSource(String source);
 
+  WorkflowDiagram setTemplate(String template);
+
   String getSvgDiagram() throws Exception;
 
   WorkflowDiagram showLegend(boolean showLegend);
diff --git a/diagram/src/main/java/io/serverlessworkflow/diagram/WorkflowDiagramImpl.java b/diagram/src/main/java/io/serverlessworkflow/diagram/WorkflowDiagramImpl.java
index 5a2d4028..1fb5e656 100644
--- a/diagram/src/main/java/io/serverlessworkflow/diagram/WorkflowDiagramImpl.java
+++ b/diagram/src/main/java/io/serverlessworkflow/diagram/WorkflowDiagramImpl.java
@@ -26,9 +26,14 @@
 
 public class WorkflowDiagramImpl implements WorkflowDiagram {
 
+  public static final String DEFAULT_TEMPLATE = "workflow-template";
+
   @SuppressWarnings("unused")
   private String source;
 
+  @SuppressWarnings("unused")
+  private String template = DEFAULT_TEMPLATE;
+
   private Workflow workflow;
   private boolean showLegend = false;
 
@@ -46,12 +51,18 @@ public WorkflowDiagram setSource(String source) {
     return this;
   }
 
+  @Override
+  public WorkflowDiagram setTemplate(String template) {
+    this.template = template;
+    return this;
+  }
+
   @Override
   public String getSvgDiagram() throws Exception {
     if (workflow == null) {
       throw new IllegalAccessException("Unable to get diagram - no workflow set.");
     }
-    String diagramSource = WorkflowToPlantuml.convert(workflow, showLegend);
+    String diagramSource = WorkflowToPlantuml.convert(template, workflow, showLegend);
     SourceStringReader reader = new SourceStringReader(diagramSource);
     final ByteArrayOutputStream os = new ByteArrayOutputStream();
     reader.generateImage(os, new FileFormatOption(FileFormat.SVG));
diff --git a/diagram/src/main/java/io/serverlessworkflow/diagram/utils/WorkflowToPlantuml.java b/diagram/src/main/java/io/serverlessworkflow/diagram/utils/WorkflowToPlantuml.java
index acc112b8..956bcbeb 100644
--- a/diagram/src/main/java/io/serverlessworkflow/diagram/utils/WorkflowToPlantuml.java
+++ b/diagram/src/main/java/io/serverlessworkflow/diagram/utils/WorkflowToPlantuml.java
@@ -22,11 +22,12 @@
 import org.thymeleaf.context.Context;
 
 public class WorkflowToPlantuml {
-  public static String convert(Workflow workflow, boolean showLegend) {
+
+  public static String convert(String template, Workflow workflow, boolean showLegend) {
     TemplateEngine plantUmlTemplateEngine = ThymeleafConfig.templateEngine;
     Context context = new Context();
     context.setVariable("diagram", new WorkflowDiagramModel(workflow, showLegend));
 
-    return plantUmlTemplateEngine.process("workflow-template", context);
+    return plantUmlTemplateEngine.process(template, context);
   }
 }
diff --git a/diagram/src/test/java/io/serverlessworkflow/diagram/test/CustomTemplateWorkflowDiagramTest.java b/diagram/src/test/java/io/serverlessworkflow/diagram/test/CustomTemplateWorkflowDiagramTest.java
new file mode 100644
index 00000000..530d4b8c
--- /dev/null
+++ b/diagram/src/test/java/io/serverlessworkflow/diagram/test/CustomTemplateWorkflowDiagramTest.java
@@ -0,0 +1,50 @@
+/*
+ * Copyright 2020-Present The Serverless Workflow Specification Authors
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package io.serverlessworkflow.diagram.test;
+
+import static org.junit.jupiter.api.Assertions.assertNotNull;
+
+import io.serverlessworkflow.api.Workflow;
+import io.serverlessworkflow.api.interfaces.WorkflowDiagram;
+import io.serverlessworkflow.diagram.WorkflowDiagramImpl;
+import io.serverlessworkflow.diagram.test.utils.DiagramTestUtils;
+import org.junit.jupiter.api.Assertions;
+import org.junit.jupiter.params.ParameterizedTest;
+import org.junit.jupiter.params.provider.ValueSource;
+
+public class CustomTemplateWorkflowDiagramTest {
+
+  @ParameterizedTest
+  @ValueSource(strings = {"/examples/applicantrequest.json", "/examples/applicantrequest.yml"})
+  public void testSpecExamplesParsing(String workflowLocation) throws Exception {
+
+    Workflow workflow = Workflow.fromSource(DiagramTestUtils.readWorkflowFile(workflowLocation));
+
+    assertNotNull(workflow);
+    assertNotNull(workflow.getId());
+    assertNotNull(workflow.getName());
+    assertNotNull(workflow.getStates());
+
+    WorkflowDiagram workflowDiagram =
+        new WorkflowDiagramImpl().setWorkflow(workflow).setTemplate("custom-template");
+
+    String diagramSVG = workflowDiagram.getSvgDiagram();
+
+    Assertions.assertNotNull(diagramSVG);
+    // custom template uses #0000FF as start node color
+    Assertions.assertTrue(diagramSVG.contains("#0000FF"));
+  }
+}
diff --git a/diagram/src/test/resources/templates/plantuml/custom-template.txt b/diagram/src/test/resources/templates/plantuml/custom-template.txt
new file mode 100644
index 00000000..c1794f55
--- /dev/null
+++ b/diagram/src/test/resources/templates/plantuml/custom-template.txt
@@ -0,0 +1,46 @@
+@startuml
+skinparam backgroundColor White
+skinparam legendBackgroundColor White
+skinparam legendBorderColor White
+skinparam state {
+  StartColor #0000FF
+  EndColor Orange
+  BackgroundColor GhostWhite
+  BackgroundColor<< workflow >> White
+  BorderColor Black
+  ArrowColor Black
+
+  BorderColor<< event >> #7fe5f0
+  BorderColor<< operation >> #bada55
+  BorderColor<< switch >> #92a0f2
+  BorderColor<< sleep >> #b83b5e
+  BorderColor<< parallel >> #6a2c70
+  BorderColor<< inject >> #1e5f74
+  BorderColor<< foreach >> #931a25
+  BorderColor<< callback >> #ffcb8e
+}
+state "[(${diagram.title})]" as workflow << workflow >> {
+
+[# th:each="stateDef : ${diagram.modelStateDefs}" ]
+[(${stateDef.toString()})]
+[/]
+
+[# th:each="state : ${diagram.modelStates}" ]
+[(${state.toString()})]
+[/]
+
+[# th:each="connection : ${diagram.modelConnections}" ]
+[(${connection.toString()})]
+[/]
+
+}
+
+[# th:if="${diagram.showLegend}" ]
+legend center
+State Types and Border Colors:
+| Event | Operation | Switch | Sleep | Parallel | Inject | ForEach | CallBack |
+|<#7fe5f0>|<#bada55>|<#92a0f2>|<#b83b5e>|<#6a2c70>|<#1e5f74>|<#931a25>|<#ffcb8e>|
+endlegend
+[/]
+
+@enduml
\ No newline at end of file

From 33b2e4e7e65079b3ea8e1afb90077b19fe2b8c63 Mon Sep 17 00:00:00 2001
From: Tihomir Surdilovic <tihomir@temporal.io>
Date: Tue, 11 Jan 2022 15:20:18 -0500
Subject: [PATCH 013/109] small change to diagram custom template test

Signed-off-by: Tihomir Surdilovic <tihomir@temporal.io>
---
 .../diagram/test/CustomTemplateWorkflowDiagramTest.java       | 2 +-
 .../src/test/resources/templates/plantuml/custom-template.txt | 4 ++--
 2 files changed, 3 insertions(+), 3 deletions(-)

diff --git a/diagram/src/test/java/io/serverlessworkflow/diagram/test/CustomTemplateWorkflowDiagramTest.java b/diagram/src/test/java/io/serverlessworkflow/diagram/test/CustomTemplateWorkflowDiagramTest.java
index 530d4b8c..870e6124 100644
--- a/diagram/src/test/java/io/serverlessworkflow/diagram/test/CustomTemplateWorkflowDiagramTest.java
+++ b/diagram/src/test/java/io/serverlessworkflow/diagram/test/CustomTemplateWorkflowDiagramTest.java
@@ -45,6 +45,6 @@ public void testSpecExamplesParsing(String workflowLocation) throws Exception {
 
     Assertions.assertNotNull(diagramSVG);
     // custom template uses #0000FF as start node color
-    Assertions.assertTrue(diagramSVG.contains("#0000FF"));
+    Assertions.assertTrue(diagramSVG.contains("customcolor"));
   }
 }
diff --git a/diagram/src/test/resources/templates/plantuml/custom-template.txt b/diagram/src/test/resources/templates/plantuml/custom-template.txt
index c1794f55..e162afc5 100644
--- a/diagram/src/test/resources/templates/plantuml/custom-template.txt
+++ b/diagram/src/test/resources/templates/plantuml/custom-template.txt
@@ -3,7 +3,7 @@ skinparam backgroundColor White
 skinparam legendBackgroundColor White
 skinparam legendBorderColor White
 skinparam state {
-  StartColor #0000FF
+  StartColor Green
   EndColor Orange
   BackgroundColor GhostWhite
   BackgroundColor<< workflow >> White
@@ -39,7 +39,7 @@ state "[(${diagram.title})]" as workflow << workflow >> {
 legend center
 State Types and Border Colors:
 | Event | Operation | Switch | Sleep | Parallel | Inject | ForEach | CallBack |
-|<#7fe5f0>|<#bada55>|<#92a0f2>|<#b83b5e>|<#6a2c70>|<#1e5f74>|<#931a25>|<#ffcb8e>|
+|<#7fe5f0>|<#bada55>|<#92a0f2>|<#b83b5e>|<#6a2c70>|<#1e5f74>|<#931a25>|<customcolor>|
 endlegend
 [/]
 

From 3ab22f523b85dba40b938231ee5c7bd2d7ad0b92 Mon Sep 17 00:00:00 2001
From: Tihomir Surdilovic <tihomir@temporal.io>
Date: Tue, 11 Jan 2022 15:24:32 -0500
Subject: [PATCH 014/109] fix

Signed-off-by: Tihomir Surdilovic <tihomir@temporal.io>
---
 .../diagram/test/CustomTemplateWorkflowDiagramTest.java    | 7 +++++--
 1 file changed, 5 insertions(+), 2 deletions(-)

diff --git a/diagram/src/test/java/io/serverlessworkflow/diagram/test/CustomTemplateWorkflowDiagramTest.java b/diagram/src/test/java/io/serverlessworkflow/diagram/test/CustomTemplateWorkflowDiagramTest.java
index 870e6124..5c9b7038 100644
--- a/diagram/src/test/java/io/serverlessworkflow/diagram/test/CustomTemplateWorkflowDiagramTest.java
+++ b/diagram/src/test/java/io/serverlessworkflow/diagram/test/CustomTemplateWorkflowDiagramTest.java
@@ -39,12 +39,15 @@ public void testSpecExamplesParsing(String workflowLocation) throws Exception {
     assertNotNull(workflow.getStates());
 
     WorkflowDiagram workflowDiagram =
-        new WorkflowDiagramImpl().setWorkflow(workflow).setTemplate("custom-template");
+        new WorkflowDiagramImpl()
+            .showLegend(true)
+            .setWorkflow(workflow)
+            .setTemplate("custom-template");
 
     String diagramSVG = workflowDiagram.getSvgDiagram();
 
     Assertions.assertNotNull(diagramSVG);
-    // custom template uses #0000FF as start node color
+    // custom template uses customcolor in the legend
     Assertions.assertTrue(diagramSVG.contains("customcolor"));
   }
 }

From 35f84cb39c84d45b5ebb2e22ec60d79790ae90f6 Mon Sep 17 00:00:00 2001
From: Tihomir Surdilovic <tihomir@temporal.io>
Date: Sat, 29 Jan 2022 21:46:07 -0500
Subject: [PATCH 015/109] [4.0.x] 4.0.2.Final release setup

Signed-off-by: Tihomir Surdilovic <tihomir@temporal.io>
---
 README.md          | 22 +++++++++++-----------
 api/pom.xml        |  2 +-
 diagram/pom.xml    |  2 +-
 pom.xml            |  2 +-
 spi/pom.xml        |  2 +-
 utils/pom.xml      |  2 +-
 validation/pom.xml |  2 +-
 7 files changed, 17 insertions(+), 17 deletions(-)

diff --git a/README.md b/README.md
index 11aaabff..d7e6ac9e 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.1.Final](https://github.com/serverlessworkflow/sdk-java/releases/) | [v0.8](https://github.com/serverlessworkflow/specification/tree/0.8.x) |
+| [4.0.2.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) |
@@ -64,31 +64,31 @@ b) Add the following dependencies to your pom.xml `dependencies` section:
 <dependency>
     <groupId>io.serverlessworkflow</groupId>
     <artifactId>serverlessworkflow-api</artifactId>
-    <version>4.0.x</version>
+    <version>4.0.2.Final</version>
 </dependency>
 
 <dependency>
     <groupId>io.serverlessworkflow</groupId>
     <artifactId>serverlessworkflow-spi</artifactId>
-    <version>4.0.x</version>
+    <version>4.0.2.Final</version>
 </dependency>
 
 <dependency>
     <groupId>io.serverlessworkflow</groupId>
     <artifactId>serverlessworkflow-validation</artifactId>
-    <version>4.0.x</version>
+    <version>4.0.2.Final</version>
 </dependency>
 
 <dependency>
     <groupId>io.serverlessworkflow</groupId>
     <artifactId>serverlessworkflow-diagram</artifactId>
-    <version>4.0.x</version>
+    <version>4.0.2.Final</version>
 </dependency>
 
 <dependency>
     <groupId>io.serverlessworkflow</groupId>
     <artifactId>serverlessworkflow-util</artifactId>
-    <version>4.0.x</version>
+    <version>4.0.2.Final</version>
 </dependency>
 ```
 
@@ -103,11 +103,11 @@ 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:4.0.x")
-implementation("io.serverlessworkflow:serverlessworkflow-spi:4.0.x")
-implementation("io.serverlessworkflow:serverlessworkflow-validation:4.0.x")
-implementation("io.serverlessworkflow:serverlessworkflow-diagram:4.0.x")
-implementation("io.serverlessworkflow:serverlessworkflow-util:4.0.x")
+implementation("io.serverlessworkflow:serverlessworkflow-api:4.0.2.Final")
+implementation("io.serverlessworkflow:serverlessworkflow-spi:4.0.2.Final")
+implementation("io.serverlessworkflow:serverlessworkflow-validation:4.0.2.Final")
+implementation("io.serverlessworkflow:serverlessworkflow-diagram:4.0.2.Final")
+implementation("io.serverlessworkflow:serverlessworkflow-util:4.0.2.Final")
 ```
 
 ### How to Use 
diff --git a/api/pom.xml b/api/pom.xml
index 3d060b5d..15e211fa 100644
--- a/api/pom.xml
+++ b/api/pom.xml
@@ -6,7 +6,7 @@
     <parent>
         <groupId>io.serverlessworkflow</groupId>
         <artifactId>serverlessworkflow-parent</artifactId>
-        <version>4.0.x</version>
+        <version>4.0.2.Final</version>
     </parent>
 
     <artifactId>serverlessworkflow-api</artifactId>
diff --git a/diagram/pom.xml b/diagram/pom.xml
index 5cd03836..fa08c9d9 100644
--- a/diagram/pom.xml
+++ b/diagram/pom.xml
@@ -6,7 +6,7 @@
     <parent>
         <groupId>io.serverlessworkflow</groupId>
         <artifactId>serverlessworkflow-parent</artifactId>
-        <version>4.0.x</version>
+        <version>4.0.2.Final</version>
     </parent>
 
     <artifactId>serverlessworkflow-diagram</artifactId>
diff --git a/pom.xml b/pom.xml
index c367de45..24599dc7 100644
--- a/pom.xml
+++ b/pom.xml
@@ -5,7 +5,7 @@
 
     <groupId>io.serverlessworkflow</groupId>
     <artifactId>serverlessworkflow-parent</artifactId>
-    <version>4.0.x</version>
+    <version>4.0.2.Final</version>
     <packaging>pom</packaging>
 
     <name>Serverless Workflow :: Parent</name>
diff --git a/spi/pom.xml b/spi/pom.xml
index a2d1532d..befd8210 100644
--- a/spi/pom.xml
+++ b/spi/pom.xml
@@ -6,7 +6,7 @@
     <parent>
         <groupId>io.serverlessworkflow</groupId>
         <artifactId>serverlessworkflow-parent</artifactId>
-        <version>4.0.x</version>
+        <version>4.0.2.Final</version>
     </parent>
 
     <artifactId>serverlessworkflow-spi</artifactId>
diff --git a/utils/pom.xml b/utils/pom.xml
index 4fab2886..99887fdc 100644
--- a/utils/pom.xml
+++ b/utils/pom.xml
@@ -6,7 +6,7 @@
     <parent>
         <groupId>io.serverlessworkflow</groupId>
         <artifactId>serverlessworkflow-parent</artifactId>
-        <version>4.0.x</version>
+        <version>4.0.2.Final</version>
     </parent>
 
     <artifactId>serverlessworkflow-util</artifactId>
diff --git a/validation/pom.xml b/validation/pom.xml
index 399a0abf..d50adf92 100644
--- a/validation/pom.xml
+++ b/validation/pom.xml
@@ -6,7 +6,7 @@
     <parent>
         <groupId>io.serverlessworkflow</groupId>
         <artifactId>serverlessworkflow-parent</artifactId>
-        <version>4.0.x</version>
+        <version>4.0.2.Final</version>
     </parent>
 
     <artifactId>serverlessworkflow-validation</artifactId>

From c913ff87fde7ac93b9d5e8a2854a1f84d6d890c8 Mon Sep 17 00:00:00 2001
From: Tihomir Surdilovic <tihomir@temporal.io>
Date: Sat, 29 Jan 2022 22:01:37 -0500
Subject: [PATCH 016/109] [4.0.x] update 4.0.x

Signed-off-by: Tihomir Surdilovic <tihomir@temporal.io>
---
 api/pom.xml        | 2 +-
 diagram/pom.xml    | 2 +-
 pom.xml            | 2 +-
 spi/pom.xml        | 2 +-
 utils/pom.xml      | 2 +-
 validation/pom.xml | 2 +-
 6 files changed, 6 insertions(+), 6 deletions(-)

diff --git a/api/pom.xml b/api/pom.xml
index 15e211fa..3d060b5d 100644
--- a/api/pom.xml
+++ b/api/pom.xml
@@ -6,7 +6,7 @@
     <parent>
         <groupId>io.serverlessworkflow</groupId>
         <artifactId>serverlessworkflow-parent</artifactId>
-        <version>4.0.2.Final</version>
+        <version>4.0.x</version>
     </parent>
 
     <artifactId>serverlessworkflow-api</artifactId>
diff --git a/diagram/pom.xml b/diagram/pom.xml
index fa08c9d9..5cd03836 100644
--- a/diagram/pom.xml
+++ b/diagram/pom.xml
@@ -6,7 +6,7 @@
     <parent>
         <groupId>io.serverlessworkflow</groupId>
         <artifactId>serverlessworkflow-parent</artifactId>
-        <version>4.0.2.Final</version>
+        <version>4.0.x</version>
     </parent>
 
     <artifactId>serverlessworkflow-diagram</artifactId>
diff --git a/pom.xml b/pom.xml
index 24599dc7..c367de45 100644
--- a/pom.xml
+++ b/pom.xml
@@ -5,7 +5,7 @@
 
     <groupId>io.serverlessworkflow</groupId>
     <artifactId>serverlessworkflow-parent</artifactId>
-    <version>4.0.2.Final</version>
+    <version>4.0.x</version>
     <packaging>pom</packaging>
 
     <name>Serverless Workflow :: Parent</name>
diff --git a/spi/pom.xml b/spi/pom.xml
index befd8210..a2d1532d 100644
--- a/spi/pom.xml
+++ b/spi/pom.xml
@@ -6,7 +6,7 @@
     <parent>
         <groupId>io.serverlessworkflow</groupId>
         <artifactId>serverlessworkflow-parent</artifactId>
-        <version>4.0.2.Final</version>
+        <version>4.0.x</version>
     </parent>
 
     <artifactId>serverlessworkflow-spi</artifactId>
diff --git a/utils/pom.xml b/utils/pom.xml
index 99887fdc..4fab2886 100644
--- a/utils/pom.xml
+++ b/utils/pom.xml
@@ -6,7 +6,7 @@
     <parent>
         <groupId>io.serverlessworkflow</groupId>
         <artifactId>serverlessworkflow-parent</artifactId>
-        <version>4.0.2.Final</version>
+        <version>4.0.x</version>
     </parent>
 
     <artifactId>serverlessworkflow-util</artifactId>
diff --git a/validation/pom.xml b/validation/pom.xml
index d50adf92..399a0abf 100644
--- a/validation/pom.xml
+++ b/validation/pom.xml
@@ -6,7 +6,7 @@
     <parent>
         <groupId>io.serverlessworkflow</groupId>
         <artifactId>serverlessworkflow-parent</artifactId>
-        <version>4.0.2.Final</version>
+        <version>4.0.x</version>
     </parent>
 
     <artifactId>serverlessworkflow-validation</artifactId>

From f65e235aa8bc90754a1b374b741b2bb2f81208c5 Mon Sep 17 00:00:00 2001
From: Tihomir Surdilovic <tihomir@temporal.io>
Date: Mon, 21 Mar 2022 17:24:24 -0400
Subject: [PATCH 017/109] Add missing dataOnly prop to eventDef

Signed-off-by: Tihomir Surdilovic <tihomir@temporal.io>
---
 .../resources/schema/events/eventdef.json     |  5 ++
 .../api/test/MarkupToWorkflowTest.java        | 23 ++++++
 .../resources/features/eventdefdataonly.json  | 73 +++++++++++++++++++
 .../resources/features/eventdefdataonly.yml   | 41 +++++++++++
 4 files changed, 142 insertions(+)
 create mode 100644 api/src/test/resources/features/eventdefdataonly.json
 create mode 100644 api/src/test/resources/features/eventdefdataonly.yml

diff --git a/api/src/main/resources/schema/events/eventdef.json b/api/src/main/resources/schema/events/eventdef.json
index 6670b856..a585f782 100644
--- a/api/src/main/resources/schema/events/eventdef.json
+++ b/api/src/main/resources/schema/events/eventdef.json
@@ -24,6 +24,11 @@
         "$ref": "../correlation/correlationdef.json"
       }
     },
+    "dataOnly": {
+      "type": "boolean",
+      "default": true,
+      "description": "If `true`, only the Event payload is accessible to consuming Workflow states. If `false`, both event payload and context attributes should be accessible "
+    },
     "kind": {
       "type" : "string",
       "enum": ["consumed", "produced"],
diff --git a/api/src/test/java/io/serverlessworkflow/api/test/MarkupToWorkflowTest.java b/api/src/test/java/io/serverlessworkflow/api/test/MarkupToWorkflowTest.java
index e87532df..e86ae895 100644
--- a/api/src/test/java/io/serverlessworkflow/api/test/MarkupToWorkflowTest.java
+++ b/api/src/test/java/io/serverlessworkflow/api/test/MarkupToWorkflowTest.java
@@ -25,6 +25,7 @@
 import io.serverlessworkflow.api.datainputschema.DataInputSchema;
 import io.serverlessworkflow.api.defaultdef.DefaultConditionDefinition;
 import io.serverlessworkflow.api.end.End;
+import io.serverlessworkflow.api.events.EventDefinition;
 import io.serverlessworkflow.api.events.EventRef;
 import io.serverlessworkflow.api.functions.FunctionDefinition;
 import io.serverlessworkflow.api.functions.FunctionRef;
@@ -39,6 +40,7 @@
 import io.serverlessworkflow.api.test.utils.WorkflowTestUtils;
 import io.serverlessworkflow.api.timeouts.WorkflowExecTimeout;
 import io.serverlessworkflow.api.workflow.Constants;
+import io.serverlessworkflow.api.workflow.Events;
 import io.serverlessworkflow.api.workflow.Retries;
 import io.serverlessworkflow.api.workflow.Secrets;
 import java.util.List;
@@ -852,4 +854,25 @@ public void testAnnotations(String workflowLocation) {
     List<String> annotations = workflow.getAnnotations();
     assertEquals(4, annotations.size());
   }
+
+  @ParameterizedTest
+  @ValueSource(strings = {"/features/eventdefdataonly.json", "/features/eventdefdataonly.yml"})
+  public void testEventDefDataOnly(String workflowLocation) {
+    Workflow workflow = Workflow.fromSource(WorkflowTestUtils.readWorkflowFile(workflowLocation));
+
+    assertNotNull(workflow);
+    assertNotNull(workflow.getId());
+    assertNotNull(workflow.getName());
+
+    assertNotNull(workflow.getEvents());
+    Events events = workflow.getEvents();
+    assertNotNull(workflow.getEvents().getEventDefs());
+    assertEquals(2, events.getEventDefs().size());
+    EventDefinition eventDefOne = events.getEventDefs().get(0);
+    EventDefinition eventDefTwo = events.getEventDefs().get(1);
+    assertEquals("visaApprovedEvent", eventDefOne.getName());
+    assertFalse(eventDefOne.isDataOnly());
+    assertEquals("visaRejectedEvent", eventDefTwo.getName());
+    assertTrue(eventDefTwo.isDataOnly());
+  }
 }
diff --git a/api/src/test/resources/features/eventdefdataonly.json b/api/src/test/resources/features/eventdefdataonly.json
new file mode 100644
index 00000000..a181b864
--- /dev/null
+++ b/api/src/test/resources/features/eventdefdataonly.json
@@ -0,0 +1,73 @@
+{
+  "id": "eventdefdataonly",
+  "version": "1.0",
+  "specVersion": "0.8",
+  "name": "Event Definition Data Only Test",
+  "description": "Event Definition Data Only Test",
+  "start": "CheckVisaStatus",
+  "events": [
+    {
+      "name": "visaApprovedEvent",
+      "type": "VisaApproved",
+      "source": "visaCheckSource",
+      "dataOnly": false
+    },
+    {
+      "name": "visaRejectedEvent",
+      "type": "VisaRejected",
+      "source": "visaCheckSource"
+    }
+  ],
+  "states":[
+    {
+      "name":"CheckVisaStatus",
+      "type":"switch",
+      "eventConditions": [
+        {
+          "eventRef": "visaApprovedEvent",
+          "transition": "HandleApprovedVisa"
+        },
+        {
+          "eventRef": "visaRejectedEvent",
+          "transition": "HandleRejectedVisa"
+        }
+      ],
+      "timeouts": {
+        "eventTimeout": "PT1H"
+      },
+      "defaultCondition": {
+        "transition": "HandleNoVisaDecision"
+      }
+    },
+    {
+      "name": "HandleApprovedVisa",
+      "type": "operation",
+      "actions": [
+        {
+          "subFlowRef": "handleApprovedVisaWorkflowID"
+        }
+      ],
+      "end": true
+    },
+    {
+      "name": "HandleRejectedVisa",
+      "type": "operation",
+      "actions": [
+        {
+          "subFlowRef": "handleRejectedVisaWorkflowID"
+        }
+      ],
+      "end": true
+    },
+    {
+      "name": "HandleNoVisaDecision",
+      "type": "operation",
+      "actions": [
+        {
+          "subFlowRef": "handleNoVisaDecisionWorkflowId"
+        }
+      ],
+      "end": true
+    }
+  ]
+}
\ No newline at end of file
diff --git a/api/src/test/resources/features/eventdefdataonly.yml b/api/src/test/resources/features/eventdefdataonly.yml
new file mode 100644
index 00000000..e67a9ede
--- /dev/null
+++ b/api/src/test/resources/features/eventdefdataonly.yml
@@ -0,0 +1,41 @@
+id: eventdefdataonly
+version: '1.0'
+specVersion: '0.8'
+name: Event Definition Data Only Test
+description: Event Definition Data Only Test
+start: CheckVisaStatus
+events:
+  - name: visaApprovedEvent
+    type: VisaApproved
+    source: visaCheckSource
+    dataOnly: false
+  - name: visaRejectedEvent
+    type: VisaRejected
+    source: visaCheckSource
+states:
+  - name: CheckVisaStatus
+    type: switch
+    eventConditions:
+      - eventRef: visaApprovedEvent
+        transition: HandleApprovedVisa
+      - eventRef: visaRejectedEvent
+        transition: HandleRejectedVisa
+    timeouts:
+      eventTimeout: PT1H
+    defaultCondition:
+      transition: HandleNoVisaDecision
+  - name: HandleApprovedVisa
+    type: operation
+    actions:
+      - subFlowRef: handleApprovedVisaWorkflowID
+    end: true
+  - name: HandleRejectedVisa
+    type: operation
+    actions:
+      - subFlowRef: handleRejectedVisaWorkflowID
+    end: true
+  - name: HandleNoVisaDecision
+    type: operation
+    actions:
+      - subFlowRef: handleNoVisaDecisionWorkflowId
+    end: true

From cd4f9a67bccc0b2ee65374a08ab10859311789f5 Mon Sep 17 00:00:00 2001
From: Ricardo Zanini <zanini@redhat.com>
Date: Tue, 29 Mar 2022 17:23:05 -0300
Subject: [PATCH 018/109] Auth Workflow attribute supposed to be an array

Signed-off-by: Ricardo Zanini <zanini@redhat.com>
---
 .../api/deserializers/AuthDeserializer.java   | 103 ++++++++++++++++++
 .../api/mapper/WorkflowModule.java            |   1 +
 .../api/serializers/WorkflowSerializer.java   |   4 +-
 .../serverlessworkflow/api/workflow/Auth.java |  57 ++++++++++
 api/src/main/resources/schema/workflow.json   |   4 +-
 .../api/test/MarkupToWorkflowTest.java        |   6 +-
 .../api/test/WorkflowToMarkupTest.java        |  35 +++---
 .../test/resources/features/authbasic.json    |  22 ++--
 api/src/test/resources/features/authbasic.yml |  10 +-
 .../test/resources/features/authbearer.json   |  20 ++--
 .../test/resources/features/authbearer.yml    |   8 +-
 .../test/resources/features/authoauth.json    |   4 +-
 api/src/test/resources/features/authoauth.yml |  14 +--
 13 files changed, 230 insertions(+), 58 deletions(-)
 create mode 100644 api/src/main/java/io/serverlessworkflow/api/deserializers/AuthDeserializer.java
 create mode 100644 api/src/main/java/io/serverlessworkflow/api/workflow/Auth.java

diff --git a/api/src/main/java/io/serverlessworkflow/api/deserializers/AuthDeserializer.java b/api/src/main/java/io/serverlessworkflow/api/deserializers/AuthDeserializer.java
new file mode 100644
index 00000000..364d09a2
--- /dev/null
+++ b/api/src/main/java/io/serverlessworkflow/api/deserializers/AuthDeserializer.java
@@ -0,0 +1,103 @@
+/*
+ * Copyright 2020-Present The Serverless Workflow Specification Authors
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package io.serverlessworkflow.api.deserializers;
+
+import com.fasterxml.jackson.core.JsonParser;
+import com.fasterxml.jackson.databind.DeserializationContext;
+import com.fasterxml.jackson.databind.JsonNode;
+import com.fasterxml.jackson.databind.ObjectMapper;
+import com.fasterxml.jackson.databind.deser.std.StdDeserializer;
+import com.fasterxml.jackson.dataformat.yaml.YAMLFactory;
+import io.serverlessworkflow.api.auth.AuthDefinition;
+import io.serverlessworkflow.api.interfaces.WorkflowPropertySource;
+import io.serverlessworkflow.api.utils.Utils;
+import io.serverlessworkflow.api.workflow.Auth;
+import java.io.IOException;
+import java.util.ArrayList;
+import java.util.List;
+import org.json.JSONObject;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+
+public class AuthDeserializer extends StdDeserializer<Auth> {
+
+  private static final long serialVersionUID = 520L;
+  private static Logger logger = LoggerFactory.getLogger(AuthDeserializer.class);
+
+  @SuppressWarnings("unused")
+  private WorkflowPropertySource context;
+
+  public AuthDeserializer() {
+    this(Auth.class);
+  }
+
+  public AuthDeserializer(Class<?> vc) {
+    super(vc);
+  }
+
+  public AuthDeserializer(WorkflowPropertySource context) {
+    this(Auth.class);
+    this.context = context;
+  }
+
+  @Override
+  public Auth deserialize(JsonParser jp, DeserializationContext ctxt) throws IOException {
+
+    ObjectMapper mapper = (ObjectMapper) jp.getCodec();
+    JsonNode node = jp.getCodec().readTree(jp);
+
+    Auth auth = new Auth();
+    List<AuthDefinition> authDefinitions = new ArrayList<>();
+
+    if (node.isArray()) {
+      for (final JsonNode nodeEle : node) {
+        authDefinitions.add(mapper.treeToValue(nodeEle, AuthDefinition.class));
+      }
+    } else {
+      String authFileDef = node.asText();
+      String authFileSrc = Utils.getResourceFileAsString(authFileDef);
+      JsonNode authRefNode;
+      ObjectMapper jsonWriter = new ObjectMapper();
+      if (authFileSrc != null && authFileSrc.trim().length() > 0) {
+        // if its a yaml def convert to json first
+        if (!authFileSrc.trim().startsWith("{")) {
+          // convert yaml to json to validate
+          ObjectMapper yamlReader = new ObjectMapper(new YAMLFactory());
+          Object obj = yamlReader.readValue(authFileSrc, Object.class);
+
+          authRefNode =
+              jsonWriter.readTree(new JSONObject(jsonWriter.writeValueAsString(obj)).toString());
+        } else {
+          authRefNode = jsonWriter.readTree(new JSONObject(authFileSrc).toString());
+        }
+
+        JsonNode refAuth = authRefNode.get("retries");
+        if (refAuth != null) {
+          for (final JsonNode nodeEle : refAuth) {
+            authDefinitions.add(mapper.treeToValue(nodeEle, AuthDefinition.class));
+          }
+        } else {
+          logger.error("Unable to find retries definitions in reference file: {}", authFileSrc);
+        }
+
+      } else {
+        logger.error("Unable to load retries defs reference file: {}", authFileSrc);
+      }
+    }
+    auth.setAuthDefs(authDefinitions);
+    return auth;
+  }
+}
diff --git a/api/src/main/java/io/serverlessworkflow/api/mapper/WorkflowModule.java b/api/src/main/java/io/serverlessworkflow/api/mapper/WorkflowModule.java
index 1486d32a..b2e2606e 100644
--- a/api/src/main/java/io/serverlessworkflow/api/mapper/WorkflowModule.java
+++ b/api/src/main/java/io/serverlessworkflow/api/mapper/WorkflowModule.java
@@ -121,6 +121,7 @@ private void addDefaultDeserializers() {
         StateExecTimeout.class, new StateExecTimeoutDeserializer(workflowPropertySource));
     addDeserializer(Errors.class, new ErrorsDeserializer(workflowPropertySource));
     addDeserializer(ContinueAs.class, new ContinueAsDeserializer(workflowPropertySource));
+    addDeserializer(Auth.class, new AuthDeserializer(workflowPropertySource));
   }
 
   public ExtensionSerializer getExtensionSerializer() {
diff --git a/api/src/main/java/io/serverlessworkflow/api/serializers/WorkflowSerializer.java b/api/src/main/java/io/serverlessworkflow/api/serializers/WorkflowSerializer.java
index dfa94688..67e6af86 100644
--- a/api/src/main/java/io/serverlessworkflow/api/serializers/WorkflowSerializer.java
+++ b/api/src/main/java/io/serverlessworkflow/api/serializers/WorkflowSerializer.java
@@ -167,8 +167,8 @@ public void serialize(Workflow workflow, JsonGenerator gen, SerializerProvider p
       gen.writeObjectField("timeouts", workflow.getTimeouts());
     }
 
-    if (workflow.getAuth() != null) {
-      gen.writeObjectField("auth", workflow.getAuth());
+    if (workflow.getAuth() != null && !workflow.getAuth().getAuthDefs().isEmpty()) {
+      gen.writeObjectField("auth", workflow.getAuth().getAuthDefs());
     }
 
     if (workflow.getStates() != null && !workflow.getStates().isEmpty()) {
diff --git a/api/src/main/java/io/serverlessworkflow/api/workflow/Auth.java b/api/src/main/java/io/serverlessworkflow/api/workflow/Auth.java
new file mode 100644
index 00000000..280053fa
--- /dev/null
+++ b/api/src/main/java/io/serverlessworkflow/api/workflow/Auth.java
@@ -0,0 +1,57 @@
+/*
+ * Copyright 2022-Present The Serverless Workflow Specification Authors
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package io.serverlessworkflow.api.workflow;
+
+import io.serverlessworkflow.api.auth.AuthDefinition;
+import java.util.ArrayList;
+import java.util.List;
+
+public class Auth {
+  private String refValue;
+  private List<AuthDefinition> authDefs;
+
+  public Auth() {}
+
+  public Auth(AuthDefinition authDef) {
+    this.authDefs = new ArrayList<>();
+    this.authDefs.add(authDef);
+  }
+
+  public Auth(List<AuthDefinition> authDefs) {
+    this.authDefs = authDefs;
+  }
+
+  public Auth(String refValue) {
+    this.refValue = refValue;
+  }
+
+  public String getRefValue() {
+    return refValue;
+  }
+
+  public void setRefValue(String refValue) {
+    this.refValue = refValue;
+  }
+
+  public List<AuthDefinition> getAuthDefs() {
+    return authDefs;
+  }
+
+  public void setAuthDefs(List<AuthDefinition> authDefs) {
+    this.authDefs = authDefs;
+  }
+}
diff --git a/api/src/main/resources/schema/workflow.json b/api/src/main/resources/schema/workflow.json
index a3bb762b..8fafeee5 100644
--- a/api/src/main/resources/schema/workflow.json
+++ b/api/src/main/resources/schema/workflow.json
@@ -100,7 +100,9 @@
       "$ref": "timeouts/timeoutsdef.json"
     },
     "auth": {
-      "$ref": "auth/auth.json"
+      "type": "object",
+      "existingJavaType": "io.serverlessworkflow.api.workflow.Auth",
+      "description": "Workflow Auth definitions"
     },
     "states": {
       "type": "array",
diff --git a/api/src/test/java/io/serverlessworkflow/api/test/MarkupToWorkflowTest.java b/api/src/test/java/io/serverlessworkflow/api/test/MarkupToWorkflowTest.java
index e86ae895..768085e1 100644
--- a/api/src/test/java/io/serverlessworkflow/api/test/MarkupToWorkflowTest.java
+++ b/api/src/test/java/io/serverlessworkflow/api/test/MarkupToWorkflowTest.java
@@ -627,7 +627,7 @@ public void testAuthBasic(String workflowLocation) {
     assertNotNull(workflow.getName());
 
     assertNotNull(workflow.getAuth());
-    AuthDefinition auth = workflow.getAuth();
+    AuthDefinition auth = workflow.getAuth().getAuthDefs().get(0);
     assertNotNull(auth.getName());
     assertEquals("authname", auth.getName());
     assertNotNull(auth.getScheme());
@@ -647,7 +647,7 @@ public void testAuthBearer(String workflowLocation) {
     assertNotNull(workflow.getName());
 
     assertNotNull(workflow.getAuth());
-    AuthDefinition auth = workflow.getAuth();
+    AuthDefinition auth = workflow.getAuth().getAuthDefs().get(0);
     assertNotNull(auth.getName());
     assertEquals("authname", auth.getName());
     assertNotNull(auth.getScheme());
@@ -666,7 +666,7 @@ public void testAuthOAuth(String workflowLocation) {
     assertNotNull(workflow.getName());
 
     assertNotNull(workflow.getAuth());
-    AuthDefinition auth = workflow.getAuth();
+    AuthDefinition auth = workflow.getAuth().getAuthDefs().get(0);
     assertNotNull(auth.getName());
     assertEquals("authname", auth.getName());
     assertNotNull(auth.getScheme());
diff --git a/api/src/test/java/io/serverlessworkflow/api/test/WorkflowToMarkupTest.java b/api/src/test/java/io/serverlessworkflow/api/test/WorkflowToMarkupTest.java
index 514375e1..ff43f167 100644
--- a/api/src/test/java/io/serverlessworkflow/api/test/WorkflowToMarkupTest.java
+++ b/api/src/test/java/io/serverlessworkflow/api/test/WorkflowToMarkupTest.java
@@ -16,7 +16,9 @@
 package io.serverlessworkflow.api.test;
 
 import static io.serverlessworkflow.api.states.DefaultState.Type.SLEEP;
-import static org.junit.jupiter.api.Assertions.*;
+import static org.junit.jupiter.api.Assertions.assertEquals;
+import static org.junit.jupiter.api.Assertions.assertNotNull;
+import static org.junit.jupiter.api.Assertions.assertTrue;
 
 import io.serverlessworkflow.api.Workflow;
 import io.serverlessworkflow.api.auth.AuthDefinition;
@@ -29,6 +31,7 @@
 import io.serverlessworkflow.api.schedule.Schedule;
 import io.serverlessworkflow.api.start.Start;
 import io.serverlessworkflow.api.states.SleepState;
+import io.serverlessworkflow.api.workflow.Auth;
 import io.serverlessworkflow.api.workflow.Events;
 import io.serverlessworkflow.api.workflow.Functions;
 import java.util.Arrays;
@@ -162,22 +165,24 @@ public void testAuth() {
             .withVersion("1.0")
             .withStart(new Start())
             .withAuth(
-                new AuthDefinition()
-                    .withName("authname")
-                    .withScheme(AuthDefinition.Scheme.BASIC)
-                    .withBasicauth(
-                        new BasicAuthDefinition()
-                            .withUsername("testuser")
-                            .withPassword("testPassword")));
+                new Auth(
+                    new AuthDefinition()
+                        .withName("authname")
+                        .withScheme(AuthDefinition.Scheme.BASIC)
+                        .withBasicauth(
+                            new BasicAuthDefinition()
+                                .withUsername("testuser")
+                                .withPassword("testPassword"))));
 
     assertNotNull(workflow);
     assertNotNull(workflow.getAuth());
-    assertNotNull(workflow.getAuth().getName());
-    assertEquals("authname", workflow.getAuth().getName());
-    assertNotNull(workflow.getAuth().getScheme());
-    assertEquals("basic", workflow.getAuth().getScheme().value());
-    assertNotNull(workflow.getAuth().getBasicauth());
-    assertEquals("testuser", workflow.getAuth().getBasicauth().getUsername());
-    assertEquals("testPassword", workflow.getAuth().getBasicauth().getPassword());
+    assertNotNull(workflow.getAuth().getAuthDefs().get(0));
+    assertEquals("authname", workflow.getAuth().getAuthDefs().get(0).getName());
+    assertNotNull(workflow.getAuth().getAuthDefs().get(0).getScheme());
+    assertEquals("basic", workflow.getAuth().getAuthDefs().get(0).getScheme().value());
+    assertNotNull(workflow.getAuth().getAuthDefs().get(0).getBasicauth());
+    assertEquals("testuser", workflow.getAuth().getAuthDefs().get(0).getBasicauth().getUsername());
+    assertEquals(
+        "testPassword", workflow.getAuth().getAuthDefs().get(0).getBasicauth().getPassword());
   }
 }
diff --git a/api/src/test/resources/features/authbasic.json b/api/src/test/resources/features/authbasic.json
index 92397db4..31e86599 100644
--- a/api/src/test/resources/features/authbasic.json
+++ b/api/src/test/resources/features/authbasic.json
@@ -1,13 +1,15 @@
 {
-  "id" : "test-workflow",
-  "name" : "test-workflow-name",
-  "version" : "1.0",
-  "auth" : {
-    "name" : "authname",
-    "scheme" : "basic",
-    "properties" : {
-      "username" : "testuser",
-      "password" : "testpassword"
+  "id": "test-workflow",
+  "name": "test-workflow-name",
+  "version": "1.0",
+  "auth": [
+    {
+      "name": "authname",
+      "scheme": "basic",
+      "properties": {
+        "username": "testuser",
+        "password": "testpassword"
+      }
     }
-  }
+  ]
 }
\ No newline at end of file
diff --git a/api/src/test/resources/features/authbasic.yml b/api/src/test/resources/features/authbasic.yml
index 963dc63e..e04d1f7e 100644
--- a/api/src/test/resources/features/authbasic.yml
+++ b/api/src/test/resources/features/authbasic.yml
@@ -2,8 +2,8 @@ id: test-workflow
 name: test-workflow-name
 version: '1.0'
 auth:
-  name: authname
-  scheme: basic
-  properties:
-    username: testuser
-    password: testpassword
+  - name: authname
+    scheme: basic
+    properties:
+      username: testuser
+      password: testpassword
diff --git a/api/src/test/resources/features/authbearer.json b/api/src/test/resources/features/authbearer.json
index 304d1685..be7c037a 100644
--- a/api/src/test/resources/features/authbearer.json
+++ b/api/src/test/resources/features/authbearer.json
@@ -1,12 +1,14 @@
 {
-  "id" : "test-workflow",
-  "name" : "test-workflow-name",
-  "version" : "1.0",
-  "auth" : {
-    "name" : "authname",
-    "scheme" : "bearer",
-    "properties" : {
-      "token" : "testtoken"
+  "id": "test-workflow",
+  "name": "test-workflow-name",
+  "version": "1.0",
+  "auth": [
+    {
+      "name": "authname",
+      "scheme": "bearer",
+      "properties": {
+        "token": "testtoken"
+      }
     }
-  }
+  ]
 }
\ No newline at end of file
diff --git a/api/src/test/resources/features/authbearer.yml b/api/src/test/resources/features/authbearer.yml
index 0a815386..292fa3c2 100644
--- a/api/src/test/resources/features/authbearer.yml
+++ b/api/src/test/resources/features/authbearer.yml
@@ -2,7 +2,7 @@ id: test-workflow
 name: test-workflow-name
 version: '1.0'
 auth:
-  name: authname
-  scheme: bearer
-  properties:
-    token: testtoken
+  - name: authname
+    scheme: bearer
+    properties:
+      token: testtoken
diff --git a/api/src/test/resources/features/authoauth.json b/api/src/test/resources/features/authoauth.json
index da845606..10b76d70 100644
--- a/api/src/test/resources/features/authoauth.json
+++ b/api/src/test/resources/features/authoauth.json
@@ -2,7 +2,7 @@
   "id" : "test-workflow",
   "name" : "test-workflow-name",
   "version" : "1.0",
-  "auth" : {
+  "auth" : [{
     "name" : "authname",
     "scheme" : "oauth2",
     "properties" : {
@@ -11,5 +11,5 @@
       "clientId": "${ $SECRETS.clientid }",
       "clientSecret": "${ $SECRETS.clientsecret }"
     }
-  }
+  }]
 }
\ No newline at end of file
diff --git a/api/src/test/resources/features/authoauth.yml b/api/src/test/resources/features/authoauth.yml
index 8741297c..cb2c52ba 100644
--- a/api/src/test/resources/features/authoauth.yml
+++ b/api/src/test/resources/features/authoauth.yml
@@ -2,10 +2,10 @@ id: test-workflow
 name: test-workflow-name
 version: '1.0'
 auth:
-  name: authname
-  scheme: oauth2
-  properties:
-    authority: testauthority
-    grantType: clientCredentials
-    clientId: "${ $SECRETS.clientid }"
-    clientSecret: "${ $SECRETS.clientsecret }"
+  - name: authname
+    scheme: oauth2
+    properties:
+      authority: testauthority
+      grantType: clientCredentials
+      clientId: "${ $SECRETS.clientid }"
+      clientSecret: "${ $SECRETS.clientsecret }"

From ba5696528e57d6fd4e1c25e8fe14e880ca2eee89 Mon Sep 17 00:00:00 2001
From: Ricardo Zanini <zanini@redhat.com>
Date: Wed, 30 Mar 2022 08:49:03 -0300
Subject: [PATCH 019/109] Fix spelling

Signed-off-by: Ricardo Zanini <zanini@redhat.com>
---
 .../api/deserializers/AuthDeserializer.java                 | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/api/src/main/java/io/serverlessworkflow/api/deserializers/AuthDeserializer.java b/api/src/main/java/io/serverlessworkflow/api/deserializers/AuthDeserializer.java
index 364d09a2..abdb0583 100644
--- a/api/src/main/java/io/serverlessworkflow/api/deserializers/AuthDeserializer.java
+++ b/api/src/main/java/io/serverlessworkflow/api/deserializers/AuthDeserializer.java
@@ -84,17 +84,17 @@ public Auth deserialize(JsonParser jp, DeserializationContext ctxt) throws IOExc
           authRefNode = jsonWriter.readTree(new JSONObject(authFileSrc).toString());
         }
 
-        JsonNode refAuth = authRefNode.get("retries");
+        JsonNode refAuth = authRefNode.get("auth");
         if (refAuth != null) {
           for (final JsonNode nodeEle : refAuth) {
             authDefinitions.add(mapper.treeToValue(nodeEle, AuthDefinition.class));
           }
         } else {
-          logger.error("Unable to find retries definitions in reference file: {}", authFileSrc);
+          logger.error("Unable to find auth definitions in reference file: {}", authFileSrc);
         }
 
       } else {
-        logger.error("Unable to load retries defs reference file: {}", authFileSrc);
+        logger.error("Unable to load auth defs reference file: {}", authFileSrc);
       }
     }
     auth.setAuthDefs(authDefinitions);

From cb618c1bd0a9d19fdf44fe4d734c6b59993b1310 Mon Sep 17 00:00:00 2001
From: Tihomir Surdilovic <tihomir@temporal.io>
Date: Mon, 4 Apr 2022 13:45:11 -0400
Subject: [PATCH 020/109] fix validation for callback state

Signed-off-by: Tihomir Surdilovic <tihomir@temporal.io>
---
 .../validation/WorkflowValidatorImpl.java     |  2 +-
 .../test/WorkflowValidationTest.java          | 44 +++++++++++++++++++
 2 files changed, 45 insertions(+), 1 deletion(-)

diff --git a/validation/src/main/java/io/serverlessworkflow/validation/WorkflowValidatorImpl.java b/validation/src/main/java/io/serverlessworkflow/validation/WorkflowValidatorImpl.java
index f226c9a8..1e0999c9 100644
--- a/validation/src/main/java/io/serverlessworkflow/validation/WorkflowValidatorImpl.java
+++ b/validation/src/main/java/io/serverlessworkflow/validation/WorkflowValidatorImpl.java
@@ -330,7 +330,7 @@ public List<ValidationError> validate() {
                           ValidationError.WORKFLOW_VALIDATION);
                     }
 
-                    if (haveFunctionDefinition(
+                    if (!haveFunctionDefinition(
                         callbackState.getAction().getFunctionRef().getRefName(), functions)) {
                       addValidationError(
                           "CallbackState action function ref does not reference a defined workflow function definition",
diff --git a/validation/src/test/java/io/serverlessworkflow/validation/test/WorkflowValidationTest.java b/validation/src/test/java/io/serverlessworkflow/validation/test/WorkflowValidationTest.java
index 601e667b..38dbe2d2 100644
--- a/validation/src/test/java/io/serverlessworkflow/validation/test/WorkflowValidationTest.java
+++ b/validation/src/test/java/io/serverlessworkflow/validation/test/WorkflowValidationTest.java
@@ -213,4 +213,48 @@ public void testValidateWorkflowForOptionalIterationParam() {
         1,
         validationErrors.size()); // validation error raised for functionref not for iterationParam
   }
+
+  @Test
+  public void testMissingFunctionRefForCallbackState() {
+    WorkflowValidator workflowValidator = new WorkflowValidatorImpl();
+    List<ValidationError> validationErrors =
+        workflowValidator
+            .setSource(
+                "{\n"
+                    + "  \"id\": \"callbackstatemissingfuncref\",\n"
+                    + "  \"version\": \"1.0\",\n"
+                    + "  \"specVersion\": \"0.8\",\n"
+                    + "  \"name\": \"Callback State Test\",\n"
+                    + "  \"start\": \"CheckCredit\",\n"
+                    + "  \"states\": [\n"
+                    + "    {\n"
+                    + "      \"name\": \"CheckCredit\",\n"
+                    + "      \"type\": \"callback\",\n"
+                    + "      \"action\": {\n"
+                    + "        \"functionRef\": {\n"
+                    + "          \"refName\": \"callCreditCheckMicroservice\",\n"
+                    + "          \"arguments\": {\n"
+                    + "            \"customer\": \"${ .customer }\"\n"
+                    + "          }\n"
+                    + "        }\n"
+                    + "      },\n"
+                    + "      \"eventRef\": \"CreditCheckCompletedEvent\",\n"
+                    + "      \"timeouts\": {\n"
+                    + "        \"stateExecTimeout\": \"PT15M\"\n"
+                    + "      },\n"
+                    + "      \"end\": true\n"
+                    + "    }\n"
+                    + "  ]\n"
+                    + "}")
+            .validate();
+
+    Assertions.assertNotNull(validationErrors);
+    Assertions.assertEquals(2, validationErrors.size());
+    Assertions.assertEquals(
+        "CallbackState event ref does not reference a defined workflow event definition",
+        validationErrors.get(0).getMessage());
+    Assertions.assertEquals(
+        "CallbackState action function ref does not reference a defined workflow function definition",
+        validationErrors.get(1).getMessage());
+  }
 }

From cdff07d076d13cc92f4e733f4603c313ad4da0f0 Mon Sep 17 00:00:00 2001
From: Tihomir Surdilovic <tihomir@temporal.io>
Date: Wed, 6 Apr 2022 23:13:40 -0400
Subject: [PATCH 021/109] Update poms for 4.0.3.Final release

Signed-off-by: Tihomir Surdilovic <tihomir@temporal.io>
---
 api/pom.xml        | 2 +-
 diagram/pom.xml    | 2 +-
 pom.xml            | 2 +-
 spi/pom.xml        | 2 +-
 utils/pom.xml      | 2 +-
 validation/pom.xml | 2 +-
 6 files changed, 6 insertions(+), 6 deletions(-)

diff --git a/api/pom.xml b/api/pom.xml
index 3d060b5d..6410a63f 100644
--- a/api/pom.xml
+++ b/api/pom.xml
@@ -6,7 +6,7 @@
     <parent>
         <groupId>io.serverlessworkflow</groupId>
         <artifactId>serverlessworkflow-parent</artifactId>
-        <version>4.0.x</version>
+        <version>4.0.3.Final</version>
     </parent>
 
     <artifactId>serverlessworkflow-api</artifactId>
diff --git a/diagram/pom.xml b/diagram/pom.xml
index 5cd03836..7cb79395 100644
--- a/diagram/pom.xml
+++ b/diagram/pom.xml
@@ -6,7 +6,7 @@
     <parent>
         <groupId>io.serverlessworkflow</groupId>
         <artifactId>serverlessworkflow-parent</artifactId>
-        <version>4.0.x</version>
+        <version>4.0.3.Final</version>
     </parent>
 
     <artifactId>serverlessworkflow-diagram</artifactId>
diff --git a/pom.xml b/pom.xml
index c367de45..e9c6cc2a 100644
--- a/pom.xml
+++ b/pom.xml
@@ -5,7 +5,7 @@
 
     <groupId>io.serverlessworkflow</groupId>
     <artifactId>serverlessworkflow-parent</artifactId>
-    <version>4.0.x</version>
+    <version>4.0.3.Final</version>
     <packaging>pom</packaging>
 
     <name>Serverless Workflow :: Parent</name>
diff --git a/spi/pom.xml b/spi/pom.xml
index a2d1532d..912cb4ee 100644
--- a/spi/pom.xml
+++ b/spi/pom.xml
@@ -6,7 +6,7 @@
     <parent>
         <groupId>io.serverlessworkflow</groupId>
         <artifactId>serverlessworkflow-parent</artifactId>
-        <version>4.0.x</version>
+        <version>4.0.3.Final</version>
     </parent>
 
     <artifactId>serverlessworkflow-spi</artifactId>
diff --git a/utils/pom.xml b/utils/pom.xml
index 4fab2886..bf951d66 100644
--- a/utils/pom.xml
+++ b/utils/pom.xml
@@ -6,7 +6,7 @@
     <parent>
         <groupId>io.serverlessworkflow</groupId>
         <artifactId>serverlessworkflow-parent</artifactId>
-        <version>4.0.x</version>
+        <version>4.0.3.Final</version>
     </parent>
 
     <artifactId>serverlessworkflow-util</artifactId>
diff --git a/validation/pom.xml b/validation/pom.xml
index 399a0abf..ce48cc30 100644
--- a/validation/pom.xml
+++ b/validation/pom.xml
@@ -6,7 +6,7 @@
     <parent>
         <groupId>io.serverlessworkflow</groupId>
         <artifactId>serverlessworkflow-parent</artifactId>
-        <version>4.0.x</version>
+        <version>4.0.3.Final</version>
     </parent>
 
     <artifactId>serverlessworkflow-validation</artifactId>

From 574de503e73ea100a5c99fd34ad8ee5628fe163c Mon Sep 17 00:00:00 2001
From: Tihomir Surdilovic <tihomir@temporal.io>
Date: Wed, 6 Apr 2022 23:24:34 -0400
Subject: [PATCH 022/109] reset version to 4.0.x

Signed-off-by: Tihomir Surdilovic <tihomir@temporal.io>
---
 api/pom.xml        | 2 +-
 diagram/pom.xml    | 2 +-
 pom.xml            | 2 +-
 spi/pom.xml        | 2 +-
 utils/pom.xml      | 2 +-
 validation/pom.xml | 2 +-
 6 files changed, 6 insertions(+), 6 deletions(-)

diff --git a/api/pom.xml b/api/pom.xml
index 6410a63f..3d060b5d 100644
--- a/api/pom.xml
+++ b/api/pom.xml
@@ -6,7 +6,7 @@
     <parent>
         <groupId>io.serverlessworkflow</groupId>
         <artifactId>serverlessworkflow-parent</artifactId>
-        <version>4.0.3.Final</version>
+        <version>4.0.x</version>
     </parent>
 
     <artifactId>serverlessworkflow-api</artifactId>
diff --git a/diagram/pom.xml b/diagram/pom.xml
index 7cb79395..5cd03836 100644
--- a/diagram/pom.xml
+++ b/diagram/pom.xml
@@ -6,7 +6,7 @@
     <parent>
         <groupId>io.serverlessworkflow</groupId>
         <artifactId>serverlessworkflow-parent</artifactId>
-        <version>4.0.3.Final</version>
+        <version>4.0.x</version>
     </parent>
 
     <artifactId>serverlessworkflow-diagram</artifactId>
diff --git a/pom.xml b/pom.xml
index e9c6cc2a..c367de45 100644
--- a/pom.xml
+++ b/pom.xml
@@ -5,7 +5,7 @@
 
     <groupId>io.serverlessworkflow</groupId>
     <artifactId>serverlessworkflow-parent</artifactId>
-    <version>4.0.3.Final</version>
+    <version>4.0.x</version>
     <packaging>pom</packaging>
 
     <name>Serverless Workflow :: Parent</name>
diff --git a/spi/pom.xml b/spi/pom.xml
index 912cb4ee..a2d1532d 100644
--- a/spi/pom.xml
+++ b/spi/pom.xml
@@ -6,7 +6,7 @@
     <parent>
         <groupId>io.serverlessworkflow</groupId>
         <artifactId>serverlessworkflow-parent</artifactId>
-        <version>4.0.3.Final</version>
+        <version>4.0.x</version>
     </parent>
 
     <artifactId>serverlessworkflow-spi</artifactId>
diff --git a/utils/pom.xml b/utils/pom.xml
index bf951d66..4fab2886 100644
--- a/utils/pom.xml
+++ b/utils/pom.xml
@@ -6,7 +6,7 @@
     <parent>
         <groupId>io.serverlessworkflow</groupId>
         <artifactId>serverlessworkflow-parent</artifactId>
-        <version>4.0.3.Final</version>
+        <version>4.0.x</version>
     </parent>
 
     <artifactId>serverlessworkflow-util</artifactId>
diff --git a/validation/pom.xml b/validation/pom.xml
index ce48cc30..399a0abf 100644
--- a/validation/pom.xml
+++ b/validation/pom.xml
@@ -6,7 +6,7 @@
     <parent>
         <groupId>io.serverlessworkflow</groupId>
         <artifactId>serverlessworkflow-parent</artifactId>
-        <version>4.0.3.Final</version>
+        <version>4.0.x</version>
     </parent>
 
     <artifactId>serverlessworkflow-validation</artifactId>

From 15166387679405a7d18df0760fbe2db920c3c7fb Mon Sep 17 00:00:00 2001
From: manick02 <manickavasagam.sundaram@gmail.com>
Date: Wed, 20 Apr 2022 09:27:24 +0530
Subject: [PATCH 023/109] #193 fix CVE:Cx78f40514-81ff

Signed-off-by: manick02 <manickavasagam.sundaram@gmail.com>
---
 pom.xml | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/pom.xml b/pom.xml
index c367de45..a1783649 100644
--- a/pom.xml
+++ b/pom.xml
@@ -72,7 +72,7 @@
         <commons.lang.version>3.9</commons.lang.version>
         <hamcrest.version>1.3</hamcrest.version>
         <jsonassert.version>1.5.0</jsonassert.version>
-        <json.schema.validation.version>1.12.1</json.schema.validation.version>
+        <json.schema.validation.version>1.14.1</json.schema.validation.version>
         <version.json>20200518</version.json>
         <version.thymeleaf>3.0.11.RELEASE</version.thymeleaf>
         <version.plantuml>8059</version.plantuml>

From 53105643cb03badfce444a1cb221ca9cd86c9269 Mon Sep 17 00:00:00 2001
From: Ricardo Zanini <zanini@redhat.com>
Date: Mon, 3 Jul 2023 18:21:29 -0300
Subject: [PATCH 024/109] Fix #229 - Fix CVE-2017-5929, CVE-2020-15250, and
 CVE-2022-45688

Signed-off-by: Ricardo Zanini <zanini@redhat.com>
---
 .gitignore | 1 +
 pom.xml    | 8 ++++----
 2 files changed, 5 insertions(+), 4 deletions(-)

diff --git a/.gitignore b/.gitignore
index d4dfde66..1dfd7048 100644
--- a/.gitignore
+++ b/.gitignore
@@ -1,3 +1,4 @@
+.DS_Store
 HELP.md
 target/
 !.mvn/wrapper/maven-wrapper.jar
diff --git a/pom.xml b/pom.xml
index a1783649..7fe5c01c 100644
--- a/pom.xml
+++ b/pom.xml
@@ -66,14 +66,14 @@
         <version.org.junit>5.${version.org.junit.minor}</version.org.junit>
         <version.org.junit.jupiter>${version.org.junit}</version.org.junit.jupiter>
         <version.org.mockito>3.0.0</version.org.mockito>
-        <version.ch.qos.logback>1.1.3</version.ch.qos.logback>
+        <version.ch.qos.logback>1.4.8</version.ch.qos.logback>
         <version.org.assertj>3.13.2</version.org.assertj>
         <version.jsonschema2pojo-maven-plugin>1.0.1</version.jsonschema2pojo-maven-plugin>
         <commons.lang.version>3.9</commons.lang.version>
         <hamcrest.version>1.3</hamcrest.version>
         <jsonassert.version>1.5.0</jsonassert.version>
         <json.schema.validation.version>1.14.1</json.schema.validation.version>
-        <version.json>20200518</version.json>
+        <version.json>20230618</version.json>
         <version.thymeleaf>3.0.11.RELEASE</version.thymeleaf>
         <version.plantuml>8059</version.plantuml>
         <version.graphviz>0.17.0</version.graphviz>
@@ -277,7 +277,7 @@
                 <artifactId>maven-surefire-plugin</artifactId>
                 <version>${version.surefire.plugin}</version>
                 <configuration>
-                    <argLine>-Xmx1024m -XX:MaxPermSize=256m</argLine>
+                    <argLine>-Xmx1024m -XX:+IgnoreUnrecognizedVMOptions -XX:MaxPermSize=256m</argLine>
                 </configuration>
             </plugin>
             <plugin>
@@ -311,7 +311,7 @@
             <plugin>
                 <groupId>org.apache.maven.plugins</groupId>
                 <artifactId>maven-javadoc-plugin</artifactId>
-                <version>2.10.4</version>
+                <version>3.5.0</version>
                 <configuration>
                     <source>8</source>
                     <additionalparam>-Xdoclint:none</additionalparam>

From a8e81da60e1c1712c9b8e31d3a99f38be731d725 Mon Sep 17 00:00:00 2001
From: Ricardo Zanini <zanini@redhat.com>
Date: Mon, 3 Jul 2023 18:42:01 -0300
Subject: [PATCH 025/109] Ignore javadoc errors

Signed-off-by: Ricardo Zanini <zanini@redhat.com>
---
 pom.xml | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/pom.xml b/pom.xml
index 7fe5c01c..53a2abf3 100644
--- a/pom.xml
+++ b/pom.xml
@@ -322,6 +322,9 @@
                         <goals>
                             <goal>jar</goal>
                         </goals>
+                        <configuration>
+                            <failOnError>false</failOnError>
+                        </configuration>
                     </execution>
                 </executions>
             </plugin>

From 29f4e5a648ee310318ef90ddf2b7f6da3849718c Mon Sep 17 00:00:00 2001
From: Ricardo Zanini <1538000+ricardozanini@users.noreply.github.com>
Date: Tue, 4 Jul 2023 11:57:26 -0300
Subject: [PATCH 026/109] Make serialized workflow compatible with schema
 (#224) (#233)

Signed-off-by: Francisco Javier Tirado Sarti <ftirados@redhat.com>
Signed-off-by: Ricardo Zanini <zanini@redhat.com>
Co-authored-by: Francisco Javier Tirado Sarti <65240126+fjtirado@users.noreply.github.com>
---
 .../api/serializers/WorkflowSerializer.java    | 18 ------------------
 1 file changed, 18 deletions(-)

diff --git a/api/src/main/java/io/serverlessworkflow/api/serializers/WorkflowSerializer.java b/api/src/main/java/io/serverlessworkflow/api/serializers/WorkflowSerializer.java
index 67e6af86..7fd83c76 100644
--- a/api/src/main/java/io/serverlessworkflow/api/serializers/WorkflowSerializer.java
+++ b/api/src/main/java/io/serverlessworkflow/api/serializers/WorkflowSerializer.java
@@ -110,9 +110,6 @@ public void serialize(Workflow workflow, JsonGenerator gen, SerializerProvider p
         gen.writeObject(eventDefinition);
       }
       gen.writeEndArray();
-    } else {
-      gen.writeArrayFieldStart("events");
-      gen.writeEndArray();
     }
 
     if (workflow.getFunctions() != null && !workflow.getFunctions().getFunctionDefs().isEmpty()) {
@@ -121,9 +118,6 @@ public void serialize(Workflow workflow, JsonGenerator gen, SerializerProvider p
         gen.writeObject(function);
       }
       gen.writeEndArray();
-    } else {
-      gen.writeArrayFieldStart("functions");
-      gen.writeEndArray();
     }
 
     if (workflow.getRetries() != null && !workflow.getRetries().getRetryDefs().isEmpty()) {
@@ -132,9 +126,6 @@ public void serialize(Workflow workflow, JsonGenerator gen, SerializerProvider p
         gen.writeObject(retry);
       }
       gen.writeEndArray();
-    } else {
-      gen.writeArrayFieldStart("retries");
-      gen.writeEndArray();
     }
 
     if (workflow.getErrors() != null && !workflow.getErrors().getErrorDefs().isEmpty()) {
@@ -143,9 +134,6 @@ public void serialize(Workflow workflow, JsonGenerator gen, SerializerProvider p
         gen.writeObject(error);
       }
       gen.writeEndArray();
-    } else {
-      gen.writeArrayFieldStart("errors");
-      gen.writeEndArray();
     }
 
     if (workflow.getSecrets() != null && !workflow.getSecrets().getSecretDefs().isEmpty()) {
@@ -154,9 +142,6 @@ public void serialize(Workflow workflow, JsonGenerator gen, SerializerProvider p
         gen.writeString(secretDef);
       }
       gen.writeEndArray();
-    } else {
-      gen.writeArrayFieldStart("secrets");
-      gen.writeEndArray();
     }
 
     if (workflow.getConstants() != null && !workflow.getConstants().getConstantsDef().isEmpty()) {
@@ -177,9 +162,6 @@ public void serialize(Workflow workflow, JsonGenerator gen, SerializerProvider p
         gen.writeObject(state);
       }
       gen.writeEndArray();
-    } else {
-      gen.writeArrayFieldStart("states");
-      gen.writeEndArray();
     }
 
     if (workflow.getExtensions() != null && !workflow.getExtensions().isEmpty()) {

From 4b91e70b9f16d07f174c639eb7d0fb7fb0dc4948 Mon Sep 17 00:00:00 2001
From: Tihomir Surdilovic <tihomir@temporal.io>
Date: Tue, 4 Jul 2023 18:06:16 -0400
Subject: [PATCH 027/109] prep for 4.0.4 release (#235)

Signed-off-by: Tihomir Surdilovic <tihomir@temporal.io>
---
 README.md          | 22 ++++++++++++----------
 api/pom.xml        |  2 +-
 diagram/pom.xml    |  2 +-
 pom.xml            |  2 +-
 spi/pom.xml        |  2 +-
 utils/pom.xml      |  2 +-
 validation/pom.xml |  2 +-
 7 files changed, 18 insertions(+), 16 deletions(-)

diff --git a/README.md b/README.md
index d7e6ac9e..de0f3fb0 100644
--- a/README.md
+++ b/README.md
@@ -20,6 +20,8 @@ to parse and validate workflow definitions as well as generate the workflow diag
 
 | Latest Releases | Conformance to spec version |
 | :---: | :---: |
+| [4.0.4.Final](https://github.com/serverlessworkflow/sdk-java/releases/) | [v0.8](https://github.com/serverlessworkflow/specification/tree/0.8.x) |
+| [4.0.3.Final](https://github.com/serverlessworkflow/sdk-java/releases/) | [v0.8](https://github.com/serverlessworkflow/specification/tree/0.8.x) |
 | [4.0.2.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) |
@@ -64,31 +66,31 @@ b) Add the following dependencies to your pom.xml `dependencies` section:
 <dependency>
     <groupId>io.serverlessworkflow</groupId>
     <artifactId>serverlessworkflow-api</artifactId>
-    <version>4.0.2.Final</version>
+    <version>4.0.4.Final</version>
 </dependency>
 
 <dependency>
     <groupId>io.serverlessworkflow</groupId>
     <artifactId>serverlessworkflow-spi</artifactId>
-    <version>4.0.2.Final</version>
+    <version>4.0.4.Final</version>
 </dependency>
 
 <dependency>
     <groupId>io.serverlessworkflow</groupId>
     <artifactId>serverlessworkflow-validation</artifactId>
-    <version>4.0.2.Final</version>
+    <version>4.0.4.Final</version>
 </dependency>
 
 <dependency>
     <groupId>io.serverlessworkflow</groupId>
     <artifactId>serverlessworkflow-diagram</artifactId>
-    <version>4.0.2.Final</version>
+    <version>4.0.4.Final</version>
 </dependency>
 
 <dependency>
     <groupId>io.serverlessworkflow</groupId>
     <artifactId>serverlessworkflow-util</artifactId>
-    <version>4.0.2.Final</version>
+    <version>4.0.4.Final</version>
 </dependency>
 ```
 
@@ -103,11 +105,11 @@ 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:4.0.2.Final")
-implementation("io.serverlessworkflow:serverlessworkflow-spi:4.0.2.Final")
-implementation("io.serverlessworkflow:serverlessworkflow-validation:4.0.2.Final")
-implementation("io.serverlessworkflow:serverlessworkflow-diagram:4.0.2.Final")
-implementation("io.serverlessworkflow:serverlessworkflow-util:4.0.2.Final")
+implementation("io.serverlessworkflow:serverlessworkflow-api:4.0.4.Final")
+implementation("io.serverlessworkflow:serverlessworkflow-spi:4.0.4.Final")
+implementation("io.serverlessworkflow:serverlessworkflow-validation:4.0.4.Final")
+implementation("io.serverlessworkflow:serverlessworkflow-diagram:4.0.4.Final")
+implementation("io.serverlessworkflow:serverlessworkflow-util:4.0.4.Final")
 ```
 
 ### How to Use 
diff --git a/api/pom.xml b/api/pom.xml
index 3d060b5d..a88151ae 100644
--- a/api/pom.xml
+++ b/api/pom.xml
@@ -6,7 +6,7 @@
     <parent>
         <groupId>io.serverlessworkflow</groupId>
         <artifactId>serverlessworkflow-parent</artifactId>
-        <version>4.0.x</version>
+        <version>4.0.4.Final</version>
     </parent>
 
     <artifactId>serverlessworkflow-api</artifactId>
diff --git a/diagram/pom.xml b/diagram/pom.xml
index 5cd03836..8ec02c26 100644
--- a/diagram/pom.xml
+++ b/diagram/pom.xml
@@ -6,7 +6,7 @@
     <parent>
         <groupId>io.serverlessworkflow</groupId>
         <artifactId>serverlessworkflow-parent</artifactId>
-        <version>4.0.x</version>
+        <version>4.0.4.Final</version>
     </parent>
 
     <artifactId>serverlessworkflow-diagram</artifactId>
diff --git a/pom.xml b/pom.xml
index 53a2abf3..12e8108d 100644
--- a/pom.xml
+++ b/pom.xml
@@ -5,7 +5,7 @@
 
     <groupId>io.serverlessworkflow</groupId>
     <artifactId>serverlessworkflow-parent</artifactId>
-    <version>4.0.x</version>
+    <version>4.0.4.Final</version>
     <packaging>pom</packaging>
 
     <name>Serverless Workflow :: Parent</name>
diff --git a/spi/pom.xml b/spi/pom.xml
index a2d1532d..8491b84b 100644
--- a/spi/pom.xml
+++ b/spi/pom.xml
@@ -6,7 +6,7 @@
     <parent>
         <groupId>io.serverlessworkflow</groupId>
         <artifactId>serverlessworkflow-parent</artifactId>
-        <version>4.0.x</version>
+        <version>4.0.4.Final</version>
     </parent>
 
     <artifactId>serverlessworkflow-spi</artifactId>
diff --git a/utils/pom.xml b/utils/pom.xml
index 4fab2886..7033598c 100644
--- a/utils/pom.xml
+++ b/utils/pom.xml
@@ -6,7 +6,7 @@
     <parent>
         <groupId>io.serverlessworkflow</groupId>
         <artifactId>serverlessworkflow-parent</artifactId>
-        <version>4.0.x</version>
+        <version>4.0.4.Final</version>
     </parent>
 
     <artifactId>serverlessworkflow-util</artifactId>
diff --git a/validation/pom.xml b/validation/pom.xml
index 399a0abf..c806030a 100644
--- a/validation/pom.xml
+++ b/validation/pom.xml
@@ -6,7 +6,7 @@
     <parent>
         <groupId>io.serverlessworkflow</groupId>
         <artifactId>serverlessworkflow-parent</artifactId>
-        <version>4.0.x</version>
+        <version>4.0.4.Final</version>
     </parent>
 
     <artifactId>serverlessworkflow-validation</artifactId>

From 0641333528696b3ba4518efa3895969f3c32a442 Mon Sep 17 00:00:00 2001
From: Tihomir Surdilovic <tihomir@temporal.io>
Date: Tue, 4 Jul 2023 18:22:25 -0400
Subject: [PATCH 028/109] switch back to 4.0.x (#236)

Signed-off-by: Tihomir Surdilovic <tihomir@temporal.io>
---
 api/pom.xml        | 2 +-
 diagram/pom.xml    | 2 +-
 pom.xml            | 2 +-
 spi/pom.xml        | 2 +-
 utils/pom.xml      | 2 +-
 validation/pom.xml | 2 +-
 6 files changed, 6 insertions(+), 6 deletions(-)

diff --git a/api/pom.xml b/api/pom.xml
index a88151ae..3d060b5d 100644
--- a/api/pom.xml
+++ b/api/pom.xml
@@ -6,7 +6,7 @@
     <parent>
         <groupId>io.serverlessworkflow</groupId>
         <artifactId>serverlessworkflow-parent</artifactId>
-        <version>4.0.4.Final</version>
+        <version>4.0.x</version>
     </parent>
 
     <artifactId>serverlessworkflow-api</artifactId>
diff --git a/diagram/pom.xml b/diagram/pom.xml
index 8ec02c26..5cd03836 100644
--- a/diagram/pom.xml
+++ b/diagram/pom.xml
@@ -6,7 +6,7 @@
     <parent>
         <groupId>io.serverlessworkflow</groupId>
         <artifactId>serverlessworkflow-parent</artifactId>
-        <version>4.0.4.Final</version>
+        <version>4.0.x</version>
     </parent>
 
     <artifactId>serverlessworkflow-diagram</artifactId>
diff --git a/pom.xml b/pom.xml
index 12e8108d..53a2abf3 100644
--- a/pom.xml
+++ b/pom.xml
@@ -5,7 +5,7 @@
 
     <groupId>io.serverlessworkflow</groupId>
     <artifactId>serverlessworkflow-parent</artifactId>
-    <version>4.0.4.Final</version>
+    <version>4.0.x</version>
     <packaging>pom</packaging>
 
     <name>Serverless Workflow :: Parent</name>
diff --git a/spi/pom.xml b/spi/pom.xml
index 8491b84b..a2d1532d 100644
--- a/spi/pom.xml
+++ b/spi/pom.xml
@@ -6,7 +6,7 @@
     <parent>
         <groupId>io.serverlessworkflow</groupId>
         <artifactId>serverlessworkflow-parent</artifactId>
-        <version>4.0.4.Final</version>
+        <version>4.0.x</version>
     </parent>
 
     <artifactId>serverlessworkflow-spi</artifactId>
diff --git a/utils/pom.xml b/utils/pom.xml
index 7033598c..4fab2886 100644
--- a/utils/pom.xml
+++ b/utils/pom.xml
@@ -6,7 +6,7 @@
     <parent>
         <groupId>io.serverlessworkflow</groupId>
         <artifactId>serverlessworkflow-parent</artifactId>
-        <version>4.0.4.Final</version>
+        <version>4.0.x</version>
     </parent>
 
     <artifactId>serverlessworkflow-util</artifactId>
diff --git a/validation/pom.xml b/validation/pom.xml
index c806030a..399a0abf 100644
--- a/validation/pom.xml
+++ b/validation/pom.xml
@@ -6,7 +6,7 @@
     <parent>
         <groupId>io.serverlessworkflow</groupId>
         <artifactId>serverlessworkflow-parent</artifactId>
-        <version>4.0.4.Final</version>
+        <version>4.0.x</version>
     </parent>
 
     <artifactId>serverlessworkflow-validation</artifactId>

From cd97bc8caa420f41d8a0415069314865b5eea9a2 Mon Sep 17 00:00:00 2001
From: Ricardo Zanini <1538000+ricardozanini@users.noreply.github.com>
Date: Tue, 4 Jul 2023 19:28:53 -0300
Subject: [PATCH 029/109] Key property is missing in the Workflow (#234)

fixes https://github.com/serverlessworkflow/sdk-java/issues/227

Signed-off-by: Spolti <filippespolti@gmail.com>
Signed-off-by: Ricardo Zanini <zanini@redhat.com>
Co-authored-by: Spolti <filippespolti@gmail.com>
---
 .../api/serializers/WorkflowSerializer.java   |  3 +
 api/src/main/resources/schema/workflow.json   | 25 +++++---
 .../api/test/MarkupToWorkflowTest.java        | 43 ++++++++++++-
 .../resources/examples/applicantrequest.json  |  1 +
 .../applicantrequest-with-id-and-key.json     | 60 +++++++++++++++++++
 .../applicantrequest-with-id-and-key.yml      | 34 +++++++++++
 .../features/applicantrequest-with-key.json   | 59 ++++++++++++++++++
 .../features/applicantrequest-with-key.yml    | 33 ++++++++++
 .../validation/WorkflowValidatorImpl.java     |  6 +-
 .../test/WorkflowValidationTest.java          | 27 ++++++++-
 10 files changed, 277 insertions(+), 14 deletions(-)
 create mode 100644 api/src/test/resources/features/applicantrequest-with-id-and-key.json
 create mode 100644 api/src/test/resources/features/applicantrequest-with-id-and-key.yml
 create mode 100644 api/src/test/resources/features/applicantrequest-with-key.json
 create mode 100644 api/src/test/resources/features/applicantrequest-with-key.yml

diff --git a/api/src/main/java/io/serverlessworkflow/api/serializers/WorkflowSerializer.java b/api/src/main/java/io/serverlessworkflow/api/serializers/WorkflowSerializer.java
index 7fd83c76..4bbaf9c1 100644
--- a/api/src/main/java/io/serverlessworkflow/api/serializers/WorkflowSerializer.java
+++ b/api/src/main/java/io/serverlessworkflow/api/serializers/WorkflowSerializer.java
@@ -53,6 +53,9 @@ public void serialize(Workflow workflow, JsonGenerator gen, SerializerProvider p
       gen.writeStringField("id", generateUniqueId());
     }
 
+    if (workflow.getKey() != null) {
+      gen.writeStringField("key", workflow.getKey());
+    }
     gen.writeStringField("name", workflow.getName());
 
     if (workflow.getDescription() != null && !workflow.getDescription().isEmpty()) {
diff --git a/api/src/main/resources/schema/workflow.json b/api/src/main/resources/schema/workflow.json
index 8fafeee5..3ed9ce58 100644
--- a/api/src/main/resources/schema/workflow.json
+++ b/api/src/main/resources/schema/workflow.json
@@ -11,8 +11,11 @@
   "properties": {
     "id": {
       "type": "string",
-      "description": "Workflow unique identifier",
-      "minLength": 1
+      "description": "Workflow unique identifier"
+    },
+    "key": {
+      "type": "string",
+      "description": "Workflow Domain-specific identifier"
     },
     "name": {
       "type": "string",
@@ -155,10 +158,14 @@
       }
     }
   },
-  "required": [
-    "id",
-    "name",
-    "version",
-    "states"
-  ]
-}
\ No newline at end of file
+ "required": [
+        "name",
+        "version",
+        "states"
+ ],
+ "dependencies":
+  {
+    "id": { "not": { "required": ["key"] } },
+    "key": { "not": { "required": ["id"] } }
+  }
+}
diff --git a/api/src/test/java/io/serverlessworkflow/api/test/MarkupToWorkflowTest.java b/api/src/test/java/io/serverlessworkflow/api/test/MarkupToWorkflowTest.java
index 768085e1..a1854d43 100644
--- a/api/src/test/java/io/serverlessworkflow/api/test/MarkupToWorkflowTest.java
+++ b/api/src/test/java/io/serverlessworkflow/api/test/MarkupToWorkflowTest.java
@@ -105,10 +105,11 @@ public void testSpecExamplesParsing(String workflowLocation) {
 
   @ParameterizedTest
   @ValueSource(strings = {"/features/applicantrequest.json", "/features/applicantrequest.yml"})
-  public void testSpecFreatureFunctionRef(String workflowLocation) {
+  public void testSpecFeatureFunctionRef(String workflowLocation) {
     Workflow workflow = Workflow.fromSource(WorkflowTestUtils.readWorkflowFile(workflowLocation));
 
     assertNotNull(workflow);
+    assertNull(workflow.getKey());
     assertNotNull(workflow.getId());
     assertNotNull(workflow.getName());
     assertNotNull(workflow.getStates());
@@ -118,6 +119,46 @@ public void testSpecFreatureFunctionRef(String workflowLocation) {
     assertEquals(1, workflow.getFunctions().getFunctionDefs().size());
   }
 
+  @ParameterizedTest
+  @ValueSource(
+      strings = {
+        "/features/applicantrequest-with-key.json",
+        "/features/applicantrequest-with-key.yml"
+      })
+  public void testSpecFeatureFunctionRefWithKey(String workflowLocation) {
+    Workflow workflow = Workflow.fromSource(WorkflowTestUtils.readWorkflowFile(workflowLocation));
+
+    assertNotNull(workflow);
+    assertEquals("applicant-key-request", workflow.getKey());
+    assertNull(workflow.getId());
+    assertNotNull(workflow.getName());
+    assertNotNull(workflow.getStates());
+    assertTrue(workflow.getStates().size() > 0);
+
+    assertNotNull(workflow.getFunctions());
+    assertEquals(1, workflow.getFunctions().getFunctionDefs().size());
+  }
+
+  @ParameterizedTest
+  @ValueSource(
+      strings = {
+        "/features/applicantrequest-with-id-and-key.json",
+        "/features/applicantrequest-with-id-and-key.yml"
+      })
+  public void testSpecFeatureFunctionRefWithIdAndKey(String workflowLocation) {
+    Workflow workflow = Workflow.fromSource(WorkflowTestUtils.readWorkflowFile(workflowLocation));
+
+    assertNotNull(workflow);
+    assertEquals("applicant-key-request", workflow.getKey());
+    assertEquals("applicant-with-key-and-id", workflow.getId());
+    assertNotNull(workflow.getName());
+    assertNotNull(workflow.getStates());
+    assertTrue(workflow.getStates().size() > 0);
+
+    assertNotNull(workflow.getFunctions());
+    assertEquals(1, workflow.getFunctions().getFunctionDefs().size());
+  }
+
   @ParameterizedTest
   @ValueSource(strings = {"/features/vetappointment.json", "/features/vetappointment.yml"})
   public void testSpecFreatureEventRef(String workflowLocation) {
diff --git a/api/src/test/resources/examples/applicantrequest.json b/api/src/test/resources/examples/applicantrequest.json
index 1621c2bd..652e361b 100644
--- a/api/src/test/resources/examples/applicantrequest.json
+++ b/api/src/test/resources/examples/applicantrequest.json
@@ -1,5 +1,6 @@
 {
   "id": "applicantrequest",
+  "key": "applicant-key-request",
   "version": "1.0",
   "specVersion": "0.8",
   "name": "Applicant Request Decision Workflow",
diff --git a/api/src/test/resources/features/applicantrequest-with-id-and-key.json b/api/src/test/resources/features/applicantrequest-with-id-and-key.json
new file mode 100644
index 00000000..405d7c36
--- /dev/null
+++ b/api/src/test/resources/features/applicantrequest-with-id-and-key.json
@@ -0,0 +1,60 @@
+{
+  "id": "applicant-with-key-and-id",
+  "key": "applicant-key-request",
+  "version": "1.0",
+  "specVersion": "0.8",
+  "name": "Applicant Request Decision Workflow",
+  "description": "Determine if applicant request is valid",
+  "start": "CheckApplication",
+  "functions": [
+    {
+      "name": "sendRejectionEmailFunction",
+      "operation": "http://myapis.org/applicationapi.json#emailRejection"
+    }
+  ],
+  "states":[
+    {
+      "name":"CheckApplication",
+      "type":"switch",
+      "dataConditions": [
+        {
+          "condition": "${ .applicants | .age >= 18 }",
+          "transition": "StartApplication"
+        },
+        {
+          "condition": "${ .applicants | .age < 18 }",
+          "transition": "RejectApplication"
+        }
+      ],
+      "defaultCondition": {
+        "transition": "RejectApplication"
+      }
+    },
+    {
+      "name": "StartApplication",
+      "type": "operation",
+      "actions": [
+        {
+          "subFlowRef": "startApplicationWorkflowId"
+        }
+      ],
+      "end": true
+    },
+    {
+      "name":"RejectApplication",
+      "type":"operation",
+      "actionMode":"sequential",
+      "actions":[
+        {
+          "functionRef": {
+            "refName": "sendRejectionEmailFunction",
+            "arguments": {
+              "applicant": "${ .applicant }"
+            }
+          }
+        }
+      ],
+      "end": true
+    }
+  ]
+}
\ No newline at end of file
diff --git a/api/src/test/resources/features/applicantrequest-with-id-and-key.yml b/api/src/test/resources/features/applicantrequest-with-id-and-key.yml
new file mode 100644
index 00000000..8a123663
--- /dev/null
+++ b/api/src/test/resources/features/applicantrequest-with-id-and-key.yml
@@ -0,0 +1,34 @@
+id: applicant-with-key-and-id
+key: applicant-key-request
+version: '1.0'
+specVersion: '0.8'
+name: Applicant Request Decision Workflow
+description: Determine if applicant request is valid
+start: CheckApplication
+functions:
+  - name: sendRejectionEmailFunction
+    operation: http://myapis.org/applicationapi.json#emailRejection
+states:
+  - name: CheckApplication
+    type: switch
+    dataConditions:
+      - condition: "${ .applicants | .age >= 18 }"
+        transition: StartApplication
+      - condition: "${ .applicants | .age < 18 }"
+        transition: RejectApplication
+    defaultCondition:
+      transition: RejectApplication
+  - name: StartApplication
+    type: operation
+    actions:
+      - subFlowRef: startApplicationWorkflowId
+    end: true
+  - name: RejectApplication
+    type: operation
+    actionMode: sequential
+    actions:
+      - functionRef:
+          refName: sendRejectionEmailFunction
+          arguments:
+            applicant: "${ .applicant }"
+    end: true
diff --git a/api/src/test/resources/features/applicantrequest-with-key.json b/api/src/test/resources/features/applicantrequest-with-key.json
new file mode 100644
index 00000000..f0481b00
--- /dev/null
+++ b/api/src/test/resources/features/applicantrequest-with-key.json
@@ -0,0 +1,59 @@
+{
+  "key": "applicant-key-request",
+  "version": "1.0",
+  "specVersion": "0.8",
+  "name": "Applicant Request Decision Workflow",
+  "description": "Determine if applicant request is valid",
+  "start": "CheckApplication",
+  "functions": [
+    {
+      "name": "sendRejectionEmailFunction",
+      "operation": "http://myapis.org/applicationapi.json#emailRejection"
+    }
+  ],
+  "states":[
+    {
+      "name":"CheckApplication",
+      "type":"switch",
+      "dataConditions": [
+        {
+          "condition": "${ .applicants | .age >= 18 }",
+          "transition": "StartApplication"
+        },
+        {
+          "condition": "${ .applicants | .age < 18 }",
+          "transition": "RejectApplication"
+        }
+      ],
+      "defaultCondition": {
+        "transition": "RejectApplication"
+      }
+    },
+    {
+      "name": "StartApplication",
+      "type": "operation",
+      "actions": [
+        {
+          "subFlowRef": "startApplicationWorkflowId"
+        }
+      ],
+      "end": true
+    },
+    {
+      "name":"RejectApplication",
+      "type":"operation",
+      "actionMode":"sequential",
+      "actions":[
+        {
+          "functionRef": {
+            "refName": "sendRejectionEmailFunction",
+            "arguments": {
+              "applicant": "${ .applicant }"
+            }
+          }
+        }
+      ],
+      "end": true
+    }
+  ]
+}
\ No newline at end of file
diff --git a/api/src/test/resources/features/applicantrequest-with-key.yml b/api/src/test/resources/features/applicantrequest-with-key.yml
new file mode 100644
index 00000000..85beed74
--- /dev/null
+++ b/api/src/test/resources/features/applicantrequest-with-key.yml
@@ -0,0 +1,33 @@
+key: applicant-key-request
+version: '1.0'
+specVersion: '0.8'
+name: Applicant Request Decision Workflow
+description: Determine if applicant request is valid
+start: CheckApplication
+functions:
+  - name: sendRejectionEmailFunction
+    operation: http://myapis.org/applicationapi.json#emailRejection
+states:
+  - name: CheckApplication
+    type: switch
+    dataConditions:
+      - condition: "${ .applicants | .age >= 18 }"
+        transition: StartApplication
+      - condition: "${ .applicants | .age < 18 }"
+        transition: RejectApplication
+    defaultCondition:
+      transition: RejectApplication
+  - name: StartApplication
+    type: operation
+    actions:
+      - subFlowRef: startApplicationWorkflowId
+    end: true
+  - name: RejectApplication
+    type: operation
+    actionMode: sequential
+    actions:
+      - functionRef:
+          refName: sendRejectionEmailFunction
+          arguments:
+            applicant: "${ .applicant }"
+    end: true
diff --git a/validation/src/main/java/io/serverlessworkflow/validation/WorkflowValidatorImpl.java b/validation/src/main/java/io/serverlessworkflow/validation/WorkflowValidatorImpl.java
index 1e0999c9..abef046b 100644
--- a/validation/src/main/java/io/serverlessworkflow/validation/WorkflowValidatorImpl.java
+++ b/validation/src/main/java/io/serverlessworkflow/validation/WorkflowValidatorImpl.java
@@ -112,8 +112,10 @@ public List<ValidationError> validate() {
       List<EventDefinition> events =
           workflow.getEvents() != null ? workflow.getEvents().getEventDefs() : null;
 
-      if (workflow.getId() == null || workflow.getId().trim().isEmpty()) {
-        addValidationError("Workflow id should not be empty", ValidationError.WORKFLOW_VALIDATION);
+      if ((workflow.getId() == null || workflow.getId().trim().isEmpty())
+          && (workflow.getKey() == null || workflow.getKey().trim().isEmpty())) {
+        addValidationError(
+            "Workflow id or key should not be empty", ValidationError.WORKFLOW_VALIDATION);
       }
 
       if (workflow.getVersion() == null || workflow.getVersion().trim().isEmpty()) {
diff --git a/validation/src/test/java/io/serverlessworkflow/validation/test/WorkflowValidationTest.java b/validation/src/test/java/io/serverlessworkflow/validation/test/WorkflowValidationTest.java
index 38dbe2d2..a81e14f6 100644
--- a/validation/src/test/java/io/serverlessworkflow/validation/test/WorkflowValidationTest.java
+++ b/validation/src/test/java/io/serverlessworkflow/validation/test/WorkflowValidationTest.java
@@ -44,8 +44,9 @@ public void testIncompleteJsonWithSchemaValidation() {
   public void testIncompleteYamlWithSchemaValidation() {
     WorkflowValidator workflowValidator = new WorkflowValidatorImpl();
     List<ValidationError> validationErrors =
-        workflowValidator.setSource("---\n" + "id: abc\n").validate();
+        workflowValidator.setSource("---\n" + "key: abc\n").validate();
     Assertions.assertNotNull(validationErrors);
+    System.out.println(validationErrors);
     Assertions.assertEquals(3, validationErrors.size());
   }
 
@@ -93,6 +94,27 @@ public void testWorkflowMissingStates() {
     Assertions.assertEquals("No states found", validationErrors.get(0).getMessage());
   }
 
+  @Test
+  public void testWorkflowMissingStatesIdAndKey() {
+    WorkflowValidator workflowValidator = new WorkflowValidatorImpl();
+    List<ValidationError> validationErrors =
+        workflowValidator
+            .setSource(
+                "{\n"
+                    + "\t\"name\": \"test workflow\",\n"
+                    + "  \"version\": \"1.0\",\n"
+                    + "  \"start\": \"SomeState\",\n"
+                    + "  \"states\": []\n"
+                    + "}")
+            .validate();
+    Assertions.assertNotNull(validationErrors);
+    Assertions.assertEquals(2, validationErrors.size());
+
+    Assertions.assertEquals(
+        "Workflow id or key should not be empty", validationErrors.get(0).getMessage());
+    Assertions.assertEquals("No states found", validationErrors.get(1).getMessage());
+  }
+
   @Test
   public void testOperationStateNoFunctionRef() {
     WorkflowValidator workflowValidator = new WorkflowValidatorImpl();
@@ -101,7 +123,7 @@ public void testOperationStateNoFunctionRef() {
             .setSource(
                 "{\n"
                     + "\"id\": \"checkInbox\",\n"
-                    + "  \"name\": \"Check Inbox Workflow\",\n"
+                    + "\"name\": \"Check Inbox Workflow\",\n"
                     + "\"description\": \"Periodically Check Inbox\",\n"
                     + "\"version\": \"1.0\",\n"
                     + "\"start\": \"CheckInbox\",\n"
@@ -140,6 +162,7 @@ public void testOperationStateNoFunctionRef() {
     Assertions.assertNotNull(validationErrors);
     Assertions.assertEquals(1, validationErrors.size());
 
+    // validationErrors.stream().forEach(v -> System.out.println(v.toString()));
     Assertions.assertEquals(
         "Operation State action functionRef does not reference an existing workflow function definition",
         validationErrors.get(0).getMessage());

From 9909d60205db5f4edba5016c84b6968d19597757 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Mari=C3=A1n=20Macik?= <mmacik@redhat.com>
Date: Tue, 11 Jul 2023 18:44:14 +0200
Subject: [PATCH 030/109] Remove unnecessary version tags from pom.xml files
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit

Signed-off-by: Marián Macik <mmacik@redhat.com>
---
 api/pom.xml        | 1 -
 diagram/pom.xml    | 1 -
 spi/pom.xml        | 1 -
 utils/pom.xml      | 1 -
 validation/pom.xml | 1 -
 5 files changed, 5 deletions(-)

diff --git a/api/pom.xml b/api/pom.xml
index 3d060b5d..8b27e853 100644
--- a/api/pom.xml
+++ b/api/pom.xml
@@ -11,7 +11,6 @@
 
     <artifactId>serverlessworkflow-api</artifactId>
     <name>Serverless Workflow :: API</name>
-    <version>${project.parent.version}</version>
     <packaging>jar</packaging>
     <description>Java SDK for Serverless Workflow Specification</description>
 
diff --git a/diagram/pom.xml b/diagram/pom.xml
index 5cd03836..2668c850 100644
--- a/diagram/pom.xml
+++ b/diagram/pom.xml
@@ -11,7 +11,6 @@
 
     <artifactId>serverlessworkflow-diagram</artifactId>
     <name>Serverless Workflow :: Diagram</name>
-    <version>${project.parent.version}</version>
     <packaging>jar</packaging>
     <description>Java SDK for Serverless Workflow Specification</description>
 
diff --git a/spi/pom.xml b/spi/pom.xml
index a2d1532d..db4fbf79 100644
--- a/spi/pom.xml
+++ b/spi/pom.xml
@@ -11,7 +11,6 @@
 
     <artifactId>serverlessworkflow-spi</artifactId>
     <name>Serverless Workflow :: SPI</name>
-    <version>${project.parent.version}</version>
     <packaging>jar</packaging>
     <description>Java SDK for Serverless Workflow Specification</description>
 
diff --git a/utils/pom.xml b/utils/pom.xml
index 4fab2886..3c479281 100644
--- a/utils/pom.xml
+++ b/utils/pom.xml
@@ -11,7 +11,6 @@
 
     <artifactId>serverlessworkflow-util</artifactId>
     <name>Serverless Workflow :: Utils</name>
-    <version>${project.parent.version}</version>
     <packaging>jar</packaging>
     <description>Java SDK for Serverless Workflow Specification</description>
 
diff --git a/validation/pom.xml b/validation/pom.xml
index 399a0abf..57afbbb5 100644
--- a/validation/pom.xml
+++ b/validation/pom.xml
@@ -11,7 +11,6 @@
 
     <artifactId>serverlessworkflow-validation</artifactId>
     <name>Serverless Workflow :: Validation</name>
-    <version>${project.parent.version}</version>
     <packaging>jar</packaging>
     <description>Java SDK for Serverless Workflow Specification</description>
 

From 9a0396436450eb59311f9bd2fe81d977225dab9b Mon Sep 17 00:00:00 2001
From: Francisco Javier Tirado Sarti <ftirados@redhat.com>
Date: Thu, 6 Jul 2023 14:27:27 +0200
Subject: [PATCH 031/109] Removing gson and everit dependencies

Signed-off-by: Francisco Javier Tirado Sarti <ftirados@redhat.com>
Signed-off-by: Ricardo Zanini <zanini@redhat.com>
---
 api/pom.xml                                   |   9 -
 .../api/deserializers/AuthDeserializer.java   |  17 +-
 .../deserializers/ConstantsDeserializer.java  |  18 +-
 .../api/deserializers/ErrorsDeserializer.java |  17 +-
 .../api/deserializers/EventsDeserializer.java |  16 +-
 .../deserializers/FunctionsDeserializer.java  |  15 +-
 .../deserializers/RetriesDeserializer.java    |  17 +-
 .../deserializers/SecretsDeserializer.java    |  17 +-
 .../api/interfaces/WorkflowValidator.java     |   4 +-
 .../api/mapper/JsonObjectMapperFactory.java   |  27 ++
 .../api/mapper/YamlObjectMapperFactory.java   |  27 ++
 .../schemaclient/ResourceSchemaClient.java    |  38 --
 .../serverlessworkflow/api/utils/Utils.java   |  15 +
 .../api/validation/ValidationError.java       |  16 +
 .../api/validation/WorkflowSchemaLoader.java  |  33 +-
 pom.xml                                       |  23 +-
 validation/pom.xml                            |   7 +-
 .../validation/WorkflowValidatorImpl.java     | 445 +++++++++---------
 .../test/WorkflowValidationTest.java          |  75 +--
 19 files changed, 375 insertions(+), 461 deletions(-)
 create mode 100644 api/src/main/java/io/serverlessworkflow/api/mapper/JsonObjectMapperFactory.java
 create mode 100644 api/src/main/java/io/serverlessworkflow/api/mapper/YamlObjectMapperFactory.java
 delete mode 100644 api/src/main/java/io/serverlessworkflow/api/schemaclient/ResourceSchemaClient.java

diff --git a/api/pom.xml b/api/pom.xml
index 8b27e853..67f19e47 100644
--- a/api/pom.xml
+++ b/api/pom.xml
@@ -42,15 +42,6 @@
             <groupId>javax.validation</groupId>
             <artifactId>validation-api</artifactId>
         </dependency>
-        <dependency>
-            <groupId>org.json</groupId>
-            <artifactId>json</artifactId>
-        </dependency>
-        <dependency>
-            <groupId>com.github.erosb</groupId>
-            <artifactId>everit-json-schema</artifactId>
-        </dependency>
-
         <!-- test -->
         <dependency>
             <groupId>org.junit.jupiter</groupId>
diff --git a/api/src/main/java/io/serverlessworkflow/api/deserializers/AuthDeserializer.java b/api/src/main/java/io/serverlessworkflow/api/deserializers/AuthDeserializer.java
index abdb0583..aa078cb4 100644
--- a/api/src/main/java/io/serverlessworkflow/api/deserializers/AuthDeserializer.java
+++ b/api/src/main/java/io/serverlessworkflow/api/deserializers/AuthDeserializer.java
@@ -20,7 +20,6 @@
 import com.fasterxml.jackson.databind.JsonNode;
 import com.fasterxml.jackson.databind.ObjectMapper;
 import com.fasterxml.jackson.databind.deser.std.StdDeserializer;
-import com.fasterxml.jackson.dataformat.yaml.YAMLFactory;
 import io.serverlessworkflow.api.auth.AuthDefinition;
 import io.serverlessworkflow.api.interfaces.WorkflowPropertySource;
 import io.serverlessworkflow.api.utils.Utils;
@@ -28,7 +27,6 @@
 import java.io.IOException;
 import java.util.ArrayList;
 import java.util.List;
-import org.json.JSONObject;
 import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
 
@@ -69,21 +67,8 @@ public Auth deserialize(JsonParser jp, DeserializationContext ctxt) throws IOExc
     } else {
       String authFileDef = node.asText();
       String authFileSrc = Utils.getResourceFileAsString(authFileDef);
-      JsonNode authRefNode;
-      ObjectMapper jsonWriter = new ObjectMapper();
       if (authFileSrc != null && authFileSrc.trim().length() > 0) {
-        // if its a yaml def convert to json first
-        if (!authFileSrc.trim().startsWith("{")) {
-          // convert yaml to json to validate
-          ObjectMapper yamlReader = new ObjectMapper(new YAMLFactory());
-          Object obj = yamlReader.readValue(authFileSrc, Object.class);
-
-          authRefNode =
-              jsonWriter.readTree(new JSONObject(jsonWriter.writeValueAsString(obj)).toString());
-        } else {
-          authRefNode = jsonWriter.readTree(new JSONObject(authFileSrc).toString());
-        }
-
+        JsonNode authRefNode = Utils.getNode(authFileSrc);
         JsonNode refAuth = authRefNode.get("auth");
         if (refAuth != null) {
           for (final JsonNode nodeEle : refAuth) {
diff --git a/api/src/main/java/io/serverlessworkflow/api/deserializers/ConstantsDeserializer.java b/api/src/main/java/io/serverlessworkflow/api/deserializers/ConstantsDeserializer.java
index c3789b52..3859273c 100644
--- a/api/src/main/java/io/serverlessworkflow/api/deserializers/ConstantsDeserializer.java
+++ b/api/src/main/java/io/serverlessworkflow/api/deserializers/ConstantsDeserializer.java
@@ -18,14 +18,11 @@
 import com.fasterxml.jackson.core.JsonParser;
 import com.fasterxml.jackson.databind.DeserializationContext;
 import com.fasterxml.jackson.databind.JsonNode;
-import com.fasterxml.jackson.databind.ObjectMapper;
 import com.fasterxml.jackson.databind.deser.std.StdDeserializer;
-import com.fasterxml.jackson.dataformat.yaml.YAMLFactory;
 import io.serverlessworkflow.api.interfaces.WorkflowPropertySource;
 import io.serverlessworkflow.api.utils.Utils;
 import io.serverlessworkflow.api.workflow.Constants;
 import java.io.IOException;
-import org.json.JSONObject;
 import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
 
@@ -63,21 +60,8 @@ public Constants deserialize(JsonParser jp, DeserializationContext ctxt) throws
     } else {
       String constantsFileDef = node.asText();
       String constantsFileSrc = Utils.getResourceFileAsString(constantsFileDef);
-      JsonNode constantsRefNode;
-      ObjectMapper jsonWriter = new ObjectMapper();
       if (constantsFileSrc != null && constantsFileSrc.trim().length() > 0) {
-        // if its a yaml def convert to json first
-        if (!constantsFileSrc.trim().startsWith("{")) {
-          // convert yaml to json to validate
-          ObjectMapper yamlReader = new ObjectMapper(new YAMLFactory());
-          Object obj = yamlReader.readValue(constantsFileSrc, Object.class);
-
-          constantsRefNode =
-              jsonWriter.readTree(new JSONObject(jsonWriter.writeValueAsString(obj)).toString());
-        } else {
-          constantsRefNode = jsonWriter.readTree(new JSONObject(constantsFileSrc).toString());
-        }
-
+        JsonNode constantsRefNode = Utils.getNode(constantsFileSrc);
         JsonNode refConstants = constantsRefNode.get("constants");
         if (refConstants != null) {
           constantsDefinition = refConstants;
diff --git a/api/src/main/java/io/serverlessworkflow/api/deserializers/ErrorsDeserializer.java b/api/src/main/java/io/serverlessworkflow/api/deserializers/ErrorsDeserializer.java
index beedc7dd..6fe366ea 100644
--- a/api/src/main/java/io/serverlessworkflow/api/deserializers/ErrorsDeserializer.java
+++ b/api/src/main/java/io/serverlessworkflow/api/deserializers/ErrorsDeserializer.java
@@ -20,7 +20,6 @@
 import com.fasterxml.jackson.databind.JsonNode;
 import com.fasterxml.jackson.databind.ObjectMapper;
 import com.fasterxml.jackson.databind.deser.std.StdDeserializer;
-import com.fasterxml.jackson.dataformat.yaml.YAMLFactory;
 import io.serverlessworkflow.api.error.ErrorDefinition;
 import io.serverlessworkflow.api.interfaces.WorkflowPropertySource;
 import io.serverlessworkflow.api.utils.Utils;
@@ -28,7 +27,6 @@
 import java.io.IOException;
 import java.util.ArrayList;
 import java.util.List;
-import org.json.JSONObject;
 import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
 
@@ -69,21 +67,8 @@ public Errors deserialize(JsonParser jp, DeserializationContext ctxt) throws IOE
     } else {
       String errorsFileDef = node.asText();
       String errorsFileSrc = Utils.getResourceFileAsString(errorsFileDef);
-      JsonNode errorsRefNode;
-      ObjectMapper jsonWriter = new ObjectMapper();
       if (errorsFileSrc != null && errorsFileSrc.trim().length() > 0) {
-        // if its a yaml def convert to json first
-        if (!errorsFileSrc.trim().startsWith("{")) {
-          // convert yaml to json to validate
-          ObjectMapper yamlReader = new ObjectMapper(new YAMLFactory());
-          Object obj = yamlReader.readValue(errorsFileSrc, Object.class);
-
-          errorsRefNode =
-              jsonWriter.readTree(new JSONObject(jsonWriter.writeValueAsString(obj)).toString());
-        } else {
-          errorsRefNode = jsonWriter.readTree(new JSONObject(errorsFileSrc).toString());
-        }
-
+        JsonNode errorsRefNode = Utils.getNode(errorsFileSrc);
         JsonNode refErrors = errorsRefNode.get("errors");
         if (refErrors != null) {
           for (final JsonNode nodeEle : refErrors) {
diff --git a/api/src/main/java/io/serverlessworkflow/api/deserializers/EventsDeserializer.java b/api/src/main/java/io/serverlessworkflow/api/deserializers/EventsDeserializer.java
index cfa207df..a02fdf4b 100644
--- a/api/src/main/java/io/serverlessworkflow/api/deserializers/EventsDeserializer.java
+++ b/api/src/main/java/io/serverlessworkflow/api/deserializers/EventsDeserializer.java
@@ -20,7 +20,6 @@
 import com.fasterxml.jackson.databind.JsonNode;
 import com.fasterxml.jackson.databind.ObjectMapper;
 import com.fasterxml.jackson.databind.deser.std.StdDeserializer;
-import com.fasterxml.jackson.dataformat.yaml.YAMLFactory;
 import io.serverlessworkflow.api.events.EventDefinition;
 import io.serverlessworkflow.api.interfaces.WorkflowPropertySource;
 import io.serverlessworkflow.api.utils.Utils;
@@ -28,7 +27,6 @@
 import java.io.IOException;
 import java.util.ArrayList;
 import java.util.List;
-import org.json.JSONObject;
 import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
 
@@ -69,21 +67,9 @@ public Events deserialize(JsonParser jp, DeserializationContext ctxt) throws IOE
     } else {
       String eventsFileDef = node.asText();
       String eventsFileSrc = Utils.getResourceFileAsString(eventsFileDef);
-      JsonNode eventsRefNode;
-      ObjectMapper jsonWriter = new ObjectMapper();
       if (eventsFileSrc != null && eventsFileSrc.trim().length() > 0) {
         // if its a yaml def convert to json first
-        if (!eventsFileSrc.trim().startsWith("{")) {
-          // convert yaml to json to validate
-          ObjectMapper yamlReader = new ObjectMapper(new YAMLFactory());
-          Object obj = yamlReader.readValue(eventsFileSrc, Object.class);
-
-          eventsRefNode =
-              jsonWriter.readTree(new JSONObject(jsonWriter.writeValueAsString(obj)).toString());
-        } else {
-          eventsRefNode = jsonWriter.readTree(new JSONObject(eventsFileSrc).toString());
-        }
-
+        JsonNode eventsRefNode = Utils.getNode(eventsFileSrc);
         JsonNode refEvents = eventsRefNode.get("events");
         if (refEvents != null) {
           for (final JsonNode nodeEle : refEvents) {
diff --git a/api/src/main/java/io/serverlessworkflow/api/deserializers/FunctionsDeserializer.java b/api/src/main/java/io/serverlessworkflow/api/deserializers/FunctionsDeserializer.java
index c27e2c48..b706b2d3 100644
--- a/api/src/main/java/io/serverlessworkflow/api/deserializers/FunctionsDeserializer.java
+++ b/api/src/main/java/io/serverlessworkflow/api/deserializers/FunctionsDeserializer.java
@@ -20,7 +20,6 @@
 import com.fasterxml.jackson.databind.JsonNode;
 import com.fasterxml.jackson.databind.ObjectMapper;
 import com.fasterxml.jackson.databind.deser.std.StdDeserializer;
-import com.fasterxml.jackson.dataformat.yaml.YAMLFactory;
 import io.serverlessworkflow.api.functions.FunctionDefinition;
 import io.serverlessworkflow.api.interfaces.WorkflowPropertySource;
 import io.serverlessworkflow.api.utils.Utils;
@@ -28,7 +27,6 @@
 import java.io.IOException;
 import java.util.ArrayList;
 import java.util.List;
-import org.json.JSONObject;
 import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
 
@@ -69,20 +67,9 @@ public Functions deserialize(JsonParser jp, DeserializationContext ctxt) throws
       String functionsFileDef = node.asText();
       String functionsFileSrc = Utils.getResourceFileAsString(functionsFileDef);
       JsonNode functionsRefNode;
-      ObjectMapper jsonWriter = new ObjectMapper();
       if (functionsFileSrc != null && functionsFileSrc.trim().length() > 0) {
         // if its a yaml def convert to json first
-        if (!functionsFileSrc.trim().startsWith("{")) {
-          // convert yaml to json to validate
-          ObjectMapper yamlReader = new ObjectMapper(new YAMLFactory());
-          Object obj = yamlReader.readValue(functionsFileSrc, Object.class);
-
-          functionsRefNode =
-              jsonWriter.readTree(new JSONObject(jsonWriter.writeValueAsString(obj)).toString());
-        } else {
-          functionsRefNode = jsonWriter.readTree(new JSONObject(functionsFileSrc).toString());
-        }
-
+        functionsRefNode = Utils.getNode(functionsFileSrc);
         JsonNode refFunctions = functionsRefNode.get("functions");
         if (refFunctions != null) {
           for (final JsonNode nodeEle : refFunctions) {
diff --git a/api/src/main/java/io/serverlessworkflow/api/deserializers/RetriesDeserializer.java b/api/src/main/java/io/serverlessworkflow/api/deserializers/RetriesDeserializer.java
index ff2fe44d..66f9e1b7 100644
--- a/api/src/main/java/io/serverlessworkflow/api/deserializers/RetriesDeserializer.java
+++ b/api/src/main/java/io/serverlessworkflow/api/deserializers/RetriesDeserializer.java
@@ -20,7 +20,6 @@
 import com.fasterxml.jackson.databind.JsonNode;
 import com.fasterxml.jackson.databind.ObjectMapper;
 import com.fasterxml.jackson.databind.deser.std.StdDeserializer;
-import com.fasterxml.jackson.dataformat.yaml.YAMLFactory;
 import io.serverlessworkflow.api.interfaces.WorkflowPropertySource;
 import io.serverlessworkflow.api.retry.RetryDefinition;
 import io.serverlessworkflow.api.utils.Utils;
@@ -28,7 +27,6 @@
 import java.io.IOException;
 import java.util.ArrayList;
 import java.util.List;
-import org.json.JSONObject;
 import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
 
@@ -69,21 +67,10 @@ public Retries deserialize(JsonParser jp, DeserializationContext ctxt) throws IO
     } else {
       String retriesFileDef = node.asText();
       String retriesFileSrc = Utils.getResourceFileAsString(retriesFileDef);
-      JsonNode retriesRefNode;
-      ObjectMapper jsonWriter = new ObjectMapper();
+      ;
       if (retriesFileSrc != null && retriesFileSrc.trim().length() > 0) {
         // if its a yaml def convert to json first
-        if (!retriesFileSrc.trim().startsWith("{")) {
-          // convert yaml to json to validate
-          ObjectMapper yamlReader = new ObjectMapper(new YAMLFactory());
-          Object obj = yamlReader.readValue(retriesFileSrc, Object.class);
-
-          retriesRefNode =
-              jsonWriter.readTree(new JSONObject(jsonWriter.writeValueAsString(obj)).toString());
-        } else {
-          retriesRefNode = jsonWriter.readTree(new JSONObject(retriesFileSrc).toString());
-        }
-
+        JsonNode retriesRefNode = Utils.getNode(retriesFileSrc);
         JsonNode refRetries = retriesRefNode.get("retries");
         if (refRetries != null) {
           for (final JsonNode nodeEle : refRetries) {
diff --git a/api/src/main/java/io/serverlessworkflow/api/deserializers/SecretsDeserializer.java b/api/src/main/java/io/serverlessworkflow/api/deserializers/SecretsDeserializer.java
index e9ec05e7..60cc2a82 100644
--- a/api/src/main/java/io/serverlessworkflow/api/deserializers/SecretsDeserializer.java
+++ b/api/src/main/java/io/serverlessworkflow/api/deserializers/SecretsDeserializer.java
@@ -18,16 +18,13 @@
 import com.fasterxml.jackson.core.JsonParser;
 import com.fasterxml.jackson.databind.DeserializationContext;
 import com.fasterxml.jackson.databind.JsonNode;
-import com.fasterxml.jackson.databind.ObjectMapper;
 import com.fasterxml.jackson.databind.deser.std.StdDeserializer;
-import com.fasterxml.jackson.dataformat.yaml.YAMLFactory;
 import io.serverlessworkflow.api.interfaces.WorkflowPropertySource;
 import io.serverlessworkflow.api.utils.Utils;
 import io.serverlessworkflow.api.workflow.Secrets;
 import java.io.IOException;
 import java.util.ArrayList;
 import java.util.List;
-import org.json.JSONObject;
 import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
 
@@ -66,21 +63,9 @@ public Secrets deserialize(JsonParser jp, DeserializationContext ctxt) throws IO
     } else {
       String secretsFileDef = node.asText();
       String secretsFileSrc = Utils.getResourceFileAsString(secretsFileDef);
-      JsonNode secretsRefNode;
-      ObjectMapper jsonWriter = new ObjectMapper();
       if (secretsFileSrc != null && secretsFileSrc.trim().length() > 0) {
         // if its a yaml def convert to json first
-        if (!secretsFileSrc.trim().startsWith("{")) {
-          // convert yaml to json to validate
-          ObjectMapper yamlReader = new ObjectMapper(new YAMLFactory());
-          Object obj = yamlReader.readValue(secretsFileSrc, Object.class);
-
-          secretsRefNode =
-              jsonWriter.readTree(new JSONObject(jsonWriter.writeValueAsString(obj)).toString());
-        } else {
-          secretsRefNode = jsonWriter.readTree(new JSONObject(secretsFileSrc).toString());
-        }
-
+        JsonNode secretsRefNode = Utils.getNode(secretsFileSrc);
         JsonNode refSecrets = secretsRefNode.get("secrets");
         if (refSecrets != null) {
           for (final JsonNode nodeEle : refSecrets) {
diff --git a/api/src/main/java/io/serverlessworkflow/api/interfaces/WorkflowValidator.java b/api/src/main/java/io/serverlessworkflow/api/interfaces/WorkflowValidator.java
index 199a0927..09c79066 100644
--- a/api/src/main/java/io/serverlessworkflow/api/interfaces/WorkflowValidator.java
+++ b/api/src/main/java/io/serverlessworkflow/api/interfaces/WorkflowValidator.java
@@ -17,7 +17,7 @@
 
 import io.serverlessworkflow.api.Workflow;
 import io.serverlessworkflow.api.validation.ValidationError;
-import java.util.List;
+import java.util.Collection;
 
 public interface WorkflowValidator {
 
@@ -25,7 +25,7 @@ public interface WorkflowValidator {
 
   WorkflowValidator setSource(String source);
 
-  List<ValidationError> validate();
+  Collection<ValidationError> validate();
 
   boolean isValid();
 
diff --git a/api/src/main/java/io/serverlessworkflow/api/mapper/JsonObjectMapperFactory.java b/api/src/main/java/io/serverlessworkflow/api/mapper/JsonObjectMapperFactory.java
new file mode 100644
index 00000000..eb34b0eb
--- /dev/null
+++ b/api/src/main/java/io/serverlessworkflow/api/mapper/JsonObjectMapperFactory.java
@@ -0,0 +1,27 @@
+/*
+ * Copyright 2020-Present The Serverless Workflow Specification Authors
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package io.serverlessworkflow.api.mapper;
+
+import com.fasterxml.jackson.databind.ObjectMapper;
+
+public class JsonObjectMapperFactory {
+
+  private static final ObjectMapper instance = new JsonObjectMapper();
+
+  public static final ObjectMapper mapper() {
+    return instance;
+  }
+}
diff --git a/api/src/main/java/io/serverlessworkflow/api/mapper/YamlObjectMapperFactory.java b/api/src/main/java/io/serverlessworkflow/api/mapper/YamlObjectMapperFactory.java
new file mode 100644
index 00000000..04371db4
--- /dev/null
+++ b/api/src/main/java/io/serverlessworkflow/api/mapper/YamlObjectMapperFactory.java
@@ -0,0 +1,27 @@
+/*
+ * Copyright 2020-Present The Serverless Workflow Specification Authors
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package io.serverlessworkflow.api.mapper;
+
+import com.fasterxml.jackson.databind.ObjectMapper;
+
+public class YamlObjectMapperFactory {
+
+  private static final ObjectMapper instance = new YamlObjectMapper();
+
+  public static final ObjectMapper mapper() {
+    return instance;
+  }
+}
diff --git a/api/src/main/java/io/serverlessworkflow/api/schemaclient/ResourceSchemaClient.java b/api/src/main/java/io/serverlessworkflow/api/schemaclient/ResourceSchemaClient.java
deleted file mode 100644
index a4da2387..00000000
--- a/api/src/main/java/io/serverlessworkflow/api/schemaclient/ResourceSchemaClient.java
+++ /dev/null
@@ -1,38 +0,0 @@
-/*
- * Copyright 2020-Present The Serverless Workflow Specification Authors
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package io.serverlessworkflow.api.schemaclient;
-
-import java.io.InputStream;
-import java.util.Objects;
-import org.everit.json.schema.loader.SchemaClient;
-
-public class ResourceSchemaClient implements SchemaClient {
-
-  @SuppressWarnings("unused")
-  private final SchemaClient fallbackClient;
-
-  private final String baseResourcePath = "/schema/";
-
-  public ResourceSchemaClient(SchemaClient fallbackClient) {
-    this.fallbackClient = Objects.requireNonNull(fallbackClient, "fallbackClient cannot be null");
-  }
-
-  @Override
-  public InputStream get(String path) {
-    path = path.substring("https://wg-serverless.org/".length());
-    return this.getClass().getResourceAsStream(baseResourcePath + path);
-  }
-}
diff --git a/api/src/main/java/io/serverlessworkflow/api/utils/Utils.java b/api/src/main/java/io/serverlessworkflow/api/utils/Utils.java
index 3e4b4274..9bdce416 100644
--- a/api/src/main/java/io/serverlessworkflow/api/utils/Utils.java
+++ b/api/src/main/java/io/serverlessworkflow/api/utils/Utils.java
@@ -15,6 +15,11 @@
  */
 package io.serverlessworkflow.api.utils;
 
+import com.fasterxml.jackson.core.JsonProcessingException;
+import com.fasterxml.jackson.databind.JsonNode;
+import com.fasterxml.jackson.databind.ObjectMapper;
+import io.serverlessworkflow.api.mapper.JsonObjectMapperFactory;
+import io.serverlessworkflow.api.mapper.YamlObjectMapperFactory;
 import java.io.BufferedReader;
 import java.io.IOException;
 import java.io.InputStream;
@@ -34,4 +39,14 @@ public static String getResourceFileAsString(String fileName) throws IOException
       }
     }
   }
+
+  public static ObjectMapper getObjectMapper(String source) {
+    return !source.trim().startsWith("{")
+        ? YamlObjectMapperFactory.mapper()
+        : JsonObjectMapperFactory.mapper();
+  }
+
+  public static JsonNode getNode(String source) throws JsonProcessingException {
+    return getObjectMapper(source).readTree(source);
+  }
 }
diff --git a/api/src/main/java/io/serverlessworkflow/api/validation/ValidationError.java b/api/src/main/java/io/serverlessworkflow/api/validation/ValidationError.java
index edb92eff..2aebccf9 100644
--- a/api/src/main/java/io/serverlessworkflow/api/validation/ValidationError.java
+++ b/api/src/main/java/io/serverlessworkflow/api/validation/ValidationError.java
@@ -15,6 +15,8 @@
  */
 package io.serverlessworkflow.api.validation;
 
+import java.util.Objects;
+
 public class ValidationError {
   private static final String MSG_FORMAT = "%s:%s";
   public static final String SCHEMA_VALIDATION = "schemavalidation";
@@ -43,4 +45,18 @@ public void setType(String type) {
   public String toString() {
     return String.format(MSG_FORMAT, type, message);
   }
+
+  @Override
+  public int hashCode() {
+    return Objects.hash(message, type);
+  }
+
+  @Override
+  public boolean equals(Object obj) {
+    if (this == obj) return true;
+    if (obj == null) return false;
+    if (getClass() != obj.getClass()) return false;
+    ValidationError other = (ValidationError) obj;
+    return Objects.equals(message, other.message) && Objects.equals(type, other.type);
+  }
 }
diff --git a/api/src/main/java/io/serverlessworkflow/api/validation/WorkflowSchemaLoader.java b/api/src/main/java/io/serverlessworkflow/api/validation/WorkflowSchemaLoader.java
index 830bb50a..847380fb 100644
--- a/api/src/main/java/io/serverlessworkflow/api/validation/WorkflowSchemaLoader.java
+++ b/api/src/main/java/io/serverlessworkflow/api/validation/WorkflowSchemaLoader.java
@@ -15,26 +15,23 @@
  */
 package io.serverlessworkflow.api.validation;
 
-import io.serverlessworkflow.api.schemaclient.ResourceSchemaClient;
-import org.everit.json.schema.Schema;
-import org.everit.json.schema.loader.SchemaLoader;
-import org.everit.json.schema.loader.internal.DefaultSchemaClient;
-import org.json.JSONObject;
-import org.json.JSONTokener;
+import com.fasterxml.jackson.databind.JsonNode;
+import com.fasterxml.jackson.databind.ObjectMapper;
+import java.io.IOException;
+import java.io.UncheckedIOException;
 
 public class WorkflowSchemaLoader {
-  private static final JSONObject workflowSchema =
-      new JSONObject(
-          new JSONTokener(WorkflowSchemaLoader.class.getResourceAsStream("/schema/workflow.json")));
 
-  public static Schema getWorkflowSchema() {
-    SchemaLoader schemaLoader =
-        SchemaLoader.builder()
-            .schemaClient(new ResourceSchemaClient(new DefaultSchemaClient()))
-            .schemaJson(workflowSchema)
-            .resolutionScope("classpath:schema")
-            .draftV7Support()
-            .build();
-    return schemaLoader.load().build();
+  public static JsonNode getWorkflowSchema() {
+    try {
+      return ObjectMapperHolder.objectMapper.readTree(
+          WorkflowSchemaLoader.class.getResourceAsStream("/schema/workflow.json"));
+    } catch (IOException e) {
+      throw new UncheckedIOException(e);
+    }
+  }
+
+  private static class ObjectMapperHolder {
+    public static final ObjectMapper objectMapper = new ObjectMapper();
   }
 }
diff --git a/pom.xml b/pom.xml
index 53a2abf3..eb36b90f 100644
--- a/pom.xml
+++ b/pom.xml
@@ -62,6 +62,7 @@
         <version.org.slf4j>1.7.25</version.org.slf4j>
         <version.com.fasterxml.jackson>2.10.3</version.com.fasterxml.jackson>
         <version.javax.validation>2.0.1.Final</version.javax.validation>
+        <version.com.github.java-json-tools>2.2.14</version.com.github.java-json-tools>
         <version.org.junit.minor>6.0</version.org.junit.minor>
         <version.org.junit>5.${version.org.junit.minor}</version.org.junit>
         <version.org.junit.jupiter>${version.org.junit}</version.org.junit.jupiter>
@@ -73,7 +74,6 @@
         <hamcrest.version>1.3</hamcrest.version>
         <jsonassert.version>1.5.0</jsonassert.version>
         <json.schema.validation.version>1.14.1</json.schema.validation.version>
-        <version.json>20230618</version.json>
         <version.thymeleaf>3.0.11.RELEASE</version.thymeleaf>
         <version.plantuml>8059</version.plantuml>
         <version.graphviz>0.17.0</version.graphviz>
@@ -125,6 +125,11 @@
                 <artifactId>jackson-databind</artifactId>
                 <version>${version.com.fasterxml.jackson}</version>
             </dependency>
+            <dependency>
+              <groupId>com.github.java-json-tools</groupId>
+              <artifactId>json-schema-validator</artifactId>
+              <version>${version.com.github.java-json-tools}</version>
+            </dependency>
             <dependency>
                 <groupId>com.fasterxml.jackson.dataformat</groupId>
                 <artifactId>jackson-dataformat-yaml</artifactId>
@@ -140,22 +145,6 @@
                 <artifactId>commons-lang3</artifactId>
                 <version>${commons.lang.version}</version>
             </dependency>
-            <dependency>
-                <groupId>com.github.erosb</groupId>
-                <artifactId>everit-json-schema</artifactId>
-                <version>${json.schema.validation.version}</version>
-                <exclusions>
-                    <exclusion>
-                        <groupId>commons-logging</groupId>
-                        <artifactId>commons-logging</artifactId>
-                    </exclusion>
-                </exclusions>
-            </dependency>
-            <dependency>
-                <groupId>org.json</groupId>
-                <artifactId>json</artifactId>
-                <version>${version.json}</version>
-            </dependency>
             <dependency>
                 <groupId>org.thymeleaf</groupId>
                 <artifactId>thymeleaf</artifactId>
diff --git a/validation/pom.xml b/validation/pom.xml
index 57afbbb5..c47449a9 100644
--- a/validation/pom.xml
+++ b/validation/pom.xml
@@ -35,11 +35,10 @@
             <artifactId>commons-lang3</artifactId>
         </dependency>
 
-        <dependency>
-            <groupId>com.github.erosb</groupId>
-            <artifactId>everit-json-schema</artifactId>
+       <dependency>
+         <groupId>com.github.java-json-tools</groupId>
+         <artifactId>json-schema-validator</artifactId>
         </dependency>
-
         <!-- test -->
         <dependency>
             <groupId>org.junit.jupiter</groupId>
diff --git a/validation/src/main/java/io/serverlessworkflow/validation/WorkflowValidatorImpl.java b/validation/src/main/java/io/serverlessworkflow/validation/WorkflowValidatorImpl.java
index abef046b..1e7022f4 100644
--- a/validation/src/main/java/io/serverlessworkflow/validation/WorkflowValidatorImpl.java
+++ b/validation/src/main/java/io/serverlessworkflow/validation/WorkflowValidatorImpl.java
@@ -15,8 +15,9 @@
  */
 package io.serverlessworkflow.validation;
 
-import com.fasterxml.jackson.databind.ObjectMapper;
-import com.fasterxml.jackson.dataformat.yaml.YAMLFactory;
+import com.fasterxml.jackson.databind.JsonNode;
+import com.github.fge.jsonschema.core.exceptions.ProcessingException;
+import com.github.fge.jsonschema.main.JsonSchemaFactory;
 import io.serverlessworkflow.api.Workflow;
 import io.serverlessworkflow.api.actions.Action;
 import io.serverlessworkflow.api.events.EventDefinition;
@@ -27,15 +28,15 @@
 import io.serverlessworkflow.api.states.*;
 import io.serverlessworkflow.api.switchconditions.DataCondition;
 import io.serverlessworkflow.api.switchconditions.EventCondition;
+import io.serverlessworkflow.api.utils.Utils;
 import io.serverlessworkflow.api.validation.ValidationError;
 import io.serverlessworkflow.api.validation.WorkflowSchemaLoader;
-import java.util.ArrayList;
+import java.io.IOException;
+import java.util.Collection;
 import java.util.HashSet;
+import java.util.LinkedHashSet;
 import java.util.List;
 import java.util.Set;
-import org.everit.json.schema.Schema;
-import org.everit.json.schema.ValidationException;
-import org.json.JSONObject;
 import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
 
@@ -43,8 +44,8 @@ public class WorkflowValidatorImpl implements WorkflowValidator {
 
   private static final Logger logger = LoggerFactory.getLogger(WorkflowValidatorImpl.class);
   private boolean schemaValidationEnabled = true;
-  private List<ValidationError> validationErrors = new ArrayList<>();
-  private Schema workflowSchema = WorkflowSchemaLoader.getWorkflowSchema();
+  private Collection<ValidationError> validationErrors = new LinkedHashSet<>();
+  private JsonNode workflowSchema = WorkflowSchemaLoader.getWorkflowSchema();
   private String source;
   private Workflow workflow;
 
@@ -61,39 +62,16 @@ public WorkflowValidator setSource(String source) {
   }
 
   @Override
-  public List<ValidationError> validate() {
+  public Collection<ValidationError> validate() {
     validationErrors.clear();
-    if (workflow == null) {
+    if (workflow == null && schemaValidationEnabled && source != null) {
       try {
-        if (schemaValidationEnabled && source != null) {
-          try {
-            if (!source.trim().startsWith("{")) {
-              // convert yaml to json to validate
-              ObjectMapper yamlReader = new ObjectMapper(new YAMLFactory());
-              Object obj = yamlReader.readValue(source, Object.class);
-
-              ObjectMapper jsonWriter = new ObjectMapper();
-
-              workflowSchema.validate(new JSONObject(jsonWriter.writeValueAsString(obj)));
-            } else {
-              workflowSchema.validate(new JSONObject(source));
-            }
-          } catch (ValidationException e) {
-            e.getCausingExceptions().stream()
-                .map(ValidationException::getMessage)
-                .forEach(
-                    m -> {
-                      if ((!m.equals("#/functions: expected type: JSONObject, found: JSONArray")
-                          && !m.equals("#/events: expected type: JSONObject, found: JSONArray")
-                          && !m.equals("#/start: expected type: JSONObject, found: String")
-                          && !m.equals("#/retries: expected type: JSONObject, found: JSONArray"))) {
-                        addValidationError(m, ValidationError.SCHEMA_VALIDATION);
-                      }
-                    });
-          }
-        }
-      } catch (Exception e) {
-        logger.error("Schema validation exception: " + e.getMessage());
+        JsonSchemaFactory.byDefault()
+            .getJsonSchema(workflowSchema)
+            .validate(Utils.getNode(source))
+            .forEach(m -> addValidationError(m.getMessage(), ValidationError.SCHEMA_VALIDATION));
+      } catch (ProcessingException | IOException e) {
+        logger.error("Unexpected error during validation", e);
       }
     }
 
@@ -101,258 +79,255 @@ public List<ValidationError> validate() {
     // there is no point of doing the workflow validation
     if (validationErrors.size() > 0) {
       return validationErrors;
-    } else {
-      if (workflow == null) {
-        workflow = Workflow.fromSource(source);
-      }
+    } else if (workflow == null) {
+      workflow = Workflow.fromSource(source);
+    }
 
-      List<FunctionDefinition> functions =
-          workflow.getFunctions() != null ? workflow.getFunctions().getFunctionDefs() : null;
+    List<FunctionDefinition> functions =
+        workflow.getFunctions() != null ? workflow.getFunctions().getFunctionDefs() : null;
 
-      List<EventDefinition> events =
-          workflow.getEvents() != null ? workflow.getEvents().getEventDefs() : null;
+    List<EventDefinition> events =
+        workflow.getEvents() != null ? workflow.getEvents().getEventDefs() : null;
 
-      if ((workflow.getId() == null || workflow.getId().trim().isEmpty())
-          && (workflow.getKey() == null || workflow.getKey().trim().isEmpty())) {
-        addValidationError(
-            "Workflow id or key should not be empty", ValidationError.WORKFLOW_VALIDATION);
-      }
+    if ((workflow.getId() == null || workflow.getId().trim().isEmpty())
+        && (workflow.getKey() == null || workflow.getKey().trim().isEmpty())) {
+      addValidationError(
+          "Workflow id or key should not be empty", ValidationError.WORKFLOW_VALIDATION);
+    }
 
-      if (workflow.getVersion() == null || workflow.getVersion().trim().isEmpty()) {
-        addValidationError(
-            "Workflow version should not be empty", ValidationError.WORKFLOW_VALIDATION);
-      }
+    if (workflow.getVersion() == null || workflow.getVersion().trim().isEmpty()) {
+      addValidationError(
+          "Workflow version should not be empty", ValidationError.WORKFLOW_VALIDATION);
+    }
 
-      if (workflow.getStates() == null || workflow.getStates().isEmpty()) {
-        addValidationError("No states found", ValidationError.WORKFLOW_VALIDATION);
-      }
+    if (workflow.getStates() == null || workflow.getStates().isEmpty()) {
+      addValidationError("No states found", ValidationError.WORKFLOW_VALIDATION);
+    }
 
-      if (workflow.getStates() != null && !workflow.getStates().isEmpty()) {
-        boolean existingStateWithStartProperty = false;
-        if (workflow.getStart() != null) {
-          String startProperty = workflow.getStart().getStateName();
-          for (State s : workflow.getStates()) {
-            if (s.getName().equals(startProperty)) {
-              existingStateWithStartProperty = true;
-              break;
-            }
+    if (workflow.getStates() != null && !workflow.getStates().isEmpty()) {
+      boolean existingStateWithStartProperty = false;
+      if (workflow.getStart() != null) {
+        String startProperty = workflow.getStart().getStateName();
+        for (State s : workflow.getStates()) {
+          if (s.getName().equals(startProperty)) {
+            existingStateWithStartProperty = true;
+            break;
           }
-        } else {
-          existingStateWithStartProperty = true;
-        }
-        if (!existingStateWithStartProperty) {
-          addValidationError(
-              "No state name found that matches the workflow start definition",
-              ValidationError.WORKFLOW_VALIDATION);
         }
+      } else {
+        existingStateWithStartProperty = true;
       }
+      if (!existingStateWithStartProperty) {
+        addValidationError(
+            "No state name found that matches the workflow start definition",
+            ValidationError.WORKFLOW_VALIDATION);
+      }
+    }
 
-      Validation validation = new Validation();
-      if (workflow.getStates() != null && !workflow.getStates().isEmpty()) {
-        workflow
-            .getStates()
-            .forEach(
-                s -> {
-                  if (s.getName() != null && s.getName().trim().isEmpty()) {
-                    addValidationError(
-                        "State name should not be empty", ValidationError.WORKFLOW_VALIDATION);
-                  } else {
-                    validation.addState(s.getName());
-                  }
-
-                  if (s.getEnd() != null) {
-                    validation.addEndState();
-                  }
-
-                  if (s instanceof OperationState) {
-                    OperationState operationState = (OperationState) s;
-
-                    List<Action> actions = operationState.getActions();
-                    for (Action action : actions) {
-                      if (action.getFunctionRef() != null) {
-                        if (action.getFunctionRef().getRefName().isEmpty()) {
-                          addValidationError(
-                              "Operation State action functionRef should not be null or empty",
-                              ValidationError.WORKFLOW_VALIDATION);
-                        }
-
-                        if (!haveFunctionDefinition(
-                            action.getFunctionRef().getRefName(), functions)) {
-                          addValidationError(
-                              "Operation State action functionRef does not reference an existing workflow function definition",
-                              ValidationError.WORKFLOW_VALIDATION);
-                        }
+    Validation validation = new Validation();
+    if (workflow.getStates() != null && !workflow.getStates().isEmpty()) {
+      workflow
+          .getStates()
+          .forEach(
+              s -> {
+                if (s.getName() != null && s.getName().trim().isEmpty()) {
+                  addValidationError(
+                      "State name should not be empty", ValidationError.WORKFLOW_VALIDATION);
+                } else {
+                  validation.addState(s.getName());
+                }
+
+                if (s.getEnd() != null) {
+                  validation.addEndState();
+                }
+
+                if (s instanceof OperationState) {
+                  OperationState operationState = (OperationState) s;
+
+                  List<Action> actions = operationState.getActions();
+                  for (Action action : actions) {
+                    if (action.getFunctionRef() != null) {
+                      if (action.getFunctionRef().getRefName().isEmpty()) {
+                        addValidationError(
+                            "Operation State action functionRef should not be null or empty",
+                            ValidationError.WORKFLOW_VALIDATION);
                       }
 
-                      if (action.getEventRef() != null) {
-                        if (action.getEventRef().getTriggerEventRef().isEmpty()) {
-                          addValidationError(
-                              "Operation State action trigger eventRef does not reference an existing workflow event definition",
-                              ValidationError.WORKFLOW_VALIDATION);
-                        }
-
-                        if (action.getEventRef().getResultEventRef().isEmpty()) {
-                          addValidationError(
-                              "Operation State action results eventRef does not reference an existing workflow event definition",
-                              ValidationError.WORKFLOW_VALIDATION);
-                        }
+                      if (!haveFunctionDefinition(
+                          action.getFunctionRef().getRefName(), functions)) {
+                        addValidationError(
+                            "Operation State action functionRef does not reference an existing workflow function definition",
+                            ValidationError.WORKFLOW_VALIDATION);
+                      }
+                    }
 
-                        if (!haveEventsDefinition(
-                            action.getEventRef().getTriggerEventRef(), events)) {
-                          addValidationError(
-                              "Operation State action trigger event def does not reference an existing workflow event definition",
-                              ValidationError.WORKFLOW_VALIDATION);
-                        }
+                    if (action.getEventRef() != null) {
+                      if (action.getEventRef().getTriggerEventRef().isEmpty()) {
+                        addValidationError(
+                            "Operation State action trigger eventRef does not reference an existing workflow event definition",
+                            ValidationError.WORKFLOW_VALIDATION);
+                      }
 
-                        if (!haveEventsDefinition(
-                            action.getEventRef().getResultEventRef(), events)) {
-                          addValidationError(
-                              "Operation State action results event def does not reference an existing workflow event definition",
-                              ValidationError.WORKFLOW_VALIDATION);
-                        }
+                      if (action.getEventRef().getResultEventRef().isEmpty()) {
+                        addValidationError(
+                            "Operation State action results eventRef does not reference an existing workflow event definition",
+                            ValidationError.WORKFLOW_VALIDATION);
                       }
-                    }
-                  }
 
-                  if (s instanceof EventState) {
-                    EventState eventState = (EventState) s;
-                    if (eventState.getOnEvents() == null || eventState.getOnEvents().size() < 1) {
-                      addValidationError(
-                          "Event State has no eventActions defined",
-                          ValidationError.WORKFLOW_VALIDATION);
-                    }
-                    List<OnEvents> eventsActionsList = eventState.getOnEvents();
-                    for (OnEvents onEvents : eventsActionsList) {
+                      if (!haveEventsDefinition(
+                          action.getEventRef().getTriggerEventRef(), events)) {
+                        addValidationError(
+                            "Operation State action trigger event def does not reference an existing workflow event definition",
+                            ValidationError.WORKFLOW_VALIDATION);
+                      }
 
-                      List<String> eventRefs = onEvents.getEventRefs();
-                      if (eventRefs == null || eventRefs.size() < 1) {
+                      if (!haveEventsDefinition(action.getEventRef().getResultEventRef(), events)) {
                         addValidationError(
-                            "Event State eventsActions has no event refs",
+                            "Operation State action results event def does not reference an existing workflow event definition",
                             ValidationError.WORKFLOW_VALIDATION);
-                      } else {
-                        for (String eventRef : eventRefs) {
-                          if (!haveEventsDefinition(eventRef, events)) {
-                            addValidationError(
-                                "Event State eventsActions eventRef does not match a declared workflow event definition",
-                                ValidationError.WORKFLOW_VALIDATION);
-                          }
-                        }
                       }
                     }
                   }
+                }
 
-                  if (s instanceof SwitchState) {
-                    SwitchState switchState = (SwitchState) s;
-                    if ((switchState.getDataConditions() == null
-                            || switchState.getDataConditions().size() < 1)
-                        && (switchState.getEventConditions() == null
-                            || switchState.getEventConditions().size() < 1)) {
-                      addValidationError(
-                          "Switch state should define either data or event conditions",
-                          ValidationError.WORKFLOW_VALIDATION);
-                    }
+                if (s instanceof EventState) {
+                  EventState eventState = (EventState) s;
+                  if (eventState.getOnEvents() == null || eventState.getOnEvents().size() < 1) {
+                    addValidationError(
+                        "Event State has no eventActions defined",
+                        ValidationError.WORKFLOW_VALIDATION);
+                  }
+                  List<OnEvents> eventsActionsList = eventState.getOnEvents();
+                  for (OnEvents onEvents : eventsActionsList) {
 
-                    if (switchState.getDefaultCondition() == null) {
+                    List<String> eventRefs = onEvents.getEventRefs();
+                    if (eventRefs == null || eventRefs.size() < 1) {
                       addValidationError(
-                          "Switch state should define a default transition",
+                          "Event State eventsActions has no event refs",
                           ValidationError.WORKFLOW_VALIDATION);
-                    }
-
-                    if (switchState.getEventConditions() != null
-                        && switchState.getEventConditions().size() > 0) {
-                      List<EventCondition> eventConditions = switchState.getEventConditions();
-                      for (EventCondition ec : eventConditions) {
-                        if (!haveEventsDefinition(ec.getEventRef(), events)) {
+                    } else {
+                      for (String eventRef : eventRefs) {
+                        if (!haveEventsDefinition(eventRef, events)) {
                           addValidationError(
-                              "Switch state event condition eventRef does not reference a defined workflow event",
+                              "Event State eventsActions eventRef does not match a declared workflow event definition",
                               ValidationError.WORKFLOW_VALIDATION);
                         }
-                        if (ec.getEnd() != null) {
-                          validation.addEndState();
-                        }
                       }
                     }
+                  }
+                }
+
+                if (s instanceof SwitchState) {
+                  SwitchState switchState = (SwitchState) s;
+                  if ((switchState.getDataConditions() == null
+                          || switchState.getDataConditions().size() < 1)
+                      && (switchState.getEventConditions() == null
+                          || switchState.getEventConditions().size() < 1)) {
+                    addValidationError(
+                        "Switch state should define either data or event conditions",
+                        ValidationError.WORKFLOW_VALIDATION);
+                  }
 
-                    if (switchState.getDataConditions() != null
-                        && switchState.getDataConditions().size() > 0) {
-                      List<DataCondition> dataConditions = switchState.getDataConditions();
-                      for (DataCondition dc : dataConditions) {
-                        if (dc.getEnd() != null) {
-                          validation.addEndState();
-                        }
+                  if (switchState.getDefaultCondition() == null) {
+                    addValidationError(
+                        "Switch state should define a default transition",
+                        ValidationError.WORKFLOW_VALIDATION);
+                  }
+
+                  if (switchState.getEventConditions() != null
+                      && switchState.getEventConditions().size() > 0) {
+                    List<EventCondition> eventConditions = switchState.getEventConditions();
+                    for (EventCondition ec : eventConditions) {
+                      if (!haveEventsDefinition(ec.getEventRef(), events)) {
+                        addValidationError(
+                            "Switch state event condition eventRef does not reference a defined workflow event",
+                            ValidationError.WORKFLOW_VALIDATION);
+                      }
+                      if (ec.getEnd() != null) {
+                        validation.addEndState();
                       }
                     }
                   }
 
-                  if (s instanceof SleepState) {
-                    SleepState sleepState = (SleepState) s;
-                    if (sleepState.getDuration() == null || sleepState.getDuration().length() < 1) {
-                      addValidationError(
-                          "Sleep state should have a non-empty time delay",
-                          ValidationError.WORKFLOW_VALIDATION);
+                  if (switchState.getDataConditions() != null
+                      && switchState.getDataConditions().size() > 0) {
+                    List<DataCondition> dataConditions = switchState.getDataConditions();
+                    for (DataCondition dc : dataConditions) {
+                      if (dc.getEnd() != null) {
+                        validation.addEndState();
+                      }
                     }
                   }
+                }
 
-                  if (s instanceof ParallelState) {
-                    ParallelState parallelState = (ParallelState) s;
+                if (s instanceof SleepState) {
+                  SleepState sleepState = (SleepState) s;
+                  if (sleepState.getDuration() == null || sleepState.getDuration().length() < 1) {
+                    addValidationError(
+                        "Sleep state should have a non-empty time delay",
+                        ValidationError.WORKFLOW_VALIDATION);
+                  }
+                }
 
-                    if (parallelState.getBranches() == null
-                        || parallelState.getBranches().size() < 2) {
-                      addValidationError(
-                          "Parallel state should have at lest two branches",
-                          ValidationError.WORKFLOW_VALIDATION);
-                    }
+                if (s instanceof ParallelState) {
+                  ParallelState parallelState = (ParallelState) s;
+
+                  if (parallelState.getBranches() == null
+                      || parallelState.getBranches().size() < 2) {
+                    addValidationError(
+                        "Parallel state should have at lest two branches",
+                        ValidationError.WORKFLOW_VALIDATION);
                   }
+                }
 
-                  if (s instanceof InjectState) {
-                    InjectState injectState = (InjectState) s;
-                    if (injectState.getData() == null || injectState.getData().isEmpty()) {
-                      addValidationError(
-                          "InjectState should have non-null data",
-                          ValidationError.WORKFLOW_VALIDATION);
-                    }
+                if (s instanceof InjectState) {
+                  InjectState injectState = (InjectState) s;
+                  if (injectState.getData() == null || injectState.getData().isEmpty()) {
+                    addValidationError(
+                        "InjectState should have non-null data",
+                        ValidationError.WORKFLOW_VALIDATION);
                   }
+                }
 
-                  if (s instanceof ForEachState) {
-                    ForEachState forEachState = (ForEachState) s;
-                    if (forEachState.getInputCollection() == null
-                        || forEachState.getInputCollection().isEmpty()) {
-                      addValidationError(
-                          "ForEach state should have a valid inputCollection",
-                          ValidationError.WORKFLOW_VALIDATION);
-                    }
+                if (s instanceof ForEachState) {
+                  ForEachState forEachState = (ForEachState) s;
+                  if (forEachState.getInputCollection() == null
+                      || forEachState.getInputCollection().isEmpty()) {
+                    addValidationError(
+                        "ForEach state should have a valid inputCollection",
+                        ValidationError.WORKFLOW_VALIDATION);
                   }
+                }
 
-                  if (s instanceof CallbackState) {
-                    CallbackState callbackState = (CallbackState) s;
+                if (s instanceof CallbackState) {
+                  CallbackState callbackState = (CallbackState) s;
 
-                    if (!haveEventsDefinition(callbackState.getEventRef(), events)) {
-                      addValidationError(
-                          "CallbackState event ref does not reference a defined workflow event definition",
-                          ValidationError.WORKFLOW_VALIDATION);
-                    }
+                  if (!haveEventsDefinition(callbackState.getEventRef(), events)) {
+                    addValidationError(
+                        "CallbackState event ref does not reference a defined workflow event definition",
+                        ValidationError.WORKFLOW_VALIDATION);
+                  }
 
-                    if (!haveFunctionDefinition(
-                        callbackState.getAction().getFunctionRef().getRefName(), functions)) {
-                      addValidationError(
-                          "CallbackState action function ref does not reference a defined workflow function definition",
-                          ValidationError.WORKFLOW_VALIDATION);
-                    }
+                  if (!haveFunctionDefinition(
+                      callbackState.getAction().getFunctionRef().getRefName(), functions)) {
+                    addValidationError(
+                        "CallbackState action function ref does not reference a defined workflow function definition",
+                        ValidationError.WORKFLOW_VALIDATION);
                   }
-                });
+                }
+              });
 
-        if (validation.endStates == 0) {
-          addValidationError("No end state found.", ValidationError.WORKFLOW_VALIDATION);
-        }
+      if (validation.endStates == 0) {
+        addValidationError("No end state found.", ValidationError.WORKFLOW_VALIDATION);
       }
-
-      return validationErrors;
     }
+
+    return validationErrors;
   }
 
   @Override
   public boolean isValid() {
-    return validate().size() < 1;
+    return validate().isEmpty();
   }
 
   @Override
diff --git a/validation/src/test/java/io/serverlessworkflow/validation/test/WorkflowValidationTest.java b/validation/src/test/java/io/serverlessworkflow/validation/test/WorkflowValidationTest.java
index a81e14f6..052bc687 100644
--- a/validation/src/test/java/io/serverlessworkflow/validation/test/WorkflowValidationTest.java
+++ b/validation/src/test/java/io/serverlessworkflow/validation/test/WorkflowValidationTest.java
@@ -25,7 +25,7 @@
 import io.serverlessworkflow.api.validation.ValidationError;
 import io.serverlessworkflow.validation.WorkflowValidatorImpl;
 import java.util.Arrays;
-import java.util.List;
+import java.util.Collection;
 import org.junit.jupiter.api.Assertions;
 import org.junit.jupiter.api.Test;
 
@@ -34,7 +34,7 @@ public class WorkflowValidationTest {
   @Test
   public void testIncompleteJsonWithSchemaValidation() {
     WorkflowValidator workflowValidator = new WorkflowValidatorImpl();
-    List<ValidationError> validationErrors =
+    Collection<ValidationError> validationErrors =
         workflowValidator.setSource("{\n" + "  \"id\": \"abc\" \n" + "}").validate();
     Assertions.assertNotNull(validationErrors);
     Assertions.assertEquals(3, validationErrors.size());
@@ -43,7 +43,7 @@ public void testIncompleteJsonWithSchemaValidation() {
   @Test
   public void testIncompleteYamlWithSchemaValidation() {
     WorkflowValidator workflowValidator = new WorkflowValidatorImpl();
-    List<ValidationError> validationErrors =
+    Collection<ValidationError> validationErrors =
         workflowValidator.setSource("---\n" + "key: abc\n").validate();
     Assertions.assertNotNull(validationErrors);
     System.out.println(validationErrors);
@@ -66,18 +66,22 @@ public void testFromIncompleteWorkflow() {
                         .withDuration("PT1M")));
 
     WorkflowValidator workflowValidator = new WorkflowValidatorImpl();
-    List<ValidationError> validationErrors = workflowValidator.setWorkflow(workflow).validate();
+    Collection<ValidationError> validationErrors =
+        workflowValidator.setWorkflow(workflow).validate();
     Assertions.assertNotNull(validationErrors);
     Assertions.assertEquals(1, validationErrors.size());
-    Assertions.assertEquals(
-        "No state name found that matches the workflow start definition",
-        validationErrors.get(0).getMessage());
+    Assertions.assertTrue(
+        validationErrors.stream()
+            .anyMatch(
+                v ->
+                    v.getMessage()
+                        .equals("No state name found that matches the workflow start definition")));
   }
 
   @Test
   public void testWorkflowMissingStates() {
     WorkflowValidator workflowValidator = new WorkflowValidatorImpl();
-    List<ValidationError> validationErrors =
+    Collection<ValidationError> validationErrors =
         workflowValidator
             .setSource(
                 "{\n"
@@ -91,13 +95,14 @@ public void testWorkflowMissingStates() {
     Assertions.assertNotNull(validationErrors);
     Assertions.assertEquals(1, validationErrors.size());
 
-    Assertions.assertEquals("No states found", validationErrors.get(0).getMessage());
+    Assertions.assertTrue(
+        validationErrors.stream().anyMatch(v -> v.getMessage().equals("No states found")));
   }
 
   @Test
   public void testWorkflowMissingStatesIdAndKey() {
     WorkflowValidator workflowValidator = new WorkflowValidatorImpl();
-    List<ValidationError> validationErrors =
+    Collection<ValidationError> validationErrors =
         workflowValidator
             .setSource(
                 "{\n"
@@ -109,16 +114,20 @@ public void testWorkflowMissingStatesIdAndKey() {
             .validate();
     Assertions.assertNotNull(validationErrors);
     Assertions.assertEquals(2, validationErrors.size());
-
     Assertions.assertEquals(
-        "Workflow id or key should not be empty", validationErrors.get(0).getMessage());
-    Assertions.assertEquals("No states found", validationErrors.get(1).getMessage());
+        validationErrors.stream()
+            .filter(
+                v ->
+                    v.getMessage().equals("No states found")
+                        || v.getMessage().equals("Workflow id or key should not be empty"))
+            .count(),
+        2);
   }
 
   @Test
   public void testOperationStateNoFunctionRef() {
     WorkflowValidator workflowValidator = new WorkflowValidatorImpl();
-    List<ValidationError> validationErrors =
+    Collection<ValidationError> validationErrors =
         workflowValidator
             .setSource(
                 "{\n"
@@ -162,10 +171,13 @@ public void testOperationStateNoFunctionRef() {
     Assertions.assertNotNull(validationErrors);
     Assertions.assertEquals(1, validationErrors.size());
 
-    // validationErrors.stream().forEach(v -> System.out.println(v.toString()));
-    Assertions.assertEquals(
-        "Operation State action functionRef does not reference an existing workflow function definition",
-        validationErrors.get(0).getMessage());
+    Assertions.assertTrue(
+        validationErrors.stream()
+            .anyMatch(
+                v ->
+                    v.getMessage()
+                        .equals(
+                            "Operation State action functionRef does not reference an existing workflow function definition")));
   }
 
   @Test
@@ -183,7 +195,8 @@ public void testValidateWorkflowForOptionalStartStateAndWorkflowName() {
                         .withDuration("PT1M")));
 
     WorkflowValidator workflowValidator = new WorkflowValidatorImpl();
-    List<ValidationError> validationErrors = workflowValidator.setWorkflow(workflow).validate();
+    Collection<ValidationError> validationErrors =
+        workflowValidator.setWorkflow(workflow).validate();
     Assertions.assertNotNull(validationErrors);
     Assertions.assertEquals(0, validationErrors.size());
   }
@@ -191,7 +204,7 @@ public void testValidateWorkflowForOptionalStartStateAndWorkflowName() {
   @Test
   public void testValidateWorkflowForOptionalIterationParam() {
     WorkflowValidator workflowValidator = new WorkflowValidatorImpl();
-    List<ValidationError> validationErrors =
+    Collection<ValidationError> validationErrors =
         workflowValidator
             .setSource(
                 "{\n"
@@ -232,15 +245,13 @@ public void testValidateWorkflowForOptionalIterationParam() {
             .validate();
 
     Assertions.assertNotNull(validationErrors);
-    Assertions.assertEquals(
-        1,
-        validationErrors.size()); // validation error raised for functionref not for iterationParam
+    Assertions.assertEquals(1, validationErrors.size());
   }
 
   @Test
   public void testMissingFunctionRefForCallbackState() {
     WorkflowValidator workflowValidator = new WorkflowValidatorImpl();
-    List<ValidationError> validationErrors =
+    Collection<ValidationError> validationErrors =
         workflowValidator
             .setSource(
                 "{\n"
@@ -274,10 +285,16 @@ public void testMissingFunctionRefForCallbackState() {
     Assertions.assertNotNull(validationErrors);
     Assertions.assertEquals(2, validationErrors.size());
     Assertions.assertEquals(
-        "CallbackState event ref does not reference a defined workflow event definition",
-        validationErrors.get(0).getMessage());
-    Assertions.assertEquals(
-        "CallbackState action function ref does not reference a defined workflow function definition",
-        validationErrors.get(1).getMessage());
+        validationErrors.stream()
+            .filter(
+                v ->
+                    v.getMessage()
+                            .equals(
+                                "CallbackState event ref does not reference a defined workflow event definition")
+                        || v.getMessage()
+                            .equals(
+                                "CallbackState action function ref does not reference a defined workflow function definition"))
+            .count(),
+        2);
   }
 }

From 6fc14089457d071b42cec205d43b67e41e1b9c3f Mon Sep 17 00:00:00 2001
From: Francisco Javier Tirado Sarti <ftirados@redhat.com>
Date: Thu, 6 Jul 2023 17:23:03 +0200
Subject: [PATCH 032/109] Changing to networknt

Signed-off-by: Francisco Javier Tirado Sarti <ftirados@redhat.com>
Signed-off-by: Ricardo Zanini <zanini@redhat.com>
---
 api/pom.xml                                   |  3 --
 .../deserializers/RetriesDeserializer.java    |  2 -
 api/src/main/resources/schema/workflow.json   |  2 +-
 pom.xml                                       | 19 +++++----
 validation/pom.xml                            |  7 ++--
 .../validation/WorkflowValidatorImpl.java     | 41 ++++++++-----------
 .../test/WorkflowValidationTest.java          |  9 ----
 7 files changed, 32 insertions(+), 51 deletions(-)

diff --git a/api/pom.xml b/api/pom.xml
index 67f19e47..63ba1ef1 100644
--- a/api/pom.xml
+++ b/api/pom.xml
@@ -26,17 +26,14 @@
         <dependency>
             <groupId>com.fasterxml.jackson.core</groupId>
             <artifactId>jackson-core</artifactId>
-            <version>[2.13.0,)</version>
         </dependency>
         <dependency>
             <groupId>com.fasterxml.jackson.core</groupId>
             <artifactId>jackson-databind</artifactId>
-            <version>[2.13.0,)</version>
         </dependency>
         <dependency>
             <groupId>com.fasterxml.jackson.dataformat</groupId>
             <artifactId>jackson-dataformat-yaml</artifactId>
-            <version>[2.13.0,)</version>
         </dependency>
         <dependency>
             <groupId>javax.validation</groupId>
diff --git a/api/src/main/java/io/serverlessworkflow/api/deserializers/RetriesDeserializer.java b/api/src/main/java/io/serverlessworkflow/api/deserializers/RetriesDeserializer.java
index 66f9e1b7..9eb47b5f 100644
--- a/api/src/main/java/io/serverlessworkflow/api/deserializers/RetriesDeserializer.java
+++ b/api/src/main/java/io/serverlessworkflow/api/deserializers/RetriesDeserializer.java
@@ -67,9 +67,7 @@ public Retries deserialize(JsonParser jp, DeserializationContext ctxt) throws IO
     } else {
       String retriesFileDef = node.asText();
       String retriesFileSrc = Utils.getResourceFileAsString(retriesFileDef);
-      ;
       if (retriesFileSrc != null && retriesFileSrc.trim().length() > 0) {
-        // if its a yaml def convert to json first
         JsonNode retriesRefNode = Utils.getNode(retriesFileSrc);
         JsonNode refRetries = retriesRefNode.get("retries");
         if (refRetries != null) {
diff --git a/api/src/main/resources/schema/workflow.json b/api/src/main/resources/schema/workflow.json
index 3ed9ce58..dd349995 100644
--- a/api/src/main/resources/schema/workflow.json
+++ b/api/src/main/resources/schema/workflow.json
@@ -1,5 +1,5 @@
 {
-  "$id": "https://wg-serverless.org/workflow.schema.json",
+  "$id": "classpath:schema/workflow.schema.json",
   "$schema": "http://json-schema.org/draft-07/schema#",
   "description": "Serverless Workflow is a vendor-neutral specification for defining the model of workflows responsible for orchestrating event-driven serverless applications.",
   "type": "object",
diff --git a/pom.xml b/pom.xml
index eb36b90f..c9e06c52 100644
--- a/pom.xml
+++ b/pom.xml
@@ -58,11 +58,10 @@
         <version.failsafe.plugin>2.22.0</version.failsafe.plugin>
         <version.checkstyle.plugin>3.1.1</version.checkstyle.plugin>
         <version.deploy.plugin>2.8.2</version.deploy.plugin>
-
+        <version.com.networknt>1.0.86</version.com.networknt>
         <version.org.slf4j>1.7.25</version.org.slf4j>
-        <version.com.fasterxml.jackson>2.10.3</version.com.fasterxml.jackson>
+        <version.com.fasterxml.jackson>2.15.2</version.com.fasterxml.jackson>
         <version.javax.validation>2.0.1.Final</version.javax.validation>
-        <version.com.github.java-json-tools>2.2.14</version.com.github.java-json-tools>
         <version.org.junit.minor>6.0</version.org.junit.minor>
         <version.org.junit>5.${version.org.junit.minor}</version.org.junit>
         <version.org.junit.jupiter>${version.org.junit}</version.org.junit.jupiter>
@@ -125,10 +124,16 @@
                 <artifactId>jackson-databind</artifactId>
                 <version>${version.com.fasterxml.jackson}</version>
             </dependency>
-            <dependency>
-              <groupId>com.github.java-json-tools</groupId>
-              <artifactId>json-schema-validator</artifactId>
-              <version>${version.com.github.java-json-tools}</version>
+             <dependency>
+               <groupId>com.networknt</groupId>
+               <artifactId>json-schema-validator</artifactId>
+               <version>${version.com.networknt}</version>
+               <exclusions>
+                 <exclusion>
+                   <groupId>org.apache.commons</groupId>
+                   <artifactId>commons-lang3</artifactId>
+                 </exclusion>
+              </exclusions>
             </dependency>
             <dependency>
                 <groupId>com.fasterxml.jackson.dataformat</groupId>
diff --git a/validation/pom.xml b/validation/pom.xml
index c47449a9..6b4e808a 100644
--- a/validation/pom.xml
+++ b/validation/pom.xml
@@ -34,10 +34,9 @@
             <groupId>org.apache.commons</groupId>
             <artifactId>commons-lang3</artifactId>
         </dependency>
-
-       <dependency>
-         <groupId>com.github.java-json-tools</groupId>
-         <artifactId>json-schema-validator</artifactId>
+        <dependency>
+          <groupId>com.networknt</groupId>
+          <artifactId>json-schema-validator</artifactId>
         </dependency>
         <!-- test -->
         <dependency>
diff --git a/validation/src/main/java/io/serverlessworkflow/validation/WorkflowValidatorImpl.java b/validation/src/main/java/io/serverlessworkflow/validation/WorkflowValidatorImpl.java
index 1e7022f4..783db92e 100644
--- a/validation/src/main/java/io/serverlessworkflow/validation/WorkflowValidatorImpl.java
+++ b/validation/src/main/java/io/serverlessworkflow/validation/WorkflowValidatorImpl.java
@@ -16,8 +16,8 @@
 package io.serverlessworkflow.validation;
 
 import com.fasterxml.jackson.databind.JsonNode;
-import com.github.fge.jsonschema.core.exceptions.ProcessingException;
-import com.github.fge.jsonschema.main.JsonSchemaFactory;
+import com.networknt.schema.JsonSchemaFactory;
+import com.networknt.schema.SpecVersion.VersionFlag;
 import io.serverlessworkflow.api.Workflow;
 import io.serverlessworkflow.api.actions.Action;
 import io.serverlessworkflow.api.events.EventDefinition;
@@ -66,11 +66,12 @@ public Collection<ValidationError> validate() {
     validationErrors.clear();
     if (workflow == null && schemaValidationEnabled && source != null) {
       try {
-        JsonSchemaFactory.byDefault()
-            .getJsonSchema(workflowSchema)
+
+        JsonSchemaFactory.getInstance(VersionFlag.V202012)
+            .getSchema(workflowSchema)
             .validate(Utils.getNode(source))
             .forEach(m -> addValidationError(m.getMessage(), ValidationError.SCHEMA_VALIDATION));
-      } catch (ProcessingException | IOException e) {
+      } catch (IOException e) {
         logger.error("Unexpected error during validation", e);
       }
     }
@@ -366,7 +367,17 @@ private boolean haveEventsDefinition(String eventName, List<EventDefinition> eve
     }
   }
 
+  private static final Set<String> skipMessages =
+      Set.of(
+          "$.start: string found, object expected",
+          "$.functions: array found, object expected",
+          "$.events: array found, object expected",
+          "$.retries: array found, object expected");
+
   private void addValidationError(String message, String type) {
+    if (skipMessages.contains(message)) {
+      return;
+    }
     ValidationError mainError = new ValidationError();
     mainError.setMessage(message);
     mainError.setType(type);
@@ -375,29 +386,9 @@ private void addValidationError(String message, String type) {
 
   private class Validation {
 
-    final Set<String> events = new HashSet<>();
-    final Set<String> functions = new HashSet<>();
     final Set<String> states = new HashSet<>();
     Integer endStates = 0;
 
-    void addFunction(String name) {
-      if (functions.contains(name)) {
-        addValidationError(
-            "Function does not have an unique name: " + name, ValidationError.WORKFLOW_VALIDATION);
-      } else {
-        functions.add(name);
-      }
-    }
-
-    void addEvent(String name) {
-      if (events.contains(name)) {
-        addValidationError(
-            "Event does not have an unique name: " + name, ValidationError.WORKFLOW_VALIDATION);
-      } else {
-        events.add(name);
-      }
-    }
-
     void addState(String name) {
       if (states.contains(name)) {
         addValidationError(
diff --git a/validation/src/test/java/io/serverlessworkflow/validation/test/WorkflowValidationTest.java b/validation/src/test/java/io/serverlessworkflow/validation/test/WorkflowValidationTest.java
index 052bc687..72f40a3a 100644
--- a/validation/src/test/java/io/serverlessworkflow/validation/test/WorkflowValidationTest.java
+++ b/validation/src/test/java/io/serverlessworkflow/validation/test/WorkflowValidationTest.java
@@ -46,7 +46,6 @@ public void testIncompleteYamlWithSchemaValidation() {
     Collection<ValidationError> validationErrors =
         workflowValidator.setSource("---\n" + "key: abc\n").validate();
     Assertions.assertNotNull(validationErrors);
-    System.out.println(validationErrors);
     Assertions.assertEquals(3, validationErrors.size());
   }
 
@@ -170,14 +169,6 @@ public void testOperationStateNoFunctionRef() {
 
     Assertions.assertNotNull(validationErrors);
     Assertions.assertEquals(1, validationErrors.size());
-
-    Assertions.assertTrue(
-        validationErrors.stream()
-            .anyMatch(
-                v ->
-                    v.getMessage()
-                        .equals(
-                            "Operation State action functionRef does not reference an existing workflow function definition")));
   }
 
   @Test

From 159c15d3ce16fc8aa507544c467a7de7877d2861 Mon Sep 17 00:00:00 2001
From: Ricardo Zanini <1538000+ricardozanini@users.noreply.github.com>
Date: Mon, 10 Jul 2023 14:50:35 -0300
Subject: [PATCH 033/109] Enable dependabot to upgrade libs (#240)

We can rely on GitHub's dependabot to open PRs with version upgrades and CVEs fixes to avoid future problems.

Signed-off-by: Ricardo Zanini <zanini@redhat.com>
---
 .github/dependabot.yml | 14 ++++++++++++++
 1 file changed, 14 insertions(+)
 create mode 100644 .github/dependabot.yml

diff --git a/.github/dependabot.yml b/.github/dependabot.yml
new file mode 100644
index 00000000..06541a8b
--- /dev/null
+++ b/.github/dependabot.yml
@@ -0,0 +1,14 @@
+# To get started with Dependabot version updates, you'll need to specify which
+# package ecosystems to update and where the package manifests are located.
+# Please see the documentation for all configuration options:
+# https://docs.github.com/github/administering-a-repository/configuration-options-for-dependency-updates
+
+version: 2
+updates:
+  - package-ecosystem: "maven" # See documentation for possible values
+    directory: "/" # Location of package manifests
+    schedule:
+      interval: "weekly"
+    assignees:
+      - ricardozanini
+      - tsurdilo

From c2c01228f3032b383cf87f7eb28b22b74158a599 Mon Sep 17 00:00:00 2001
From: Francisco Javier Tirado Sarti <ftirados@redhat.com>
Date: Fri, 7 Jul 2023 11:38:56 +0200
Subject: [PATCH 034/109] Review comments

Signed-off-by: Francisco Javier Tirado Sarti <ftirados@redhat.com>
Signed-off-by: Ricardo Zanini <zanini@redhat.com>
---
 .../validation/WorkflowValidatorImpl.java     | 36 ++++--------
 .../test/WorkflowValidationTest.java          | 56 +++++++++++++++++++
 2 files changed, 67 insertions(+), 25 deletions(-)

diff --git a/validation/src/main/java/io/serverlessworkflow/validation/WorkflowValidatorImpl.java b/validation/src/main/java/io/serverlessworkflow/validation/WorkflowValidatorImpl.java
index 783db92e..1aed35ff 100644
--- a/validation/src/main/java/io/serverlessworkflow/validation/WorkflowValidatorImpl.java
+++ b/validation/src/main/java/io/serverlessworkflow/validation/WorkflowValidatorImpl.java
@@ -64,13 +64,14 @@ public WorkflowValidator setSource(String source) {
   @Override
   public Collection<ValidationError> validate() {
     validationErrors.clear();
-    if (workflow == null && schemaValidationEnabled && source != null) {
+    if (workflow == null) {
       try {
-
-        JsonSchemaFactory.getInstance(VersionFlag.V202012)
-            .getSchema(workflowSchema)
-            .validate(Utils.getNode(source))
-            .forEach(m -> addValidationError(m.getMessage(), ValidationError.SCHEMA_VALIDATION));
+        if (schemaValidationEnabled && source != null) {
+          JsonSchemaFactory.getInstance(VersionFlag.V7)
+              .getSchema(workflowSchema)
+              .validate(Utils.getNode(source))
+              .forEach(m -> addValidationError(m.getMessage(), ValidationError.SCHEMA_VALIDATION));
+        }
       } catch (IOException e) {
         logger.error("Unexpected error during validation", e);
       }
@@ -163,17 +164,6 @@ public Collection<ValidationError> validate() {
                     }
 
                     if (action.getEventRef() != null) {
-                      if (action.getEventRef().getTriggerEventRef().isEmpty()) {
-                        addValidationError(
-                            "Operation State action trigger eventRef does not reference an existing workflow event definition",
-                            ValidationError.WORKFLOW_VALIDATION);
-                      }
-
-                      if (action.getEventRef().getResultEventRef().isEmpty()) {
-                        addValidationError(
-                            "Operation State action results eventRef does not reference an existing workflow event definition",
-                            ValidationError.WORKFLOW_VALIDATION);
-                      }
 
                       if (!haveEventsDefinition(
                           action.getEventRef().getTriggerEventRef(), events)) {
@@ -357,22 +347,19 @@ private boolean haveFunctionDefinition(String functionName, List<FunctionDefinit
   }
 
   private boolean haveEventsDefinition(String eventName, List<EventDefinition> events) {
+    if (eventName == null) {
+      return true;
+    }
     if (events != null) {
       EventDefinition eve =
           events.stream().filter(e -> e.getName().equals(eventName)).findFirst().orElse(null);
-
       return eve == null ? false : true;
     } else {
       return false;
     }
   }
 
-  private static final Set<String> skipMessages =
-      Set.of(
-          "$.start: string found, object expected",
-          "$.functions: array found, object expected",
-          "$.events: array found, object expected",
-          "$.retries: array found, object expected");
+  private static final Set<String> skipMessages = Set.of("$.start: string found, object expected");
 
   private void addValidationError(String message, String type) {
     if (skipMessages.contains(message)) {
@@ -385,7 +372,6 @@ private void addValidationError(String message, String type) {
   }
 
   private class Validation {
-
     final Set<String> states = new HashSet<>();
     Integer endStates = 0;
 
diff --git a/validation/src/test/java/io/serverlessworkflow/validation/test/WorkflowValidationTest.java b/validation/src/test/java/io/serverlessworkflow/validation/test/WorkflowValidationTest.java
index 72f40a3a..b040d101 100644
--- a/validation/src/test/java/io/serverlessworkflow/validation/test/WorkflowValidationTest.java
+++ b/validation/src/test/java/io/serverlessworkflow/validation/test/WorkflowValidationTest.java
@@ -15,14 +15,26 @@
  */
 package io.serverlessworkflow.validation.test;
 
+import static io.serverlessworkflow.api.states.DefaultState.Type.OPERATION;
 import static io.serverlessworkflow.api.states.DefaultState.Type.SLEEP;
 
 import io.serverlessworkflow.api.Workflow;
+import io.serverlessworkflow.api.actions.Action;
 import io.serverlessworkflow.api.end.End;
+import io.serverlessworkflow.api.events.EventDefinition;
+import io.serverlessworkflow.api.events.EventRef;
+import io.serverlessworkflow.api.functions.FunctionDefinition;
+import io.serverlessworkflow.api.functions.FunctionDefinition.Type;
+import io.serverlessworkflow.api.functions.FunctionRef;
 import io.serverlessworkflow.api.interfaces.WorkflowValidator;
+import io.serverlessworkflow.api.retry.RetryDefinition;
 import io.serverlessworkflow.api.start.Start;
+import io.serverlessworkflow.api.states.OperationState;
 import io.serverlessworkflow.api.states.SleepState;
 import io.serverlessworkflow.api.validation.ValidationError;
+import io.serverlessworkflow.api.workflow.Events;
+import io.serverlessworkflow.api.workflow.Functions;
+import io.serverlessworkflow.api.workflow.Retries;
 import io.serverlessworkflow.validation.WorkflowValidatorImpl;
 import java.util.Arrays;
 import java.util.Collection;
@@ -123,6 +135,50 @@ public void testWorkflowMissingStatesIdAndKey() {
         2);
   }
 
+  @Test
+  void testFunctionCall() {
+    Workflow workflow =
+        new Workflow()
+            .withId("test-workflow")
+            .withVersion("1.0")
+            .withStart(new Start().withStateName("start"))
+            .withFunctions(
+                new Functions(
+                    Arrays.asList(new FunctionDefinition("expression").withType(Type.EXPRESSION))))
+            .withStates(
+                Arrays.asList(
+                    new OperationState()
+                        .withName("start")
+                        .withType(OPERATION)
+                        .withActions(
+                            Arrays.asList(
+                                new Action().withFunctionRef(new FunctionRef("expression"))))
+                        .withEnd(new End())));
+    Assertions.assertTrue(new WorkflowValidatorImpl().setWorkflow(workflow).validate().isEmpty());
+  }
+
+  @Test
+  void testEventCall() {
+    Workflow workflow =
+        new Workflow()
+            .withId("test-workflow")
+            .withVersion("1.0")
+            .withStart(new Start().withStateName("start"))
+            .withEvents(new Events(Arrays.asList(new EventDefinition().withName("event"))))
+            .withRetries(new Retries(Arrays.asList(new RetryDefinition("start", "PT1S"))))
+            .withStates(
+                Arrays.asList(
+                    new OperationState()
+                        .withName("start")
+                        .withType(OPERATION)
+                        .withActions(
+                            Arrays.asList(
+                                new Action()
+                                    .withEventRef(new EventRef().withTriggerEventRef("event"))))
+                        .withEnd(new End())));
+    Assertions.assertTrue(new WorkflowValidatorImpl().setWorkflow(workflow).validate().isEmpty());
+  }
+
   @Test
   public void testOperationStateNoFunctionRef() {
     WorkflowValidator workflowValidator = new WorkflowValidatorImpl();

From 7891b9f7f643de0e5979287ab9775dce453113d6 Mon Sep 17 00:00:00 2001
From: Francisco Javier Tirado Sarti <ftirados@redhat.com>
Date: Wed, 12 Jul 2023 18:12:30 +0200
Subject: [PATCH 035/109] Validation Error Test

Signed-off-by: Francisco Javier Tirado Sarti <ftirados@redhat.com>
Signed-off-by: Ricardo Zanini <zanini@redhat.com>
---
 .../api/test/ValidationErrorTest.java         | 53 +++++++++++++++++++
 1 file changed, 53 insertions(+)
 create mode 100644 api/src/test/java/io/serverlessworkflow/api/test/ValidationErrorTest.java

diff --git a/api/src/test/java/io/serverlessworkflow/api/test/ValidationErrorTest.java b/api/src/test/java/io/serverlessworkflow/api/test/ValidationErrorTest.java
new file mode 100644
index 00000000..34b02799
--- /dev/null
+++ b/api/src/test/java/io/serverlessworkflow/api/test/ValidationErrorTest.java
@@ -0,0 +1,53 @@
+/*
+ * Copyright 2020-Present The Serverless Workflow Specification Authors
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package io.serverlessworkflow.api.test;
+
+import static org.junit.jupiter.api.Assertions.assertEquals;
+
+import io.serverlessworkflow.api.validation.ValidationError;
+import java.util.ArrayList;
+import java.util.Collection;
+import java.util.LinkedHashSet;
+import org.junit.jupiter.api.Test;
+
+public class ValidationErrorTest {
+
+  @Test
+  void duplicateTest() {
+
+    Collection<ValidationError> duplicatedErrors = addMessagesToCollection(new ArrayList<>());
+    Collection<ValidationError> errors = addMessagesToCollection(new LinkedHashSet<>());
+
+    assertEquals(duplicatedErrors.size(), 3);
+    assertEquals(errors.size(), 2);
+
+    assertEquals(duplicatedErrors.iterator().next().getMessage(), "This is the first message");
+    assertEquals(errors.iterator().next().getMessage(), "This is the first message");
+  }
+
+  private Collection<ValidationError> addMessagesToCollection(Collection<ValidationError> errors) {
+    ValidationError first = new ValidationError();
+    first.setMessage("This is the first message");
+    ValidationError second = new ValidationError();
+    second.setMessage("This is the duplicated message");
+    ValidationError third = new ValidationError();
+    third.setMessage("This is the duplicated message");
+    errors.add(first);
+    errors.add(second);
+    errors.add(third);
+    return errors;
+  }
+}

From fd35a9ed04b8542c146b60ab832ca3afe1345c99 Mon Sep 17 00:00:00 2001
From: Francisco Javier Tirado Sarti <ftirados@redhat.com>
Date: Thu, 13 Jul 2023 16:01:10 +0200
Subject: [PATCH 036/109] Changing validator back to List

Signed-off-by: Francisco Javier Tirado Sarti <ftirados@redhat.com>
Signed-off-by: Ricardo Zanini <zanini@redhat.com>
---
 .../api/interfaces/WorkflowValidator.java     |   4 +-
 .../api/validation/ValidationError.java       |  16 --
 .../api/test/ValidationErrorTest.java         |  53 ------
 .../validation/WorkflowValidatorImpl.java     |  10 +-
 .../test/WorkflowValidationTest.java          | 156 ++++++++----------
 5 files changed, 80 insertions(+), 159 deletions(-)
 delete mode 100644 api/src/test/java/io/serverlessworkflow/api/test/ValidationErrorTest.java

diff --git a/api/src/main/java/io/serverlessworkflow/api/interfaces/WorkflowValidator.java b/api/src/main/java/io/serverlessworkflow/api/interfaces/WorkflowValidator.java
index 09c79066..199a0927 100644
--- a/api/src/main/java/io/serverlessworkflow/api/interfaces/WorkflowValidator.java
+++ b/api/src/main/java/io/serverlessworkflow/api/interfaces/WorkflowValidator.java
@@ -17,7 +17,7 @@
 
 import io.serverlessworkflow.api.Workflow;
 import io.serverlessworkflow.api.validation.ValidationError;
-import java.util.Collection;
+import java.util.List;
 
 public interface WorkflowValidator {
 
@@ -25,7 +25,7 @@ public interface WorkflowValidator {
 
   WorkflowValidator setSource(String source);
 
-  Collection<ValidationError> validate();
+  List<ValidationError> validate();
 
   boolean isValid();
 
diff --git a/api/src/main/java/io/serverlessworkflow/api/validation/ValidationError.java b/api/src/main/java/io/serverlessworkflow/api/validation/ValidationError.java
index 2aebccf9..edb92eff 100644
--- a/api/src/main/java/io/serverlessworkflow/api/validation/ValidationError.java
+++ b/api/src/main/java/io/serverlessworkflow/api/validation/ValidationError.java
@@ -15,8 +15,6 @@
  */
 package io.serverlessworkflow.api.validation;
 
-import java.util.Objects;
-
 public class ValidationError {
   private static final String MSG_FORMAT = "%s:%s";
   public static final String SCHEMA_VALIDATION = "schemavalidation";
@@ -45,18 +43,4 @@ public void setType(String type) {
   public String toString() {
     return String.format(MSG_FORMAT, type, message);
   }
-
-  @Override
-  public int hashCode() {
-    return Objects.hash(message, type);
-  }
-
-  @Override
-  public boolean equals(Object obj) {
-    if (this == obj) return true;
-    if (obj == null) return false;
-    if (getClass() != obj.getClass()) return false;
-    ValidationError other = (ValidationError) obj;
-    return Objects.equals(message, other.message) && Objects.equals(type, other.type);
-  }
 }
diff --git a/api/src/test/java/io/serverlessworkflow/api/test/ValidationErrorTest.java b/api/src/test/java/io/serverlessworkflow/api/test/ValidationErrorTest.java
deleted file mode 100644
index 34b02799..00000000
--- a/api/src/test/java/io/serverlessworkflow/api/test/ValidationErrorTest.java
+++ /dev/null
@@ -1,53 +0,0 @@
-/*
- * Copyright 2020-Present The Serverless Workflow Specification Authors
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package io.serverlessworkflow.api.test;
-
-import static org.junit.jupiter.api.Assertions.assertEquals;
-
-import io.serverlessworkflow.api.validation.ValidationError;
-import java.util.ArrayList;
-import java.util.Collection;
-import java.util.LinkedHashSet;
-import org.junit.jupiter.api.Test;
-
-public class ValidationErrorTest {
-
-  @Test
-  void duplicateTest() {
-
-    Collection<ValidationError> duplicatedErrors = addMessagesToCollection(new ArrayList<>());
-    Collection<ValidationError> errors = addMessagesToCollection(new LinkedHashSet<>());
-
-    assertEquals(duplicatedErrors.size(), 3);
-    assertEquals(errors.size(), 2);
-
-    assertEquals(duplicatedErrors.iterator().next().getMessage(), "This is the first message");
-    assertEquals(errors.iterator().next().getMessage(), "This is the first message");
-  }
-
-  private Collection<ValidationError> addMessagesToCollection(Collection<ValidationError> errors) {
-    ValidationError first = new ValidationError();
-    first.setMessage("This is the first message");
-    ValidationError second = new ValidationError();
-    second.setMessage("This is the duplicated message");
-    ValidationError third = new ValidationError();
-    third.setMessage("This is the duplicated message");
-    errors.add(first);
-    errors.add(second);
-    errors.add(third);
-    return errors;
-  }
-}
diff --git a/validation/src/main/java/io/serverlessworkflow/validation/WorkflowValidatorImpl.java b/validation/src/main/java/io/serverlessworkflow/validation/WorkflowValidatorImpl.java
index 1aed35ff..84dbb432 100644
--- a/validation/src/main/java/io/serverlessworkflow/validation/WorkflowValidatorImpl.java
+++ b/validation/src/main/java/io/serverlessworkflow/validation/WorkflowValidatorImpl.java
@@ -32,9 +32,8 @@
 import io.serverlessworkflow.api.validation.ValidationError;
 import io.serverlessworkflow.api.validation.WorkflowSchemaLoader;
 import java.io.IOException;
-import java.util.Collection;
+import java.util.ArrayList;
 import java.util.HashSet;
-import java.util.LinkedHashSet;
 import java.util.List;
 import java.util.Set;
 import org.slf4j.Logger;
@@ -44,7 +43,7 @@ public class WorkflowValidatorImpl implements WorkflowValidator {
 
   private static final Logger logger = LoggerFactory.getLogger(WorkflowValidatorImpl.class);
   private boolean schemaValidationEnabled = true;
-  private Collection<ValidationError> validationErrors = new LinkedHashSet<>();
+  private List<ValidationError> validationErrors = new ArrayList<>();
   private JsonNode workflowSchema = WorkflowSchemaLoader.getWorkflowSchema();
   private String source;
   private Workflow workflow;
@@ -62,7 +61,7 @@ public WorkflowValidator setSource(String source) {
   }
 
   @Override
-  public Collection<ValidationError> validate() {
+  public List<ValidationError> validate() {
     validationErrors.clear();
     if (workflow == null) {
       try {
@@ -359,7 +358,8 @@ private boolean haveEventsDefinition(String eventName, List<EventDefinition> eve
     }
   }
 
-  private static final Set<String> skipMessages = Set.of("$.start: string found, object expected");
+  private static final Set<String> skipMessages =
+      Set.of("$.start: string found, object expected", "$.functions: array found, object expected");
 
   private void addValidationError(String message, String type) {
     if (skipMessages.contains(message)) {
diff --git a/validation/src/test/java/io/serverlessworkflow/validation/test/WorkflowValidationTest.java b/validation/src/test/java/io/serverlessworkflow/validation/test/WorkflowValidationTest.java
index b040d101..e600e253 100644
--- a/validation/src/test/java/io/serverlessworkflow/validation/test/WorkflowValidationTest.java
+++ b/validation/src/test/java/io/serverlessworkflow/validation/test/WorkflowValidationTest.java
@@ -37,7 +37,7 @@
 import io.serverlessworkflow.api.workflow.Retries;
 import io.serverlessworkflow.validation.WorkflowValidatorImpl;
 import java.util.Arrays;
-import java.util.Collection;
+import java.util.List;
 import org.junit.jupiter.api.Assertions;
 import org.junit.jupiter.api.Test;
 
@@ -46,7 +46,7 @@ public class WorkflowValidationTest {
   @Test
   public void testIncompleteJsonWithSchemaValidation() {
     WorkflowValidator workflowValidator = new WorkflowValidatorImpl();
-    Collection<ValidationError> validationErrors =
+    List<ValidationError> validationErrors =
         workflowValidator.setSource("{\n" + "  \"id\": \"abc\" \n" + "}").validate();
     Assertions.assertNotNull(validationErrors);
     Assertions.assertEquals(3, validationErrors.size());
@@ -55,7 +55,7 @@ public void testIncompleteJsonWithSchemaValidation() {
   @Test
   public void testIncompleteYamlWithSchemaValidation() {
     WorkflowValidator workflowValidator = new WorkflowValidatorImpl();
-    Collection<ValidationError> validationErrors =
+    List<ValidationError> validationErrors =
         workflowValidator.setSource("---\n" + "key: abc\n").validate();
     Assertions.assertNotNull(validationErrors);
     Assertions.assertEquals(3, validationErrors.size());
@@ -77,22 +77,18 @@ public void testFromIncompleteWorkflow() {
                         .withDuration("PT1M")));
 
     WorkflowValidator workflowValidator = new WorkflowValidatorImpl();
-    Collection<ValidationError> validationErrors =
-        workflowValidator.setWorkflow(workflow).validate();
+    List<ValidationError> validationErrors = workflowValidator.setWorkflow(workflow).validate();
     Assertions.assertNotNull(validationErrors);
     Assertions.assertEquals(1, validationErrors.size());
-    Assertions.assertTrue(
-        validationErrors.stream()
-            .anyMatch(
-                v ->
-                    v.getMessage()
-                        .equals("No state name found that matches the workflow start definition")));
+    Assertions.assertEquals(
+        "No state name found that matches the workflow start definition",
+        validationErrors.get(0).getMessage());
   }
 
   @Test
   public void testWorkflowMissingStates() {
     WorkflowValidator workflowValidator = new WorkflowValidatorImpl();
-    Collection<ValidationError> validationErrors =
+    List<ValidationError> validationErrors =
         workflowValidator
             .setSource(
                 "{\n"
@@ -106,14 +102,13 @@ public void testWorkflowMissingStates() {
     Assertions.assertNotNull(validationErrors);
     Assertions.assertEquals(1, validationErrors.size());
 
-    Assertions.assertTrue(
-        validationErrors.stream().anyMatch(v -> v.getMessage().equals("No states found")));
+    Assertions.assertEquals("No states found", validationErrors.get(0).getMessage());
   }
 
   @Test
   public void testWorkflowMissingStatesIdAndKey() {
     WorkflowValidator workflowValidator = new WorkflowValidatorImpl();
-    Collection<ValidationError> validationErrors =
+    List<ValidationError> validationErrors =
         workflowValidator
             .setSource(
                 "{\n"
@@ -125,64 +120,16 @@ public void testWorkflowMissingStatesIdAndKey() {
             .validate();
     Assertions.assertNotNull(validationErrors);
     Assertions.assertEquals(2, validationErrors.size());
-    Assertions.assertEquals(
-        validationErrors.stream()
-            .filter(
-                v ->
-                    v.getMessage().equals("No states found")
-                        || v.getMessage().equals("Workflow id or key should not be empty"))
-            .count(),
-        2);
-  }
-
-  @Test
-  void testFunctionCall() {
-    Workflow workflow =
-        new Workflow()
-            .withId("test-workflow")
-            .withVersion("1.0")
-            .withStart(new Start().withStateName("start"))
-            .withFunctions(
-                new Functions(
-                    Arrays.asList(new FunctionDefinition("expression").withType(Type.EXPRESSION))))
-            .withStates(
-                Arrays.asList(
-                    new OperationState()
-                        .withName("start")
-                        .withType(OPERATION)
-                        .withActions(
-                            Arrays.asList(
-                                new Action().withFunctionRef(new FunctionRef("expression"))))
-                        .withEnd(new End())));
-    Assertions.assertTrue(new WorkflowValidatorImpl().setWorkflow(workflow).validate().isEmpty());
-  }
 
-  @Test
-  void testEventCall() {
-    Workflow workflow =
-        new Workflow()
-            .withId("test-workflow")
-            .withVersion("1.0")
-            .withStart(new Start().withStateName("start"))
-            .withEvents(new Events(Arrays.asList(new EventDefinition().withName("event"))))
-            .withRetries(new Retries(Arrays.asList(new RetryDefinition("start", "PT1S"))))
-            .withStates(
-                Arrays.asList(
-                    new OperationState()
-                        .withName("start")
-                        .withType(OPERATION)
-                        .withActions(
-                            Arrays.asList(
-                                new Action()
-                                    .withEventRef(new EventRef().withTriggerEventRef("event"))))
-                        .withEnd(new End())));
-    Assertions.assertTrue(new WorkflowValidatorImpl().setWorkflow(workflow).validate().isEmpty());
+    Assertions.assertEquals(
+        "Workflow id or key should not be empty", validationErrors.get(0).getMessage());
+    Assertions.assertEquals("No states found", validationErrors.get(1).getMessage());
   }
 
   @Test
   public void testOperationStateNoFunctionRef() {
     WorkflowValidator workflowValidator = new WorkflowValidatorImpl();
-    Collection<ValidationError> validationErrors =
+    List<ValidationError> validationErrors =
         workflowValidator
             .setSource(
                 "{\n"
@@ -225,6 +172,10 @@ public void testOperationStateNoFunctionRef() {
 
     Assertions.assertNotNull(validationErrors);
     Assertions.assertEquals(1, validationErrors.size());
+
+    Assertions.assertEquals(
+        "Operation State action functionRef does not reference an existing workflow function definition",
+        validationErrors.get(0).getMessage());
   }
 
   @Test
@@ -242,8 +193,7 @@ public void testValidateWorkflowForOptionalStartStateAndWorkflowName() {
                         .withDuration("PT1M")));
 
     WorkflowValidator workflowValidator = new WorkflowValidatorImpl();
-    Collection<ValidationError> validationErrors =
-        workflowValidator.setWorkflow(workflow).validate();
+    List<ValidationError> validationErrors = workflowValidator.setWorkflow(workflow).validate();
     Assertions.assertNotNull(validationErrors);
     Assertions.assertEquals(0, validationErrors.size());
   }
@@ -251,7 +201,7 @@ public void testValidateWorkflowForOptionalStartStateAndWorkflowName() {
   @Test
   public void testValidateWorkflowForOptionalIterationParam() {
     WorkflowValidator workflowValidator = new WorkflowValidatorImpl();
-    Collection<ValidationError> validationErrors =
+    List<ValidationError> validationErrors =
         workflowValidator
             .setSource(
                 "{\n"
@@ -292,13 +242,15 @@ public void testValidateWorkflowForOptionalIterationParam() {
             .validate();
 
     Assertions.assertNotNull(validationErrors);
-    Assertions.assertEquals(1, validationErrors.size());
+    Assertions.assertEquals(
+        1,
+        validationErrors.size()); // validation error raised for functionref not for iterationParam
   }
 
   @Test
   public void testMissingFunctionRefForCallbackState() {
     WorkflowValidator workflowValidator = new WorkflowValidatorImpl();
-    Collection<ValidationError> validationErrors =
+    List<ValidationError> validationErrors =
         workflowValidator
             .setSource(
                 "{\n"
@@ -332,16 +284,54 @@ public void testMissingFunctionRefForCallbackState() {
     Assertions.assertNotNull(validationErrors);
     Assertions.assertEquals(2, validationErrors.size());
     Assertions.assertEquals(
-        validationErrors.stream()
-            .filter(
-                v ->
-                    v.getMessage()
-                            .equals(
-                                "CallbackState event ref does not reference a defined workflow event definition")
-                        || v.getMessage()
-                            .equals(
-                                "CallbackState action function ref does not reference a defined workflow function definition"))
-            .count(),
-        2);
+        "CallbackState event ref does not reference a defined workflow event definition",
+        validationErrors.get(0).getMessage());
+    Assertions.assertEquals(
+        "CallbackState action function ref does not reference a defined workflow function definition",
+        validationErrors.get(1).getMessage());
+  }
+
+  @Test
+  void testFunctionCall() {
+    Workflow workflow =
+        new Workflow()
+            .withId("test-workflow")
+            .withVersion("1.0")
+            .withStart(new Start().withStateName("start"))
+            .withFunctions(
+                new Functions(
+                    Arrays.asList(new FunctionDefinition("expression").withType(Type.EXPRESSION))))
+            .withStates(
+                Arrays.asList(
+                    new OperationState()
+                        .withName("start")
+                        .withType(OPERATION)
+                        .withActions(
+                            Arrays.asList(
+                                new Action().withFunctionRef(new FunctionRef("expression"))))
+                        .withEnd(new End())));
+    Assertions.assertTrue(new WorkflowValidatorImpl().setWorkflow(workflow).validate().isEmpty());
+  }
+
+  @Test
+  void testEventCall() {
+    Workflow workflow =
+        new Workflow()
+            .withId("test-workflow")
+            .withVersion("1.0")
+            .withStart(new Start().withStateName("start"))
+            .withEvents(new Events(Arrays.asList(new EventDefinition().withName("event"))))
+            .withRetries(new Retries(Arrays.asList(new RetryDefinition("start", "PT1S"))))
+            .withStates(
+                Arrays.asList(
+                    new OperationState()
+                        .withName("start")
+                        .withType(OPERATION)
+                        .withActions(
+                            Arrays.asList(
+                                new Action()
+                                    .withEventRef(new EventRef().withTriggerEventRef("event"))))
+                        .withEnd(new End())));
+    Assertions.assertTrue(new WorkflowValidatorImpl().setWorkflow(workflow).validate().isEmpty());
   }
 }

From 078a930090054d9aff737d99d255ab83d42903bc Mon Sep 17 00:00:00 2001
From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com>
Date: Mon, 31 Jul 2023 14:05:58 +0000
Subject: [PATCH 037/109] Bump org.apache.commons:commons-lang3 from 3.9 to
 3.13.0

Bumps org.apache.commons:commons-lang3 from 3.9 to 3.13.0.

---
updated-dependencies:
- dependency-name: org.apache.commons:commons-lang3
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
Signed-off-by: Ricardo Zanini <zanini@redhat.com>
---
 pom.xml | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/pom.xml b/pom.xml
index c9e06c52..9504f276 100644
--- a/pom.xml
+++ b/pom.xml
@@ -69,7 +69,7 @@
         <version.ch.qos.logback>1.4.8</version.ch.qos.logback>
         <version.org.assertj>3.13.2</version.org.assertj>
         <version.jsonschema2pojo-maven-plugin>1.0.1</version.jsonschema2pojo-maven-plugin>
-        <commons.lang.version>3.9</commons.lang.version>
+        <commons.lang.version>3.13.0</commons.lang.version>
         <hamcrest.version>1.3</hamcrest.version>
         <jsonassert.version>1.5.0</jsonassert.version>
         <json.schema.validation.version>1.14.1</json.schema.validation.version>

From 6a84c9ef85c97363546adc96759f5754406ebf20 Mon Sep 17 00:00:00 2001
From: Vishesh Ruparelia <visheshruparelia18@gmail.com>
Date: Sat, 5 Aug 2023 15:01:57 +0530
Subject: [PATCH 038/109] add missing support for contextAttributes in
 ProduceEvent

Signed-off-by: Vishesh Ruparelia <visheshruparelia18@gmail.com>
Signed-off-by: Ricardo Zanini <zanini@redhat.com>
---
 api/src/main/resources/schema/produce/produceevent.json    | 5 +++++
 .../serverlessworkflow/api/test/MarkupToWorkflowTest.java  | 7 +++++++
 api/src/test/resources/features/transitions.json           | 6 +++++-
 api/src/test/resources/features/transitions.yml            | 3 +++
 4 files changed, 20 insertions(+), 1 deletion(-)

diff --git a/api/src/main/resources/schema/produce/produceevent.json b/api/src/main/resources/schema/produce/produceevent.json
index b5bb7d5f..f094824e 100644
--- a/api/src/main/resources/schema/produce/produceevent.json
+++ b/api/src/main/resources/schema/produce/produceevent.json
@@ -10,6 +10,11 @@
     "data": {
       "type": "string",
       "description": "Workflow expression which selects parts of the states data output to become the data of the produced event"
+    },
+    "contextAttributes": {
+      "type": "object",
+      "description": "Add additional event extension context attributes",
+      "existingJavaType": "java.util.Map<String, String>"
     }
   },
   "required": [
diff --git a/api/src/test/java/io/serverlessworkflow/api/test/MarkupToWorkflowTest.java b/api/src/test/java/io/serverlessworkflow/api/test/MarkupToWorkflowTest.java
index a1854d43..3c7c7a65 100644
--- a/api/src/test/java/io/serverlessworkflow/api/test/MarkupToWorkflowTest.java
+++ b/api/src/test/java/io/serverlessworkflow/api/test/MarkupToWorkflowTest.java
@@ -44,6 +44,8 @@
 import io.serverlessworkflow.api.workflow.Retries;
 import io.serverlessworkflow.api.workflow.Secrets;
 import java.util.List;
+import java.util.Map;
+
 import org.junit.jupiter.params.ParameterizedTest;
 import org.junit.jupiter.params.provider.ValueSource;
 
@@ -264,6 +266,11 @@ public void testTransitions(String workflowLocation) {
     assertEquals("RejectApplication", cond2.getTransition().getNextState());
     assertNotNull(cond2.getTransition().getProduceEvents());
     assertEquals(1, cond2.getTransition().getProduceEvents().size());
+    assertNotNull(cond2.getTransition().getProduceEvents().get(0).getContextAttributes());
+    Map<String, String> contextAttributes = cond2.getTransition().getProduceEvents().get(0).getContextAttributes();
+    assertEquals(2, contextAttributes.size());
+    assertEquals("IN", contextAttributes.get("order_location"));
+    assertEquals("online", contextAttributes.get("order_type"));
     assertFalse(cond2.getTransition().isCompensate());
 
     assertNotNull(switchState.getDefaultCondition());
diff --git a/api/src/test/resources/features/transitions.json b/api/src/test/resources/features/transitions.json
index cacc94af..ed7b7626 100644
--- a/api/src/test/resources/features/transitions.json
+++ b/api/src/test/resources/features/transitions.json
@@ -23,7 +23,11 @@
             "produceEvents": [
               {
                 "eventRef": "provisioningCompleteEvent",
-                "data": "${ .provisionedOrders }"
+                "data": "${ .provisionedOrders }",
+                "contextAttributes": {
+                  "order_location": "IN",
+                  "order_type": "online"
+                }
               }
             ]
           }
diff --git a/api/src/test/resources/features/transitions.yml b/api/src/test/resources/features/transitions.yml
index 1b89a85f..3ec34ae4 100644
--- a/api/src/test/resources/features/transitions.yml
+++ b/api/src/test/resources/features/transitions.yml
@@ -18,6 +18,9 @@ states:
           produceEvents:
             - eventRef: provisioningCompleteEvent
               data: "${ .provisionedOrders }"
+              contextAttributes:
+                "order_location": "IN"
+                "order_type": "online"
     defaultCondition:
       transition:
         nextState: RejectApplication

From 1133bbbd8307f06ce32cb28d13a9b20cb2afb334 Mon Sep 17 00:00:00 2001
From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com>
Date: Mon, 7 Aug 2023 13:14:19 +0000
Subject: [PATCH 039/109] Bump ch.qos.logback:logback-classic from 1.4.8 to
 1.4.9

Bumps [ch.qos.logback:logback-classic](https://github.com/qos-ch/logback) from 1.4.8 to 1.4.9.
- [Commits](https://github.com/qos-ch/logback/compare/v_1.4.8...v_1.4.9)

---
updated-dependencies:
- dependency-name: ch.qos.logback:logback-classic
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
Signed-off-by: Ricardo Zanini <zanini@redhat.com>
---
 pom.xml | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/pom.xml b/pom.xml
index 9504f276..9d564994 100644
--- a/pom.xml
+++ b/pom.xml
@@ -66,7 +66,7 @@
         <version.org.junit>5.${version.org.junit.minor}</version.org.junit>
         <version.org.junit.jupiter>${version.org.junit}</version.org.junit.jupiter>
         <version.org.mockito>3.0.0</version.org.mockito>
-        <version.ch.qos.logback>1.4.8</version.ch.qos.logback>
+        <version.ch.qos.logback>1.4.9</version.ch.qos.logback>
         <version.org.assertj>3.13.2</version.org.assertj>
         <version.jsonschema2pojo-maven-plugin>1.0.1</version.jsonschema2pojo-maven-plugin>
         <commons.lang.version>3.13.0</commons.lang.version>

From ac9af39c7a5821ad22741585c813246f727d8de8 Mon Sep 17 00:00:00 2001
From: Ricardo Zanini <zanini@redhat.com>
Date: Thu, 28 Sep 2023 11:42:46 -0300
Subject: [PATCH 040/109] Update Code of Conduct to follow the new standard

Signed-off-by: Ricardo Zanini <zanini@redhat.com>
---
 code-of-conduct.md | 65 +++++++---------------------------------------
 1 file changed, 9 insertions(+), 56 deletions(-)

diff --git a/code-of-conduct.md b/code-of-conduct.md
index ddd14b6d..97a8526a 100644
--- a/code-of-conduct.md
+++ b/code-of-conduct.md
@@ -1,58 +1,11 @@
-## CNCF Community Code of Conduct v1.0
+# Code of Conduct
 
-Other languages available:
-- [Chinese/中文](https://github.com/cncf/foundation/blob/master/code-of-conduct-languages/zh.md)
-- [German/Deutsch](https://github.com/cncf/foundation/blob/master/code-of-conduct-languages/de.md)
-- [Spanish/Español](https://github.com/cncf/foundation/blob/master/code-of-conduct-languages/es.md)
-- [French/Français](https://github.com/cncf/foundation/blob/master/code-of-conduct-languages/fr.md)
-- [Italian/Italiano](https://github.com/cncf/foundation/blob/master/code-of-conduct-languages/it.md)
-- [Japanese/日本語](https://github.com/cncf/foundation/blob/master/code-of-conduct-languages/jp.md)
-- [Korean/한국어](https://github.com/cncf/foundation/blob/master/code-of-conduct-languages/ko.md)
-- [Ukrainian/Українська](https://github.com/cncf/foundation/blob/master/code-of-conduct-languages/uk.md)
-- [Russian/Русский](https://github.com/cncf/foundation/blob/master/code-of-conduct-languages/ru.md)
-- [Portuguese/Português](https://github.com/cncf/foundation/blob/master/code-of-conduct-languages/pt.md)
-- [Arabic/العربية](https://github.com/cncf/foundation/blob/master/code-of-conduct-languages/ar.md)
-- [Polish/Polski](https://github.com/cncf/foundation/blob/master/code-of-conduct-languages/pl.md)
+We follow the [CNCF Code of Conduct](https://github.com/cncf/foundation/blob/main/code-of-conduct.md).
 
-### Contributor Code of Conduct
-
-As contributors and maintainers of this project, and in the interest of fostering
-an open and welcoming community, we pledge to respect all people who contribute
-through reporting issues, posting feature requests, updating documentation,
-submitting pull requests or patches, and other activities.
-
-We are committed to making participation in this project a harassment-free experience for
-everyone, regardless of level of experience, gender, gender identity and expression,
-sexual orientation, disability, personal appearance, body size, race, ethnicity, age,
-religion, or nationality.
-
-Examples of unacceptable behavior by participants include:
-
-* The use of sexualized language or imagery
-* Personal attacks
-* Trolling or insulting/derogatory comments
-* Public or private harassment
-* Publishing others' private information, such as physical or electronic addresses,
- without explicit permission
-* Other unethical or unprofessional conduct.
-
-Project maintainers have the right and responsibility to remove, edit, or reject
-comments, commits, code, wiki edits, issues, and other contributions that are not
-aligned to this Code of Conduct. By adopting this Code of Conduct, project maintainers
-commit themselves to fairly and consistently applying these principles to every aspect
-of managing this project. Project maintainers who do not follow or enforce the Code of
-Conduct may be permanently removed from the project team.
-
-This code of conduct applies both within project spaces and in public spaces
-when an individual is representing the project or its community.
-
-Instances of abusive, harassing, or otherwise unacceptable behavior in Kubernetes may be reported by contacting the [Kubernetes Code of Conduct Committee](https://git.k8s.io/community/committee-code-of-conduct) via conduct@kubernetes.io. For other projects, please contact a CNCF project maintainer or our mediator, Mishi Choudhary via mishi@linux.com.
-
-This Code of Conduct is adapted from the Contributor Covenant
-(<http://contributor-covenant.org>), version 1.2.0, available at
-<http://contributor-covenant.org/version/1/2/0/>
-
-### CNCF Events Code of Conduct
-
-CNCF events are governed by the Linux Foundation [Code of Conduct](https://events.linuxfoundation.org/code-of-conduct/) available on the event page.
-This is designed to be compatible with the above policy and also includes more details on responding to incidents.
\ No newline at end of file
+<!-- TODO: Decide who will handle Code of Conduct reports and replace [INSERT EMAIL ADDRESS]
+    with an email address in the paragraph below. We recommend using a mailing list to handle reports.
+    If your project isn't prepared to handle reports, remove the project email address and just have
+    reporters send to conduct@cncf.io.
+-->
+Please contact the [CNCF Code of Conduct Committee](mailto:conduct@cncf.io)
+in order to report violations of the Code of Conduct.

From 7ca919ec8ea1f78ba1416b509b8f7d2cc93b81f5 Mon Sep 17 00:00:00 2001
From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com>
Date: Wed, 11 Oct 2023 16:16:48 +0000
Subject: [PATCH 041/109] Bump org.thymeleaf:thymeleaf from 3.0.11.RELEASE to
 3.1.2.RELEASE

Bumps org.thymeleaf:thymeleaf from 3.0.11.RELEASE to 3.1.2.RELEASE.

---
updated-dependencies:
- dependency-name: org.thymeleaf:thymeleaf
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
Signed-off-by: Ricardo Zanini <zanini@redhat.com>
---
 pom.xml | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/pom.xml b/pom.xml
index 9d564994..00cb57d2 100644
--- a/pom.xml
+++ b/pom.xml
@@ -73,7 +73,7 @@
         <hamcrest.version>1.3</hamcrest.version>
         <jsonassert.version>1.5.0</jsonassert.version>
         <json.schema.validation.version>1.14.1</json.schema.validation.version>
-        <version.thymeleaf>3.0.11.RELEASE</version.thymeleaf>
+        <version.thymeleaf>3.1.2.RELEASE</version.thymeleaf>
         <version.plantuml>8059</version.plantuml>
         <version.graphviz>0.17.0</version.graphviz>
         <version.fmt-maven-plugin>2.9</version.fmt-maven-plugin>

From b2cbb096244ac00d8cb8d6075d55e83af2df23e0 Mon Sep 17 00:00:00 2001
From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com>
Date: Mon, 16 Oct 2023 13:13:47 +0000
Subject: [PATCH 042/109] Bump com.networknt:json-schema-validator from 1.0.86
 to 1.0.87

Bumps [com.networknt:json-schema-validator](https://github.com/networknt/json-schema-validator) from 1.0.86 to 1.0.87.
- [Release notes](https://github.com/networknt/json-schema-validator/releases)
- [Changelog](https://github.com/networknt/json-schema-validator/blob/master/CHANGELOG.md)
- [Commits](https://github.com/networknt/json-schema-validator/compare/1.0.86...1.0.87)

---
updated-dependencies:
- dependency-name: com.networknt:json-schema-validator
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
Signed-off-by: Ricardo Zanini <zanini@redhat.com>
---
 pom.xml | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/pom.xml b/pom.xml
index 00cb57d2..202bb58a 100644
--- a/pom.xml
+++ b/pom.xml
@@ -58,7 +58,7 @@
         <version.failsafe.plugin>2.22.0</version.failsafe.plugin>
         <version.checkstyle.plugin>3.1.1</version.checkstyle.plugin>
         <version.deploy.plugin>2.8.2</version.deploy.plugin>
-        <version.com.networknt>1.0.86</version.com.networknt>
+        <version.com.networknt>1.0.87</version.com.networknt>
         <version.org.slf4j>1.7.25</version.org.slf4j>
         <version.com.fasterxml.jackson>2.15.2</version.com.fasterxml.jackson>
         <version.javax.validation>2.0.1.Final</version.javax.validation>

From d14eac4776689985dfceff4eb5456615d60b301e Mon Sep 17 00:00:00 2001
From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com>
Date: Mon, 16 Oct 2023 13:13:53 +0000
Subject: [PATCH 043/109] Bump org.mockito:mockito-core from 3.0.0 to 5.6.0

Bumps [org.mockito:mockito-core](https://github.com/mockito/mockito) from 3.0.0 to 5.6.0.
- [Release notes](https://github.com/mockito/mockito/releases)
- [Commits](https://github.com/mockito/mockito/compare/v3.0.0...v5.6.0)

---
updated-dependencies:
- dependency-name: org.mockito:mockito-core
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>
Signed-off-by: Ricardo Zanini <zanini@redhat.com>
---
 pom.xml | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/pom.xml b/pom.xml
index 202bb58a..52d4e46b 100644
--- a/pom.xml
+++ b/pom.xml
@@ -65,7 +65,7 @@
         <version.org.junit.minor>6.0</version.org.junit.minor>
         <version.org.junit>5.${version.org.junit.minor}</version.org.junit>
         <version.org.junit.jupiter>${version.org.junit}</version.org.junit.jupiter>
-        <version.org.mockito>3.0.0</version.org.mockito>
+        <version.org.mockito>5.6.0</version.org.mockito>
         <version.ch.qos.logback>1.4.9</version.ch.qos.logback>
         <version.org.assertj>3.13.2</version.org.assertj>
         <version.jsonschema2pojo-maven-plugin>1.0.1</version.jsonschema2pojo-maven-plugin>

From 5a8b6f334824c878e9fba069dda49e1f85f5ebbd Mon Sep 17 00:00:00 2001
From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com>
Date: Mon, 16 Oct 2023 13:13:58 +0000
Subject: [PATCH 044/109] Bump com.coveo:fmt-maven-plugin from 2.9 to 2.13

Bumps [com.coveo:fmt-maven-plugin](https://github.com/coveooss/fmt-maven-plugin) from 2.9 to 2.13.
- [Release notes](https://github.com/coveooss/fmt-maven-plugin/releases)
- [Commits](https://github.com/coveooss/fmt-maven-plugin/compare/2.9.0...2.13.0)

---
updated-dependencies:
- dependency-name: com.coveo:fmt-maven-plugin
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
Signed-off-by: Ricardo Zanini <zanini@redhat.com>
---
 pom.xml | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/pom.xml b/pom.xml
index 52d4e46b..55e03fbd 100644
--- a/pom.xml
+++ b/pom.xml
@@ -76,7 +76,7 @@
         <version.thymeleaf>3.1.2.RELEASE</version.thymeleaf>
         <version.plantuml>8059</version.plantuml>
         <version.graphviz>0.17.0</version.graphviz>
-        <version.fmt-maven-plugin>2.9</version.fmt-maven-plugin>
+        <version.fmt-maven-plugin>2.13</version.fmt-maven-plugin>
         <version.jar.plugin>3.2.0</version.jar.plugin>
         <!-- Checkstyle props -->
         <checkstyle.failOnViolation>true</checkstyle.failOnViolation>

From 2fc7d7fdc925f8ee5e2329c8715b80acd7ff4ca9 Mon Sep 17 00:00:00 2001
From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com>
Date: Mon, 16 Oct 2023 13:14:07 +0000
Subject: [PATCH 045/109] Bump version.com.fasterxml.jackson from 2.15.2 to
 2.15.3

Bumps `version.com.fasterxml.jackson` from 2.15.2 to 2.15.3.

Updates `com.fasterxml.jackson.core:jackson-core` from 2.15.2 to 2.15.3
- [Release notes](https://github.com/FasterXML/jackson-core/releases)
- [Commits](https://github.com/FasterXML/jackson-core/compare/jackson-core-2.15.2...jackson-core-2.15.3)

Updates `com.fasterxml.jackson.core:jackson-databind` from 2.15.2 to 2.15.3
- [Commits](https://github.com/FasterXML/jackson/commits)

Updates `com.fasterxml.jackson.dataformat:jackson-dataformat-yaml` from 2.15.2 to 2.15.3
- [Commits](https://github.com/FasterXML/jackson-dataformats-text/compare/jackson-dataformats-text-2.15.2...jackson-dataformats-text-2.15.3)

---
updated-dependencies:
- dependency-name: com.fasterxml.jackson.core:jackson-core
  dependency-type: direct:production
  update-type: version-update:semver-patch
- dependency-name: com.fasterxml.jackson.core:jackson-databind
  dependency-type: direct:production
  update-type: version-update:semver-patch
- dependency-name: com.fasterxml.jackson.dataformat:jackson-dataformat-yaml
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
Signed-off-by: Ricardo Zanini <zanini@redhat.com>
---
 pom.xml | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/pom.xml b/pom.xml
index 55e03fbd..4974165d 100644
--- a/pom.xml
+++ b/pom.xml
@@ -60,7 +60,7 @@
         <version.deploy.plugin>2.8.2</version.deploy.plugin>
         <version.com.networknt>1.0.87</version.com.networknt>
         <version.org.slf4j>1.7.25</version.org.slf4j>
-        <version.com.fasterxml.jackson>2.15.2</version.com.fasterxml.jackson>
+        <version.com.fasterxml.jackson>2.15.3</version.com.fasterxml.jackson>
         <version.javax.validation>2.0.1.Final</version.javax.validation>
         <version.org.junit.minor>6.0</version.org.junit.minor>
         <version.org.junit>5.${version.org.junit.minor}</version.org.junit>

From e237470eb99be35ac19e41ba1e7a6feef8df6577 Mon Sep 17 00:00:00 2001
From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com>
Date: Mon, 16 Oct 2023 13:14:12 +0000
Subject: [PATCH 046/109] Bump org.apache.maven.plugins:maven-failsafe-plugin
 from 2.22.0 to 3.1.2

Bumps [org.apache.maven.plugins:maven-failsafe-plugin](https://github.com/apache/maven-surefire) from 2.22.0 to 3.1.2.
- [Release notes](https://github.com/apache/maven-surefire/releases)
- [Commits](https://github.com/apache/maven-surefire/compare/surefire-2.22.0...surefire-3.1.2)

---
updated-dependencies:
- dependency-name: org.apache.maven.plugins:maven-failsafe-plugin
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>
Signed-off-by: Ricardo Zanini <zanini@redhat.com>
---
 pom.xml | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/pom.xml b/pom.xml
index 4974165d..578c217d 100644
--- a/pom.xml
+++ b/pom.xml
@@ -55,7 +55,7 @@
         <version.jdk>8</version.jdk>
         <version.compiler.plugin>3.8.1</version.compiler.plugin>
         <version.surefire.plugin>2.22.0</version.surefire.plugin>
-        <version.failsafe.plugin>2.22.0</version.failsafe.plugin>
+        <version.failsafe.plugin>3.1.2</version.failsafe.plugin>
         <version.checkstyle.plugin>3.1.1</version.checkstyle.plugin>
         <version.deploy.plugin>2.8.2</version.deploy.plugin>
         <version.com.networknt>1.0.87</version.com.networknt>

From f849d182ded2aa0f1c5d23ffdc9e3d3db772512d Mon Sep 17 00:00:00 2001
From: Ricardo Zanini <zanini@redhat.com>
Date: Fri, 28 Jul 2023 12:22:20 -0300
Subject: [PATCH 047/109] Introduce Release Workflow

Signed-off-by: Ricardo Zanini <zanini@redhat.com>
---
 .github/project.yml                |   3 +
 .github/workflows/maven-deploy.yml |   2 +-
 .github/workflows/maven-verify.yml |   2 +-
 .github/workflows/pre-release.yml  |  25 +
 .github/workflows/release.yml      |  71 +++
 pom.xml                            | 812 +++++++++++++++++------------
 6 files changed, 572 insertions(+), 343 deletions(-)
 create mode 100644 .github/project.yml
 create mode 100644 .github/workflows/pre-release.yml
 create mode 100644 .github/workflows/release.yml

diff --git a/.github/project.yml b/.github/project.yml
new file mode 100644
index 00000000..f4275350
--- /dev/null
+++ b/.github/project.yml
@@ -0,0 +1,3 @@
+release:
+  current-version: 5.0.0
+  next-version: 6.0.0-SNAPSHOT
\ No newline at end of file
diff --git a/.github/workflows/maven-deploy.yml b/.github/workflows/maven-deploy.yml
index 67812473..f89bf3a0 100644
--- a/.github/workflows/maven-deploy.yml
+++ b/.github/workflows/maven-deploy.yml
@@ -1,7 +1,7 @@
 # This workflow will build a Java project with Maven
 # For more information see: https://help.github.com/actions/language-and-framework-guides/building-and-testing-java-with-maven
 
-name: Deploy JAVA SDK
+name: Deploy SNAPSHOT
 
 on:
   push:
diff --git a/.github/workflows/maven-verify.yml b/.github/workflows/maven-verify.yml
index 5da52578..db64ea66 100644
--- a/.github/workflows/maven-verify.yml
+++ b/.github/workflows/maven-verify.yml
@@ -1,7 +1,7 @@
 # This workflow will build a Java project with Maven
 # For more information see: https://help.github.com/actions/language-and-framework-guides/building-and-testing-java-with-maven
 
-name: Verify JAVA SDK
+name: Verify SNAPSHOT
 
 on:
   push:
diff --git a/.github/workflows/pre-release.yml b/.github/workflows/pre-release.yml
new file mode 100644
index 00000000..ce904c75
--- /dev/null
+++ b/.github/workflows/pre-release.yml
@@ -0,0 +1,25 @@
+name: sdk-java Pre Release
+
+on:
+  pull_request:
+    paths:
+      - '.github/project.yml'
+
+jobs:
+  release:
+    runs-on: ubuntu-latest
+    name: pre release
+
+    steps:
+      - uses: radcortez/project-metadata-action@master
+        name: retrieve project metadata
+        id: metadata
+        with:
+          github-token: ${{secrets.GITHUB_TOKEN}}
+          metadata-file-path: '.github/project.yml'
+
+      - name: Validate version
+        if: contains(steps.metadata.outputs.current-version, 'SNAPSHOT')
+        run: |
+          echo '::error::Cannot release a SNAPSHOT version.'
+          exit 1
\ No newline at end of file
diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml
new file mode 100644
index 00000000..9e683cda
--- /dev/null
+++ b/.github/workflows/release.yml
@@ -0,0 +1,71 @@
+name: sdk-java Release
+
+on:
+  pull_request:
+    types: [closed]
+    paths:
+      - '.github/project.yml'
+
+jobs:
+  release:
+    runs-on: ubuntu-latest
+    name: release
+    if: ${{github.event.pull_request.merged == true}}
+
+    steps:
+      - uses: radcortez/project-metadata-action@main
+        name: Retrieve project metadata
+        id: metadata
+        with:
+          github-token: ${{secrets.GITHUB_TOKEN}}
+          metadata-file-path: '.github/project.yml'
+
+      - uses: actions/checkout@v3
+
+      - name: Import GPG key
+        id: import_gpg
+        uses: crazy-max/ghaction-import-gpg@v5
+        with:
+          gpg_private_key: ${{ secrets.GPG_PRIVATE_KEY }}
+          passphrase: ${{ secrets.GPG_PASSPHRASE }}
+
+      - name: Set up JDK 11
+        uses: actions/setup-java@v3
+        with:
+          distribution: temurin
+          java-version: 11
+
+      - name: Cache local Maven repository
+        uses: actions/cache@v3
+        with:
+          path: ~/.m2/repository
+          key: ${{ runner.os }}-maven-${{ hashFiles('**/pom.xml') }}
+          restore-keys: |
+            ${{ runner.os }}-maven-
+
+      - name: Configure Git author
+        run: |
+          git config --local user.email "action@github.com"
+          git config --local user.name "GitHub Action"
+
+      - name: Maven release ${{steps.metadata.outputs.current-version}}
+        run: |
+          gpg --quiet --batch --yes --decrypt --passphrase="${{secrets.GPG_PASSPHRASE}}" --output /tmp/maven-settings.xml .github/release/maven-settings.xml.gpg
+          git checkout -b release
+          mvn -B release:prepare -Prelease -DreleaseVersion=${{steps.metadata.outputs.current-version}} -DdevelopmentVersion=${{steps.metadata.outputs.next-version}} -s /tmp/maven-settings.xml
+          git checkout ${{github.base_ref}}
+          git rebase release
+          mvn -B release:perform -Darguments=-DperformRelease -DperformRelease -Prelease -s /tmp/maven-settings.xml
+
+      - name: Push changes to ${{github.base_ref}}
+        uses: ad-m/github-push-action@v0.6.0
+        with:
+          github_token: ${{ secrets.GITHUB_TOKEN }}
+          branch: ${{github.base_ref}}
+
+      - name: Push tags
+        uses: ad-m/github-push-action@v0.6.0
+        with:
+          github_token: ${{ secrets.GITHUB_TOKEN }}
+          tags: true
+          branch: ${{github.base_ref}}
\ No newline at end of file
diff --git a/pom.xml b/pom.xml
index 578c217d..713cc53b 100644
--- a/pom.xml
+++ b/pom.xml
@@ -1,86 +1,99 @@
 <?xml version="1.0" encoding="UTF-8"?>
-<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
-         xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
-    <modelVersion>4.0.0</modelVersion>
+<project xmlns="http://maven.apache.org/POM/4.0.0"
+  xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+  xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
+  <modelVersion>4.0.0</modelVersion>
 
-    <groupId>io.serverlessworkflow</groupId>
-    <artifactId>serverlessworkflow-parent</artifactId>
-    <version>4.0.x</version>
-    <packaging>pom</packaging>
+  <groupId>io.serverlessworkflow</groupId>
+  <artifactId>serverlessworkflow-parent</artifactId>
+  <version>4.0.x</version>
+  <packaging>pom</packaging>
 
-    <name>Serverless Workflow :: Parent</name>
-    <url>https://serverlessworkflow.io/sdk-java/</url>
-    <description>Java SDK for Serverless Workflow Specification</description>
-    <inceptionYear>2020</inceptionYear>
-    <organization>
-        <name>CNCF</name>
-        <url>https://www.cncf.io//</url>
-    </organization>
-    <licenses>
-        <license>
-            <name>The Apache Software License, Version 2.0</name>
-            <url>http://www.apache.org/licenses/LICENSE-2.0.txt</url>
-            <distribution>repo</distribution>
-        </license>
-    </licenses>
+  <name>Serverless Workflow :: Parent</name>
+  <url>https://serverlessworkflow.io/sdk-java/</url>
+  <description>Java SDK for Serverless Workflow Specification</description>
+  <inceptionYear>2020</inceptionYear>
+  <developers>
+    <developer>
+      <id>serverless-workflow</id>
+      <name>Serverless Workflow Specification Authors</name>
+      <organization>CNCF</organization>
+    </developer>
+  </developers>
+  <organization>
+    <name>CNCF</name>
+    <url>https://www.cncf.io//</url>
+  </organization>
+  <licenses>
+    <license>
+      <name>The Apache Software License, Version 2.0</name>
+      <url>http://www.apache.org/licenses/LICENSE-2.0.txt</url>
+      <distribution>repo</distribution>
+    </license>
+  </licenses>
+  <scm>
+    <connection>scm:git:git@github.com:serverlessworkflow/sdk-java.git</connection>
+    <developerConnection>scm:git:git@github.com:serverlessworkflow/sdk-java.git</developerConnection>
+    <url>https://github.com/serverlessworkflow/sdk-java</url>
+    <tag>HEAD</tag>
+  </scm>
 
-    <scm>
-        <connection>scm:git:git://github.com/serverlessworkflow/sdk-java.git</connection>
-        <developerConnection>scm:git:git@github.com:serverlessworkflow/sdk-java.git</developerConnection>
-        <url>https://github.com/serverlessworkflow/sdk-java</url>
-    </scm>
+  <modules>
+    <module>api</module>
+    <module>spi</module>
+    <module>validation</module>
+    <module>diagram</module>
+    <module>utils</module>
+  </modules>
 
-    <developers>
-        <developer>
-            <id>tsurdilo</id>
-            <name>Tihomir Surdilovic</name>
-        </developer>
-    </developers>
+  <properties>
+    <java.version>11</java.version>
+    <maven.compiler.source>${java.version}</maven.compiler.source>
+    <maven.compiler.target>${java.version}</maven.compiler.target>
+    <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
+    <version.maven>3.6.2</version.maven>
 
-    <modules>
-        <module>api</module>
-        <module>spi</module>
-        <module>validation</module>
-        <module>diagram</module>
-        <module>utils</module>
-    </modules>
+    <!-- Plugin versions, please keep in alphabetical order -->
+    <version.buildnumber.plugin>3.2.0</version.buildnumber.plugin>
+    <version.checkstyle.plugin>3.1.1</version.checkstyle.plugin>
+    <version.compiler.plugin>3.8.1</version.compiler.plugin>
+    <version.deploy.plugin>2.8.2</version.deploy.plugin>
+    <version.enforcer.plugin>3.0.0-M2</version.enforcer.plugin>
+    <version.failsafe.plugin>3.1.2</version.failsafe.plugin>
+    <version.fmt-maven-plugin>2.13</version.fmt-maven-plugin>
+    <version.gpg.plugin>3.1.0</version.gpg.plugin>
+    <version.jar.plugin>3.2.0</version.jar.plugin>
+    <version.jdk>${java.version}</version.jdk>
+    <version.source.plugin>3.3.0</version.source.plugin>
+    <version.surefire.plugin>2.22.0</version.surefire.plugin>
 
-    <properties>
-        <maven.compiler.source>1.8</maven.compiler.source>
-        <maven.compiler.target>1.8</maven.compiler.target>
-        <java.version>1.8</java.version>
-        <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
-        <version.maven>3.6.2</version.maven>
-        <version.enforcer.plugin>3.0.0-M2</version.enforcer.plugin>
-        <version.jdk>8</version.jdk>
-        <version.compiler.plugin>3.8.1</version.compiler.plugin>
-        <version.surefire.plugin>2.22.0</version.surefire.plugin>
-        <version.failsafe.plugin>3.1.2</version.failsafe.plugin>
-        <version.checkstyle.plugin>3.1.1</version.checkstyle.plugin>
-        <version.deploy.plugin>2.8.2</version.deploy.plugin>
-        <version.com.networknt>1.0.87</version.com.networknt>
-        <version.org.slf4j>1.7.25</version.org.slf4j>
-        <version.com.fasterxml.jackson>2.15.3</version.com.fasterxml.jackson>
-        <version.javax.validation>2.0.1.Final</version.javax.validation>
-        <version.org.junit.minor>6.0</version.org.junit.minor>
-        <version.org.junit>5.${version.org.junit.minor}</version.org.junit>
-        <version.org.junit.jupiter>${version.org.junit}</version.org.junit.jupiter>
-        <version.org.mockito>5.6.0</version.org.mockito>
-        <version.ch.qos.logback>1.4.9</version.ch.qos.logback>
-        <version.org.assertj>3.13.2</version.org.assertj>
-        <version.jsonschema2pojo-maven-plugin>1.0.1</version.jsonschema2pojo-maven-plugin>
-        <commons.lang.version>3.13.0</commons.lang.version>
-        <hamcrest.version>1.3</hamcrest.version>
-        <jsonassert.version>1.5.0</jsonassert.version>
-        <json.schema.validation.version>1.14.1</json.schema.validation.version>
-        <version.thymeleaf>3.1.2.RELEASE</version.thymeleaf>
-        <version.plantuml>8059</version.plantuml>
-        <version.graphviz>0.17.0</version.graphviz>
-        <version.fmt-maven-plugin>2.13</version.fmt-maven-plugin>
-        <version.jar.plugin>3.2.0</version.jar.plugin>
-        <!-- Checkstyle props -->
-        <checkstyle.failOnViolation>true</checkstyle.failOnViolation>
-        <checkstyle.header.template><![CDATA[
+
+    <!-- Dependencies versions, please keep in alphabetical order -->
+    <version.ch.qos.logback>1.4.9</version.ch.qos.logback>
+    <version.com.fasterxml.jackson>2.15.3</version.com.fasterxml.jackson>
+    <version.com.networknt>1.0.87</version.com.networknt>
+    <version.commons.lang>3.13.0</version.commons.lang>
+    <version.graphviz>0.17.0</version.graphviz>
+    <version.hamcrest>1.3</version.hamcrest>
+    <version.javax.validation>2.0.1.Final</version.javax.validation>
+    <version.json.schema.validation>1.14.1</version.json.schema.validation>
+    <version.json>20230618</version.json>
+    <version.jsonassert>1.5.0</version.jsonassert>
+    <version.jsonschema2pojo-maven-plugin>1.0.1</version.jsonschema2pojo-maven-plugin>
+    <version.org.assertj>3.13.2</version.org.assertj>
+    <version.org.junit.jupiter>${version.org.junit}</version.org.junit.jupiter>
+    <version.org.junit.minor>6.0</version.org.junit.minor>
+    <version.org.junit>5.${version.org.junit.minor}</version.org.junit>
+    <version.org.mockito>5.6.0</version.org.mockito>
+    <version.org.slf4j>1.7.25</version.org.slf4j>
+    <version.plantuml>8059</version.plantuml>
+    <version.thymeleaf>3.1.2.RELEASE</version.thymeleaf>
+
+
+    <!-- Checkstyle props -->
+    <checkstyle.failOnViolation>true</checkstyle.failOnViolation>
+    <checkstyle.header.template><![CDATA[
+>>>>>>> fdc9b5f (Introduce Release Workflow)
 ^\/\*$\n^
 \* Copyright \d\d\d\d-Present The Serverless Workflow Specification Authors$\n^
 \*$\n^
@@ -97,275 +110,392 @@
 \* limitations under the License\.$\n^
 \*\/$
 ]]>
-        </checkstyle.header.template>
-        <checkstyle.header.extensions>java</checkstyle.header.extensions>
-        <checkstyle.logViolationsToConsole>true</checkstyle.logViolationsToConsole>
-    </properties>
+    </checkstyle.header.template>
+    <checkstyle.header.extensions>java</checkstyle.header.extensions>
+    <checkstyle.logViolationsToConsole>true</checkstyle.logViolationsToConsole>
+  </properties>
+
+  <dependencyManagement>
+    <dependencies>
+      <dependency>
+        <groupId>org.slf4j</groupId>
+        <artifactId>slf4j-api</artifactId>
+        <version>${version.org.slf4j}</version>
+      </dependency>
+      <dependency>
+        <groupId>org.slf4j</groupId>
+        <artifactId>jcl-over-slf4j</artifactId>
+        <version>${version.org.slf4j}</version>
+      </dependency>
+      <dependency>
+        <groupId>com.fasterxml.jackson.core</groupId>
+        <artifactId>jackson-core</artifactId>
+        <version>${version.com.fasterxml.jackson}</version>
+      </dependency>
+      <dependency>
+        <groupId>com.fasterxml.jackson.core</groupId>
+        <artifactId>jackson-databind</artifactId>
+        <version>${version.com.fasterxml.jackson}</version>
+      </dependency>
+      <dependency>
+        <groupId>com.networknt</groupId>
+        <artifactId>json-schema-validator</artifactId>
+        <version>${version.com.networknt}</version>
+        <exclusions>
+          <exclusion>
+            <groupId>org.apache.commons</groupId>
+            <artifactId>commons-lang3</artifactId>
+          </exclusion>
+        </exclusions>
+      </dependency>
+      <dependency>
+        <groupId>com.fasterxml.jackson.dataformat</groupId>
+        <artifactId>jackson-dataformat-yaml</artifactId>
+        <version>${version.com.fasterxml.jackson}</version>
+      </dependency>
+      <dependency>
+        <groupId>javax.validation</groupId>
+        <artifactId>validation-api</artifactId>
+        <version>${version.javax.validation}</version>
+      </dependency>
+      <dependency>
+        <groupId>org.apache.commons</groupId>
+        <artifactId>commons-lang3</artifactId>
+        <version>${commons.lang.version}</version>
+      </dependency>
+      <dependency>
+        <groupId>org.thymeleaf</groupId>
+        <artifactId>thymeleaf</artifactId>
+        <version>${version.thymeleaf}</version>
+      </dependency>
+      <dependency>
+        <groupId>net.sourceforge.plantuml</groupId>
+        <artifactId>plantuml</artifactId>
+        <version>${version.plantuml}</version>
+      </dependency>
+      <dependency>
+        <groupId>guru.nidi</groupId>
+        <artifactId>graphviz-java</artifactId>
+        <version>${version.graphviz}</version>
+      </dependency>
+
+      <!-- test -->
+      <dependency>
+        <groupId>org.junit.jupiter</groupId>
+        <artifactId>junit-jupiter-api</artifactId>
+        <version>${version.org.junit.jupiter}</version>
+        <scope>test</scope>
+      </dependency>
+      <dependency>
+        <groupId>org.junit.jupiter</groupId>
+        <artifactId>junit-jupiter-engine</artifactId>
+        <version>${version.org.junit.jupiter}</version>
+        <scope>test</scope>
+      </dependency>
+      <dependency>
+        <groupId>org.junit.jupiter</groupId>
+        <artifactId>junit-jupiter-params</artifactId>
+        <version>${version.org.junit.jupiter}</version>
+        <scope>test</scope>
+      </dependency>
+      <dependency>
+        <groupId>org.mockito</groupId>
+        <artifactId>mockito-core</artifactId>
+        <version>${version.org.mockito}</version>
+        <scope>test</scope>
+      </dependency>
+      <dependency>
+        <groupId>ch.qos.logback</groupId>
+        <artifactId>logback-classic</artifactId>
+        <version>${version.ch.qos.logback}</version>
+        <scope>test</scope>
+      </dependency>
+      <dependency>
+        <groupId>org.assertj</groupId>
+        <artifactId>assertj-core</artifactId>
+        <version>${version.org.assertj}</version>
+        <scope>test</scope>
+      </dependency>
+      <dependency>
+        <groupId>org.hamcrest</groupId>
+        <artifactId>hamcrest-library</artifactId>
+        <version>${version.hamcrest}</version>
+        <scope>test</scope>
+      </dependency>
+      <dependency>
+        <groupId>org.skyscreamer</groupId>
+        <artifactId>jsonassert</artifactId>
+        <version>${version.jsonassert}</version>
+        <scope>test</scope>
+      </dependency>
+    </dependencies>
+  </dependencyManagement>
 
-    <dependencyManagement>
-        <dependencies>
-            <dependency>
-                <groupId>org.slf4j</groupId>
-                <artifactId>slf4j-api</artifactId>
-                <version>${version.org.slf4j}</version>
-            </dependency>
-            <dependency>
-                <groupId>org.slf4j</groupId>
-                <artifactId>jcl-over-slf4j</artifactId>
-                <version>${version.org.slf4j}</version>
-            </dependency>
-            <dependency>
-                <groupId>com.fasterxml.jackson.core</groupId>
-                <artifactId>jackson-core</artifactId>
-                <version>${version.com.fasterxml.jackson}</version>
-            </dependency>
-            <dependency>
-                <groupId>com.fasterxml.jackson.core</groupId>
-                <artifactId>jackson-databind</artifactId>
-                <version>${version.com.fasterxml.jackson}</version>
-            </dependency>
-             <dependency>
-               <groupId>com.networknt</groupId>
-               <artifactId>json-schema-validator</artifactId>
-               <version>${version.com.networknt}</version>
-               <exclusions>
-                 <exclusion>
-                   <groupId>org.apache.commons</groupId>
-                   <artifactId>commons-lang3</artifactId>
-                 </exclusion>
-              </exclusions>
-            </dependency>
-            <dependency>
-                <groupId>com.fasterxml.jackson.dataformat</groupId>
-                <artifactId>jackson-dataformat-yaml</artifactId>
-                <version>${version.com.fasterxml.jackson}</version>
-            </dependency>
-            <dependency>
-                <groupId>javax.validation</groupId>
-                <artifactId>validation-api</artifactId>
-                <version>${version.javax.validation}</version>
-            </dependency>
-            <dependency>
-                <groupId>org.apache.commons</groupId>
-                <artifactId>commons-lang3</artifactId>
-                <version>${commons.lang.version}</version>
-            </dependency>
-            <dependency>
-                <groupId>org.thymeleaf</groupId>
-                <artifactId>thymeleaf</artifactId>
-                <version>${version.thymeleaf}</version>
-            </dependency>
-            <dependency>
-                <groupId>net.sourceforge.plantuml</groupId>
-                <artifactId>plantuml</artifactId>
-                <version>${version.plantuml}</version>
-            </dependency>
-            <dependency>
-                <groupId>guru.nidi</groupId>
-                <artifactId>graphviz-java</artifactId>
-                <version>${version.graphviz}</version>
-            </dependency>
+  <build>
+    <plugins>
+      <!-- Set properties containing the scm revision -->
+      <plugin>
+        <groupId>org.codehaus.mojo</groupId>
+        <artifactId>buildnumber-maven-plugin</artifactId>
+        <version>${version.buildnumber.plugin}</version>
+        <executions>
+          <execution>
+            <id>get-scm-revision</id>
+            <phase>initialize</phase>
+            <goals>
+              <goal>create</goal>
+            </goals>
+            <configuration>
+              <doCheck>false</doCheck>
+              <doUpdate>false</doUpdate>
+              <revisionOnScmFailure>UNKNOWN</revisionOnScmFailure>
+              <getRevisionOnlyOnce>true</getRevisionOnlyOnce>
+            </configuration>
+          </execution>
+        </executions>
+      </plugin>
+      <plugin>
+        <artifactId>maven-compiler-plugin</artifactId>
+        <version>${version.compiler.plugin}</version>
+        <configuration>
+          <showDeprecation>true</showDeprecation>
+          <showWarnings>true</showWarnings>
+          <source>${maven.compiler.source}</source>
+          <target>${maven.compiler.target}</target>
+          <testSource>${maven.compiler.source}</testSource>
+          <testTarget>${maven.compiler.target}</testTarget>
+          <parameters>true</parameters>
+          <compilerArgs>
+            <arg>-Xlint:unchecked</arg>
+          </compilerArgs>
+        </configuration>
+      </plugin>
+      <!-- Attach source jar to all builds.  Runs during the package phase.-->
+      <plugin>
+        <groupId>org.apache.maven.plugins</groupId>
+        <artifactId>maven-source-plugin</artifactId>
+        <executions>
+          <execution>
+            <id>attach-sources</id>
+            <goals>
+              <goal>jar-no-fork</goal>
+            </goals>
+          </execution>
+        </executions>
+      </plugin>
+    </plugins>
 
-            <!-- test -->
-            <dependency>
-                <groupId>org.junit.jupiter</groupId>
-                <artifactId>junit-jupiter-api</artifactId>
-                <version>${version.org.junit.jupiter}</version>
-                <scope>test</scope>
-            </dependency>
-            <dependency>
-                <groupId>org.junit.jupiter</groupId>
-                <artifactId>junit-jupiter-engine</artifactId>
-                <version>${version.org.junit.jupiter}</version>
-                <scope>test</scope>
-            </dependency>
-            <dependency>
-                <groupId>org.junit.jupiter</groupId>
-                <artifactId>junit-jupiter-params</artifactId>
-                <version>${version.org.junit.jupiter}</version>
-                <scope>test</scope>
-            </dependency>
-            <dependency>
-                <groupId>org.mockito</groupId>
-                <artifactId>mockito-core</artifactId>
-                <version>${version.org.mockito}</version>
-                <scope>test</scope>
-            </dependency>
-            <dependency>
-                <groupId>ch.qos.logback</groupId>
-                <artifactId>logback-classic</artifactId>
-                <version>${version.ch.qos.logback}</version>
-                <scope>test</scope>
-            </dependency>
-            <dependency>
-                <groupId>org.assertj</groupId>
-                <artifactId>assertj-core</artifactId>
-                <version>${version.org.assertj}</version>
-                <scope>test</scope>
-            </dependency>
-            <dependency>
-                <groupId>org.hamcrest</groupId>
-                <artifactId>hamcrest-library</artifactId>
-                <version>${hamcrest.version}</version>
-                <scope>test</scope>
-            </dependency>
-            <dependency>
-                <groupId>org.skyscreamer</groupId>
-                <artifactId>jsonassert</artifactId>
-                <version>${jsonassert.version}</version>
-                <scope>test</scope>
-            </dependency>
-        </dependencies>
-    </dependencyManagement>
+    <pluginManagement>
+      <plugins>
+        <plugin>
+          <groupId>org.apache.maven.plugins</groupId>
+          <artifactId>maven-gpg-plugin</artifactId>
+          <version>${version.gpg.plugin}</version>
+        </plugin>
+        <plugin>
+          <artifactId>maven-deploy-plugin</artifactId>
+          <version>${version.deploy.plugin}</version>
+          <configuration>
+            <retryFailedDeploymentCount>10</retryFailedDeploymentCount>
+          </configuration>
+        </plugin>
+        <plugin>
+          <groupId>org.apache.maven.plugins</groupId>
+          <artifactId>maven-enforcer-plugin</artifactId>
+          <version>${version.enforcer.plugin}</version>
+          <executions>
+            <execution>
+              <id>enforce-versions</id>
+              <goals>
+                <goal>enforce</goal>
+              </goals>
+              <configuration>
+                <rules>
+                  <requireMavenVersion>
+                    <version>${version.maven}</version>
+                  </requireMavenVersion>
+                  <requireJavaVersion>
+                    <version>${version.jdk}</version>
+                  </requireJavaVersion>
+                </rules>
+              </configuration>
+            </execution>
+          </executions>
+        </plugin>
+        <plugin>
+          <groupId>org.apache.maven.plugins</groupId>
+          <artifactId>maven-source-plugin</artifactId>
+          <version>${version.source.plugin}</version>
+          <configuration>
+            <archive>
+              <index>true</index>
+              <manifest>
+                <addDefaultSpecificationEntries>
+                  true
+                </addDefaultSpecificationEntries>
+                <addDefaultImplementationEntries>
+                  true
+                </addDefaultImplementationEntries>
+              </manifest>
+              <manifestEntries>
+                <Implementation-URL>${project.url}</Implementation-URL>
+                <Java-Version>${java.version}</Java-Version>
+                <Java-Vendor>${java.vendor}</Java-Vendor>
+                <Os-Name>${os.name}</Os-Name>
+                <Os-Arch>${os.arch}</Os-Arch>
+                <Os-Version>${os.version}</Os-Version>
+                <Scm-Url>${project.scm.url}</Scm-Url>
+                <Scm-Connection>${project.scm.connection}</Scm-Connection>
+                <Scm-Revision>${buildNumber}</Scm-Revision>
+              </manifestEntries>
+            </archive>
+          </configuration>
+        </plugin>
+        <plugin>
+          <groupId>org.apache.maven.plugins</groupId>
+          <artifactId>maven-release-plugin</artifactId>
+          <version>${version.release.plugin}</version>
+          <configuration>
+            <preparationGoals>clean install</preparationGoals>
+            <autoVersionSubmodules>true</autoVersionSubmodules>
+            <tagNameFormat>@{project.version}</tagNameFormat>
+            <pushChanges>false</pushChanges>
+            <localCheckout>true</localCheckout>
+            <remoteTagging>false</remoteTagging>
+          </configuration>
+        </plugin>
+        <plugin>
+          <groupId>org.jsonschema2pojo</groupId>
+          <artifactId>jsonschema2pojo-maven-plugin</artifactId>
+          <version>${version.jsonschema2pojo-maven-plugin}</version>
+        </plugin>
+        <plugin>
+          <groupId>org.apache.maven.plugins</groupId>
+          <artifactId>maven-surefire-plugin</artifactId>
+          <version>${version.surefire.plugin}</version>
+          <configuration>
+            <argLine>-Xmx1024m -XX:+IgnoreUnrecognizedVMOptions -XX:MaxPermSize=256m</argLine>
+          </configuration>
+        </plugin>
+        <plugin>
+          <groupId>org.apache.maven.plugins</groupId>
+          <artifactId>maven-failsafe-plugin</artifactId>
+          <version>${version.failsafe.plugin}</version>
+          <configuration>
+            <argLine>-Xmx1024m -XX:+IgnoreUnrecognizedVMOptions -XX:MaxPermSize=256m</argLine>
+          </configuration>
+        </plugin>
+        <plugin>
+          <groupId>org.apache.maven.plugins</groupId>
+          <artifactId>maven-checkstyle-plugin</artifactId>
+          <version>${version.checkstyle.plugin}</version>
+        </plugin>
+        <plugin>
+          <groupId>com.coveo</groupId>
+          <artifactId>fmt-maven-plugin</artifactId>
+          <version>${version.fmt-maven-plugin}</version>
+        </plugin>
+        <plugin>
+          <groupId>org.apache.maven.plugins</groupId>
+          <artifactId>maven-jar-plugin</artifactId>
+          <version>${version.jar.plugin}</version>
+          <configuration>
+            <archive>
+              <index>true</index>
+              <manifest>
+                <addDefaultSpecificationEntries>
+                  true
+                </addDefaultSpecificationEntries>
+                <addDefaultImplementationEntries>
+                  true
+                </addDefaultImplementationEntries>
+              </manifest>
+              <manifestEntries>
+                <Implementation-URL>${project.url}</Implementation-URL>
+                <Java-Version>${java.version}</Java-Version>
+                <Java-Vendor>${java.vendor}</Java-Vendor>
+                <Os-Name>${os.name}</Os-Name>
+                <Os-Arch>${os.arch}</Os-Arch>
+                <Os-Version>${os.version}</Os-Version>
+                <Scm-Url>${project.scm.url}</Scm-Url>
+                <Scm-Connection>${project.scm.connection}</Scm-Connection>
+                <Scm-Revision>${buildNumber}</Scm-Revision>
+              </manifestEntries>
+            </archive>
+          </configuration>
+        </plugin>
+        <plugin>
+          <groupId>org.apache.maven.plugins</groupId>
+          <artifactId>maven-javadoc-plugin</artifactId>
+          <version>${version.javadoc.plugin}</version>
+        </plugin>
+      </plugins>
+    </pluginManagement>
+  </build>
 
-    <build>
+
+  <distributionManagement>
+    <snapshotRepository>
+      <id>ossrh</id>
+      <url>https://oss.sonatype.org/content/repositories/snapshots</url>
+    </snapshotRepository>
+    <repository>
+      <id>ossrh</id>
+      <url>https://oss.sonatype.org/service/local/staging/deploy/maven2/</url>
+    </repository>
+  </distributionManagement>
+
+  <pluginRepositories>
+    <pluginRepository>
+      <id>central</id>
+      <name>Central Repository</name>
+      <url>https://repo.maven.apache.org/maven2</url>
+      <layout>default</layout>
+      <snapshots>
+        <enabled>false</enabled>
+      </snapshots>
+    </pluginRepository>
+  </pluginRepositories>
+
+  <profiles>
+    <profile>
+      <id>release</id>
+      <build>
         <plugins>
-            <plugin>
-                <artifactId>maven-deploy-plugin</artifactId>
-                <version>${version.deploy.plugin}</version>
-                <configuration>
-                    <retryFailedDeploymentCount>10</retryFailedDeploymentCount>
-                </configuration>
-            </plugin>
-            <plugin>
-                <groupId>org.apache.maven.plugins</groupId>
-                <artifactId>maven-enforcer-plugin</artifactId>
-                <version>${version.enforcer.plugin}</version>
-                <executions>
-                    <execution>
-                        <id>enforce-versions</id>
-                        <goals>
-                            <goal>enforce</goal>
-                        </goals>
-                        <configuration>
-                            <rules>
-                                <requireMavenVersion>
-                                    <version>${version.maven}</version>
-                                </requireMavenVersion>
-                                <requireJavaVersion>
-                                    <version>${version.jdk}</version>
-                                </requireJavaVersion>
-                            </rules>
-                        </configuration>
-                    </execution>
-                </executions>
-            </plugin>
-            <plugin>
-                <artifactId>maven-compiler-plugin</artifactId>
-                <version>${version.compiler.plugin}</version>
-                <configuration>
-                    <showDeprecation>true</showDeprecation>
-                    <showWarnings>true</showWarnings>
-                    <compilerArgs>
-                        <arg>-Xlint:unchecked</arg>
-                    </compilerArgs>
-                </configuration>
-            </plugin>
-            <plugin>
-                <groupId>org.jsonschema2pojo</groupId>
-                <artifactId>jsonschema2pojo-maven-plugin</artifactId>
-                <version>${version.jsonschema2pojo-maven-plugin}</version>
-            </plugin>
-            <plugin>
-                <groupId>org.apache.maven.plugins</groupId>
-                <artifactId>maven-surefire-plugin</artifactId>
-                <version>${version.surefire.plugin}</version>
-                <configuration>
-                    <argLine>-Xmx1024m -XX:+IgnoreUnrecognizedVMOptions -XX:MaxPermSize=256m</argLine>
-                </configuration>
-            </plugin>
-            <plugin>
-                <groupId>org.apache.maven.plugins</groupId>
-                <artifactId>maven-checkstyle-plugin</artifactId>
-                <version>${version.checkstyle.plugin}</version>
-            </plugin>
-            <plugin>
-                <groupId>com.coveo</groupId>
-                <artifactId>fmt-maven-plugin</artifactId>
-                <version>${version.fmt-maven-plugin}</version>
-            </plugin>
-            <plugin>
-                <groupId>org.apache.maven.plugins</groupId>
-                <artifactId>maven-jar-plugin</artifactId>
-                <version>${version.jar.plugin}</version>
-            </plugin>
-            <plugin>
-                <groupId>org.apache.maven.plugins</groupId>
-                <artifactId>maven-source-plugin</artifactId>
-                <version>3.0.1</version>
-                <executions>
-                    <execution>
-                        <id>attach-sources</id>
-                        <goals>
-                            <goal>jar</goal>
-                        </goals>
-                    </execution>
-                </executions>
-            </plugin>
-            <plugin>
-                <groupId>org.apache.maven.plugins</groupId>
-                <artifactId>maven-javadoc-plugin</artifactId>
-                <version>3.5.0</version>
-                <configuration>
-                    <source>8</source>
-                    <additionalparam>-Xdoclint:none</additionalparam>
-                </configuration>
-                <executions>
-                    <execution>
-                        <id>attach-javadocs</id>
-                        <goals>
-                            <goal>jar</goal>
-                        </goals>
-                        <configuration>
-                            <failOnError>false</failOnError>
-                        </configuration>
-                    </execution>
-                </executions>
-            </plugin>
-            <plugin>
-                <groupId>org.apache.maven.plugins</groupId>
-                <artifactId>maven-gpg-plugin</artifactId>
-                <version>1.6</version>
-                <executions>
-                    <execution>
-                        <id>sign-artifacts</id>
-                        <phase>verify</phase>
-                        <goals>
-                            <goal>sign</goal>
-                        </goals>
-                        <configuration>
-                            <gpgArguments>
-                                <arg>--batch</arg>
-                                <arg>--pinentry-mode</arg>
-                                <arg>loopback</arg>
-                            </gpgArguments>
-                        </configuration>
-                    </execution>
-                </executions>
-            </plugin>
+          <plugin>
+            <groupId>org.apache.maven.plugins</groupId>
+            <artifactId>maven-gpg-plugin</artifactId>
+            <configuration>
+              <gpgArguments>
+                <arg>--pinentry-mode</arg>
+                <arg>loopback</arg>
+              </gpgArguments>
+            </configuration>
+            <executions>
+              <execution>
+                <id>sign-artifacts</id>
+                <phase>verify</phase>
+                <goals>
+                  <goal>sign</goal>
+                </goals>
+              </execution>
+            </executions>
+          </plugin>
+          <plugin>
+            <groupId>org.apache.maven.plugins</groupId>
+            <artifactId>maven-javadoc-plugin</artifactId>
+            <executions>
+              <execution>
+                <phase>package</phase>
+                <goals>
+                  <goal>jar</goal>
+                </goals>
+              </execution>
+            </executions>
+          </plugin>
         </plugins>
-    </build>
-
-    <distributionManagement>
-        <snapshotRepository>
-            <id>ossrh</id>
-            <url>https://oss.sonatype.org/content/repositories/snapshots</url>
-        </snapshotRepository>
-        <repository>
-            <id>ossrh</id>
-            <url>https://oss.sonatype.org/service/local/staging/deploy/maven2/</url>
-        </repository>
-    </distributionManagement>
+      </build>
+    </profile>
+  </profiles>
 
-    <pluginRepositories>
-        <pluginRepository>
-            <id>central</id>
-            <name>Central Repository</name>
-            <url>https://repo.maven.apache.org/maven2</url>
-            <layout>default</layout>
-            <snapshots>
-                <enabled>false</enabled>
-            </snapshots>
-        </pluginRepository>
-    </pluginRepositories>
 </project>
\ No newline at end of file

From 24c6569e90b2613f21ea47c5676a55f38a66ea43 Mon Sep 17 00:00:00 2001
From: Ricardo Zanini <zanini@redhat.com>
Date: Fri, 28 Jul 2023 13:00:50 -0300
Subject: [PATCH 048/109] Remove gpg, deploy workflow

Signed-off-by: Ricardo Zanini <zanini@redhat.com>
---
 .github/workflows/maven-deploy.yml | 26 -----------------
 .github/workflows/maven-verify.yml | 12 +++-----
 .github/workflows/release.yml      | 46 +++++++++++++-----------------
 pom.xml                            | 21 ++++++--------
 4 files changed, 32 insertions(+), 73 deletions(-)
 delete mode 100644 .github/workflows/maven-deploy.yml

diff --git a/.github/workflows/maven-deploy.yml b/.github/workflows/maven-deploy.yml
deleted file mode 100644
index f89bf3a0..00000000
--- a/.github/workflows/maven-deploy.yml
+++ /dev/null
@@ -1,26 +0,0 @@
-# This workflow will build a Java project with Maven
-# For more information see: https://help.github.com/actions/language-and-framework-guides/building-and-testing-java-with-maven
-
-name: Deploy SNAPSHOT
-
-on:
-  push:
-    branches:
-      - main
-jobs:
-  publish:
-    runs-on: ubuntu-latest
-    steps:
-      - uses: actions/checkout@v2
-      - name: Set up Maven Central Repository
-        uses: actions/setup-java@v1
-        with:
-          java-version: 1.8
-          server-id: ossrh
-          server-username: MAVEN_USERNAME
-          server-password: MAVEN_PASSWORD
-      - name: Publish package
-        run: mvn -B -f pom.xml deploy
-        env:
-          MAVEN_USERNAME: ${{ secrets.OSSRH_USERNAME }}
-          MAVEN_PASSWORD: ${{ secrets.OSSRH_PASSWORD }}
diff --git a/.github/workflows/maven-verify.yml b/.github/workflows/maven-verify.yml
index db64ea66..420e2eb3 100644
--- a/.github/workflows/maven-verify.yml
+++ b/.github/workflows/maven-verify.yml
@@ -1,7 +1,7 @@
 # This workflow will build a Java project with Maven
 # For more information see: https://help.github.com/actions/language-and-framework-guides/building-and-testing-java-with-maven
 
-name: Verify SNAPSHOT
+name: Maven Verify
 
 on:
   push:
@@ -16,15 +16,11 @@ jobs:
     steps:
     - uses: actions/checkout@v2
     - name: Set up JDK 1.8
-      uses: actions/setup-java@v1
+      uses: actions/setup-java@v3
       with:
+        distribution: temurin
         java-version: 1.8
-    - name: Cache Maven packages
-      uses: actions/cache@v2
-      with:
-        path: ~/.m2
-        key: ${{ runner.os }}-m2-${{ hashFiles('pom.xml') }}
-        restore-keys: ${{ runner.os }}-m2
+        cache: 'maven'
     - name: Verify with Maven
       run: |
         mvn -B -f pom.xml clean install verify
diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml
index 9e683cda..c417311f 100644
--- a/.github/workflows/release.yml
+++ b/.github/workflows/release.yml
@@ -5,6 +5,13 @@ on:
     types: [closed]
     paths:
       - '.github/project.yml'
+  concurrency:
+    group: ${{ github.workflow }}-${{ github.ref }}
+    cancel-in-progress: true
+
+  defaults:
+    run:
+      shell: bash
 
 jobs:
   release:
@@ -34,14 +41,10 @@ jobs:
         with:
           distribution: temurin
           java-version: 11
-
-      - name: Cache local Maven repository
-        uses: actions/cache@v3
-        with:
-          path: ~/.m2/repository
-          key: ${{ runner.os }}-maven-${{ hashFiles('**/pom.xml') }}
-          restore-keys: |
-            ${{ runner.os }}-maven-
+          cache: 'maven'
+          server-id: ossrh
+          server-username: MAVEN_USERNAME
+          server-password: MAVEN_PASSWORD
 
       - name: Configure Git author
         run: |
@@ -50,22 +53,13 @@ jobs:
 
       - name: Maven release ${{steps.metadata.outputs.current-version}}
         run: |
-          gpg --quiet --batch --yes --decrypt --passphrase="${{secrets.GPG_PASSPHRASE}}" --output /tmp/maven-settings.xml .github/release/maven-settings.xml.gpg
-          git checkout -b release
-          mvn -B release:prepare -Prelease -DreleaseVersion=${{steps.metadata.outputs.current-version}} -DdevelopmentVersion=${{steps.metadata.outputs.next-version}} -s /tmp/maven-settings.xml
-          git checkout ${{github.base_ref}}
-          git rebase release
-          mvn -B release:perform -Darguments=-DperformRelease -DperformRelease -Prelease -s /tmp/maven-settings.xml
+          mvn -B release:prepare -Prelease -DreleaseVersion=${{steps.metadata.outputs.current-version}} -DdevelopmentVersion=${{steps.metadata.outputs.next-version}}
+          mvn -B release:perform -Darguments=-DperformRelease -DperformRelease -Prelease
+        env:
+          MAVEN_USERNAME: ${{ secrets.OSSRH_USERNAME }}
+          MAVEN_PASSWORD: ${{ secrets.OSSRH_TOKEN }}
 
-      - name: Push changes to ${{github.base_ref}}
-        uses: ad-m/github-push-action@v0.6.0
-        with:
-          github_token: ${{ secrets.GITHUB_TOKEN }}
-          branch: ${{github.base_ref}}
-
-      - name: Push tags
-        uses: ad-m/github-push-action@v0.6.0
-        with:
-          github_token: ${{ secrets.GITHUB_TOKEN }}
-          tags: true
-          branch: ${{github.base_ref}}
\ No newline at end of file
+      - name: Push changes to ${{github.base_ref}} branch
+        run: |
+          git push
+          git push origin ${{steps.metadata.outputs.current-version}}
diff --git a/pom.xml b/pom.xml
index 713cc53b..3042340e 100644
--- a/pom.xml
+++ b/pom.xml
@@ -270,19 +270,6 @@
           </compilerArgs>
         </configuration>
       </plugin>
-      <!-- Attach source jar to all builds.  Runs during the package phase.-->
-      <plugin>
-        <groupId>org.apache.maven.plugins</groupId>
-        <artifactId>maven-source-plugin</artifactId>
-        <executions>
-          <execution>
-            <id>attach-sources</id>
-            <goals>
-              <goal>jar-no-fork</goal>
-            </goals>
-          </execution>
-        </executions>
-      </plugin>
     </plugins>
 
     <pluginManagement>
@@ -326,6 +313,14 @@
           <groupId>org.apache.maven.plugins</groupId>
           <artifactId>maven-source-plugin</artifactId>
           <version>${version.source.plugin}</version>
+          <executions>
+            <execution>
+              <id>attach-sources</id>
+              <goals>
+                <goal>jar-no-fork</goal>
+              </goals>
+            </execution>
+          </executions>
           <configuration>
             <archive>
               <index>true</index>

From 873033bad0043db3841eb135bdd87d3fc4fa2d44 Mon Sep 17 00:00:00 2001
From: Ricardo Zanini <zanini@redhat.com>
Date: Fri, 28 Jul 2023 13:06:54 -0300
Subject: [PATCH 049/109] formatting yml files

Signed-off-by: Ricardo Zanini <zanini@redhat.com>
---
 .github/workflows/maven-verify.yml | 24 +++++++++++++-----------
 .github/workflows/release.yml      |  3 ---
 2 files changed, 13 insertions(+), 14 deletions(-)

diff --git a/.github/workflows/maven-verify.yml b/.github/workflows/maven-verify.yml
index 420e2eb3..37d6d5e7 100644
--- a/.github/workflows/maven-verify.yml
+++ b/.github/workflows/maven-verify.yml
@@ -1,7 +1,7 @@
 # This workflow will build a Java project with Maven
 # For more information see: https://help.github.com/actions/language-and-framework-guides/building-and-testing-java-with-maven
 
-name: Maven Verify
+name: sdk-java Verify
 
 on:
   push:
@@ -14,13 +14,15 @@ jobs:
   build:
     runs-on: ubuntu-latest
     steps:
-    - uses: actions/checkout@v2
-    - name: Set up JDK 1.8
-      uses: actions/setup-java@v3
-      with:
-        distribution: temurin
-        java-version: 1.8
-        cache: 'maven'
-    - name: Verify with Maven
-      run: |
-        mvn -B -f pom.xml clean install verify
+      - uses: actions/checkout@v2
+
+      - name: Set up JDK 1.8
+        uses: actions/setup-java@v3
+        with:
+          distribution: temurin
+          java-version: 1.8
+          cache: 'maven'
+
+      - name: Verify with Maven
+        run: |
+          mvn -B -f pom.xml clean install verify
diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml
index c417311f..22267f17 100644
--- a/.github/workflows/release.yml
+++ b/.github/workflows/release.yml
@@ -5,9 +5,6 @@ on:
     types: [closed]
     paths:
       - '.github/project.yml'
-  concurrency:
-    group: ${{ github.workflow }}-${{ github.ref }}
-    cancel-in-progress: true
 
   defaults:
     run:

From 9df57023210508a168d3289929c0752a0dc4e768 Mon Sep 17 00:00:00 2001
From: Ricardo Zanini <zanini@redhat.com>
Date: Fri, 28 Jul 2023 13:07:36 -0300
Subject: [PATCH 050/109] Remove unneeded attrs

Signed-off-by: Ricardo Zanini <zanini@redhat.com>
---
 .github/workflows/release.yml | 4 ----
 1 file changed, 4 deletions(-)

diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml
index 22267f17..3d9d4f03 100644
--- a/.github/workflows/release.yml
+++ b/.github/workflows/release.yml
@@ -6,10 +6,6 @@ on:
     paths:
       - '.github/project.yml'
 
-  defaults:
-    run:
-      shell: bash
-
 jobs:
   release:
     runs-on: ubuntu-latest

From 12db91479347c8c2ab79bf54ecd67007e7b6100f Mon Sep 17 00:00:00 2001
From: Ricardo Zanini <zanini@redhat.com>
Date: Wed, 11 Oct 2023 14:59:17 -0300
Subject: [PATCH 051/109] Fix commons-lang3 property version

Signed-off-by: Ricardo Zanini <zanini@redhat.com>
---
 pom.xml | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/pom.xml b/pom.xml
index 3042340e..e6edd5f5 100644
--- a/pom.xml
+++ b/pom.xml
@@ -161,7 +161,7 @@
       <dependency>
         <groupId>org.apache.commons</groupId>
         <artifactId>commons-lang3</artifactId>
-        <version>${commons.lang.version}</version>
+        <version>${version.commons.lang}</version>
       </dependency>
       <dependency>
         <groupId>org.thymeleaf</groupId>

From d85b198796afd8336dcd97cdf71a892287658df8 Mon Sep 17 00:00:00 2001
From: Ricardo Zanini <zanini@redhat.com>
Date: Wed, 11 Oct 2023 15:25:46 -0300
Subject: [PATCH 052/109] Removing unused property versions

Signed-off-by: Ricardo Zanini <zanini@redhat.com>
---
 pom.xml | 4 +---
 1 file changed, 1 insertion(+), 3 deletions(-)

diff --git a/pom.xml b/pom.xml
index e6edd5f5..244ed807 100644
--- a/pom.xml
+++ b/pom.xml
@@ -64,6 +64,7 @@
     <version.gpg.plugin>3.1.0</version.gpg.plugin>
     <version.jar.plugin>3.2.0</version.jar.plugin>
     <version.jdk>${java.version}</version.jdk>
+    <version.jsonschema2pojo-maven-plugin>1.0.1</version.jsonschema2pojo-maven-plugin>
     <version.source.plugin>3.3.0</version.source.plugin>
     <version.surefire.plugin>2.22.0</version.surefire.plugin>
 
@@ -76,10 +77,7 @@
     <version.graphviz>0.17.0</version.graphviz>
     <version.hamcrest>1.3</version.hamcrest>
     <version.javax.validation>2.0.1.Final</version.javax.validation>
-    <version.json.schema.validation>1.14.1</version.json.schema.validation>
-    <version.json>20230618</version.json>
     <version.jsonassert>1.5.0</version.jsonassert>
-    <version.jsonschema2pojo-maven-plugin>1.0.1</version.jsonschema2pojo-maven-plugin>
     <version.org.assertj>3.13.2</version.org.assertj>
     <version.org.junit.jupiter>${version.org.junit}</version.org.junit.jupiter>
     <version.org.junit.minor>6.0</version.org.junit.minor>

From 8483f17fb5760a4622f5d6ba37ebabdd3091f0f6 Mon Sep 17 00:00:00 2001
From: Ricardo Zanini <zanini@redhat.com>
Date: Thu, 19 Oct 2023 11:54:00 -0300
Subject: [PATCH 053/109] Fix formatting, replace fmt for spotify group, rebase

Signed-off-by: Ricardo Zanini <zanini@redhat.com>
---
 api/pom.xml                                   |  2 +-
 .../api/test/MarkupToWorkflowTest.java        |  4 ++--
 diagram/pom.xml                               |  2 +-
 pom.xml                                       |  4 ++--
 spi/pom.xml                                   |  2 +-
 utils/pom.xml                                 |  2 +-
 .../utils/WorkflowUtils.java                  | 20 ++++++++++++++-----
 validation/pom.xml                            |  2 +-
 8 files changed, 24 insertions(+), 14 deletions(-)

diff --git a/api/pom.xml b/api/pom.xml
index 63ba1ef1..0a7293dc 100644
--- a/api/pom.xml
+++ b/api/pom.xml
@@ -143,7 +143,7 @@
                 </executions>
             </plugin>
             <plugin>
-                <groupId>com.coveo</groupId>
+                <groupId>com.spotify.fmt</groupId>
                 <artifactId>fmt-maven-plugin</artifactId>
                 <configuration>
                     <sourceDirectory>src/main/java</sourceDirectory>
diff --git a/api/src/test/java/io/serverlessworkflow/api/test/MarkupToWorkflowTest.java b/api/src/test/java/io/serverlessworkflow/api/test/MarkupToWorkflowTest.java
index 3c7c7a65..f5b30d07 100644
--- a/api/src/test/java/io/serverlessworkflow/api/test/MarkupToWorkflowTest.java
+++ b/api/src/test/java/io/serverlessworkflow/api/test/MarkupToWorkflowTest.java
@@ -45,7 +45,6 @@
 import io.serverlessworkflow.api.workflow.Secrets;
 import java.util.List;
 import java.util.Map;
-
 import org.junit.jupiter.params.ParameterizedTest;
 import org.junit.jupiter.params.provider.ValueSource;
 
@@ -267,7 +266,8 @@ public void testTransitions(String workflowLocation) {
     assertNotNull(cond2.getTransition().getProduceEvents());
     assertEquals(1, cond2.getTransition().getProduceEvents().size());
     assertNotNull(cond2.getTransition().getProduceEvents().get(0).getContextAttributes());
-    Map<String, String> contextAttributes = cond2.getTransition().getProduceEvents().get(0).getContextAttributes();
+    Map<String, String> contextAttributes =
+        cond2.getTransition().getProduceEvents().get(0).getContextAttributes();
     assertEquals(2, contextAttributes.size());
     assertEquals("IN", contextAttributes.get("order_location"));
     assertEquals("online", contextAttributes.get("order_type"));
diff --git a/diagram/pom.xml b/diagram/pom.xml
index 2668c850..9dd5c1b8 100644
--- a/diagram/pom.xml
+++ b/diagram/pom.xml
@@ -130,7 +130,7 @@
                 </executions>
             </plugin>
             <plugin>
-                <groupId>com.coveo</groupId>
+                <groupId>com.spotify.fmt</groupId>
                 <artifactId>fmt-maven-plugin</artifactId>
                 <configuration>
                     <sourceDirectory>src/main/java</sourceDirectory>
diff --git a/pom.xml b/pom.xml
index 244ed807..0bef666d 100644
--- a/pom.xml
+++ b/pom.xml
@@ -60,7 +60,7 @@
     <version.deploy.plugin>2.8.2</version.deploy.plugin>
     <version.enforcer.plugin>3.0.0-M2</version.enforcer.plugin>
     <version.failsafe.plugin>3.1.2</version.failsafe.plugin>
-    <version.fmt-maven-plugin>2.13</version.fmt-maven-plugin>
+    <version.fmt-maven-plugin>2.21.1</version.fmt-maven-plugin>
     <version.gpg.plugin>3.1.0</version.gpg.plugin>
     <version.jar.plugin>3.2.0</version.jar.plugin>
     <version.jdk>${java.version}</version.jdk>
@@ -384,7 +384,7 @@
           <version>${version.checkstyle.plugin}</version>
         </plugin>
         <plugin>
-          <groupId>com.coveo</groupId>
+          <groupId>com.spotify.fmt</groupId>
           <artifactId>fmt-maven-plugin</artifactId>
           <version>${version.fmt-maven-plugin}</version>
         </plugin>
diff --git a/spi/pom.xml b/spi/pom.xml
index db4fbf79..6fad0bb4 100644
--- a/spi/pom.xml
+++ b/spi/pom.xml
@@ -102,7 +102,7 @@
                 </executions>
             </plugin>
             <plugin>
-                <groupId>com.coveo</groupId>
+                <groupId>com.spotify.fmt</groupId>
                 <artifactId>fmt-maven-plugin</artifactId>
                 <configuration>
                     <sourceDirectory>src/main/java</sourceDirectory>
diff --git a/utils/pom.xml b/utils/pom.xml
index 3c479281..834e8815 100644
--- a/utils/pom.xml
+++ b/utils/pom.xml
@@ -102,7 +102,7 @@
                 </executions>
             </plugin>
             <plugin>
-                <groupId>com.coveo</groupId>
+                <groupId>com.spotify.fmt</groupId>
                 <artifactId>fmt-maven-plugin</artifactId>
                 <configuration>
                     <sourceDirectory>src/main/java</sourceDirectory>
diff --git a/utils/src/main/java/io/serverlessworkflow/utils/WorkflowUtils.java b/utils/src/main/java/io/serverlessworkflow/utils/WorkflowUtils.java
index 29b8c7cc..48340a9f 100644
--- a/utils/src/main/java/io/serverlessworkflow/utils/WorkflowUtils.java
+++ b/utils/src/main/java/io/serverlessworkflow/utils/WorkflowUtils.java
@@ -117,18 +117,24 @@ public static List<EventDefinition> getDefinedEvents(
         .collect(Collectors.toList());
   }
 
-  /** @return {@code int} Returns count of defined event count matching eventKind */
+  /**
+   * @return {@code int} Returns count of defined event count matching eventKind
+   */
   public static int getDefinedEventsCount(Workflow workflow, EventDefinition.Kind eventKind) {
     List<EventDefinition> definedEvents = getDefinedEvents(workflow, eventKind);
     return definedEvents == null ? 0 : definedEvents.size();
   }
 
-  /** @return {@code int} Returns count of Defined Consumed Event Count */
+  /**
+   * @return {@code int} Returns count of Defined Consumed Event Count
+   */
   public static int getDefinedConsumedEventsCount(Workflow workflow) {
     return getDefinedEventsCount(workflow, EventDefinition.Kind.CONSUMED);
   }
 
-  /** @return {@code int} Returns count of Defined Produced Event Count */
+  /**
+   * @return {@code int} Returns count of Defined Produced Event Count
+   */
   public static int getDefinedProducedEventsCount(Workflow workflow) {
     return getDefinedEventsCount(workflow, EventDefinition.Kind.PRODUCED);
   }
@@ -252,7 +258,9 @@ public static int getWorkflowProducedEventsCount(Workflow workflow) {
     return workflowProducedEvents == null ? 0 : workflowProducedEvents.size();
   }
 
-  /** @return Returns function definition for actions */
+  /**
+   * @return Returns function definition for actions
+   */
   public static FunctionDefinition getFunctionDefinitionsForAction(
       Workflow workflow, String action) {
     if (!hasFunctionDefs(workflow)) return null;
@@ -267,7 +275,9 @@ public static FunctionDefinition getFunctionDefinitionsForAction(
     return functionDefinition.isPresent() ? functionDefinition.get() : null;
   }
 
-  /** @return : Returns @{code List<Action>} which uses a function defintion */
+  /**
+   * @return : Returns @{code List<Action>} which uses a function defintion
+   */
   public static List<Action> getActionsForFunctionDefinition(
       Workflow workflow, String functionDefinitionName) {
     if (!hasFunctionDefs(workflow, functionDefinitionName)) return null;
diff --git a/validation/pom.xml b/validation/pom.xml
index 6b4e808a..cf8544e6 100644
--- a/validation/pom.xml
+++ b/validation/pom.xml
@@ -124,7 +124,7 @@
                 </executions>
             </plugin>
             <plugin>
-                <groupId>com.coveo</groupId>
+                <groupId>com.spotify.fmt</groupId>
                 <artifactId>fmt-maven-plugin</artifactId>
                 <configuration>
                     <sourceDirectory>src/main/java</sourceDirectory>

From b332fc8752f05be82af1b0e5b93c45f25a737a39 Mon Sep 17 00:00:00 2001
From: Ricardo Zanini <zanini@redhat.com>
Date: Fri, 20 Oct 2023 10:54:27 -0300
Subject: [PATCH 054/109] Sync main with 4.0.x

Signed-off-by: Ricardo Zanini <zanini@redhat.com>
---
 pom.xml | 1 -
 1 file changed, 1 deletion(-)

diff --git a/pom.xml b/pom.xml
index 0bef666d..df7bab94 100644
--- a/pom.xml
+++ b/pom.xml
@@ -91,7 +91,6 @@
     <!-- Checkstyle props -->
     <checkstyle.failOnViolation>true</checkstyle.failOnViolation>
     <checkstyle.header.template><![CDATA[
->>>>>>> fdc9b5f (Introduce Release Workflow)
 ^\/\*$\n^
 \* Copyright \d\d\d\d-Present The Serverless Workflow Specification Authors$\n^
 \*$\n^

From 67a66346da87aeca7dd9f90fb53d25a2a7a31e1f Mon Sep 17 00:00:00 2001
From: Ricardo Zanini <zanini@redhat.com>
Date: Fri, 20 Oct 2023 10:55:10 -0300
Subject: [PATCH 055/109] Downgrade to Java 1.8

Signed-off-by: Ricardo Zanini <zanini@redhat.com>
---
 .github/workflows/release.yml | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml
index 3d9d4f03..a2cda762 100644
--- a/.github/workflows/release.yml
+++ b/.github/workflows/release.yml
@@ -29,11 +29,11 @@ jobs:
           gpg_private_key: ${{ secrets.GPG_PRIVATE_KEY }}
           passphrase: ${{ secrets.GPG_PASSPHRASE }}
 
-      - name: Set up JDK 11
+      - name: Set up JDK 1.8
         uses: actions/setup-java@v3
         with:
           distribution: temurin
-          java-version: 11
+          java-version: 1.8
           cache: 'maven'
           server-id: ossrh
           server-username: MAVEN_USERNAME

From 4431edda1392f413f3d75a1c2c0b632e1a003173 Mon Sep 17 00:00:00 2001
From: Ricardo Zanini <zanini@redhat.com>
Date: Fri, 20 Oct 2023 11:01:36 -0300
Subject: [PATCH 056/109] Align workflow to run on 4.0.* branch

Signed-off-by: Ricardo Zanini <zanini@redhat.com>
---
 .github/workflows/maven-verify.yml | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/.github/workflows/maven-verify.yml b/.github/workflows/maven-verify.yml
index 37d6d5e7..e7b3b0ce 100644
--- a/.github/workflows/maven-verify.yml
+++ b/.github/workflows/maven-verify.yml
@@ -6,10 +6,10 @@ name: sdk-java Verify
 on:
   push:
     branches:
-      - main
+      - 4.0.*
   pull_request:
     branches:
-      - main
+      - 4.0.*
 jobs:
   build:
     runs-on: ubuntu-latest

From 432a7a12beeb5d57aa7712492a8d6a13eb6fd3b8 Mon Sep 17 00:00:00 2001
From: Ricardo Zanini <zanini@redhat.com>
Date: Fri, 20 Oct 2023 11:06:06 -0300
Subject: [PATCH 057/109] Fix java version in setup-java action

Signed-off-by: Ricardo Zanini <zanini@redhat.com>
---
 .github/workflows/maven-verify.yml | 2 +-
 .github/workflows/release.yml      | 2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/.github/workflows/maven-verify.yml b/.github/workflows/maven-verify.yml
index e7b3b0ce..44aba632 100644
--- a/.github/workflows/maven-verify.yml
+++ b/.github/workflows/maven-verify.yml
@@ -20,7 +20,7 @@ jobs:
         uses: actions/setup-java@v3
         with:
           distribution: temurin
-          java-version: 1.8
+          java-version: 8
           cache: 'maven'
 
       - name: Verify with Maven
diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml
index a2cda762..f2341c8a 100644
--- a/.github/workflows/release.yml
+++ b/.github/workflows/release.yml
@@ -33,7 +33,7 @@ jobs:
         uses: actions/setup-java@v3
         with:
           distribution: temurin
-          java-version: 1.8
+          java-version: 8
           cache: 'maven'
           server-id: ossrh
           server-username: MAVEN_USERNAME

From 7a9d0b3a8f9006ea801d57d578285f64151ba814 Mon Sep 17 00:00:00 2001
From: Ricardo Zanini <zanini@redhat.com>
Date: Fri, 20 Oct 2023 11:19:02 -0300
Subject: [PATCH 058/109] Downgrading fmt plugin to cope with Java 1.8

Signed-off-by: Ricardo Zanini <zanini@redhat.com>
---
 pom.xml | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/pom.xml b/pom.xml
index df7bab94..625c99ab 100644
--- a/pom.xml
+++ b/pom.xml
@@ -47,7 +47,7 @@
   </modules>
 
   <properties>
-    <java.version>11</java.version>
+    <java.version>1.8</java.version>
     <maven.compiler.source>${java.version}</maven.compiler.source>
     <maven.compiler.target>${java.version}</maven.compiler.target>
     <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
@@ -60,7 +60,7 @@
     <version.deploy.plugin>2.8.2</version.deploy.plugin>
     <version.enforcer.plugin>3.0.0-M2</version.enforcer.plugin>
     <version.failsafe.plugin>3.1.2</version.failsafe.plugin>
-    <version.fmt-maven-plugin>2.21.1</version.fmt-maven-plugin>
+    <version.fmt-maven-plugin>2.9</version.fmt-maven-plugin>
     <version.gpg.plugin>3.1.0</version.gpg.plugin>
     <version.jar.plugin>3.2.0</version.jar.plugin>
     <version.jdk>${java.version}</version.jdk>
@@ -383,7 +383,7 @@
           <version>${version.checkstyle.plugin}</version>
         </plugin>
         <plugin>
-          <groupId>com.spotify.fmt</groupId>
+          <groupId>com.coveo</groupId>
           <artifactId>fmt-maven-plugin</artifactId>
           <version>${version.fmt-maven-plugin}</version>
         </plugin>

From b4a187a477e4917d44a1871d8424a7606c2f27da Mon Sep 17 00:00:00 2001
From: Ricardo Zanini <zanini@redhat.com>
Date: Fri, 20 Oct 2023 11:25:10 -0300
Subject: [PATCH 059/109] Fix fmt downgrading

Signed-off-by: Ricardo Zanini <zanini@redhat.com>
---
 api/pom.xml                                   |  2 +-
 diagram/pom.xml                               |  2 +-
 pom.xml                                       |  2 +-
 spi/pom.xml                                   |  2 +-
 utils/pom.xml                                 |  2 +-
 .../utils/WorkflowUtils.java                  | 20 +++++--------------
 validation/pom.xml                            |  2 +-
 7 files changed, 11 insertions(+), 21 deletions(-)

diff --git a/api/pom.xml b/api/pom.xml
index 0a7293dc..63ba1ef1 100644
--- a/api/pom.xml
+++ b/api/pom.xml
@@ -143,7 +143,7 @@
                 </executions>
             </plugin>
             <plugin>
-                <groupId>com.spotify.fmt</groupId>
+                <groupId>com.coveo</groupId>
                 <artifactId>fmt-maven-plugin</artifactId>
                 <configuration>
                     <sourceDirectory>src/main/java</sourceDirectory>
diff --git a/diagram/pom.xml b/diagram/pom.xml
index 9dd5c1b8..2668c850 100644
--- a/diagram/pom.xml
+++ b/diagram/pom.xml
@@ -130,7 +130,7 @@
                 </executions>
             </plugin>
             <plugin>
-                <groupId>com.spotify.fmt</groupId>
+                <groupId>com.coveo</groupId>
                 <artifactId>fmt-maven-plugin</artifactId>
                 <configuration>
                     <sourceDirectory>src/main/java</sourceDirectory>
diff --git a/pom.xml b/pom.xml
index 625c99ab..22486415 100644
--- a/pom.xml
+++ b/pom.xml
@@ -60,7 +60,7 @@
     <version.deploy.plugin>2.8.2</version.deploy.plugin>
     <version.enforcer.plugin>3.0.0-M2</version.enforcer.plugin>
     <version.failsafe.plugin>3.1.2</version.failsafe.plugin>
-    <version.fmt-maven-plugin>2.9</version.fmt-maven-plugin>
+    <version.fmt-maven-plugin>2.9.1</version.fmt-maven-plugin>
     <version.gpg.plugin>3.1.0</version.gpg.plugin>
     <version.jar.plugin>3.2.0</version.jar.plugin>
     <version.jdk>${java.version}</version.jdk>
diff --git a/spi/pom.xml b/spi/pom.xml
index 6fad0bb4..db4fbf79 100644
--- a/spi/pom.xml
+++ b/spi/pom.xml
@@ -102,7 +102,7 @@
                 </executions>
             </plugin>
             <plugin>
-                <groupId>com.spotify.fmt</groupId>
+                <groupId>com.coveo</groupId>
                 <artifactId>fmt-maven-plugin</artifactId>
                 <configuration>
                     <sourceDirectory>src/main/java</sourceDirectory>
diff --git a/utils/pom.xml b/utils/pom.xml
index 834e8815..3c479281 100644
--- a/utils/pom.xml
+++ b/utils/pom.xml
@@ -102,7 +102,7 @@
                 </executions>
             </plugin>
             <plugin>
-                <groupId>com.spotify.fmt</groupId>
+                <groupId>com.coveo</groupId>
                 <artifactId>fmt-maven-plugin</artifactId>
                 <configuration>
                     <sourceDirectory>src/main/java</sourceDirectory>
diff --git a/utils/src/main/java/io/serverlessworkflow/utils/WorkflowUtils.java b/utils/src/main/java/io/serverlessworkflow/utils/WorkflowUtils.java
index 48340a9f..29b8c7cc 100644
--- a/utils/src/main/java/io/serverlessworkflow/utils/WorkflowUtils.java
+++ b/utils/src/main/java/io/serverlessworkflow/utils/WorkflowUtils.java
@@ -117,24 +117,18 @@ public static List<EventDefinition> getDefinedEvents(
         .collect(Collectors.toList());
   }
 
-  /**
-   * @return {@code int} Returns count of defined event count matching eventKind
-   */
+  /** @return {@code int} Returns count of defined event count matching eventKind */
   public static int getDefinedEventsCount(Workflow workflow, EventDefinition.Kind eventKind) {
     List<EventDefinition> definedEvents = getDefinedEvents(workflow, eventKind);
     return definedEvents == null ? 0 : definedEvents.size();
   }
 
-  /**
-   * @return {@code int} Returns count of Defined Consumed Event Count
-   */
+  /** @return {@code int} Returns count of Defined Consumed Event Count */
   public static int getDefinedConsumedEventsCount(Workflow workflow) {
     return getDefinedEventsCount(workflow, EventDefinition.Kind.CONSUMED);
   }
 
-  /**
-   * @return {@code int} Returns count of Defined Produced Event Count
-   */
+  /** @return {@code int} Returns count of Defined Produced Event Count */
   public static int getDefinedProducedEventsCount(Workflow workflow) {
     return getDefinedEventsCount(workflow, EventDefinition.Kind.PRODUCED);
   }
@@ -258,9 +252,7 @@ public static int getWorkflowProducedEventsCount(Workflow workflow) {
     return workflowProducedEvents == null ? 0 : workflowProducedEvents.size();
   }
 
-  /**
-   * @return Returns function definition for actions
-   */
+  /** @return Returns function definition for actions */
   public static FunctionDefinition getFunctionDefinitionsForAction(
       Workflow workflow, String action) {
     if (!hasFunctionDefs(workflow)) return null;
@@ -275,9 +267,7 @@ public static FunctionDefinition getFunctionDefinitionsForAction(
     return functionDefinition.isPresent() ? functionDefinition.get() : null;
   }
 
-  /**
-   * @return : Returns @{code List<Action>} which uses a function defintion
-   */
+  /** @return : Returns @{code List<Action>} which uses a function defintion */
   public static List<Action> getActionsForFunctionDefinition(
       Workflow workflow, String functionDefinitionName) {
     if (!hasFunctionDefs(workflow, functionDefinitionName)) return null;
diff --git a/validation/pom.xml b/validation/pom.xml
index cf8544e6..6b4e808a 100644
--- a/validation/pom.xml
+++ b/validation/pom.xml
@@ -124,7 +124,7 @@
                 </executions>
             </plugin>
             <plugin>
-                <groupId>com.spotify.fmt</groupId>
+                <groupId>com.coveo</groupId>
                 <artifactId>fmt-maven-plugin</artifactId>
                 <configuration>
                     <sourceDirectory>src/main/java</sourceDirectory>

From 271cc0bd4e2d2a7564f5231485e41ddffe231bc1 Mon Sep 17 00:00:00 2001
From: Ricardo Zanini <zanini@redhat.com>
Date: Fri, 20 Oct 2023 11:30:58 -0300
Subject: [PATCH 060/109] Change WorkflowValidatorImpl to match Java 8 API

Signed-off-by: Ricardo Zanini <zanini@redhat.com>
---
 .../validation/WorkflowValidatorImpl.java                  | 7 ++++++-
 1 file changed, 6 insertions(+), 1 deletion(-)

diff --git a/validation/src/main/java/io/serverlessworkflow/validation/WorkflowValidatorImpl.java b/validation/src/main/java/io/serverlessworkflow/validation/WorkflowValidatorImpl.java
index 84dbb432..12e4e915 100644
--- a/validation/src/main/java/io/serverlessworkflow/validation/WorkflowValidatorImpl.java
+++ b/validation/src/main/java/io/serverlessworkflow/validation/WorkflowValidatorImpl.java
@@ -359,7 +359,12 @@ private boolean haveEventsDefinition(String eventName, List<EventDefinition> eve
   }
 
   private static final Set<String> skipMessages =
-      Set.of("$.start: string found, object expected", "$.functions: array found, object expected");
+      new HashSet<String>() {
+        {
+          add("$.start: string found, object expected");
+          add("$.functions: array found, object expected");
+        }
+      };
 
   private void addValidationError(String message, String type) {
     if (skipMessages.contains(message)) {

From dca3b9a0afa5fa0d0428634af415a62c230f72a9 Mon Sep 17 00:00:00 2001
From: Ricardo Zanini <zanini@redhat.com>
Date: Fri, 20 Oct 2023 11:33:31 -0300
Subject: [PATCH 061/109] Prepare for 4.0.5

Signed-off-by: Ricardo Zanini <zanini@redhat.com>
---
 .github/project.yml | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/.github/project.yml b/.github/project.yml
index f4275350..a69b4050 100644
--- a/.github/project.yml
+++ b/.github/project.yml
@@ -1,3 +1,3 @@
 release:
-  current-version: 5.0.0
-  next-version: 6.0.0-SNAPSHOT
\ No newline at end of file
+  current-version: 4.0.5
+  next-version: 5.0.0-SNAPSHOT
\ No newline at end of file

From 985790f27b3b74d708564fc21b7da78f5b09bb0b Mon Sep 17 00:00:00 2001
From: Francisco Javier Tirado Sarti <ftirados@redhat.com>
Date: Wed, 25 Oct 2023 16:34:24 +0200
Subject: [PATCH 062/109] Keep id as mandatory for backward compatibility.

Signed-off-by: Francisco Javier Tirado Sarti <ftirados@redhat.com>
---
 api/src/main/resources/schema/workflow.json | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/api/src/main/resources/schema/workflow.json b/api/src/main/resources/schema/workflow.json
index dd349995..d174cb85 100644
--- a/api/src/main/resources/schema/workflow.json
+++ b/api/src/main/resources/schema/workflow.json
@@ -11,7 +11,8 @@
   "properties": {
     "id": {
       "type": "string",
-      "description": "Workflow unique identifier"
+      "description": "Workflow unique identifier",
+      "minLength": 1
     },
     "key": {
       "type": "string",

From d8cb9b76110c2d4c3f6e009b1479767eb48ae4bb Mon Sep 17 00:00:00 2001
From: Francisco Javier Tirado Sarti <ftirados@redhat.com>
Date: Fri, 27 Oct 2023 17:49:36 +0200
Subject: [PATCH 063/109] Force id to be mandatory

Signed-off-by: Francisco Javier Tirado Sarti <ftirados@redhat.com>
---
 api/src/main/resources/schema/workflow.json                | 1 +
 .../validation/test/WorkflowValidationTest.java            | 7 +++----
 2 files changed, 4 insertions(+), 4 deletions(-)

diff --git a/api/src/main/resources/schema/workflow.json b/api/src/main/resources/schema/workflow.json
index d174cb85..f8309b6c 100644
--- a/api/src/main/resources/schema/workflow.json
+++ b/api/src/main/resources/schema/workflow.json
@@ -160,6 +160,7 @@
     }
   },
  "required": [
+        "id",
         "name",
         "version",
         "states"
diff --git a/validation/src/test/java/io/serverlessworkflow/validation/test/WorkflowValidationTest.java b/validation/src/test/java/io/serverlessworkflow/validation/test/WorkflowValidationTest.java
index e600e253..08237525 100644
--- a/validation/src/test/java/io/serverlessworkflow/validation/test/WorkflowValidationTest.java
+++ b/validation/src/test/java/io/serverlessworkflow/validation/test/WorkflowValidationTest.java
@@ -58,7 +58,7 @@ public void testIncompleteYamlWithSchemaValidation() {
     List<ValidationError> validationErrors =
         workflowValidator.setSource("---\n" + "key: abc\n").validate();
     Assertions.assertNotNull(validationErrors);
-    Assertions.assertEquals(3, validationErrors.size());
+    Assertions.assertEquals(4, validationErrors.size());
   }
 
   @Test
@@ -119,11 +119,10 @@ public void testWorkflowMissingStatesIdAndKey() {
                     + "}")
             .validate();
     Assertions.assertNotNull(validationErrors);
-    Assertions.assertEquals(2, validationErrors.size());
+    Assertions.assertEquals(1, validationErrors.size());
 
     Assertions.assertEquals(
-        "Workflow id or key should not be empty", validationErrors.get(0).getMessage());
-    Assertions.assertEquals("No states found", validationErrors.get(1).getMessage());
+        "$.id: is missing but it is required", validationErrors.get(0).getMessage());
   }
 
   @Test

From 5a3602b88f6791b8ae60da275bc37958a7886c61 Mon Sep 17 00:00:00 2001
From: Ricardo Zanini <zanini@redhat.com>
Date: Wed, 1 Nov 2023 11:09:45 -0300
Subject: [PATCH 064/109] Prepare 4.0.5.1

Signed-off-by: Ricardo Zanini <zanini@redhat.com>
---
 .github/project.yml | 2 +-
 README.md           | 4 +---
 2 files changed, 2 insertions(+), 4 deletions(-)

diff --git a/.github/project.yml b/.github/project.yml
index a69b4050..8e87a574 100644
--- a/.github/project.yml
+++ b/.github/project.yml
@@ -1,3 +1,3 @@
 release:
-  current-version: 4.0.5
+  current-version: 4.0.5.1
   next-version: 5.0.0-SNAPSHOT
\ No newline at end of file
diff --git a/README.md b/README.md
index de0f3fb0..c1b717d1 100644
--- a/README.md
+++ b/README.md
@@ -20,9 +20,7 @@ to parse and validate workflow definitions as well as generate the workflow diag
 
 | Latest Releases | Conformance to spec version |
 | :---: | :---: |
-| [4.0.4.Final](https://github.com/serverlessworkflow/sdk-java/releases/) | [v0.8](https://github.com/serverlessworkflow/specification/tree/0.8.x) |
-| [4.0.3.Final](https://github.com/serverlessworkflow/sdk-java/releases/) | [v0.8](https://github.com/serverlessworkflow/specification/tree/0.8.x) |
-| [4.0.2.Final](https://github.com/serverlessworkflow/sdk-java/releases/) | [v0.8](https://github.com/serverlessworkflow/specification/tree/0.8.x) |
+| [4.0.5.1.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) |

From bc73b7a0054a1e685b30b83bf35e6184d1cfe8d3 Mon Sep 17 00:00:00 2001
From: Ricardo Zanini <zanini@redhat.com>
Date: Wed, 1 Nov 2023 11:51:04 -0300
Subject: [PATCH 065/109] Fix 4.0.x branch to enable release 4.0.5

Signed-off-by: Ricardo Zanini <zanini@redhat.com>
---
 .github/project.yml | 4 ++--
 api/pom.xml         | 2 +-
 diagram/pom.xml     | 2 +-
 pom.xml             | 4 +++-
 spi/pom.xml         | 2 +-
 utils/pom.xml       | 2 +-
 validation/pom.xml  | 2 +-
 7 files changed, 10 insertions(+), 8 deletions(-)

diff --git a/.github/project.yml b/.github/project.yml
index 8e87a574..abeec792 100644
--- a/.github/project.yml
+++ b/.github/project.yml
@@ -1,3 +1,3 @@
 release:
-  current-version: 4.0.5.1
-  next-version: 5.0.0-SNAPSHOT
\ No newline at end of file
+  current-version: 4.0.5
+  next-version: 4.0.6-SNAPSHOT
\ No newline at end of file
diff --git a/api/pom.xml b/api/pom.xml
index 63ba1ef1..d886c805 100644
--- a/api/pom.xml
+++ b/api/pom.xml
@@ -6,7 +6,7 @@
     <parent>
         <groupId>io.serverlessworkflow</groupId>
         <artifactId>serverlessworkflow-parent</artifactId>
-        <version>4.0.x</version>
+        <version>4.0.5-SNAPSHOT</version>
     </parent>
 
     <artifactId>serverlessworkflow-api</artifactId>
diff --git a/diagram/pom.xml b/diagram/pom.xml
index 2668c850..d3c2e1ca 100644
--- a/diagram/pom.xml
+++ b/diagram/pom.xml
@@ -6,7 +6,7 @@
     <parent>
         <groupId>io.serverlessworkflow</groupId>
         <artifactId>serverlessworkflow-parent</artifactId>
-        <version>4.0.x</version>
+        <version>4.0.5-SNAPSHOT</version>
     </parent>
 
     <artifactId>serverlessworkflow-diagram</artifactId>
diff --git a/pom.xml b/pom.xml
index 22486415..b9ec5e50 100644
--- a/pom.xml
+++ b/pom.xml
@@ -6,7 +6,7 @@
 
   <groupId>io.serverlessworkflow</groupId>
   <artifactId>serverlessworkflow-parent</artifactId>
-  <version>4.0.x</version>
+  <version>4.0.5-SNAPSHOT</version>
   <packaging>pom</packaging>
 
   <name>Serverless Workflow :: Parent</name>
@@ -65,6 +65,8 @@
     <version.jar.plugin>3.2.0</version.jar.plugin>
     <version.jdk>${java.version}</version.jdk>
     <version.jsonschema2pojo-maven-plugin>1.0.1</version.jsonschema2pojo-maven-plugin>
+    <version.javadoc.plugin>3.6.0</version.javadoc.plugin>
+    <version.release.plugin>2.3.2</version.release.plugin>
     <version.source.plugin>3.3.0</version.source.plugin>
     <version.surefire.plugin>2.22.0</version.surefire.plugin>
 
diff --git a/spi/pom.xml b/spi/pom.xml
index db4fbf79..41f4ce1d 100644
--- a/spi/pom.xml
+++ b/spi/pom.xml
@@ -6,7 +6,7 @@
     <parent>
         <groupId>io.serverlessworkflow</groupId>
         <artifactId>serverlessworkflow-parent</artifactId>
-        <version>4.0.x</version>
+        <version>4.0.5-SNAPSHOT</version>
     </parent>
 
     <artifactId>serverlessworkflow-spi</artifactId>
diff --git a/utils/pom.xml b/utils/pom.xml
index 3c479281..f88a6fed 100644
--- a/utils/pom.xml
+++ b/utils/pom.xml
@@ -6,7 +6,7 @@
     <parent>
         <groupId>io.serverlessworkflow</groupId>
         <artifactId>serverlessworkflow-parent</artifactId>
-        <version>4.0.x</version>
+        <version>4.0.5-SNAPSHOT</version>
     </parent>
 
     <artifactId>serverlessworkflow-util</artifactId>
diff --git a/validation/pom.xml b/validation/pom.xml
index 6b4e808a..d1c71c79 100644
--- a/validation/pom.xml
+++ b/validation/pom.xml
@@ -6,7 +6,7 @@
     <parent>
         <groupId>io.serverlessworkflow</groupId>
         <artifactId>serverlessworkflow-parent</artifactId>
-        <version>4.0.x</version>
+        <version>4.0.5-SNAPSHOT</version>
     </parent>
 
     <artifactId>serverlessworkflow-validation</artifactId>

From efb5e3575af8b54cfafdfdee32f046523a989d63 Mon Sep 17 00:00:00 2001
From: Ricardo Zanini <zanini@redhat.com>
Date: Wed, 1 Nov 2023 12:17:06 -0300
Subject: [PATCH 066/109] Ignore javadoc errors

Signed-off-by: Ricardo Zanini <zanini@redhat.com>
---
 pom.xml | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/pom.xml b/pom.xml
index b9ec5e50..0bb4b2b6 100644
--- a/pom.xml
+++ b/pom.xml
@@ -422,6 +422,9 @@
           <groupId>org.apache.maven.plugins</groupId>
           <artifactId>maven-javadoc-plugin</artifactId>
           <version>${version.javadoc.plugin}</version>
+          <configuration>
+            <failOnError>false</failOnError>
+          </configuration>
         </plugin>
       </plugins>
     </pluginManagement>

From 8e1f86a07f68d51936a208941fbb545a08950200 Mon Sep 17 00:00:00 2001
From: Ricardo Zanini <zanini@redhat.com>
Date: Wed, 1 Nov 2023 12:21:40 -0300
Subject: [PATCH 067/109] Small change to trigger release

Signed-off-by: Ricardo Zanini <zanini@redhat.com>
---
 .github/project.yml | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/.github/project.yml b/.github/project.yml
index abeec792..46e1e738 100644
--- a/.github/project.yml
+++ b/.github/project.yml
@@ -1,3 +1,3 @@
 release:
   current-version: 4.0.5
-  next-version: 4.0.6-SNAPSHOT
\ No newline at end of file
+  next-version: 4.0.6-SNAPSHOT

From 5443b7b71391f891f12fe5dc129cbeae31af3cef Mon Sep 17 00:00:00 2001
From: Ricardo Zanini <zanini@redhat.com>
Date: Thu, 9 Nov 2023 14:19:47 -0300
Subject: [PATCH 068/109] Fix GHA Maven secret var and trigger release 4.0.5

Signed-off-by: Ricardo Zanini <zanini@redhat.com>
---
 .github/project.yml           | 2 +-
 .github/workflows/release.yml | 2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/.github/project.yml b/.github/project.yml
index 46e1e738..abeec792 100644
--- a/.github/project.yml
+++ b/.github/project.yml
@@ -1,3 +1,3 @@
 release:
   current-version: 4.0.5
-  next-version: 4.0.6-SNAPSHOT
+  next-version: 4.0.6-SNAPSHOT
\ No newline at end of file
diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml
index f2341c8a..f14236a8 100644
--- a/.github/workflows/release.yml
+++ b/.github/workflows/release.yml
@@ -50,7 +50,7 @@ jobs:
           mvn -B release:perform -Darguments=-DperformRelease -DperformRelease -Prelease
         env:
           MAVEN_USERNAME: ${{ secrets.OSSRH_USERNAME }}
-          MAVEN_PASSWORD: ${{ secrets.OSSRH_TOKEN }}
+          MAVEN_PASSWORD: ${{ secrets.OSSRH_PASSWORD }}
 
       - name: Push changes to ${{github.base_ref}} branch
         run: |

From 422c93f27184b6466ec85beeb19bba7725992f2c Mon Sep 17 00:00:00 2001
From: Ricardo Zanini <zanini@redhat.com>
Date: Fri, 10 Nov 2023 14:48:48 -0300
Subject: [PATCH 069/109] Fix release pipeline to checkout before performing
 release

Signed-off-by: Ricardo Zanini <zanini@redhat.com>
---
 .github/workflows/release.yml | 9 +++++----
 pom.xml                       | 5 ++++-
 2 files changed, 9 insertions(+), 5 deletions(-)

diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml
index f14236a8..accd5196 100644
--- a/.github/workflows/release.yml
+++ b/.github/workflows/release.yml
@@ -46,13 +46,14 @@ jobs:
 
       - name: Maven release ${{steps.metadata.outputs.current-version}}
         run: |
+          git checkout -b release
           mvn -B release:prepare -Prelease -DreleaseVersion=${{steps.metadata.outputs.current-version}} -DdevelopmentVersion=${{steps.metadata.outputs.next-version}}
+          git checkout ${{github.base_ref}}
+          git rebase release
           mvn -B release:perform -Darguments=-DperformRelease -DperformRelease -Prelease
         env:
           MAVEN_USERNAME: ${{ secrets.OSSRH_USERNAME }}
           MAVEN_PASSWORD: ${{ secrets.OSSRH_PASSWORD }}
 
-      - name: Push changes to ${{github.base_ref}} branch
-        run: |
-          git push
-          git push origin ${{steps.metadata.outputs.current-version}}
+      - name: Push tags
+        run: git push && git push --tags
diff --git a/pom.xml b/pom.xml
index 0bb4b2b6..40208f3e 100644
--- a/pom.xml
+++ b/pom.xml
@@ -66,7 +66,7 @@
     <version.jdk>${java.version}</version.jdk>
     <version.jsonschema2pojo-maven-plugin>1.0.1</version.jsonschema2pojo-maven-plugin>
     <version.javadoc.plugin>3.6.0</version.javadoc.plugin>
-    <version.release.plugin>2.3.2</version.release.plugin>
+    <version.release.plugin>2.5.3</version.release.plugin>
     <version.source.plugin>3.3.0</version.source.plugin>
     <version.surefire.plugin>2.22.0</version.surefire.plugin>
 
@@ -277,6 +277,9 @@
           <groupId>org.apache.maven.plugins</groupId>
           <artifactId>maven-gpg-plugin</artifactId>
           <version>${version.gpg.plugin}</version>
+          <configuration>
+            <skip>true</skip>
+          </configuration>
         </plugin>
         <plugin>
           <artifactId>maven-deploy-plugin</artifactId>

From 3c7bf1765ec6b3fc6ed4426004abc4369c9ed0f5 Mon Sep 17 00:00:00 2001
From: Ricardo Zanini <zanini@redhat.com>
Date: Fri, 10 Nov 2023 15:00:02 -0300
Subject: [PATCH 070/109] Debug release properties and remove skip gpg sign

Signed-off-by: Ricardo Zanini <zanini@redhat.com>
---
 .github/workflows/release.yml | 1 +
 pom.xml                       | 3 ---
 2 files changed, 1 insertion(+), 3 deletions(-)

diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml
index accd5196..3a188b77 100644
--- a/.github/workflows/release.yml
+++ b/.github/workflows/release.yml
@@ -48,6 +48,7 @@ jobs:
         run: |
           git checkout -b release
           mvn -B release:prepare -Prelease -DreleaseVersion=${{steps.metadata.outputs.current-version}} -DdevelopmentVersion=${{steps.metadata.outputs.next-version}}
+          cat release.properties
           git checkout ${{github.base_ref}}
           git rebase release
           mvn -B release:perform -Darguments=-DperformRelease -DperformRelease -Prelease
diff --git a/pom.xml b/pom.xml
index 40208f3e..eb1afa9f 100644
--- a/pom.xml
+++ b/pom.xml
@@ -277,9 +277,6 @@
           <groupId>org.apache.maven.plugins</groupId>
           <artifactId>maven-gpg-plugin</artifactId>
           <version>${version.gpg.plugin}</version>
-          <configuration>
-            <skip>true</skip>
-          </configuration>
         </plugin>
         <plugin>
           <artifactId>maven-deploy-plugin</artifactId>

From 566f1577758796eecc6ecac097db59083605340f Mon Sep 17 00:00:00 2001
From: Ricardo Zanini <zanini@redhat.com>
Date: Fri, 10 Nov 2023 15:26:10 -0300
Subject: [PATCH 071/109] Upgrade maven release and update distribution server
 id

Signed-off-by: Ricardo Zanini <zanini@redhat.com>
---
 pom.xml | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/pom.xml b/pom.xml
index eb1afa9f..65ecc39e 100644
--- a/pom.xml
+++ b/pom.xml
@@ -66,7 +66,7 @@
     <version.jdk>${java.version}</version.jdk>
     <version.jsonschema2pojo-maven-plugin>1.0.1</version.jsonschema2pojo-maven-plugin>
     <version.javadoc.plugin>3.6.0</version.javadoc.plugin>
-    <version.release.plugin>2.5.3</version.release.plugin>
+    <version.release.plugin>3.0.1</version.release.plugin>
     <version.source.plugin>3.3.0</version.source.plugin>
     <version.surefire.plugin>2.22.0</version.surefire.plugin>
 
@@ -433,7 +433,7 @@
 
   <distributionManagement>
     <snapshotRepository>
-      <id>ossrh</id>
+      <id>ossrh-snapshots</id>
       <url>https://oss.sonatype.org/content/repositories/snapshots</url>
     </snapshotRepository>
     <repository>

From b24b0f01e36c0a7a237e1a2369712f68493d9916 Mon Sep 17 00:00:00 2001
From: Ricardo Zanini <zanini@redhat.com>
Date: Fri, 10 Nov 2023 15:54:13 -0300
Subject: [PATCH 072/109] Relase 4.0.5.Final

Signed-off-by: Ricardo Zanini <zanini@redhat.com>
---
 .github/project.yml | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/.github/project.yml b/.github/project.yml
index abeec792..c6a326f1 100644
--- a/.github/project.yml
+++ b/.github/project.yml
@@ -1,3 +1,3 @@
 release:
-  current-version: 4.0.5
+  current-version: 4.0.5.Final
   next-version: 4.0.6-SNAPSHOT
\ No newline at end of file

From 0a9d3f88d686d6b720b1de91e939706aa8b37889 Mon Sep 17 00:00:00 2001
From: GitHub Action <action@github.com>
Date: Fri, 10 Nov 2023 19:14:48 +0000
Subject: [PATCH 073/109] [maven-release-plugin] prepare release 4.0.5.Final

---
 api/pom.xml        | 14 ++++++--------
 diagram/pom.xml    | 14 ++++++--------
 pom.xml            |  8 +++-----
 spi/pom.xml        | 14 ++++++--------
 utils/pom.xml      | 14 ++++++--------
 validation/pom.xml | 14 ++++++--------
 6 files changed, 33 insertions(+), 45 deletions(-)

diff --git a/api/pom.xml b/api/pom.xml
index d886c805..7364be58 100644
--- a/api/pom.xml
+++ b/api/pom.xml
@@ -1,12 +1,10 @@
-<project xmlns="http://maven.apache.org/POM/4.0.0"
-         xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
-         xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
+<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
     <modelVersion>4.0.0</modelVersion>
 
     <parent>
         <groupId>io.serverlessworkflow</groupId>
         <artifactId>serverlessworkflow-parent</artifactId>
-        <version>4.0.5-SNAPSHOT</version>
+        <version>4.0.5.Final</version>
     </parent>
 
     <artifactId>serverlessworkflow-api</artifactId>
@@ -109,13 +107,13 @@
                     <checkstyleRules>
                         <module name="Checker">
                             <module name="RegexpHeader">
-                                <property name="header" value="${checkstyle.header.template}"/>
-                                <property name="fileExtensions" value="${checkstyle.header.extensions}"/>
+                                <property name="header" value="${checkstyle.header.template}" />
+                                <property name="fileExtensions" value="${checkstyle.header.extensions}" />
                             </module>
                             <module name="TreeWalker">
                                 <module name="RegexpSinglelineJava">
-                                    <property name="format" value="@author"/>
-                                    <property name="message" value="No @author tag allowed"/>
+                                    <property name="format" value="@author" />
+                                    <property name="message" value="No @author tag allowed" />
                                 </module>
                             </module>
                         </module>
diff --git a/diagram/pom.xml b/diagram/pom.xml
index d3c2e1ca..e89a7de5 100644
--- a/diagram/pom.xml
+++ b/diagram/pom.xml
@@ -1,12 +1,10 @@
-<project xmlns="http://maven.apache.org/POM/4.0.0"
-         xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
-         xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
+<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
     <modelVersion>4.0.0</modelVersion>
 
     <parent>
         <groupId>io.serverlessworkflow</groupId>
         <artifactId>serverlessworkflow-parent</artifactId>
-        <version>4.0.5-SNAPSHOT</version>
+        <version>4.0.5.Final</version>
     </parent>
 
     <artifactId>serverlessworkflow-diagram</artifactId>
@@ -96,13 +94,13 @@
                     <checkstyleRules>
                         <module name="Checker">
                             <module name="RegexpHeader">
-                                <property name="header" value="${checkstyle.header.template}"/>
-                                <property name="fileExtensions" value="${checkstyle.header.extensions}"/>
+                                <property name="header" value="${checkstyle.header.template}" />
+                                <property name="fileExtensions" value="${checkstyle.header.extensions}" />
                             </module>
                             <module name="TreeWalker">
                                 <module name="RegexpSinglelineJava">
-                                    <property name="format" value="@author"/>
-                                    <property name="message" value="No @author tag allowed"/>
+                                    <property name="format" value="@author" />
+                                    <property name="message" value="No @author tag allowed" />
                                 </module>
                             </module>
                         </module>
diff --git a/pom.xml b/pom.xml
index 65ecc39e..4a574f0c 100644
--- a/pom.xml
+++ b/pom.xml
@@ -1,12 +1,10 @@
 <?xml version="1.0" encoding="UTF-8"?>
-<project xmlns="http://maven.apache.org/POM/4.0.0"
-  xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
-  xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
+<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
   <modelVersion>4.0.0</modelVersion>
 
   <groupId>io.serverlessworkflow</groupId>
   <artifactId>serverlessworkflow-parent</artifactId>
-  <version>4.0.5-SNAPSHOT</version>
+  <version>4.0.5.Final</version>
   <packaging>pom</packaging>
 
   <name>Serverless Workflow :: Parent</name>
@@ -35,7 +33,7 @@
     <connection>scm:git:git@github.com:serverlessworkflow/sdk-java.git</connection>
     <developerConnection>scm:git:git@github.com:serverlessworkflow/sdk-java.git</developerConnection>
     <url>https://github.com/serverlessworkflow/sdk-java</url>
-    <tag>HEAD</tag>
+    <tag>4.0.5.Final</tag>
   </scm>
 
   <modules>
diff --git a/spi/pom.xml b/spi/pom.xml
index 41f4ce1d..5427df00 100644
--- a/spi/pom.xml
+++ b/spi/pom.xml
@@ -1,12 +1,10 @@
-<project xmlns="http://maven.apache.org/POM/4.0.0"
-         xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
-         xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
+<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
     <modelVersion>4.0.0</modelVersion>
 
     <parent>
         <groupId>io.serverlessworkflow</groupId>
         <artifactId>serverlessworkflow-parent</artifactId>
-        <version>4.0.5-SNAPSHOT</version>
+        <version>4.0.5.Final</version>
     </parent>
 
     <artifactId>serverlessworkflow-spi</artifactId>
@@ -68,13 +66,13 @@
                     <checkstyleRules>
                         <module name="Checker">
                             <module name="RegexpHeader">
-                                <property name="header" value="${checkstyle.header.template}"/>
-                                <property name="fileExtensions" value="${checkstyle.header.extensions}"/>
+                                <property name="header" value="${checkstyle.header.template}" />
+                                <property name="fileExtensions" value="${checkstyle.header.extensions}" />
                             </module>
                             <module name="TreeWalker">
                                 <module name="RegexpSinglelineJava">
-                                    <property name="format" value="@author"/>
-                                    <property name="message" value="No @author tag allowed"/>
+                                    <property name="format" value="@author" />
+                                    <property name="message" value="No @author tag allowed" />
                                 </module>
                             </module>
                         </module>
diff --git a/utils/pom.xml b/utils/pom.xml
index f88a6fed..4cf5a20f 100644
--- a/utils/pom.xml
+++ b/utils/pom.xml
@@ -1,12 +1,10 @@
-<project xmlns="http://maven.apache.org/POM/4.0.0"
-         xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
-         xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
+<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
     <modelVersion>4.0.0</modelVersion>
 
     <parent>
         <groupId>io.serverlessworkflow</groupId>
         <artifactId>serverlessworkflow-parent</artifactId>
-        <version>4.0.5-SNAPSHOT</version>
+        <version>4.0.5.Final</version>
     </parent>
 
     <artifactId>serverlessworkflow-util</artifactId>
@@ -68,13 +66,13 @@
                     <checkstyleRules>
                         <module name="Checker">
                             <module name="RegexpHeader">
-                                <property name="header" value="${checkstyle.header.template}"/>
-                                <property name="fileExtensions" value="${checkstyle.header.extensions}"/>
+                                <property name="header" value="${checkstyle.header.template}" />
+                                <property name="fileExtensions" value="${checkstyle.header.extensions}" />
                             </module>
                             <module name="TreeWalker">
                                 <module name="RegexpSinglelineJava">
-                                    <property name="format" value="@author"/>
-                                    <property name="message" value="No @author tag allowed"/>
+                                    <property name="format" value="@author" />
+                                    <property name="message" value="No @author tag allowed" />
                                 </module>
                             </module>
                         </module>
diff --git a/validation/pom.xml b/validation/pom.xml
index d1c71c79..193aaf67 100644
--- a/validation/pom.xml
+++ b/validation/pom.xml
@@ -1,12 +1,10 @@
-<project xmlns="http://maven.apache.org/POM/4.0.0"
-         xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
-         xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
+<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
     <modelVersion>4.0.0</modelVersion>
 
     <parent>
         <groupId>io.serverlessworkflow</groupId>
         <artifactId>serverlessworkflow-parent</artifactId>
-        <version>4.0.5-SNAPSHOT</version>
+        <version>4.0.5.Final</version>
     </parent>
 
     <artifactId>serverlessworkflow-validation</artifactId>
@@ -90,13 +88,13 @@
                     <checkstyleRules>
                         <module name="Checker">
                             <module name="RegexpHeader">
-                                <property name="header" value="${checkstyle.header.template}"/>
-                                <property name="fileExtensions" value="${checkstyle.header.extensions}"/>
+                                <property name="header" value="${checkstyle.header.template}" />
+                                <property name="fileExtensions" value="${checkstyle.header.extensions}" />
                             </module>
                             <module name="TreeWalker">
                                 <module name="RegexpSinglelineJava">
-                                    <property name="format" value="@author"/>
-                                    <property name="message" value="No @author tag allowed"/>
+                                    <property name="format" value="@author" />
+                                    <property name="message" value="No @author tag allowed" />
                                 </module>
                             </module>
                         </module>

From 60114f3f14019f3b4d4c26aa6d5b7f14468c768e Mon Sep 17 00:00:00 2001
From: GitHub Action <action@github.com>
Date: Fri, 10 Nov 2023 19:14:48 +0000
Subject: [PATCH 074/109] [maven-release-plugin] prepare for next development
 iteration

---
 api/pom.xml        | 2 +-
 diagram/pom.xml    | 2 +-
 pom.xml            | 4 ++--
 spi/pom.xml        | 2 +-
 utils/pom.xml      | 2 +-
 validation/pom.xml | 2 +-
 6 files changed, 7 insertions(+), 7 deletions(-)

diff --git a/api/pom.xml b/api/pom.xml
index 7364be58..dc01dfeb 100644
--- a/api/pom.xml
+++ b/api/pom.xml
@@ -4,7 +4,7 @@
     <parent>
         <groupId>io.serverlessworkflow</groupId>
         <artifactId>serverlessworkflow-parent</artifactId>
-        <version>4.0.5.Final</version>
+        <version>4.0.6-SNAPSHOT</version>
     </parent>
 
     <artifactId>serverlessworkflow-api</artifactId>
diff --git a/diagram/pom.xml b/diagram/pom.xml
index e89a7de5..dbbbf0d3 100644
--- a/diagram/pom.xml
+++ b/diagram/pom.xml
@@ -4,7 +4,7 @@
     <parent>
         <groupId>io.serverlessworkflow</groupId>
         <artifactId>serverlessworkflow-parent</artifactId>
-        <version>4.0.5.Final</version>
+        <version>4.0.6-SNAPSHOT</version>
     </parent>
 
     <artifactId>serverlessworkflow-diagram</artifactId>
diff --git a/pom.xml b/pom.xml
index 4a574f0c..e4d125b4 100644
--- a/pom.xml
+++ b/pom.xml
@@ -4,7 +4,7 @@
 
   <groupId>io.serverlessworkflow</groupId>
   <artifactId>serverlessworkflow-parent</artifactId>
-  <version>4.0.5.Final</version>
+  <version>4.0.6-SNAPSHOT</version>
   <packaging>pom</packaging>
 
   <name>Serverless Workflow :: Parent</name>
@@ -33,7 +33,7 @@
     <connection>scm:git:git@github.com:serverlessworkflow/sdk-java.git</connection>
     <developerConnection>scm:git:git@github.com:serverlessworkflow/sdk-java.git</developerConnection>
     <url>https://github.com/serverlessworkflow/sdk-java</url>
-    <tag>4.0.5.Final</tag>
+    <tag>HEAD</tag>
   </scm>
 
   <modules>
diff --git a/spi/pom.xml b/spi/pom.xml
index 5427df00..6121958e 100644
--- a/spi/pom.xml
+++ b/spi/pom.xml
@@ -4,7 +4,7 @@
     <parent>
         <groupId>io.serverlessworkflow</groupId>
         <artifactId>serverlessworkflow-parent</artifactId>
-        <version>4.0.5.Final</version>
+        <version>4.0.6-SNAPSHOT</version>
     </parent>
 
     <artifactId>serverlessworkflow-spi</artifactId>
diff --git a/utils/pom.xml b/utils/pom.xml
index 4cf5a20f..d0b6d73f 100644
--- a/utils/pom.xml
+++ b/utils/pom.xml
@@ -4,7 +4,7 @@
     <parent>
         <groupId>io.serverlessworkflow</groupId>
         <artifactId>serverlessworkflow-parent</artifactId>
-        <version>4.0.5.Final</version>
+        <version>4.0.6-SNAPSHOT</version>
     </parent>
 
     <artifactId>serverlessworkflow-util</artifactId>
diff --git a/validation/pom.xml b/validation/pom.xml
index 193aaf67..9ad9ea2b 100644
--- a/validation/pom.xml
+++ b/validation/pom.xml
@@ -4,7 +4,7 @@
     <parent>
         <groupId>io.serverlessworkflow</groupId>
         <artifactId>serverlessworkflow-parent</artifactId>
-        <version>4.0.5.Final</version>
+        <version>4.0.6-SNAPSHOT</version>
     </parent>
 
     <artifactId>serverlessworkflow-validation</artifactId>

From 33b21c5044b2658d4f8500e6e6330e9e2337ab6e Mon Sep 17 00:00:00 2001
From: fjtirado <ftirados@redhat.com>
Date: Fri, 25 Apr 2025 17:18:49 +0200
Subject: [PATCH 075/109] [Fix #558] ProduceEvent.data shoud be an object, not
 only a string

Signed-off-by: fjtirado <ftirados@redhat.com>
---
 api/src/main/resources/schema/produce/produceevent.json | 5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)

diff --git a/api/src/main/resources/schema/produce/produceevent.json b/api/src/main/resources/schema/produce/produceevent.json
index f094824e..fd3ecdb4 100644
--- a/api/src/main/resources/schema/produce/produceevent.json
+++ b/api/src/main/resources/schema/produce/produceevent.json
@@ -8,8 +8,9 @@
       "minLength": 1
     },
     "data": {
-      "type": "string",
-      "description": "Workflow expression which selects parts of the states data output to become the data of the produced event"
+      "type": "object",
+      "description": "Workflow expression which selects parts of the states data output to become the data of the produced event",
+      "existingJavaType": "com.fasterxml.jackson.databind.JsonNode"
     },
     "contextAttributes": {
       "type": "object",

From c60e746543d488231c08705e43f5267548da9d4f Mon Sep 17 00:00:00 2001
From: Francisco Javier Tirado Sarti
 <65240126+fjtirado@users.noreply.github.com>
Date: Fri, 25 Apr 2025 21:49:30 +0200
Subject: [PATCH 076/109] [Fix #558] Update event ref (#561)

Signed-off-by: fjtirado <ftirados@redhat.com>
---
 api/src/main/resources/schema/events/eventref.json | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/api/src/main/resources/schema/events/eventref.json b/api/src/main/resources/schema/events/eventref.json
index 76334993..c0e04a7a 100644
--- a/api/src/main/resources/schema/events/eventref.json
+++ b/api/src/main/resources/schema/events/eventref.json
@@ -16,7 +16,8 @@
       "description": "Maximum amount of time (ISO 8601 format) to wait for the result event. If not defined it should default to the actionExecutionTimeout"
     },
     "data": {
-      "type": "string",
+      "type": "object",
+      "existingJavaType": "com.fasterxml.jackson.databind.JsonNode",
       "description": "Expression which selects parts of the states data output to become the data of the produced event."
     },
     "contextAttributes": {

From bbb75b98789f7606a03cc50e16ccbcfd70545574 Mon Sep 17 00:00:00 2001
From: Ricardo Zanini <ricardozanini@gmail.com>
Date: Mon, 28 Apr 2025 12:57:42 -0400
Subject: [PATCH 077/109] [4.x] Upgrade Java libraries, fix maven plugins,
 remove deprecated code, fix release CI

Signed-off-by: Ricardo Zanini <ricardozanini@gmail.com>
---
 .github/workflows/maven-verify.yml            |  8 +-
 .github/workflows/pre-release.yml             |  2 +-
 .github/workflows/release.yml                 | 10 +--
 api/pom.xml                                   | 20 -----
 diagram/pom.xml                               | 20 -----
 pom.xml                                       | 76 +++++++++++++------
 spi/pom.xml                                   | 20 -----
 utils/pom.xml                                 | 20 -----
 .../utils/WorkflowUtils.java                  |  8 +-
 validation/pom.xml                            | 20 -----
 .../test/WorkflowValidationTest.java          |  2 +-
 11 files changed, 66 insertions(+), 140 deletions(-)

diff --git a/.github/workflows/maven-verify.yml b/.github/workflows/maven-verify.yml
index 44aba632..e5689513 100644
--- a/.github/workflows/maven-verify.yml
+++ b/.github/workflows/maven-verify.yml
@@ -6,18 +6,18 @@ name: sdk-java Verify
 on:
   push:
     branches:
-      - 4.0.*
+      - 4.*
   pull_request:
     branches:
-      - 4.0.*
+      - 4.*
 jobs:
   build:
     runs-on: ubuntu-latest
     steps:
-      - uses: actions/checkout@v2
+      - uses: actions/checkout@v4
 
       - name: Set up JDK 1.8
-        uses: actions/setup-java@v3
+        uses: actions/setup-java@v4
         with:
           distribution: temurin
           java-version: 8
diff --git a/.github/workflows/pre-release.yml b/.github/workflows/pre-release.yml
index ce904c75..44f54117 100644
--- a/.github/workflows/pre-release.yml
+++ b/.github/workflows/pre-release.yml
@@ -11,7 +11,7 @@ jobs:
     name: pre release
 
     steps:
-      - uses: radcortez/project-metadata-action@master
+      - uses: radcortez/project-metadata-action@main
         name: retrieve project metadata
         id: metadata
         with:
diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml
index 3a188b77..07361f95 100644
--- a/.github/workflows/release.yml
+++ b/.github/workflows/release.yml
@@ -10,7 +10,7 @@ jobs:
   release:
     runs-on: ubuntu-latest
     name: release
-    if: ${{github.event.pull_request.merged == true}}
+    if: ${{ github.event.pull_request.merged == true }}
 
     steps:
       - uses: radcortez/project-metadata-action@main
@@ -20,7 +20,7 @@ jobs:
           github-token: ${{secrets.GITHUB_TOKEN}}
           metadata-file-path: '.github/project.yml'
 
-      - uses: actions/checkout@v3
+      - uses: actions/checkout@v4
 
       - name: Import GPG key
         id: import_gpg
@@ -30,7 +30,7 @@ jobs:
           passphrase: ${{ secrets.GPG_PASSPHRASE }}
 
       - name: Set up JDK 1.8
-        uses: actions/setup-java@v3
+        uses: actions/setup-java@v4
         with:
           distribution: temurin
           java-version: 8
@@ -51,10 +51,10 @@ jobs:
           cat release.properties
           git checkout ${{github.base_ref}}
           git rebase release
-          mvn -B release:perform -Darguments=-DperformRelease -DperformRelease -Prelease
+          mvn -B release:perform -Prelease -Darguments="-DperformRelease"
         env:
           MAVEN_USERNAME: ${{ secrets.OSSRH_USERNAME }}
           MAVEN_PASSWORD: ${{ secrets.OSSRH_PASSWORD }}
 
       - name: Push tags
-        run: git push && git push --tags
+        run: git push && git push --tags
\ No newline at end of file
diff --git a/api/pom.xml b/api/pom.xml
index dc01dfeb..1aef17b9 100644
--- a/api/pom.xml
+++ b/api/pom.xml
@@ -140,26 +140,6 @@
                     </execution>
                 </executions>
             </plugin>
-            <plugin>
-                <groupId>com.coveo</groupId>
-                <artifactId>fmt-maven-plugin</artifactId>
-                <configuration>
-                    <sourceDirectory>src/main/java</sourceDirectory>
-                    <testSourceDirectory>src/test/java</testSourceDirectory>
-                    <verbose>false</verbose>
-                    <filesNamePattern>.*\.java</filesNamePattern>
-                    <skip>false</skip>
-                    <skipSortingImports>false</skipSortingImports>
-                    <style>google</style>
-                </configuration>
-                <executions>
-                    <execution>
-                        <goals>
-                            <goal>format</goal>
-                        </goals>
-                    </execution>
-                </executions>
-            </plugin>
             <plugin>
                 <groupId>org.apache.maven.plugins</groupId>
                 <artifactId>maven-jar-plugin</artifactId>
diff --git a/diagram/pom.xml b/diagram/pom.xml
index dbbbf0d3..89899ea5 100644
--- a/diagram/pom.xml
+++ b/diagram/pom.xml
@@ -127,26 +127,6 @@
                     </execution>
                 </executions>
             </plugin>
-            <plugin>
-                <groupId>com.coveo</groupId>
-                <artifactId>fmt-maven-plugin</artifactId>
-                <configuration>
-                    <sourceDirectory>src/main/java</sourceDirectory>
-                    <testSourceDirectory>src/test/java</testSourceDirectory>
-                    <verbose>false</verbose>
-                    <filesNamePattern>.*\.java</filesNamePattern>
-                    <skip>false</skip>
-                    <skipSortingImports>false</skipSortingImports>
-                    <style>google</style>
-                </configuration>
-                <executions>
-                    <execution>
-                        <goals>
-                            <goal>format</goal>
-                        </goals>
-                    </execution>
-                </executions>
-            </plugin>
         </plugins>
     </build>
 </project>
\ No newline at end of file
diff --git a/pom.xml b/pom.xml
index e4d125b4..7bf34a27 100644
--- a/pom.xml
+++ b/pom.xml
@@ -48,42 +48,42 @@
     <java.version>1.8</java.version>
     <maven.compiler.source>${java.version}</maven.compiler.source>
     <maven.compiler.target>${java.version}</maven.compiler.target>
+    <maven.compiler.release>8</maven.compiler.release>
     <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
-    <version.maven>3.6.2</version.maven>
+    <version.maven>3.9.7</version.maven>
 
     <!-- Plugin versions, please keep in alphabetical order -->
-    <version.buildnumber.plugin>3.2.0</version.buildnumber.plugin>
-    <version.checkstyle.plugin>3.1.1</version.checkstyle.plugin>
-    <version.compiler.plugin>3.8.1</version.compiler.plugin>
-    <version.deploy.plugin>2.8.2</version.deploy.plugin>
-    <version.enforcer.plugin>3.0.0-M2</version.enforcer.plugin>
-    <version.failsafe.plugin>3.1.2</version.failsafe.plugin>
-    <version.fmt-maven-plugin>2.9.1</version.fmt-maven-plugin>
-    <version.gpg.plugin>3.1.0</version.gpg.plugin>
-    <version.jar.plugin>3.2.0</version.jar.plugin>
+    <version.buildnumber.plugin>3.2.1</version.buildnumber.plugin>
+    <version.checkstyle.plugin>3.6.0</version.checkstyle.plugin>
+    <version.compiler.plugin>3.14.0</version.compiler.plugin>
+    <version.deploy.plugin>3.1.4</version.deploy.plugin>
+    <version.enforcer.plugin>3.5.0</version.enforcer.plugin>
+    <version.failsafe.plugin>3.5.3</version.failsafe.plugin>
+    <version.fmt-maven-plugin>2.25</version.fmt-maven-plugin>
+    <version.gpg.plugin>3.2.7</version.gpg.plugin>
+    <version.jar.plugin>3.4.2</version.jar.plugin>
     <version.jdk>${java.version}</version.jdk>
-    <version.jsonschema2pojo-maven-plugin>1.0.1</version.jsonschema2pojo-maven-plugin>
-    <version.javadoc.plugin>3.6.0</version.javadoc.plugin>
-    <version.release.plugin>3.0.1</version.release.plugin>
-    <version.source.plugin>3.3.0</version.source.plugin>
-    <version.surefire.plugin>2.22.0</version.surefire.plugin>
+    <version.jsonschema2pojo-maven-plugin>1.2.2</version.jsonschema2pojo-maven-plugin>
+    <version.javadoc.plugin>3.11.2</version.javadoc.plugin>
+    <version.release.plugin>3.1.1</version.release.plugin>
+    <version.source.plugin>3.3.1</version.source.plugin>
+    <version.surefire.plugin>3.5.3</version.surefire.plugin>
+    <version.nexus.plugin>1.7.0</version.nexus.plugin>
 
 
     <!-- Dependencies versions, please keep in alphabetical order -->
-    <version.ch.qos.logback>1.4.9</version.ch.qos.logback>
-    <version.com.fasterxml.jackson>2.15.3</version.com.fasterxml.jackson>
-    <version.com.networknt>1.0.87</version.com.networknt>
+    <version.ch.qos.logback>1.5.18</version.ch.qos.logback>
+    <version.com.fasterxml.jackson>2.18.3</version.com.fasterxml.jackson>
+    <version.com.networknt>1.5.6</version.com.networknt>
     <version.commons.lang>3.13.0</version.commons.lang>
     <version.graphviz>0.17.0</version.graphviz>
     <version.hamcrest>1.3</version.hamcrest>
     <version.javax.validation>2.0.1.Final</version.javax.validation>
     <version.jsonassert>1.5.0</version.jsonassert>
     <version.org.assertj>3.13.2</version.org.assertj>
-    <version.org.junit.jupiter>${version.org.junit}</version.org.junit.jupiter>
-    <version.org.junit.minor>6.0</version.org.junit.minor>
-    <version.org.junit>5.${version.org.junit.minor}</version.org.junit>
-    <version.org.mockito>5.6.0</version.org.mockito>
-    <version.org.slf4j>1.7.25</version.org.slf4j>
+    <version.org.junit.jupiter>5.12.2</version.org.junit.jupiter>
+    <version.org.mockito>5.17.0</version.org.mockito>
+    <version.org.slf4j>2.0.17</version.org.slf4j>
     <version.plantuml>8059</version.plantuml>
     <version.thymeleaf>3.1.2.RELEASE</version.thymeleaf>
 
@@ -271,6 +271,17 @@
 
     <pluginManagement>
       <plugins>
+        <plugin>
+          <groupId>org.sonatype.plugins</groupId>
+          <artifactId>nexus-staging-maven-plugin</artifactId>
+          <version>${version.nexus.plugin}</version>
+          <extensions>true</extensions>
+          <configuration>
+            <serverId>ossrh</serverId>
+            <nexusUrl>https://oss.sonatype.org/</nexusUrl>
+            <autoReleaseAfterClose>true</autoReleaseAfterClose>
+          </configuration>
+        </plugin>
         <plugin>
           <groupId>org.apache.maven.plugins</groupId>
           <artifactId>maven-gpg-plugin</artifactId>
@@ -383,9 +394,24 @@
           <version>${version.checkstyle.plugin}</version>
         </plugin>
         <plugin>
-          <groupId>com.coveo</groupId>
+          <groupId>com.spotify.fmt</groupId>
           <artifactId>fmt-maven-plugin</artifactId>
-          <version>${version.fmt-maven-plugin}</version>
+          <configuration>
+            <sourceDirectory>src/main/java</sourceDirectory>
+            <testSourceDirectory>src/test/java</testSourceDirectory>
+            <verbose>false</verbose>
+            <filesNamePattern>.*\.java</filesNamePattern>
+            <skip>false</skip>
+            <skipSortingImports>false</skipSortingImports>
+            <style>google</style>
+          </configuration>
+          <executions>
+            <execution>
+              <goals>
+                <goal>format</goal>
+              </goals>
+            </execution>
+          </executions>
         </plugin>
         <plugin>
           <groupId>org.apache.maven.plugins</groupId>
diff --git a/spi/pom.xml b/spi/pom.xml
index 6121958e..bafb917b 100644
--- a/spi/pom.xml
+++ b/spi/pom.xml
@@ -99,26 +99,6 @@
                     </execution>
                 </executions>
             </plugin>
-            <plugin>
-                <groupId>com.coveo</groupId>
-                <artifactId>fmt-maven-plugin</artifactId>
-                <configuration>
-                    <sourceDirectory>src/main/java</sourceDirectory>
-                    <testSourceDirectory>src/test/java</testSourceDirectory>
-                    <verbose>false</verbose>
-                    <filesNamePattern>.*\.java</filesNamePattern>
-                    <skip>false</skip>
-                    <skipSortingImports>false</skipSortingImports>
-                    <style>google</style>
-                </configuration>
-                <executions>
-                    <execution>
-                        <goals>
-                            <goal>format</goal>
-                        </goals>
-                    </execution>
-                </executions>
-            </plugin>
         </plugins>
     </build>
 </project>
\ No newline at end of file
diff --git a/utils/pom.xml b/utils/pom.xml
index d0b6d73f..4d758cf7 100644
--- a/utils/pom.xml
+++ b/utils/pom.xml
@@ -99,26 +99,6 @@
                     </execution>
                 </executions>
             </plugin>
-            <plugin>
-                <groupId>com.coveo</groupId>
-                <artifactId>fmt-maven-plugin</artifactId>
-                <configuration>
-                    <sourceDirectory>src/main/java</sourceDirectory>
-                    <testSourceDirectory>src/test/java</testSourceDirectory>
-                    <verbose>false</verbose>
-                    <filesNamePattern>.*\.java</filesNamePattern>
-                    <skip>false</skip>
-                    <skipSortingImports>false</skipSortingImports>
-                    <style>google</style>
-                </configuration>
-                <executions>
-                    <execution>
-                        <goals>
-                            <goal>format</goal>
-                        </goals>
-                    </execution>
-                </executions>
-            </plugin>
         </plugins>
     </build>
 </project>
\ No newline at end of file
diff --git a/utils/src/main/java/io/serverlessworkflow/utils/WorkflowUtils.java b/utils/src/main/java/io/serverlessworkflow/utils/WorkflowUtils.java
index 29b8c7cc..a5673b40 100644
--- a/utils/src/main/java/io/serverlessworkflow/utils/WorkflowUtils.java
+++ b/utils/src/main/java/io/serverlessworkflow/utils/WorkflowUtils.java
@@ -574,7 +574,7 @@ public static JsonNode mergeNodes(JsonNode mainNode, JsonNode updateNode) {
         if (mainNode instanceof ObjectNode) {
           // Overwrite field
           JsonNode value = updateNode.get(fieldName);
-          ((ObjectNode) mainNode).put(fieldName, value);
+          ((ObjectNode) mainNode).set(fieldName, value);
         }
       }
     }
@@ -591,7 +591,7 @@ public static JsonNode mergeNodes(JsonNode mainNode, JsonNode updateNode) {
    * @return original, main node with field added
    */
   public static JsonNode addNode(JsonNode mainNode, JsonNode toAddNode, String fieldName) {
-    ((ObjectNode) mainNode).put(fieldName, toAddNode);
+    ((ObjectNode) mainNode).set(fieldName, toAddNode);
     return mainNode;
   }
 
@@ -604,7 +604,7 @@ public static JsonNode addNode(JsonNode mainNode, JsonNode toAddNode, String fie
    * @return original, main node with array added
    */
   public static JsonNode addArray(JsonNode mainNode, ArrayNode toAddArray, String arrayName) {
-    ((ObjectNode) mainNode).put(arrayName, toAddArray);
+    ((ObjectNode) mainNode).set(arrayName, toAddArray);
     return mainNode;
   }
 
@@ -618,7 +618,7 @@ public static JsonNode addArray(JsonNode mainNode, ArrayNode toAddArray, String
    */
   public static JsonNode addFieldValue(JsonNode mainNode, Object toAddValue, String fieldName) {
     ObjectMapper mapper = new ObjectMapper();
-    ((ObjectNode) mainNode).put(fieldName, mapper.valueToTree(toAddValue));
+    ((ObjectNode) mainNode).set(fieldName, mapper.valueToTree(toAddValue));
     return mainNode;
   }
 }
diff --git a/validation/pom.xml b/validation/pom.xml
index 9ad9ea2b..28d185ef 100644
--- a/validation/pom.xml
+++ b/validation/pom.xml
@@ -121,26 +121,6 @@
                     </execution>
                 </executions>
             </plugin>
-            <plugin>
-                <groupId>com.coveo</groupId>
-                <artifactId>fmt-maven-plugin</artifactId>
-                <configuration>
-                    <sourceDirectory>src/main/java</sourceDirectory>
-                    <testSourceDirectory>src/test/java</testSourceDirectory>
-                    <verbose>false</verbose>
-                    <filesNamePattern>.*\.java</filesNamePattern>
-                    <skip>false</skip>
-                    <skipSortingImports>false</skipSortingImports>
-                    <style>google</style>
-                </configuration>
-                <executions>
-                    <execution>
-                        <goals>
-                            <goal>format</goal>
-                        </goals>
-                    </execution>
-                </executions>
-            </plugin>
         </plugins>
     </build>
 </project>
diff --git a/validation/src/test/java/io/serverlessworkflow/validation/test/WorkflowValidationTest.java b/validation/src/test/java/io/serverlessworkflow/validation/test/WorkflowValidationTest.java
index 08237525..6ccef44f 100644
--- a/validation/src/test/java/io/serverlessworkflow/validation/test/WorkflowValidationTest.java
+++ b/validation/src/test/java/io/serverlessworkflow/validation/test/WorkflowValidationTest.java
@@ -122,7 +122,7 @@ public void testWorkflowMissingStatesIdAndKey() {
     Assertions.assertEquals(1, validationErrors.size());
 
     Assertions.assertEquals(
-        "$.id: is missing but it is required", validationErrors.get(0).getMessage());
+        "$: required property 'id' not found", validationErrors.get(0).getMessage());
   }
 
   @Test

From a2352e98bd273365c49bc21c42441b5723c5041d Mon Sep 17 00:00:00 2001
From: Ricardo Zanini <ricardozanini@gmail.com>
Date: Mon, 28 Apr 2025 13:04:51 -0400
Subject: [PATCH 078/109] Downgrade Logback to support Java 8

Signed-off-by: Ricardo Zanini <ricardozanini@gmail.com>
---
 pom.xml | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/pom.xml b/pom.xml
index 7bf34a27..df9355b5 100644
--- a/pom.xml
+++ b/pom.xml
@@ -72,7 +72,7 @@
 
 
     <!-- Dependencies versions, please keep in alphabetical order -->
-    <version.ch.qos.logback>1.5.18</version.ch.qos.logback>
+    <version.ch.qos.logback>1.2.11</version.ch.qos.logback>
     <version.com.fasterxml.jackson>2.18.3</version.com.fasterxml.jackson>
     <version.com.networknt>1.5.6</version.com.networknt>
     <version.commons.lang>3.13.0</version.commons.lang>

From 53fc84934759ff81b19f6cdf6d65aed91f52f283 Mon Sep 17 00:00:00 2001
From: Ricardo Zanini <1538000+ricardozanini@users.noreply.github.com>
Date: Tue, 29 Apr 2025 10:45:26 -0300
Subject: [PATCH 079/109] Release 4.1.0 (#568)

---
 .github/project.yml | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/.github/project.yml b/.github/project.yml
index c6a326f1..fda65043 100644
--- a/.github/project.yml
+++ b/.github/project.yml
@@ -1,3 +1,3 @@
 release:
-  current-version: 4.0.5.Final
-  next-version: 4.0.6-SNAPSHOT
\ No newline at end of file
+  current-version: 4.1.0.Final
+  next-version: 4.2.0-SNAPSHOT

From eeea751e6956a661cb4a2d82de41e4d4cce394a0 Mon Sep 17 00:00:00 2001
From: GitHub Action <action@github.com>
Date: Tue, 29 Apr 2025 13:46:52 +0000
Subject: [PATCH 080/109] [maven-release-plugin] prepare release 4.1.0.Final

---
 api/pom.xml        | 2 +-
 diagram/pom.xml    | 2 +-
 pom.xml            | 4 ++--
 spi/pom.xml        | 2 +-
 utils/pom.xml      | 2 +-
 validation/pom.xml | 2 +-
 6 files changed, 7 insertions(+), 7 deletions(-)

diff --git a/api/pom.xml b/api/pom.xml
index 1aef17b9..4758575b 100644
--- a/api/pom.xml
+++ b/api/pom.xml
@@ -4,7 +4,7 @@
     <parent>
         <groupId>io.serverlessworkflow</groupId>
         <artifactId>serverlessworkflow-parent</artifactId>
-        <version>4.0.6-SNAPSHOT</version>
+        <version>4.1.0.Final</version>
     </parent>
 
     <artifactId>serverlessworkflow-api</artifactId>
diff --git a/diagram/pom.xml b/diagram/pom.xml
index 89899ea5..3ade1f45 100644
--- a/diagram/pom.xml
+++ b/diagram/pom.xml
@@ -4,7 +4,7 @@
     <parent>
         <groupId>io.serverlessworkflow</groupId>
         <artifactId>serverlessworkflow-parent</artifactId>
-        <version>4.0.6-SNAPSHOT</version>
+        <version>4.1.0.Final</version>
     </parent>
 
     <artifactId>serverlessworkflow-diagram</artifactId>
diff --git a/pom.xml b/pom.xml
index df9355b5..29d7fc57 100644
--- a/pom.xml
+++ b/pom.xml
@@ -4,7 +4,7 @@
 
   <groupId>io.serverlessworkflow</groupId>
   <artifactId>serverlessworkflow-parent</artifactId>
-  <version>4.0.6-SNAPSHOT</version>
+  <version>4.1.0.Final</version>
   <packaging>pom</packaging>
 
   <name>Serverless Workflow :: Parent</name>
@@ -33,7 +33,7 @@
     <connection>scm:git:git@github.com:serverlessworkflow/sdk-java.git</connection>
     <developerConnection>scm:git:git@github.com:serverlessworkflow/sdk-java.git</developerConnection>
     <url>https://github.com/serverlessworkflow/sdk-java</url>
-    <tag>HEAD</tag>
+    <tag>4.1.0.Final</tag>
   </scm>
 
   <modules>
diff --git a/spi/pom.xml b/spi/pom.xml
index bafb917b..9cfd93c8 100644
--- a/spi/pom.xml
+++ b/spi/pom.xml
@@ -4,7 +4,7 @@
     <parent>
         <groupId>io.serverlessworkflow</groupId>
         <artifactId>serverlessworkflow-parent</artifactId>
-        <version>4.0.6-SNAPSHOT</version>
+        <version>4.1.0.Final</version>
     </parent>
 
     <artifactId>serverlessworkflow-spi</artifactId>
diff --git a/utils/pom.xml b/utils/pom.xml
index 4d758cf7..e8909da8 100644
--- a/utils/pom.xml
+++ b/utils/pom.xml
@@ -4,7 +4,7 @@
     <parent>
         <groupId>io.serverlessworkflow</groupId>
         <artifactId>serverlessworkflow-parent</artifactId>
-        <version>4.0.6-SNAPSHOT</version>
+        <version>4.1.0.Final</version>
     </parent>
 
     <artifactId>serverlessworkflow-util</artifactId>
diff --git a/validation/pom.xml b/validation/pom.xml
index 28d185ef..e5fea1e1 100644
--- a/validation/pom.xml
+++ b/validation/pom.xml
@@ -4,7 +4,7 @@
     <parent>
         <groupId>io.serverlessworkflow</groupId>
         <artifactId>serverlessworkflow-parent</artifactId>
-        <version>4.0.6-SNAPSHOT</version>
+        <version>4.1.0.Final</version>
     </parent>
 
     <artifactId>serverlessworkflow-validation</artifactId>

From c4a616609ba27398f8990edd1c00dd619cdc4e51 Mon Sep 17 00:00:00 2001
From: GitHub Action <action@github.com>
Date: Tue, 29 Apr 2025 13:46:52 +0000
Subject: [PATCH 081/109] [maven-release-plugin] prepare for next development
 iteration

---
 api/pom.xml        | 2 +-
 diagram/pom.xml    | 2 +-
 pom.xml            | 4 ++--
 spi/pom.xml        | 2 +-
 utils/pom.xml      | 2 +-
 validation/pom.xml | 2 +-
 6 files changed, 7 insertions(+), 7 deletions(-)

diff --git a/api/pom.xml b/api/pom.xml
index 4758575b..4b91ffa5 100644
--- a/api/pom.xml
+++ b/api/pom.xml
@@ -4,7 +4,7 @@
     <parent>
         <groupId>io.serverlessworkflow</groupId>
         <artifactId>serverlessworkflow-parent</artifactId>
-        <version>4.1.0.Final</version>
+        <version>4.2.0-SNAPSHOT</version>
     </parent>
 
     <artifactId>serverlessworkflow-api</artifactId>
diff --git a/diagram/pom.xml b/diagram/pom.xml
index 3ade1f45..abe8e4f2 100644
--- a/diagram/pom.xml
+++ b/diagram/pom.xml
@@ -4,7 +4,7 @@
     <parent>
         <groupId>io.serverlessworkflow</groupId>
         <artifactId>serverlessworkflow-parent</artifactId>
-        <version>4.1.0.Final</version>
+        <version>4.2.0-SNAPSHOT</version>
     </parent>
 
     <artifactId>serverlessworkflow-diagram</artifactId>
diff --git a/pom.xml b/pom.xml
index 29d7fc57..8177974e 100644
--- a/pom.xml
+++ b/pom.xml
@@ -4,7 +4,7 @@
 
   <groupId>io.serverlessworkflow</groupId>
   <artifactId>serverlessworkflow-parent</artifactId>
-  <version>4.1.0.Final</version>
+  <version>4.2.0-SNAPSHOT</version>
   <packaging>pom</packaging>
 
   <name>Serverless Workflow :: Parent</name>
@@ -33,7 +33,7 @@
     <connection>scm:git:git@github.com:serverlessworkflow/sdk-java.git</connection>
     <developerConnection>scm:git:git@github.com:serverlessworkflow/sdk-java.git</developerConnection>
     <url>https://github.com/serverlessworkflow/sdk-java</url>
-    <tag>4.1.0.Final</tag>
+    <tag>HEAD</tag>
   </scm>
 
   <modules>
diff --git a/spi/pom.xml b/spi/pom.xml
index 9cfd93c8..27743594 100644
--- a/spi/pom.xml
+++ b/spi/pom.xml
@@ -4,7 +4,7 @@
     <parent>
         <groupId>io.serverlessworkflow</groupId>
         <artifactId>serverlessworkflow-parent</artifactId>
-        <version>4.1.0.Final</version>
+        <version>4.2.0-SNAPSHOT</version>
     </parent>
 
     <artifactId>serverlessworkflow-spi</artifactId>
diff --git a/utils/pom.xml b/utils/pom.xml
index e8909da8..46bc1e65 100644
--- a/utils/pom.xml
+++ b/utils/pom.xml
@@ -4,7 +4,7 @@
     <parent>
         <groupId>io.serverlessworkflow</groupId>
         <artifactId>serverlessworkflow-parent</artifactId>
-        <version>4.1.0.Final</version>
+        <version>4.2.0-SNAPSHOT</version>
     </parent>
 
     <artifactId>serverlessworkflow-util</artifactId>
diff --git a/validation/pom.xml b/validation/pom.xml
index e5fea1e1..d5133ff2 100644
--- a/validation/pom.xml
+++ b/validation/pom.xml
@@ -4,7 +4,7 @@
     <parent>
         <groupId>io.serverlessworkflow</groupId>
         <artifactId>serverlessworkflow-parent</artifactId>
-        <version>4.1.0.Final</version>
+        <version>4.2.0-SNAPSHOT</version>
     </parent>
 
     <artifactId>serverlessworkflow-validation</artifactId>

From 3529067901d92314dd144d7b290b0c10daa4bb0a Mon Sep 17 00:00:00 2001
From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com>
Date: Mon, 5 May 2025 12:24:32 -0400
Subject: [PATCH 082/109] Bump org.hamcrest:hamcrest-library from 1.3 to 3.0
 (#581)

Bumps [org.hamcrest:hamcrest-library](https://github.com/hamcrest/JavaHamcrest) from 1.3 to 3.0.
- [Release notes](https://github.com/hamcrest/JavaHamcrest/releases)
- [Changelog](https://github.com/hamcrest/JavaHamcrest/blob/master/CHANGES.md)
- [Commits](https://github.com/hamcrest/JavaHamcrest/compare/hamcrest-java-1.3...v3.0)

---
updated-dependencies:
- dependency-name: org.hamcrest:hamcrest-library
  dependency-version: '3.0'
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
---
 pom.xml | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/pom.xml b/pom.xml
index 8177974e..a8145102 100644
--- a/pom.xml
+++ b/pom.xml
@@ -77,7 +77,7 @@
     <version.com.networknt>1.5.6</version.com.networknt>
     <version.commons.lang>3.13.0</version.commons.lang>
     <version.graphviz>0.17.0</version.graphviz>
-    <version.hamcrest>1.3</version.hamcrest>
+    <version.hamcrest>3.0</version.hamcrest>
     <version.javax.validation>2.0.1.Final</version.javax.validation>
     <version.jsonassert>1.5.0</version.jsonassert>
     <version.org.assertj>3.13.2</version.org.assertj>

From ecd28033932a4c1d527723f4b0c808999db04094 Mon Sep 17 00:00:00 2001
From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com>
Date: Mon, 5 May 2025 12:26:45 -0400
Subject: [PATCH 083/109] Bump org.assertj:assertj-core from 3.13.2 to 3.27.3
 (#575)

Bumps [org.assertj:assertj-core](https://github.com/assertj/assertj) from 3.13.2 to 3.27.3.
- [Release notes](https://github.com/assertj/assertj/releases)
- [Commits](https://github.com/assertj/assertj/compare/assertj-core-3.13.2...assertj-build-3.27.3)

---
updated-dependencies:
- dependency-name: org.assertj:assertj-core
  dependency-version: 3.27.3
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
---
 pom.xml | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/pom.xml b/pom.xml
index a8145102..c7c1e6a6 100644
--- a/pom.xml
+++ b/pom.xml
@@ -80,7 +80,7 @@
     <version.hamcrest>3.0</version.hamcrest>
     <version.javax.validation>2.0.1.Final</version.javax.validation>
     <version.jsonassert>1.5.0</version.jsonassert>
-    <version.org.assertj>3.13.2</version.org.assertj>
+    <version.org.assertj>3.27.3</version.org.assertj>
     <version.org.junit.jupiter>5.12.2</version.org.junit.jupiter>
     <version.org.mockito>5.17.0</version.org.mockito>
     <version.org.slf4j>2.0.17</version.org.slf4j>

From 3e62a01a82ecaf34e1e7abbd38d4a37e3f36cb0b Mon Sep 17 00:00:00 2001
From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com>
Date: Mon, 5 May 2025 12:26:59 -0400
Subject: [PATCH 084/109] Bump org.apache.commons:commons-lang3 from 3.13.0 to
 3.17.0 (#573)

Bumps org.apache.commons:commons-lang3 from 3.13.0 to 3.17.0.

---
updated-dependencies:
- dependency-name: org.apache.commons:commons-lang3
  dependency-version: 3.17.0
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
---
 pom.xml | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/pom.xml b/pom.xml
index c7c1e6a6..790f6e72 100644
--- a/pom.xml
+++ b/pom.xml
@@ -75,7 +75,7 @@
     <version.ch.qos.logback>1.2.11</version.ch.qos.logback>
     <version.com.fasterxml.jackson>2.18.3</version.com.fasterxml.jackson>
     <version.com.networknt>1.5.6</version.com.networknt>
-    <version.commons.lang>3.13.0</version.commons.lang>
+    <version.commons.lang>3.17.0</version.commons.lang>
     <version.graphviz>0.17.0</version.graphviz>
     <version.hamcrest>3.0</version.hamcrest>
     <version.javax.validation>2.0.1.Final</version.javax.validation>

From f69c1a817845f6576c568b68350b751fa4a554cd Mon Sep 17 00:00:00 2001
From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com>
Date: Mon, 5 May 2025 14:06:20 -0400
Subject: [PATCH 085/109] Bump org.thymeleaf:thymeleaf from 3.1.2.RELEASE to
 3.1.3.RELEASE (#587)

Bumps org.thymeleaf:thymeleaf from 3.1.2.RELEASE to 3.1.3.RELEASE.

---
updated-dependencies:
- dependency-name: org.thymeleaf:thymeleaf
  dependency-version: 3.1.3.RELEASE
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
---
 pom.xml | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/pom.xml b/pom.xml
index 790f6e72..0ba31020 100644
--- a/pom.xml
+++ b/pom.xml
@@ -85,7 +85,7 @@
     <version.org.mockito>5.17.0</version.org.mockito>
     <version.org.slf4j>2.0.17</version.org.slf4j>
     <version.plantuml>8059</version.plantuml>
-    <version.thymeleaf>3.1.2.RELEASE</version.thymeleaf>
+    <version.thymeleaf>3.1.3.RELEASE</version.thymeleaf>
 
 
     <!-- Checkstyle props -->

From f8d715a285cf7586f7a91137a0c8bcb9b2145ec6 Mon Sep 17 00:00:00 2001
From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com>
Date: Mon, 5 May 2025 14:11:36 -0400
Subject: [PATCH 086/109] Bump version.com.fasterxml.jackson from 2.18.3 to
 2.19.0 (#579)

Bumps `version.com.fasterxml.jackson` from 2.18.3 to 2.19.0.

Updates `com.fasterxml.jackson.core:jackson-core` from 2.18.3 to 2.19.0
- [Commits](https://github.com/FasterXML/jackson-core/compare/jackson-core-2.18.3...jackson-core-2.19.0)

Updates `com.fasterxml.jackson.core:jackson-databind` from 2.18.3 to 2.19.0
- [Commits](https://github.com/FasterXML/jackson/commits)

Updates `com.fasterxml.jackson.dataformat:jackson-dataformat-yaml` from 2.18.3 to 2.19.0
- [Commits](https://github.com/FasterXML/jackson-dataformats-text/compare/jackson-dataformats-text-2.18.3...jackson-dataformats-text-2.19.0)

---
updated-dependencies:
- dependency-name: com.fasterxml.jackson.core:jackson-core
  dependency-version: 2.19.0
  dependency-type: direct:production
  update-type: version-update:semver-minor
- dependency-name: com.fasterxml.jackson.core:jackson-databind
  dependency-version: 2.19.0
  dependency-type: direct:production
  update-type: version-update:semver-minor
- dependency-name: com.fasterxml.jackson.dataformat:jackson-dataformat-yaml
  dependency-version: 2.19.0
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
---
 pom.xml | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/pom.xml b/pom.xml
index 0ba31020..200aedda 100644
--- a/pom.xml
+++ b/pom.xml
@@ -73,7 +73,7 @@
 
     <!-- Dependencies versions, please keep in alphabetical order -->
     <version.ch.qos.logback>1.2.11</version.ch.qos.logback>
-    <version.com.fasterxml.jackson>2.18.3</version.com.fasterxml.jackson>
+    <version.com.fasterxml.jackson>2.19.0</version.com.fasterxml.jackson>
     <version.com.networknt>1.5.6</version.com.networknt>
     <version.commons.lang>3.17.0</version.commons.lang>
     <version.graphviz>0.17.0</version.graphviz>

From c2f72530a19194cfbd7c5674a254400571983c55 Mon Sep 17 00:00:00 2001
From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com>
Date: Mon, 5 May 2025 21:53:43 -0400
Subject: [PATCH 087/109] Bump org.skyscreamer:jsonassert from 1.5.0 to 1.5.3
 (#589)

Bumps [org.skyscreamer:jsonassert](https://github.com/skyscreamer/JSONassert) from 1.5.0 to 1.5.3.
- [Release notes](https://github.com/skyscreamer/JSONassert/releases)
- [Changelog](https://github.com/skyscreamer/JSONassert/blob/master/CHANGELOG.md)
- [Commits](https://github.com/skyscreamer/JSONassert/compare/jsonassert-1.5.0...jsonassert-1.5.3)

---
updated-dependencies:
- dependency-name: org.skyscreamer:jsonassert
  dependency-version: 1.5.3
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: Ricardo Zanini <1538000+ricardozanini@users.noreply.github.com>
---
 pom.xml | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/pom.xml b/pom.xml
index 200aedda..b8ee5357 100644
--- a/pom.xml
+++ b/pom.xml
@@ -79,7 +79,7 @@
     <version.graphviz>0.17.0</version.graphviz>
     <version.hamcrest>3.0</version.hamcrest>
     <version.javax.validation>2.0.1.Final</version.javax.validation>
-    <version.jsonassert>1.5.0</version.jsonassert>
+    <version.jsonassert>1.5.3</version.jsonassert>
     <version.org.assertj>3.27.3</version.org.assertj>
     <version.org.junit.jupiter>5.12.2</version.org.junit.jupiter>
     <version.org.mockito>5.17.0</version.org.mockito>

From 35004eb1f6798cbf3c0a5ca4912bad1ca4f0f0cd Mon Sep 17 00:00:00 2001
From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com>
Date: Mon, 5 May 2025 21:55:39 -0400
Subject: [PATCH 088/109] Bump guru.nidi:graphviz-java from 0.17.0 to 0.18.1
 (#588)

Bumps [guru.nidi:graphviz-java](https://github.com/nidi3/graphviz-java) from 0.17.0 to 0.18.1.
- [Release notes](https://github.com/nidi3/graphviz-java/releases)
- [Commits](https://github.com/nidi3/graphviz-java/compare/graphviz-java-parent-0.17.0...graphviz-java-parent-0.18.1)

---
updated-dependencies:
- dependency-name: guru.nidi:graphviz-java
  dependency-version: 0.18.1
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
---
 pom.xml | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/pom.xml b/pom.xml
index b8ee5357..d9f8f900 100644
--- a/pom.xml
+++ b/pom.xml
@@ -76,7 +76,7 @@
     <version.com.fasterxml.jackson>2.19.0</version.com.fasterxml.jackson>
     <version.com.networknt>1.5.6</version.com.networknt>
     <version.commons.lang>3.17.0</version.commons.lang>
-    <version.graphviz>0.17.0</version.graphviz>
+    <version.graphviz>0.18.1</version.graphviz>
     <version.hamcrest>3.0</version.hamcrest>
     <version.javax.validation>2.0.1.Final</version.javax.validation>
     <version.jsonassert>1.5.3</version.jsonassert>

From 11c2f51a57c6b596a2730f4f24cbbaeea32c6ef9 Mon Sep 17 00:00:00 2001
From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com>
Date: Mon, 26 May 2025 11:59:07 -0400
Subject: [PATCH 089/109] Bump org.mockito:mockito-core from 5.17.0 to 5.18.0
 (#595)

Bumps [org.mockito:mockito-core](https://github.com/mockito/mockito) from 5.17.0 to 5.18.0.
- [Release notes](https://github.com/mockito/mockito/releases)
- [Commits](https://github.com/mockito/mockito/compare/v5.17.0...v5.18.0)

---
updated-dependencies:
- dependency-name: org.mockito:mockito-core
  dependency-version: 5.18.0
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
---
 pom.xml | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/pom.xml b/pom.xml
index d9f8f900..c5ed369b 100644
--- a/pom.xml
+++ b/pom.xml
@@ -82,7 +82,7 @@
     <version.jsonassert>1.5.3</version.jsonassert>
     <version.org.assertj>3.27.3</version.org.assertj>
     <version.org.junit.jupiter>5.12.2</version.org.junit.jupiter>
-    <version.org.mockito>5.17.0</version.org.mockito>
+    <version.org.mockito>5.18.0</version.org.mockito>
     <version.org.slf4j>2.0.17</version.org.slf4j>
     <version.plantuml>8059</version.plantuml>
     <version.thymeleaf>3.1.3.RELEASE</version.thymeleaf>

From 023845240a360ff2c4d2dce0e68b450a2f4fc619 Mon Sep 17 00:00:00 2001
From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com>
Date: Mon, 26 May 2025 12:04:06 -0400
Subject: [PATCH 090/109] Bump com.networknt:json-schema-validator from 1.5.6
 to 1.5.7 (#593)

Bumps [com.networknt:json-schema-validator](https://github.com/networknt/json-schema-validator) from 1.5.6 to 1.5.7.
- [Release notes](https://github.com/networknt/json-schema-validator/releases)
- [Changelog](https://github.com/networknt/json-schema-validator/blob/master/CHANGELOG.md)
- [Commits](https://github.com/networknt/json-schema-validator/compare/1.5.6...1.5.7)

---
updated-dependencies:
- dependency-name: com.networknt:json-schema-validator
  dependency-version: 1.5.7
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
---
 pom.xml | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/pom.xml b/pom.xml
index c5ed369b..d62d5b9d 100644
--- a/pom.xml
+++ b/pom.xml
@@ -74,7 +74,7 @@
     <!-- Dependencies versions, please keep in alphabetical order -->
     <version.ch.qos.logback>1.2.11</version.ch.qos.logback>
     <version.com.fasterxml.jackson>2.19.0</version.com.fasterxml.jackson>
-    <version.com.networknt>1.5.6</version.com.networknt>
+    <version.com.networknt>1.5.7</version.com.networknt>
     <version.commons.lang>3.17.0</version.commons.lang>
     <version.graphviz>0.18.1</version.graphviz>
     <version.hamcrest>3.0</version.hamcrest>

From 92db491ef42932ba959608ffc8d8238db2e49378 Mon Sep 17 00:00:00 2001
From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com>
Date: Mon, 2 Jun 2025 10:57:41 -0400
Subject: [PATCH 091/109] Bump version.org.junit.jupiter from 5.12.2 to 5.13.0
 (#606)

Bumps `version.org.junit.jupiter` from 5.12.2 to 5.13.0.

Updates `org.junit.jupiter:junit-jupiter-api` from 5.12.2 to 5.13.0
- [Release notes](https://github.com/junit-team/junit5/releases)
- [Commits](https://github.com/junit-team/junit5/compare/r5.12.2...r5.13.0)

Updates `org.junit.jupiter:junit-jupiter-engine` from 5.12.2 to 5.13.0
- [Release notes](https://github.com/junit-team/junit5/releases)
- [Commits](https://github.com/junit-team/junit5/compare/r5.12.2...r5.13.0)

Updates `org.junit.jupiter:junit-jupiter-params` from 5.12.2 to 5.13.0
- [Release notes](https://github.com/junit-team/junit5/releases)
- [Commits](https://github.com/junit-team/junit5/compare/r5.12.2...r5.13.0)

---
updated-dependencies:
- dependency-name: org.junit.jupiter:junit-jupiter-api
  dependency-version: 5.13.0
  dependency-type: direct:production
  update-type: version-update:semver-minor
- dependency-name: org.junit.jupiter:junit-jupiter-engine
  dependency-version: 5.13.0
  dependency-type: direct:production
  update-type: version-update:semver-minor
- dependency-name: org.junit.jupiter:junit-jupiter-params
  dependency-version: 5.13.0
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
---
 pom.xml | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/pom.xml b/pom.xml
index d62d5b9d..7ae91a53 100644
--- a/pom.xml
+++ b/pom.xml
@@ -81,7 +81,7 @@
     <version.javax.validation>2.0.1.Final</version.javax.validation>
     <version.jsonassert>1.5.3</version.jsonassert>
     <version.org.assertj>3.27.3</version.org.assertj>
-    <version.org.junit.jupiter>5.12.2</version.org.junit.jupiter>
+    <version.org.junit.jupiter>5.13.0</version.org.junit.jupiter>
     <version.org.mockito>5.18.0</version.org.mockito>
     <version.org.slf4j>2.0.17</version.org.slf4j>
     <version.plantuml>8059</version.plantuml>

From 8edf0af791f69ccc054aae1844fb8a5a6fe1c5a8 Mon Sep 17 00:00:00 2001
From: Ricardo Zanini <1538000+ricardozanini@users.noreply.github.com>
Date: Thu, 5 Jun 2025 15:35:46 -0300
Subject: [PATCH 092/109] Fix #603 - Add guard code to collections, tidy up
 Workflow serializer (#604)

Signed-off-by: Ricardo Zanini <ricardozanini@gmail.com>
---
 .../api/mapper/WorkflowModule.java            |   8 +-
 .../serializers/FunctionRefSerializer.java    |   6 +-
 .../api/serializers/WorkflowSerializer.java   | 330 +++++++++---------
 .../serverlessworkflow/api/workflow/Auth.java |  74 ++--
 .../api/workflow/BaseWorkflow.java            |  81 ++---
 .../api/workflow/Errors.java                  |  64 ++--
 .../api/workflow/Events.java                  |  64 ++--
 .../api/workflow/Functions.java               |  64 ++--
 .../api/workflow/Retries.java                 |  64 ++--
 .../api/workflow/Secrets.java                 |  61 ++--
 pom.xml                                       |   9 +
 11 files changed, 428 insertions(+), 397 deletions(-)

diff --git a/api/src/main/java/io/serverlessworkflow/api/mapper/WorkflowModule.java b/api/src/main/java/io/serverlessworkflow/api/mapper/WorkflowModule.java
index b2e2606e..5b42598d 100644
--- a/api/src/main/java/io/serverlessworkflow/api/mapper/WorkflowModule.java
+++ b/api/src/main/java/io/serverlessworkflow/api/mapper/WorkflowModule.java
@@ -42,11 +42,11 @@
 
 public class WorkflowModule extends SimpleModule {
 
-  private static final long serialVersionUID = 510l;
+  private static final long serialVersionUID = 510L;
 
-  private WorkflowPropertySource workflowPropertySource;
-  private ExtensionSerializer extensionSerializer;
-  private ExtensionDeserializer extensionDeserializer;
+  private final WorkflowPropertySource workflowPropertySource;
+  private final ExtensionSerializer extensionSerializer;
+  private final ExtensionDeserializer extensionDeserializer;
 
   public WorkflowModule() {
     this(null);
diff --git a/api/src/main/java/io/serverlessworkflow/api/serializers/FunctionRefSerializer.java b/api/src/main/java/io/serverlessworkflow/api/serializers/FunctionRefSerializer.java
index cf5ce81f..71f61606 100644
--- a/api/src/main/java/io/serverlessworkflow/api/serializers/FunctionRefSerializer.java
+++ b/api/src/main/java/io/serverlessworkflow/api/serializers/FunctionRefSerializer.java
@@ -41,12 +41,12 @@ public void serialize(FunctionRef functionRef, JsonGenerator gen, SerializerProv
           && (functionRef.getInvoke() == null
               || functionRef.getInvoke().equals(FunctionRef.Invoke.SYNC))
           && functionRef.getRefName() != null
-          && functionRef.getRefName().length() > 0) {
+          && !functionRef.getRefName().isEmpty()) {
         gen.writeString(functionRef.getRefName());
       } else {
         gen.writeStartObject();
 
-        if (functionRef.getRefName() != null && functionRef.getRefName().length() > 0) {
+        if (functionRef.getRefName() != null && !functionRef.getRefName().isEmpty()) {
           gen.writeStringField("refName", functionRef.getRefName());
         }
 
@@ -54,7 +54,7 @@ public void serialize(FunctionRef functionRef, JsonGenerator gen, SerializerProv
           gen.writeObjectField("arguments", functionRef.getArguments());
         }
 
-        if (functionRef.getSelectionSet() != null && functionRef.getSelectionSet().length() > 0) {
+        if (functionRef.getSelectionSet() != null && !functionRef.getSelectionSet().isEmpty()) {
           gen.writeStringField("selectionSet", functionRef.getSelectionSet());
         }
 
diff --git a/api/src/main/java/io/serverlessworkflow/api/serializers/WorkflowSerializer.java b/api/src/main/java/io/serverlessworkflow/api/serializers/WorkflowSerializer.java
index 4bbaf9c1..b5ac7cbb 100644
--- a/api/src/main/java/io/serverlessworkflow/api/serializers/WorkflowSerializer.java
+++ b/api/src/main/java/io/serverlessworkflow/api/serializers/WorkflowSerializer.java
@@ -15,187 +15,171 @@
  */
 package io.serverlessworkflow.api.serializers;
 
+import java.io.IOException;
+import java.security.MessageDigest;
+import java.util.List;
+import java.util.UUID;
+
 import com.fasterxml.jackson.core.JsonGenerator;
 import com.fasterxml.jackson.databind.SerializerProvider;
 import com.fasterxml.jackson.databind.ser.std.StdSerializer;
 import io.serverlessworkflow.api.Workflow;
-import io.serverlessworkflow.api.error.ErrorDefinition;
-import io.serverlessworkflow.api.events.EventDefinition;
-import io.serverlessworkflow.api.functions.FunctionDefinition;
 import io.serverlessworkflow.api.interfaces.Extension;
 import io.serverlessworkflow.api.interfaces.State;
-import io.serverlessworkflow.api.retry.RetryDefinition;
-import java.io.IOException;
-import java.security.MessageDigest;
-import java.util.UUID;
 
 public class WorkflowSerializer extends StdSerializer<Workflow> {
 
-  public WorkflowSerializer() {
-    this(Workflow.class);
-  }
-
-  protected WorkflowSerializer(Class<Workflow> t) {
-    super(t);
-  }
-
-  private static final char[] hexArray = "0123456789ABCDEF".toCharArray();
-
-  @Override
-  public void serialize(Workflow workflow, JsonGenerator gen, SerializerProvider provider)
-      throws IOException {
-
-    gen.writeStartObject();
-
-    if (workflow.getId() != null && !workflow.getId().isEmpty()) {
-      gen.writeStringField("id", workflow.getId());
-    } else {
-      gen.writeStringField("id", generateUniqueId());
-    }
-
-    if (workflow.getKey() != null) {
-      gen.writeStringField("key", workflow.getKey());
-    }
-    gen.writeStringField("name", workflow.getName());
-
-    if (workflow.getDescription() != null && !workflow.getDescription().isEmpty()) {
-      gen.writeStringField("description", workflow.getDescription());
-    }
-
-    if (workflow.getVersion() != null && !workflow.getVersion().isEmpty()) {
-      gen.writeStringField("version", workflow.getVersion());
-    }
-
-    if (workflow.getAnnotations() != null && !workflow.getAnnotations().isEmpty()) {
-      gen.writeObjectField("annotations", workflow.getAnnotations());
-    }
-
-    if (workflow.getDataInputSchema() != null) {
-      if (workflow.getDataInputSchema().getSchema() != null
-          && workflow.getDataInputSchema().getSchema().length() > 0
-          && workflow.getDataInputSchema().isFailOnValidationErrors()) {
-        gen.writeStringField("dataInputSchema", workflow.getDataInputSchema().getSchema());
-
-      } else if (workflow.getDataInputSchema().getSchema() != null
-          && workflow.getDataInputSchema().getSchema().length() > 0
-          && !workflow.getDataInputSchema().isFailOnValidationErrors()) {
-        gen.writeObjectField("dataInputSchema", workflow.getDataInputSchema());
-      }
-    }
-
-    if (workflow.getStart() != null) {
-      gen.writeObjectField("start", workflow.getStart());
-    }
-
-    if (workflow.getSpecVersion() != null && !workflow.getSpecVersion().isEmpty()) {
-      gen.writeStringField("specVersion", workflow.getSpecVersion());
-    }
-
-    if (workflow.getExtensions() != null && !workflow.getExpressionLang().isEmpty()) {
-      gen.writeStringField("expressionLang", workflow.getExpressionLang());
-    }
-
-    if (workflow.isKeepActive()) {
-      gen.writeBooleanField("keepActive", workflow.isKeepActive());
-    }
-
-    if (workflow.isAutoRetries()) {
-      gen.writeBooleanField("autoRetries", workflow.isAutoRetries());
-    }
-
-    if (workflow.getMetadata() != null && !workflow.getMetadata().isEmpty()) {
-      gen.writeObjectField("metadata", workflow.getMetadata());
-    }
-
-    if (workflow.getEvents() != null && !workflow.getEvents().getEventDefs().isEmpty()) {
-      gen.writeArrayFieldStart("events");
-      for (EventDefinition eventDefinition : workflow.getEvents().getEventDefs()) {
-        gen.writeObject(eventDefinition);
-      }
-      gen.writeEndArray();
-    }
-
-    if (workflow.getFunctions() != null && !workflow.getFunctions().getFunctionDefs().isEmpty()) {
-      gen.writeArrayFieldStart("functions");
-      for (FunctionDefinition function : workflow.getFunctions().getFunctionDefs()) {
-        gen.writeObject(function);
-      }
-      gen.writeEndArray();
-    }
-
-    if (workflow.getRetries() != null && !workflow.getRetries().getRetryDefs().isEmpty()) {
-      gen.writeArrayFieldStart("retries");
-      for (RetryDefinition retry : workflow.getRetries().getRetryDefs()) {
-        gen.writeObject(retry);
-      }
-      gen.writeEndArray();
-    }
-
-    if (workflow.getErrors() != null && !workflow.getErrors().getErrorDefs().isEmpty()) {
-      gen.writeArrayFieldStart("errors");
-      for (ErrorDefinition error : workflow.getErrors().getErrorDefs()) {
-        gen.writeObject(error);
-      }
-      gen.writeEndArray();
-    }
-
-    if (workflow.getSecrets() != null && !workflow.getSecrets().getSecretDefs().isEmpty()) {
-      gen.writeArrayFieldStart("secrets");
-      for (String secretDef : workflow.getSecrets().getSecretDefs()) {
-        gen.writeString(secretDef);
-      }
-      gen.writeEndArray();
-    }
-
-    if (workflow.getConstants() != null && !workflow.getConstants().getConstantsDef().isEmpty()) {
-      gen.writeObjectField("constants", workflow.getConstants().getConstantsDef());
-    }
-
-    if (workflow.getTimeouts() != null) {
-      gen.writeObjectField("timeouts", workflow.getTimeouts());
-    }
-
-    if (workflow.getAuth() != null && !workflow.getAuth().getAuthDefs().isEmpty()) {
-      gen.writeObjectField("auth", workflow.getAuth().getAuthDefs());
-    }
-
-    if (workflow.getStates() != null && !workflow.getStates().isEmpty()) {
-      gen.writeArrayFieldStart("states");
-      for (State state : workflow.getStates()) {
-        gen.writeObject(state);
-      }
-      gen.writeEndArray();
-    }
-
-    if (workflow.getExtensions() != null && !workflow.getExtensions().isEmpty()) {
-      gen.writeArrayFieldStart("extensions");
-      for (Extension extension : workflow.getExtensions()) {
-        gen.writeObject(extension);
-      }
-      gen.writeEndArray();
-    }
-
-    gen.writeEndObject();
-  }
-
-  protected static String generateUniqueId() {
-    try {
-      MessageDigest salt = MessageDigest.getInstance("SHA-256");
-
-      salt.update(UUID.randomUUID().toString().getBytes("UTF-8"));
-      return bytesToHex(salt.digest());
-    } catch (Exception e) {
-      return UUID.randomUUID().toString();
-    }
-  }
-
-  protected static String bytesToHex(byte[] bytes) {
-    char[] hexChars = new char[bytes.length * 2];
-    for (int j = 0; j < bytes.length; j++) {
-      int v = bytes[j] & 0xFF;
-      hexChars[j * 2] = hexArray[v >>> 4];
-      hexChars[j * 2 + 1] = hexArray[v & 0x0F];
+    private static final char[] hexArray = "0123456789ABCDEF".toCharArray();
+
+    public WorkflowSerializer() {
+        this(Workflow.class);
+    }
+
+    protected WorkflowSerializer(Class<Workflow> t) {
+        super(t);
+    }
+
+    protected static String generateUniqueId() {
+        try {
+            MessageDigest salt = MessageDigest.getInstance("SHA-256");
+            salt.update(UUID.randomUUID().toString().getBytes("UTF-8"));
+            return bytesToHex(salt.digest());
+        } catch (Exception e) {
+            return UUID.randomUUID().toString();
+        }
+    }
+
+    protected static String bytesToHex(byte[] bytes) {
+        char[] hexChars = new char[bytes.length * 2];
+        for (int j = 0; j < bytes.length; j++) {
+            int v = bytes[j] & 0xFF;
+            hexChars[j * 2] = hexArray[v >>> 4];
+            hexChars[j * 2 + 1] = hexArray[v & 0x0F];
+        }
+        return new String(hexChars);
+    }
+
+    // Helper to write either an array of items or a single string reference
+    private <T> void writeListOrRef(
+            JsonGenerator gen,
+            SerializerProvider prov,
+            String fieldName,
+            List<T> items,
+            String refValue) throws IOException {
+        if (items != null && !items.isEmpty()) {
+            gen.writeArrayFieldStart(fieldName);
+            for (T item : items) {
+                prov.defaultSerializeValue(item, gen);
+            }
+            gen.writeEndArray();
+        } else if (refValue != null) {
+            gen.writeStringField(fieldName, refValue);
+        }
+    }
+
+    @Override
+    public void serialize(Workflow workflow, JsonGenerator gen, SerializerProvider provider)
+            throws IOException {
+
+        gen.writeStartObject();
+
+        // --- ID / key / basic fields ---
+        if (workflow.getId() != null && !workflow.getId().isEmpty()) {
+            gen.writeStringField("id", workflow.getId());
+        } else {
+            gen.writeStringField("id", generateUniqueId());
+        }
+        if (workflow.getKey() != null) {
+            gen.writeStringField("key", workflow.getKey());
+        }
+        gen.writeStringField("name", workflow.getName());
+        if (workflow.getDescription() != null && !workflow.getDescription().isEmpty()) {
+            gen.writeStringField("description", workflow.getDescription());
+        }
+        if (workflow.getVersion() != null && !workflow.getVersion().isEmpty()) {
+            gen.writeStringField("version", workflow.getVersion());
+        }
+        if (workflow.getAnnotations() != null && !workflow.getAnnotations().isEmpty()) {
+            gen.writeObjectField("annotations", workflow.getAnnotations());
+        }
+        if (workflow.getDataInputSchema() != null) {
+            if (workflow.getDataInputSchema().getSchema() != null
+                    && !workflow.getDataInputSchema().getSchema().isEmpty()
+                    && workflow.getDataInputSchema().isFailOnValidationErrors()) {
+                gen.writeStringField("dataInputSchema", workflow.getDataInputSchema().getSchema());
+            } else if (workflow.getDataInputSchema().getSchema() != null
+                    && !workflow.getDataInputSchema().getSchema().isEmpty()
+                    && !workflow.getDataInputSchema().isFailOnValidationErrors()) {
+                gen.writeObjectField("dataInputSchema", workflow.getDataInputSchema());
+            }
+        }
+        if (workflow.getStart() != null) {
+            gen.writeObjectField("start", workflow.getStart());
+        }
+        if (workflow.getSpecVersion() != null && !workflow.getSpecVersion().isEmpty()) {
+            gen.writeStringField("specVersion", workflow.getSpecVersion());
+        }
+        if (workflow.getExpressionLang() != null && !workflow.getExpressionLang().isEmpty()) {
+            gen.writeStringField("expressionLang", workflow.getExpressionLang());
+        }
+        if (workflow.isKeepActive()) {
+            gen.writeBooleanField("keepActive", workflow.isKeepActive());
+        }
+        if (workflow.isAutoRetries()) {
+            gen.writeBooleanField("autoRetries", workflow.isAutoRetries());
+        }
+        if (workflow.getMetadata() != null && !workflow.getMetadata().isEmpty()) {
+            gen.writeObjectField("metadata", workflow.getMetadata());
+        }
+
+        // --- Collections or references ---
+        if (workflow.getEvents() != null) {
+            writeListOrRef(gen, provider,
+                    "events",
+                    workflow.getEvents().getEventDefs(),
+                    workflow.getEvents().getRefValue());
+        }
+        if (workflow.getFunctions() != null) {
+            writeListOrRef(gen, provider,
+                    "functions",
+                    workflow.getFunctions().getFunctionDefs(),
+                    workflow.getFunctions().getRefValue());
+        }
+        if (workflow.getRetries() != null) {
+            writeListOrRef(gen, provider,
+                    "retries",
+                    workflow.getRetries().getRetryDefs(),
+                    workflow.getRetries().getRefValue());
+        }
+        if (workflow.getErrors() != null) {
+            writeListOrRef(gen, provider,
+                    "errors",
+                    workflow.getErrors().getErrorDefs(),
+                    workflow.getErrors().getRefValue());
+        }
+        if (workflow.getSecrets() != null) {
+            writeListOrRef(gen, provider,
+                    "secrets",
+                    workflow.getSecrets().getSecretDefs(),
+                    workflow.getSecrets().getRefValue());
+        }
+
+        // --- Always-array fields ---
+        if (workflow.getStates() != null && !workflow.getStates().isEmpty()) {
+            gen.writeArrayFieldStart("states");
+            for (State state : workflow.getStates()) {
+                gen.writeObject(state);
+            }
+            gen.writeEndArray();
+        }
+        if (workflow.getExtensions() != null && !workflow.getExtensions().isEmpty()) {
+            gen.writeArrayFieldStart("extensions");
+            for (Extension ext : workflow.getExtensions()) {
+                gen.writeObject(ext);
+            }
+            gen.writeEndArray();
+        }
+
+        gen.writeEndObject();
     }
-    return new String(hexChars);
-  }
 }
diff --git a/api/src/main/java/io/serverlessworkflow/api/workflow/Auth.java b/api/src/main/java/io/serverlessworkflow/api/workflow/Auth.java
index 280053fa..e7828370 100644
--- a/api/src/main/java/io/serverlessworkflow/api/workflow/Auth.java
+++ b/api/src/main/java/io/serverlessworkflow/api/workflow/Auth.java
@@ -16,42 +16,48 @@
 
 package io.serverlessworkflow.api.workflow;
 
-import io.serverlessworkflow.api.auth.AuthDefinition;
 import java.util.ArrayList;
+import java.util.Collections;
 import java.util.List;
 
-public class Auth {
-  private String refValue;
-  private List<AuthDefinition> authDefs;
-
-  public Auth() {}
-
-  public Auth(AuthDefinition authDef) {
-    this.authDefs = new ArrayList<>();
-    this.authDefs.add(authDef);
-  }
-
-  public Auth(List<AuthDefinition> authDefs) {
-    this.authDefs = authDefs;
-  }
-
-  public Auth(String refValue) {
-    this.refValue = refValue;
-  }
-
-  public String getRefValue() {
-    return refValue;
-  }
-
-  public void setRefValue(String refValue) {
-    this.refValue = refValue;
-  }
-
-  public List<AuthDefinition> getAuthDefs() {
-    return authDefs;
-  }
+import io.serverlessworkflow.api.auth.AuthDefinition;
 
-  public void setAuthDefs(List<AuthDefinition> authDefs) {
-    this.authDefs = authDefs;
-  }
+public class Auth {
+    private String refValue;
+    private List<AuthDefinition> authDefs;
+
+    public Auth() {
+    }
+
+    public Auth(AuthDefinition authDef) {
+        this.authDefs = new ArrayList<>();
+        this.authDefs.add(authDef);
+    }
+
+    public Auth(List<AuthDefinition> authDefs) {
+        this.authDefs = authDefs;
+    }
+
+    public Auth(String refValue) {
+        this.refValue = refValue;
+    }
+
+    public String getRefValue() {
+        return refValue;
+    }
+
+    public void setRefValue(String refValue) {
+        this.refValue = refValue;
+    }
+
+    public List<AuthDefinition> getAuthDefs() {
+        if (authDefs == null) {
+            return Collections.emptyList();
+        }
+        return authDefs;
+    }
+
+    public void setAuthDefs(List<AuthDefinition> authDefs) {
+        this.authDefs = authDefs;
+    }
 }
diff --git a/api/src/main/java/io/serverlessworkflow/api/workflow/BaseWorkflow.java b/api/src/main/java/io/serverlessworkflow/api/workflow/BaseWorkflow.java
index 61692caf..e3fc3d55 100644
--- a/api/src/main/java/io/serverlessworkflow/api/workflow/BaseWorkflow.java
+++ b/api/src/main/java/io/serverlessworkflow/api/workflow/BaseWorkflow.java
@@ -15,6 +15,9 @@
  */
 package io.serverlessworkflow.api.workflow;
 
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+
 import com.fasterxml.jackson.core.JsonProcessingException;
 import com.fasterxml.jackson.databind.JsonNode;
 import com.fasterxml.jackson.dataformat.yaml.YAMLFactory;
@@ -23,53 +26,53 @@
 import io.serverlessworkflow.api.Workflow;
 import io.serverlessworkflow.api.mapper.JsonObjectMapper;
 import io.serverlessworkflow.api.mapper.YamlObjectMapper;
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
 
-/** Base Workflow provides some extra functionality for the Workflow types */
+/**
+ * Base Workflow provides some extra functionality for the Workflow types
+ */
 public class BaseWorkflow {
 
-  private static JsonObjectMapper jsonObjectMapper = new JsonObjectMapper();
-  private static YamlObjectMapper yamlObjectMapper = new YamlObjectMapper();
+    private static JsonObjectMapper jsonObjectMapper = new JsonObjectMapper();
+    private static YamlObjectMapper yamlObjectMapper = new YamlObjectMapper();
 
-  private static Logger logger = LoggerFactory.getLogger(BaseWorkflow.class);
+    private static Logger logger = LoggerFactory.getLogger(BaseWorkflow.class);
 
-  public static Workflow fromSource(String source) {
-    // try it as json markup first, if fails try yaml
-    try {
-      return jsonObjectMapper.readValue(source, Workflow.class);
-    } catch (Exception e) {
-      logger.info("Unable to convert as json markup, trying as yaml");
-      try {
-        return yamlObjectMapper.readValue(source, Workflow.class);
-      } catch (Exception ee) {
-        throw new IllegalArgumentException(
-            "Could not convert markup to Workflow: " + ee.getMessage());
-      }
+    public static Workflow fromSource(String source) {
+        // try it as json markup first, if fails try yaml
+        try {
+            return jsonObjectMapper.readValue(source, Workflow.class);
+        } catch (Exception e) {
+            logger.info("Unable to convert as json markup, trying as yaml");
+            try {
+                return yamlObjectMapper.readValue(source, Workflow.class);
+            } catch (Exception ee) {
+                throw new IllegalArgumentException(
+                        "Could not convert markup to Workflow: " + ee.getMessage());
+            }
+        }
     }
-  }
 
-  public static String toJson(Workflow workflow) {
-    try {
-      return jsonObjectMapper.writeValueAsString(workflow);
-    } catch (JsonProcessingException e) {
-      logger.error("Error mapping to json: " + e.getMessage());
-      return null;
+    public static String toJson(Workflow workflow) {
+        try {
+            return jsonObjectMapper.writeValueAsString(workflow);
+        } catch (JsonProcessingException e) {
+            logger.error("Error mapping to json: {}", e.getMessage());
+            throw new IllegalArgumentException("Could not convert workflow to json: " + e.getMessage());
+        }
     }
-  }
 
-  public static String toYaml(Workflow workflow) {
-    try {
-      String jsonString = jsonObjectMapper.writeValueAsString(workflow);
-      JsonNode jsonNode = jsonObjectMapper.readTree(jsonString);
-      YAMLFactory yamlFactory =
-          new YAMLFactory()
-              .disable(YAMLGenerator.Feature.MINIMIZE_QUOTES)
-              .disable(YAMLGenerator.Feature.WRITE_DOC_START_MARKER);
-      return new YAMLMapper(yamlFactory).writeValueAsString(jsonNode);
-    } catch (Exception e) {
-      logger.error("Error mapping to yaml: " + e.getMessage());
-      return null;
+    public static String toYaml(Workflow workflow) {
+        try {
+            String jsonString = jsonObjectMapper.writeValueAsString(workflow);
+            JsonNode jsonNode = jsonObjectMapper.readTree(jsonString);
+            YAMLFactory yamlFactory =
+                    new YAMLFactory()
+                            .disable(YAMLGenerator.Feature.MINIMIZE_QUOTES)
+                            .disable(YAMLGenerator.Feature.WRITE_DOC_START_MARKER);
+            return new YAMLMapper(yamlFactory).writeValueAsString(jsonNode);
+        } catch (Exception e) {
+            logger.error("Error mapping to yaml: {}", e.getMessage());
+            throw new IllegalArgumentException("Could not convert workflow to yaml: " + e.getMessage());
+        }
     }
-  }
 }
diff --git a/api/src/main/java/io/serverlessworkflow/api/workflow/Errors.java b/api/src/main/java/io/serverlessworkflow/api/workflow/Errors.java
index 8431b94a..9e474139 100644
--- a/api/src/main/java/io/serverlessworkflow/api/workflow/Errors.java
+++ b/api/src/main/java/io/serverlessworkflow/api/workflow/Errors.java
@@ -15,36 +15,42 @@
  */
 package io.serverlessworkflow.api.workflow;
 
-import io.serverlessworkflow.api.error.ErrorDefinition;
+import java.util.Collections;
 import java.util.List;
 
-public class Errors {
-  private String refValue;
-  private List<ErrorDefinition> errorDefs;
-
-  public Errors() {}
-
-  public Errors(List<ErrorDefinition> errorDefs) {
-    this.errorDefs = errorDefs;
-  }
-
-  public Errors(String refValue) {
-    this.refValue = refValue;
-  }
-
-  public String getRefValue() {
-    return refValue;
-  }
-
-  public void setRefValue(String refValue) {
-    this.refValue = refValue;
-  }
-
-  public List<ErrorDefinition> getErrorDefs() {
-    return errorDefs;
-  }
+import io.serverlessworkflow.api.error.ErrorDefinition;
 
-  public void setErrorDefs(List<ErrorDefinition> errorDefs) {
-    this.errorDefs = errorDefs;
-  }
+public class Errors {
+    private String refValue;
+    private List<ErrorDefinition> errorDefs;
+
+    public Errors() {
+    }
+
+    public Errors(List<ErrorDefinition> errorDefs) {
+        this.errorDefs = errorDefs;
+    }
+
+    public Errors(String refValue) {
+        this.refValue = refValue;
+    }
+
+    public String getRefValue() {
+        return refValue;
+    }
+
+    public void setRefValue(String refValue) {
+        this.refValue = refValue;
+    }
+
+    public List<ErrorDefinition> getErrorDefs() {
+        if (errorDefs == null) {
+            return Collections.emptyList();
+        }
+        return errorDefs;
+    }
+
+    public void setErrorDefs(List<ErrorDefinition> errorDefs) {
+        this.errorDefs = errorDefs;
+    }
 }
diff --git a/api/src/main/java/io/serverlessworkflow/api/workflow/Events.java b/api/src/main/java/io/serverlessworkflow/api/workflow/Events.java
index 24080e51..59af2c3f 100644
--- a/api/src/main/java/io/serverlessworkflow/api/workflow/Events.java
+++ b/api/src/main/java/io/serverlessworkflow/api/workflow/Events.java
@@ -15,36 +15,42 @@
  */
 package io.serverlessworkflow.api.workflow;
 
-import io.serverlessworkflow.api.events.EventDefinition;
+import java.util.Collections;
 import java.util.List;
 
-public class Events {
-  private String refValue;
-  private List<EventDefinition> eventDefs;
-
-  public Events() {}
-
-  public Events(List<EventDefinition> eventDefs) {
-    this.eventDefs = eventDefs;
-  }
-
-  public Events(String refValue) {
-    this.refValue = refValue;
-  }
-
-  public String getRefValue() {
-    return refValue;
-  }
-
-  public void setRefValue(String refValue) {
-    this.refValue = refValue;
-  }
-
-  public List<EventDefinition> getEventDefs() {
-    return eventDefs;
-  }
+import io.serverlessworkflow.api.events.EventDefinition;
 
-  public void setEventDefs(List<EventDefinition> eventDefs) {
-    this.eventDefs = eventDefs;
-  }
+public class Events {
+    private String refValue;
+    private List<EventDefinition> eventDefs;
+
+    public Events() {
+    }
+
+    public Events(List<EventDefinition> eventDefs) {
+        this.eventDefs = eventDefs;
+    }
+
+    public Events(String refValue) {
+        this.refValue = refValue;
+    }
+
+    public String getRefValue() {
+        return refValue;
+    }
+
+    public void setRefValue(String refValue) {
+        this.refValue = refValue;
+    }
+
+    public List<EventDefinition> getEventDefs() {
+        if (eventDefs == null) {
+            return Collections.emptyList();
+        }
+        return eventDefs;
+    }
+
+    public void setEventDefs(List<EventDefinition> eventDefs) {
+        this.eventDefs = eventDefs;
+    }
 }
diff --git a/api/src/main/java/io/serverlessworkflow/api/workflow/Functions.java b/api/src/main/java/io/serverlessworkflow/api/workflow/Functions.java
index f269bc08..6e927f9b 100644
--- a/api/src/main/java/io/serverlessworkflow/api/workflow/Functions.java
+++ b/api/src/main/java/io/serverlessworkflow/api/workflow/Functions.java
@@ -15,36 +15,42 @@
  */
 package io.serverlessworkflow.api.workflow;
 
-import io.serverlessworkflow.api.functions.FunctionDefinition;
+import java.util.Collections;
 import java.util.List;
 
-public class Functions {
-  private String refValue;
-  private List<FunctionDefinition> functionDefs;
-
-  public Functions() {}
-
-  public Functions(List<FunctionDefinition> functionDefs) {
-    this.functionDefs = functionDefs;
-  }
-
-  public Functions(String refValue) {
-    this.refValue = refValue;
-  }
-
-  public String getRefValue() {
-    return refValue;
-  }
-
-  public void setRefValue(String refValue) {
-    this.refValue = refValue;
-  }
-
-  public List<FunctionDefinition> getFunctionDefs() {
-    return functionDefs;
-  }
+import io.serverlessworkflow.api.functions.FunctionDefinition;
 
-  public void setFunctionDefs(List<FunctionDefinition> functionDefs) {
-    this.functionDefs = functionDefs;
-  }
+public class Functions {
+    private String refValue;
+    private List<FunctionDefinition> functionDefs;
+
+    public Functions() {
+    }
+
+    public Functions(List<FunctionDefinition> functionDefs) {
+        this.functionDefs = functionDefs;
+    }
+
+    public Functions(String refValue) {
+        this.refValue = refValue;
+    }
+
+    public String getRefValue() {
+        return refValue;
+    }
+
+    public void setRefValue(String refValue) {
+        this.refValue = refValue;
+    }
+
+    public List<FunctionDefinition> getFunctionDefs() {
+        if (functionDefs == null) {
+            return Collections.emptyList();
+        }
+        return functionDefs;
+    }
+
+    public void setFunctionDefs(List<FunctionDefinition> functionDefs) {
+        this.functionDefs = functionDefs;
+    }
 }
diff --git a/api/src/main/java/io/serverlessworkflow/api/workflow/Retries.java b/api/src/main/java/io/serverlessworkflow/api/workflow/Retries.java
index af1ae1e0..fa539ac0 100644
--- a/api/src/main/java/io/serverlessworkflow/api/workflow/Retries.java
+++ b/api/src/main/java/io/serverlessworkflow/api/workflow/Retries.java
@@ -15,36 +15,42 @@
  */
 package io.serverlessworkflow.api.workflow;
 
-import io.serverlessworkflow.api.retry.RetryDefinition;
+import java.util.Collections;
 import java.util.List;
 
-public class Retries {
-  private String refValue;
-  private List<RetryDefinition> retryDefs;
-
-  public Retries() {}
-
-  public Retries(List<RetryDefinition> retryDefs) {
-    this.retryDefs = retryDefs;
-  }
-
-  public Retries(String refValue) {
-    this.refValue = refValue;
-  }
-
-  public String getRefValue() {
-    return refValue;
-  }
-
-  public void setRefValue(String refValue) {
-    this.refValue = refValue;
-  }
-
-  public List<RetryDefinition> getRetryDefs() {
-    return retryDefs;
-  }
+import io.serverlessworkflow.api.retry.RetryDefinition;
 
-  public void setRetryDefs(List<RetryDefinition> retryDefs) {
-    this.retryDefs = retryDefs;
-  }
+public class Retries {
+    private String refValue;
+    private List<RetryDefinition> retryDefs;
+
+    public Retries() {
+    }
+
+    public Retries(List<RetryDefinition> retryDefs) {
+        this.retryDefs = retryDefs;
+    }
+
+    public Retries(String refValue) {
+        this.refValue = refValue;
+    }
+
+    public String getRefValue() {
+        return refValue;
+    }
+
+    public void setRefValue(String refValue) {
+        this.refValue = refValue;
+    }
+
+    public List<RetryDefinition> getRetryDefs() {
+        if (retryDefs == null) {
+            return Collections.emptyList();
+        }
+        return retryDefs;
+    }
+
+    public void setRetryDefs(List<RetryDefinition> retryDefs) {
+        this.retryDefs = retryDefs;
+    }
 }
diff --git a/api/src/main/java/io/serverlessworkflow/api/workflow/Secrets.java b/api/src/main/java/io/serverlessworkflow/api/workflow/Secrets.java
index 2dbb6b31..03edc0fd 100644
--- a/api/src/main/java/io/serverlessworkflow/api/workflow/Secrets.java
+++ b/api/src/main/java/io/serverlessworkflow/api/workflow/Secrets.java
@@ -15,35 +15,40 @@
  */
 package io.serverlessworkflow.api.workflow;
 
+import java.util.Collections;
 import java.util.List;
 
 public class Secrets {
-  private String refValue;
-  private List<String> secretDefs;
-
-  public Secrets() {}
-
-  public Secrets(String refValue) {
-    this.refValue = refValue;
-  }
-
-  public Secrets(List<String> secretDefs) {
-    this.secretDefs = secretDefs;
-  }
-
-  public String getRefValue() {
-    return refValue;
-  }
-
-  public void setRefValue(String refValue) {
-    this.refValue = refValue;
-  }
-
-  public List<String> getSecretDefs() {
-    return secretDefs;
-  }
-
-  public void setSecretDefs(List<String> secretDefs) {
-    this.secretDefs = secretDefs;
-  }
+    private String refValue;
+    private List<String> secretDefs;
+
+    public Secrets() {
+    }
+
+    public Secrets(String refValue) {
+        this.refValue = refValue;
+    }
+
+    public Secrets(List<String> secretDefs) {
+        this.secretDefs = secretDefs;
+    }
+
+    public String getRefValue() {
+        return refValue;
+    }
+
+    public void setRefValue(String refValue) {
+        this.refValue = refValue;
+    }
+
+    public List<String> getSecretDefs() {
+        if (secretDefs == null) {
+            return Collections.emptyList();
+        }
+        return secretDefs;
+    }
+
+    public void setSecretDefs(List<String> secretDefs) {
+        this.secretDefs = secretDefs;
+    }
 }
diff --git a/pom.xml b/pom.xml
index 7ae91a53..30e40069 100644
--- a/pom.xml
+++ b/pom.xml
@@ -228,6 +228,15 @@
     </dependencies>
   </dependencyManagement>
 
+  <dependencies>
+    <dependency>
+      <groupId>org.slf4j</groupId>
+      <artifactId>slf4j-nop</artifactId>
+      <version>${version.org.slf4j}</version>
+      <scope>test</scope>
+    </dependency>
+  </dependencies>
+
   <build>
     <plugins>
       <!-- Set properties containing the scm revision -->

From 58ed0ed3484addd3508eddd4cd536f84c69d4ae6 Mon Sep 17 00:00:00 2001
From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com>
Date: Mon, 9 Jun 2025 12:41:07 -0400
Subject: [PATCH 093/109] Bump version.org.junit.jupiter from 5.13.0 to 5.13.1
 (#608)

Bumps `version.org.junit.jupiter` from 5.13.0 to 5.13.1.

Updates `org.junit.jupiter:junit-jupiter-api` from 5.13.0 to 5.13.1
- [Release notes](https://github.com/junit-team/junit5/releases)
- [Commits](https://github.com/junit-team/junit5/compare/r5.13.0...r5.13.1)

Updates `org.junit.jupiter:junit-jupiter-engine` from 5.13.0 to 5.13.1
- [Release notes](https://github.com/junit-team/junit5/releases)
- [Commits](https://github.com/junit-team/junit5/compare/r5.13.0...r5.13.1)

Updates `org.junit.jupiter:junit-jupiter-params` from 5.13.0 to 5.13.1
- [Release notes](https://github.com/junit-team/junit5/releases)
- [Commits](https://github.com/junit-team/junit5/compare/r5.13.0...r5.13.1)

---
updated-dependencies:
- dependency-name: org.junit.jupiter:junit-jupiter-api
  dependency-version: 5.13.1
  dependency-type: direct:production
  update-type: version-update:semver-patch
- dependency-name: org.junit.jupiter:junit-jupiter-engine
  dependency-version: 5.13.1
  dependency-type: direct:production
  update-type: version-update:semver-patch
- dependency-name: org.junit.jupiter:junit-jupiter-params
  dependency-version: 5.13.1
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
---
 pom.xml | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/pom.xml b/pom.xml
index 30e40069..cd0f8418 100644
--- a/pom.xml
+++ b/pom.xml
@@ -81,7 +81,7 @@
     <version.javax.validation>2.0.1.Final</version.javax.validation>
     <version.jsonassert>1.5.3</version.jsonassert>
     <version.org.assertj>3.27.3</version.org.assertj>
-    <version.org.junit.jupiter>5.13.0</version.org.junit.jupiter>
+    <version.org.junit.jupiter>5.13.1</version.org.junit.jupiter>
     <version.org.mockito>5.18.0</version.org.mockito>
     <version.org.slf4j>2.0.17</version.org.slf4j>
     <version.plantuml>8059</version.plantuml>

From d6d5b772eea193ac46810e9ecf60289fd483ad02 Mon Sep 17 00:00:00 2001
From: Ricardo Zanini <1538000+ricardozanini@users.noreply.github.com>
Date: Mon, 9 Jun 2025 13:44:27 -0300
Subject: [PATCH 094/109] [4.x] - Upgrade to Java 17 (#601)

Signed-off-by: Ricardo Zanini <ricardozanini@gmail.com>
---
 .github/CODEOWNERS                 |  2 +-
 .github/OWNERS                     |  6 ++----
 .github/dependabot.yml             |  2 +-
 .github/workflows/maven-verify.yml |  4 ++--
 .github/workflows/release.yml      |  4 ++--
 README.md                          | 26 +++++++++++++-------------
 api/pom.xml                        |  7 ++++---
 pom.xml                            | 12 ++++++------
 8 files changed, 31 insertions(+), 32 deletions(-)

diff --git a/.github/CODEOWNERS b/.github/CODEOWNERS
index f23e469e..5ef5e9d5 100644
--- a/.github/CODEOWNERS
+++ b/.github/CODEOWNERS
@@ -1 +1 @@
-* @tsurdilo @manuelstein @ricardozanini
\ No newline at end of file
+* @ricardozanini @fjtirado
\ No newline at end of file
diff --git a/.github/OWNERS b/.github/OWNERS
index da3ddc3f..0db9cb96 100644
--- a/.github/OWNERS
+++ b/.github/OWNERS
@@ -1,10 +1,8 @@
 reviewers:
-  - tsurdilo
-  - manuelstein
   - ricardozanini
+  - fjtirado
 approvers:
-  - tsurdilo
-  - manuelstein
   - ricardozanini
+  - fjtirado
 labels:
   - sig/contributor-experience
\ No newline at end of file
diff --git a/.github/dependabot.yml b/.github/dependabot.yml
index 06541a8b..907b5f95 100644
--- a/.github/dependabot.yml
+++ b/.github/dependabot.yml
@@ -11,4 +11,4 @@ updates:
       interval: "weekly"
     assignees:
       - ricardozanini
-      - tsurdilo
+      - fjtirado
\ No newline at end of file
diff --git a/.github/workflows/maven-verify.yml b/.github/workflows/maven-verify.yml
index e5689513..e5ed35ac 100644
--- a/.github/workflows/maven-verify.yml
+++ b/.github/workflows/maven-verify.yml
@@ -16,11 +16,11 @@ jobs:
     steps:
       - uses: actions/checkout@v4
 
-      - name: Set up JDK 1.8
+      - name: Set up JDK 17
         uses: actions/setup-java@v4
         with:
           distribution: temurin
-          java-version: 8
+          java-version: 17
           cache: 'maven'
 
       - name: Verify with Maven
diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml
index 07361f95..2e4ec8ce 100644
--- a/.github/workflows/release.yml
+++ b/.github/workflows/release.yml
@@ -29,11 +29,11 @@ jobs:
           gpg_private_key: ${{ secrets.GPG_PRIVATE_KEY }}
           passphrase: ${{ secrets.GPG_PASSPHRASE }}
 
-      - name: Set up JDK 1.8
+      - name: Set up JDK 17
         uses: actions/setup-java@v4
         with:
           distribution: temurin
-          java-version: 8
+          java-version: 17
           cache: 'maven'
           server-id: ossrh
           server-username: MAVEN_USERNAME
diff --git a/README.md b/README.md
index c1b717d1..7aef4f23 100644
--- a/README.md
+++ b/README.md
@@ -18,9 +18,9 @@ to parse and validate workflow definitions as well as generate the workflow diag
 
 ### Status
 
-| Latest Releases | Conformance to spec version |
-| :---: | :---: |
-| [4.0.5.1.Final](https://github.com/serverlessworkflow/sdk-java/releases/) | [v0.8](https://github.com/serverlessworkflow/specification/tree/0.8.x) |
+|                             Latest Releases                             | Conformance to spec version |
+|:-----------------------------------------------------------------------:| :---: |
+| [4.1.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) |
@@ -64,31 +64,31 @@ b) Add the following dependencies to your pom.xml `dependencies` section:
 <dependency>
     <groupId>io.serverlessworkflow</groupId>
     <artifactId>serverlessworkflow-api</artifactId>
-    <version>4.0.4.Final</version>
+    <version>4.1.0.Final</version>
 </dependency>
 
 <dependency>
     <groupId>io.serverlessworkflow</groupId>
     <artifactId>serverlessworkflow-spi</artifactId>
-    <version>4.0.4.Final</version>
+    <version>4.1.0.Final</version>
 </dependency>
 
 <dependency>
     <groupId>io.serverlessworkflow</groupId>
     <artifactId>serverlessworkflow-validation</artifactId>
-    <version>4.0.4.Final</version>
+    <version>4.1.0.Final</version>
 </dependency>
 
 <dependency>
     <groupId>io.serverlessworkflow</groupId>
     <artifactId>serverlessworkflow-diagram</artifactId>
-    <version>4.0.4.Final</version>
+    <version>4.1.0.Final</version>
 </dependency>
 
 <dependency>
     <groupId>io.serverlessworkflow</groupId>
     <artifactId>serverlessworkflow-util</artifactId>
-    <version>4.0.4.Final</version>
+    <version>4.1.0.Final</version>
 </dependency>
 ```
 
@@ -103,11 +103,11 @@ 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:4.0.4.Final")
-implementation("io.serverlessworkflow:serverlessworkflow-spi:4.0.4.Final")
-implementation("io.serverlessworkflow:serverlessworkflow-validation:4.0.4.Final")
-implementation("io.serverlessworkflow:serverlessworkflow-diagram:4.0.4.Final")
-implementation("io.serverlessworkflow:serverlessworkflow-util:4.0.4.Final")
+implementation("io.serverlessworkflow:serverlessworkflow-api:4.1.0.Final")
+implementation("io.serverlessworkflow:serverlessworkflow-spi:4.1.0.Final")
+implementation("io.serverlessworkflow:serverlessworkflow-validation:4.1.0.Final")
+implementation("io.serverlessworkflow:serverlessworkflow-diagram:4.1.0.Final")
+implementation("io.serverlessworkflow:serverlessworkflow-util:4.1.0.Final")
 ```
 
 ### How to Use 
diff --git a/api/pom.xml b/api/pom.xml
index 4b91ffa5..ce06312d 100644
--- a/api/pom.xml
+++ b/api/pom.xml
@@ -34,8 +34,8 @@
             <artifactId>jackson-dataformat-yaml</artifactId>
         </dependency>
         <dependency>
-            <groupId>javax.validation</groupId>
-            <artifactId>validation-api</artifactId>
+            <groupId>jakarta.validation</groupId>
+            <artifactId>jakarta.validation-api</artifactId>
         </dependency>
         <!-- test -->
         <dependency>
@@ -83,12 +83,13 @@
                     <includeJsr303Annotations>true</includeJsr303Annotations>
                     <generateBuilders>true</generateBuilders>
                     <includeAdditionalProperties>false</includeAdditionalProperties>
+                    <useJakartaValidation>true</useJakartaValidation>
                     <includeToString>false</includeToString>
                     <includeHashcodeAndEquals>false</includeHashcodeAndEquals>
                     <includeConstructors>true</includeConstructors>
                     <constructorsRequiredPropertiesOnly>true</constructorsRequiredPropertiesOnly>
                     <serializable>true</serializable>
-                    <targetVersion>1.8</targetVersion>
+                    <targetVersion>${java.version}</targetVersion>
                     <usePrimitives>true</usePrimitives>
                 </configuration>
                 <executions>
diff --git a/pom.xml b/pom.xml
index cd0f8418..94c1362b 100644
--- a/pom.xml
+++ b/pom.xml
@@ -45,10 +45,10 @@
   </modules>
 
   <properties>
-    <java.version>1.8</java.version>
+    <java.version>17</java.version>
     <maven.compiler.source>${java.version}</maven.compiler.source>
     <maven.compiler.target>${java.version}</maven.compiler.target>
-    <maven.compiler.release>8</maven.compiler.release>
+    <maven.compiler.release>${java.version}</maven.compiler.release>
     <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
     <version.maven>3.9.7</version.maven>
 
@@ -78,7 +78,7 @@
     <version.commons.lang>3.17.0</version.commons.lang>
     <version.graphviz>0.18.1</version.graphviz>
     <version.hamcrest>3.0</version.hamcrest>
-    <version.javax.validation>2.0.1.Final</version.javax.validation>
+    <version.jakarta.validation>3.1.1</version.jakarta.validation>
     <version.jsonassert>1.5.3</version.jsonassert>
     <version.org.assertj>3.27.3</version.org.assertj>
     <version.org.junit.jupiter>5.13.1</version.org.junit.jupiter>
@@ -151,9 +151,9 @@
         <version>${version.com.fasterxml.jackson}</version>
       </dependency>
       <dependency>
-        <groupId>javax.validation</groupId>
-        <artifactId>validation-api</artifactId>
-        <version>${version.javax.validation}</version>
+        <groupId>jakarta.validation</groupId>
+        <artifactId>jakarta.validation-api</artifactId>
+        <version>${version.jakarta.validation}</version>
       </dependency>
       <dependency>
         <groupId>org.apache.commons</groupId>

From f5419d2c844169739b442bd47b4aec779b1366ef Mon Sep 17 00:00:00 2001
From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com>
Date: Wed, 11 Jun 2025 10:33:43 -0400
Subject: [PATCH 095/109] Bump ch.qos.logback:logback-classic from 1.2.11 to
 1.5.18 (#574)

Bumps [ch.qos.logback:logback-classic](https://github.com/qos-ch/logback) from 1.2.11 to 1.5.18.
- [Release notes](https://github.com/qos-ch/logback/releases)
- [Commits](https://github.com/qos-ch/logback/compare/v_1.2.11...v_1.5.18)

---
updated-dependencies:
- dependency-name: ch.qos.logback:logback-classic
  dependency-version: 1.5.18
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
---
 pom.xml | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/pom.xml b/pom.xml
index 94c1362b..9ef9170e 100644
--- a/pom.xml
+++ b/pom.xml
@@ -72,7 +72,7 @@
 
 
     <!-- Dependencies versions, please keep in alphabetical order -->
-    <version.ch.qos.logback>1.2.11</version.ch.qos.logback>
+    <version.ch.qos.logback>1.5.18</version.ch.qos.logback>
     <version.com.fasterxml.jackson>2.19.0</version.com.fasterxml.jackson>
     <version.com.networknt>1.5.7</version.com.networknt>
     <version.commons.lang>3.17.0</version.commons.lang>

From 16231a54e5b7c5a42030eba3601331dc6e6ba19c Mon Sep 17 00:00:00 2001
From: Ricardo Zanini <1538000+ricardozanini@users.noreply.github.com>
Date: Wed, 11 Jun 2025 10:34:38 -0400
Subject: [PATCH 096/109] Release 4.3.0.Final

---
 .github/project.yml | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/.github/project.yml b/.github/project.yml
index fda65043..016dfafa 100644
--- a/.github/project.yml
+++ b/.github/project.yml
@@ -1,3 +1,3 @@
 release:
-  current-version: 4.1.0.Final
-  next-version: 4.2.0-SNAPSHOT
+  current-version: 4.2.0.Final
+  next-version: 4.3.0-SNAPSHOT

From db9b7fd22bd3c238c455d595b17cc3678ebb98f3 Mon Sep 17 00:00:00 2001
From: GitHub Action <action@github.com>
Date: Wed, 11 Jun 2025 18:44:49 +0000
Subject: [PATCH 097/109] [maven-release-plugin] prepare release 4.2.0.Final

---
 api/pom.xml        | 2 +-
 diagram/pom.xml    | 2 +-
 pom.xml            | 4 ++--
 spi/pom.xml        | 2 +-
 utils/pom.xml      | 2 +-
 validation/pom.xml | 2 +-
 6 files changed, 7 insertions(+), 7 deletions(-)

diff --git a/api/pom.xml b/api/pom.xml
index ce06312d..7255f449 100644
--- a/api/pom.xml
+++ b/api/pom.xml
@@ -4,7 +4,7 @@
     <parent>
         <groupId>io.serverlessworkflow</groupId>
         <artifactId>serverlessworkflow-parent</artifactId>
-        <version>4.2.0-SNAPSHOT</version>
+        <version>4.2.0.Final</version>
     </parent>
 
     <artifactId>serverlessworkflow-api</artifactId>
diff --git a/diagram/pom.xml b/diagram/pom.xml
index abe8e4f2..bb041054 100644
--- a/diagram/pom.xml
+++ b/diagram/pom.xml
@@ -4,7 +4,7 @@
     <parent>
         <groupId>io.serverlessworkflow</groupId>
         <artifactId>serverlessworkflow-parent</artifactId>
-        <version>4.2.0-SNAPSHOT</version>
+        <version>4.2.0.Final</version>
     </parent>
 
     <artifactId>serverlessworkflow-diagram</artifactId>
diff --git a/pom.xml b/pom.xml
index 9ef9170e..49323a68 100644
--- a/pom.xml
+++ b/pom.xml
@@ -4,7 +4,7 @@
 
   <groupId>io.serverlessworkflow</groupId>
   <artifactId>serverlessworkflow-parent</artifactId>
-  <version>4.2.0-SNAPSHOT</version>
+  <version>4.2.0.Final</version>
   <packaging>pom</packaging>
 
   <name>Serverless Workflow :: Parent</name>
@@ -33,7 +33,7 @@
     <connection>scm:git:git@github.com:serverlessworkflow/sdk-java.git</connection>
     <developerConnection>scm:git:git@github.com:serverlessworkflow/sdk-java.git</developerConnection>
     <url>https://github.com/serverlessworkflow/sdk-java</url>
-    <tag>HEAD</tag>
+    <tag>4.2.0.Final</tag>
   </scm>
 
   <modules>
diff --git a/spi/pom.xml b/spi/pom.xml
index 27743594..7e6a8a3e 100644
--- a/spi/pom.xml
+++ b/spi/pom.xml
@@ -4,7 +4,7 @@
     <parent>
         <groupId>io.serverlessworkflow</groupId>
         <artifactId>serverlessworkflow-parent</artifactId>
-        <version>4.2.0-SNAPSHOT</version>
+        <version>4.2.0.Final</version>
     </parent>
 
     <artifactId>serverlessworkflow-spi</artifactId>
diff --git a/utils/pom.xml b/utils/pom.xml
index 46bc1e65..483f5173 100644
--- a/utils/pom.xml
+++ b/utils/pom.xml
@@ -4,7 +4,7 @@
     <parent>
         <groupId>io.serverlessworkflow</groupId>
         <artifactId>serverlessworkflow-parent</artifactId>
-        <version>4.2.0-SNAPSHOT</version>
+        <version>4.2.0.Final</version>
     </parent>
 
     <artifactId>serverlessworkflow-util</artifactId>
diff --git a/validation/pom.xml b/validation/pom.xml
index d5133ff2..7b1cae0c 100644
--- a/validation/pom.xml
+++ b/validation/pom.xml
@@ -4,7 +4,7 @@
     <parent>
         <groupId>io.serverlessworkflow</groupId>
         <artifactId>serverlessworkflow-parent</artifactId>
-        <version>4.2.0-SNAPSHOT</version>
+        <version>4.2.0.Final</version>
     </parent>
 
     <artifactId>serverlessworkflow-validation</artifactId>

From d50e1aae11b2e0400c263915e6dc8c9cf183c863 Mon Sep 17 00:00:00 2001
From: GitHub Action <action@github.com>
Date: Wed, 11 Jun 2025 18:44:50 +0000
Subject: [PATCH 098/109] [maven-release-plugin] prepare for next development
 iteration

---
 api/pom.xml        | 2 +-
 diagram/pom.xml    | 2 +-
 pom.xml            | 4 ++--
 spi/pom.xml        | 2 +-
 utils/pom.xml      | 2 +-
 validation/pom.xml | 2 +-
 6 files changed, 7 insertions(+), 7 deletions(-)

diff --git a/api/pom.xml b/api/pom.xml
index 7255f449..c2d52765 100644
--- a/api/pom.xml
+++ b/api/pom.xml
@@ -4,7 +4,7 @@
     <parent>
         <groupId>io.serverlessworkflow</groupId>
         <artifactId>serverlessworkflow-parent</artifactId>
-        <version>4.2.0.Final</version>
+        <version>4.3.0-SNAPSHOT</version>
     </parent>
 
     <artifactId>serverlessworkflow-api</artifactId>
diff --git a/diagram/pom.xml b/diagram/pom.xml
index bb041054..d68a56cb 100644
--- a/diagram/pom.xml
+++ b/diagram/pom.xml
@@ -4,7 +4,7 @@
     <parent>
         <groupId>io.serverlessworkflow</groupId>
         <artifactId>serverlessworkflow-parent</artifactId>
-        <version>4.2.0.Final</version>
+        <version>4.3.0-SNAPSHOT</version>
     </parent>
 
     <artifactId>serverlessworkflow-diagram</artifactId>
diff --git a/pom.xml b/pom.xml
index 49323a68..d1d9b444 100644
--- a/pom.xml
+++ b/pom.xml
@@ -4,7 +4,7 @@
 
   <groupId>io.serverlessworkflow</groupId>
   <artifactId>serverlessworkflow-parent</artifactId>
-  <version>4.2.0.Final</version>
+  <version>4.3.0-SNAPSHOT</version>
   <packaging>pom</packaging>
 
   <name>Serverless Workflow :: Parent</name>
@@ -33,7 +33,7 @@
     <connection>scm:git:git@github.com:serverlessworkflow/sdk-java.git</connection>
     <developerConnection>scm:git:git@github.com:serverlessworkflow/sdk-java.git</developerConnection>
     <url>https://github.com/serverlessworkflow/sdk-java</url>
-    <tag>4.2.0.Final</tag>
+    <tag>HEAD</tag>
   </scm>
 
   <modules>
diff --git a/spi/pom.xml b/spi/pom.xml
index 7e6a8a3e..1bb2c028 100644
--- a/spi/pom.xml
+++ b/spi/pom.xml
@@ -4,7 +4,7 @@
     <parent>
         <groupId>io.serverlessworkflow</groupId>
         <artifactId>serverlessworkflow-parent</artifactId>
-        <version>4.2.0.Final</version>
+        <version>4.3.0-SNAPSHOT</version>
     </parent>
 
     <artifactId>serverlessworkflow-spi</artifactId>
diff --git a/utils/pom.xml b/utils/pom.xml
index 483f5173..23a23711 100644
--- a/utils/pom.xml
+++ b/utils/pom.xml
@@ -4,7 +4,7 @@
     <parent>
         <groupId>io.serverlessworkflow</groupId>
         <artifactId>serverlessworkflow-parent</artifactId>
-        <version>4.2.0.Final</version>
+        <version>4.3.0-SNAPSHOT</version>
     </parent>
 
     <artifactId>serverlessworkflow-util</artifactId>
diff --git a/validation/pom.xml b/validation/pom.xml
index 7b1cae0c..63c7901f 100644
--- a/validation/pom.xml
+++ b/validation/pom.xml
@@ -4,7 +4,7 @@
     <parent>
         <groupId>io.serverlessworkflow</groupId>
         <artifactId>serverlessworkflow-parent</artifactId>
-        <version>4.2.0.Final</version>
+        <version>4.3.0-SNAPSHOT</version>
     </parent>
 
     <artifactId>serverlessworkflow-validation</artifactId>

From df68b8c2088c9bc507faa728bae964f0e45fbe1c Mon Sep 17 00:00:00 2001
From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com>
Date: Mon, 16 Jun 2025 13:09:09 -0400
Subject: [PATCH 099/109] Bump version.com.fasterxml.jackson from 2.19.0 to
 2.19.1 (#614)

Bumps `version.com.fasterxml.jackson` from 2.19.0 to 2.19.1.

Updates `com.fasterxml.jackson.core:jackson-core` from 2.19.0 to 2.19.1
- [Commits](https://github.com/FasterXML/jackson-core/compare/jackson-core-2.19.0...jackson-core-2.19.1)

Updates `com.fasterxml.jackson.core:jackson-databind` from 2.19.0 to 2.19.1
- [Commits](https://github.com/FasterXML/jackson/commits)

Updates `com.fasterxml.jackson.dataformat:jackson-dataformat-yaml` from 2.19.0 to 2.19.1
- [Commits](https://github.com/FasterXML/jackson-dataformats-text/compare/jackson-dataformats-text-2.19.0...jackson-dataformats-text-2.19.1)

---
updated-dependencies:
- dependency-name: com.fasterxml.jackson.core:jackson-core
  dependency-version: 2.19.1
  dependency-type: direct:production
  update-type: version-update:semver-patch
- dependency-name: com.fasterxml.jackson.core:jackson-databind
  dependency-version: 2.19.1
  dependency-type: direct:production
  update-type: version-update:semver-patch
- dependency-name: com.fasterxml.jackson.dataformat:jackson-dataformat-yaml
  dependency-version: 2.19.1
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
---
 pom.xml | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/pom.xml b/pom.xml
index d1d9b444..b6417d64 100644
--- a/pom.xml
+++ b/pom.xml
@@ -73,7 +73,7 @@
 
     <!-- Dependencies versions, please keep in alphabetical order -->
     <version.ch.qos.logback>1.5.18</version.ch.qos.logback>
-    <version.com.fasterxml.jackson>2.19.0</version.com.fasterxml.jackson>
+    <version.com.fasterxml.jackson>2.19.1</version.com.fasterxml.jackson>
     <version.com.networknt>1.5.7</version.com.networknt>
     <version.commons.lang>3.17.0</version.commons.lang>
     <version.graphviz>0.18.1</version.graphviz>

From 7c5e51d1d0953e5f767b48771a07d7ca0a3a4774 Mon Sep 17 00:00:00 2001
From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com>
Date: Mon, 30 Jun 2025 12:10:24 -0400
Subject: [PATCH 100/109] Bump com.networknt:json-schema-validator from 1.5.7
 to 1.5.8 (#618)

---
updated-dependencies:
- dependency-name: com.networknt:json-schema-validator
  dependency-version: 1.5.8
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
---
 pom.xml | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/pom.xml b/pom.xml
index b6417d64..f88e2935 100644
--- a/pom.xml
+++ b/pom.xml
@@ -74,7 +74,7 @@
     <!-- Dependencies versions, please keep in alphabetical order -->
     <version.ch.qos.logback>1.5.18</version.ch.qos.logback>
     <version.com.fasterxml.jackson>2.19.1</version.com.fasterxml.jackson>
-    <version.com.networknt>1.5.7</version.com.networknt>
+    <version.com.networknt>1.5.8</version.com.networknt>
     <version.commons.lang>3.17.0</version.commons.lang>
     <version.graphviz>0.18.1</version.graphviz>
     <version.hamcrest>3.0</version.hamcrest>

From 3990a14eeefbde845fb1f6c4d8c8885ee9d6ef60 Mon Sep 17 00:00:00 2001
From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com>
Date: Mon, 30 Jun 2025 16:13:36 +0000
Subject: [PATCH 101/109] Bump version.org.junit.jupiter from 5.13.1 to 5.13.2

---
updated-dependencies:
- dependency-name: org.junit.jupiter:junit-jupiter-api
  dependency-version: 5.13.2
  dependency-type: direct:production
  update-type: version-update:semver-patch
- dependency-name: org.junit.jupiter:junit-jupiter-engine
  dependency-version: 5.13.2
  dependency-type: direct:production
  update-type: version-update:semver-patch
- dependency-name: org.junit.jupiter:junit-jupiter-params
  dependency-version: 5.13.2
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
---
 pom.xml | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/pom.xml b/pom.xml
index b6417d64..d2312b6e 100644
--- a/pom.xml
+++ b/pom.xml
@@ -81,7 +81,7 @@
     <version.jakarta.validation>3.1.1</version.jakarta.validation>
     <version.jsonassert>1.5.3</version.jsonassert>
     <version.org.assertj>3.27.3</version.org.assertj>
-    <version.org.junit.jupiter>5.13.1</version.org.junit.jupiter>
+    <version.org.junit.jupiter>5.13.2</version.org.junit.jupiter>
     <version.org.mockito>5.18.0</version.org.mockito>
     <version.org.slf4j>2.0.17</version.org.slf4j>
     <version.plantuml>8059</version.plantuml>

From da0ba003240992ab35d1f6e97cf6cbec7f7a09af Mon Sep 17 00:00:00 2001
From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com>
Date: Mon, 7 Jul 2025 15:26:39 +0000
Subject: [PATCH 102/109] Bump org.apache.maven.plugins:maven-enforcer-plugin
 from 3.5.0 to 3.6.0

Bumps [org.apache.maven.plugins:maven-enforcer-plugin](https://github.com/apache/maven-enforcer) from 3.5.0 to 3.6.0.
- [Release notes](https://github.com/apache/maven-enforcer/releases)
- [Commits](https://github.com/apache/maven-enforcer/compare/enforcer-3.5.0...enforcer-3.6.0)

---
updated-dependencies:
- dependency-name: org.apache.maven.plugins:maven-enforcer-plugin
  dependency-version: 3.6.0
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
---
 pom.xml | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/pom.xml b/pom.xml
index 90d162d4..b3732201 100644
--- a/pom.xml
+++ b/pom.xml
@@ -57,7 +57,7 @@
     <version.checkstyle.plugin>3.6.0</version.checkstyle.plugin>
     <version.compiler.plugin>3.14.0</version.compiler.plugin>
     <version.deploy.plugin>3.1.4</version.deploy.plugin>
-    <version.enforcer.plugin>3.5.0</version.enforcer.plugin>
+    <version.enforcer.plugin>3.6.0</version.enforcer.plugin>
     <version.failsafe.plugin>3.5.3</version.failsafe.plugin>
     <version.fmt-maven-plugin>2.25</version.fmt-maven-plugin>
     <version.gpg.plugin>3.2.7</version.gpg.plugin>

From a0a5d8a578c53b7a57f554d9d96f0ef14f429d20 Mon Sep 17 00:00:00 2001
From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com>
Date: Mon, 7 Jul 2025 15:46:22 +0000
Subject: [PATCH 103/109] Bump org.apache.maven.plugins:maven-gpg-plugin from
 3.2.7 to 3.2.8

Bumps [org.apache.maven.plugins:maven-gpg-plugin](https://github.com/apache/maven-gpg-plugin) from 3.2.7 to 3.2.8.
- [Release notes](https://github.com/apache/maven-gpg-plugin/releases)
- [Commits](https://github.com/apache/maven-gpg-plugin/compare/maven-gpg-plugin-3.2.7...maven-gpg-plugin-3.2.8)

---
updated-dependencies:
- dependency-name: org.apache.maven.plugins:maven-gpg-plugin
  dependency-version: 3.2.8
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
---
 pom.xml | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/pom.xml b/pom.xml
index 90d162d4..d958b07f 100644
--- a/pom.xml
+++ b/pom.xml
@@ -60,7 +60,7 @@
     <version.enforcer.plugin>3.5.0</version.enforcer.plugin>
     <version.failsafe.plugin>3.5.3</version.failsafe.plugin>
     <version.fmt-maven-plugin>2.25</version.fmt-maven-plugin>
-    <version.gpg.plugin>3.2.7</version.gpg.plugin>
+    <version.gpg.plugin>3.2.8</version.gpg.plugin>
     <version.jar.plugin>3.4.2</version.jar.plugin>
     <version.jdk>${java.version}</version.jdk>
     <version.jsonschema2pojo-maven-plugin>1.2.2</version.jsonschema2pojo-maven-plugin>

From 30f58733ee8cd2f00462eb8ddcb0f2a6d9732289 Mon Sep 17 00:00:00 2001
From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com>
Date: Mon, 7 Jul 2025 16:00:09 +0000
Subject: [PATCH 104/109] Bump version.org.junit.jupiter from 5.13.2 to 5.13.3

Bumps `version.org.junit.jupiter` from 5.13.2 to 5.13.3.

Updates `org.junit.jupiter:junit-jupiter-api` from 5.13.2 to 5.13.3
- [Release notes](https://github.com/junit-team/junit-framework/releases)
- [Commits](https://github.com/junit-team/junit-framework/compare/r5.13.2...r5.13.3)

Updates `org.junit.jupiter:junit-jupiter-engine` from 5.13.2 to 5.13.3
- [Release notes](https://github.com/junit-team/junit-framework/releases)
- [Commits](https://github.com/junit-team/junit-framework/compare/r5.13.2...r5.13.3)

Updates `org.junit.jupiter:junit-jupiter-params` from 5.13.2 to 5.13.3
- [Release notes](https://github.com/junit-team/junit-framework/releases)
- [Commits](https://github.com/junit-team/junit-framework/compare/r5.13.2...r5.13.3)

---
updated-dependencies:
- dependency-name: org.junit.jupiter:junit-jupiter-api
  dependency-version: 5.13.3
  dependency-type: direct:production
  update-type: version-update:semver-patch
- dependency-name: org.junit.jupiter:junit-jupiter-engine
  dependency-version: 5.13.3
  dependency-type: direct:production
  update-type: version-update:semver-patch
- dependency-name: org.junit.jupiter:junit-jupiter-params
  dependency-version: 5.13.3
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
---
 pom.xml | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/pom.xml b/pom.xml
index 90d162d4..47a9a405 100644
--- a/pom.xml
+++ b/pom.xml
@@ -81,7 +81,7 @@
     <version.jakarta.validation>3.1.1</version.jakarta.validation>
     <version.jsonassert>1.5.3</version.jsonassert>
     <version.org.assertj>3.27.3</version.org.assertj>
-    <version.org.junit.jupiter>5.13.2</version.org.junit.jupiter>
+    <version.org.junit.jupiter>5.13.3</version.org.junit.jupiter>
     <version.org.mockito>5.18.0</version.org.mockito>
     <version.org.slf4j>2.0.17</version.org.slf4j>
     <version.plantuml>8059</version.plantuml>

From 22aa2b0b970e23497951d0b78d200be322ac1348 Mon Sep 17 00:00:00 2001
From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com>
Date: Tue, 15 Jul 2025 15:06:23 -0400
Subject: [PATCH 105/109] Bump org.apache.commons:commons-lang3 from 3.17.0 to
 3.18.0 (#641)

Bumps org.apache.commons:commons-lang3 from 3.17.0 to 3.18.0.

---
updated-dependencies:
- dependency-name: org.apache.commons:commons-lang3
  dependency-version: 3.18.0
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
---
 pom.xml | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/pom.xml b/pom.xml
index 45990640..f7f50acf 100644
--- a/pom.xml
+++ b/pom.xml
@@ -75,7 +75,7 @@
     <version.ch.qos.logback>1.5.18</version.ch.qos.logback>
     <version.com.fasterxml.jackson>2.19.1</version.com.fasterxml.jackson>
     <version.com.networknt>1.5.8</version.com.networknt>
-    <version.commons.lang>3.17.0</version.commons.lang>
+    <version.commons.lang>3.18.0</version.commons.lang>
     <version.graphviz>0.18.1</version.graphviz>
     <version.hamcrest>3.0</version.hamcrest>
     <version.jakarta.validation>3.1.1</version.jakarta.validation>

From 45a4a34a9dec4192ffcf522d1ce5011457dffe32 Mon Sep 17 00:00:00 2001
From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com>
Date: Mon, 21 Jul 2025 15:17:18 -0400
Subject: [PATCH 106/109] Bump version.com.fasterxml.jackson from 2.19.1 to
 2.19.2 (#659)

---
updated-dependencies:
- dependency-name: com.fasterxml.jackson.core:jackson-core
  dependency-version: 2.19.2
  dependency-type: direct:production
  update-type: version-update:semver-patch
- dependency-name: com.fasterxml.jackson.core:jackson-databind
  dependency-version: 2.19.2
  dependency-type: direct:production
  update-type: version-update:semver-patch
- dependency-name: com.fasterxml.jackson.dataformat:jackson-dataformat-yaml
  dependency-version: 2.19.2
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
---
 pom.xml | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/pom.xml b/pom.xml
index f7f50acf..57b0b55b 100644
--- a/pom.xml
+++ b/pom.xml
@@ -73,7 +73,7 @@
 
     <!-- Dependencies versions, please keep in alphabetical order -->
     <version.ch.qos.logback>1.5.18</version.ch.qos.logback>
-    <version.com.fasterxml.jackson>2.19.1</version.com.fasterxml.jackson>
+    <version.com.fasterxml.jackson>2.19.2</version.com.fasterxml.jackson>
     <version.com.networknt>1.5.8</version.com.networknt>
     <version.commons.lang>3.18.0</version.commons.lang>
     <version.graphviz>0.18.1</version.graphviz>

From 9b85864711feb697f4b000f7dd5ebad6bcfede7b Mon Sep 17 00:00:00 2001
From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com>
Date: Mon, 21 Jul 2025 15:17:27 -0400
Subject: [PATCH 107/109] Bump org.apache.maven.plugins:maven-enforcer-plugin
 from 3.6.0 to 3.6.1 (#658)

---
updated-dependencies:
- dependency-name: org.apache.maven.plugins:maven-enforcer-plugin
  dependency-version: 3.6.1
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
---
 pom.xml | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/pom.xml b/pom.xml
index 57b0b55b..eba640ed 100644
--- a/pom.xml
+++ b/pom.xml
@@ -57,7 +57,7 @@
     <version.checkstyle.plugin>3.6.0</version.checkstyle.plugin>
     <version.compiler.plugin>3.14.0</version.compiler.plugin>
     <version.deploy.plugin>3.1.4</version.deploy.plugin>
-    <version.enforcer.plugin>3.6.0</version.enforcer.plugin>
+    <version.enforcer.plugin>3.6.1</version.enforcer.plugin>
     <version.failsafe.plugin>3.5.3</version.failsafe.plugin>
     <version.fmt-maven-plugin>2.25</version.fmt-maven-plugin>
     <version.gpg.plugin>3.2.8</version.gpg.plugin>

From 0643ac794f72a3c97092c639d5e396d81a2d6d51 Mon Sep 17 00:00:00 2001
From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com>
Date: Mon, 21 Jul 2025 15:17:34 -0400
Subject: [PATCH 108/109] Bump version.org.junit.jupiter from 5.13.3 to 5.13.4
 (#657)

---
updated-dependencies:
- dependency-name: org.junit.jupiter:junit-jupiter-api
  dependency-version: 5.13.4
  dependency-type: direct:production
  update-type: version-update:semver-patch
- dependency-name: org.junit.jupiter:junit-jupiter-engine
  dependency-version: 5.13.4
  dependency-type: direct:production
  update-type: version-update:semver-patch
- dependency-name: org.junit.jupiter:junit-jupiter-params
  dependency-version: 5.13.4
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
---
 pom.xml | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/pom.xml b/pom.xml
index eba640ed..abe203f0 100644
--- a/pom.xml
+++ b/pom.xml
@@ -81,7 +81,7 @@
     <version.jakarta.validation>3.1.1</version.jakarta.validation>
     <version.jsonassert>1.5.3</version.jsonassert>
     <version.org.assertj>3.27.3</version.org.assertj>
-    <version.org.junit.jupiter>5.13.3</version.org.junit.jupiter>
+    <version.org.junit.jupiter>5.13.4</version.org.junit.jupiter>
     <version.org.mockito>5.18.0</version.org.mockito>
     <version.org.slf4j>2.0.17</version.org.slf4j>
     <version.plantuml>8059</version.plantuml>

From c09b649d60a176b049a746a72c1c1d468f106029 Mon Sep 17 00:00:00 2001
From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com>
Date: Mon, 11 Aug 2025 19:50:15 +0000
Subject: [PATCH 109/109] Bump org.assertj:assertj-core from 3.27.3 to 3.27.4

Bumps [org.assertj:assertj-core](https://github.com/assertj/assertj) from 3.27.3 to 3.27.4.
- [Release notes](https://github.com/assertj/assertj/releases)
- [Commits](https://github.com/assertj/assertj/compare/assertj-build-3.27.3...assertj-build-3.27.4)

---
updated-dependencies:
- dependency-name: org.assertj:assertj-core
  dependency-version: 3.27.4
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
---
 pom.xml | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/pom.xml b/pom.xml
index abe203f0..f87d5930 100644
--- a/pom.xml
+++ b/pom.xml
@@ -80,7 +80,7 @@
     <version.hamcrest>3.0</version.hamcrest>
     <version.jakarta.validation>3.1.1</version.jakarta.validation>
     <version.jsonassert>1.5.3</version.jsonassert>
-    <version.org.assertj>3.27.3</version.org.assertj>
+    <version.org.assertj>3.27.4</version.org.assertj>
     <version.org.junit.jupiter>5.13.4</version.org.junit.jupiter>
     <version.org.mockito>5.18.0</version.org.mockito>
     <version.org.slf4j>2.0.17</version.org.slf4j>
