cancel
Showing results for 
Search instead for 
Did you mean: 
Patrick_Ramser
Star Contributor
Star Contributor

We’ve gone through many of the new script hook interfaces in OnBase 14 thus far which provide the ability to customize the scanning and indexing process to your business needs. This article will cover the last three of these indexing script hooks, and one additional scanning script hook. Among these are Scan Queue – Pre-Index, Scan Queue – Post-Reindex, Scan Queue – Seconardary Index, and Scan Queue – Barcode Processing.

Scan Queue – Pre-Index

The Scan Queue – Pre-Index script is called when a document is displayed in the batch indexing screen. It can be configured via the IScanQueuePreIndexEventScript interface in the Unity Configuration Editor. The script provides access to the indexing keyword panel, as well as the ability to modify the panel. The script can also perform indexing actions. Some of the possible uses of this script hook include pre-populating indexing values, validating pre-index data, and sending pre-index data to an external system.

Since indexing and in turn pre-index steps are so essential to the process, we expose a good chunk of functionality through this interface. You can not only access the document’s scan queue, existing keyword records, and the active indexing keyword panel, but also a number of script results that trigger various events. 

Much like the Scan Queue – Indexing Ad-Hoc event from one of our previous entries, the script result can tirgger functions such as review, deletion of the document, stop indexing, scan more, start new document, append, or even a simple continue for furthering the process. Wonderfully enough, you can even chain together muliple events if you have multiple scripts running and cancel or continue accordingly.

Scan Queue – Post-Reindex

The Scan Queue – Post-Reindex script executes after a document is indexed in a reindex queue. The script provides access to the reindexed document, and allows the user to cancel the reindexing of the document while it is being performed. This script can be used to send document data to an external system, to perform validation on the reindexed document, or to make modifications to the reindexed document. For configuration, you’ll use the IScanQueuePostReindexEventScript script interface.

This particular script interface exposes a few simple properties for document manipulation. That includes the document, the current scan queue, and a simple script result for either continuing with the re-index or canceling out of the process. The belief is that you’ll use the document provided to do any work you need to do with the existing Unity API functionality in the script.

Scan Queue – Post-Seconary Index

Scan Queue – Post-Secondary Index is similar to the post-reindex script this script except for the fact that it executes after a document is indexed in a secondary indexing queue. The script provides access to the indexed document, and allows the user to read values from the document, or make modifications to it. It can be created through the use of the IScanQueuePostSecondaryIndexEventScript interface.

Much like the previous script, the arguments exposed include the Document and the Scan Queue as well. This interface just doesn’t expose the ScriptResult property for the sake of canceling or continuing the process like re-index does.

Scan Queue – Barcode Processing

The Scan Queue – Barcode Processing script executes during barcode processing when a barcode specifically configured to run the script is encountered, and provides powerful functionality to customize your barcode process. This script can be configured via the IScanQueueBarcodeProcessingEventScript script interface. The script allows the user to access information about the barcode and document being processed, modify the document type, date, and keywords, add keywords which are used to determine the uniqueness of a document, and mark the page being processed for deletion.

Properties exposed here include the scan queue, the actual barcode currently being processed, the current barcode page, and a Results object for doing barcode triggered document manipulation.Results will specifically contain an object called BarcodeDocumentUpdates for changing the document’s type, keywords, or even the date on the fly.

In Conclusion

We hope you enjoyed our series on script hooks, especially our three sections on indexing. The opportunities for fine-tuning and enhancing your business processes are extremely ripe and we would love to see some cool solutions with these various script interfaces. It’s especially interesting given the various verticals that could potentially leverage all of these wonderful features and how different they could end up being.

That actually does it for all of our script hook content and even 14 for this particular blog series. All of the previous entires should be archived if you want to look back on our features or if you think you could have missed anything. Check back next week for our recap on this series of content and a quick follow-up on where we go next.