Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
2 changes: 1 addition & 1 deletion .github/ISSUE_TEMPLATE/bug-report.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
---
name: Bug Report
about: Report a bug encountered with the Serverless Workflow Java SDK
about: Report a bug encountered with the Open Workflow Java SDK
labels: kind/bug

---
Expand Down
2 changes: 1 addition & 1 deletion .github/ISSUE_TEMPLATE/enhancement.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
---
name: Enhancement Request
about: Suggest an enhancement to the Serverless Workflow Java SDK
about: Suggest an enhancement to the Open Workflow Java SDK
labels: kind/feature

---
Expand Down
2 changes: 1 addition & 1 deletion .github/ISSUE_TEMPLATE/question.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
---
name: Question
about: Ask a question about the Serverless Workflow Java SDK
about: Ask a question about the Open Workflow Java SDK
Comment thread
fjtirado marked this conversation as resolved.
labels: kind/question

---
Expand Down
12 changes: 6 additions & 6 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -54,8 +54,8 @@ Add the following dependencies to your pom.xml `dependencies` section:

```xml
<dependency>
<groupId>io.serverlessworkflow</groupId>
<artifactId>serverlessworkflow-api</artifactId>
<groupId>org.openworkflow.sdk</groupId>
<artifactId>openworkflow-api</artifactId>
<version>RELEASE_VERSION</version>
</dependency>
```
Expand All @@ -65,7 +65,7 @@ Add the following dependencies to your pom.xml `dependencies` section:
Add the following dependencies to your build.gradle `dependencies` section:

```text
implementation("io.serverlessworkflow:serverlessworkflow-api:RELEASE_VERSION")
implementation("org.openworkflow.sdk:openworkflow-api:RELEASE_VERSION")
```

## How to Use
Expand All @@ -77,7 +77,7 @@ There are, roughly speaking, two kind of users of this SDK:
### Implementing your own runtime

For those ones interested on implementing their own runtime, this SDK provides an easy way to load an in memory representation of a given workflow definition.
This in-memory representation consists of a hierarchy of POJOS directly generated from the Open Workflow specification [schema](api/src/main/resources/schema/workflow.yaml), which ensures the internal representation is aligned with the specification schema. The root of the hierarchy is `io.serverlessworkflow.api.types.Workflow` class
This in-memory representation consists of a hierarchy of POJOS directly generated from the Open Workflow specification [schema](api/src/main/resources/schema/workflow.yaml), which ensures the internal representation is aligned with the specification schema. The root of the hierarchy is `org.openworkflow.sdk.api.types.Workflow` class

### Reading workflow definition from JSON/YAML source

Expand Down Expand Up @@ -121,7 +121,7 @@ try (InputStream in = new FileInputStream("simple.yaml")) {
}
```

For additional reading helper methods, including the one to read a workflow definition from classpath, check [WorkflowReader](api/src/main/java/io/serverlessworkflow/api/WorkflowReader.java) class.
For additional reading helper methods, including the one to read a workflow definition from classpath, check [WorkflowReader](api/src/main/java/org/openworkflow/sdk/api/WorkflowReader.java) class.

### Writing workflow definition to a JSON/YAML target

Expand All @@ -134,7 +134,7 @@ try (OutputStream out = new FileOutputStream("simple.json")) {
}

```
For additional writing helper methods, check [WorkflowWriter](api/src/main/java/io/serverlessworkflow/api/WorkflowWriter.java) class.
For additional writing helper methods, check [WorkflowWriter](api/src/main/java/org/openworkflow/sdk/api/WorkflowWriter.java) class.

### Reference implementation

Expand Down
8 changes: 4 additions & 4 deletions annotations/pom.xml
Original file line number Diff line number Diff line change
@@ -1,10 +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 https://maven.apache.org/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion>
<parent>
<groupId>io.serverlessworkflow</groupId>
<artifactId>serverlessworkflow-parent</artifactId>
<groupId>org.openworkflow.sdk</groupId>
<artifactId>openworkflow-parent</artifactId>
<version>8.0.0-SNAPSHOT</version>
</parent>
<name>Serverless Workflow :: Annotations</name>
<artifactId>serverlessworkflow-annotations</artifactId>
<name>Open Workflow :: Annotations</name>
<artifactId>openworkflow-annotations</artifactId>
Comment thread
Copilot marked this conversation as resolved.
</project>
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* Copyright 2020-Present The Serverless Workflow Specification Authors
* Copyright 2020-Present The Open 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.
Expand All @@ -13,7 +13,7 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package io.serverlessworkflow.annotations;
package org.openworkflow.sdk.annotations;

