Archiving and Clearing Data
To alleviate database strain and speed up queries from the buildup of process instances, the platform has added an archiving feature. It allows you to regularly move completed instances older than a set timeframe into an archive database.
Data archiving and clearance involve two types: process instance archiving and business data archiving. In process instance archiving, only data directly related to the instance is archived, including instance records, step records, reversal history, and input parameters.
Process Instance Archiving
A process instance refers to various TT data created using a BPM, for example, a leave e-flow.
- Log in to the Huawei Cloud Astro Zero console and click Access Homepage. The application development page is displayed.
- In the upper left corner of the page, click
and choose Environments > Environment Configuration.
- Choose Maintenance from the main menu.
- In the navigation pane, choose Global Elements > Data Archiving > Data Archiving and Deletion > Process Instance.
- On the Process Instance tab page, click
next to the value of Record Retention Time to set the retention period of process instance records. The unit is Year or Month.
When the specified retention period expires, the system automatically deletes the instance data from the original database and archives the data to the new database.Figure 1 Setting the record retention period- To avoid overwhelming CPU and database resources during the initial archive, each archiving task is limited to processing a default of 500,000 records.
- The record retention period must be year or month. When the record retention period is set to Month, the value range is [1,36]. When the record retention period is set to Year, the value range is [1,10].
- Set the execution time of an archiving task.
The time zones of different organizations can be set, and the archiving time can be set to periodically archive process instances that have expired. If the archive time is not set in system parameters, the archive time set in the Huawei Cloud Astro Zero system parameter is used.
Figure 2 Selecting time zonesFigure 3 Setting the archiving time - View task history.
Click Task History to view the archiving records of the process instance.
Service Data Archiving
To address the issue of excessive records consuming disk space and slowing query performance in the service data table, infrequently used data should be archived. Once archived, data is removed from the active database and stored in an archive database, where it can only be accessed through query operations.
- Log in to the Huawei Cloud Astro Zero console and click Access Homepage. The application development page is displayed.
- In the upper left corner of the page, click
and choose Environments > Environment Configuration.
- Choose Maintenance from the main menu.
- In the navigation pane, choose Global Elements > Data Archiving > Data Archiving and Deletion.
- On the Service data tab page, click create.
Table 1 Parameters Parameter
Description
Object name
Select an object from the drop-down list.
Created Time
The value starts from the creation time.
Last Edited
The time starts from the latest editing time of the service data.
Retention Time Exceeds
Set the duration for storing service data in the original database.
The records that meet the following conditions
Records that meet the conditions are added. When the specified retention period expires and the conditions are met, the records can be deleted or archived.
Perform the following operations
Data is cleared or archived once the set retention period and conditions are met.
- Clear indicates that data is completely cleared. You do not need to set archive instances. Archive refers to clearing the data in the original database and archiving the data in the new database. Therefore, you need to first complete the operations in Configuring an Archive Instance.
- If you select Archive, limit the total archived records to a maximum of 500,000, and process no more than 5,000 records per batch to avoid overloading the archive system. When the records of each batch are dumped to a specified archive instance, the records of the same object are named in the format of {object_name} _{UTC time}_{batch}.txt. The format of the exported data is the same as that of the exported data. If encrypted fields are involved, the exported data will be encoded.
- View task history.
Click Task History to view the execution records of the clearing or archiving task.
Feedback
Was this page helpful?
Provide feedbackThank you very much for your feedback. We will continue working to improve the documentation.See the reply and handling status in My Cloud VOC.
For any further questions, feel free to contact us through the chatbot.
Chatbot