Condition flags

Branching and splitting are initiated by using a condition flag that is raised during starting of a rule.

For branching, use the Task_RaiseCondition action to raise the condition flag of the task.

For splitting, use the SplitBatch action to raise the condition flag of the task implicitly.

Branching

In the TravelDocs application, the Batch Document Integrity Check ruleset, under the Document Integrity rule, contains the Batch Route To Fixup function and two related actions, Task_NumberOfSplits and Task_RaiseCondition. In Document assembly, you used the Task_RaiseCondition action to raise a condition flag that determines what happens when the task profile completes. For example, a Batch Route To Fixup function starts only if CheckAllIntegrity returns false.

  • The Task_NumberOfSplits action is required and specifies the number of jobs to which the batch is sent before it returns to the main workflow (almost always 1).
  • The Task_RaiseCondition action specifies the group index (almost always 0) and condition’s index value. For example, the Profiler task can have one condition so the index for this condition is 0.

A batch can be diverted to the Fixup job so that an operator can fix the document integrity problem.

Remember: The branch does not occur until the current task profile is completed.

You update the TravelDocs application to branch when pages require manual identifications.

Splitting

The SplitBatch action implements batch splitting and also raises the condition flag.
Library Action Description
Split SplitBatch Creates one or more child batches that are based on the value of the specified document-level variable.
Attention: You must run the SplitBatch action at the batch level.

Unlike the branching action, the SplitBatch action does not require a condition index. The implied condition index is always 0 (the first condition). For example, a profile task can have three defined conditions, and the SplitBatch action always raises the first condition, which is Split Condition.

The SplitBatch action uses the document-level variable that is specified in the action parameter. This action determines whether a document is split off to a child batch or remains in the parent batch. In this example, you are using a document variable called Split.
SplitBatch("@D.Split")
This example means any document that has a variable Split with any value assigned is split off into a child batch. Furthermore, the value of the Split variable determines into which child batch the document goes. So, documents with <V n="Split">1</V> go into child batch 1 while documents with <V n="Split">2</V> go into child batch 2.
Attention: The values do not need to be numbers. Also, if the value of the variable is the same for all documents, then you get a single child batch.

You implement splitting for the TravelDocs application to split off documents that contain pages that were not recognized during page identification. For more information, see Updating the Routing ruleset to split the batch.