07.2 Workflows: several steps in order

A workflow runs steps one after another, e.g. load the orders table, then rebuild the cube, then ask for approval. Steps branch, run side by side, wait for people, and can keep checking a folder or mailbox.

The Workflows screens are X-Flow, Xeplr’s workflow designer, a product licensed separately from Analytics. If your install leaves it out, the Workflows menu item and Home tile are not shown, and nothing on this page applies.

Workflows are an advanced feature. Some settings expect simple expressions or JSON. If you only need one thing on a schedule, a job (07.1) is simpler.

Create one

  1. Left menu Workflows.
  2. Under New workflow, type a Name.
  3. Click Create.

To run one job after another, start with After this job on the job itself (07.1). It saves an ordinary workflow that starts when the job finishes, marked after job in this list. Open it here to change it or add more steps, such as an email or an approval.

Draw the steps

A workflow opens as a canvas. Each step is a box, and arrows show where it goes next.

  1. On an empty workflow, click Start here.
  2. Pick what the step is:
    • Action: do something, such as fetch data, send an email or move a file.
    • Screen: show a form and wait for a person to fill it in.
    • Approval: ask one or more people to approve, and wait for them.
    • Condition: split into true and false.
  3. Name the step on its box. For an Action, choose what it does under Choose what it does….
  4. Fill in what the step needs, in the tabs that open inside the box:
    • Inputs, and for some actions Filters or Output options.
    • Step’s Output: an example of what it returns, so later steps can pick from it.
    • Paths: where it goes next (see below).

To add more steps:

  • the arrow under a box adds the step after it;
  • + on an arrow inserts a step between two;
  • dragging from a box’s edge to another box links them.

To use a value from earlier, type it in braces: an earlier step’s output, such as {steps.sales.output.rows}, or one of the workflow’s inputs, such as {params.employeeId}. In a condition on an arrow, Insert a field… lists them to pick from.

Make what a step needs without leaving the workflow. If a list on a step, such as a connection, an API or a database, does not have the one you need yet, pick + New… at the end of the list. The same form as on the Connections pages opens over the workflow, and what you save is picked on the step. A Screen step has + New and Edit, which open the screen designer over the workflow.

Wait for it to finish or reply: tick this on a step that should pause the run until it’s answered, such as a job that must finish before the next step. Off, the next step starts as soon as this one has run.

Where it goes next

Open a step’s Paths tab.

  • Follow the first matching arrow (the usual). Arrows are checked in order and the first that matches is taken. An arrow with no condition is otherwise.
  • Follow every matching arrow, side by side. Each matching arrow becomes its own path, for example two approvals at once.
  • A meeting point is where those paths come together again. Choose how many must arrive before it runs: all, any one, or at least a number. With Stop early when, it can go on as soon as, for example, one path rejects.
  • For each item: an arrow can go through a list, such as the rows or files a step returned, and start one run for each. At most how many at once keeps a long list from starting everything together.
  • End a path here: + Done finishes this path, + Fails fails the run, and + Whole case done finishes the whole run, whatever other paths are still open.

If no arrow matches and there’s no otherwise, the run fails. A condition is written in the same language the engine runs, so one you can save is one it can check.

Approvals

An Approval step asks people to approve, then waits:

  • Approvers: roles such as QA Head, Production Head, or one person.
  • Need: all, any one, or a number.
  • Order: everyone together, or in turn in the order listed.
  • On reject: stop at the first reject, or collect every answer.
  • Title: what approvers see, such as Deviation on PO 450103.
  • Optionally: steps whose person may not also approve here (four eyes), hours each approver has, and a role an overdue approval moves to.

Each approver finds it under Waiting for you in the left menu. The step goes on with output.decision set to approved or rejected, and its two arrows read when approved and otherwise.

Keep checking a folder or a mailbox

A step can wait for something to arrive instead of running once. For example, it can check a folder every 5 minutes and handle each bank file that lands there.

  1. Save the workflow and name the step first. The step needs both before it can keep checking.
  2. On the step, tick Keep checking.
  3. Choose how often under Schedule. It starts at every 5 minutes.
  4. Save the workflow.

When a run reaches this step, it waits there. The step runs again on the schedule:

  • Nothing found: nothing happens.
  • Something found (a file, an email, rows): the steps after it run for that, in a run of their own, and the step goes on checking. With an each item transition after it, every file gets its own run.

It keeps checking until you cancel the run that is waiting on it.

How often it checks is an ordinary job, named Keep checking: · , so you also see it under Jobs, with each check’s log there (07.1). Untick Keep checking and save to remove the job.

A file that is still in the folder is found again on the next check. To handle it only once, end with a step that moves it to a “processed” folder (file-move) or deletes it (file-delete, path {item.path}). Deleting is permanent; moving keeps the file if something needs checking later.

A folder must be one your install lets file steps use. Ask your administrator if the step says the folder is not allowed.

Group and total rows

The group-total step turns a list of rows into one row per group, with totals, like grouping in a report (4.4). For example, an earlier step fetched this month’s sales and you want sales by region.

  1. Add a step and choose the action group-total.
  2. Rows: the rows to group: an earlier step’s rows in braces, for example {steps.sales.output.rows}.
  3. Group by: the columns that make a group, separated by commas, for example region, customer. Leave it empty to total everything as one group.
  4. Name the columns to total, each under one kind of total:
    • Add up: for example amount, tax.
    • Average, Lowest, Highest: numbers only, as in a report.
    • Count: how many rows in the group have a value in that column.
    • Count different values: for example customer, to see how many customers each region had.
  5. Under Totals, optionally:
    • tick Grand total for a last row with the totals of everything;
    • fill in Subtotals at with a Group by column, for a subtotal after each of its values.

The step gives later steps:

  • rows: one per group. A subtotal or grand-total row says Total in its first empty group column, as a spreadsheet does, so an emailed or exported table reads naturally.
  • total: the grand total on its own, for example {steps.group.output.total.amount} in an email or a condition.
  • count: how many groups there were.

It uses the same engine as reports, so a workflow and a report given the same rows show the same totals.

If a column you name is in none of the rows, the step stops and says which one, along with the columns the rows do have. That’s usually a typo.

How it starts

Click the gear beside the workflow’s name.

  • Starts when: Someone presses Start, Another system calls it, On a schedule, or A job finishes.
  • What comes in: paste an example of what arrives, such as { "employeeId": "E-1042" }. Each field becomes one input of the workflow, and steps use it as {params.employeeId}. A run missing a required input is refused before any step runs.
  • When it starts on its own (a schedule or a job), say what each input is filled with, such as the period it runs for.

It starts on its own only once the workflow is Published.

Run and publish

  • Run opens the run panel: start it now, see each step’s progress, and every run before it, step by step.
  • Set the status to Published when it’s ready. Draft is for work in progress.
  • Save.

A workflow can also start when a job finishes: that’s what After this job saves.

Who can use Workflows: by default, company admins and creators.

Next: 08.1 Predictions

Last updated 30 October 2026