Fork operator
Overview
The Fork operator controls the flow by creating two or more branches, or sub-flows, that are executed in parallel.
It's useful, for example, when you need to analyze the same text with different models.
It can be the first block of the workflow.
The use of the Fork operator is not mandatory because it is equivalent to directly connect a block to more downstream blocks. It can also be avoided as the first block in a workflow with multiple flows. However, Fork helps making the diagram more readable.
If Fork is used, when you need to join the branches it is suggested you use a Join block for symmetry.
Versions
There are two versions of the component available: 1.0.0 and 1.1.0. Version 1.0.0 is present for backward compatibility with old workflows created with previous versions of NL Flow. For new workflows always use the latest version.
Input
A Fork block doesn't need any input.
Block properties
Block properties can be set by editing the block.
A Fork operator block has these properties:
- Block name
- Component version (read only)
- Block ID (read only)
Output
A Fork block doesn't produce any output.
From the point of view of the implicit input received by blocks immediately downstream, a Fork block is transparent, as if it was not there.
If it is the first block, blocks immediately downstream of it are like at the beginning of a flow so they receive the workflow's input and have no editable input properties (which can be changed by defining the $nlflow_input pseudo-block).
If it is not the first block, blocks immediately downstream of it receive the output of the block immediately upstream of the Fork.