Print this page

How to Mass Delete Paused and Waiting Interviews records

Knowledge Article Number 000213446
Description When navigating to the "Paused and Waiting Interviews" (Click on Setup | Build | create | Workflows & Approvals | Flows) I can see that there are multiple records that have been created and now it has reached its limit and we are getting unhandled process fault error in mail. We can delete one Interview record at a time but this will take lot of time to delete all the records so we need to mass delete them.
Is there any way to do so?
Resolution You can use Flow to solve this issue. Here are the steps to create the Flow:
  1. Click on Setup | Build | create | Workflows & Approvals | Flows
  2. Click on New Flow, it will open the Flow canvas for you. Drag-and-drop Record Delete Element on the Flow Canvas and fill the details:
    • ​In the "General Settings" section enter a Name and Unique Name.
    • In the "Filters" section select "FlowInterview" and create a filter like "InterviewLabel" contains "API-Name-Of-The-Process". Please note that we are selecting "InterviewLabel" because it includes both the API Name, the Version Number and the Object Name giving you the flexibility to mass delete interviews of a specific version of a Process if necessary.
  3. Click Save and save the Flow. Please select "Flow" in the "Type" field and remember to Activate the Flow.
A few things to consider:
  • The filter you defined as part of the step #2 is what decides what Interview records are going to be removed from the "Paused and Waiting Interviews". Take your time and make sure you select the right filter (notice that you're using "Contains" in the example above), and include the version in the API name as necessary.
  • You may want to test this in a Sandbox first to make sure that it works as you expect without the risk of removing Interviews inadvertently. 
  • To delete a flow interview, you must have the “Manage Force.com Flow” user permission. All other calls require the “Run Flows” user permission or the Force.com Flow User field enabled on the user detail page.
Once the Flow has been created as per the steps above and after you made sure that the filter logic is what you desired you can Run the Flow to remove the Interviews.
To do this please navigate to Setup | Build | create | Workflows & Approvals | Flows and click on the Flow that you created above, it will redirect you to the Flow Detail page. There you can click on the "Run" button to execute the Flow. Please note this will immediately kick off the Flow and the Delete process.

Another alternative would be to use the API (Data Loader, Workbench...).
The FlowInterview object is exposed and records can be deleted via API version 33.0 or above.
More about the FlowInterview table in our Developer's Guide: https://developer.salesforce.com/docs/atlas.en-us.api.meta/api/sforce_api_objects_flowinterview.htm




promote demote