Trading Networks 10.7 | Administering and Monitoring B2B Transactions | Trading Networks Administrator's Guide | Archiving and Deleting Documents | Setting Up Basic Archive and Deletion | Scheduling Archive and Deletion
 
Scheduling Archive and Deletion
The archive and deletion service is the wm.tn.archive:archive built-in service. You 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 describes the parameter and corresponding action:
Parameter
Action
folder:subfolder:service
Specify wm.tn.archive:archive.
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.
When you run services such as wm.tn.archive:archive or wm.tn.archive:extendedArchive:
a. For each batch, based on the TN property tn.archive.batchSize, the document IDs to be archived/deleted are copied to the ARCHIVE_WorkTable.
b. The document IDs are looped over and deleted.
c. Once the actual records are deleted, the records are deleted from the ARCHIVE_WorkTable.
d. If, for some reason, the job does not terminate normally, for example, the Oracle rollback segment overflows due to a large batch size, there might be leftover records in ARCHIVE_WorkTable. If this happens, these records have to be deleted before attempting another archive operation.
Starting Trading Network versions 10.1 or higher, archive stored procedures were introduced to streamline the process. You can manually delete the records by date, but this can be problematic with a large number of records due to the dependency on rollback segment sizing.
The tn.archive.batchSize determines the number of records to commit per transaction, making the behavior easier to control.