The IfThenElse command

The IfThenElse command is used to provide conditional branching of sub-processes and processes within EC Gateway process execution.

The FileSize command determines if the file size is greater than zero.

A condition can be set, with resultant actions defined for both true and false testing of the condition, with the else statement being optional. The following parameters can be defined from this window.

Field

Description

Label

Specifies the unique label of this process command. This label allows other commands to branch to this command. The label that you type here appears in the Label column on the EC Gateway Process Window.

Disable command

Disabling the command will allow temporary modification of the process statements. This allows for testing of the statements for error-free robustness. The command that has been disabled will not show in the script file (.pfs file).

Left

Conditional operand number 1. You can select an operand by clicking on the arrow icon beside this field. There are four variable choices for this parameter. Clicking on the first choice, LastStatus will populate the field with this option. Clicking on the second choice, FileSize will populate the field with this option. The third choice is Parameters and the final choice is Count.

Operator

A mathematical operation to be performed between the two conditional operators. You can select an operation to be performed by clicking on the arrow icon beside this field. The choices include some or all of the following depending on your choice for the Left parameter:

  • EQ (equals)

  • NE (not equal to)

  • LT (less than)

  • GT (greater than)

  • LE (less than or equal to)

  • GE (greater than or equal to)

Right

When the user clicks on the arrow icon beside this field, several options display based on the parameters previously chosen. The options are Parameters, Count, Constant, Successful and Failed. Successful and Failed define the result of the condition.

If True

Process to be executed if the condition is true (mandatory). You can select a process by clicking on the arrow icon beside this field. There are four variable choices available for this parameter. Clicking on the first choice, Do Process… will cause the Select a Process window to open. Clicking on the second choice, GoTo… will cause the Select the Label for GoTo Command window to open. The user is prompted to enter the label name. Clicking on the third choice, Return, will populate the field with this choice. Clicking on the final choice, Exit will populate the field with this choice.

Else

Process to be executed if the condition is false (optional). You can select a process by clicking on the arrow icon beside this field. There are four variable choices available for this parameter. Clicking on the first choice, Do Process… will cause the Select a Process window to open. Clicking on the second choice, GoTo… will cause the Select the Label for GoTo Command window to open. The user is prompted to enter the label name. Clicking on the third choice, Return, will populate the field with this choice. Clicking on the final choice, Exit will populate the field with this choice.