Scheduling Archive and Deletion
You can use the wm.tn.archive:archiveByStoredProc service to archive and delete documents from the Trading Networks database. You can schedule when to run this service in Integration Server Administrator, by setting up a user task that executes the service. For complete information about scheduling services for execution, see webMethods Integration Server Administrator’s Guide.
To schedule archive and deletion
1. Open the Integration Server Administrator that hosts Trading Networks.
2. In the Server menu of the navigation area, click Scheduler.
3. Click Create a scheduled task.
4. Set the Service Information parameters.
The following table lists the parameter and corresponding action to perform:
Parameter | Action |
folder:subfolder:service | Specify wm.tn.archive:archiveByStoredProc. Click Assign Inputs to specify the following inputs parameters: operation afterDays batchCount For more information about the parameters, see webMethods Trading Networks Built-In Services Reference. |
Run As User | Specify Administrator. |
Persistence | Select the Persist after restart check box. This selection tells Integration Server to maintain this user task if Integration Server is restarted. |
Clustering | Specify whether you want the task to run on any available Integration Server in your cluster of Integration Servers. If you do not specify this option, the task runs on the Integration Server that hosts Trading Networks. |
5. In the Schedule Type and Details section of the screen, do one of the following:
To run the service at specified intervals, click
Repeating. In the
Interval field, specify the number of seconds to wait between executions. For example, if you want the service to run once every 24 hours, specify 86400. In the
Repeating field, select the
Repeat from end of invocation check box. This setting tells
Integration Server to wait for the scheduled task to complete before starting the next, regardless of the
Interval setting.
Note: The service executes for the first time immediately after you schedule the user task.
To run the service on specified dates and times, click
Complex Repeating. In the
Start Date and
Start Time fields, specify the date and time for the first execution. In the
Run Mask parameters, specify the schedule for subsequent executions. If you want the service to run indefinitely, do not specify
End Date or
End Time.
6. Click Save Tasks.