Purge tool use in production environment

1
0
-1

Hello,

I'm starting a project that requires the execution of many process instances, and I want to establish a purge plan, from the beginning

I have to provide to my users 24x24 7x7 server availability.

I want to automatize the purge to happen regularly in order to have a "light" database. I don't want to start it manually.

Here you are my questions:

  • From the documentation https://documentation.bonitasoft.com/bonita/2021.1/purge-tool : "Bonita runtime environment should be shut down when running this tool, i.e. Bonita server should be stopped."
    The word "should" is used instead of "must". What are the issues we could encounter if we don't stop the server? I guess that some lock can be created in some tables during the purge activity, so the system could be slower. Any other major issues?
  • I want to purge all the process instances older than a certain date, but the process Id is mandatory. Why the "remove all process instances older than a certain date" use case has not been considered? I guess that there is a reason.
    Without that. I have to write a java program to read all the process definition Id, and then loop and execute the purge for every process Id. Not very practical.
    I see there's the way to get the list of processes (executing the purge without the process parameter), but this list is passed together with some description. Potentially I could parse it, but I guess it's not intended for the use I have in mind.

Thank you in advance!

1 answer

1
+2
-1
This one is the BEST answer!

Hi Enrico,

1) Delete operations are costly at db side which can lead to a degradation of performance on the regular activity. That is the reason why we RECOMEND to stop the server, but it is not a prerequisite

2) Purge tool deletes cases that are older than a given date and of a given process

https://documentation.bonitasoft.com/bonita/2021.1/purge-tool#_run_bonit...

This command will delete all archived process instances belonging to the process identified by PROCESS_DEFINITION_ID, that are finished since at least OLDEST_DATE_TIMESTAMP.

The use case of delete EVERYTHING older than a given date was not consider as a principal use-case, but it is reachable with the current state of the tool by calling the lib with inside a loop that gets all process definition ids... processAPI.searchProcessDeploymentInfos
We could take it into account as a candidate for a future evolution

I hope it helps

Notifications