Creating Workflows
This guide walks you through creating a workflow from scratch using the visual editor. By the end, you'll have a working approval workflow that routes requests through human reviewers.
Getting Started
- Navigate to the Workflows section in the backend interface
- Click Create Workflow or the New Workflow button
- Choose your editor:
- Visual Editor: Drag-and-drop interface with a graphical canvas (recommended for most users)
- Form Editor: Text-based configuration for advanced users
For this guide, we'll use the Visual Editor.

Workflow visual editor with a seeded sales order approval definition loaded from the Open Saasframe demo instance
Using the Visual Editor
1. Add a START Step
Every workflow begins with a START step:
- Click START in the step palette on the left
- A green node appears on the canvas
- This is your workflow's entry point—it automatically advances when the workflow starts
2. Add a USER_TASK Step
Next, add a step that requires human input:
- Click USER TASK in the step palette
- An amber node appears on the canvas
- Click the node to select it, then click Edit or double-click the node
- Configure the task:
- Step Name: "Approve Purchase Request"
- Description: "Review and approve or reject the purchase request"
- Assigned to Role: "Approvers" (or choose a specific user)
- Form Key: Optional identifier for a custom form
- Allowed Actions: "complete" and "cancel"
💡 Tip: When assigning to a role, any user with that role can claim and complete the task.
3. Connect the Steps
Create a transition from START to your user task:
- Hover over the START node—small handles appear on its edges
- Click and drag from the handle to the USER_TASK node
- Release to create a connection (transition)
- The workflow will automatically move from START to the user task
4. Add Decision Paths
Let's add two END steps for "Approved" and "Rejected" outcomes:
- Click END in the step palette twice to add two END nodes
- Click the first END node and rename it to "Approved"
- Click the second END node and rename it to "Rejected"
- Connect the USER_TASK to both END nodes:
- Drag from the user task to "Approved"
- Drag from the user task to "Rejected"
5. Configure Transitions
Click each transition to configure when it should be taken:
Transition to "Approved":
- Click the edge connecting USER_TASK to "Approved"
- In the properties panel, set:
- Transition Name: "Request Approved"
- Trigger: "manual" (requires user action)
- Pre-Conditions: Optional—add a rule like
context.decision === 'approve'
Transition to "Rejected":
- Click the edge connecting USER_TASK to "Rejected"
- Set:
- Transition Name: "Request Rejected"
- Trigger: "manual"
- Pre-Conditions: Optional—add a rule like
context.decision === 'reject'
6. Add Activities
Let's send an email notification when the request is approved:
- Click the transition to "Approved"
- In the properties panel, find the Activities section
- Click Add Activity
- Configure the activity:
- Activity Type: "SEND_EMAIL"
- Activity Name: "Notify Requester"
- Config:
{"to": "{{context.requesterEmail}}","subject": "Your request has been approved","body": "Your purchase request for {{context.itemName}} has been approved."}
💡 Tip: Use
{{context.fieldName}}to insert workflow data into activity configurations.
7. Save and Enable the Workflow
- Click Save in the top toolbar
- Enter a Workflow ID: "purchase-approval-v1" (lowercase, hyphens allowed)
- Enter a Workflow Name: "Purchase Approval"
- Optionally add a Description: "Routes purchase requests through approvers"
- Set Version: 1
- Toggle Is Active to enable the workflow
- Click Save Definition
Your workflow is now live and ready to accept new instances.
Using the Form Editor
The form editor provides a JSON-based interface for defining workflows. It's useful for:
- Copy-pasting workflow definitions
- Version control and code reviews
- Bulk editing multiple steps
To use the form editor:
- Click the Form Editor tab
- Edit the JSON structure directly
- Follow the same schema as the visual editor generates
- Click Save to apply changes
For most users, the visual editor is more intuitive. Switch to the form editor when you need precise control over the JSON structure.
Best Practices
Naming Conventions
- Step IDs: Use lowercase with hyphens (e.g.,
start,approve-request,send-notification) - Step Names: Use clear, action-oriented labels (e.g., "Approve Purchase Request", not "Approval")
- Transition Names: Describe the outcome (e.g., "Request Approved", "Payment Received")
Organizing Steps
- Keep workflows linear when possible—avoid complex branching unless necessary
- Group related steps visually by positioning them near each other
- Use descriptive names so the workflow is self-documenting
Error Handling
- Add timeout configurations to steps that might hang
- Configure retry policies for activities that call external APIs
- Use compensation activities to roll back changes on failure
Learn more about compensation →
Testing Workflows
Before going live:
- Create a test instance with sample data
- Complete each step manually to verify behavior
- Check the execution timeline for errors
- Review email notifications and API calls in the monitoring view
Example: Simple Approval Workflow
Here's the complete workflow we just built:
Steps:
- START → Auto-advance to next step
- Approve Purchase Request (USER_TASK) → Wait for approver decision
- Approved (END) → Workflow complete, request approved
- Rejected (END) → Workflow complete, request rejected
Transitions:
- START → Approve Purchase Request (auto trigger)
- Approve Purchase Request → Approved (manual, sends approval email)
- Approve Purchase Request → Rejected (manual)
Context Data:
{
"itemName": "Laptop",
"amount": 1500,
"requesterEmail": "user@example.com",
"decision": "approve"
}
When started, this workflow:
- Creates a task for any user with the "Approvers" role
- Waits for the approver to complete the task
- Sends an email if approved
- Ends the workflow
Next Steps
Now that you've created your first workflow:
- Explore step types to learn about AUTOMATED, WAIT_FOR_SIGNAL, and SUB_WORKFLOW steps
- Configure activities to send emails, call APIs, and integrate with external systems
- Add conditions to create complex branching logic
- Monitor execution to debug and track workflow progress
See Also:
- User Tasks - Deep dive into task assignment, forms, and escalation
- Signals - Resume workflows with external triggers
- Framework Documentation - Programmatic workflow integration