Remove all pending queue items for a case after case cancel.

In case we cancel a case, the case get’s moved to status “Resolved-Cancelled”. However, if a queue item is still awaiting to be processed (or is in Broken queue and gets requeued), the case becomes active again.

Currently in my “CancelCase” action, I run over both System-Message-QueueProcessor-BrokenItem and System-Message-QueueProcessor-DelayedItem, filter out the items where the pzInsKey of my case matches the pzReferenceObjKey and delete them by handle.

But I can imagine some OOTB solution must exist to do the cleanup…

@Joris Claus

I don’t think there is any OOTB process to handle the broken queue for Queue Processor items. You can either manually remove or requeue those items from the broken item list.

But I think you can write an adhoc utility to browser over the System Queue Instances and clear them out based on your business logic. You can execute that activity as part of Job Scheduler or QP (Not the best recommended solution though)