Deleting the History of Started Workflow Instances.

March 1, 2010 | KB: 1012534
Workflow Suite 8

Summary

The Workflow Server automatically removes completed workflows that are older than 30 days from the history of started workflow instances. You can manually execute the CleanupTracking stored procedure to delete completed workflows from the Search Instance table that are less than 30 days old.

Workaround 1

Modify the Laserfiche.Workflow.Service.exe.config file to change the default 30 day limit.

  1. Create a backup copy of the Laserfiche.Workflow.Service.exe.config file.
  2. Stop the Workflow Server service.
  3. Using a text editor, open the Laserfiche.Workflow.Service.exe.config file. At the end of the file, in the <Laserfiche.Workflow.Service.Properties.Settings> section, add the following lines to set a 1 day limit:

    <setting name="SearchHistoryCutoff" serializeAs="String">
      <value>1</value>
    </setting>

    Note: Set the value to the number of days you wish to keep completed workflows in the history.

  4. Save your changes and restart the Workflow Server service.

Workaround 2

You can use the following SQL sample to execute the CleanupTracking stored procedure. Replace WorkflowDatabase with the name of your Workflow database and specify the desired cutoff date. All workflow instances completed before the cutoff date will be removed from the table.

DECLARE @RC int
DECLARE @cutoffdate datetime
EXECUTE @RC = [WorkflowDatabase].[dbo].[CleanupTracking]
  @cutoffdate = 'yyyy-mm-dd'