Node, Port and Link Logic
To ensure a robust codegen compilation, we have set several rules and logics for nodes, ports and links.
- A node is a Xircuits component.
- Each canvas will have a
Finishnode, which cannot be deleted.
- Nodes can be locked. Nodes that are locked cannot be moved nor deleted.
- All component library nodes must be linked to compile and execute a workflow.
- Each node will have ▶ Ports and optionally parameter ports.
- Parameter Ports are
- You can only link from an
▶ ] Ports
- Flow Ports indicates sequence of execution.
- All flow ports must be linked from
- You cannot create a flow loop.
- You can only link flow ports to flow ports, and parameter to parameter ports.
Compulsory inPortsare rendered
inCompArgindicated with the
- A parameter must be supplied to compile and run the workflow.
Port Type Checking
A port may have a specific type it is expecting, eg
int. Supplying a wrong type will throw out an error tooltip.
An exception to this rule is the
anyport, which will bypass any port type check.
The following table is the port visualization of certain data types. Those not included in the list will simply have the port blank.
Data Type Port UI
- A link is created when you select and drag from a port.
- Linking an
inPortwill indicate data passing between components.
- If a link is not dropped on a port, it will prompt the component tray interface. Selecting one of the components will automatically link the ▶ ports.
- When linking ▶ ports, Xircuits will perform a check whether the parameter port labels have an intersection, and if so, attempt to link it.
- Example: The
out_sparksessionwil be linked to the
in_sparksessionas there is a
- Example: The
dictports, you are able to stack multiple links. For each additional link, the values will be concatenated (if strings) or added (if list or dict).