Skip to main content
The Extraction Rules activity is compiled to check the validity of the element properties used to specify the search conditions for image objects.

Compilation Checks

The following are checked:
  1. Element properties. Element properties used to specify object parameters and search regions should only link to elements in the Search Elements tree located above the element being searched for. If this is not the case, the program will indicate the invalid elements.
  2. Field properties. Field properties should not contain links to excluded elements or elements that do not exist.
  3. Regular expressions in FlexiLayout language:
    • The code should not contain any syntax errors.
    • Additional conditions specified in the Search Conditions section should only refer to elements described in the Search Elements tree located above the element being searched for. Additional conditions specified in the Hypotheses Evaluation section should only refer to the element being searched for and elements located above it in the Search Elements tree.
    • All global constants used in the code should be defined.
    • All variables used in the code should be defined and initialized.
    • The code itself should call only those entities that are available in that particular section of the code.
    • Elements of one type should not be given properties of elements of another type (e.g. Static Text cannot have a Max width property).
The Extraction Rules activity is compiled automatically when you exit the activity editor and when you click Match or Test Activity. If compilation detects any errors, matching cannot proceed. Any search elements with errors will be marked with an error icon. Hover your mouse over this icon to see a detailed error description. To proceed, you must correct the errors, making sure that your activity meets the criteria listed above.

Matching Process

Matching is a process whereby Advanced Designer looks for the image objects that meet the conditions specified in the elements’ properties. The program will go down the Search Elements tree attempting to locate all the objects described by the elements, one by one.

Matching Example

Suppose that we have a group element A consisting of two simple elements a and b and of one group element B consisting of elements aa and bb. Suppose further that we additionally have two simple elements c and d. Elements A, c, and d will have the same level of nesting. When matching the Extraction Rules activity, the program will attempt to locate the corresponding objects in the following order: a, b, aa, bb, c, and d.
Element A
    Element a
    Element b
    Element B
        Element aa
        Element bb
Element c
Element d
If the program can locate the objects corresponding to all the required elements, matching will succeed. If the program fails to detect at least one required object, matching will stop and you will need to edit the activity.

Matching Commands

To match the Extraction Rules activity, you can use one of the following commands:
  • Match matches the activity to the selected documents without displaying the results on the Results tab of the Activity Editor. This method can be used when debugging the activity to check the validity of the properties of a specific element.
  • Test Activity matches the activity to each document in the activity set. Matching results are displayed in the statistics and are used to compare the matching quality of the current version of the Extraction Rules activity against its earlier versions.
Note: The compilation and matching status of the Extraction Rules activity is displayed in the notification log (available by clicking the bell icon in the upper right corner). You can use the notification log to navigate to the matching results by clicking the appropriate notification.

Verify Activity

To quickly check the Extraction Rules activity for errors, click the more icon and then click Verify Activity. The Extraction Rules activity will be compiled, but no matching will be performed.