The order of rule execution closely follows the document hierarchy, starting with the batch, proceeding to the document, and continuing down to the field level.
The following pseudocode describes the order of rule execution.
for each ruleset in the current task profile
run batch-level "Open" rules
for each document type
run document-level "Open" rules
for each page type in the current document type
run page-level "Open" rules
for each field in the current page type
run field-level "Open" rules
run field-level "Close" rules
next field
run page-level "Close" rules
next page
run document-level "Close" rules
next document
run batch-level "Close" rules
next ruleset