Loading...
Loading...
ServiceNow has identified an issue in the Washington DC release where previously 'Run Once' flows that were executed can be triggered again. This is caused due to the addition of a new Auto Flush (sys_auto_flush) entry referencing the 'sys_flow_plan_context_binding' table (SysID: 392386c577e83110826702264b5a997e) that cleans up 'sys_flow_plan_context_binding' records older than 1 year (31,536,000 seconds) from 'sys_flow_plan_context_binding'. The records on 'sys_flow_plan_context_binding' act as a receipt for flows such as 'run once' to record their execution. If the relevant 'run once' 'sys_flow_plan_context_binding record' is deleted, a executed 'run once' flow will believe that it is being run for the first time, and execute to populate the sys_flow_plan_context_binding record.
1. Configure a flow with the 'run once' setting in Vancouver 2. Trigger the flow with a record update. 3. Wait for over a year without updating the record. 4. Upgrade to Washington DC 5. Ensure the table cleaner is executed for 'sys_flow_plan_context_binding' in sys_auto_flush and see records are cleaned for 'sys_flow_plan_context_binding' 5. Update the record again to trigger the 'run once' flow 6. The flow will be triggered again, despite the 'run once' setting.
The 'run once' flow should not be triggered again.
ServiceNow will perform a maintenance that will remove the sys_auto_flush job to prevent future sys_flow_plan_context_binding records from being deleted. If you wish to manually apply the maintenance yourself, please follow these steps: Download the attached file to this KB titled PRB1755683 maintenance.txt Navigate to System Definition -> Scripts - Background Make sure scope is set to 'global' Copy+Paste the downloaded script and run the script Example successful script output can be seen in the FAQ below -- FAQ Q: What is the maintenance doing? A: The maintenance performs the following below depending on the scenario: Scenario Maintenance Activity The maintenance observes if the Out of the Box 'sys_auto_flush' entry on the 'sys_flow_plan_context_binding' table is present (SysID: 392386c577e83110826702264b5a997e) and will take action (explained in the activity). Note: This sys_auto_flush record was introduced in the Washington DC family release, all instances on Washington should be having this, unless it is manually deleted. The maintenance for this scenario will do two actions: The maintenance will delete the sys_auto_flush entry for 'sys_flow_plan_context_binding'. This deletion creates a corresponding DELETE Action record with Name - ‘sys_auto_flush_392386c577e83110826702264b5a997e’ in the Customer Update [sys_update_xml] table where the Replace on upgrade field is set to false. This is intentional to ensure that any further Washington Patch updates will not reintroduce this sys_auto_flush entry. Add a System Property (sys_properties) with the name 'com.glide.hub.flow_engine.PRB1755683.trigger.run_once.created_date_limit' and set its value to a date 1 year back from this maintenance activity. Explanations: Step 1 prevents any future deletes from 'sys_flow_plan_context_binding table, but already deleted 'sys_flow_plan_context_binding' entries can still trigger previous 'Run Once' flows again. To prevent this, customers need to update to a upcoming Washington DC patch that has new logic flow fixes for this PRB. The logic fix in the fixed version will leverage the system property date added in the second action. Previous flows that have deleted 'sys_flow_plan_context_binding' entries will not run again by using the property date (from Step 1) as an optional, additional reference point to determine if it does not need to run for records created before the property date. The maintenance observes that the Out of the Box 'sys_auto_flush' entry on the 'sys_flow_plan_context_binding' table is not present and will take action (explained in the activity). Note: All instances that are on a version before the Washington DC family release will fall in this category. This maintenance will do one action: Adds a DELETE Action record with Name - 'sys_auto_flush_392386c577e83110826702264b5a997e' in the Customer Update [sys_update_xml] table where the Replace on upgrade field is set to false. This ensures that no future upgrades to Washington DC will not add the problematic sys_auto_flush entry to 'sys_flow_plan_context_binding'. Q: Is there impact or downtime with running the maintenance? A: There is no impact or downtime. Q: When will this maintenance happen? A: A COMM record will be sent to notify you with the dates. Q: Can I reschedule this maintenance? A: Rescheduling the maintenance is not an option. Q: What if I need to execute the maintenance manually? A: You can use the script attached to this KB which is the same being run as the maintenance. Q: What do the outputs look like if the script is successful? A: One of two outputs can happen, which depends if an instance is on Washington DC or pre-Washington DC: Washington DC output: *** Script: {"changed":"true","at_risk":false,"action_taken":"Deleted sys_auto_flush Record","outcome":"Success","note":"sys_auto_flush record REMOVED successfully.","reason":"PRB1755683"} Pre-Washington DC output: *** Script: {"changed":"true","at_risk":false,"action_taken":"Inserted sys_update_xml record","outcome":"Success","note":"The sys_auto_flush record is not present. Inserting sys_update_xml to preempt future upgrades.","reason":"PRB1755683"}-----Time taken by Audit to run on Customer Instance: 30 Milli Seconds Q: What is the impact if this maintenance is not run? A: The instance will be at risk to have prior 'run once' executed flows run again once the 'sys_flow_plan_context_binding' cleanup job is ran. If that happens, there is no reference for a 'run once' flow to determine it was previously executed, so it will run again. Q: How do I know if I am impacted with this problem? A: Observe your 'sys_flow_plan_context_binding' table and review records older than 1 year are cleaned. The sys_auto_flush job for 'sys_flow_plan_context_binding' executes once it sees the oldest created date record in 'sys_flow_plan_context_binding' arrive at 1 year. At this point your 'run once' flows that are older than 1 year are at risk for re-execution as there is no reference in 'sys_flow_plan_context_binding' for the flow. Q: What can I do if I cannot upgrade into a fixed version and I see that I am impacted with this issue? A: Engage with technical support. Ensure that the maintenance is also run (either through our scheduling or manually) to prevent future 'sys_flow_plan_context_binding' records from being cleaned.
PRB1755683
Click on a version to see all relevant bugs
ServiceNow Integration
Learn more about where this data comes from
Bug Scrub Advisor
Streamline upgrades with automated vendor bug scrubs
BugZero Enterprise
Wish you caught this bug sooner? Get proactive today.