SFTP Client RMDIR Service

The SFTP Client RMDIR service removes directories on the trading partner's SFTP server.

The following table provides an overview of the SFTP Client RMDIR service:

Category Description
System name SFTP Client RMDIR Service
Graphical Process Modeler (GPM) category All Services, B2B Protocols > SFTP Client
Description Removes directories on the trading partner's SFTP server.
Business usage Use this service to remove directories on the trading partner SFTP server system.
Usage example A Sterling B2B Integrator business process is executed that translates documents that must be sent to a trading partner on a daily basis and places them in the directory named on current date. Once the documents are processed, a Sterling B2B Integrator business process is executed that removes the directory.
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:
  • SFTP Client Begin Session service
  • SFTP Client CD service
  • SFTP Client DELETE service
  • SFTP Client End Session service
  • SFTP Client GET service
  • SFTP Client LIST service
  • SFTP Client MOVE service
  • SFTP Client MKDIR service
  • SFTP Client PUT service
  • SFTP Client PWD service

The SFTP Client RMDIR service must be placed in between an SFTP Begin Session Service and an SFTP End Session Service. It may be used to remove directories on the server side.

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:
  • 0 –Success
  • 1 – Error
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 SFTP Client adapter. Debug information for this service is located at: Operations > System > Logs > SFTP Client Adapter and Services.

Configuration Parameters

The following fields are the configurable options in either the UI service configuration page or the GPM or both:

Parameter Configure in GPM or UI Description
Name UI Name that the service will have in the system. Required.
Description UI Description of service. Optional.
Select a Group UI
Group of services or adapters of the same type that can act as peers. A Service Group name is used in BPML in place of the Service Configuration name. Service Groups show up in the GPM as if they were Service Configurations. Select a Service Group to associate with this adapter. Valid values are:
  • None - You do not want to include this configuration in a group at this time (default)
  • Create New Group - You can enter a name for a new group in this field, which is then created along with this configuration.
  • Select Group - If you have already created one or more groups for this service type, they are displayed in the list. Select a group from the list.

For more information about service groups see Managing Services and Adapters.

Parameters Passed from the Business Process to the Service

The following table contains the parameters passed from the business process to the service:

Parameter Description
RemoteDirName Specifies the directory name that the system uses to create a directory on the remote system. Required.
SessionToken Specifies the identifier for the session established between the SFTP Client adapter and an SFTP server. Required.

Parameters Passed from the Service to the Business Process

The following table contains the parameters passed from the 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. Required.
Valid values are:
  • OK - 0
  • No Such File - 2
  • Permission Denied -3
  • General Failure - 4
  • Bad Message - 5
  • No Connection - 6
  • Connection Lost - 7
  • Operation Unsupported - 8

Business Process Example

The following is an example of a business process using the SFTP Client RMDIR service:

<process name="SftpExample">
[[Insert Begin Session ]]
  <operation name="SFTP Client RMDIR Service">
     <participant name="SFTPClientRmdir"/>      
   <output message="SFTPClientRmdirServiceTypeInputMessage">
     <assign to="." from="*">
     <assign to="RemoteDirName">SFTPTEST</assign>
  <input message="inmsg">
    <assign to="." from="*">
[[Insert end session here]]