Socket Connect Service (V5.2.3 or later)

The Socket Connect service starts a Transmission Control Protocol session with an external trading partner for exchanging business data.

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

System name Socket Connect Service
Graphical Process Modeler (GPM) categories All Services
Description This service starts a Transmission Control Protocol (TCP) session with an external trading partner for the purpose of exchanging business data.
Business usage A business user uses this service to establish a session with a trading partner's TCP and the socket server.
Usage example A Sterling B2B Integrator business process is executed that translates a document that must be sent to a trading partner. After the translation, Sterling B2B Integrator uses the Socket Connect service to establish a session with the trading partner's TCP server. The Socket Connect service is invoked through an instance of the Socket Client 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.
Initiates business processes? No
Invocation This service is invoked from a business process.
Business process context considerations A business process using the Socket Connect service should not be configured to automatically resume. The Socket Connect 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 The debug information for this service is located in the Socket Client adapter and Socket Connect service log files.

Implementing the Socket Connect Service

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

Configuring the Socket Connect Service

To edit the configuration of the predefined the Socket Connect 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) parameter passed from the Socket Connect service to the business process:

Parameter Description
SessionToken Identifier for the session established between the Socket Client adapter and the TCP server. 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 Connect service:

Parameter Description
CACertificateId List of trusted certificate authority public certificates. In process data, this parameter is displayed as an object identifier. Optional.
Encoding Format used to encode all outgoing and incoming data. Encoding will not be used if it is not specified. Optional.
CipherStrength Level of encryption to be applied to the data. Optional.
ConnectionRetries Number of times the service will try to connect to the trading partner system. Optional.
ResponseTimeout Maximum number of seconds it can take for the trading partner system to respond before it terminates. The number of seconds cannot be less than 30. Optional.
SocketClientAdapter Name of the Socket Client adapter that the service will use to connect to the TCP server. Required.
RemoteHost IP address or DNS name for the external trading partner host system. Required.
RemotePort Port number for the external trading partner. Required.
RetryDelay Delay in seconds for the Socket Client adapter to wait before retrying a connection. Optional.
Secure Sockets Layer (SSL) Flag that determines SSL socket negotiations. Valid values are:
  • true - Indicates that the TCP server expects and requires SSL to happen automatically at the time of connection.
  • false - Indicates that the connection will not use SSL.
Optional.
SystemCertificateId List of PrivateKeys and PublicCertificates that are signed by the trading partner trusted certificate authority. In process data, this parameter is displayed as an object identifier. Optional.

Business Process Example

The following example business process illustrates using the Socket Connect service:

<process name = "DemoSocketClient"> 
  <sequence>
    <operation name="SocketConnectServiceType">
      <participant name="SocketConnectService"/>
      <output message="SocketConnectServiceTypeInputMessage">
        <assign to="." from="*"></assign>
        <assign to="ConnectionRetries">3</assign>
        <assign to="RemoteHost">localhost</assign>
        <assign to="RemotePort">18330</assign>
        <assign to="SocketClientAdapter">SocketClientAdapter</assign>
        <assign to="SSL">false</assign>
      </output>
      <input message="inmsg">
        <assign to="." from="*"></assign>
      </input>
 </operation>

  //Close the session  here