Delete Process instances from environment

Team,

We are on 17.4 version and trying to remove all process instances from one of our lower environment around 100k+.

Do we have any function or plugin which we can use to delete them at once instead of manual deletion .

Thank you.

  Discussion posts and replies are publicly visible

Parents
  • +1
    Certified Lead Developer

    You can create a process report to to get the process ids of the instances and then pass those Process ids to Delete Process Smart service.

  • 0
    Certified Senior Developer
    in reply to GauravSingh

    Hello,

    I'm trying to clean the completed processes from lthe ower environment. (currently this Env has 4k completed instances)

    I created a process report for completed processes and used a!queryProcessAnalytics() with batching to retrieve the process IDs.

    However, I’m encountering the following issues during the deletion process:

    1. The process can delete a few instances (with a batch size of 50), but after several batches, a!queryProcessAnalytics() throws the following error and fails to retrieve the remaining process id's, "There was an error querying the Analytics report. (APNX-1-4275-000)"
    2. I tried adding a delay before fetching the next batch of process IDs (after deleting the previous batch), but the issue persists, the remaining process instances still failed to fetch and delete.
    3. In the process report display settings, when I set "Rows per page" to 25, the report loads correctly. However, increasing this to 50 causes the report to fail with the error: "An error occurred while retrieving the report."
    4. Additionally, I can see errors in both the Analytics log and Tomcat logs, indicating that the process report query is failed to fecth the information.

    Has anyone else encountered these issues? If so, were you able to resolve it?

    Has anyone successfully deleted a large number of process instances using this smart service?

Reply
  • 0
    Certified Senior Developer
    in reply to GauravSingh

    Hello,

    I'm trying to clean the completed processes from lthe ower environment. (currently this Env has 4k completed instances)

    I created a process report for completed processes and used a!queryProcessAnalytics() with batching to retrieve the process IDs.

    However, I’m encountering the following issues during the deletion process:

    1. The process can delete a few instances (with a batch size of 50), but after several batches, a!queryProcessAnalytics() throws the following error and fails to retrieve the remaining process id's, "There was an error querying the Analytics report. (APNX-1-4275-000)"
    2. I tried adding a delay before fetching the next batch of process IDs (after deleting the previous batch), but the issue persists, the remaining process instances still failed to fetch and delete.
    3. In the process report display settings, when I set "Rows per page" to 25, the report loads correctly. However, increasing this to 50 causes the report to fail with the error: "An error occurred while retrieving the report."
    4. Additionally, I can see errors in both the Analytics log and Tomcat logs, indicating that the process report query is failed to fecth the information.

    Has anyone else encountered these issues? If so, were you able to resolve it?

    Has anyone successfully deleted a large number of process instances using this smart service?

Children
No Data