Answer
- NWAdmin "PurgeWorkflowData" command removes data from the Nintex Content database using the stored procedure "PurgeWorkflowData".
- NWAdmin "PurgeHistoryListData" command removes data from SharePoint history list using CAML query, if you pass the "workflow history list" it will remove the data from that particular list, otherwise it will loop through and purge the data for “SPListTemplateType.WorkflowHistory” type list. Only the stored procedure that involves the "GetWorkflowInstanceIds" is used to get the workflow instance Ids of deleted/orphan lists and then their workflow history is deleted using the above process.
- NWAdmin "PurgeHistoryListData" command removes data from SharePoint history list using CAML query, if you pass the "workflow history list" it will remove the data from that particular list, otherwise it will loop through and purge the data for “SPListTemplateType.WorkflowHistory” type list. Only the stored procedure that involves the "GetWorkflowInstanceIds" is used to get the workflow instance Ids of deleted/orphan lists and then their workflow history is deleted using the above process.