Deleting all the existing workitem before a bot starts

Hi Team,

I have gone through this topic

but i need more steps how to do it using both the ways.
or is there any other workaround to do it by using pop workitem ?

Hello,

From my experience, a workaround could be:

  • Create a helper workflow like “Clear Queue”.
  • Inside a loop, pop the next workitem from the queue to a IWorkitem temporal variable:
    • If it is not null → then update its status to Abandoned
    • If null → exit the loop
  • Call this new workflow from your automation workflow.

I hope this give you an idea

Thanks it worked!!