Configurable IF/CASE Switch

A configurable IF/CASE switch with changeable port types and varying number of output ports. Output ports can be replaced with Flow Variable ports where required. The active port is determined by the value of the selected integer variable with behaviour according to the node settings when the value is out of range, as follows:

All - All outputs will be active if the value is outside the range

Fail - The node execution will fail if the value is outside the range

Modulo Reduction - the value range is the remainder after dividing by the number of ports

Nearest in Range The first or last port is used if the value is beyond those limits

In all cases, the range is either 0 - (number of output ports - 1), or, if the 'Count negative values from end' option is selected, -(number of output ports) - (number of output ports - 1)

This node was developed by Vernalis Research . For feedback and more information, please contact knime@vernalis.com

Options

Variable
The variable to use
Count negative values from end
If selected, this option means negative variables will be used to count from the last port downwards, e.g. -1 is the last port, -2 the second last etc
Out-of-bounds behaviour
The behaviour of the node if the variable value is out of the range of the number of ports. See above for details
Variable output at port [n]
Whether the output port with the given index [n] is replaced with a flow variable port

Input Ports

Icon
The input port, which can have its type changed

Output Ports

Icon
The first output port. The type can be changed between 'data' (which corresponds to the same as the input) and 'flow variable'
Icon
The second output port. The type can be either 'data' or 'flow variable' as above
Additional output ports. The type can be either 'data' or 'flow variable' as above (this can be changed in the node dialog)

Popular Predecessors

  • No recommendations found

Popular Successors

  • No recommendations found

Views

This node has no views

Workflows

  • No workflows found

Links

Developers

You want to see the source code for this node? Click the following button and we’ll use our super-powers to find it for you.