Serverless Workflow Java SDK 7.0.0


Announcing the Release of Serverless Workflow Java SDK 7.0.0

Hello, Serverless Workflow community!

We’re excited to announce the release of the latest Java SDK, version 7.0.0, which is now compatible with the upcoming Serverless Workflow Specification 1.0.0 and includes a reference implementation. The reference implementation provides a ready-to-use runtime that supports the Serverless Workflow Specification. It includes a workflow execution engine, validation utilities, and illustrative examples to help you quickly test and deploy your workflows.

Java SDK example

You can dive right in using one of the examples available in the specification repository. Here’s a quick example to get you started:

To use the SDK, simply add it as a dependency to your Maven project:

<dependency>
    <groupId>io.serverlessworkflow</groupId>
    <artifactId>serverlessworkflow-api</artifactId>
    <version>7.0.0</version>
</dependency>

Then, you can write

// Make sure simple.yaml is in your root folder
try (InputStream in = new FileInputStream("simple.yaml")) {
   Workflow workflow = WorkflowReader.readWorkflow (in, WorkflowFormat.YAML);
    // Once you have the Workflow instance, you can use its API to inspect it
}

Java Reference implementation example

You can dive right in using one of the examples available in the implementation repository or by checking the README.

Here’s a quick example to get you started:

To use reference implementation, simply add it as a dependency to your Maven project:

<dependency>
      <groupId>io.serverlessworkflow</groupId>
      <artifactId>serverlessworkflow-impl-core</artifactId>
      <version>7.0.0</version>
</dependency>

Then, you can write the following code to execute a workflow

// Make sure simple.yaml is in your src/main/resources folder
try (WorkflowApplication appl = WorkflowApplication.builder().build()) {
      logger.info(
          "Workflow output is {}",
          appl.workflowDefinition(WorkflowReader.readWorkflowFromClasspath("simple.yaml"))
              .instance(Map.of())
              .start()
              .join());
    }

Whats new?

In this release:

  • We updated the latest schema revision.
  • We improved POJO generation from specification schema by:
    • Fixing generation of POJOs related to the EventComsuption strategy.
  • We released the first documented version of the reference implementation, completing phase 1.

Future plans

Check out our roadmap here

Previous Versions and Support for the Specification 0.8

As we move forward, if you encounter any issues with the 5.x series, which supports Specification 0.8, please open an issue in our repository so we can track it. While we may release patch versions to address critical issues, please note that no new features will be added, and our resources for maintaining this branch are limited.

For those interested in contributing to the 6.x series, which supports the legacy 0.9 version of the specification, we welcome your efforts. However, we want to emphasize that our primary focus and resources are dedicated to the new 1.0.0 specification, which aligns with the 7.x stream of the Java SDK.

Happy coding!

💕 Love ServerlessWorkflow? Give us a Star on GitHub! ⭐

Help us grow and show your support! Starring our repository helps more people discover and join our community.

👉Star our GitHub Repository