Variable Creator

This node allows the creation of flow variables of different types and custom values.
Notes:

  • The variables defined by this node take precedence over upstream ones (on the Variable Inport). Thus upstream variables will get overridden by defined variables with the same name and type. The node will notify you in the case this happens.
  • It is possible to define variables with the same names but different types as already defined upstream variables. However, keep in mind that this will probably lead to unexpected behavior downstream and should thus be avoided.
  • The node will automatically add a variable called “variable_1” when it is initailly created, even before you configure it.

Options

Add
This button can be used to define a new variable.
Type
This is the type of the variable to create. Depending on the type the requirements for the variable value may change.
The following five basic data types are supported:
  • String: A string of characters. This is the default if a new variable is created.
    The default value is an empty string.
    Note: The node will inform about a string that is empty or does only contain spaces because this is probably unwanted.
  • Integer: An integer number with possible values from 2³¹-1 to -2³¹. The value must be a valid number (consisting only of an optional sign (“+”/“-”) and “0”-“9”) and be in the range above.
    If the size of your value exceeds the limits above, you can try to use a Long or Double value instead.
    The default value is “0”.
  • Long: An integer number with possible values from 2⁶ª-1 to -2⁶ª. The value must be a valid number (consisting only of an optional sign (“+”/“-”) and “0”-“9”) and be in the range above.
    If the size of your value exceeds the limits above, you can try to use a Double value instead.
    The default value is “0”.
  • Double: A floating point decimal number with possible values from around 4.9·10⁻³²⁴ to 1.8·10³⁰⁸ in both the positive and negative range.
    The value must be a valid number (consisting only of an optional sign (“+”/“-”) and “0”-“9”). You can specify an exponent by appending “e” followed by the exponent. Apart from a numeric value you can also specify one of the following three (case-sensitive) special values: Infinity for positive infinity, -Infinity for negative infinity and NaN for “Not a Number”.
    If the number is too big or too small, it may be converted into one of the these special values. (You will be warned if this happens).
    You should keep in mind that you may loose some precision for big values or values that are very close to zero.
    The default value is “0.0”.
  • Boolean: A truth value that can be either “true” or “false”.
    The default value is “false”.
    Note: Any other value will be interpreted as “false”.
Variable Name
This is the name of the variable. You can use any characters to define your name. However, a name must not be empty or be used by other variables you have already defined in the node (regardless of the variable type).
Value
The value of the variable. It must comply with the type-requirements as described above.
Move/Remove variable
To improve readability of your variables (e.g. grouping all values of a specific type) you can change their order by using the arrow buttons at the end of the row.
If you wish to delete a variable definition, you can use the button with the bin icon next to the move buttons.

Input Ports

This node has no input ports

Output Ports

Icon
Created flow variables

Views

This node has no views

Workflows

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.