Workflow editor
Before Run or Trial run, complete USB device license and the matching automation / Bluetooth environment in Prerequisites & licensing. Otherwise common steps fail immediately.
A workflow saves steps like โtap here, wait, open which Appโ as a repeatable flow. Click "Workflow editor" at the top to enter the editor.
Layoutโ
- Left: workflow library (tree โ main flows and subflows)
- Center top: open flow tabs (multiple at once)
- Center bottom: visual flowchart or text mode (advanced)
- Right: selected step parameters, variable pool, AI assist panel
Workflow library (left)โ
- Root: standalone main flows, runnable directly
- Child: subflows invoked by main flows, shown indented
- Click name to open for edit; hover for Open folder, Delete
- Left panel can collapse for a larger canvas
- Root flows can export as.spk package (see Workflow.spk); "ๅฏ" marks imported read-only packages
Create and saveโ
| Action | How |
|---|---|
| New | Top bar New, enter name |
| Save | Save button or Ctrl+S (Mac: Cmd+S) |
| Validate | Validate before save โ missing fields, bad connections |
| Layout | Auto-arrange flowchart |
Enable Auto-save on tab switch in Settings.
Step cards have Simple / Advanced toggle top-right: Simple hides JSON and advanced fields; Advanced shows full config.
Two editing modesโ
| Mode | Best for |
|---|---|
| Visual | Most users: drag nodes, connect, click steps to edit params |
| Text | Users familiar with config files: edit JSON directly |
Start with Visual.
Flowchart elementsโ
- Boxes (states): groups of steps run in order
- Arrows: on success go to next step; also failure and condition branches
- Diamonds: branch on conditions (e.g. โtap if found, else waitโ)
- Subflow: one step invokes another saved flow (invoke)
Canvas supports pan, zoom, minimap; Ctrl+Z (Mac: Cmd+Z) undo; right-click copy, delete, insert step on a connection.
After trial run, nodes highlight green/red/blue; select one to see logs and I/O.
Variables: flow config and variable poolโ
Two kinds of data to remember:
| Type | Meaning | Where to configure |
|---|---|---|
| Flow config | Defaults before the flow starts (package name, keywords, etc.) | Flow config dialog |
| Step results | Data left after a step (screenshot, OCR, match result, etc.) | Save to variable on the step |
Variable pool (canvas toolbar) shows both:
- Design view: infers config and step results from flow structure
- Run view: after trial run, shows actual variable values
- Click a variable to highlight steps that reference it
- Optional Trial run variable flow โ data lines between nodes visited this run only
When invoking subflows, use the checklist to pick pass-through / return variables โ no hand-written JSON (Advanced mode still allows editing).
Trial run (important)โ
After editing, trial run before production:
- Pick an online device in the toolbar
- Click Trial run / Run (or Trial from this step / Run selected steps)
- Steps change color on canvas: running, success, failure
- Force stop anytime
Trial runs create real tasks โ see Tasks & monitoring. From the task panel, "Workflow editor" returns to the editor with playback of each step.
AI-assisted flow authoringโ
Right AI panel (configure LLM first โ Getting started) can:
- Describe automation in Chinese and let AI generate the flowchart
- Check Edit selected state only for partial rewrites
- Multi-turn chat until satisfied
After generation, still validate and trial run.
Flow config (global settings)โ
Click Flow config to set:
| Item | Purpose |
|---|---|
| Workflow default / This flow startup | Two config layers โ override rules for trial run vs. run |
| Input params (trial run) | Key-value overrides for trial run |
| Working directory | Optional. When set, file steps and match templates prefer this folder; create assets/templates/ for small images |
Working directory differs from Album import folderPath: album steps need an absolute PC path; save_file / read_file without working directory write under runtime_data/ in the data directory โ no working directory required first.
Step previews while editingโ
With a trial device selected, some steps support preview:
| Step type | Preview |
|---|---|
| OCR | Capture and recognize text (default non-automation capture) |
| Image match / color-offset match | Match preview: match box, search region, crop template โ see Image/color matching |
| Node capture | Clickable elements on current screen (automation required) |
| VLM visual locate | Mark location on screenshot from Chinese description |
| Coordinate tap | Pick point on screenshot |
| pick data extraction | Preview from last trial run I/O snapshot |
Screenshot and OCR are separate non-automation and automation steps โ same names as AI chat.
Sub-workflowsโ
- Add Invoke subflow step, pick existing workflow ID
- Double-click invoke node or right-click Enter subflow to edit (subgraph not expanded on canvas by default)
- Configure Input params, Write back variables, Success record (optional)
Open flow file locationโ
Folder icon next to a library item opens that flow's file directory on your PC for backup or copy.
Next stepsโ
- Image/color matching details โ Image/color matching
- Step parameter reference โ Workflow step reference
- Execution progress and pause โ Tasks & monitoring