Symptoms
How to reset the relevant K2 Project data including existing worklist and the project data
Diagnoses
Our users would like to clear all the previous workflow project data to start afresh. I understand that there is the archiving feature in Workspace but that impacts every K2 projects on the K2 server. Is there a script to archive or erase all the data for a specific K2 workflow project without impacting other existing K2 projects?
Resolution
1. Currently, are there any active/error instances of this process? Usually this can be confirmed from "K2 Workspace > Management > tServer:Port] > Workflow Server > Processes > tProjectName] > tProcessName] > Instances.
If so, when deleting active/error process instances, we recommend using the "Remove Log Entries?" option to also delete all of the reporting data.
2. A second, less supported/recommended option, is to use the hServerlog].glProcInstRemove] stored procedure to delete the reporting data for process instances (if it is in a "Completed" state or if the process instance was previously deleted without selecting the "Remove Log Entries?" option).
The ProcInstsID parameter can be retrieved per reporting process instances via hovering over the "Viewflow" URL or via the hServerlog].gProcInst] table using the columns available to identify the ProcessInstanceID. i.e. Folio, ProcId, StartDate, etc.
** We recommend using option 1 when possible
** If option 2 is necessary, please also make a backup of the database before performing these steps and test the process/reporting afterwards