Rules are run according to the position of the ruleset within the task profile, and the position of the associated object within the document hierarchy.
Two conditions determine whether a rule is run. A rule runs only when it is associated with a specific object in the document hierarchy. Also, the rule runs only when the parent ruleset is included in the current task profile.
The position of a rule within its ruleset does not affect when the rule is run.
When you run a task profile that has more than one ruleset, Taskmaster runs the rulesets in the order that the Task Profiles pane displays them in Datacap Studio. For example, the PageID task profile, Taskmaster first runs the ImageFix ruleset, and next runs the PageID ruleset.
When Taskmaster runs a ruleset on a batch, it goes through the runtime batch hierarchy iteratively. (Page 1 of Document 1, including the two fields, is processed in its entirety before Taskmaster proceeds to Page 2 of Document 1.)
The following example shows a portion of the document hierarchy for the TravelDocs application. Each object also has a Close element. Taskmaster runs rules in the object's Close element when it exits from the object. For objects at the lowest level of the hierarchy, Close rules run immediately after Open rules. For other objects, the Close rules do not run until Taskmaster processes the lower-level objects.
Other page rules run each time Taskmaster begins processing a page of type Other, which is the default page type that is initially assigned to all pages. For example, if you are running the PageID ruleset, Taskmaster runs the PageID rule, which assigns the correct type to each page.
For the Car_Rental document, there are no document-level rules in this example.
The Rental_Agreement page rules run each time Taskmaster begins processing a page of type Rental_Agreement. For example, if you are running the CreateDocs ruleset, Taskmaster starts the Create Fields rule, which creates a page data file. Taskmaster uses the page data file to store the data that is captured later by the Recognize ruleset.
The Pickup_Date field rule runs when Taskmaster is processing a page of type Rental_Agreement and encounters a field of type Pickup_Date.