Design a flow
Create a flow in Flow Studio, draw it on the canvas, set up robot tasks, user tasks and conditions, define variables and fix what the Problems panel reports.
This page builds an Invoice approval flow: a robot extracts the invoice, a person approves it, and approved invoices are posted to the ERP by a second robot task. Before you start, check that: You hold flow_designer.edit. See Who can do what. The processes your robot tasks will run exist in a workspace you can open. See Packages and processes. For user tasks, an Action App is published in Action Hub (for example the Approval app). See Action Hub overview. Flow Studio is made for a desktop screen. Below 1024 pixels wide the diagram is read-only. Create a flow# Open the app launcher and select Flow Studio. The Flows page lists the tenant's flows as cards. Select New flow. On an empty tenant you can also select Create from sample, which creates a small Invoice approval flow to start from. Enter a Name and, optionally, a Description. Select Create flow. The flow opens in the editor. To start from an existing BPMN 2.0 diagram, select Import BPMN instead and pick a .bpmn or .xml file. The dialog grades the conversion as Visual, Semantic and Executable, lists Losses and findings, and creates the flow with Import as draft. Find your way around the editor# Palette (left): the elements you can add, grouped as Events, Tasks, Sub-processes, Gateways and Boundary events. Outline lists the elements of the flow. Canvas (middle): drag elements here, and use Connect to draw a sequence flow, Organize to lay the diagram out and Note to add an annotation. The zoom controls are in the lower-left corner, the minimap in the lower-right. Properties (right): the settings of the selected element, or of the flow when nothing is selected (Flow SLA and Lanes). Problems and Data manager (bottom): what blocks publishing, and the flow's variables. The header shows the status (Draft or Published), the latest version, the number of elements and the save state. Changes save on their own a moment after you stop editing (Saved). Save draft saves straight away. With the keyboard, Tab or the arrow keys move through the elements in flow order, Enter opens the properties, A appends an element connected to the focused one, C connects it to another element, B attaches a timer boundary event and Delete removes it. Configure a robot task# A robot task runs a process as a job and waits for it to finish. Drag Robot task from the palette onto the canvas, connect it, and select it. Enter a Name, for example Extract invoice. Under Work target, choose the Workspace, the Automation (a process of that workspace) and its Entry point. Choose how the version is chosen: Pin version (the default) runs exactly the package version the process runs when you publish. Inputs are checked against that version's schema at publish. Latest at dispatch runs whatever version the process runs when the job starts. Flow Studio warns about this choice. Under Input mapping, enter an expression for each input of the entry point, for example invoice.pdfPath for pdf_path. Required inputs are marked. Under Output mapping, select Add mapping to copy a job output into a flow variable, for example matchedTotal = output.total_eur. Further down the panel: Retry: Attempts, First wait, Longest wait and Multiplier. Only set attempts when the automation can safely run twice, and confirm The automation is safe to run again. Without a retry policy, a job that fails after it started stops the instance at an incident. Multi-instance: None, Parallel or Sequential, with the Collection to loop over and the Item variable. Timing: a Target duration for the step (used by Flow Monitor's SLA figures) and Add timeout, which attaches a timer boundary event. Connect the timeout to the path to take when time runs out. A robot task writes its result to <element id>.outcome and <element id>.output unless an output mapping says otherwise. The element id is shown under the type, for example id: extract. Configure a user task# A user task raises an Action Hub task and waits until someone completes it. Add a User task and name it, for example Approve invoice. Under Action app, choose the Action App and its Version. The panel shows the app's Outcomes (for the Approval app, approve and reject). Under Input mapping, fill the app's fields from flow variables, for example title = invoice.number and amount = invoice.amount. Optionally, under Assignment, set the Assignee, Candidate group, Due and Priority as expressions. The person's choice lands in approve.outcome (the action id) and the form's output fields in approve.output, where approve is the element id. See Work on tasks. Other tasks are set up the same way: a Business rule task picks a Business rule (DMN) of a workspace (see Business rules), and a Call activity picks another published Flow and its Version. Branch with a gateway# Add an Exclusive gateway after the user task, for example Approved?. Connect it to each next step. Select a sequence flow leaving the gateway. Enter a Label and a Condition, for example approve.outcome == "approve". Leave the Condition of one outgoing flow empty to make it the default path. Conditions and mappings use a small expression language: TextCopyinvoice.amount > 5000 approve.outcome == "approve" and invoice.amount < 10000 status in ["open", "pending"] invoice.lines[0].total >= 100 A path that does not exist reads as null, and any comparison with null is false. Ordering values of different kinds (a text compared with a number) stops the instance at an incident. Define variables# Open Data manager at the bottom of the editor. Select Add variable and set its Name, Type (string, number, boolean or object), Direction and Default. Argument (in): an input of the flow, set when the flow starts. Argument (out): a result of the flow. Variable: internal to the flow. The defaults of every variable that is not Argument (out) prefill the Debug run form. Fix problems# Flow Studio checks the flow as you edit. Problems lists each error and warning with its code (for example VXFLOW050 for an expression that does not parse); select one to jump to the element. Errors block publishing; No errors. Warnings don't block publishing. means you can publish. Export a flow# Select ⋮ (More actions for this flow) ▸ Export JSON or Export BPMN to download the definition. Next steps# Publish and run a flow Monitor flows
Create a flow
Find your way around the editor
Configure a robot task
Configure a user task
Branch with a gateway
Define variables
Fix problems
Export a flow
Next steps