LogCleanupCommand

12 views
Skip to first unread message

Javi Er

unread,
Apr 10, 2025, 2:05:31 PMApr 10
to jBPM Usage
Hi,

I know that is possible to perform regular maintenance of the jBPM Database using the LogCleanupCommand, which removes historical data from the database.

I need to delete some data in RequestInfo, ProcessInstanceLog, VariableInstanceLog, because I have seen some big querys against them.
But I don´t want to lose anything.

Is there any similar command to  "org.jbpm.executor.commands.LogCleanupCommand"  that performs a backup in another table, of the deleted records before of delete them?
Or any database script?
A delete trigger in affected tables can be a good or bad idea?

Do you know exactly the tables that are deleted using this command.
(I have done a test, but as I don´t have rows in all tables, i don´t know if maybe it could delete in that tables)


I´m using 7.11 with runtime strategy of per process instance.

Thank you.


Test environment with no active processInstance:

 
| table                         |count-BEFORE|count-AFTER|                                         |
|-------------------------------|------------|-----------|-----------------------------------------|
| ATTACHMENT                    |0           |0          |: all other before zeroes imply not know!|
| AUDITTASKIMPL                 |603         |0          |deleted                                  |
| BAMTASKSUMMARY                |603         |603        |NOT Deleted                              |
| BOOLEANEXPRESSION             |0           |0          |                                         |
| CASEFILEDATALOG               |0           |0          |                                         |
| CASEIDINFO                    |0           |0          |                                         |
| CASEROLEASSIGNMENTLOG         |0           |0          |                                         |
| CONTENT                       |982         |982        |NOT Deleted                              |
| CONTEXTMAPPINGINFO            |0           |0          |                                         |
| CORRELATIONKEYINFO            |0           |0          |                                         |
| CORRELATIONPROPERTYINFO       |0           |0          |                                         |
| DEADLINE                      |0           |0          |                                         |
| DELEGATION_DELEGATES          |0           |0          |                                         |
| DEPLOYMENTSTORE               |0           |0          |                                         |
| EMAIL_HEADER                  |0           |0          |                                         |
| ERRORINFO                     |84          |0          |deleted                                  |
| ESCALATION                    |0           |0          |                                         |
| EVENTTYPES                    |0           |0          |                                         |
| EXECUTIONERRORINFO            |1           |1          |NOT Deleted                              |
| I18NTEXT                      |1809        |1809       |NOT Deleted                              |
| NODEINSTANCELOG               |3175        |0          |deleted                                  |
| NOTIFICATION                  |0           |0          |                                         |
| NOTIFICATION_BAS              |0           |0          |                                         |
| NOTIFICATION_EMAIL_HEADER     |0           |0          |                                         |
| NOTIFICATION_RECIPIENTS       |0           |0          |                                         |
| ORGANIZATIONALENTITY          |5           |5          |NOT Deleted                              |
| PEOPLEASSIGNMENTS_BAS         |1206        |1206       |NOT Deleted                              |
| PEOPLEASSIGNMENTS_EXCLOWNERS  |0           |0          |                                         |
| PEOPLEASSIGNMENTS_POTOWNERS   |1603        |1603       |NOT Deleted                              |
| PEOPLEASSIGNMENTS_RECIPIENTS  |0           |0          |                                         |
| PEOPLEASSIGNMENTS_STAKEHOLDERS|0           |0          |                                         |
| PROCESSINSTANCEINFO           |0           |0          |                                         |
| PROCESSINSTANCELOG            |138         |0          |Deleted !                                |
| QRTZ_BLOB_TRIGGERS            |0           |0          |                                         |
| QRTZ_CALENDARS                |0           |0          |                                         |
| QRTZ_CRON_TRIGGERS            |0           |0          |                                         |
| QRTZ_FIRED_TRIGGERS           |0           |0          |                                         |
| QRTZ_JOB_DETAILS              |0           |0          |                                         |
| QRTZ_LOCKS                    |2           |2          |NOT Deleted                              |
| QRTZ_PAUSED_TRIGGER_GRPS      |0           |0          |                                         |
| QRTZ_SCHEDULER_STATE          |1           |1          |NOT Deleted                              |
| QRTZ_SIMPLE_TRIGGERS          |0           |0          |                                         |
| QRTZ_SIMPROP_TRIGGERS         |0           |0          |                                         |
| QRTZ_TRIGGERS                 |0           |0          |                                         |
| QUERYDEFINITIONSTORE          |10          |10         |NOT Deleted                              |
| REASSIGNMENT                  |0           |0          |                                         |
| REASSIGNMENT_POTENTIALOWNERS  |0           |0          |                                         |
| REQUESTINFO                   |315         |1          |Deleted !                                |
| SESSIONINFO                   |2           |2          |NOT Deleted                              |
| TASK                          |603         |603        |NOT Deleted                              |
| TASKDEF                       |0           |0          |                                         |
| TASKEVENT                     |2379        |0          |deleted                                  |
| TASKVARIABLEIMPL              |3752        |0          |deleted                                  |
| TASK_COMMENT                  |0           |0          |                                         |
| VARIABLEINSTANCELOG           |2373        |0          |Deleted !                                |
| WORKITEMINFO                  |0           |0          |                                         |
|-------------------------------|------------|-----------|-----------------------------------------|


 

Reply all
Reply to author
Forward
0 new messages