Skip to content

How a Flow works?

A Flow consists of Tasks and Data. Think of a Task as a unit of execution; any number of Tasks are allowed within a Flow
In the design phase, tasks are formulated and outlined, remaining inactive until the Run phase
The Flow always starts at Start and tasks are executed sequentially
At least one task, excluding Start, is necessary for the Flow to be considered valid and executable
A Flow completes upon reaching an End task or when there are no remaining tasks in the sequence

Design phase

When designing a Flow, it undergoes a validation each time there is a change
When the Flow detects an issue with any task, data, etc., it will change the component’s color to indicate the presence of a problem
Upon accessing it or hovering over it, detailed information about the issue will be displayed

Run phase

Clicking Run Flow initiates the Flow and enters recording mode
During recording mode, the Flow cannot be altered and can only be observed or canceled

Data

Data inspection is possible during both the design and run phases for all tasks, except Start

To view all the data for the current task, right-click on the task and select SHOW DATA
example of right-click on a task which opened contextual menu with option show data


Lepilo employs advanced techniques and is able to identify and assist in correcting logical issues ahead of time

Data access, aside from Globals, is determined by the sequence of tasks. When a task has multiple connections in the input edge from other tasks, the available data will only be accessible at the topmost common task and edge (For-each is an exception to this rule)

ex1. data flow with scoping update example

  1. Data d1 is defined in Globals with value v1
  2. T1 changes d1 value to v2
  3. T2 checks whether d1 is equal v1 and will go to the else edge
  4. T3 changes d1 to v3
  5. T4 logs data d1 which is equal to v3 because it was changed by T3
  6. T4 logs data d1 which is equal to v2 because it is outside of the scope of T3 and T4, T1 is the topmost common task and edge

ex2. data flow where a 2 connection from a task go both into 1 task

  1. T2 ok edge creates data t2ok and error edge creates data t2err
  2. T3 will not see any data from T2 because the top-common task is T1

ex3. data flow single inputs

  1. T2 ok edge creates data t2ok and error edge creates data t2err
  2. T3 sees data t2err because it connects to the error edge
  3. T4 sees data t2ok because it connects to the ok edge

For-each

Allows creating data which is modifiable to all tasks connected to the each edge and only the last assigned value will be available to tasks after the for-each

data flow for-each example

  1. Data list1 is a list of text defined in Globals with values v1 and v2
  2. T1 loops over list1 and defines each data text called text1
  3. T2 assigns text1 the value from the loop, the iteration will be v1 and second will be v2
  4. T3 will see text1 and its value be v2

Data visibility

Holding Ctrl / ⌘ + Shift and hovering over a task, reveals from which task the hovered task can see data

Hovering over T5 data flow visibility example where we have: Start > T1 > T2 > T3 and T4 > T5. Hovering over T5 shows Start and T1

Hovering over T4 data flow visibility example where we have: Start > T1 > T2 > T3 and T4 > T5. Hovering over T4 shows Start, T1 and T2

Globals

Global data is a unique type of data that is accessible and modifiable (based on Immutable) by all tasks, excluding the Start task

Start

The Start is the initial task which is always executed first, where you specify the required input for the Flow to run
Inputs in this stage can be any combination of Text, Bool, Int, Decimal, Date, Struct, Enum and List

Text
Supports defining default value and specifying length limits

Error CodeCause
REQUIREDInput is not present in the request (unreachable when a default value is specified)
INVALID_INPUTInput is not text type
EQUAL_LENGTHInput’s length is not equal to the specified
MIN_LENGTHInput’s length is shorter than specified
MAX_LENGTHInput’s length is longer than specified

Valid values ex. - "hello" "world"

Bool
Supports defining default value and text conversion

Error CodeCause
REQUIREDInput is not present in the request (unreachable when a default value is specified)
INVALID_INPUTInput is not bool type

Valid values ex. - true false "false"

Int
Supports defining default value, minimum/maximum thresholds and text conversion

Error CodeCause
REQUIREDInput is not present in the request (unreachable when a default value is specified)
INVALID_INPUTInput is not int type
MINInput’s value is smaller than specified
MAXInput’s value is bigger than specified

Valid values ex. - 15 "15"

Decimal
Supports defining default value, minimum/maximum thresholds and text conversion

Error CodeCause
REQUIREDInput is not present in the request (unreachable when a default value is specified)
INVALID_INPUTInput is not decimal type
MINInput’s value is smaller than specified
MAXInput’s value is bigger than specified

