Why workflow version records should not be deletedDescription<!-- div.margin{ padding: 10px 40px 40px 30px; } table.tocTable{ border: 1px solid; border-color:#E0E0E0; background-color: rgb(245, 245, 245); padding-top: .6em; padding-bottom: .6em; padding-left: .9em; padding-right: .6em; } table.noteTable{ border:1px solid; border-color:#E0E0E0; background-color: rgb(245, 245, 245); width: 100%; border-spacing:2; } table.internaltable { white-space:nowrap; text-align:left; border-width: 1px; border-collapse: collapse; font-size:14px; width: 85%; } table.internaltable th { border-width: 1px; padding: 5px; border-style: solid; border-color: rgb(245, 245, 245); background-color: rgb(245, 245, 245); } table.internaltable td { border-width: 1px; padding: 5px; border-style: solid; border-color: #E0E0E0; color: #000000; } .title { color: #D1232B; font-weight:normal; font-size:28px; } h1{ color: #D1232B; font-weight:normal; font-size:21px; margin-bottom:-5px } h2{ color: #646464; font-weight:bold; font-size:18px; } h3{ color: #000000; font-weight:BOLD; font-size:16px; text-decoration:underline; } h4{ color: #646464; font-weight:BOLD; font-size:15px; text-decoration:; } h5{ color: #000000; font-weight:BOLD; font-size:13px; text-decoration:; } h6{ color: #000000; font-weight:BOLD; font-size:14px; text-decoration:; } --> Why workflow version records should not be deleted Problem On the ServiceNow Platform, the Workflow Editor within the Workflow module allows users to create new and update existing workflows for each application. An example reason that a workflow might be implemented is for Incident Management or Change Management. Processes change over time, and therefore the platform uses versioning to update workflows without affecting existing running workflows within the platform. Workflow versions are stored in a table called wf_workflow_version. However, in-flight records, such as Change Requests and Incidents, are using the older wf_workflow_version as a reference to run the workflow. The in-flight workflows are stored in a table called wf_context. Deleting records within the wf_workflow_version table causes in-flight records, such as Change Requests and Incidents, to lose reference to their version. Therefore any approvals and tasks scheduled to be created by the in-flight workflow are not created, and therefore from an end-user point of view, the related record associated to the wf_context does not complete its execution. Therefore do not delete wf_workflow_version records as this causes a huge impact to a ServiceNow instance. Symptoms of workflow version deletion The symptoms of a wf_workflow_version record being deleted are the following: Empty value in the reference field Workflow Version on the wf_context tableApprovals and Tasks not being created on in-flight records Cause Due to the security enhancements in the platform, System Administrators cannot delete wf_workflow_version records if there is a reference that exists in the wf_context table, where the state of the wf_context is Executing. However, the main cause of the deletion of wf_workflow_version records is when a user runs a background script to perform this action. Please note that ServiceNow Support does not advise nor support the use of a script to delete a wf_workflow_version. Alternative solution If you do not wish for a wf_workflow_version to be used for new records, set a wf_workflow_version inactive by performing the following steps: Navigate to Workflow > Workflow EditorOpen any workflow. For example, Change Request - NormalOn the title bar, click on the menu icon and select Set Inactive Important: The Set Inactive option is only available if the version of the workflow is not referenced in an executing wf_context record.