Skip to main content

HI all,

 

Is there a script or tool that will let me delete all old data stored about a process instance in the k2 databases.

This my development machine and I would like to clear all old data about completed process instance. 

 

I do not want to delete the process, just the instances.

 

Thanks in advance

Hello!

 

There is actually a SP in the K2 database called ServerLog.IProcInstRemove that can be used to complete this task. The only parameter you need to execute this SP is the ProcInstID you'd like to have removed.

 

Regards,

Matt


Excellent. Thank you for your reply. Just wondering if there is something silimar where i can pass it a process name and then it will delete all the process instances for that process. If not, do you know which tables i could query to get a list of processinstanceid's for a particular process. If i can get a list of process instanceid's for that process, I can then just write a script to loop and execute that stored procedure for each processinstanceid. 

 

@Update. This is resolved. For anyone looking to do something silimar here is what I did. There is stored procedure called serverlog.sogetprocessinstances. If you pass the full processname to this sp it will get you a list of processinstanceid's. Now just do a while loop and execute the serverlog.lprocinstremove method for each processinstanceid that is returned.

 

Hope that helps anyone looking to do something similar


Reply