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
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
d1
is defined in Globals with valuev1
- T1 changes
d1
value tov2
- T2 checks whether
d1
is equalv1
and will go to theelse
edge - T3 changes
d1
tov3
- T4 logs data
d1
which is equal tov3
because it was changed byT3
- T4 logs data
d1
which is equal tov2
because it is outside of the scope of T3 and T4, T1 is the topmost common task and edge
ex2.
- T2
ok
edge creates datat2ok
anderror
edge creates datat2err
- T3 will not see any data from T2 because the top-common task is T1
ex3.
- T2
ok
edge creates datat2ok
anderror
edge creates datat2err
- T3 sees data
t2err
because it connects to theerror
edge - T4 sees data
t2ok
because it connects to theok
edge
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
list1
is a list of text defined in Globals with valuesv1
andv2
- T1 loops over
list1
and defineseach data
text calledtext1
- T2 assigns
text1
the value from the loop, the iteration will bev1
and second will bev2
- T3 will see
text1
and its value bev2
Data visibility
Holding Ctrl / ⌘
+ Shift
and hovering over a task, reveals from which task the hovered task can see data
Hovering over T5
Hovering over T4
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 Code | Cause |
---|---|
REQUIRED | Input is not present in the request (unreachable when a default value is specified) |
INVALID_INPUT | Input is not text type |
EQUAL_LENGTH | Input’s length is not equal to the specified |
MIN_LENGTH | Input’s length is shorter than specified |
MAX_LENGTH | Input’s length is longer than specified |
Valid values ex. - "hello"
"world"
Bool
Supports defining default value and text conversion
Error Code | Cause |
---|---|
REQUIRED | Input is not present in the request (unreachable when a default value is specified) |
INVALID_INPUT | Input is not bool type |
Valid values ex. - true
false
"false"
Int
Supports defining default value, minimum/maximum thresholds and text conversion
Error Code | Cause |
---|---|
REQUIRED | Input is not present in the request (unreachable when a default value is specified) |
INVALID_INPUT | Input is not int type |
MIN | Input’s value is smaller than specified |
MAX | Input’s value is bigger than specified |
Valid values ex. - 15
"15"
Decimal
Supports defining default value, minimum/maximum thresholds and text conversion
Error Code | Cause |
---|---|
REQUIRED | Input is not present in the request (unreachable when a default value is specified) |
INVALID_INPUT | Input is not decimal type |
MIN | Input’s value is smaller than specified |
MAX | Input’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 Code | Cause |
---|---|
REQUIRED | Input is not present in the request (unreachable when a default value is specified) |
INVALID_INPUT | Input is not date type |
MIN_PERIOD | Input’s value is before the specified |
MAX_PERIOD | Input’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 Code | Cause |
---|---|
REQUIRED | Input is not present in the request (unreachable when a default value is specified) |
INVALID_INPUT | Input is not within specified values |
Valid value ex. - "FIRST"
(out of allowed values FIRST
SECOND
THIRD
)
Struct
Error Code | Cause |
---|---|
REQUIRED | Input is not present in the request |
INVALID_INPUT | Input is not struct type |
List
Error Code | Cause |
---|---|
REQUIRED | Input is not present in the request |
INVALID_INPUT | Input is not list type |
EQUAL_LENGTH | Input’s length is not equal to the specified |
MIN_LENGTH | Input’s length is shorter than specified |
MAX_LENGTH | Input’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 -
A single Input edge can be connected to by any number of output edges
Output edge(s) -
A single Output edge can only connect to a single Input edge
Example of input edge connected by two single output edges
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
- Download the lepilo-client (please see the Platform section)
- 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
- Download the lepilo-client (please see the Platform section)
- Start the client:
Linux/Mac -./lepilo-client dev
Windows -./lepilo-client.exe dev
- When lepilo-client starts an ID will be printed
- Go to Lepilo.io and your
CLI
/HTTP
Flow - In ( 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)
- Download the lepilo-client (please see the Platform section)
- 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