Creating a Script Hook - System Administration - Cloud - Foundation 23.1 - Foundation 23.1 - Ready - OnBase - Essential - Premier - Standard - external - Standard - Essential - Premier

Cloud System Administration

Platform
OnBase
Product
System Administration - Cloud
Release
Foundation 23.1
License
Standard
Essential
Premier
  1. Select Queries | Script Hooks in the Configuration module. The Script Hook Configuration dialog box is displayed.
  2. Select a command from the Run drop-down list. The Run command indicates when the script will run. For example, Document - File Import triggers a script to run immediately after a file import. The possible Run commands are explained in the following table.
    Tip:

    For more information on incorporating into your scripts the objects, properties, and methods mentioned in the Special Notes on Usage column of the table below, please refer to the OnBase API Automation document, available from your first line of support.

    Run Command and Description

    Special Notes on Usage

    Document - Add/Modify Keywords

    Runs when the Save button is clicked on the Add/Modify Keywords dialog, before the changes are committed to the database, allowing the script to cancel changes.

    Note:

    You are able to select and run both VB Scripts and Unity Scripts when using Document - Add Modify Keywords. For more information on Unity scripts, contact your first line of support.

    Upon the execution of the script, OnBase checks the value of the ExecutionStatus property of the scripting application object. If the ExecutionStatus is set to a value of negative one (-1), the Keyword Values are not updated and the Add/Modify Keywords dialog remains open.

    This is used as part of a validation check. If any of the requirements (as determined in the script) are not met, the script can interrupt the process and force the user to look at the Keyword Values again.

    Note:

    No messages are displayed to the user when a script causes the Add/Modify Keywords dialog to remain open. Messages explaining this activity must be generated by the script, if needed.

    The OriginalDocument object is available to scripts associated with this hook. This object represents the document as it was when the operation started, before any changes were made by the user in the dialog box or by the script. The OriginalDocument object has the same properties and methods as the CurrentDocument object, but in a read-only context (i.e., any changes made to the OriginalDocument object by the script are ignored by the OnBase Client).

    Document - Cross-Reference

    Runs when the cross-reference is initiated and before the search is performed, allowing the script to cancel the search.

    Note:

    This script hook is for image Document Types only.

    Note:

    You are able to select and run both VB Scripts and Unity Scripts when using Document - Cross-Reference. For more information on Unity scripts, contact your first line of support.

    Any script-generated changes to a document occur internally, before the cross-reference is initiated.

    Upon the execution of the script, OnBase checks the value of the ExecutionStatus property of the scripting application object. If the ExecutionStatus is set to a value greater than one (>1), the normal OnBase cross-referencing is ignored and only the script runs.

    Document - File Import (Post-archive as revision)

    Runs when a document is imported as a revision of an existing document.

    Note:

    You are able to select and run both VB Scripts and Unity Scripts when using Document - File Import (Post-archive as revision). For more information on Unity scripts, contact your first line of support.

    The script executes after the document is archived (copied to Disk Groups, entered into existing Workflows, etc). When this method is used, document Keyword Values cannot be changed after the script executes. This hook should only be used when importing a document as a revision. If the document is not a revision of an existing document, use Document - File Import (Post-archive).

    Document - File Import (Post-archive)

    Runs when a document is imported by selecting Import from the File menu in the OnBase Client.

    Note:

    You are able to select and run both VB Scripts and Unity Scripts when using Document - File Import (Post-archive). For more information on Unity scripts, contact your first line of support.

    The script executes after the document is archived (copied to Disk Groups, entered into existing Workflows, etc). When this method is used, document Keyword Values cannot be changed after the script executes.

    Document - File Import (Pre-archive)

    Runs when a document is imported by selecting Import from the File menu in the OnBase Client.

    Note:

    You are able to select and run both VB Scripts and Unity Scripts when using Document - File Import (Pre-archive). For more information on Unity scripts, contact your first line of support.

    The script executes immediately after the document has been imported, but before it is archived, allowing users to manipulate Keyword Values after the script executes.

    Document - Re-Index (Post-Archive)

    Runs after the Index button is clicked on the Re-Index Document dialog, and after the changes have been committed to the database.

    Note:

    You are able to select and run both VB Scripts and Unity Scripts when using Document - Re-Index (Post-Archive). For more information on Unity scripts, contact your first line of support.

    Because the changes have already been committed to the database, the OnBase Client will not automatically save any further changes made to the document using a Document - Re-Index (Post-Archive) script.

    The OriginalDocument object is available to scripts associated with this hook. This object represents the document as it was when the operation started, before any changes were made by the user in the dialog box or by the script. The OriginalDocument object has the same properties and methods as the CurrentDocument object, but in a read-only context (i.e., any changes made to the OriginalDocument object by the script are ignored by the OnBase Client).

    Document - Re-Index (Pre-Archive)

    Runs after the Index button is clicked on the Re-Index Document dialog, but before changes have been committed to the database, allowing the script to cancel changes.

    Note:

    You are able to select and run both VB Scripts and Unity Scripts when using Document - Re-Index (Pre-Archive). For more information on Unity scripts, contact your first line of support.

    The OriginalDocument object is available to scripts associated with this hook. This object represents the document as it was when the operation started, before any changes were made by the user in the dialog box or by the script. The OriginalDocument object has the same properties and methods as the CurrentDocument object, but in a read-only context (i.e., any changes made to the OriginalDocument object by the script are ignored by the OnBase Client).

    Document Knowledge Transfer - Publish Document

    Runs when a document becomes available in one or more DKT Reading Groups. The script runs immediately when the document is added to a non-approval-required group, or immediately following final approval for Reading Groups that require it.

    Note:

    This hook is only available if OnBase is licensed for Document Knowledge Transfer.

    The ActiveReadingGroup object is made available in order to encapsulate the reading group itself. The Current Document object is made available for the document being published to the Reading Group.

    Note:

    This hook is only exposed in the OnBase Client. A document added via the OnBase Web Client does not respect this configuration.

    The Context for the hook can be a specific Reading Group or all Reading Groups.

    Medical Records - Archive Document

    Allows a script to run against a document when it is being archived as a medical record type. The script can return to the client whether or not the Add document to Chart queries should be attempted.

    Note:

    This hook is only available if OnBase is licensed for HL7, Medical Records Management, or Signature Deficiencies for Epic.

    The script triggered by this hook cannot modify the Keywords on the document because at the time the script runs, the document isn't actually stored in the database yet. Calling StoreKeywords in the script returns an error and has no effect on the document.

    Office - After Index Dialog

    Runs immediately after the Import button is clicked from the Import Document dialog box for the Core Services Office Add-In.

    Note:

    The Core Services Office Add-In has been deprecated and is no longer available or supported. This VB Script hook remains available for systems still using the Core Services Office Add-In. For more information, see the EDM Services documentation.

     

    Office - After Save

    Runs immediately after changes have been committed to the database from the Core Services Office Add-In.

    Note:

    The Core Services Office Add-In has been deprecated and is no longer available or supported. This VB Script hook remains available for systems still using the Core Services Office Add-In. For more information, see the EDM Services documentation.

     

    Office - Before Save

    Runs immediately after the Save button is clicked and before changes have been committed to the database from the Core Services Office Add-In.

    Note:

    The Core Services Office Add-In has been deprecated and is no longer available or supported. This VB Script hook remains available for systems still using the Core Services Office Add-In. For more information, see the EDM Services documentation.

     

    Parsed Queue - Post-Commit

    Runs against documents immediately after they are committed and copied to the secondary copies of the Disk Group.

    Note:

    A Parsed Queue is a non-scanning queue (e.g., COLD or DIP).

    Documents in commit batches are processed in ascending order, ordered by itemnum, when processed by scripts associated with this hook.

    Parsed Queue - Pre-Commit

    Runs before the documents in the batch are committed.

    Note:

    A Parsed Queue is a non-scanning queue (e.g., COLD or DIP).

    Documents in commit batches are processed in ascending order, ordered by itemnum, when processed by scripts associated with this hook.

    Upon the execution of the script, OnBase checks the value of the ExecutionStatus property of the scripting application object. If the ExecutionStatus is set to a value of negative one (-1) for any of the documents in the batch, the batch is not committed and remains in the Awaiting Commit queue.

    This is used as part of a validation check. If any of the requirements (as determined in the script) are not met, the script can interrupt the commit process and force the user to look at the documents again.

    Note:

    No messages are displayed to the user when a script causes a document to remain in the Awaiting Commit queue. Messages explaining this activity must be generated by the script, if needed.

    Scan Queue - Set Imprinter/Endorser Value

    Supports automatic endorsing of scanned pages via Kofax and ISIS.

    Note:

    Endorsing on a per-page basis is no longer supported by Kofax. This means that this script hook may not be triggered at the correct time with newer model Kofax scanners.

    Previously, there was no mechanism to modify the text message once the scan operation started, other then the support offered by Kofax to increment the suffix value. Nor could the value that was actually endorsed onto the document be synchronized with the resulting document via Keywords.

    This script hook allows a means to accomplish both of these operations.

    Scan Queue - Index Ad-Hoc

    Creates a button on the Indexing dialog that the user can click to run the associated script.

    A script executed by clicking this button has access to both the current document and the Keyword panel. The Keyword panel script object can be used to reset the AutoFill Keyword Set configured for the document.

    The label on the button can be set in the associated script using the Rem button: <new label> command, where <new label> is the label that appears on the button.

    Note:

    This button shares the same space in the Indexing dialog as the buttons configured for Reverse Lookup. If both functionalities are configured, Reverse Lookup takes precedence and the script button is not visible.

    Scan Queue - Index Document Into Existing

    Runs against a document when, during the indexing process, the system determines that the current document qualifies as a revision of an existing document, and the user chooses to make the document a revision.

    The script runs on the resulting document after the revision has been made. The script is executed after the document information has been gathered but before the information is added to the database.

    Index Document Into Existing scripts are used to validate Keyword Values on revisions. Upon the execution of the script, OnBase checks the value of the ExecutionStatus property of the scripting application object. If the ExecutionStatus is set to a value of negative one (-1), the document is not indexed and remains the active document for indexing, forcing the user to look at the document again.

    If an Index Document Into Existing script is used, Post-Index scripts do not execute.

    Note:

    No messages are displayed to the user when a script causes a document to remain in Indexing. Messages explaining this activity must be generated by the script, if needed.

    Scan Queue - Index Document Type Change

    Runs when a user changes the Document Type during indexing or pre-scan.

     

    Scan Queue - Indexing Keyword Blur

    Runs when the input focus is leaving a Keyword value field during indexing.

    Note:

    You are able to select and run both VB Scripts and Unity Scripts when using Scan Queue - Indexing Keyword Blur. For more information on Unity scripts, contact your first line of support.

    The script has access to the Keyword Type and the current value of the Keyword, and can modify the value.

    Scan Queue - Indexing Keyword Focus

    Runs when the input focus is applied to a Keyword value field during indexing.

    Note:

    You are able to select and run both VB Scripts and Unity Scripts when using Scan Queue - Indexing Keyword Focus. For more information on Unity scripts, contact your first line of support.

    The script has access to the Keyword Type and the current value of the Keyword, and can modify the value. Scan Queue - Indexing Keyword Focus can also access the image snippet of the associated Keyword if the batch was processed by Advanced Capture or Intelligent Capture for AP and the Keyword Value was extracted from the document.

    Scan Queue - Point and Shoot Indexing

    Runs when a value for a Keyword Type is selected using Point and Shoot Indexing in Advanced Capture.

     

    Scan Queue - Post Batch Re-Index

    Runs when the Index button is clicked, after the updated information has been gathered but before the changes are committed to the database, allowing the script to cancel changes.

    Upon the execution of the script, OnBase checks the value of the ExecutionStatus property of the scripting application object. If the ExecutionStatus is set to a value of negative one (-1), the documents remain the active documents for indexing, forcing the user to look at them again.

    This script does not run after the indexing or secondary indexing of a document.

    Note:

    No messages are displayed to the user when a script causes a document to remain in Indexing. Messages explaining this activity must be generated by the script, if needed.

    Scan Queue - Post-Index

    Runs against documents after they are indexed into OnBase from the Awaiting Index, Awaiting QA Review, Awaiting QA Re-Index, or Awaiting Manager Resolution queue.

    Note:

    You are able to select and run both VB Scripts and Unity Scripts when using Scan Queue - Post-Index. For more information on Unity scripts, contact your first line of support.

    Post-Index scripts are used to validate Keyword Values entered during indexing.

    Upon the execution of the script, OnBase checks the value of the ExecutionStatus property of the scripting application object. If the ExecutionStatus is set to a value of negative one (-1), the Keyword Values entered on the document are removed and the document remains the active document for indexing, forcing the user to look at it again.

    If the ExecutionStatus value returned is 101, the document remains in the indexing interface, but the Keyword Values entered are reloaded from the database and put into the Keyword handler. This is used when the script changes the Keyword Values, but the user must still intervene before the document can be fully indexed.

    Note:

    No messages are displayed to the user when a script causes a document to remain in Indexing. Messages explaining this activity must be generated by the script, if needed.

    Scan Queue - Post-Index/Keyword Panel Hook

    Runs against documents when the Index button is clicked but before any Keyword Values are applied to the documents, allowing any changes made to the Indexing panel (i.e., the Keyword Values and/or Document Type) to be applied to the documents.

     

    Scan Queue - Post-Secondary Index

    Runs against documents after they are indexed into OnBase from the Secondary Awaiting Index queue.

    The difference between Post Secondary Index and Post Index is that Post Secondary Index VB Scripts do not run after the initial indexing of a document. Instead, they run when documents enter the Secondary Index queues of the Document Imaging window. Post-Secondary Index scripts are used to validate Keyword Values entered during secondary indexing.

    Upon the execution of the script, OnBase checks the value of the ExecutionStatus property of the scripting application object. If the ExecutionStatus is set to a value of negative one (-1), the document is not indexed and remains the active document for secondary indexing, forcing the user to look at the document again.

    Note:

    No messages are displayed to the user when a script causes a document to remain in Secondary Indexing. Messages explaining this activity must be generated by the script, if needed.

    Scan Queue - Post-Commit

    Runs against documents immediately after they are committed and copied to the secondary copies of the Disk Group.

    Documents in commit batches are processed in ascending order, ordered by itemnum, when processed by scripts associated with this hook.

    Scan Queue - Post-Scan

    Runs against documents as they are archived into the system.

    Note:

    You are able to select and run both VB Scripts and Unity Scripts when using Scan Queue - Post-Scan. For more information on Unity scripts, contact your first line of support.

     

    Scan Queue - Post-Scan More

    Runs against a document during indexing when a document has more pages added to it using Scan More Pages.

     

    Scan Queue - Pre-Commit

    Runs against the batch as it is committed.

    Documents in commit batches are processed in ascending order, ordered by itemnum, when processed by scripts associated with this hook.

    Upon the execution of the script, OnBase checks the value of the ExecutionStatus property of the scripting application object. If the ExecutionStatus is set to a value of negative one (-1) for any of the documents in the batch, the batch is not committed and is routed to the Incomplete Commit queue.

    This is used as part of a validation check. If any of the requirements (as determined in the script) are not met, the script can interrupt the commit process and force the user to look at the documents again.

    Note:

    No messages are displayed to the user when a script causes a document to be routed to the Incomplete Commit queue. Messages explaining this activity must be generated by the script, if needed.

    Scan Queue - Pre-Index

    Runs against a document when it is about to be indexed in one of the indexing queues. This script can manipulate the Keyword panel, scan mode settings, and perform actions based on the action buttons in the Indexing dialog.

    Note:

    You are able to select and run both VB Scripts and Unity Scripts when using Scan Queue - Pre-Index. For more information on Unity scripts, contact your first line of support.

     

    Scan Queue - Pre-Scan

    Runs against documents immediately before scanning occurs.

    Note:

    You are able to select and run both VB Scripts and Unity Scripts when using Scan Queue Pre-Scan. For more information on Unity scripts, contact your first line of support.

    This is used as part of a validation check. Upon the execution of the script, OnBase checks the value of the ExecutionStatus property of the scripting application object. If the ExecutionStatus is set to a value of negative one (-1), the process is aborted.

    Scripts associated with this hook have access to the IndexKeywordPanel object in the Automation API, as long as a default Document Type is assigned to the scan queue. This object allows for access to the Keyword collection currently in the Keyword panel of the Document Imaging window in the OnBase Client.

    Scan Queue - Process Input File List

    Runs after the OnBase Client has collected the list of file names that will be processed by any Scan From Disk or Sweep process, but before beginning the process.

    Scripts associated with this hook are able to manipulate the file name data. The script can use the values of the file names to perform any type of pre-processing desired on the files, and it can also modify the contents of the file list. When the script finishes executing and control returns to the OnBase Client, the updated contents of the file list are used to control the file names and the order of the files to be imported via Sweep or Scan From Disk.

    Scan Queue - Sweep Document

    Runs on each document as it is imported during a scheduled or manual sweep process.

    Note:

    You are able to select and run both VB Scripts and Unity Scripts when using Scan Queue - Sweep Document. For more information on Unity scripts, contact your first line of support.

    The read-only ActiveSweepFile property on the application object is available to this script. This property returns the full path and file name of the file that was swept to create the archived document.

    Send To -> Create New Document (Post-Archive)

    Runs on new documents created using the Send To | Create New Document right-click menu option in the following areas:

    • Document search results list;

    • Document viewer;

    • Scan/index Create New Document button;

    • Split Document Workflow action.

    Note:

    You are able to select and run both VB Scripts and Unity Scripts when using Send To -> Create New Document (Post-Archive). For more information on Unity scripts, contact your first line of support.

    The script executes after the document is archived (copied to Disk Groups, entered into existing Workflows, etc.).

    Note:

    The script is only executed if a new document is created. It is not executed if the document created is a revision of an existing document.

  3. Select the Script Name to run in the drop-down list beneath the Script Name column.
  4. Select the Context from the drop-down list beneath the Context column. The Context is used to limit Scan and Parsed Queue scripts to specific Document Types.
  5. Click Create.

Scripts execute in the order in which they appear in the Script Hook Configuration dialog. Select a script and use the Move Up and Move Down buttons to re-arrange the execution order.