Trading Networks 10.7 | Administering and Monitoring B2B Transactions | Trading Networks Built-In Services Reference | Doc Folder | Summary of Elements in this Folder | wm.tn.doc:viewAs
 
wm.tn.doc:viewAs
Retrieves a single document (envelope information and attributes) from the database; this service does not require the client invoking the service be a sender or receiver of the document being viewed. Optionally, the service can retrieve the raw document content and related document information.
This service is intended for use by other webMethods components, such as webMethods Module for EDI.
Input Parameters
internalId
String The internal document ID of the document to retrieve. This is a unique ID that Trading Networks assigns to the document.
getContent
String (optional) Whether you to retrieve the document content (in addition to the envelope information). Valid values are:
*true - Retrieve the document content.
*false - Default. Do not retrieve the document content.
getRelated
String (optional) Retrieves information about the related documents, grouped documents, and documents in the conversation. Valid values are:
*true - Retrieve the related document information.
*false- Default. Do not retrieve the related document information.
contentPartCriteria
Document (optional) The retrieval criteria for the content parts associated with this document. This is an instance of wm.tn.rec:BizDocEnvelope. If not specified, this service retrieves all content parts of the matching document. You can specify a list of part names to include and/or a list of part names to exclude from the retrieved envelope. The document contains the following keys:
*includeParts String List (optional) The list of content part names to retrieve.
*excludeParts String List (optional) The list of content part names that should not be retrieved.
Output Parameters
bizdoc
Document The document retrieved from the database. For the structure of bizdoc, see wm.tn.rec:BizDocEnvelope. The service populates the Content field within bizdoc if getContent is set as true.
sender
Document The profile summary for the sender of the document. For the structure of sender, see wm.tn.rec:ProfileSummary.
receiver
Document The profile summary for the receiver of the document. For the receiver, see wm.tn.rec:ProfileSummary.
relatedDocCount
String (optional) If getRelated is set as true, this is the number of related documents associated with the retrieved document.
relatedDocs
Document List (optional) If getRelated is set as true, this is information about documents related to the retrieved document. Each IS document (IData object) returned in relatedDocs contains the following keys:
*relationship String The type of relationship.
*from String The internal document ID of the “from” document.
*to String The internal document ID of the “to” document.
groupedDocCount
String (optional) If getRelated is set as true, the number of documents with the same group ID as the returned document.
groupedDocs
String List (optional) If getRelated is set as true a list of documents with the same group ID as the returned document.
Usage Notes
If you are invoking this service from a Java program, in addition to returning bizdoc, sender, and receiver as IS documents (IData objects), the service returns bizdoc as an instance of com.wm.app.tn.doc.BizDocEnvelope and sender and receiver as an instance of com.wm.app.tn.profile.ProfileSummary.