FTP Client PUT Service
The FTP Client PUT service places a document or documents in a specified directory on the trading partner's FTP server.
The following table provides an overview of the FTP Client PUT service:
System name | FTP Client PUT Service |
Graphical Process Modeler (GPM) categories | All Services, B2B Protocols > FTP Client |
Description | Used to place a document or documents in a specified directory on the trading partner's FTP server. |
Business usage | Use this service to transfer a document or documents from Sterling B2B Integrator to a trading partner when the FTP protocol is required as the transport. |
Usage example | You run a business process that translates a document that must be sent to a trading partner. After the translation, Sterling B2B Integrator uses the FTP Client PUT service, working through the FTP Client adapter, to place the document in a specified directory on the trading partner system. |
Preconfigured? | Yes |
Requires third-party files? | No |
Platform availability | All supported Sterling B2B Integrator platforms |
Related services | Related services:
|
Application requirements | An FTP server at the external trading partner location. |
Initiates business processes? | No |
Invocation | This service is invoked from a business process. |
Business process context considerations | Business processes that use the FTP client services should not be marked as Auto Resume. These protocol services require an established session, which will no longer exist in a re-start situation. Business processes that use the FTP Client PUT service cannot be run in sync mode. |
Returned status values | Returned status values:
|
Restrictions | None |
Persistence level | Default |
Testing considerations | Debug information for this service can be found in the FTP Client adapter and services log files. |
Notes | Every FTP Client service returns a response code
from the server. If this error code is defined by the FTP specification
(4xx or 5xx) then the business process produces a fault. If the error
code is expected, use a BPML activity to continue interacting with
the trading partner. There are two exceptions to this rule:
|
Implementing the FTP PUT Client Service
- Create an FTP Client PUT service configuration (or enable the configuration installed with Sterling B2B Integrator and edit parameters as needed). For information, see Managing Services and Adapters.
- Configure the FTP Client PUT service. For information, see Configuring the FTP Client PUT Service.
- Use the FTP Client PUT service in a business process.
Configuring the FTP Client PUT Service
To configure the FTP Client PUT service, you must specify settings for the following fields in the UI or the GPM:
UI Field | GPM | Description |
---|---|---|
Name | Unique and meaningful name for the service configuration. Required. | |
Description | Meaningful description for the service configuration, for reference purposes. Required. |
|
Select a Group | Select one of the options:
|
|
Config | Name of the service configuration. | |
ConnectionType | Value that describes which way the data connection
will be made when the data is transferred. Optional. Valid values
are:
|
|
DelayWaitingOnIO | Specifies the number of seconds to wait for the data transfer to complete before going into WAITING_ON_IO state. If -1 is specified, the service operates in blocking mode. It will wait until the data transfer has completed. Valid value is any numerical value. Optional. |
|
DocumentId | Document ID to PUT to the remote server. A single DocumentId can appear directly
in the message to the service or any number of DocumentIds can appear under the DocumentList
element. Optional. Note: The FTP Client PUT service will use DocumentList if a list is provided. If no list is
specified in DocumentList, the service will use DocumentId. The service will not use both
DocumentList and DocumentId. If no values are specified for either DocumentList or DocumentId, the
service will PUT the primary document to the remote server.
If the DocumentId and DocumentList are not specified, and if the DocumentId appears anywhere in the ProcessData prior to the FTP Client Put service, that DocumentId value will be used in the FTP Client Put service. Example: The GetDocumentInfoService populates the DocumentId in the ProcessData. If this service is used before the use of the FTP Client Put service in the BP, the DocumentId that is populated by the GetDocumentInfoService is used by the FTP Client Put service. |
|
DocumentList | List of documents to PUT to the remote server.
Each item must be a DocumentId. A list could look like the following
example:
|
|
RemoteFileName | Filename that Sterling B2B Integrator uses to place the document on the remote system. If not specified, the name of the document will be used. Do not use this parameter if putting multiple documents on a server. Optional. | |
RepresentationType | Representation used for transferring the file.
Optional. Valid values:
|
|
ResponseTimeout | Maximum number of seconds of inactivity during data transfer between the FTP Client and the FTP Server. The FTP Client waits during the data transfer, before the session times out and terminates. Optional. Minimum value is 1 second. Valid value is any numeric value of 1 or higher. The default is the value from the FTP Client Begin Session service ResponseTimeout parameter. If the value is less than 1 second, the FTP Client PUT service resets the value to 1 second. |
|
SaveTranscript | Indicates how to handle the transcript. Optional.
Valid values are:
|
|
SessionToken | Specifies the identifier for the session established
between the FTP Client adapter and an FTP server. Required. Note: The
session token is returned from the FTP Client Begin Session service.
|
|
StoreAction | Specifies the type of store that must be done.
Optional. Valid values are:
|
|
UseDocBodyName | Specifies whether to use document body name as
the remote file name. This parameter is only use in MPUT operation.
Valid values are:
|
Parameters Passed from Business Process to Service
The following table contains the parameters passed from the business process to the FTP Client PUT service:
Parameter | Description |
---|---|
ConnectionType | Value that describes which way the data connection
will be made when the data is transferred. Optional. Valid values
are:
|
DocumentId | Document ID to PUT to the remote server. A single DocumentId can appear directly
in the message to the service or any number of DocumentIds can appear under the DocumentList
element. Optional. Note: The FTP Client PUT service will use DocumentList if a list is provided. If no list is
specified in DocumentList, the service will use DocumentId. The service will not use both
DocumentList and DocumentId. If no values are specified for either DocumentList or DocumentId, the
service will PUT the primary document to the remote server.
If the DocumentId and DocumentList are not specified, and if the DocumentId appears anywhere in the ProcessData prior to the FTP Client Put service, that DocumentId value will be used in the FTP Client Put service. Example: The GetDocumentInfoService populates the DocumentId in the ProcessData. If this service is used before the use of the FTP Client Put service in the BP, the DocumentId that is populated by the GetDocumentInfoService is used by the FTP Client Put service. |
DocumentList | List of documents to PUT to the remote server.
Each item must be a DocumentId. A list could look like the following
example:
|
RemoteFileName | Filename that Sterling B2B Integrator uses to place the document on the remote system. If not specified, the name of the document will be used. Do not use this parameter if putting multiple documents on a server. Optional. |
RepresentationType | Representation used for transferring the file.
Optional. Valid values:
|
ResponseTimeout | Maximum number of seconds of inactivity during data transfer between the FTP Client and the FTP Server. The FTP Client waits during the data transfer, before the session times out and terminates. Optional. Minimum value is 1 second. Valid value is any numeric value of 1 or higher. The default is the value from the FTP Client Begin Session service ResponseTimeout parameter. If the value is less than 1 second, the FTP Client PUT service resets the value to 1 second. |
SessionToken | Specifies the identifier for the session established
between the FTP Client adapter and an FTP server. Required. Note: The
session token is returned from the FTP Client Begin Session service.
|
StoreAction | Specifies the type of store that must be done.
Optional. Valid values are:
|
UseDocBodyName | Specifies whether to use document body name as
the remote file name. This parameter is only use in MPUT operation.
Optional. Valid values are:
|
DelayWaitingOnIO | Specifies the number of seconds to wait for the data transfer to complete before going into WAITING_ON_IO state. If -1 is specified, the service operates in blocking mode. It will wait until the data transfer has completed. Valid value is any numerical value. Optional. |
SaveTranscript | Indicates how to handle the transcript. Optional.
Valid values are:
|
Parameters Passed from Service to Business Process
The following table contains the parameters passed from the FTP Client PUT service to the business process:
Parameter | Description |
---|---|
ServerResponse | Indicates the FTP server response, which may include a reply code and any text associated with the reply code. |
TranscriptDocumentId | Identifies the document that contains a transcript of the exact exchange with the FTP server. |
Business Process Examples
Example 1
The following business process uses the FTP Client adapter to send the primary document from Sterling B2B Integrator to the remote FTP server:
<process name="FtpExample">
<sequence>
[[Insert Begin Session ]]
<operation name="FTP PUT SERVICE">
<participant name="FTPClientPut"/>
<output message="PutRequest">
<assign to="SessionToken"
from="/ProcessData/FtpBeginSessionServiceResults/SessionToken/text()"></assign>
<assign to="RemoteFileName">TestDoc</assign>
<assign to=”ConnectionType”>PASSIVE</assign>
<assign to=”RepresentationType”>BINARY</assign>
<assign to=”.” From=”PrimaryDocument”></assign>
</output>
<input message="inmsg">
<assign to="FtpPutServiceResults" from="*"></assign>
</input>
</operation>
</sequence>
[[Insert end session here]]
</process>
Example 2
The following business process uses the FTP Client PUT service to send all documents received from a GET from Application to the remote FTP server.
<process name="FTP_PUT">
<sequence name="optional">
[[Insert begin session here?]]
<operation name=”Get”>
<participant name=”FTPClientGet”/>
<output message=”GetRequest”>
<assign to="SessionToken"
from="/ProcessData/BeginSessionResults/SessionToken/text()"></assign>
<assign to=”RemoteFilePattern”>*.*</assign>
</output>
<input message=”GetResults”>
<assign to=”GetResults” from=”DocumentList”/>
</input>
</operation>
<operation name="Put">
<participant name="FTPClientPut"/>
<output message="PutRequest">
<assign to="SessionToken"
from="/ProcessData/BeginSessionResults/SessionToken/text()"></assign>
<assign to=”.” From=”/ProcessData/GetResults/DocumentList”/>
<assign to="RepresentationType">ASCII</assign> </output>
<input message="FtpPutResults">
<assign to="PutResults" from="*"></assign>
</input>
</operation>
[[Insert End Session]]
</sequence>
</process>
Example 3
The following business process uses the FTP Client PUT service to send all documents in a DocumentList from Application to the remote FTP server.
<process name="FTP_PUT">
<sequence name="optional">
[[Insert begin session here?]]
<operation name="Put">
<participant name="FTPClientPut"/>
<output message="PutRequest">
<assign to="SessionToken"
from="/ProcessData/BeginSessionResults/SessionToken/text()"></assign>
<assign to=”DocumentList/DocumentId” append=”true”>xxxxxxfffff</assign>
<assign to=”DocumentList/DocumentId” append=”true”>yyyyyyfffff</assign>
<assign to="RepresentationType">ASCII</assign>
</output>
<input message="FtpPutResults">
<assign to="PutResults" from="*"></assign>
</input>
</operation>
[[Insert End Session]]
</sequence>
</process>