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. |
Target Node | If you are running a group of servers connected to the same database, you can control on which server a task runs. You can specify the server on which the task must run. Current Server. The task runs on the server that is currently connected to the database. Any Server. The task runs on any server connected to the database. Use this option if the task only needs to run on one server and it doesn't matter which one. The Any Server option is the default setting when clustering is enabled. Note: If you have multiple Integration Servers connected to the same database, then select Any Server so that no two servers archive the transactions at the same time. |
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.