- durably persists workflows and their activities (workflow steps)
- automatically retries failed activities
- requires only 2 Postgres tables
- packaged as a library that can be included as a simple dependency via Gradle or Maven
- no separate server deployment
- simple, readable codebase
- embedded UI
Access the UI simply by navigating to port 8000
after starting your application. No separate deployment needed!
Take a look at the example app for an example of how to create your first durable workflow!
Start the app with:
docker compose -f script/docker-compose.yml up --build --force-recreate
Then, try calling the app using requests.http.
View all of your workflows and workflow events at http://localhost:8000!
-
include
maestro-core
as a dependency in yourbuild.gradle.kts
:implementation("io.github.lucidity-labs:maestro-core:0.1.4")
or your
pom.xml
:<dependency> <groupId>io.github.lucidity-labs</groupId> <artifactId>maestro-core</artifactId> <version>0.1.4</version> </dependency>
-
Execute maestro.sql against your Postgres database to create the necessary schema. If you instead want to start off with a ready-to-go local Dockerized Postgres instance, just execute:
docker compose -f script/docker-compose.yml up --build --force-recreate postgres
-
Write your durable workflow! It's super easy - take a look at the example app to see how.
- Create at least one activity interface, like PaymentActivity. Activities are like steps of your workflow.
- Implement your activity, like PaymentActivityImpl.
- Create a workflow interface, like OrderWorkflow. Include a method annotated with
@WorkflowFunction
in this interface. - Implement your workflow, like OrderWorkflowImpl. You can call the activities you've created earlier by declaring them as fields and annotating the fields with
@Activity
. - Register the workflow implementation and the activity implementations, like in Config.
- Call your workflow, like in Controller.