Node Types
A flow in the Agama Flow Visual Editor comprises several connected nodes.
Each node represents an Agama DSL directive.
Each node also allows the user to pass parameters to the underlying Agama DSL directive.
Adding a New Node
When the user drags the connector, Agama Lab presents a list to choose the next node on the connector’s other end.
Types Of Nodes
Start
Every flow starts with a Start
node. The Start
node helps set up the header fields and input.
Assignment
Assignment node
is used to assign a value or a literal to a variable. The assignment node can work on multiple variables.
Call
Business logic and complex computations can be implemented in languages other than Agama. This external code is called foreign routine. The Call
node is used to call such foreign routines. The result of the computation done by the foreign routine is brought back to the flow and stored in a variable that can be used further in the flow.
The Trigger
node allows one flow to call another flow and retrieve results. The ability to call a separate flow enables the Agama flow to be more modular, reusable, and customizable using subflows and template overrides.
Iterate
The Iterate
node allows iteration over lists, maps, and string values. Using the configuration parameters provided on the form, it writes the Iterate Over instruction of the Agama DSL.
Repeat
The Repeat
node provides a loop construct to the Agama flow.
It represents the Repeat instruction of the Agama DSL.
Quit-when
The Quit-when
block allows aborting a loop based on certain conditions. The loop can be a Repeat or Iterate block.
Log
The Log
node writes log messages to log files. It represents the Log instruction of the Agama DSL.
RRF
RRF
stands for Render-Reply-Fetch
. Using the configuration parameters provided on the form, it writes the RRF instructions of the Agama DSL to the auto-generated code.
RFAC
The RFAC
stands for Redirect and Fetch at Callback
. Using the configuration parameters provided on the form, it writes the RFAC instruction of the Agama DSL to the auto-generated code.
When
The When
node provides the ability to execute a condition and make decisions based on the outcome.
Using the configuration parameters provided on the form, it writes the When instruction of the Agama DSL to the auto-generated code.
When
block has three branches where the flow of execution may continue.
Condition met
: Blocks on this branch are executed if the condition is evaluated totrue
.Otherwise
: Blocks on this branch are executed if the condition is evaluated tofalse
.Continue
: If theCondition met
orOtherwise
branches do not end the flow, then the flow will continue to execute the blocks on this branch after completing the execution on the respective branch.
Their branches logically represent the code shown below:
When (condition)
// execute blocks on the `condition met` branch
Otherwise
// execute blocks on the `otherwise` branch
// Execute blocks on the `continue` branch
The Finish
node denotes the end of the flow. Using the configuration parameters provided on the form, it writes the Finish instruction of the Agama DSL to the auto-generated code.