historyService.deleteHistoricProcessInstance(...)
historyService.deleteHistoricProcessInstance one by one?
Basically the reason is to keep it as simple as possible – and to use only components helping you to solve the problem at hand easier. For daily clean-up jobs I think a Cron/Quarz/EJB-Timer solution is perfectly fine - as you do not use any special features of the process engine (the only features I see is the scheduler and maybe the logging/history). But only if you have scheduler-infrastructure already in place (then you normally already have control over which job run at which time, suspending them, seeing logs, ..). If you do NOT have this in place yet it is pretty nice to use the start timer mechanism for it.
Make sense?
To view this discussion on the web visit https://groups.google.com/d/msgid/camunda-bpm-users/c6a27081-ff2f-4144-9305-6036708e006c%40googlegroups.com.
Hi Rob.
To your point, if I had an operations job scheduler, I may choose to initiate the housekeeping processes from my job scheduler as I centralize operations. If I don,t have a job scheduler, I use a timer start process in the engine to trigger the maintenance processes.
Does that sound like a good compromise?
Yes – it does. Exactly what I had in mind.
I think an ideal solution would be a suite of housekeeping processes maintained as part of the engine. Rationale: you guys know the schema as well as anyone and thus know how to purge.
The reason I am a bit reluctant here is that there are a lot of configuration possibilities in customer scenarios (like configuring the history level, customize history events, add own indices, …). I think such housekeeping processes could only make a best guess maybe not working optimal in high load scenarios where at some point you are more efficient if you do deletion of data directly on the database (tuned for the specific database).
But I agree that an community extension without the requirement of run in each and every possible situation would be already a great step in the right direction :-)
Cheers
Bernd
To view this discussion on the web visit https://groups.google.com/d/msgid/camunda-bpm-users/2f648550-5597-4f3c-9fe8-42c13b792744%40googlegroups.com.