Run If
In Chapter 6, Managing Files, we created a job that checked for the existence of a file before it tried to process the file (good coding practice!). This used a Run If connector and readers who have already worked through this example will be familiar with its purpose and configuration.
Run If triggers a subjob or component when a defined condition is met, the existence (or non-existence) of a file, if the number of rows returned is greater than 100, and countless other conditions.
A Run If connection is made by right-clicking on the source component, selecting Trigger | Run If, and dropping the connector onto the target component. Click on the connector and enter a condition expression, in Java, into the Condition box.
Condition expressions can be dragged from components in the Outline tab to the Condition box.
Alternatively, pressing Ctrl + Space bar when your cursor is in the Condition box will display a list of global and context variables that can be used as condition expressions...