Logic Building Block
Logic building blocks are essential for controlling the flow of a workflow. These blocks allow users to implement decision-making layers and designate completion points. The current logic building blocks include:
- Start: By default, serves as entrypoint for workflow.
- If/Else: Enables conditional branching based on input conditions.
- End: Marks the completion of a specific workflow branch.
1. Start Block
Definition
The Start Block serves as the entry point for a workflow. It initializes the process by gathering essential information, such as user inputs in various formats, to support the seamless execution of the application and downstream workflow nodes.
Configuring the Start Block
The Start Block configuration includes two sections:
- Input Fields: Used to collect additional information from users.
- Preset System Variables: Built-in variables available for workflow operations.
Input Fields
Input fields are defined by application developers to gather necessary context from users. This data enables workflows to produce tailored and accurate outputs.
Example: In a weekly report application, users might provide their name, work date range, and specific work details to ensure accurate report generation.
Supported Input Field Types
Type | Description |
---|---|
Text | A short text field where users can input up to 256 characters. |
Paragraph | A long text field for users to input detailed or extended content. |
Select | A dropdown with fixed options predefined by developers; users can only select from these options. |
Number | A field that accepts only numerical input. |
2. End
The End Block defines the final output of a workflow and serves as the termination point for a workflow branch. Every workflow must include at least one End Block to output the final result after the workflow completes execution.
Once an End Block is reached, the workflow stops processing further nodes in that branch, and results are generated. In workflows with conditional branching, multiple End Blocks may be required to ensure each branch terminates properly and outputs its results.
The End Block must specify one or more output variables, which can reference the output variables of any upstream nodes within the workflow. These variables define the content of the final output.
3. Conditional If/Else
Description:
The If/Else block evaluates specified conditions and directs the workflow to one of the defined branches based on the results. It supports multiple types of conditions and logic operators, ensuring flexible and dynamic control of your workflow.
How to Configure:
Use the table below for guidance:
Configuration Parameters | Configuration Instructions |
---|---|
Condition |
|
Elif (Optional) |
|
Else |
|
Supported Conditions:
- String/Array[String] Input Type:
- contains
- not contains
- starts with
- ends with
- is
- is not
- is empty
- is not empty
- Number Input Type:
- equals (
=
) - smaller than (
<
) - smaller or equal to (
≤
) - greater than (
>
) - greater than or equal to (
≥
) - not equals (
≠
) - is empty
- is not empty
- equals (
Outcome:
Directs the flow to the corresponding branch (If, Elif, or Else).