Details
-
Feature Request
-
Resolution: Won't Fix
-
L3 - Default
-
None
-
7.14.0-alpha2
-
None
Description
We're using Camunda BPM as a shared engine running on Wildfly but with multiple (few) instances of our application as tenants.
All Process Definitions and Instances are created for a tenant.
History Cleanup is run by calling
Job job = this.historyService.cleanUpHistoryAsync( true );
Unfortunately this cannot be run per tenant.
Currently this Job runs at a fixed time and leads to
org.camunda.bpm.engine.OptimisticLockingException: ENGINE-03005 Execution of 'UPDATE EverLivingJobEntity[344b74d2-c09d-11ea-8af1-0003ba36314c]' failed. Entity was updated by another transaction concurrently.
- Create new method Job cleanUpHistoryAsync(boolean immediatelyDue, String tenantId )
- Retrieve and clean up outdated instances only for the given tenantId
- Avoid the OptimisticLockingException when Jobs for different Tenants are run at the same time.