The Condition Pre-processor is used when you want to conditionally skip or execute a subsequent pre-processor(s).
The Condition screen is shown below:
The cascade option provides the ability for a diverged output process to resume the original execution path.
Stage Settings
Condition Operator
Choose from one of AND or OR (usually defaults to AND).
Only relevant if more than one Condition has been configured.
This option allows multiple single conditions to be chained together to build a complex chain of AND’ed or OR’ed conditions.
Conditions
Press the + Button
Then enter or select values for these 3 fields below:
Input Placeholder
Use the placeholder creator builder to create a placeholder value in this field. Will usually contain the a metadata placeholder eg {{metadata[“first_name“]}}
Operator
Choose an operator from this list below.
The operator defines the type of comparison being made between the Input Placeholder value and the Target Placeholder value.
Target Placeholder
A static value or metadata placeholder is specified for the input value to be compared against.
Press the Apply button
Examples
-
Here’s an example of a condition that would diverge when the invoice total field is greater than 2000
-
Here’s an example of a condition that would diverge when the invoice total field is null (i.e.blank, empty)
This second example is very useful if you want to only run a secondary data extraction pre-processor only when the field value returned by the first data extraction pre-processor is blank.
Saving the Condition Pre-Processor
Once the Condition pre-processor is saved it appears like this in the list of pre-processors.
Moving a Pre-Processor into the Condition Processor.
After saving the Conditon pre-processor, the remaining step is to move the desired pre-processor(s) in between the Start and End sections of the Condition pre-processor.
In the example shown below an Azure Content Understanding data extraction pre-processor is only run when one or more of the RIA page fields are blank.
Hint: Visually, the pre-processor is shown as being indented within the Condition pre-processor Start and End rows.
The Condition pre-processor will only run its indented pre-processor(s) if the configured conditions return a TRUE result.
-
When only 1 row of conditions are configured, that single condition must return TRUE for the indented pre-processor to be run.
-
When more than 1 row of conditions are configured:
-
If the condition operator is AND, all conditions must return TRUE for the indented pre-processor to be run.
-
If the condition operator is OR, at least one of the conditions must return TRUE for the indented pre-processor to be run.
-
Saving the RIA Page
Press the Save Button
Testing the Pre-Processor
-
Make sure its enabled.
-
Run an input document through the queue.
-
Use View history button the RIA App Page to look at the pre-processor stages to see whether the the pre-processor ‘Condition(s)’ were evaluated as being True or False.