import static java.lang.annotation.ElementType.TYPE;
import static java.lang.annotation.RetentionPolicy.RUNTIME;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* Copyright 2020-Present The Serverless Workflow Specification Authors
* Copyright 2020-Present The Open 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.
Expand All @@ -13,7 +13,7 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package io.serverlessworkflow.annotations;
package org.openworkflow.sdk.annotations;

import static java.lang.annotation.RetentionPolicy.RUNTIME;

Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* Copyright 2020-Present The Serverless Workflow Specification Authors
* Copyright 2020-Present The Open 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.
Expand All @@ -13,7 +13,7 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package io.serverlessworkflow.annotations;
package org.openworkflow.sdk.annotations;

import static java.lang.annotation.RetentionPolicy.RUNTIME;

Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* Copyright 2020-Present The Serverless Workflow Specification Authors
* Copyright 2020-Present The Open 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.
Expand All @@ -13,7 +13,7 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package io.serverlessworkflow.annotations;
package org.openworkflow.sdk.annotations;

import static java.lang.annotation.ElementType.TYPE;
import static java.lang.annotation.RetentionPolicy.RUNTIME;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* Copyright 2020-Present The Serverless Workflow Specification Authors
* Copyright 2020-Present The Open 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.
Expand All @@ -13,7 +13,7 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package io.serverlessworkflow.annotations;
package org.openworkflow.sdk.annotations;

import static java.lang.annotation.ElementType.METHOD;
import static java.lang.annotation.RetentionPolicy.RUNTIME;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* Copyright 2020-Present The Serverless Workflow Specification Authors
* Copyright 2020-Present The Open 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.
Expand All @@ -13,7 +13,7 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package io.serverlessworkflow.annotations;
package org.openworkflow.sdk.annotations;

import static java.lang.annotation.ElementType.METHOD;
import static java.lang.annotation.RetentionPolicy.RUNTIME;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* Copyright 2020-Present The Serverless Workflow Specification Authors
* Copyright 2020-Present The Open 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.
Expand All @@ -13,7 +13,7 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package io.serverlessworkflow.annotations;
package org.openworkflow.sdk.annotations;

import static java.lang.annotation.ElementType.METHOD;
import static java.lang.annotation.RetentionPolicy.RUNTIME;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* Copyright 2020-Present The Serverless Workflow Specification Authors
* Copyright 2020-Present The Open 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.
Expand All @@ -13,7 +13,7 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package io.serverlessworkflow.annotations;
package org.openworkflow.sdk.annotations;

