All Projects → dapr → Workflows

dapr / Workflows

Licence: mit
Run Cloud Native workflows on any environment using Dapr

Projects that are alternatives of or similar to Workflows

Argo Workflows
Workflow engine for Kubernetes
Stars: ✭ 10,024 (+11833.33%)
Mutual labels:  workflow-engine, workflow, cloud-native
Kogito Runtimes
Kogito Runtimes - Kogito is a cloud-native business automation technology for building cloud-ready business applications.
Stars: ✭ 188 (+123.81%)
Mutual labels:  cloud-native, workflow-engine, workflow
Kogito Examples
Kogito examples - Kogito is a cloud-native business automation technology for building cloud-ready business applications.
Stars: ✭ 96 (+14.29%)
Mutual labels:  cloud-native, workflow-engine, workflow
Smartflow Sharp
基于C#语言研发的Smartflow-Sharp工作流组件,该工作流组件的特点是简单易用、方便扩展、支持多种数据库访问、高度可定制化,支持用户按需求做功能的定制开发,节省用户的使用成本
Stars: ✭ 594 (+607.14%)
Mutual labels:  workflow-engine, workflow
Couler
Unified Interface for Constructing and Managing Workflows on different workflow engines, such as Argo Workflows, Tekton Pipelines, and Apache Airflow.
Stars: ✭ 405 (+382.14%)
Mutual labels:  cloud-native, workflow-engine
Easy Flows
The simple, stupid workflow engine for Java
Stars: ✭ 433 (+415.48%)
Mutual labels:  workflow-engine, workflow
Tactic
Open source remote collaboration platform used for configuring and deploying enterprise Workflow solutions.
Stars: ✭ 301 (+258.33%)
Mutual labels:  workflow-engine, workflow
Titanoboa
Titanoboa makes complex workflows easy. It is a low-code workflow orchestration platform for JVM - distributed, highly scalable and fault tolerant.
Stars: ✭ 787 (+836.9%)
Mutual labels:  workflow-engine, workflow
Django River
Django workflow library that supports on the fly changes ⛵
Stars: ✭ 609 (+625%)
Mutual labels:  workflow-engine, workflow
Galaxy
Data intensive science for everyone.
Stars: ✭ 812 (+866.67%)
Mutual labels:  workflow-engine, workflow
Hyperflow
HyperFlow: a scientific workflow engine
Stars: ✭ 53 (-36.9%)
Mutual labels:  workflow-engine, workflow
River Admin
🚀 A shiny admin interface for django-river built with DRF, Vue & Vuetify
Stars: ✭ 55 (-34.52%)
Mutual labels:  workflow-engine, workflow
Utask
µTask is an automation engine that models and executes business processes declared in yaml. ✏️📋
Stars: ✭ 374 (+345.24%)
Mutual labels:  workflow-engine, workflow
Pvm
Build workflows, activities, BPMN like processes, or state machines with PVM.
Stars: ✭ 348 (+314.29%)
Mutual labels:  workflow-engine, workflow
Machine
Machine is a workflow/pipeline library for processing data
Stars: ✭ 78 (-7.14%)
Mutual labels:  workflow-engine, workflow
Jug
Parallel programming with Python
Stars: ✭ 337 (+301.19%)
Mutual labels:  workflow-engine, workflow
Prefect
The easiest way to automate your data
Stars: ✭ 7,956 (+9371.43%)
Mutual labels:  workflow-engine, workflow
Loonflow
基于django的工作流引擎,工单(a workflow engine base on django python)
Stars: ✭ 1,153 (+1272.62%)
Mutual labels:  workflow-engine, workflow
Sciluigi
A light-weight wrapper library around Spotify's Luigi workflow library to make writing scientific workflows more fluent, flexible and modular
Stars: ✭ 290 (+245.24%)
Mutual labels:  workflow-engine, workflow
Rails workflow
Check Wiki for details
Stars: ✭ 295 (+251.19%)
Mutual labels:  workflow-engine, workflow

Dapr Workflows - Run Cloud-Native Workflows using Dapr

Dapr Workflows is a lightweight host that allows developers to run cloud-native workflows locally, on-premises or any cloud environment using the Azure Logic Apps workflow engine and Dapr.

Watch this video for overview of Dapr Workflows.

Build Status License: MIT

Contents

Benefits

By using a workflow engine, business logic can be defined in a declarative, no-code fashion so application code doesn't need to change when a workflow changes. Dapr Workflows allows you to use workflows in a distributed application along with these added benefits:

  • Run workflows anywhere - on your local machine, on-premises, on Kubernetes or in the cloud
  • Built-in tracing, metrics and mTLS through Dapr
  • gRPC and HTTP endpoints for your workflows
  • Kick off workflows based on Dapr bindings events
  • Orchestrate complex workflows by calling back to Dapr to save state, publish a message and more

How it works

New to Dapr? Learn more about Dapr with this overview

