-
Task
-
Resolution: Done
-
Major
-
None
-
None
-
None
-
False
-
False
-
NEW
-
NEW
-
Undefined
-
The idea is to create an efficient way to clean up audit tables based on deployment id, process finished older than from jbpm schema taking into account parent-child where a child cannot be deleted if the parent is still active.
Name | IN/OUT | TYPE | Description |
---|---|---|---|
deploymentId | IN | VARCHAR | name of the deployment to be considered for deletion |
days | IN | INT | number of days where the process instances end date is older. e.g: end_date < NOW() - days) |
dryRun | IN | BOOL | if we just simulate = true or not |
- | OUT | TABLE | list of process instances id that were deleted |
Examples
SELECT select audit_cleanup('my-kjar-v1', 0, true);
this will show the list of process instances ids from the deployment my-kjar-v1 that were finished at least 2 days ago.
SELECT select audit_cleanup('my-kjar-v1', 0, false);
this will show and delete the list of process instances ids from the deployment my-kjar-v1 that were finished at least 2 days ago.
attached stored_procedure.txtthe stored prodcdure