Find Capture Documents
The Find Capture Document task retrieves a list of pertinent information about Capture documents present in the Capture Database according to a specified set of rules.
This task is most often useful as the beginning of an automated process using a series of Capture documents, for example one that removes old documents to unlock patterns. However, it can also be used as a secondary input in order to retrieve one or more documents after some operations.
The Find Capture Documents task makes multiple simultaneous statements to the database when requesting a list of documents. For this task to work, the option "Allow multiple statements" must be checked in the ODBC connection setup done in the control panel.
Input
Because this task in an Input task, it does not use the current job file in your process, even when used as a secondary input task.
Processing
This task connects to the Capture database and looks up all available documents that meet the criteria specified in the plugin. Then it does further processing to retrieve relevant information about each document and places the information in the data file it generates.
Output
The data file generated by this task is an XML structure containing the data about each document. It also generates metadata that is compatible with post-processing tasks such as the Capture Condition and Get Capture Document tasks.
This metadata includes:
Task Properties
General Tab
- Document-ID Based Condition: Select this option for this task to filter its results using a specific Document ID.
- Document ID: Enter the ID on which you want to filter. The Document ID is a unique identifier of the document when it is stored in the database. It is attributed to the job metadata when the Capture Fields Generator ads it to the Capture database.
- Document-Based Condition: Select this option to set up an advanced filter containing one or more conditions.
- Condition Grid: Displays the list of current condition criteria that were set for document retrieval.
- Filter: The selected filter type. This can be any of the following:
- Document Name: The name of the document, as specified in the Document Name property of the Capture Fields Generator.
- Date Generated: The date, in YYYY-MM-DD format, when the document was generated through the Capture Field Generator.
- Date Closed: The date, in YYYY-MM-DD format, when the document was closed by the Capture Field Processor or Get Capture Document tasks. This field is empty in documents that are still open.
- Pen user (by description): The description of the pen, as entered in the PlanetPress Capture Pen Management Tool. Generally, this is the name of the owner of the pen.
- Pen user (by serial number): The serial number of the pen (aka Pen ID)
- Pattern Sequence: The Pattern Sequence in which a document is entered.
- Template name: The name of the PlanetPress Design document used to generate the Capture document. This is set in the document's properties, in PlanetPress Design.
- Pattern ID: The exact ID of the Anoto Pattern used. This is also called "Pattern Trace Code".
- Content Status: The status of the document as a whole. A document can be Empty (no ink), Partial (some ink but still open), Complete (all mandatory ink is present) or in Error (logical or process error).
- Operator: The choice of the condition operator. The available choices are variable depending on the filter but will be part of the following choices:
- Equal: Inclusive filter, where anything equal (either by string or numeric comparison) is included in the results.
- Not Equal: Exclusive filter, where anything not equal to the condition is included in the results.
- Less Than: Numerical comparison, where anything lower than the specified value is included.
- Greater Than: Numerical comparison, where anything higher than the specified value is included.
- Less than or equal to: Numerical comparison, where anything lower or equal to than the specified value is included.
- Greater than or equal to: Numerical comparison, where anything higher or equal to than the specified value is included.
- Contains: Inclusive string comparison, documents where the specified value is present within the chosen filter are included.
- Does not contain: Exclusive string comparison, documents where the specified value is not present within the chosen filter are included.
- Before: Date comparison, documents of which the date is previous to the specified value are included (Date Generated and Date Closed filters only).
- After: Date comparison, documents of which the date is closer than the specified value are included (Date Generated and Date Closed filters only).
- Last: Date comparison, documents of which the date is within the specified interval are included (Date Generated and Date Closed filters only).
- Older than: Date comparison, documents of which the date is older than the specified interval are included (Date Generated and Date Closed filters only).
- Condition: The condition or value the document needs to meet. The condition is variable dependent on the chosen filter. It can be a drop-down of values, an alphanumerical or numerical value.
- Add button: Click to add a condition row to the grid.
- Remove button: Click to remove the currently selected condition from the grid. To select a row, simply click on any of its 3 components.
- Condition Operator: Select either "All items are met" to force all conditions to be true for a document to be included, or "At least one item is met" to include documents where a minimum of 1 condition is true.
- Create Advanced Data File: Click to retrieve additional information about each document in the result list. These information include each field, the presence of ink on each of them, time stamps, etc. Click here for an example of the XML file.
The Advanced Data File option will generate a high number of queries into the Capture Database, and will be slower than a regular data file by orders of magnitude. Do not use this option unless you are aware of the loss of performance and actually need to access each field's properties individually!
Examples & Use Cases
This task is put into effect in the following use cases and example processes:
On Error Tab
By default, any action task, branch, splitter or condition that generates an error will simply be ignored, and the task just under it (not within a branch) will be given control of the job file without any modification. Any initial input task that generates an error will stop the process from running as a whole, and output tasks will not generate output. The On Error tab can be used to overwrite the default behaviors.
- Send to Process: Check this option to send the job file to an error management process.
- Error Process drop-down: Enabled only when the Send to Process option is checked. Lists any process of which the initial input task is the Input Error Bin task.
- Action Group: This group is disabled in the initial input tasks and defaults to Stop Process. In all other tasks where the On Error tab is present, the following options are available:
- Ignore: The task is ignored as if it did not exist, and the job file is passed on to the next task in the process.
- Stop Branch: If the task is in a branch of the process, the branch is stopped and the job file is returned to the process after the branch. The branch will not produce any output.
- Stop Process: The process is stopped and no more processing is done. No further output is produced.
- Log Message: Check this option to enable logging a custom error message in the PlanetPress Suite Workflow Tools' log file.
- Message: Enabled only when the Log Message option is checked. Enter a message that will be logged in the PlanetPress Suite Workflow Tools' log file. You can use any variables available in PlanetPress Workflow to customize the message.
- Store the message in variable: Select in which jobinfo, local or global variable you want to store the message content.
- ID: Enter an error ID. This ID will be visible in the Windows Event Viewer. However, the ID is not visible in the PlanetPress Suite Workflow Tools' log file.
- Store the ID in variable: Select in which jobinfo, local or global variable you want to store the error ID.
- Reset to defaults: Resets all options in this tab to their default values.
If storing the message or ID, if they are store in a jobinfo they will be available in any error handling process where errors are being forwarded. In all cases, if your process continues after the error, the contents of the variables selected in this window will be available for the rest of your process, or whenever they are overwritten.
Common Errors
Though some error messages are specific to a task in particular, others may apply to any and all tasks because they are related more to the system than to PlanetPress itself. Some examples would be W3813, W3830, W3991, W4005. These correspond to issues such as not having any space to write files, permission errors on folders or files, etc.
Comments Tab
The Comments tab, added in PlanetPress Suite 7.5, is common to all tasks. It contains a single text area (Task comments) that lets you write comments about the task. These comments are saved when the dialog is closed with the OK button, and are displayed in The Task Comments Pane.