Logic Nodes
Branching and comparison: switches route execution based on a value, routers pick one of several paths, and the boolean nodes combine conditions. See Switches for how conditional flow works in graphs.
12 nodes.
| Node | Registry path |
|---|---|
| AND Router | core/ANDRouter |
| Apply Default | core/ApplyDefault |
| As Bool | core/AsBool |
| Case | core/Case |
| Case Router | core/CaseRouter |
| Coallesce | core/Coallesce |
| Invert | core/Invert |
| Make Bool | core/MakeBool |
| OR Router | core/ORRouter |
| RSwitch | core/RSwitch |
| RSwitch Advanced | core/RSwitchAdvanced |
| Switch | core/Switch |
AND Router
core/ANDRouter
Route a value based on AND logic where all of a - d are truthy (if connected)
Truthy values are considered as True, False and None are considered as False
If a value is provided, it will be returned if the result is True If no value is provided, True will be returned on the output activated through the result, the other output will be deactivated
Inputs
| Input | Type | Description |
|---|---|---|
a |
bool |
flag A |
b |
bool |
flag B |
c |
bool |
flag C |
d |
bool |
flag D |
value |
any |
value to route to the activated output (optional) |
Outputs
| Output | Type | Description |
|---|---|---|
yes |
any |
if the result is True |
no |
any |
if the result is False |
Apply Default
core/ApplyDefault
Applies a default value if the input value is UNRESOLVED
Inputs
| Input | Type | Description |
|---|---|---|
value |
any |
(optional) value to apply the default to |
default |
any |
the default value to apply |
Outputs
| Output | Type | Description |
|---|---|---|
value |
any |
the value with the default applied |
Properties
| Property | Type | Default | Description |
|---|---|---|---|
apply_on_none |
bool |
False |
If True, the default will be applied if the value is None |
apply_on_unresolved |
bool |
True |
If True, the default will be applied if the value is UNRESOLVED |
As Bool
core/AsBool
Converts a value to a boolean
This specfically handles UNRESOLVED by casting it to a default value
Inputs
| Input | Type | Description |
|---|---|---|
value |
any |
(optional) value to convert |
Outputs
| Output | Type | Description |
|---|---|---|
value |
bool |
boolean value |
Properties
| Property | Type | Default | Description |
|---|---|---|---|
default |
bool |
False |
The default value to return if the value is UNRESOLVED |
Case
core/Case
Route a value based on attribute value check (exact match) like a switch / case statement.
When no attribute_name is set, the value is cast to a string before comparison, so case values should be given as strings.
Inputs
| Input | Type | Description |
|---|---|---|
value |
any |
value to check |
Outputs
| Output | Type | Description |
|---|---|---|
a |
any |
if the value matches case A |
b |
any |
if the value matches case B |
c |
any |
if the value matches case C |
d |
any |
if the value matches case D |
none |
any |
if the value matches no case |
Properties
| Property | Type | Default | Description |
|---|---|---|---|
attribute_name |
str |
"" |
The attribute name to check for the value |
case_a |
str |
"" |
The value to compare to for case A |
case_b |
str |
"" |
The value to compare to for case B |
case_c |
str |
"" |
The value to compare to for case C |
case_d |
str |
"" |
The value to compare to for case D |
Case Router
core/CaseRouter
Route one of several input values based on a check value match, like a switch / case statement with a single output.
The check value (or its attribute) is cast to a string before comparison, so case values should be given as strings. The input of the first matching case is routed to the value output; if no case matches, the default input is routed instead.
Inputs
| Input | Type | Description |
|---|---|---|
check |
any |
value to check |
a |
any |
(optional) value to route for case A |
b |
any |
(optional) value to route for case B |
c |
any |
(optional) value to route for case C |
d |
any |
(optional) value to route for case D |
default |
any |
(optional) value to route if no match |
Outputs
| Output | Type | Description |
|---|---|---|
value |
any |
the value of the matching case or default |
Properties
| Property | Type | Default | Description |
|---|---|---|---|
attribute_name |
str |
"" |
The attribute name to check for the check value |
case_a |
str |
"" |
The value to compare to for case A |
case_b |
str |
"" |
The value to compare to for case B |
case_c |
str |
"" |
The value to compare to for case C |
case_d |
str |
"" |
The value to compare to for case D |
Coallesce
core/Coallesce
Takes a list of values and returns the first truthy value
A value is considered truthy unless it is None, False, or UNRESOLVED (0 and empty strings count as truthy). If no input qualifies, the output is UNRESOLVED.
Inputs
| Input | Type | Description |
|---|---|---|
a |
any |
(optional) value A |
b |
any |
(optional) value B |
c |
any |
(optional) value C |
d |
any |
(optional) value D |
Outputs
| Output | Type | Description |
|---|---|---|
value |
any |
the first truthy value |
Invert
core/Invert
Takes a boolean input and inverts it
Inputs
| Input | Type | Description |
|---|---|---|
value |
bool |
boolean value |
Outputs
| Output | Type | Description |
|---|---|---|
value |
bool |
inverted boolean value |
Make Bool
core/MakeBool
Creates a boolean value
Outputs
| Output | Type | Description |
|---|---|---|
value |
bool |
boolean value |
Properties
| Property | Type | Default | Description |
|---|---|---|---|
value |
bool |
True |
The boolean value |
OR Router
core/ORRouter
Route a value based on OR logic where any of a - d is truthy (if connected)
Truthy values are considered as True, False and None are considered as False
If a value is provided, it will be returned if the result is True If no value is provided, True will be returned on the output activated through the result, the other output will be deactivated
Inputs
| Input | Type | Description |
|---|---|---|
a |
bool |
flag A |
b |
bool |
flag B |
c |
bool |
flag C |
d |
bool |
flag D |
value |
any |
value to route to the activated output (optional) |
Outputs
| Output | Type | Description |
|---|---|---|
yes |
any |
if the result is True |
no |
any |
if the result is False |
RSwitch
core/RSwitch
Checks if the check value is truthy
If the check value is truthy, the yes input is routed to the output, otherwise the no input is routed to the output
A value is considered truthy unless it is None, False, or UNRESOLVED (0 and empty strings count as truthy)
Inputs
| Input | Type | Description |
|---|---|---|
check |
any |
(optional) value to check |
yes |
any |
(optional) value to return if the check value is truthy |
no |
any |
(optional) value to return if the check value is not truthy |
Outputs
| Output | Type | Description |
|---|---|---|
value |
any |
the value to return |
RSwitch Advanced
core/RSwitchAdvanced
Checks if the check value is truthy
If the check value is truthy, the yes input is routed to the yes output, otherwise the no input is routed to the no output (the other output stays UNRESOLVED)
A value is considered truthy unless it is None, False, or UNRESOLVED (0 and empty strings count as truthy)
Inputs
| Input | Type | Description |
|---|---|---|
check |
any |
(optional) value to check |
yes |
any |
(optional) value to return if the check value is truthy |
no |
any |
(optional) value to return if the check value is not truthy |
Outputs
| Output | Type | Description |
|---|---|---|
yes |
any |
the value to return if the check value is truthy |
no |
any |
the value to return if the check value is not truthy |
Switch
core/Switch
Checks if the input value is not None or False
If the value is truthy, the yes output is activated, otherwise the no output is activated
Inputs
| Input | Type | Description |
|---|---|---|
value |
any |
value to check |
Outputs
| Output | Type | Description |
|---|---|---|
yes |
any |
if the value is truthy |
no |
any |
if the value is not truthy |
Properties
| Property | Type | Default | Description |
|---|---|---|---|
pass_through |
bool |
True |
If True, the value will be passed through to the output, otherwise True will be passed through |