The variable comparison operator compares the input variable with
a value that is either fixed or variable. The operator evaluates a comparison
condition to determine whether the output is true or false.

The operator supports four types of comparisons:
- Numeric
- Compares the numeric input variable with a numeric value.
- String
- Compares the string input variable with a string value.
- Boolean
- Checks whether the input variable value is true or false.
- Null
- Checks whether the input variable value is null or not null.
The variable comparison operator can be used either as a stand-alone operator
in a control flow or in conjunction with other control flow operators. After
you place the operator onto the canvas, you can select it to view and define
its properties.
Ports
Unlike other control flow operators, which have the on-success, unconditional,
and on-failure output ports, the variable comparison operator has the following
three output ports:
- True
- This port starts the processing branch if the variable comparison operation
returns true.
- False
- This port starts the processing branch if the variable comparison operation
returns false.
- On-failure
- This port starts the processing branch if an error occurs while processing
the comparison condition in the operator.
The on-failure path and the false output path have significant differences.
If the comparison evaluates to false, the output uses the false output port;
however, the overall execution of the variable comparison operation is still
a success. If the execution of the comparison process returns an error, the
variable comparison operation fails, and the on-failure port is used. Some
of the possible scenarios when an error can occur are:
- Invalid operation
- A numeric comparison is done on a string object.
- Invalid value
- A string value is given to a variable of numeric type. The Design Studio
does not allow you to enter an invalid value at design time; a validation
error message is displayed. However, you can enter an invalid value at run
time.
If the input variable or a value in the comparison operator evaluates to
null for a numeric, string, or boolean comparison, the false output port will
be used. The on-failure output port is not used.