Trading Networks 10.3 | Administering and Monitoring B2B Transactions | Trading Networks Built-In Services Reference | Archive Folder | Summary of Elements in this Folder | wm.tn.archive:extendedArchive
 
wm.tn.archive:extendedArchive
Archives documents and deletes documents from the Trading Networks database, based on the criteria that you specify.
Input Parameters
operation
String The operation to perform. Specify archive or delete.
deletionType
String Whether to delete data from archival or production tables, or both. Valid values are:
*Archival Default. Delete documents from archive tables.
*Production Delete documents from production tables.
*Both Delete documents from both archive and production tables.
afterDays
String (optional) The maximum number of days after which to archive or delete stored documents. Specify a value from 0 through 730365. 0 indicates to not archive or delete documents.
backOffTime
String (optional) The number of seconds that Trading Networks must wait between two batches of archive or delete during one schedule.
The default time is 15 seconds. You can also set the default value using the tn.archive.batchBackoffTime property in the properties.cnf file. For information about the property, see webMethods Trading Networks Administrator’s Guide.
maxRows
String (optional) The maximum number of documents that Trading Networks can archive or delete during one schedule.
Trading Networks archives or deletes documents in batches. For example, if batchSize is set to 50 and the maxRows is set to 1000, then Trading Networks performs the archive or delete 20 times during that schedule.
There is no limit on the maximum number of documents per schedule. However, the value specified for maxRows must be greater than or equal to the batchSize value.
When the total number of documents for archive or deletion is more than the maximum number of documents per schedule, Trading Networks attempts to archive or delete the additional documents during the next schedule.
You can set the default value using the tn.archive.maxRows property in the properties.cnf file. For information about the property, see webMethods Trading Networks Administrator’s Guide.
batchSize
String (optional) The maximum number of documents that can be archived or deleted in a batch.
The default is 100 documents. Set the default value in the tn.archive.batchSize property defined in the properties.cnf file. For information about this property, see webMethods Trading Networks Administrator’s Guide.
docTypeId
String (optional) For XML documents, specify the DOCTYPE identifier, which can be either the system identifier or public identifier within the XML document. These identifiers are located in the document type declaration (DOCTYPE) after either the “SYSTEM” or “PUBLIC” literal string.
For flat file documents, specify the Trading Networks-generated internal identifier of the TN flat file document type. To determine the document type identifier invoke the wm.tn.doctype:list service from Software AG Designer to return the name and ID of all your TN document types.
senderId
The internal ID specified in the sender's profile. If you do not specify any value, Trading Networks considers the documents of all senders for the archival or deletion.
receiverId
The internal ID specified in the receiver's profile. If you do not specify any value, Trading Networks considers the documents of all receivers for the archival or deletion.
systemStatus
The status of a document after Trading Networks has processed it, for example DONE or DONE W/ERRORS.
userStatus
A value that a processing rule assigned to the document's User Status system attribute, for example, accepted, rejected, or pending approval.
options
String Whether to archive or delete any of the following:
*Bizdoc
*Document content
*Custom attributes
*Custom array attributes
*Related documents
*Delivery tasks
*Activity log entries
*Unique keys
*EDI tracking details
The following values indicate:
*true - Archive or delete the document information.
*false - Do not archive or delete the document information.
Output Parameters
count
String Optional. The number of documents archived or deleted from the production database.
This parameter does not provide the count for documents deleted from the archive database. For example, if you execute the service to delete documents from the archive database, the count is 0 (zero) because nothing is deleted from the production database.
Usage Notes
*When operation is:
*Delete, BizDoc (under options) is true, and regardless of whether the other child tables of BizDoc are true or false, all the child records are deleted.
*Delete, BizDoc (under options) is false, the corresponding child records are deleted for all the child tables that are true.
*Archive, BizDoc (under options) is true, and all the other child tables that are true are archived and those that are false are deleted.
*You can troubleshoot the status of the delete or archive task by checking the corresponding entries in Integration Server logs. Information such as the number of documents that will be archived or deleted, batch size, and number of batches completed are captured in Integration Server logs.
An example of Integration server log entries for an archive or delete operation with 9600 transaction, in two batches, with batch size 5000 is as follows:
YYYY-MM-DD 12:34:19 EDT [TNS.0000.1011W] Archive: Starting BizDoc
Delete operation.
YYYY-MM-DD 12:34:19 EDT [TNS.0000.1011W] Archive: Expecting to
delete 9600 transactions (with batchSize=5000), will require
2 batches.
YYYY-MM-DD 12:34:58 EDT [TNS.0000.1011W] Archive: Completed Batch
1 of 2.
YYYY-MM-DD 12:35:47 EDT [TNS.0000.1012W] Archive: Completed Batch
2 of 2.
YYYY-MM-DD 12:35:47 EDT [TNS.0000.1012W] Archive: Finished BizDoc
Delete operation. Returned count=9600