Tag: delete Paused Interviews Flow

In this article Getting Started with Process Builder – Part 2 (Time-dependent actions), I had discussed how to add a Time-based action into a Process. I also discussed a way to check the Paused and Waiting Interviews in the Flow and Process Builder. Click on Setup | Build | create | Workflows & Approvals | Flows and navigate to a section Paused and Waiting Interviews as shown in the following screenshot

Paused and Waiting Interviews

Use Dellink to remove an Interview (An interview is a running instance of a Flow) from Paused and Waiting Interviews queue, but it doesn’t allow you to mass delete/remove Paused and WaitingInterview. In this article, we are going to discuss a way to mass delete/remove Waiting and Paused Interviews. Let’s start with a business use case

Business Use case

Martin Jones is working as System administrator at Universal Containers (UC). He developed a Process to update the Account Description after 5 days of its creation. For testing purpose he has created 10 records, it means 10 Jobs/Interviews are waiting in Paused and Waiting Interviews queue. He wants to delete all the Interviews from a Single click instead of deleting each one-by-one. Below is the Process Properties screenshot of the most active version of a Process.

Process Properties

Solution for the above business requirement

There are multiple solutions possible for the above business scenario. We will use Flow to solve the above business requirement. Before proceeding you have to understand below-mentioned objects in Salesforce

A) FlowInterview: -This object represents a flow interview. An interview is a running instance of a Flow.

This article will help you to understand how you can mass delete Paused and Waiting Interviews. Follow the below instructions to create a Flow for the above business requirement

1. Click on Setup | Build | create | Workflows & Approvals | Flows2. Click onNew Flow, it will open the Flow canvas for you. Drag-and-dropRecord Delete Element on the Flow Canvas and fill the details as shown in the following screenshot

Record Delete – Mass delete Paused and Waiting Interviews

Once you are done, click OK. The question arises here why we have chosen InterviewLabelin the Preceding screenshot, why not any other fields.

This is because of there are a limited number of fields that you can select in Record Delete element for FlowInterview.

InterviwLabel field is made up with ProcessAPIName-VersionNo_ObjectName and API Name is always same for all versions of a Process

It also gives you the flexibility to mass delete Interviews of a specific version of a Process

3. Finally, yourFlow will look like the following screenshot

Mass delete Paused and Waiting Interviews

4. Click on the Savebutton and save the Flow with the name Mass delete Paused and Waiting Interviewsas shown in the following screenshot

Mass delete Paused and Waiting Interviews

5. Don’t forget toActivatethe Flow.

It’s time to test this Process

1) Currently, there are 10 Interviews waiting in Paused and Waiting Interviews queue for Process “Update Description after 5 days“, as shown in the following screenshot

Paused and Waiting Interviews Queue (Before Running the Flow)

2) It’s time to Run the Flow to mass delete Interview those belongs to Process “Update Description after 5 days“. To do this navigate to Setup | Build | create | Workflows & Approvals | Flows and click on the Flow Mass delete Paused and Waiting Interviews, it will redirect you to the Flow detail page. Now click on the Runbutton, a shown in the following screenshot

3) Go back to Paused and Waiting Interviews section available on Flow Management page and check it out

Paused and Waiting Interviews Queue ( After Running the Flow)

Note: – I will suggest you implement this first on your developer org test it and then move it to Production.