Dapr Workflows hosts a gRPC server that implements the Dapr Client API.

This allows users to start workflows using gRPC and HTTP endpoints through Dapr, or start a workflow asynchronously using Dapr bindings. Once a workflow request comes in, Dapr Workflows uses the Logic Apps SDK to execute the workflow.

Diagram

Example

Dapr Workflows can be used as the orchestrator for many otherwise complex activities. For example, invoking an external endpoint, saving the data to a state store, publishing the result to a different app or invoking a binding can all be done by calling back into Dapr from the workflow itself.

This is due to the fact Dapr runs as a sidecar next to the workflow host just as if it was any other app.

Examine workflow2.json as an example of a workflow that does the following:

  1. Calls into Azure Functions to get a JSON response
  2. Saves the result to a Dapr state store
  3. Sends the result to a Dapr binding
  4. Returns the result to the caller

Since Dapr supports many pluggable state stores and bindings, the workflow becomes portable between different environments (cloud, edge or on-premises) without the user changing the code - because there is no code involved.

Get Started

Prerequisites:

  1. Install the Dapr CLI
  2. Azure Blob Storage Account

Supported Dapr Version: 0.10.0 and above

Self hosted (running locally)

Deploy Dapr

Once you have the Dapr CLI installed, run:

dapr init

Invoke Logic Apps using Dapr

First, set up the environment variables containing the Azure Storage Account credentials:

Mac / Linux

export STORAGE_ACCOUNT_KEY=<YOUR-STORAGE-ACCOUNT-KEY>
export STORAGE_ACCOUNT_NAME=<YOUR-STORAGE-ACCOUNT-NAME>

Windows

set STORAGE_ACCOUNT_KEY=<YOUR-STORAGE-ACCOUNT-KEY>
set STORAGE_ACCOUNT_NAME=<YOUR-STORAGE-ACCOUNT-NAME>
cd src/Dapr.Workflows

dapr run --app-id workflows --protocol grpc --port 3500 --app-port 50003 -- dotnet run --workflows-path ../../samples

curl http://localhost:3500/v1.0/invoke/workflows/method/workflow1

{"value":"Hello from Logic App workflow running with Dapr!"}                                                                                   

Rejoice!

Kubernetes

Make sure you have a running Kubernetes cluster and kubectl in your path.

Deploy Dapr

Once you have the Dapr CLI installed, run:

dapr init --kubernetes

Wait until the Dapr pods have the status Running.

Create a Config Map for the workflow

kubectl create configmap workflows --from-file ./samples/workflow1.json

Create a secret containing the Azure Storage Account credentials

Replace the account name and key values below with the actual credentials:

kubectl create secret generic dapr-workflows --from-literal=accountName=<YOUR-STORAGE-ACCOUNT-NAME> --from-literal=accountKey=<YOUR-STORAGE-ACCOUNT-KEY>

Deploy Dapr Worfklows

kubectl apply -f deploy/deploy.yaml

Invoke the workflow using Dapr

Create a port-forward to the dapr workflows container:

kubectl port-forward deploy/dapr-workflows-host 3500:3500

Now, invoke logic apps through Dapr:

curl http://localhost:3500/v1.0/invoke/workflows/method/workflow1

{"value":"Hello from Logic App workflow running with Dapr!"}                                                                                   

Rejoice once more!

Invoking workflows using Dapr bindings

First, create any Dapr binding of your choice.

See this How-To tutorial and sample to get started.

In order for Dapr Workflows to be able to start a workflow from a Dapr binding event, simply name the binding with the name of the workflow you want it to trigger. Couldn't get any simpler!

Here's an example of a Kafka binding that will trigger a workflow named workflow1:

apiVersion: dapr.io/v1alpha1
kind: Component
metadata:
  name: workflow1
spec:
  type: bindings.kafka
  metadata:
  - name: topics
    value: topic1
  - name: brokers
    value: localhost:9092
  - name: consumerGroup
    value: group1
  - name: authRequired
    value: "false"

Self hosted

Place the binding yaml file above in a components directory at the root of your application.

Kubernetes

kubectl apply -f my_binding.yaml

Seeing events triggering logic apps

Once an event is sent to the bindings component, check the logs Dapr Workflows to see the output.

In standalone mode, the output will be printed to the local terminal.

On Kubernetes, run the following command:

kubectl logs -l app=dapr-workflows-host -c host

Supported workflow features

Supported Actions and Triggers

Supported Control Workflows

Supported Data Manipulation

Not supported

Build

Make sure you have dotnet core installed on your machine. At minimum, you need .NET Core SDK 3.1 to build.

  1. Clone the repo
  2. Inside the top level dir, run: dotnet build

Build Docker Image

Make sure you have Docker installed on your machine.

Compile to release mode:

dotnet publish -c Release -r linux-x64 --self-contained false

Build image:

docker build -t <registry>/<image> .

Push image:

docker push <registry>/<image>
Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].