Java SDK for iWF workflow engine
See samples for how to use this SDK to build your workflow.
- Java 1.8+
Here is the link to all the versions available to use. Also the Java docs for the latest version. For the latest version, MVN Repository website may have 1~2 days delay to show up.
// https://mvnrepository.com/artifact/io.iworkflow/iwf-java-sdk
implementation 'io.iworkflow:iwf-java-sdk:2.2.+'
<!-- https://mvnrepository.com/artifact/io.iworkflow/iwf-java-sdk -->
<dependency>
<groupId>io.iworkflow</groupId>
<artifactId>iwf-java-sdk</artifactId>
<version>2.2.+</version>
<type>pom</type>
</dependency>
To implement a workflow, the two most core interfaces are
-
Workflow interface defines the workflow definition
-
WorkflowState interface defines the workflow states for workflow definitions
A workflow can contain any number of WorkflowStates.
See more in https://github.com/indeedeng/iwf#what-is-iwf
- Check out the idl submodule by running the command:
git submodule update --init --recursive
- In "Build, Execution, Deployment" -> "Gradle", choose "wrapper task in Gradle build script" for "Use gradle from".
- Open Gradle tab, click "build" under "build" to build the project
- In the same Gradle tab, click "bootRun" under "application to run the project"
- Go to "script/http/local" folder, use the http script to invoke a REST API (you may need to install the HttpClient plugin for IntelliJ)
Run the command git submodule update --remote --merge
to update IDL to the latest commit
- Start workflow API
- Executing
start
/decide
APIs and completing workflow - Parallel execution of multiple states
- Timer command
- Signal command
- SearchAttribute
- DataAttribute
- StateExecutionLocal
- Signal workflow API
- Get workflow DataAttributes/SearchAttributes API
- Get workflow API
- Search workflow API
- Cancel workflow API
- Reset workflow API
- InternalChannel command
- AnyCommandCompleted Decider trigger type
- More workflow start options: IdReusePolicy, cron schedule, retry
- StateOption: WaitUntil/Execute API timeout and retry policy
- Reset workflow by stateId/StateExecutionId
- New search attribute types: Double, Bool, Datetime, Keyword array, Text
- Workflow start options: initial search attributes
- Skip timer API for testing/operation
- Decider trigger type: any command combination
- Support failing workflow with results
- Improve workflow uncompleted error return(canceled, failed, timeout, terminated)
- Support PROCEED_ON_FAILURE for WaitUntilApiFailurePolicy
- Renaming some concepts/APIs with breaking changes(see releaste notes)
- Support workflow RPC
- Support caching on persistence
- Support atomic conditional complete workflow by checking signal/internal channel emptiness