Restructuring RPA Hub tables to sys_metadata in Utah and beyond release. Table of Contents Background InformationBefore upgrade setup Create or update system property Verification after upgrade Data MigrationFields droppedRestructured Tables Restructuring Workaround Background Information In Utah, a few tables within the RPA Hub scoped application are restructured to leverage the update sets capability of the ServiceNow platform. This enables you to move the Robotic Process Automation (RPA) configurations across environments. If you are using an older version of glide (Tokyo, San Diego, Rome) and are upgrading to Utah, you need to perform this migration activity. To support this, a fix script fix_script_reparenting_tables is provided in Utah which carries out data migration, drops columns, and restructures RPA hub tables on upgrade. Fix script runs implicitly as part of family upgrade. Before upgrading to Utah, you need to create or update a system property in global scope glide.rollback.blacklist.TableParentChange.change = false. Without this, the script does not restructure tables to extend the application (sys_metadata). Once upgrade is successful, revert this system property change. Before upgrade setup Create or update system property If the system property doesn't exist, create a sys_property in global scope glide.rollback.blacklist.TableParentChange.change with the following details. Name: glide.rollback.blacklist.TableParentChange.changeType: True/falseValue: false If property exists, update the value to false. Verification after upgrade Data Migration Once the upgrade is successful, verify the following fields in the corresponding tables. Bot process configuration table (sn_rpa_fdn_bot_process_config) must have the same number of records as Bot Process (cmdb_ci_rpa_process). Bot process configuration field in the Bot Process table (cmdb_ci_rpa_process) must be populated.Bot process configuration field in the Process schedule table (sn_rpa_fdn_schedule) must be populated from the corresponding process reference.Bot process configuration field in the Process Parameter table (sn_rpa_fdn_process_parameter) must be populated from the corresponding process reference.Bot process configuration field in the Process Process Parameter table (sn_rpa_fdn_m2m_process_param_process) and Process Queues table (sn_rpa_fdn_m2m_process_queue) must be populated from the corresponding process reference. Fields dropped As part of migration, the following fields are dropped from the Bot Process table. Auto session restoreEnd Desktop In Desktop On CompleteForce StartKeep Monitor ActiveLog LevelOrderPackagePackage VersionProcess TypeJob Purging(days)Enable Desktop In DesktopRun Time Threshold (mins)Screen ResolutionStorageSync Execution Logs (seconds)Track Execution Logs All these fields are moved to the Bot Process Configuration table. The Process field is dropped from the following tables: Process Schedule (sn_rpa_fdn_schedule)Process Parameter (sn_rpa_fdn_process_parameter)Process Queue (sn_rpa_fdn_m2m_process_queue)Process Process Parameter(sn_rpa_fdn_m2m_process_param_process) All these fields are replaced by Bot Process Configuration (bot_process_config) reference field in these tables. The Department field is dropped from the following tables: Process Queue (sn_rpa_fdn_work_queue)Package (sn_rpa_fdn_package)Log Proxy Server (sn_rpa_fdn_log_proxy_server) Changes to the Work Queue and Work Queue Item tables and related system property: The Auto Retry field is dropped from the Work Queue table (sn_rpa_fdn_work_queue).The Maximum Retries field is dropped from the Work Queue table (sn_rpa_fdn_work_queue) and is replaced by a new field, Maximum Attempts.The Retry Count field is dropped from Work Queue Item table (sn_rpa_fdn_work_queue_item) and is replaced by a new field, Attempts Count (sn_rpa_fdn_work_queue_item).The system property [sn_rpa_fdn.queue.maximum_retries] is deleted. Restructured Tables If the system property glide.rollback.blacklist.TableParentChange.change = false is set before upgrading to Utah, then the restructuring happens as a part of the upgrade. Otherwise, refer to the Restructuring workaround section. The following tables must be restructured to the application (extends sys_metadata) table. RPA Timezone (sn_rpa_fdn_rpa_timezone)Process Schedule (sn_rpa_fdn_schedule)Package (sn_rpa_fdn_package)Package Version (sn_rpa_fdn_package_version)Work Queue (sn_rpa_fdn_work_queue)Process Parameter (sn_rpa_fdn_process_parameter)Process Queue (sn_rpa_fdn_m2m_process_queue)Process ProcessParameter (sn_rpa_fdn_m2m_process_param_process) Restructuring Workaround If the system property glide.rollback.blacklist.TableParentChange.change = false is not set before the upgrade, then once the upgrade to Utah is successful, run the following code in the background scripts with scope set to global and record for rollback set to false and as a maint user. Before running the background script check for any existing transaction quota rules for background scripts whose time is less than 4 hours. If exist deactivated it. After running the below workaround successfully activate transaction quota rule and set system property glide.rollback.blacklist.TableParentChange.change = true. // Update migrated bot process configuration records scope(i.e application field) to global. var botProcessConfigGR = new GlideRecord("sn_rpa_fdn_bot_process_config"); botProcessConfigGR.query(); botProcessConfigGR.setValue("sys_scope","global"); botProcessConfigGR.updateMultiple(); var reparentTableList = ["sn_rpa_fdn_rpa_timezone","sn_rpa_fdn_schedule","sn_rpa_fdn_package_version","sn_rpa_fdn_package","sn_rpa_fdn_work_queue","sn_rpa_fdn_process_parameter","sn_rpa_fdn_m2m_process_queue","sn_rpa_fdn_m2m_process_param_process"]; // Table reparenting and update existing record scope(i.e application field) to global for(var i = 0; i < reparentTableList.length; i++){ // Reparenting new GlideTableParentChange(reparentTableList[i]).change('', 'sys_metadata'); // Update scope to global var tableGR = new GlideRecord(reparentTableList[i]); tableGR.query(); tableGR.setValue("sys_scope", "global"); tableGR.updateMultiple(); }