Skip to content
Merged
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
  •  
  •  
  •  
6 changes: 3 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@ Add the following dependencies to your pom.xml `dependencies` section:

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

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

## How to Use
Expand All @@ -78,7 +78,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 `org.openworkflow.sdk.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 `cloud.openworkflow.sdk.api.types.Workflow` class

### Reading workflow definition from JSON/YAML source

Expand Down
2 changes: 1 addition & 1 deletion annotations/pom.xml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<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>org.openworkflow.sdk</groupId>
<groupId>cloud.openworkflow.sdk</groupId>
<artifactId>openworkflow-parent</artifactId>
<version>8.0.0-SNAPSHOT</version>
</parent>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package org.openworkflow.sdk.annotations;
package cloud.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
Expand Up @@ -13,7 +13,7 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package org.openworkflow.sdk.annotations;
package cloud.openworkflow.sdk.annotations;

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

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package org.openworkflow.sdk.annotations;
package cloud.openworkflow.sdk.annotations;

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

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package org.openworkflow.sdk.annotations;
package cloud.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
Expand Up @@ -13,7 +13,7 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package org.openworkflow.sdk.annotations;
package cloud.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
Expand Up @@ -13,7 +13,7 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package org.openworkflow.sdk.annotations;
package cloud.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
Expand Up @@ -13,7 +13,7 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package org.openworkflow.sdk.annotations;
package cloud.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
Expand Up @@ -13,7 +13,7 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package org.openworkflow.sdk.annotations;
package cloud.openworkflow.sdk.annotations;

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

<parent>
<groupId>org.openworkflow.sdk</groupId>
<groupId>cloud.openworkflow.sdk</groupId>
<artifactId>openworkflow-parent</artifactId>
<version>8.0.0-SNAPSHOT</version>
</parent>
Expand All @@ -14,11 +14,11 @@

<dependencies>
<dependency>
<groupId>org.openworkflow.sdk</groupId>
<groupId>cloud.openworkflow.sdk</groupId>
<artifactId>openworkflow-types</artifactId>
</dependency>
<dependency>
<groupId>org.openworkflow.sdk</groupId>
<groupId>cloud.openworkflow.sdk</groupId>
<artifactId>openworkflow-serialization</artifactId>
</dependency>
<dependency>
Expand Down Expand Up @@ -78,13 +78,13 @@
<build>
<plugins>
<plugin>
<groupId>org.openworkflow.sdk</groupId>
<groupId>cloud.openworkflow.sdk</groupId>
<artifactId>openworkflow-jackson-generator</artifactId>
<version>${project.version}</version>
<dependencies />
<configuration>
<srcPackage>org.openworkflow.sdk.api.types</srcPackage>
<targetPackage>org.openworkflow.sdk.api.types.jackson</targetPackage>
<srcPackage>cloud.openworkflow.sdk.api.types</srcPackage>
<targetPackage>cloud.openworkflow.sdk.api.types.jackson</targetPackage>
</configuration>
<executions>
<execution>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,11 +13,11 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package org.openworkflow.sdk.api;
package cloud.openworkflow.sdk.api;

import cloud.openworkflow.sdk.api.types.Workflow;
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
Expand Up @@ -13,14 +13,14 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package org.openworkflow.sdk.api;
package cloud.openworkflow.sdk.api;

import cloud.openworkflow.sdk.api.types.jackson.JacksonMixInModule;
import cloud.openworkflow.sdk.serialization.BeanDeserializerModifierWithValidation;
import cloud.openworkflow.sdk.serialization.URIDeserializer;
import cloud.openworkflow.sdk.serialization.URISerializer;
import com.fasterxml.jackson.annotation.JsonInclude;
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;
import tools.jackson.databind.DeserializationFeature;
import tools.jackson.databind.ObjectMapper;
import tools.jackson.databind.SerializationFeature;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,8 +13,9 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package org.openworkflow.sdk.api;
package cloud.openworkflow.sdk.api;

import cloud.openworkflow.sdk.api.types.Workflow;
import com.networknt.schema.Error;
import com.networknt.schema.InputFormat;
import com.networknt.schema.Schema;
Expand All @@ -26,7 +27,6 @@
import java.io.UncheckedIOException;
import java.util.Collection;
import java.util.stream.Collectors;
import org.openworkflow.sdk.api.types.Workflow;
import tools.jackson.databind.JsonNode;

class ValidationReader implements WorkflowReaderOperations {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package org.openworkflow.sdk.api;
package cloud.openworkflow.sdk.api;

import java.nio.file.Path;
import tools.jackson.databind.ObjectMapper;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,15 +13,15 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package org.openworkflow.sdk.api;
package cloud.openworkflow.sdk.api;

import cloud.openworkflow.sdk.api.types.Workflow;
import java.io.FileNotFoundException;
import java.io.IOException;
import java.io.InputStream;
import java.io.Reader;
import java.nio.file.Files;
import java.nio.file.Path;
import org.openworkflow.sdk.api.types.Workflow;

/** Utility class for reading and parsing Open Workflow definitions from various sources. */
public class WorkflowReader {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,11 +13,11 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package org.openworkflow.sdk.api;
package cloud.openworkflow.sdk.api;

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

public interface WorkflowReaderOperations {
Workflow read(InputStream input, WorkflowFormat format);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,15 +13,15 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package org.openworkflow.sdk.api;
package cloud.openworkflow.sdk.api;

import cloud.openworkflow.sdk.api.types.Workflow;
import java.io.ByteArrayOutputStream;
import java.io.IOException;
import java.io.OutputStream;
import java.io.Writer;
import java.nio.file.Files;
import java.nio.file.Path;
import org.openworkflow.sdk.api.types.Workflow;

/**
* Utility class for writing Open Workflow definitions to various outputs and formats.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package org.openworkflow.sdk.serialization;
package cloud.openworkflow.sdk.serialization;

import tools.jackson.databind.BeanDescription;
import tools.jackson.databind.DeserializationConfig;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package org.openworkflow.sdk.serialization;
package cloud.openworkflow.sdk.serialization;

import jakarta.validation.ConstraintViolation;
import jakarta.validation.ConstraintViolationException;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package org.openworkflow.sdk.serialization;
package cloud.openworkflow.sdk.serialization;

import java.net.URI;
import java.net.URISyntaxException;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package org.openworkflow.sdk.serialization;
package cloud.openworkflow.sdk.serialization;

import java.net.URI;
import tools.jackson.core.JsonGenerator;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,25 +13,25 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package org.openworkflow.sdk.api;
package cloud.openworkflow.sdk.api;

import static cloud.openworkflow.sdk.api.WorkflowReader.readWorkflowFromClasspath;
import static org.assertj.core.api.Assertions.assertThat;
import static org.openworkflow.sdk.api.WorkflowReader.readWorkflowFromClasspath;

import cloud.openworkflow.sdk.api.types.BearerAuthenticationPolicy;
import cloud.openworkflow.sdk.api.types.CallFunction;
import cloud.openworkflow.sdk.api.types.CallHTTP;
import cloud.openworkflow.sdk.api.types.CallTask;
import cloud.openworkflow.sdk.api.types.HTTPArguments;
import cloud.openworkflow.sdk.api.types.OAuth2AuthenticationData.OAuth2AuthenticationDataGrant;
import cloud.openworkflow.sdk.api.types.OAuth2AuthenticationPolicy;
import cloud.openworkflow.sdk.api.types.OAuth2AuthenticationPropertiesEndpoints;
import cloud.openworkflow.sdk.api.types.OAuth2ConnectAuthenticationProperties;
import cloud.openworkflow.sdk.api.types.Task;
import cloud.openworkflow.sdk.api.types.Workflow;
import java.io.IOException;
import java.net.URI;
import org.junit.jupiter.api.Test;
import org.openworkflow.sdk.api.types.BearerAuthenticationPolicy;
import org.openworkflow.sdk.api.types.CallFunction;
import org.openworkflow.sdk.api.types.CallHTTP;
import org.openworkflow.sdk.api.types.CallTask;
import org.openworkflow.sdk.api.types.HTTPArguments;
import org.openworkflow.sdk.api.types.OAuth2AuthenticationData.OAuth2AuthenticationDataGrant;
import org.openworkflow.sdk.api.types.OAuth2AuthenticationPolicy;
import org.openworkflow.sdk.api.types.OAuth2AuthenticationPropertiesEndpoints;
import org.openworkflow.sdk.api.types.OAuth2ConnectAuthenticationProperties;
import org.openworkflow.sdk.api.types.Task;
import org.openworkflow.sdk.api.types.Workflow;

public class ApiTest {

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,21 +13,21 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package org.openworkflow.sdk.api;
package cloud.openworkflow.sdk.api;

import static cloud.openworkflow.sdk.api.WorkflowReader.readWorkflowFromClasspath;
import static cloud.openworkflow.sdk.api.WorkflowReader.validation;
import static cloud.openworkflow.sdk.api.WorkflowWriter.workflowAsBytes;
import static cloud.openworkflow.sdk.api.WorkflowWriter.workflowAsString;
import static cloud.openworkflow.sdk.api.WorkflowWriter.writeWorkflow;
import static org.assertj.core.api.Assertions.assertThat;
import static org.openworkflow.sdk.api.WorkflowReader.readWorkflowFromClasspath;
import static org.openworkflow.sdk.api.WorkflowReader.validation;
import static org.openworkflow.sdk.api.WorkflowWriter.workflowAsBytes;
import static org.openworkflow.sdk.api.WorkflowWriter.workflowAsString;
import static org.openworkflow.sdk.api.WorkflowWriter.writeWorkflow;

import cloud.openworkflow.sdk.api.types.Workflow;
import java.io.ByteArrayInputStream;
import java.io.ByteArrayOutputStream;
import java.io.IOException;
import org.junit.jupiter.params.ParameterizedTest;
import org.junit.jupiter.params.provider.ValueSource;
import org.openworkflow.sdk.api.types.Workflow;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;

Expand Down
2 changes: 1 addition & 1 deletion bom/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
<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>org.openworkflow.sdk</groupId>
<groupId>cloud.openworkflow.sdk</groupId>
<artifactId>openworkflow-parent</artifactId>
<version>8.0.0-SNAPSHOT</version>
</parent>
Expand Down
4 changes: 2 additions & 2 deletions examples/events/pom.xml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<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>org.openworkflow.sdk</groupId>
<groupId>cloud.openworkflow.sdk</groupId>
<artifactId>openworkflow-examples</artifactId>
<version>8.0.0-SNAPSHOT</version>
</parent>
Expand All @@ -15,7 +15,7 @@

<dependencies>
<dependency>
<groupId>org.openworkflow.sdk</groupId>
<groupId>cloud.openworkflow.sdk</groupId>
<artifactId>openworkflow-impl-jackson</artifactId>
</dependency>
<dependency>
Expand Down
Loading
Loading