BW:SocketConnector

From ISM
Jump to: navigation, search

ISM Socket connector

Overview

BusinessWare provides basic socket connector to communicate with external systems via socket. This connector can process only one request at one time. It is not useful to process many concurrent requests. It cannot configure message length for each request. ISM Socket connector is designed to address concurrent requests in a configurable way. There are two types of ISM Socket Connector. One is source and the other is target. ISM Socket connector assumes incoming request/response contains length information somewhere in the message. As a source connector,

  • the first thing socket connector does is check the message length.
  • After message length is determined, socket connector tries to read message until the message length.
  • Message length can be a part of whole message or not.
  • In either case, socket connector reads message from connected socket and forwards to BusinessWare framework.
  • BusinessWare framework dispatches that message, more precisely that is called as a event, to process model.

As a target connector

  • ISM Socket Connector connects to target system and sends message.
  • If the message is synchronous type, ISM Socket Connector waits response from target system until timeout seconds, otherwise just return.

Installation

Deploy ISM Socket connector to LDAP
$>vtadmin deploy project ISMSocketConnector.jar
Copy ISM Socket connector jar file to your BME environment. $>copy ISMSocketConnector.jar %VITRIA%/bme/modules

Source connector

When you open your BME after installation, you can see ISM Socket Connector(SrcConlarge.gif) in connector palette.

Usage

Drag and drop source connector to integration model.

socket-src-01

Wire the output port of source connector to input port of a process model.

socket-src-02

Click output port of source connector, then property window will be displayed.

socket-src-03

Click Port Types and open Edit Types dialog.

socket-src-04

Click Browse button

socket-src-05

In Choose Interface dialog, choose operations of ISMSocketConnector
Click OK button to close Choose Interface dialog.
Click OK Button to close Edit Types dialog.
Now output port type of source connector is set.

socket-src-06

Input port type of process model is automatically set according to the output port type of wired source connector.

Open process model and click the transition from start to Action.

socket-src-07

Click Trigger Type button and choose binaryMessage.

socket-src-08

Click transition from Action to end and choose defaultEvent.

socket-src-09

Right click the process model and choose Tools->Entry Action Code. data parameter is the message received via socket.

socket-src-10

Do your work with data parameter.

Properties

Property Description Remarks
Name Connector name in integration model
Batch Commit Number Transaction count to be commit in one transaction It is not used in socket communication.
Transactionality Transaction attribute of this connector Non-transactional
Exception Handler Exception handler class used to handle exception If not defined, default exception handler is used.
Listening port Socket listening port Default port is 33000.
Additional ports for multipart listening Additional listening port list Separated by comma(,)
Host Socket listening ip or hostname If localhost is set, listening ip is same with integration server listening ip. If integration server is listening on a virtual ip address, socket connector also uses virtual ip address.
ReadTimeout Socket read timeout Seconds.
Last Bytes indicator for the end of a message It is used only when last byte indicator exists. Otherwise leave it blank.
Last Bytes Length Length of Last byte indicator It is used only when last byte indicator exists. Otherwise set 0.
Length Field Length The length of message length field Field length of message length field.
Length Field Offset The offset of message length field
Is total length Whether message length field is included in whole length True : message length field is included in whole length.
False : message length field is not included in whole length.
Message Handler Class Handler class to be used to extract whole length and request type - synchronous/asynchronous If not defined, default handler class is used.
Max length Max length of a message Bytes. Default is almost 1MB.
Sync Pattern Offset The offset of request type indicator
Sync Pattern Length The length of request type indicator
Sync Pattern Regular expression for synchronous request
Async Pattern Regular expression for asynchronous request
Max Thread Count Max concurrent session
Allowed List for allowed ip address

Target connector

Usage

Properties

Property Description Remarks
Name Connector name in integration model
Transactionality Transaction attribute of this connector Non-transactional
Exception Handler Exception handler class used to handle exception If not defined, default exception handler is used.
Socket Connection Reuse The flag for connection reuse Y : socket connections are maintained in a pool and reused in later transactions.
ReadTimeout Socket read timeout Seconds.
Last Bytes indicator for the end of a message It is used only when last byte indicator exists. Otherwise leave it blank.
Last Bytes Length Length of Last byte indicator It is used only when last byte indicator exists. Otherwise set 0.
Length Field Length The length of message length field Field length of message length field.
Length Field Offset The offset of message length field
Is total length Whether message length field is included in whole length True : message length field is included in whole length.
False : message length field is not included in whole length.
Message Handler Class Handler class to be used to extract whole length and request type - synchronous/asynchronous If not defined, default handler class is used.
Max length Max length of a message Bytes. Default is almost 1MB.
Sync Pattern Offset The offset of request type indicator
Sync Pattern Length The length of request type indicator
Sync Pattern Regular expression for synchronous request
Async Pattern Regular expression for asynchronous request
Last Pattern Offset The offset of last message indicator
Last Pattern Length The length of last message indicator
Last Message Pattern Regular expression for last message
More Message Pattern Regular expression for additional message
  • Last and more message

Some software platforms limit parameter size to be processed at one time. TP Monitor like Tuxedo usually do this and default limit is 32kbytes. While interfacing external systems, there are some cases a message generated by an application or service is bigger than the limitation and this message should be sent to another system. To send message to another system, the messages are split to less than allowed maximum size and sent multiple times.