IIB-Handout
IIB-Handout
Note: From v10 of IIB, MQ has been made op�onal for IIB Run�me on distributed pla�orms like
Windows, Linux, Unix, although its s�ll mandatory for IIB Run�me on Mainframe (zOS).
• Each Integra�on Node can be created without any Queue Manager associated
• Each Integra�on Node can be associated with one default Queue Manager.
• Integra�on Node can connect with 1 or more Queue Managers running locally or remotely.
• Queue Managers can be shared across mul�ple Integra�on Nodes.
IBM INTEGRATION BUS V9 & BEFORE – MQ TOPOLOGY
Note: Till v9 of IBM Integra�on Bus, MQ was a mandatory component for se�ng up IIB Run�me.
Every Integra�on Node must be associated with a dedicated Queue Manager.
• Each Integra�on Node connects only to the Queue Manager associated with it.
• No sharing of Queue Managers between Integra�on Nodes.
LOGICAL TREES
Internal representation of a message
Message Tree:
o Contains the Application related message, either received from Source
Application or to be sent to the Target Application
o Top-most element: Root
Properties: First child of Root element
Body: Last child of Root element and is typically named after the
Message Domain and contains the application payload
Environment Tree:
o For storing information as variables and passing between nodes for
internal processing
o Top-most element: Environment
o Only 1 instance for entire message processing
o Information stored in Environment tree are persisted even during
exception scenarios
o Similar to Class variable in Java
LocalEnvironment Tree:
o Purposes
Storing information and passing to downstream nodes of
message flow information [LocalEnvironment.Variables]
For storing information for routing purpose to be used by output
nodes [LocalEnvironment.Destination]
For storing information related to messages sent out by output
nodes and hence created by output nodes
[LocalEnvironment.WrittenDestination]
For storing information related to incoming message for certain
protocols [e.g. LocalEnvironment.File, LocalEnvironment.REST
etc.]
o Top-most element: LocalEnvironment
o Unlike Environment tree, each Node creates a new instance to modify
this tree and in case of any exception, changes to this tree are reverted
on rollback.
ExceptionList Tree:
o For storing error details and are generated only when message flow
fails. Like Exception object in Java
o Contains information about exceptions that occur when a message is
processed when an exception is caught on the local Failure path or
Catch path
o Can be accessed, modified, and traced
o Top-most element: ExceptionList
PARSERS
MRM Parser
o Message Repository Manager (MRM)
o Parser for parsing message definitions created as Message Sets.
o Handles all text, binary & XML data
CWF – Custom Wire Format for handling binary, fixed-width and
packed data formats
TDS – Tagged Delimited Separator format for handling delimited
and tagged data formats
XML – for handling XML message formats
Note: Message Model was introduced from WebSphere Message Broker v8 onwards. Prior to
that Message Sets was used to create definitions for messages. Message Models replaced
Message Sets from v8 onwards. While Message Set was proprietary to WMB / IIB for creating
message definitions, Message Models adopt open standards like DFDL, XSD for creating
message definitions.
ESQL Functions:
o THE – Returns the first element from the array object
o CARDINALITY – Returns the size (number of elements) of the array
object
o EXISTS – Checks if array has any elements or not. Returns TRUE if array
size > 0 otherwise FALSE
o LENGTH – Returns the length of string value
o CONTAINS – Checks if search string is present in the string value or not.
Returns TRUE is the search string is present in the string value
otherwise FALSE
o CAST – To convert from one datatype to another
o PROPAGATE – To send the output logical trees via a specified terminal
or by default out terminal of Compute Node.
o EXTRACT – To extract the date fields from the date variable like DAY or
MONTH or Year etc as INTEGER
Difference between PROPAGATE & RETURN in compute node:
o When RETURN TRUE, compute node sends the output logical tree
instances via the out terminal and once sent out control does not come
back to the compute node.
o Wheresas when PROPAGATE statement is used, the output logical tree
instances are sent out via the specified terminal or default out terminal.
And once the processing path, that was connected to the terminal via
which output logical tree instances was sent out, is completed the
control comes back the ESQL module of the compute node and starts
executing the statement after the PROPAGATE statement.
For nodes working with multiple instances of the logical tree instances that is
coming as input and that will be sent out as output, e.g. Compute Node, to
identify the logical tree instance referred in ESQL statements, we additionally
correlate as InputRoot or OutputRoot etc, where
o Root refers the top-most element of the message tree
o Input or Output are correlation used to identify the instance of the
message tree.
Note: Only Environment tree does not have correlation as only 1 instance of the
Environment tree is maintained for the entire message processing.
FEW MESSAGE FLOW NODES
FILTER Node:
o Primary Purpose: For routing based on simple if-else logic
o Interface used: ESQL
o Does not modify the logical trees and hence propagates the same
instance that is received as input. Hence no need for additional
correlation when accessing the logic trees. Simply access the logical
tress as Root, LocalEnvironment etc.
o Terminals
FAILURE: for exception handling of errors occurring in this node
TRUE: Message is sent out via this terminal, when ESQL module
returns TRUE based on condition check
FALSE: Message is sent out via this terminal, when ESQL module
returns FALSE based on condition check
UNKNOWN: Message is sent out via this terminal, when the
condition check expression evaluates to null or is empty or
cannot be determined as TRUE or FALSE.
ROUTE Node:
o Primary Purpose: For routing based on filtering conditions
o Interface used: XPATH
o One of the node in which custom output terminals can be added and
used for routing.
o Does not modify the logical trees and hence propagates the same
instance that is received as input. Hence no need for additional
correlation when accessing the logic trees. Simply access the logical
tress as $Root, $LocalEnvironment etc.
o Multiple Filter patterns can be specified and mapped to the terminal
that is to be used for routing of the pattern matches.
o Distribution Mode: Determines how the filter patterns specified must
be evaluated -
FIRST: The multiple filter patterns specified are evaluated as IF-
ELSEIF block. If any pattern evaluates to TRUE no further
patterns are checked.
ALL: The multiple filter patterns specified are evaluated as
separate IF blocks. Irrespective of any pattern evaluating to
TRUE, all patterns are checked and handled accordingly.
RouteToLabel & Label Node:
o Best suited for handling multiple conditional path
o Like GoTo <Label> and Label block in programming languages
o Always used together.
o Each Label identifies separate processing path to be execution for a
condition / scenario.
o RouteToLabel is like GoTo statement, when is used to route the
processing control to the appropriate label block identified by label
name specified.
Label Names to be routed to are specified in the
LocalEnvironment tree based on condition checks in a node
prior to RouteToLable node either in Compute / JavaCompute /
Mapping node etc.
o No physical connection exists between RouteToLabel & Label Node
Compute Node
o Primary Purpose: General purpose node primarily used for
transformation of logical trees. Hence works with 2 instances of the
logical trees – input and output instances. Additionally can also be used
for
Content-based Routing
Business process logics
Database operations
Creating & distributing the output logical trees for different target
applications
o Terminals: 5 out terminals are there in addition to Failure terminal. By
default output logical trees are sent out via out terminal.
o Refers to ESQL module specified in ESQL Module property
o Transaction Mode: Determines whether the compute node commits
the database transactions performed within the node immediately or
after the message flow processing end completely
AUTOMATIC: All database transactions performed in the node
are committed only at the end of message flow processing. Any
error occurs in the message flow processing, all transactions are
rolledback along with message flow.
COMMIT: All database transactions performed in the node are
committed immediately when node completes the processing
irrespective of the processing status of the message flow.
o DSN: specifies the default DSN (ODBC Data Source Name) used by the
ESQL statements working with the database in the node, if not DSN was
specified at the statement level.
o Compute Mode: Identifies the logical trees for which the Compute node
creates output logical tree instances or writable instances. Any changes
only to the specifies logical tree names are considered and sent out as
Output. For all the other logical trees, the same instances received as
input will be sent out as it is.
JavaCompute Node
o Primary Purpose: General purpose node primarily used for
transformation of logical trees. Hence works with 2 instances of the
logical trees – input and output instances. Additionally, can also be
used for
Content-based Routing
Business process logics
Database operations
Creating & distributing the output logical trees for different target
applications
o Uses Java Programming language and hence refers to a Java Class
o Entry point: evaluate method of the specified Java class
o Input to evaluate method: Message Assembly object which contains all
4 logical trees.
MbMessageAssembly refers to the Assembly object which is
bundle of all 4 logical trees
MbMessage refers to the individual Logical Trees like Message
Tree, Environment, LocalEnvironment or ExceptionList
MbElement refers to each field or element of a Logical Tree
o Terminals: 2 out terminals (Out & Alternate) are there in addition to
Failure terminal. By default, output logical trees are sent out via out
terminal.
Mapping Node:
o Primary Purpose: Graphically perform transformation of logical trees.
Additionally, can also be used for mapping.
LocalEnvironment & Environment trees
Database operations
Working with Global Cache
Creating & distributing the output logical trees for different target
applications
o Uses XPath functions to perform transformation and refers to a
Mapping routing stored in .map file
MQGet Node:
o To retrieve message from MQ queue in-between the message flow
processing logic
FileRead Node:
o To read the file in-between the message flow processing logic
MQInput Node:
o For starting the message flow by reading the messages from the input
queue
o Terminals:
out
failure
catch
MQOutput Node:
o For sending message to a MQ queue
o Options for specifying the queue name for writing messages by setting
the Destination Mode property
Queue Name: uses the name of the queue specified in the
MQOutput node property for delivering the message
DestinationList: uses the name of the queue from the
LocalEnvironment
ReplyToQueue: uses the name of the queue specified in the
ReplyToQ file of MQMD header
WORKING WITH DATABASES
Note: