Remove instances

  • 31 March 2017
  • 0 replies
  • 6 views

Badge +7


 

Symptoms


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

Diagnoses


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: http://help.k2.com/onlinehelp/k2blackpearl/devref/4.6.11/Content/Important_Notes.html

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.
 

Resolution

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.




 

0 replies

Be the first to reply!

Reply