AutoStore: How to Fail a Job using Data Filter Validate

There may be instances when processing a document through AutoStore needs to fail in order to prevent the job from reaching other parts of the intended workflow. Let's consider documents that are captured from a multi-function device which contain barcodes on the pages.

The Barcode component can detect a barcode, and when one is found, it can (1) split the job, or (2) read the value. For either of these actions to be achieved, a barcode would need to be on the page.

Sounds simple enough, but what's tricky is how to know whether any given page should or should not actually have a barcode. In other words, under what condition should we know there is no barcode.

For example, perhaps a given job should have a barcode on every single page, maybe the job should have a certain number of pages with a barcode on it, or possibly a barcode value needs to be present on exactly page n.

Because a logical determination needs to be performed to make that decision, it sounds like this might actually be at the heart of the question. How to fail a job could vary, but let's take at a simple example where the job should have exactly 3 pages with a barcode.

A simple way to establish the job-fail condition would be to use the Data Filter. In it, we'll look at 2 different filters: The Equals To filter and the Validate filter.


For the Equals To filter, we could give it a name of "EqualsTo3", add the Barcode RRT for "Count of pages with barcode" to the "Input" field, and enter "3" in the "Equals To" field.


For the Validate filter, in the "Fail job if" field, we can add the Data Filter RRT we just created named "EqualsTo3", and in the "Message" field, we can enter the message we want to show in the Status Monitor, such as "The job does not have 3 barcode pages, so this job will fail."


When a job is run where the number of pages that have a barcode is not equal to the number we need, the job fails, and the Status Monitor indicates that failure. The AutoStore log is updated, the job is sent to the AutoStore task's Reject folder, and the job is failed.



Comments

Popular posts from this blog

VBScript: Ensure Backslash Folder Path

AutoStore: Create a Custom RRT

AutoStore: Workflow Loop Example