You are on page 1of 12

2/17/2021 Get Document Info Service

Home  IBM Sterling B2B Integrator 6.0.3 


Previous Next

Get Document Info Service


Search in all products

Search in this product... 


 Table of Contents Change version or product 

 Print  PDF   Help Take a tour

Rate this content

https://www.ibm.com/support/knowledgecenter/SS3JSW_6.0.3/integrating/integrating/integrator/Get_Doc_Info_svc.html 1/12
2/17/2021 Get Document Info Service

The Get Document Info service provides information about the primary document. You can
query the service about many types of information, including DocumentName,
DocumentBodyLength, and DocumentID.

The following table provides an overview of the Get Document Info service:

System name GetDocumentInfoServiceType

Graphical Process Modeler (GPM) category All Services

Description The Get Document Info service provides


information about the primary document. You
can query the service about the following
information:
• DocumentName

• DocumentBodyLength

• DocumentId

• DocumentSubject

• DocumentCreateTime

Rate this content


• DocumentContentType

• DocumentCharEncoding

• DocumentContentSubType

• DocumentPreviousDocId

• DocumentLength

• Correlations

• Storage Type

• Node name

• File name

• Storage time

You can also use the service to set the


following information, with or without
creating a new document in the system:

• BodyName

• Document Content Type

https://www.ibm.com/support/knowledgecenter/SS3JSW_6.0.3/integrating/integrating/integrator/Get_Doc_Info_svc.html 2/12
2/17/2021 Get Document Info Service

• DocumentCharEncoding

• DocumentContentSubType

• updateMetaDataOnly: When set to “true”


BodyName, Document Content Type,
DocumentCharEncoding,
DocumentContentSub Type, Document
Subject, and DocumentName can be
updated without creating a new
document.

Business Usage This service allows information obtained from


the document to be used in the business
process at run time. You can also use the
service to set certain information about the
document in the business process.

Usage Example Obtain correlations from a document, such as


a correlation for document type, and use this
to determine further processing that would

Rate this content


be specific to that document type.

Preconfigured? Yes

Requires third-party files? No

Platform availability All supported Sterling B2B Integrator


platforms

Related services None

Application requirements None

Initiates Business Processes This service does not initiate a business


process

Invocation Not applicable

Business Process Considerations Allows a document ID to be passed instead of


the whole document. This makes information
from the document available for use in the 
process without opening the document.

Returned Status Values Returned status values:


https://www.ibm.com/support/knowledgecenter/SS3JSW_6.0.3/integrating/integrating/integrator/Get_Doc_Info_svc.html 3/12
2/17/2021 Get Document Info Service

• Success

• Error

Restrictions None

Persistence Level System default

Implementing the Get Document Info Service


To implement the Get Document Info service, complete the following tasks:
1. Create a Get Document Info service configuration. See Creating a Service Configuration.

2. Configure the Get Document Info service. See Configuring the Get Document Info Service.

3. Use the Get Document Info service in a business process.

Configuring the Get Document Info Service


To configure the Get Document Info service, you must specify settings for the following fields

Rate this content


in the GPM:

Field Description

Config Name of the service configuration. Required.

BodyName Body Name of the document. Optional.

CORRELATION Whether to pass correlations associated with


the document. Optional. Valid values:
• true - Pass document correlation
parameters

• false - Do not pass document correlation


parameters

Default is false.

DOCUMENT_ID Document ID to look up from the workflow


context. If there is no document ID, it will

look up the primary document instead.
Optional. Valid value:
https://www.ibm.com/support/knowledgecenter/SS3JSW_6.0.3/integrating/integrating/integrator/Get_Doc_Info_svc.html 4/12
2/17/2021 Get Document Info Service

hostname:e52fd2:fd70c53c8c:-7648.

Note

When you specify DOCUMENT_ID, the


document specified is loaded into the
Primary Document. If a Primary
Document already exists, it will be
overwritten.

DocumentCharEncoding Type of character encoding used in the


document. Optional. Example: iso-8859-1.

DocumentContentSubType Content subtype of the document. Optional.


Example: plain.

DocumentContentType Content type of the document. Optional.


Example: text.

Rate this content


Encrypted Indicates if the document is encrypted.
Optional.

RETRIEVE_INITIAL_DOC_ID Gets the initial document ID. This parameter


should be set to false unless you want the
initial document ID for the primary
document.
• true - process data after the service will
have an entry called DocumentInitialId
that is the initial document id for primary
document.

• false - no entry for DocumentInitialId.

Default is true.

Once configured, these parameters are passed from the business process to the Get Document
Info service. 

Parameters Passed from Business Process to Service


https://www.ibm.com/support/knowledgecenter/SS3JSW_6.0.3/integrating/integrating/integrator/Get_Doc_Info_svc.html 5/12
Parameters Passed from Business Process to Service
2/17/2021 Get Document Info Service

The following parameters are passed from the Business Process to the Get Document Info
service:

Field Description

DocumentId Document ID to look up from the workflow context. If


there is no document ID, it will look up the primary
document instead. Optional. Example:
hostname:e52fd2:fd70c53c8c:-7648.

