Skip to content
v2.7 (latest)
Step-by-step instructions for creating a basic workflow in Rulecube.

Create a Basic Workflow ​

This guide explains how to create a workflow in Rulecube. It covers the minimum steps to set up a working workflow with a start, one or more action steps, and an end.

This guide assumes you are familiar with workflows. If not, see Workflows for a conceptual overview, or follow the Tutorial: Using Workflows first.

Step 1: Enable the Workflow option ​

  1. Create a new ruleset or open an existing one.
  2. Click Version settings in the left menu.
  3. Select the Workflow checkbox.
    ↳ Rulecube converts the ruleset into a workflow. It adds a Workflow option to the left menu, and creates a state input and a State entity automatically.

Step 2: Define your state properties ​

The State entity holds data that persists across workflow steps. Add a property for each value you want to track.

  1. Click Entities in the left menu.
  2. Select the State entity.
  3. Click Add property for each value you want to track across steps.
  4. Set the Name, Type, and optionally a Default value for each property.
  5. Click Save.

Step 3: Build the workflow canvas ​

  1. Click Workflow in the left menu.
    ↳ The workflow canvas opens. A Start step and an End step are already present.
  2. Drag one or more step types from the panel onto the canvas. Common step types:
    • Action - executes code and moves to the next step automatically
    • Switch - evaluates a condition and routes to different steps based on true or false
    • Wait - pauses the workflow until an external signal is received
  3. Click a step to open its details panel. Set a Step name and optionally a Description.
  4. Connect steps by clicking the circle on a step, holding, and dragging to the next step.
    ↳ For Switch steps, Rulecube asks you to name each connection (e.g. true / false).
  5. Make sure every path through the canvas ends at the End step.

Step 4: Add expressions to each step ​

  1. Click a step on the canvas.
  2. Enter the JavaScript expression for that step in the Expression field.
    • Use state.<property> to read or write values that persist across steps.
    • Use return; to move to the next step without returning a value.
    • Use return <value>; to return a value from the workflow.
  3. Repeat for each step.
  4. Click Save.

Additional resources ​