• Home
  • Cleaning up the Queue

Cleaning up the Queue, before each run of a process, you may want to remove all the pending, completed or exception items left over from the previous run.

Cleaning up the Queue

Before each run of a process, you may want to remove all the pending, completed or exception items left over from the previous run. The basic steps are to find all the pending, completed or exception items and then using a loop to delete each one.

Clean up Flow

1. Get Pending Items

This action will look for all the pending items on a specific queue and return a list of their Item IDs.

Get Pending Items Action Properties Inputs

The only compulsory input is the Queue Name where you can use the Data Item that has the name of the queue stored in it. Use the Key Filter and Tag Filter to control which queue items you want to include in the search. In the Maximum input you can control the maximum number of items to return. The default is to return all items The Skip input is the number of items to skip from the start of the queue. The default is zero which will start from the first item on the queue.

Get Pending Items Action Properties Outputs

The only output is the collection into which you want to put all the Item IDs.

2. Get Completed Items


Get Completed Items Action Properties Inputs

Most of the inputs are the same as the Get Pending Items action. You also have the option to provide a Start Date and End Date to narrow down which items are retrieved. The output is a collection of the Item IDs of all the completed items.

3. Get Exception Items


Get Exception Items Action Properties Inputs

In this action you have an additional input, Resource Name, where you can specify the name of the resource that would have worked the items. Again, the output is a collection of the Item IDs of all the exception items.

4. Delete Item


Delete Items Action Properties Inputs

This action needs to be placed in a loop which uses the collection of Item IDs from the previous action.

The only input is the Item ID column of the collection that has all the pending items.