Rule Execution

Rule execution refers to how rules are associated with specific objects in the document hierarchy and how Datacap processes a batch of documents.

The Datacap workflow moves batches through the workflow from task to task. Task profiles are implemented as rulesets, which are constructed by using rules and actions.

You can use the Datacap Studio debugging tools to step through the PageID task profile and see how Datacap runs the rules.

A ruleset consists of one or more rules that contain functions and actions. When you run a rule, you are running the functions and actions that are in them.

The following example describes the execution flow that allows actions to run by using an if, then, else programming model.

Run a rule:
for each function in the rule
    for each action in the function
        run the action
        if the action returns false, exit from this function
    next action in the function
    if the last action in the function returns true, exit from this rule
next function in the rule
if the last action that is run returns true, then the rule result is true, 
else the rule result is false
For validation rules, true means that validation passed, false means that it failed

The actions that are frequently used to control rules execution flow are rrCompare, rrCompareNot, GoToNextFunction, and SetReturnValue.