How to Create a Workflow¶
Key Concepts¶
- Workflows consist of steps linked by gateways.
- Each workflow must have exactly one Start Event.
- Each step can only be executed once per instance.
- Fork Gateways create multiple execution paths.
- Workflows are structured in adherence to the BPMN standard and are mainly comprised of Tasks and Branching logic.
- There are no notes or comments boxes in Versaa's workflow designer — self-documenting behaviour is not possible within the tool. Use version comments and external documentation instead.
Step-by-Step¶
- Open the Versaa Workflow Designer in Management Studio.
- Select Create New Workflow.
- Drag and drop a Start Event node onto the canvas.
- Add Step nodes — each represents an action in the workflow.
- Connect: Start Event → first Step → subsequent Steps using sequence flow arrows.
- Add Fork Gateways if needed for branching paths.
- For each Step node, configure parameters:
- Constant
- Variable
- XPath
- JSONPath
- Versaa Task Path
- Complex
- Add an End Event node. Connect the last Step to it.
- Review — all nodes connected, no backward connections, flow runs Start → End.
- Save the workflow.
- Test by triggering a form submission and checking Search Instances.
Workflow Triggers and Message Events¶
A PCA form fires [FormName].PCACompletion on completion. This typically triggers two workflows:
1. A form-specific workflow (configured by you)
2. The Generic Task Completion Workflow (handles document generation and email — fires for all PCA forms via the wildcard *.PCACompletion)
To look up which workflows are triggered by which messages, see sql/cheat-sheet.md.
Multiple Message Event Triggers¶
A workflow can have multiple Message Event Triggers (MessageStart nodes), each acting as an independent listener: - One trigger for invocation by other workflows - One for a specific form completion event - One for a specific button press on a form
All MessageStart nodes on a workflow route into the same step chain — the workflow behaves identically regardless of which trigger fires it.
Workflow Variables¶
A workflow variable is a named text value stored in the Management Studio repository, reusable across multiple workflows.
- Variables save you repeating the same string (SQL, connection string, config value) in every workflow that needs it.
- Reference a variable in a workflow step using the
$VariableName$syntax. - Always use a workflow variable for anything that might change — connection strings, environment-specific values, SQL queries. Nobody thinks their environment variables will change, and then a migration happens.
- Even variables that seem static should be pointed at a variable if there's any chance they could change in future.
- Variables are managed under Management Studio → Workflow Variables.
See also: workflows/how-to-edit-a-workflow.md
Quick Tips¶
- Always start with one Start Event.
- Use Fork Gateways for complex workflows with multiple paths.
- Save regularly.
- After creating, test immediately — don't leave unchecked workflow instances.