Valid values ex. - 15.55 "15.55"

Date
Supports defining default value, format, zone and minimum/maximum thresholds

Error CodeCause
REQUIREDInput is not present in the request (unreachable when a default value is specified)
INVALID_INPUTInput is not date type
MIN_PERIODInput’s value is before the specified
MAX_PERIODInput’s value is after the specified

Valid value ex. - "05/01/2024-16:32:19_UTC" (with format DAY/MONTH/YEAR-HOUR:MINUTE:SECOND_ZONE)

Enum
Supports defining default value

Error CodeCause
REQUIREDInput is not present in the request (unreachable when a default value is specified)
INVALID_INPUTInput is not within specified values

Valid value ex. - "FIRST" (out of allowed values FIRST SECOND THIRD)

Struct

Error CodeCause
REQUIREDInput is not present in the request
INVALID_INPUTInput is not struct type

List

Error CodeCause
REQUIREDInput is not present in the request
INVALID_INPUTInput is not list type
EQUAL_LENGTHInput’s length is not equal to the specified
MIN_LENGTHInput’s length is shorter than specified
MAX_LENGTHInput’s length is longer than specified

Text conversion is the process of transforming a text to match the desired type
For example, if the input is received as “true” Lepilo will attempt to convert it to the bool value true

Edges/Connections

Tasks connect to each other through Edges and Connections

Input edge - input edge on a task A single Input edge can be connected to by any number of output edges

Output edge(s) - single output edge on a task multi output edges on a task A single Output edge can only connect to a single Input edge

Example of input edge connected by two single output edges multi input example

Some tasks have special edges that exhibit different behavior than the standard ones, such as those used in For-each task
Every task, except for End features Output edge(s), while every task, excluding Start has an Input edge
Some edges will be executed based on the task’s result. For example, an HTTP request will trigger the OK edge only when the request completes successfully

End

The End is a special task that is meant to stop the execution of the Flow

Platform

Platform is the place where the Flow runs

Web platform executes inside your browser

CLI platform executes on your machine directly trough lepilo-client using the command line/terminal

HTTP platform executes on your machine directly trough lepilo-client using the HTTP protocol

Scheduled platform executes on your machine and allows you to schedule when a Flow should execute
Scheduled Flows can’t overlap; each new scheduled Flow’s timer starts only after the previous one has finished.
For example, if a Flow is scheduled to run every 1 minute starting from 12:00:00 and the Flow’s execution takes 30 seconds.
The Flow will have executions at 12:00:00, 12:01:30, 12:03:00, and so on

lepilo-client is available for Linux, MacOS, Windows

Some tasks are only available on specific platforms, ex. CLI

Run mode

Run mode allows the execution of Flows on your MacOS/Windows/Linux machine

  1. Download the lepilo-client (please see the Platform section)
  2. Run the client:
    Linux/Mac - ./lepilo-client run path_to_flow.lepilo
    Windows - ./lepilo-client.exe run path_to_flow.lepilo

Dev mode

Dev mode allows you to run and develop CLI and HTTP Flows on your MacOS/Windows/Linux machine from the browser

  1. Download the lepilo-client (please see the Platform section)
  2. Start the client:
    Linux/Mac - ./lepilo-client dev
    Windows - ./lepilo-client.exe dev
  3. When lepilo-client starts an ID will be printed
  4. Go to Lepilo.io and your CLI / HTTP Flow
  5. In dev mode position on screen ( make sure ID is correct) and press Connect

HTTP Router mode

HTTP Router mode works similarly to Run mode and allows you to load multiple HTTP flows (with different paths)

  1. Download the lepilo-client (please see the Platform section)
  2. Run the client:
    Linux/Mac - ./lepilo-client http-router path_to_flow1.lepilo,path_to_flow2.lepilo
    Windows - ./lepilo-client.exe http-router path_to_flow1.lepilo,path_to_flow2.lepilo

Packed

Packed client embeds your Flow and simplifies usage, you no longer need to specify where your Flow is placed

Running a Packed client is as simple as:
Linux/Mac - ./your-flow-name run
Windows - ./your-flow-name.exe run

The creation of Packed client requires Lepilo Connected

Packed client do not include Run mode and HTTP Router mode

Other

Holding Alt / ⌥ (option on Mac) allows quick access to delete tasks/connections