Monday, March 13, 2017

Instance Archiving and Purging in Oracle Process Cloud Service

Archiving and purging your process instances systematically can improve drastically the performance of your processes. This task has been simplified in Oracle Process Cloud Service that gives you the option to run archives on demand or automate this task via scheduled jobs.

All archived instances (data) are stored in the Oracle Cloud Storage Service that is bundled with your Oracle Process Cloud Service. Archived instances are compressed in a zip file and once an archive task is processed, you will receive an email that will contain the link to the zip file that you can click on it to download the archived instances.

Purge will remove the BPM runtime information. Purge runs as a separate job and runs directly on the database. So when you configure archiving and purging, then two separate jobs will be executed independently of each other. So let’s see how you can schedule instance archiving and purging.

Configuring instance archiving and purging is an administrative task, therefore from the Oracle Process Cloud Service home page click on the “Configure” banner to go to the application settings.

Using the left menu, click on “Archive and Purge” under the “Configure” menu item group to open the “Configure and Purge” page.
By default the “Configure Archive and Purge” page will display the “On Demand Instances Archive” tab. You can use this page to run an instance archive any time you want. You can configure various options for your archive such as whether to include audit payload data, whether to include an audit image that is basically an image that shows where in the process flow the process instance is located at the time of the archive. You can also configure whether to include task history and rules history data in your export.

You can also optionally encrypt your archive using a password by selecting the “Encrypt Archive” option to enable the “Archive Password” and “Confirm Password” input fields.

By default Oracle Process Cloud Service will send an email with a link to the zip archive to the email defined in your “My Services” profile. You have the option to ad-hoc override the default email by selecting the “Use Alternate Email” check box to define an alternative email address.

You can delete your instances after they have been archived by selecting the “Delete Instances After Export” check box. If you are archiving completed instances, then you have the option to keep instances after a specific time frame.

Once you have defined all the configurations for your on demand archive, click on “Archive”.

An information message will appear, confirmation the export request with its export id.

Once the archive request gets completed, Oracle Process Cloud Service will send an email to either the default email specified in the “My Profile” section or to the alternate email provided in the archive configuration screen that will contain a link to the exported zip archive.

Alternatively, you can use table below the “Archive Requests” section to check on the status of your export. Make sure you click on refresh to see the latest status of your export.

Please note that the state of an archive request is a link to the archived zip file, so if you click on it you will be able to download the zip file that will contain your archived instances.

You can also schedule instance archiving and purging by clicking on the “Schedule Instances Archive” tab.

By default, the scheduler is disabled and you need to enable it by checking the “Enable Archive and Purge” check box. Doing so will also enable the time fields.

You can use the time fields to define a time for your archive. In my example, I configured my archive to run every week on Friday at 23:00. Please note that time is Mountain Standard Time.

Alternatively you can use a cron expression to define an advanced scheduling interval. Please note that if you define a cron expression, the time filters will be disabled.

Use the “Archive Job Timeout” field to define the maximum time, in minutes, an archived job is allowed to run. If an archive job takes longer than the configured job timeout, the job will be stopped and the archive will pick it up from where it was left off in the next scheduled archive run.

You can receive an email notification in case of an archive failure. To do so you need to specify an email in the “Failure Notification Address” field.

If you want to also enable purging of instances, click on the “Purge Archived Data” checkbox. You can optionally define a “Purge Retention” in days, which is basically the number of days data should be retained after they have been purged.

You can also configure purge timeout period in minutes using the “Purge Job Timeout” field. In my example I’ve configured a purge retention policy of 5 days and a timeout period of 5 minutes.

Once you finish with your configurations, click on the “Save” button. You should see in the “Archive Requests” section your pending archive and purge request which is waiting for the specified time period to start.

No comments:

Post a Comment