Skip to main content
May 2, 2024
Question

Is there a direct way we can archiving the process instance which are active, paused , paused by exceptio

  • May 2, 2024
  • 5 replies
  • 1 view

Hello everyone,

I'm looking to archive process instances that are currently active, paused, or paused due to an exception. We've already configured process instance archival after 5 days with deletion after 3 days, but we now have over 10,000 process instances in these states that we want to archive instead of deleting, as we may need them in the future.

Is there a script or another method we can use to archive these instances?

Thanks, Manish

5 replies

harshk1671
May 2, 2024

Hi manishs0028,

You can create a process report using 'a!queryProcessAnalytics()' to get process instance Id(s) of all the instances in currently active, paused, or paused due to an exception status. 

Create a utility process to cancel or archive all the above instances Id(s) using cancel process or archive process smart service respectively. 

May 2, 2024

[mention:8e5a7a058e4f4768ba94c8d9526dd3e4:e9ed411860ed4f2ba0265705b8793d05] : Thanks for your input , Can you provide me some example code, that will be helpful thanks.

harshk1671
May 2, 2024

Follow the screenshots to create Process Report:

After creation, edit the report.

Under Filter > Create New Rule

Save the changes. Using this report in a!queryProcessAnalytics() you can get the instance ids as suggested in previous message.