Complex branch scenarios
The complex branch scenarios show the flexibility of the generic branch job.
The previous scenarios were based on the evaluation of the status of the parent job. Complex branch job scenarios are based on the evaluation of the job log of the parent job. For a list of the complex conditions, see Terminology.
A complex condition can include multiple subconditions. For example:
- subcondition
1
- Search for the text pattern (supplied as a parameter) within the parent job log.
- In the row where the pattern is found, isolate the numeric value.
- Compare the numeric value with a specified number. For this comparison, use the specified arithmetical operator (supplied as a parameter). If the arithmetical comparison is successful, it returns TRUE.
For example, search for the row that contains the pattern Disk free. If you find it, search for a number within the row. If the number is greater than 90, return TRUE.
- subcondition
2
- Search for another text pattern within the parent's job log.
- If the pattern is found, negate the result and return FALSE (for example, return FALSE if the parent job log contains the pattern Error).
- Connect the first and second subcondition results with a Boolean operator (the Boolean operator is supplied as a parameter, and the possible values are AND and OR).
- Evaluate the final result of the whole condition (TRUE or FALSE).
The defined condition can be very flexible and can cover many typical situations.
The following sections describe several complex branch scenarios to explain how to:
- Search for a specific text pattern within the parent's job log.
- Search for a specific text pattern within the parent's job log. If the pattern is found, search for an additional text pattern within the same row.
- Search for a specific text pattern within the parent's job log. If the pattern is found, search for a numeric value within the same row. If the value is found, compare it against the supplied number using the supplied arithmetical operator.
- Join several conditions into one by using the Boolean AND and OR operators.