Upgrade to Document Intelligence 3.0 or later from version 2.4 or earlier

  • Release version: Washingtondc
  • Updated February 1, 2024
  • 3 minutes to read
  • Summarize
    Summarized using AI
    This content was generated using new OpenAI-powered functionality. Results are provided on an as is basis and are not guaranteed to be accurate or complete.

    Summary of Upgrade to Document Intelligence 3.0 or Later from Version 2.4 or Earlier

    Document Intelligence 3.0 introduces a new database schema as it transitions from a scoped application to a ServiceNow AI Platform plugin. Upgrading from version 2.4 or earlier is essential to leverage these enhancements.

    Show full answer Show less

    Upgrade Tasks

    Before proceeding with the upgrade, ensure you complete the following pre-upgrade tasks:

    • Schedule the Upgrade: Choose a time that avoids the nightly task definition runtime to prevent interruptions.
    • Update Custom Code: Modify any custom code that references old DocIntel database tables (di) to use the new platform tables (sysdi). Ensure custom flow actions are updated to version 3.0 or later.
    • Add Cross-Scope Records: For integrations, create cross-scope records for the new DocIntel database tables while retaining existing records.

    During the Upgrade

    During the upgrade, avoid using the Document Intelligence workspace to extract fields. Wait for migration of document tasks to the sysditask table to prevent data loss.

    Post-Upgrade Actions

    After upgrading, take the following steps:

    • Test Integrations: Verify that DocIntel integrations and custom workflows operate correctly with the new database schema.
    • Check for Data Loss: Be aware of potential data loss scenarios, such as deletion of attachments or tasks during migration.
    • Migrate Legacy Use Cases: You can rerun the migration batch script to migrate any imported use cases needing transfer to the platform tables.

    Cross-Scope Records

    Ensure the following cross-scope records are established for Document Intelligence 3.0 or later:

    • sysditask
    • sysdikey
    • sysdikeygroup
    • sysdiocrinput
    • sysdipdfinput
    • sysdipredictioninput
    • sysditraininginput
    • sysdikeyhint

    Each record should be set to "Read" operation and allowed status for proper functionality.

    Document Intelligence 3.0 or later includes an updated database schema to support its transition from a scoped application to a ServiceNow AI Platform plugin.

    Upgrade tasks

    Review the information in this topic before you upgrade to Document Intelligence (DocIntel) 3.0 or later from version 2.4 or earlier.

    For more information on installation, see Install Document Intelligence.

    Before the upgrade

    Table 1. Document Intelligence 3.0 or later pre-upgrade checklist
    Pre-upgrade task Description
    Choose a time to schedule the upgrade

    Avoid performing the upgrade during the run time of the nightly task definition (use case) upgrade job. Upgrading the application at that time would prevent use cases from upgrading until the run time of the next day.

    Update any custom code that points directly to DocIntel database tables

    After upgrading to Document Intelligence 3.0 or later from version 2.4 or earlier, DocIntel will use new flow actions. DocIntel will also use ServiceNow AI Platform database tables (sys_di_) in place of the scoped application tables (di_). All DocIntel data will be migrated automatically to these platform tables.

    Note:
    Document extraction use cases may not be available for use until the migration is complete.

    If you have custom code in your instance that points directly to the scoped application tables (di_), it should be updated, preferably to the platform component using DocIntel APIs.

    If you have custom code using DocIntel 2.4 or earlier flow actions, it should be updated to use 3.0 or later flow actions.

    For the list of tables, see Components installed with Document Intelligence.

    Add cross-scope records for integrations

    For any integrations with Document Intelligence, add cross-scope records for the new DocIntel database tables.

    Note:
    Ensure that the existing cross-scope records for the old tables are not removed.

    See the Cross-scope records section for the list of records to be added.

    For more detail on cross-scope records, see Cross-scope privilege record.

    During the upgrade

    Table 2. Document Intelligence 3.0 or later upgrade checklist
    Upgrade task Description
    Avoid using the Document Intelligence workspace to extract fields

    Wait until a document task is migrated to the sys_di_task table before completing it using the Document Intelligence workspace. Completing a task during the upgrade may lead to data loss.

    After the upgrade

    Table 3. Document Intelligence 3.0 or later post-upgrade checklist
    Post-upgrade task Description
    Test DocIntel integrations and custom workflows

    Test your use case integrations to ensure they function with the new database schema.

    Check for data loss

    Some cases where you can lose data include:

    • Any action resulting in the attachment deletion in an old di_task record would result in a missing attachment for the new sys_di_task record.
    • Deletion of any new tasks created during the data migration (that is, during or right after the 3.0 or later upgrade) would result in permanent deletion as those records might not have entries in di_task tables.
    • Deletion of an old “process_task” flow (or any action resulting in that flow deletion) would result in an empty flow reference in the new integration setup records.
    Post-upgrade migration of legacy use cases imported through update sets

    At any time after the completion of the Document Intelligence 3.0 or later upgrade and data migration, you can rerun the migration batch script that ran during the upgrade.

    You may want to run this script if you must migrate any imported use cases requiring migration to the platform tables (sys_di_).

    1. Navigate to All > System Definition > Scheduled jobs.
    2. Open the DocIntel migrate remaining data scheduled job.
    3. Select the Active check box.
    4. Select Execute Now.
    Warning:
    Never use the DocIntel migrate remaining data batch job to rerun migration after deleting all records from sys_di tables. You should only use it to migrate missing data from di_ tables to sys_di tables.

    Cross-scope records

    Table 4. Cross-scope records for Document Intelligence 3.0 or later
    Source scope Target scope Target name Operation Target type Status
    Scope of integrating BU global sys_di_task Read Table Allowed
    Scope of integrating BU global sys_di_key Read Table Allowed
    Scope of integrating BU global sys_di_key_group Read Table Allowed
    Scope of integrating BU global sys_di_ocr_input Read Table Allowed
    Scope of integrating BU global sys_di_pdf_input Read Table Allowed
    Scope of integrating BU global sys_di_prediction_input Read Table Allowed
    Scope of integrating BU global sys_di_training_input Read Table Allowed
    Scope of integrating BU global sys_di_key_hint Read Table Allowed