Automated Process Cleanup

Over many years of managing processes, a lot of process versions are being created. Not all of them need to be kept or be available online all the time. Therefore, Stages contains an automatic cleanup that can continuously export, archive, and delete process version based on a set of rules set by the administrators.

How to enable this feature

The cleanup feature is available in version and later, but it needs to be enabled in a configuration file. With the release of version 7.10, the feature will be enabled by default.

To enable, the following configuration property needs to be added in config.xml:

<property name="cleanup.enabled" value="true" />
<property name="pdf.serverAddress" value="ADDRESS_OF_THE_STAGES_SERVER" /> (e.g. http://localhost:8080)

To configure the feature, the following configuration properties can be used:

<property name="cleanup.cronExpression" value="0 0 * ? * *"/>
<property name="cleanup.folder" value="export"/>

The cronExpression property defines how often the cleanup is being run. The format follows the common cron format


The default setting (see in properties setting above) starts the cleanup once per hour (at 0 seconds and 0 minutes) at every day of the week, every month, and every year.

A full explanation of the supported cron syntax can be found here.

The folder property defines the output folder on the Stages server where exported zip files are stored. It can either be relative to the Stages home folder or an absolute path. The target folder must exist and must be writable by the user id that is running the Stages service.

When the feature is being enabled for the first time, the output folder (see previous paragraph) needs to be created. If you plan to export or archive many versions, you should plan for the respective storage space to be available. Also, the storage consumption should be monitored. For maximum reliability, the output folder should be located on a different storage volume than the Stages installation.

As the process cleanup works in the background, it sends email notifications to the administrators. Therefore, the email notification feature needs to be enabled in the notification section of config.xml.

How to use the Process Cleanup

The rules for the process cleanup can be defined under Administration > Process Cleanup.

The main page shows all currently active cleanup rules:

The Archives tab shows any process archives that have been created by the process cleanup.

Use the Add delete rule operation to add rules. All fields are required and you need to select at least one state for the rule to have any effect.

Every time the process cleanup runs (as controled by the cron expression), it checks all delete rules for matching process version. Those process versions need to have the state specified in the rule and need to be at least as old as set with “Delete after”. When “Export process version” is selected, a .zip file containing the process as .xml file is created before the deletion (that can be used to re-import it again, if that should ever be necessary).

When “Archive process version” is selected, a .zip file containing the process as .pdf file is created before the deletion.

The sample rule in the screenshot above selects all process versions that were created as process interface release versions in any state, that are at least three months old, and creates an export, but no archive, before the process version is deleted.

After creating the rule, you also have to select for which workspaces or workspace collections it should be applied, otherwise it will not have any effect.

This is done by selecting “Assign workspaces” in the popup menu:

When adding workspaces, you can also select “transitive”, to not only select the workspace itself, but also all of its child workspaces:

Alternatively, workspace collections can also be assigned. For example, this useful to apply cleanup rules only to the modeling workspaces.

Process Cleanup Constraints

The following versions are never archived, exported, or deleted, no matter if rules apply or not:

  • Working Version
  • Valid Versions

The process cleanup menu is accessible only for users with the special Process Cleanup permission. Typically, this permission should only be given to the administrators, e.g. by assigning it to the “Administrators” group.

The process cleanup notifies the administrators per email about created exports and archives and also notifies about errors that might occur during creation (e.g. storage shortage, inaccessible files).