DocumentContentType The current document content type. Optional.

DocumentContentSubType The current document content sub-type. Optional.

DocumentCharEncoding The current document character encoding. Optional

Correlation The current document correlation. Optional.

BodyName The current document body name. Optional

doClone Set to true to modify the document metadata in the


clone or copy of the existing document. The modified

Rate this content


data is in the cloned document. Valid values are true
and false. Optional. For example, when you alter the
value in DocumentContentType, setting doClone to
true creates a clone of the existing document but with
the modified value. If you do not set the doClone
parameter or set it to false, the existing document will
have the new metadata value and the modified value is
available in the process data.

updateMetaDataOnly A flag that indicates if the document data is for a


metadata update only. Optional. Valid values are: True
or False. If set to true, you can update BodyName,
Document Content Type, DocumentCharEncoding,
DocumentContentSub Type, Document Subject, and
DocumentName without creating a new document. The
service can set the following metadata without
creating a new document that is stored in the 
database:
• doc name
https://www.ibm.com/support/knowledgecenter/SS3JSW_6.0.3/integrating/integrating/integrator/Get_Doc_Info_svc.html 6/12
2/17/2021 Get Document Info Service

• bodyName

• char_encoding

• subject

• content_type

• content_subtype

Default is false. Example of a document with


updateMetaDataOnly set to true:
<operation name="SetContentType">
<participant name="GetDocumentInfoServic
<output message="xout">
<assign to="." from="*"/>
<assign to="DocumentContentType">
text
</assign>
<assign to="DocumentContentSubType">
plain
</assign>
<assign to="DocumentCharEncoding">
iso-8859-1
</assign>

Rate this content


<assign to="updateMetaDataOnly">
true
</assign>
</output>
<input message="xin">
<assign to="." from="*"/>
</input>
</operation>

Example of a document that is not using


updateMetaDataOnly and is set to false, or not set at
all. A new document will be saved in the database:
<operation name="SetContentType">
<participant name="GetDocumentInfoServic
<output message="xout">
<assign to="." from="*"/>
<assign to="DocumentContentType">
text
</assign> 
<assign to="DocumentContentSubType">
plain
</assign>
i t "D tCh E di "
https://www.ibm.com/support/knowledgecenter/SS3JSW_6.0.3/integrating/integrating/integrator/Get_Doc_Info_svc.html 7/12
2/17/2021 Get Document Info Service
<assign to="DocumentCharEncoding">
iso-8859-1
</assign>
<assign to="updateMetaDataOnly">
false
</assign>
</output>
<input message="xin">
<assign to="." from="*"/>
</input>
</operation>

Parameters Passed from Service to Business Process


The following parameters are passed from the Get Document Info service to the business
process:

Field Description

PrimaryDocument The link of the primary document. Optional.

Rate this content


Example:
hostname:73ce5c:ff993119fc:-733f

BodyName The current body name. Required.

BodyLength The current body length. Required. Default is


0.

DocumentBodyLength The current document body length. Required.


Default is 0.

DocumentName The current document name. Optional.

DocumentId The current document ID. Required.


Example:
hostname:331059:ff998a9313:-7f71

DocumentSubject The current document subject. Required.

DocumentCreateTime The current document creation time. 


Required.

DocumentContentType The current document content type. Optional.


https://www.ibm.com/support/knowledgecenter/SS3JSW_6.0.3/integrating/integrating/integrator/Get_Doc_Info_svc.html 8/12
2/17/2021 Get Document Info Service

DocumentCharEncoding The current document character encoding.


Optional.

DocumentContentSubType The current document content sub-type.


Optional.

DocumentPreviousDocId The previous document ID. Optional.

DocumentLength The current document length. Optional.

DocumentLifeSpan The current document life span. Optional.

DocumentInitialId The current document initial ID. Optional.

DocumentMaxInlineBodySize The current document maximum inline body


size. Optional.

DocumentPurgeAfter The current document purge after. Optional.


Valid values: any timestamp value.

DocumentStorageType The current document storage type. Optional.

DocumentTrackingId The current document tracking ID. Optional.

Rate this content


DocumentWorkflowId The current document workflow ID. Optional.

DocumentFileName The current document file name. Optional.

DocumentNodeName The current document node name. Optional.

DocumentType The current document type. Optional.

Encrypted Indicates if the document is encrypted.


Optional.

UpdateMetaDataOnly Indicates if the document data is for a


metadata update only. Optional.

Business Process Examples

Example 1

Example of the getdocinfo service that shows processing of the primary document created by
the xmlencoder.
https://www.ibm.com/support/knowledgecenter/SS3JSW_6.0.3/integrating/integrating/integrator/Get_Doc_Info_svc.html 9/12
2/17/2021 Get Document Info Service

