FTP Client MODE Service
The FTP Client MODE service specifies the transmission mode that is used to send or receive data from the trading partner's FTP server.
The following table provides an overview of the FTP Client MODE service:
System name | FTP Client MODE Service |
---|---|
Graphical Process Modeler (GPM) categories | All Services, B2B Protocols > FTP Client |
Description | Used to specify the transmission mode used to send or receive data from the trading partner's FTP server. |
Business usage | Enables you to send data in normal streamed mode or in deflated mode. Sending data in deflated mode minimizes the number of bytes transferred, compared to normal mode. |
Usage example | Your company uses a business process that sends large documents to a trading partner. You use deflated mode to send the data. The data is compressed during the sending, which can increase the speed of the data transfer. The data is decompressed after it is received by the FTP server. |
Preconfigured? | No |
Requires third-party files? | No |
Platform availability | All supported Sterling B2B Integrator platforms |
Related services | The FTP Client MODE service must be placed in between
an FTP Begin Session service and an FTP End Session service in a business
process. Related services are:
|
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 by using 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 restart situation. |
Returned status values | Status values are:
|
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 in your business process to
continue interacting with the trading partner. There are two exceptions
to this rule:
|
Configuring the FTP Client MODE Service
To configure the FTP Client MODE service, you must specify settings for the following fields in the Admin Console and in the GPM:
UI Field | GPM Field | 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. | |
ResponseTimeout | The maximum number of seconds where no data transfer over the data channel is allowed before the service times out and raises a timeout exception. Optional. Valid value is any numeric value. If no value specified or a timeout value of less than 30 is specified, ResponseTime defaults to 30 seconds. | |
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.
|
|
TransmissionMode | How the data is sent. Required. Valid values are:
|
The FTP session remains in the selected TranmissionMode until the mode service is used to change it to another mode.
Parameters Passed from Business Process to Service
The following table contains the parameters passed from the business process to the FTP Client MODE service:
Parameter | Description |
---|---|
TransmissionMode | How the data is sent. Required. Valid values are:
|
ResponseTimeout | The maximum number of seconds where no data transfer over the data channel is allowed before the service times out and raises a timeout exception. Optional. Valid value is any numeric value. If no value specified or a timeout value of less than 30 is specified, it defaults to 30 seconds. |
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.
|
Parameters Passed from Service to Business Process
The following table contains the parameters passed from the FTP Client MODE service to the business process:
Parameter | Description |
---|---|
ServerResponse | Indicates the FTP server response, which might 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 MODE service to transfer the data in deflated mode:
<process name="FtpExample">
<sequence>
[[Insert Begin Session ]]
<operation name="FTP Client MODE Service">
<participant name=" FTPClientMode"/>
<output message=" ModeRequest ">
<assign to="TransmissionMode">Z</assign>
</output>
<input message="inmsg">
<assign to="." from="*"></assign>
</input>
</operation>
[[Insert end session here]]
</sequence>
</process>
Example 2
The following business process uses the FTP Client MODE service to put a document on the remote FTP server in the deflated mode.
<process name="FtpExample">
<sequence>
[[Insert Begin Session ]]
<operation name="FTP Client MODE Service">
<participant name="FTPClientMode"/>
<output message=" ModeRequest ">
<assign to="SessionToken" from="/ProcessData/BeginSessionResults/
SessionToken/text()"></assign>
<assign to="TransmissionMode">Z</assign>
</output>
<input message="FtpModeResults ">
<assign to=”ModeResults” from=”*”/>
</input>
</operation>
<operation name="FTP Client PUT Service">
<participant name="FTPClientPut"/>
<output message=" PutRequest">
<assign to="SessionToken" from="/ProcessData/BeginSessionResults/
SessionToken/text()"></assign>
<assign to="RemoteFileName">TestDoc</assign>
<assign to=”ConnectionType”>PASSIVE</assign>
<assign to="RepresentationType">ASCII</assign></output>
</output>
<input message="FtpPutResults">
<assign to="PutResults" from="*"></assign>
</input>
<assign to="." from="*"></assign>
</input>
</operation>
[[Insert End Session]]
</sequence>
</process>
Example 3
The following business process uses the FTP Client MODE service to retrieve a document from the remote FTP server to Sterling B2B Integrator in the deflated mode.
<process name="FtpExample">
<sequence>
[[Insert Begin Session ]]
<operation name="FTP Client MODE Service">
<participant name="FTPClientMode"/>
<output message=" ModeRequest ">
<assign to="SessionToken" from="/ProcessData/BeginSessionResults/
SessionToken/text()"></assign>
<assign to="TransmissionMode">Z</assign>
</output>
<input message="FtpModeResults ">
<assign to=”ModeResults” from=”*”/>
</input>
</operation>
<operation name="FTP Client GET Service">
<participant name="FTPClientGet"/>
<output message=" GetRequest">
<assign to="SessionToken" from="/ProcessData/BeginSessionResults/
SessionToken/text()"></assign>
<assign to="RemoteFileName">TestDoc</assign>
<assign to=”ConnectionType”>PASSIVE</assign>
<assign to="RepresentationType">ASCII</assign></output>
</output>
<input message="FtpPutResults">
<assign to="PutResults" from="*"></assign>
</input>
<assign to="." from="*"></assign>
</input>
</operation>
[[Insert End Session]]
</sequence>
</process>