Configuring conditional processing

To enable conditional processing of documents, you must insert decision points and rules in a task route. Decision points allow you to define one or more rules in priority evaluation order. If a rule returns true, the task route processing continues with the task or decision point that follows this rule.

About this task

Decision points can be inserted anywhere in the task route. You must add and configure rules following a decision point to determine what path in a task route is followed to process a document.

If a rule returns true, the document moving through the task route is processed by the task that follows the rule or, if this path contains further decision points, further rules are evaluated. If a rule returns false, the next rule for this decision point is evaluated.

A rule is made up of a Boolean expression, which results in a value of true or false when evaluated. The default clause for a newly created rule is to return true. This is known as an Always True rule. You can use an Always True rule as a catch all when all other rules fail evaluation.

For conditional processing, you configure advanced evaluation criteria for the rule. An advanced expression for a rule consists of at least one operator and its required operands, which is the root expression. You can also nest expressions making up an expression tree to build comprehensive evaluation criteria. The root expression for a rule always returns a Boolean true or false when evaluated. If there are no more rules and the last rule returns false, processing skips to the end of the task route.

After you inserted a decision point and added rules, you can set the order in which the rules are evaluated. The order of rule evaluation that is defined in the decision point is crucial.

If you do not apply any rules to a task route, documents take a straight processing path through a task route with no alternative directions.

Procedure

To allow for conditional processing of documents:

  1. Add a decision point.
    You can follow each decision point with another decision point to create complex conditions.
  2. Configure rules.
    Add new rules or edit existing ones.
    1. In the configuration pane, enter a name and a description for the rule.
      Make sure to give every rule a descriptive name.
    2. In the Configure Rule section, select the type of rule that you want to configure:
      Always True

      This is the option to capture all documents. Ideally, you should use mutually exclusive options for all expected options and an Always true rule to catch errors. The Always true rule is always the last rule in a rule set, serving as a catch all when all other rules fail evaluation. You cannot define more than one Always true rule.

      If you add an Always true rule, include a separate audit log task. Note that documents moving down this path are recorded as being successfully processed.

      If you do not use an Always true rule and all rules return false, the document is filtered out altogether. The processing of the document passes immediately to the end of the task route and stops. In this case, none of the audit log tasks that are included in a path after the decision point records a result for this document. However, a warning message in the form No rules apply for work item '%|1$|',.... is written to the IBM® Content Collector Task Routing Engine service log file.

      Advanced
      This is the option to configure a rule for conditional processing of documents. Launch the Expression Editor by clicking the button to the right of the box showing the expression tree (Launch Expression Editor button).
    3. Use the Expression Editor to build or adapt the expression that will serve as the evaluation criterion for the rule.
      See the topic about editing expressions for more information about the Expression Editor.
  3. Set the order in which rules are evaluated.
    When you click the decision point, a list of rules is displayed. Select a rule to reorder and use the arrows to move the rule up or down in the evaluation order.
    In the task route designer pane, the rule name is preceded with an integer value that indicates its evaluation order.

What to do next

Add further decision points and rules as required. Content Collector checks the number and position of Always true rules. If you configured more than one such rule or if the Always true rule is not configured as the last rule, an error message is displayed.