Reflects the current release of Nintex for SharePoint 2016. For your version, please access assistance through the Help button in the product.

PurgeHistoryListData

Description

This operation is used to remove workflow history entries from the workflow history list on a site. This operation can be used for maintenance on the history list to prevent the number of history items exceeding 5000.

Usage

NWAdmin.exe –o PurgeHistoryListData -siteUrl urlToSite [-workflowName workflowName] [-days daysSinceLastActivity] [-lastActivityBefore datetime DateFormat)] [-state All|Running|Completed|Cancelled|Error] [-deletedLists] [-clearAll [-workflowItemId id -workflowListName "list name"]] [-verbose] [-reportOnly] [-batchSize numberDefaultIs500] [-pauseAfterBatch] [-maxItemsToDelete number] [-silent]

Parameters

Name Description

-siteUrl

The URL of the site to delete history list items from.

-workflowName

Specify to remove history list items for workflows with a specific name.

-days

Specify to remove history list items for workflows that have had no activity since this number of days.

-lastActivityBefore

Specify to remove history list items for workflows that have had no activity since this date. Run “NWAdmin –o PurgeHistoryListData” to see the format to specify the data and time value in.

-state

Specify to remove history list items for workflows that are either Running, Completed, Cancelled, Error or any state. The default is Completed.

-deletedLists

Specify to remove history list items for any workflow that as associated to a list that is now deleted.

-clearAll

Removes all data from the history list, regardless of what other parameters are chosen except “-workflowItemId” and “-workflowListName”. To remove history list entries for workflows that are not recorded in the Nintex Workflow database, this option must be used.

-workflowItemId

Used in conjunction with the –clearAll and –workflowListName command.  Used to clear history list items for workflows associated with a particular item.

-workflowListName

Used in conjunction with the –clearAll and –workflowItemId command. Used to clear history list items for workflows associated with a particular item.

-verbose

Writes additional information to the screen.

-reportOnly

Runs through the operation without making any changes to data.

-batchSize

The number of items in the history list to process at once.

-pauseAfterBatch

After each batch is run, the user is prompted whether or not to process the next batch. Allows review of the changes in SharePoint before continuing.

-maxItemsToDelete

An integer determining the maximum number of history items that the process is allowed to delete. Once this limit is reached, the process will abort.

-silent

Specifies the command should run without prompting for confirmation.