Quickstart: Workflow
This quickstart showcases how to write applications containing stateful, long-running, reliable workflows using the Workflow API. Start by developing locally with Dapr and the Diagrid Dashboard, then optionally onboard to Catalyst Online for managed workflow execution.
Part 1: Develop Locally with Dapr
Develop and test your workflows locally using Dapr and the Diagrid Dashboard for workflow visualization and debugging.
Prerequisites
Install Diagrid CLI
Download and install the Diagrid CLI:
- MacOS
- Linux
- Windows
curl -o- https://downloads.diagrid.io/cli/install.sh | bash
Move the diagrid binary into your path:
sudo mv ./diagrid /usr/local/bin
curl -o- https://downloads.diagrid.io/cli/install.sh | bash
Move the diagrid binary into your path:
sudo mv ./diagrid /usr/local/bin
Download the PowerShell installer:
iwr -Uri https://downloads.diagrid.io/cli/install.ps1 -OutFile install.ps1
Execute the PowerShell installer:
.\install.ps1
You may need to temporarily set the PowerShell execution policy to Unrestricted to allow the installer to execute.
Move the diagrid.exe executable into your path:
Move-Item .\diagrid.exe "$($env:USERPROFILE)\bin"
Verify the installation:
diagrid version
Set Up Diagrid Dashboard
Run the dashboard:
- MacOS
- Linux
- Windows
docker run \
-p 8080:8080 \
ghcr.io/diagridio/diagrid-dashboard:0.0.1
docker run \
-p 8080:8080 \
ghcr.io/diagridio/diagrid-dashboard:0.0.1
PowerShell:
docker run `
-p 8080:8080 `
public.ecr.aws/d3f9w4q8/local-dash-temp:latest
Command Prompt:
docker run ^
-p 8080:8080 ^
ghcr.io/diagridio/diagrid-dashboard:0.0.1
Access the dashboard at http://localhost:8080.
Clone Quickstart Code
Clone the quickstart code from the Diagrid Labs GitHub repository:
- Python
- .NET
- Javascript
- Java
diagrid dev quickstart --type workflow --language python
diagrid dev quickstart --type workflow --language csharp
diagrid dev quickstart --type workflow --language javascript
diagrid dev quickstart --type workflow --language java
Navigate to the quickstart directory:
cd workflow-quickstart-<language>
Install Dependencies
- Python
- .NET
- JavaScript
- Java
Create and activate a Python virtual environment:
python -m venv venv
source venv/bin/activate # MacOS/Linux
# Or: venv\Scripts\activate # Windows
Windows users: Use venv\Scripts\Activate.ps1 (PowerShell) or venv\Scripts\activate.bat (Command Prompt). Use conda, pipenv, or your preferred tool if desired.
Install requirements:
pip install -r requirements.txt
Install .NET dependencies:
dotnet restore
Install Node dependencies:
npm install
Install Maven dependencies:
mvn clean install
Run Locally with Dapr
Run your application with Dapr locally. Make sure your state component is in the components directory.
- Python
- .NET
- JavaScript
- Java
dapr run --app-id order-workflow --app-port 5001 --dapr-http-port 3500 -- python main.py
dapr run --app-id order-workflow --app-port 5001 --dapr-http-port 3500 -- dotnet run
dapr run --app-id order-workflow --app-port 5001 --dapr-http-port 3500 -- npm start
dapr run --app-id order-workflow --app-port 5001 --dapr-http-port 3500 -- mvn spring-boot:run
Your application is now running locally with Dapr. You can view workflow executions in the Diagrid Dashboard.
Interact with Workflow API
With the quickstart running locally, test the Workflow API using curl or the REST Client extension with the test.rest file.
Start workflow
Open a new terminal and start a workflow instance:
curl -i -X POST http://localhost:5001/workflow/start -H "Content-Type: application/json" -d '{"name":"Car", "quantity":2}'
This returns the workflow instance ID. Save it as an environment variable for future API calls:
export INSTANCE_ID=<YOUR_WORKFLOW_INSTANCE_ID>
Get Workflow Status
Get the current workflow status:
curl -i -X GET http://localhost:5001/workflow/status/$WORKFLOW_ID
View in Dashboard
Navigate to http://localhost:8080 to see your workflow executions in the Diagrid Dashboard. You can:
- List all workflow executions for the
order-workflowapp - Filter and page through executions
- Drill into a single execution to see its status, metadata, and lifecycle

Part 2: Onboard to Catalyst Online
Once you've developed and tested your workflows locally, onboard to Catalyst Online for managed workflow execution and additional features.
Log in to Catalyst Online
Authenticate to Diagrid Catalyst Online:
diagrid login
Confirm your organization and user details are correct:
diagrid whoami
Onboard to Catalyst Online
The diagrid dev run creates your Catalyst Online project (if needed), provisions resources (App IDs, Components, managed Pub/Sub and KV Store services), configures environment variables, and sets up the connection between your local environment and Catalyst Online.
- Python
- .NET
- JavaScript
- Java
diagrid dev run -f dev-python-workflow.yaml --project dev-python-workflow
diagrid dev run -f dev-csharp-workflow.yaml --project dev-csharp-workflow
diagrid dev run -f dev-js-workflow.yaml --project dev-js-workflow
diagrid dev run -f dev-java-workflow.yaml --project dev-java-workflow
Interact with Workflow API (Catalyst Online)
Test the Workflow API as before. Workflows are now executed by Catalyst Online:
curl -i -X POST http://localhost:5001/workflow/start -H "Content-Type: application/json" -d '{"name":"Car", "quantity":2}'
Save the workflow instance ID:
export WORKFLOW_ID=<YOUR_WORKFLOW_INSTANCE_ID>
Get workflow status:
curl -i -X GET http://localhost:5001/workflow/status/$WORKFLOW_ID
View detailed workflow logs using the Diagrid CLI:
diagrid workflow get $WORKFLOW_ID --app-id order-workflow
Use the Workflow viewer in the Catalyst Online web console to see detailed execution information:

Clean Up
Clean Up Local ResourcesOptional
Stop the Diagrid Dashboard:
docker stop $(docker ps -q --filter ancestor=diagrid-dashboard:latest)
Remove the quickstart directory if desired:
cd ..
rm -rf workflow-quickstart-<language>
Offload from Catalyst OnlineOptional
To disconnect from Catalyst Online and remove the provisioned resources:
- Python
- .NET
- JavaScript
- Java
diagrid dev stop --project dev-python-workflow
diagrid dev stop --project dev-csharp-workflow
diagrid dev stop --project dev-js-workflow
diagrid dev stop --project dev-java-workflow
This command will remove the connection between your local environment and Catalyst Online.
The diagrid dev stop command does not delete the Catalyst Online project and contained resources. To delete the entire project, use diagrid project delete <project-name>.