Skip to content

Commit eb92e70

Browse files
authored
Improving modularization (#872)
Signed-off-by: fjtirado <[email protected]>
1 parent 3f6a59d commit eb92e70

File tree

26 files changed

+185
-55
lines changed

26 files changed

+185
-55
lines changed

impl/README.md

Lines changed: 15 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -70,17 +70,26 @@ This reference implementation can run workflows consisting of:
7070

7171
This SDK is modular by design—pull in only what you need:
7272

73-
* **`serverlessworkflow-impl-core`**
73+
* **serverlessworkflow-impl-core**
7474
Workflow engine & core interfaces. Depends on generated types and CloudEvents SDK.
7575

76-
* **`serverlessworkflow-impl-jackson`**
77-
Adds Jackson integration, JQ expressions, JSON Schema validation, and CloudEvents (de)serialization.
76+
* **serverlessworkflow-impl-jackson**
7877
👉 **Most users add this one.**
79-
80-
* **`serverlessworkflow-impl-http`**
78+
79+
Adds Jackson integration, JQ expressions, JSON Schema validation, and CloudEvents (de)serialization.
80+
81+
Internally, this module is an aggregation of smaller modules to allow part replacement if needed:
82+
* **serverlessworkflow-impl-jq** JQ expression implementation
83+
* **serverlessworkflow-impl-model** Jackson model implementation
84+
* **serverlessworkflow-impl-validation** Schema validation implementation
85+
* **serverlessworkflow-impl-lifecycle-events** Enable publication of lifecycle events as Json cloud events.
86+
* **serverlessworkflow-impl-json** Json common utilities shared by all modules in this list
87+
88+
89+
* **serverlessworkflow-impl-http**
8190
HTTP `Call` task handler.
8291

83-
* **`serverlessworkflow-impl-jackson-jwt`**
92+
* **serverlessworkflow-impl-jackson-jwt**
8493
OAuth2/OIDC helpers for HTTP calls.
8594

8695
There are also companion modules/docs for:

impl/jackson/pom.xml

Lines changed: 21 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -6,23 +6,28 @@
66
<version>8.0.0-SNAPSHOT</version>
77
</parent>
88
<artifactId>serverlessworkflow-impl-jackson</artifactId>
9+
<packaging>pom</packaging>
910
<name> Serverless Workflow :: Impl :: Jackson </name>
1011
<dependencies>
11-
<dependency>
12-
<groupId>io.serverlessworkflow</groupId>
13-
<artifactId>serverlessworkflow-impl-core</artifactId>
14-
</dependency>
15-
<dependency>
16-
<groupId>io.serverlessworkflow</groupId>
17-
<artifactId>serverlessworkflow-api</artifactId>
18-
</dependency>
19-
<dependency>
20-
<groupId>io.cloudevents</groupId>
21-
<artifactId>cloudevents-json-jackson</artifactId>
22-
</dependency>
23-
<dependency>
24-
<groupId>com.networknt</groupId>
25-
<artifactId>json-schema-validator</artifactId>
26-
</dependency>
12+
<dependency>
13+
<groupId>io.serverlessworkflow</groupId>
14+
<artifactId>serverlessworkflow-impl-core</artifactId>
15+
</dependency>
16+
<dependency>
17+
<groupId>io.serverlessworkflow</groupId>
18+
<artifactId>serverlessworkflow-impl-jq</artifactId>
19+
</dependency>
20+
<dependency>
21+
<groupId>io.serverlessworkflow</groupId>
22+
<artifactId>serverlessworkflow-impl-model</artifactId>
23+
</dependency>
24+
<dependency>
25+
<groupId>io.serverlessworkflow</groupId>
26+
<artifactId>serverlessworkflow-impl-validation</artifactId>
27+
</dependency>
28+
<dependency>
29+
<groupId>io.serverlessworkflow</groupId>
30+
<artifactId>serverlessworkflow-impl-lifecycle-events</artifactId>
31+
</dependency>
2732
</dependencies>
2833
</project>

impl/jq/pom.xml

Lines changed: 25 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -8,25 +8,30 @@
88
<artifactId>serverlessworkflow-impl-jq</artifactId>
99
<name> Serverless Workflow :: Impl :: JQ </name>
1010
<dependencies>
11-
<dependency>
12-
<groupId>net.thisptr</groupId>
13-
<artifactId>jackson-jq</artifactId>
14-
</dependency>
15-
<dependency>
16-
<groupId>io.serverlessworkflow</groupId>
17-
<artifactId>serverlessworkflow-impl-jackson</artifactId>
18-
</dependency>
19-
<dependency>
20-
<groupId>org.junit.jupiter</groupId>
21-
<artifactId>junit-jupiter-engine</artifactId>
22-
</dependency>
23-
<dependency>
24-
<groupId>org.assertj</groupId>
25-
<artifactId>assertj-core</artifactId>
26-
</dependency>
27-
<dependency>
28-
<groupId>org.mockito</groupId>
29-
<artifactId>mockito-core</artifactId>
30-
</dependency>
11+
<dependency>
12+
<groupId>net.thisptr</groupId>
13+
<artifactId>jackson-jq</artifactId>
14+
</dependency>
15+
<dependency>
16+
<groupId>io.serverlessworkflow</groupId>
17+
<artifactId>serverlessworkflow-impl-json</artifactId>
18+
</dependency>
19+
<dependency>
20+
<groupId>org.junit.jupiter</groupId>
21+
<artifactId>junit-jupiter-engine</artifactId>
22+
</dependency>
23+
<dependency>
24+
<groupId>org.assertj</groupId>
25+
<artifactId>assertj-core</artifactId>
26+
</dependency>
27+
<dependency>
28+
<groupId>org.mockito</groupId>
29+
<artifactId>mockito-core</artifactId>
30+
</dependency>
31+
<dependency>
32+
<groupId>io.serverlessworkflow</groupId>
33+
<artifactId>serverlessworkflow-impl-model</artifactId>
34+
<scope>test</scope>
35+
</dependency>
3136
</dependencies>
3237
</project>

impl/json-utils/pom.xml

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
<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 https://maven.apache.org/xsd/maven-4.0.0.xsd">
2+
<modelVersion>4.0.0</modelVersion>
3+
<parent>
4+
<groupId>io.serverlessworkflow</groupId>
5+
<artifactId>serverlessworkflow-impl</artifactId>
6+
<version>8.0.0-SNAPSHOT</version>
7+
</parent>
8+
<artifactId>serverlessworkflow-impl-json</artifactId>
9+
<name> Serverless Workflow :: Impl :: Json utils </name>
10+
<dependencies>
11+
<dependency>
12+
<groupId>com.fasterxml.jackson.core</groupId>
13+
<artifactId>jackson-databind</artifactId>
14+
</dependency>
15+
<dependency>
16+
<groupId>io.serverlessworkflow</groupId>
17+
<artifactId>serverlessworkflow-impl-core</artifactId>
18+
</dependency>
19+
<dependency>
20+
<groupId>io.cloudevents</groupId>
21+
<artifactId>cloudevents-json-jackson</artifactId>
22+
</dependency>
23+
</dependencies>
24+
</project>
Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -13,15 +13,14 @@
1313
* See the License for the specific language governing permissions and
1414
* limitations under the License.
1515
*/
16-
package io.serverlessworkflow.impl.jackson.events;
16+
package io.serverlessworkflow.impl.jackson;
1717

1818
import com.fasterxml.jackson.databind.JsonNode;
1919
import com.fasterxml.jackson.databind.node.NullNode;
2020
import com.fasterxml.jackson.databind.node.ObjectNode;
2121
import io.cloudevents.CloudEvent;
2222
import io.cloudevents.CloudEventData;
2323
import io.cloudevents.jackson.JsonCloudEventData;
24-
import io.serverlessworkflow.impl.jackson.JsonUtils;
2524
import java.io.IOException;
2625
import java.io.UncheckedIOException;
2726
import java.time.OffsetDateTime;

impl/lifecycleevent/pom.xml

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
<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 https://maven.apache.org/xsd/maven-4.0.0.xsd">
2+
<modelVersion>4.0.0</modelVersion>
3+
<parent>
4+
<groupId>io.serverlessworkflow</groupId>
5+
<artifactId>serverlessworkflow-impl</artifactId>
6+
<version>8.0.0-SNAPSHOT</version>
7+
</parent>
8+
<artifactId>serverlessworkflow-impl-lifecycle-events</artifactId>
9+
<name> Serverless Workflow :: Impl :: Jackson:: Lifecycle Events </name>
10+
<dependencies>
11+
<dependency>
12+
<groupId>io.serverlessworkflow</groupId>
13+
<artifactId>serverlessworkflow-impl-json</artifactId>
14+
</dependency>
15+
<dependency>
16+
<groupId>io.serverlessworkflow</groupId>
17+
<artifactId>serverlessworkflow-impl-core</artifactId>
18+
</dependency>
19+
</dependencies>
20+
</project>

0 commit comments

Comments
 (0)