Remove instances


How do I delete an instance when I click on Delete is still there.


The issue was caused by migrating instances to new version where activity has been renamed in the target version.
This scenario is an unsupported per following reference:

The issue of deleting instances only appears on production regardless of the account you are trying to do the action with.
We identified, by doing a network trace (F12), that the error message is as follows:

Page exception: Error Occurred SourceCode.HostServerLib Object reference not set to an instance of an object.
At SourceCode.Workflow.Management.WorkflowManagementServer.DeleteProcessInstances (int32 procInstID, Boolean deleteLogEntries)
At Management_Plugins_K2Server_Pages_PageAJAX.DeleteProcessInstance ()
At Management_Plugins_K2Server_Pages_PageAJAX.Page_Load (Object sender, EventArgs e)

This is certainly due to the fact that these instances have been migrated with the "Process instance version migrator" tool.
This tool is not normally supported by K2.


We were able to use the following stored procedures to remove error instances:
exec [Server].kProcInstRemove @ProcInstID=[ProcInstId],@ServerID=0,@LogData=0x0,@ExpireOnDelete=1
exec [Serverlog].lProcInstRemove @ProcInstID=[ProcInstId]

We provided a procedure T sql that allow you to do the action for all your stopped instances of the specific process.

Please take some time to fill the survey, we are always improving and your comments really help us.

Version history
Revision #:
1 of 1
Last update:
‎03-31-2017 01:46 AM
Updated by: