Function and action

A rule is made up of one or more functions. A function consists of one or more actions.

An action represents the code that runs a particular elemental operation on the objects of a document. A function is started in the order in which it appears in the rule. If an action fails, the function that called it exits unsuccessfully, and the next function in the sequence runs. If the action succeeds, the next action in the function runs. If all actions of a function run successfully, the rule that called the function exits successfully.

By using this approach, you can construct efficient processing rules without coding.

For example, in a rule that is used to identify the type of page (“Page identification” rule), several functions can be assembled in a fallback sequence. Run the most efficient functions first. Each function implements a specific recognition technology. You can set up the rule to call the following functions:
  • Identify by using fingerprint
  • Identify by using text match
  • Identify manually

Manual identification, which is merely flagging the page for a subsequent user-attended task, is called only after fingerprint and text matching fail. If the fingerprint matching function succeeds (all of the actions in the function succeed), the “Page identification rule” exits, and the subsequent functions are not run.