05-16-2013 09:31 AM
We are using the Unity API to import documents into the OnBase System. These documents will be coming in as 200+ page Tiff files that are a “package” of five different documents. These documents are separated inside this large document by bar code sheets that indicate doc types, but not loan numbers.
Our first option was to find a workflow action that calls a barcode recognition action, but that does not exist. Second option is to create a unity script that takes the document, creates a new scan q batch, and then have the system process it, then send the batch to the bar code recognition server (the scan q is already setup to do this correctly if the document is “swept in” via the sweep directory option).
As of right now, the batch sits in an awaiting index state. We can’t seem to find a method to create the batch and send it over to be processed. I will post the code we are using next.
We also sent this to support, but hoping maybe someone has a better "solution" as well.
Thanks,
Tim
05-16-2013 09:32 AM
try { Hyland.Unity.Application g_application = Hyland.Unity.Application.Connect("http://server/AppServer/Service.asmx", "username", "password", "odbc"); Core core = g_application.Core;
// Create a Document Query DocumentQuery docQuery = core.CreateDocumentQuery();
// Find the desired Document Type and add it to the query DocumentType docType = core.DocumentTypes.Find("IBMC - FHLB - All One Doc"); docQuery.AddDocumentType(docType);
DocumentList docList = docQuery.Execute(100);
BatchManagement batchManager = g_application.Core.BatchManagement;
ScanQueueList scanQueues = batchManager.ScanQueues;
ScanQueue scanQueue = scanQueues.Find("Doc Type"); ScanBatchProperties scanBatchProps = batchManager.CreateNewScanBatchProperties(scanQueue); scanBatchProps.BatchName = "test";
ScanBatch scanBatch = batchManager.CreateScanBatch(scanBatchProps); //scanBatch.Status = BatchStatus.;
using (BatchLock batchLock = scanBatch.Lock()) { if (batchLock.Status == BatchLockStatus.LockObtained) { scanBatch.AddDocuments(docList); } } } catch (Exception ex) { MessageBox.Show(ex.ToString()); } finally { g_application.Disconnect(); }
08-18-2020 08:28 AM
Tim - Did you ever get a resolution for this? We are needing to do the same.
Find what you came for
We want to make your experience in Hyland Connect as valuable as possible, so we put together some helpful links.