public interface OneOfValueProvider<T> {
T get();
Expand Down
26 changes: 13 additions & 13 deletions api/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -2,27 +2,27 @@
<modelVersion>4.0.0</modelVersion>

<parent>
<groupId>io.serverlessworkflow</groupId>
<artifactId>serverlessworkflow-parent</artifactId>
<groupId>org.openworkflow.sdk</groupId>
<artifactId>openworkflow-parent</artifactId>
<version>8.0.0-SNAPSHOT</version>
</parent>

<artifactId>serverlessworkflow-api</artifactId>
<name>Serverless Workflow :: API</name>
<artifactId>openworkflow-api</artifactId>
<name>Open Workflow :: API</name>
<packaging>jar</packaging>
<description>Java SDK for Serverless Workflow Specification</description>
<description>Java SDK for Open Workflow Specification</description>
<properties>
<version.build-helper-maven-plugin>3.6.2</version.build-helper-maven-plugin>
</properties>

<dependencies>
<dependency>
<groupId>io.serverlessworkflow</groupId>
<artifactId>serverlessworkflow-types</artifactId>
<groupId>org.openworkflow.sdk</groupId>
<artifactId>openworkflow-types</artifactId>
</dependency>
<dependency>
<groupId>io.serverlessworkflow</groupId>
<artifactId>serverlessworkflow-serialization</artifactId>
<groupId>org.openworkflow.sdk</groupId>
<artifactId>openworkflow-serialization</artifactId>
</dependency>
<dependency>
<groupId>org.slf4j</groupId>
Expand Down Expand Up @@ -81,13 +81,13 @@
<build>
<plugins>
<plugin>
<groupId>io.serverlessworkflow</groupId>
<artifactId>serverless-workflow-jackson-generator</artifactId>
<groupId>org.openworkflow.sdk</groupId>
<artifactId>openworkflow-jackson-generator</artifactId>
<version>${project.version}</version>
<dependencies />
<configuration>
<srcPackage>io.serverlessworkflow.api.types</srcPackage>
<targetPackage>io.serverlessworkflow.api.types.jackson</targetPackage>
<srcPackage>org.openworkflow.sdk.api.types</srcPackage>
<targetPackage>org.openworkflow.sdk.api.types.jackson</targetPackage>
</configuration>
<executions>
<execution>
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* Copyright 2020-Present The Serverless Workflow Specification Authors
* Copyright 2020-Present The Open 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.
Expand All @@ -13,12 +13,12 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package io.serverlessworkflow.api;
package org.openworkflow.sdk.api;

import io.serverlessworkflow.api.types.Workflow;
import java.io.IOException;
import java.io.InputStream;
import java.io.Reader;
import org.openworkflow.sdk.api.types.Workflow;

class DirectReader implements WorkflowReaderOperations {

Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* Copyright 2020-Present The Serverless Workflow Specification Authors
* Copyright 2020-Present The Open 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.
Expand All @@ -13,19 +13,19 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package io.serverlessworkflow.api;
package org.openworkflow.sdk.api;

import com.fasterxml.jackson.annotation.JsonInclude.Include;
import com.fasterxml.jackson.databind.ObjectMapper;
import com.fasterxml.jackson.databind.SerializationFeature;
import com.fasterxml.jackson.databind.module.SimpleModule;
import com.fasterxml.jackson.dataformat.yaml.YAMLFactory;
import com.fasterxml.jackson.dataformat.yaml.YAMLGenerator.Feature;
import io.serverlessworkflow.api.types.jackson.JacksonMixInModule;
import io.serverlessworkflow.serialization.BeanDeserializerModifierWithValidation;
import io.serverlessworkflow.serialization.URIDeserializer;
import io.serverlessworkflow.serialization.URISerializer;
import java.net.URI;
import org.openworkflow.sdk.api.types.jackson.JacksonMixInModule;
import org.openworkflow.sdk.serialization.BeanDeserializerModifierWithValidation;
import org.openworkflow.sdk.serialization.URIDeserializer;
import org.openworkflow.sdk.serialization.URISerializer;

class ObjectMapperFactory {

Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* Copyright 2020-Present The Serverless Workflow Specification Authors
* Copyright 2020-Present The Open 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.
Expand All @@ -13,7 +13,7 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package io.serverlessworkflow.api;
package org.openworkflow.sdk.api;

import com.fasterxml.jackson.core.exc.StreamReadException;
import com.fasterxml.jackson.databind.DatabindException;
Expand All @@ -23,13 +23,13 @@
import com.networknt.schema.Schema;
import com.networknt.schema.SchemaRegistry;
import com.networknt.schema.SpecificationVersion;
import io.serverlessworkflow.api.types.Workflow;
import java.io.IOException;
import java.io.InputStream;
import java.io.Reader;
import java.io.UncheckedIOException;
import java.util.Collection;
import java.util.stream.Collectors;
import org.openworkflow.sdk.api.types.Workflow;

class ValidationReader implements WorkflowReaderOperations {
private final Schema schemaObject;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* Copyright 2020-Present The Serverless Workflow Specification Authors
* Copyright 2020-Present The Open 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.
Expand All @@ -13,13 +13,13 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package io.serverlessworkflow.api;
package org.openworkflow.sdk.api;

import com.fasterxml.jackson.databind.ObjectMapper;
import java.nio.file.Path;

/**
* Enum representing the supported formats for Serverless Workflow definitions.
* Enum representing the supported formats for Open Workflow definitions.
*
* <p>Provides utility methods to determine the format based on file name or path, and to access the
* corresponding {@link ObjectMapper} for serialization and deserialization.
Expand Down
Loading
Loading