Socket Close Service

The Socket Close service ends a Transmission Control Protocol session with a TCP client or server.

The following table provides an overview of the Socket Close service:

System name Socket Close Service
Graphical Process Modeler (GPM) categories All Services
Description This service ends a Transmission Control Protocol (TCP) session with a TCP client or server.
Business usage A business user uses this service as the last functional activity in a business process to close a session with the trading partner's TCP and Socket Server.
Usage example A Sterling B2B Integrator business process is executed to translate a document that must be sent to a trading partner. After the translation, Sterling B2B Integrator establishes a session with the trading partner's TCP server by using the Socket Connect service, transfers the data, and closes the session using this service. This service is also used by the Socket Server adapter as the last service in a business process, when the server is configured to invoke a business process, and when the remote TCP client connects to the Socket Server adapter.
Preconfigured? No
Requires third-party files? No
Platform availability All supported Sterling B2B Integrator platforms.
Related services Related services:
  • Socket Read service
  • Socket Write service
  • Socket Close service
  • Socket Client adapter
  • Socket Server adapter
Application requirements A TCP server at the external trading partner location is required. Information about this TCP server must be configured in the Socket Connect service or in a TCP client that connects to the Sterling B2B Integrator Socket Server adapter running a business process which uses this service.
Initiates business processes? No
Invocation This service is invoked from a business process.
Business process context considerations A business process using the Socket Close service should not be configured to automatically resume. The Socket Close service requires an established session which will not exist if the business process is set to automatically resume.
Returned status values Returned status values:
  • 0 - Success
  • 1 - Error
Restrictions None
Persistence level System Default
Testing considerations None

Implementing the Socket Close Service

To implement the Socket Close service, complete the following tasks:
  1. Configure the Socket Close service. For information, see Configuring the Socket Close Service below.
  2. Use the Socket Close service in a business process.

Configuring the Socket Close Service

To edit the configuration of the predefined Socket Close service, you must specify field settings in the user interface service configuration:

Field Description
Name Name for the service in Sterling B2B Integrator. Required.
Description Description of the service. Required.
Select a Group Selection or creation of the group for this service. Optional.

Output from Service to Business Process

The following table contains the Graphical Process Modeler (GPM) parameters passed from the Socket Close service to the business process:

Parameter Description
SessionID Specifies the identifier of the session you are ending. Required.

Output from Business Process to Service

The following table contains the Graphical Process Modeler (GPM) parameters passed from the business process to the Socket Close service:

Parameter Description
ResponseTimeout Maximum number of seconds it can take for the trading partner system to respond before the service terminates. The number of seconds cannot be less than 30. Optional.
SessionToken Specifies the identifier of the session to be ended. Required.

Business Process Example

The following example business process illustrates by using the Socket Close service:

   <operation name="SocketCloseServiceType">
      <participant name="SocketCloseService"/>
      <output message="SocketCloseServiceTypeInputMessage">
        <assign to="SessionToken" from="/ProcessData/SocketConnectServiceResults/
                    SessionToken/text()"></assign>
        <assign to="." from="*"></assign>
      </output>
      <input message="inmsg">
        <assign to="." from="*"></assign>
      </input>
    </operation>