SFTP Client PUT Service (V5.2.0 - 5.2.1)
The SFTP Client PUT service places a document in a specified directory on the trading partner's SFTP server.
The following table provides an overview of the SFTP Client PUT service:
Category | Description |
---|---|
System name | SFTP Client PUT Service |
Graphical Process Modeler (GPM) category | All Services, B2B Protocols > SFTP Client |
Description | Places a document in a specified directory on the trading partner's SFTP server. |
Business usage | Use this service to transfer a document from Sterling B2B Integrator to a trading partner when the SFTP protocol is required as the transport mechanism. |
Usage example | A business process is executed that translates a document to send to a trading partner. After the translation, Sterling B2B Integrator uses the SFTP Client PUT service, working through the SFTP Client adapter, to place the document in a specified directory on the trading partner system. |
Preconfigured? | Yes. Uses the preconfigured service in a business process. |
Requires third-party files? | No |
Platform availability | All Sterling B2B Integrator supported platforms |
Related services | The following services are related. Configured
in a business process, they initiate the SFTP Client adapter to perform
their operations:
|
Application requirements | An SFTP Server at the external trading partner location. |
Initiates business processes? | No |
Invocation | This service is invoked from a business process. |
Business process context considerations | None |
Returned status values | Returned status values:
|
Restrictions | N/A |
Persistence level | System Default |
Testing considerations | To test this service, run the SFTPClientDemoAllServices business process and verify that it completes successfully. For more information about the SFTPClientDemoAllServices business process, see the SFTP Client adapter. Debug information for this service is located at: Operations > System > Logs > SFTP Client Adapter and Services. |
Input from Business Process to Service
The following table contains the parameters passed from the business process to the SFTP Client PUT service:
Field | Description |
---|---|
DocumentId | The identifier of a document to be copied to the remote server. If not specified, the primary document will be copied. If not specified and there is not a primary document, an error will be reported. Optional. |
RemoteFileName | The name of the file used to place the document on the remote trading partner server. If not specified, the name of the document will be used. Optional. |
ResponseTimeout | The maximum number of seconds it can take for the trading partner system to respond before the session times out and terminates. If a number less than 30 is specified, 30 seconds will be used. Optional. Default is the ResponseTimeout value specified in the SFTP Client Begin Session service. |
SessionToken | The returned SessionToken from the Begin Session service. Required. |
Primary Document | The file transferred as a result of the PUT service. |
Output from Service to Business Process
The following table contains the parameters passed from the SFTP Client PUT service to the business process:
Parameter | Description |
---|---|
ServerResponse | The SFTP server response, which may include a reply
code and any text associated with the reply code. Valid values are:
|
Business Process Example
The following business process excerpt uses the SFTP Client Adapter to send the primary document from Sterling B2B Integrator to the remote SFTP server using the SFTP Client PUT service:
[[Insert Begin Session]]
<operation name="SFTP PUT SERVICE">
<participant name="SFTPClientPut"/>
<output message="PutRequest">
<assign to="SessionToken"
from="/ProcessData/SftpBeginSessionServiceResults/SessionToken/text()">
</assign>
<assign to="RemoteFileName">FilenameToPut</assign>
<assign to="." From="PrimaryDocument"></assign>
</output>
<input message="inmsg">
<assign to="SftpPutServiceResults" from="*"></assign>
</input>
</operation>
[[Insert End Session]]
The following business process excerpt uses the SFTP Client Adapter to send a document received from a GET from Sterling B2B Integrator to the remote SFTP server:
[[Insert Begin Session]]
<operation name="Get">
<participant name="SFTPClientGet"/>
<output message="GetRequest">
<assign to="SessionToken"
from="/ProcessData/SftpBeginSessionResults/SessionToken/text()">
</assign>
<assign to="RemoteFileName">FilenameToGet</assign>
</output>
<input message="GetResults">
<assign to="GetResults" from="DocumentId"/>
</input>
</operation>
<operation name="Put">
<participant name="SFTPClientPut"/>
<output message="PutRequest">
<assign to="SessionToken"
from="/ProcessData/SftpBeginSessionResults/SessionToken/text()">
</assign>
<assign to="." From="/ProcessData/GetResults/DocumentId"/>
<input message="SFtpPutResults">
<assign to="PutResults" from="*"></assign>
</input>
</operation>
[[Insert End Session]]
Correlations and Document Tracking
The following table details the correlations available from the SFTP Client PUT service for document tracking:
Key | Values |
---|---|
ACTION | Get, Put |
Direction | Inbound, Outbound |
Protocol | SFTP |
RemoteHostAddress | remoteAddress |
RemoteHostName | remoteHost |
Username | username |
RemoteFile | filename |