Skip to content
This repository has been archived by the owner on Feb 10, 2023. It is now read-only.

mcandeia/deno-workflows

Repository files navigation

Durable workflows implemented on Edge.

Borrows heavily from go-workflows.

Durable workflows is a workflow engine for building workflows as a code on top of Deno runtime. Durable workflows allows you to create long running persistent workflows using your preferred language with automatic recover from failures, retries, timers and signal handlers.

How it works

Durable workflows leverages the Event Sourcing pattern to provide a simple set of APIs for ensuring that your code will be executed in a at-east-once fashion model.

Workflows made easy

Workflows are functions that generates Commands, a workflow may have an input or not.

TODO

Testing

First thing you need to do is to add your repository in a trust-list. In order to get your repository trust-listed create a PR here and add it following the format.

Start the workflow with the desired input by invoking the following request:

curl --location --request POST 'https://durable-workers.fly.dev/executions' \
--header 'Content-Type: application/json' \
--data-raw '{
    "alias":"${namespace}.${workflowName}",
    "input": [${workflow_param1}, ${workflow_param2}]
}'

Do not forget to save the returned execution id,

If you're using signals you can send it by using the following request:

curl --location --request POST 'https://durable-workers.fly.dev/executions/${execution_id}/signals/${signal_name}' \
--header 'Content-Type: application/json' \
--data-raw '${desired_payload}'

Get the workflow result:

curl --location --request GET 'https://durable-workers.fly.dev/executions/${execution_id}'

About

Durable workflows implemented on Edge.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published