<process name="GetDocumentInfoService_01">
<sequence name="simple">
<operation name="Set Document">
<participant name="XMLEncoder"/>
<output message="XMLEncoderTypeInputMessage">
<assign to="mode">process_data_to_document</assign>
<assign to="root_element">Document1</assign>
<assign to="xPath">/ProcessData</assign>
<assign to="." from="*"/>
</output>
<input message="inmsg">
<assign to="." from="*"/>
</input>
</operation>
<operation name="SetContentType">
<participant name="GetDocumentInfoService"/>
<output message="xout">
<assign to="." from="*"/>
<assign to="DocumentContentType">text</assign>
<assign to="DocumentContentSubType">plain</assign>
FTP Client to="DocumentCharEncoding">iso-8859-1</assign>
<assign PWD Service
</output>
FTP Client RMD Service
<input message="xin">
FTP Client QUOTE Service
<assign to="." from="*"/>

Rate this content


FTP Client SITE Service
</input>
</operation>
FTP Reverse Proxy Adapter
</sequence>
FTP Server Adapter
</process>
Get Document Info Service
Sterling Gentran:Server for UNIX Purge Process Service
Example 2
Sterling Gentran:Server for Windows Adapter
ExampleGlobal
of a process
Mailboxdocument that is collected by the filesystemadapter. The second
Client Adapter
getinfoservice
Global is processing
Mailbox Event aRule
document
adapterby a document ID.
Global Mailbox REST Services adapter
<process name="GetDocumentInfoService_02">
GXS ICSname="simple">
<sequence FTP Adapter
<!-- HTTP
Create File
Client System adapter instances for input and output -->
Adapter
<!-- Place the document you want processed in the input instance -->
HTTP Client Begin Session Service
<operation name="FileSystemAdapter">
HTTP Client DELETE
<participant Service
name="FileSystemAdapter"/>
<output message="outputMessage">
HTTP Client End Session Service
<assign to="Action">FS_COLLECT</assign>
HTTP Client
toGET Service
<assign
<assign
="filter">My.log</assign>
toMethod
HTTP Client ="useSubFolders">false</assign>
Service

<assign to ="docStorageType">fs</assign>
HTTP Client POST Service
<assign to ="bootstrap">false</assign>
HTTP Client
<assign toPUT Service
="deleteAfterCollect">false</assign>
https://www.ibm.com/support/knowledgecenter/SS3JSW_6.0.3/integrating/integrating/integrator/Get_Doc_Info_svc.html 10/12
2/17/2021 Get Document Info Service
assign
HTTP toPUT Service
Client deleteAfterCollect false /assign
<assign to="." from="*"></assign>
HTTP Respond Service
</output>
<input message="inputMessage">
<assign to="." from="*"></assign>
</input>
</operation>
<operation name="FileSystemAdapter">
<participant name="FileSystemAdapter"/>
<output message="outputMessage">
<assign to="Action">FS_EXTRACT</assign>
<assign to ="useSubFolders">false</assign>
<assign to="." from="*"></assign>
</output>
<input message="inputMessage">
<assign to="." from="*"></assign>
</input>
</operation>
<operation name="GetDocumentInfoService">
<participant name="GetDocumentInfoService"/>
<output message="xout">
<assign to="." from="*"/>
<assign to="DocumentContentType">text</assign>
<assign to="DocumentContentSubType">plain</assign>
<assign to="DocumentCharEncoding">iso-8859-1</assign>
</output>

Rate this content


<input message="xin">
<assign to="." from="*"/>
</input>
</operation>
<operation name="GetDocumentInfoService">
<participant name="GetDocumentInfoService"/>
<output message="xout">
<assign to="." from="*"/><
<!-- The DOCUMENT_ID parameter must contain a correct value from -->
<!-- the Document table in the business process database.-->
<assign to="DOCUMENT_ID">somehost:e61fd1:fd70c58c8c:-7478</assign
<assign to="DocumentContentType">text</assign>
<assign to="DocumentContentSubType">plain</assign>
<assign to="DocumentCharEncoding">iso-8859-1</assign>
</output>
<input message="xin">
<assign to="." from="*"/>
</input>
</operation>
</sequence>
</process>

https://www.ibm.com/support/knowledgecenter/SS3JSW_6.0.3/integrating/integrating/integrator/Get_Doc_Info_svc.html 11/12
2/17/2021 Get Document Info Service

Example 3
Example of the correlation for the primary document that is created by the translator.

<process name = "GetDocumentInfoService_04">


<!-- GetDocumentInfoService_04 map must be checked in -->
<!-- This business process uses GetDocumentInfoService_04_input_data.xml
<rule name="New">
<condition>WF_CORRELATIONS/correlation/value/text() = 'N'</condition
</rule>
<rule name="Not New">

Do you want to...


Open a ticket and download fixes at the IBM Explore, learn and succeed with training on
Support Portal the IBM Skills Gateway

Find a technical tutorial in IBM Developer Network with users and IBM experts in our

Find a best practice for integrating user community

technologies in IBM Redbooks

Rate this content


Contact Privacy Terms of use Accessibility Feedback Cookie preferences

English 

https://www.ibm.com/support/knowledgecenter/SS3JSW_6.0.3/integrating/integrating/integrator/Get_Doc_Info_svc.html 12/12

You might also like