Chapter 13. Managing log files
Red Hat Process Automation Manager manages the required maintenance, runtime data that is removed, including:
- Process instance data, which is removed upon process instance completion.
- Work item data, which is removed upon work item completion.
- Task instance data, which is removed upon completion of a process to which the given task belongs.
Runtime data, which is not cleaned automatically includes session information data that is based on the selected runtime strategy.
- Singleton strategy ensures that runtime data of session information is not automatically removed.
- Per request strategy allows automatic removal when a request is terminated.
- Per process instances are automatically removed when a process instance is mapped to a session that is completed or aborted.
In order to keep the track of process instances, Red Hat Process Automation Manager provides audit data tables. There are two ways to manage and maintain the audit data tables, including cleaning up the jobs automatically and manually.
13.1. Setting up automatic cleanup job
You can set up an automatic cleanup job in Business Central.
Procedure
- In Business Central, go to Manage > Jobs.
- Click New Job.
- Enter values for Business Key, Due On, and Retries fields.
Enter the following command into the Type field.
org.jbpm.executor.commands.LogCleanupCommand
To use the parameters, complete the following steps:
For full parameters list, see Section 13.3, “Removing logs from the database”.
- Open the Advanced tab.
- Click Add Parameter.
- Enter a parameter in the Key column and enter a parameter value in the Value column.
- Click Create.
The automatic cleanup job is created.
13.2. Manual cleanup
To perform manual cleanup, you can use the audit API. The audit API is divided into the following areas:
Name | Description |
---|---|
Process audit |
It is used to clean up process, node and variable logs that are accessible in the
For example, you can access the module as follows: |
Task audit |
It is used to clean up tasks and events that are accessible in the
For example, you can access the module as follows: |
Executor jobs |
It is used to clean up executor jobs and errors that are accessible in the
For example, you can access the module as follows: |
13.3. Removing logs from the database
Use LogCleanupCommand
executor command to clean up the data, which is using the database space. The LogCleanupCommand
consists of logic to automatically clean up all or selected data.
There are several configuration options that you can use with the LogCleanupCommand
:
Name | Description | Is Exclusive |
---|---|---|
|
Indicates whether process and node instances, and process variables log cleanup is skipped when the command runs. The default value is | No, it is used with other parameters. |
|
Indicates if the task audit and event log cleanup are skipped. The default value is | No, it is used with other parameters. |
|
Indicates if Red Hat Process Automation Manager executor entries cleanup is skipped. The default value is | No, it is used with other parameters. |
|
Indicates if a job routine runs only once. The default value is | No, it is used with other parameters. |
|
Schedules the next job execution. The default value is
For example, set to | No, it is used with other parameters. |
|
Logs that are older than the specified date are removed. The date format is |
Yes, it is not used with |
|
Logs that are older than the specified timer expression are removed. For example, set |
Yes, it is not used with |
| Specifies process definition ID for logs that are removed. | No, it is used with other parameters. |
|
Indicates the number of records in a transaction that is removed. The default value is | No, it is used with other parameters. |
| Specifies deployment ID of the logs that are removed. | No, it is used with other parameters. |
| Persistence unit name that is used to perform delete operation. | Not applicable |
LogCleanupCommand
does not remove any active instances, such as running process instances, task instances, or executor jobs.