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 initially created, even before you configure it.

The possible data types for the created variables are:

  • String: A string of characters. This is the default when a new variable is created. The default value is an empty string.
  • 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 (“+”/“-”) or “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 (“+”/“-”) or “0”-“9”) and be in the range above. 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 (“+”/“-”) or “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
    • NaN for “Not a Number”
    If the number is too big or too small, it may be converted into one of these special values. (You will be warned if this happens). You should keep in mind that you may lose some precision for big values or values that are very close to zero. The default value is “0.0”.
  • Boolean: A boolean value, either “true” or “false”. The default value is “false”. Any value that is not equal (ignoring case) to 'true' will be treated as false.

Options

New flow variables
The new flow variables to create.
  • Name: The name of the new flow variable.
  • Type: The data type of the new flow variable. See the node description for more information about the available types.
    • BooleanType: A boolean value, either “true” or “false”. Any value that is not equal (ignoring case) to 'true' will be treated as false.
    • DoubleType: 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 (“+”/“-”) or “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
      • NaN for “Not a Number”
      If the number is too big or too small, it may be converted into one of these special values. (You will be warned if this happens). You should keep in mind that you may lose some precision for big values or values that are very close to zero.
    • IntType: An integer number with possible values from 2³¹-1 to -2³¹. The value must be a valid number (consisting only of an optional sign (“+”/“-”) or “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.
    • LongType: An integer number with possible values from 2⁶ª-1 to -2⁶ª. The value must be a valid number (consisting only of an optional sign (“+”/“-”) or “0”-“9”) and be in the range above.
    • StringType: A string of characters. This is the default when a new variable is created. The default value is an empty string.
  • Value: The value of the new flow variable.

Input Ports

This node has no input ports

Output Ports

Icon
The created flow variables

Popular Successors

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.