Purging Orchestration Workflow Data Automatically

This topic describes how you can create a scheduled task that purges SBM Orchestration Engine runtime data automatically, according to a schedule that you define.

Most parameters are already supplied with default values, and do not need to be passed at the command line. However, because the purge is automatic, there will be no user interaction, so you should include the -dbUsername and dbPassword parameters or the -q parameter in the scheduled procedure. For descriptions of the parameters, see Purge Parameters. For information about changing the default parameters and behavior, see Changing Default Parameters and Behavior.

Note: You can hard code parameters in the purge.bat file as described in Changing Default Parameters and Behavior; however, this is not recommended because the parameters will be used in all purges, including manual purges.

To schedule a task to purge SBM Orchestration Engine runtime data automatically, follow one of the following procedures:

Scheduling a Task on Windows Server 2003

On Windows Server 2003, use the Scheduled Task Wizard to schedule a task.

  1. To access the wizard, click the Windows Start menu, select Settings, select Control Panel, select Scheduled Tasks, and then click Add Scheduled Task.
  2. On the last wizard screen, select the Open advanced properties for this task when I click Finish check box.
  3. In the dialog box that opens, perform the following steps:
    1. Click the browse button below the Run box, and navigate to the purge.bat file. Enter this path in the Run box.
    2. Specify any additional parameters after the path. For example, installationDirectory\Serena\SBM\Common\Common\jboss405\bin purge.bat -q -dbUsername joe -dbPassword joe432.
      Note: The dbUsername "joe" and the dbPassword "joe432" are examples and should be replaced by an actual username and password.
    3. If you want to enable logging to the purge.log file, uncomment the :: set LOG_TO_FILE=true line in the purge.bat file by removing the two colons.

Scheduling a Task on Windows Server 2008

On Windows Server 2008, use the Create Basic Task Wizard to schedule a task.

  1. To access the wizard, click the Windows Start menu, select Settings, select Control Panel, select Administrative Tools, and then select Task Scheduler.
  2. In the dialog box that opens, select Create Basic Task from the Action menu.
  3. In the Start a Program wizard screen, perform the following steps:
    1. Click the browse button below the Run box, and navigate to the purge.bat file. Enter this path in the Run box.
    2. Specify any additional parameters after the path. For example, installationDirectory\Serena\SBM\Common\Common\jboss405\bin purge.bat -q -dbUsername joe -dbPassword joe432.
      Note: The dbUsername "joe" and the dbPassword "joe432" are examples and should be replaced by an actual username and password.
    3. If you want to enable logging to the purge.log file, uncomment the :: set LOG_TO_FILE=true line in the purge.bat file by removing the two colons.
    4. Add at least one trigger.