Friday 22 August 2014

USER DEFINED PROPERTIES(VARIABLES)








          User Defined Property(UDP)  is a property that is defined when you construct a message flow by using the message flow editor.

          This property is used by the ESQL or JAVA program inside the message flow nodes, such as compute node.
 
          UDP is a configurable property defined on the message flow itself. UDP helps us to creating custom variables of which the values can be changed with out re-touching the code.

Note:- set at run time to dynamically change the behavior of the message flow.

         The advantage of UDP is that their values can be changed by operational staff(production) at deployment in run-time.  you do not need to change your application programs or with out having to change the code at the message flow node level.

UDP defined at 3 levels:-

1. In ESQL/JAVA code :-   Define User Defined Properties  in ESQL by using a DECLARE statement                                                   with the EXTERNAL keyword.
                   
syntax:-       DECLARE  broker  EXTERNAL  CHARACTER;

2.Message flow editor's TAB:- You also have the option of defining & giving initial values to same user defined properties. use the User Defined Properties tab at the bottom of the Edit window.


Thursday 21 August 2014

CONFIGURABLE SERVICES

   







       
 Configurable services or typically run-time properties. you can use them to define  properties that are related to external services on which the broker relies; for example an SMTP server or a JMS providers.

      Instead defining properties on the node or message flow, you can create configurable services so that Nodes and Message flows can refer to them to find properties at run time.

      If you use this method, you can change the values of attributes for a configurable service on the broker, which then effects the behavior of a NODE or Message Flow with out the need for re deployment.


Commands for creating CONFIGURABLE SERVICES  through command console:

1. mqsicreateconfigurableservice :- to create configurable service.

2.mqsideleteconfigurableservice :- to delete configurable service.

syntax:

mqsicreateconfigurableservice  brokername  -c (configurable service) -o (object name) -n (property name)                                                  -v(property value)

Wednesday 15 January 2014

NODES in WMB






             Message broker nodes are used in Message flows.  A message flow node is a processing step in a message flow.
            A message flow node receives a message, performs a set of actions against the message, and optionally passes the message on to the next node in the message flow. A message flow node can be a built-in node, a user-defined node, or a subflow node.
           A built-in node is a message flow node that is supplied by WebSphere Message Broker. The built-in nodes provide input and output, manipulation and transformation, decision making, collating requests, and error handling and reporting functions.
           A user-defined node is an extension to the broker that provides a new message flow node in addition to those supplied with the product. It must be written to the user-defined node API provided by WebSphere Message Broker for both C and Java languages.
           A subflow is a directed graph that is composed of message flow nodes and connectors and is designed to be embedded in a message flow or in another subflow. A subflow must include at least one Input node or one Output node. A subflow can be executed by a broker only as part of the message flow in which it is embedded, and therefore cannot be independently deployed.
           A message flow node has a fixed number of input and output points known as terminals. You can make connections between the terminals to define the routes that a message can take through a message flow.
           Input and output nodes define points in the message flow to which client applications send messages, and from which client applications receive messages.Client applications interact with these nodes by putting messages to, or getting messages from, the I/O resource that is specified by the node as the source or target of the messages. Although a message flow must include at least one input node, it does not need to include an output node.

Overview of all the nodes available in WMB v6.0, 6.1 and 7.0

Input Nodes:
MQInput
    Use an MQInput node if the messages arrive at the broker on a WebSphere MQ queue, and the node is to be at the start of a message flow. 

MQGet
    Use an MQGet node if the messages arrive at the broker on a WebSphere MQ queue and the node is not to be at the start of a message flow.
 
SCADAInput
    Use a SCADAInput node if the messages are sent by a telemetry device.
 
HTTPInput
    Use an HTTPInput node if the messages are sent by a Web services client.
 
Real-timeInput or Real-timeOptimizedFlow
    Use one of these nodes if the messages are sent by a JMS or multicast application.    The Real-timeInput node is an input node and the Real-timeOptimizedFlow node is a complete message flow that provides a high performance publish/subscribe message flow.
 
JMSInput
    Use a JMSInput node if the messages are sent by a JMS application.
 
User-defined input node
    Use a user-defined input node if the message source is a client or application that uses a different protocol or transport.
 
Input node
    If you are creating a message flow that you want to embed in another message flow (a subflow) that you will not deploy as a stand-alone message flow, you must include at least one Input node to receive messages into the subflow.

Output Nodes:
Publication
    Use a Publication node to distribute the messages using the publish/subscribe network for applications that subscribe to the broker across all supported protocols.
 
MQOutput
    Use an MQOutput node if the target application expects to receive messages on a WebSphere MQ queue, or on the WebSphere MQ reply-to queue that is specified in the input message MQMD
 
MQReply
    Use an MQReply node if the target application expects to receive messages on the WebSphere MQ reply-to queue that is specified in the input message MQMD.
 
SCADAOutput
    Use a SCADAOutput node if a telemetry device is the target of the output messages, and the Publication node is not suitable.
 
HTTPReply
    Use an HTTPReply node if the messages are in response to a Web services client request.
 
HTTPRequest
    Use an HTTPRequest node if your message flow interacts with a Web service.
 
Real-timeOptimizedFlow  Use a Real-timeOptimizedFlow node if the target application is a JMS or multicast application.
 
JMSOutput
    Use a JMSOutput node if the messages are for a JMS destination.
 
User-defined output node
    Use a user-defined output node if the target is a client or application that uses a different protocol or transport.
 
Output node
    If you are creating a message flow that you want to embed in another message flow (a subflow) that you will not deploy as a stand-alone message flow, you must include at least one Output node to propagate messages to subsequent nodes that you connect to the subflow.
Nodes for manipulating, enhancing, and transforming messages
Compute
    Use the Compute node to:
        * Manipulate message content
        * Transform the message in some way
        * Interact with a database to modify the content of the message or the database and pass on one or more new messages
 
JavaCompute
    Use the JavaCompute node to:
        * Examine an incoming message and, depending on its content, propagate it unchanged to one of the node’s two output terminals. The node behaves in a similar way to a Filter node, but uses Java™ instead of ESQL to decide which output terminal to use.
        * Change part of an incoming message and propagate the changed message to one of the output terminals.
        * Create and build a new output message that is totally independent of the input message.
Mapping
    Use the Mapping node to create a new message from the input message by mapping the content of elements of the output message from elements of the input message, or from database content. You can also extract parts of the message, and optionally change their content, to create a new output message that is a partial copy of the message that is received by the node.
Database
    Use the Database node to interact with a database that is identified by the node properties. The Database node handles both predefined and self-defining messages.
DataDelete, DataInsert, DataUpdate
    The DataDelete, DataInsert, and DataUpdate nodes are specialized forms of the Database node that provide a single mode of interaction (deletion of one or more rows, insertion of one or more rows, or update of one or more existing rows).
Warehouse
    The Warehouse node provides a store interface that you can use to store all or part of the message in a database
XMLTransformation
    Use the XMLTransformation node to transform an input XML message into another format using XSLT style sheets.
    It, can perform the following actions:
    * Sort the data
    * Select data elements to include or exclude based on some criteria
    * Transform the data into another format
JMSMQTransform
    Use the JMSMQTransform node to transform a message with a JMS message tree into a message that has a tree structure that is compatible with the format of messages that are produced by the WebSphere MQ JMS provider.
MQJMSTransform
    Use the MQJMSTransform node to receive messages that have a WebSphere MQ JMS provider message tree format, and transform them into a format that is compatible with messages that are to be sent to JMS destinations.
MQOptimizedFlow
    Use the MQOptimizedFlow node to replace a publish/subscribe message flow that consists of an MQInput node connected to a Publication node, and that uses the JMS over WebSphere MQ transport.
User-defined
    Use a user-defined node to handle specific requirements that are not met by the built-in nodes.
Decision making nodes
Validate
    Use the Validate node to check that the message that arrives on its input terminal is as expected.    
Filter
    Use the Filter node with an ESQL statement to determine the next node to which the message is sent by this node.   
FlowOrder
    You can connect the terminals of this node to force the message to be processed by one sequence of nodes, followed by a second sequence of nodes.
Passthrough
    Use the Passthrough node to enable version control of a subflow at run time. Use this node to add a label to your subflow.   
RouteToLabel and Label
    Use the RouteToLabel node following a Compute node for complex routing. Define a list of destinations in a Compute node that are acted on by the RouteToLabel node, which interrogates the destinations and passes the message on to the corresponding Label node.
ResetContentDescriptor
    Use the ResetContentDescriptor node to set new message properties that are used when the message bit stream is next parsed by a subsequent node in the message flow.
Nodes for controlling time-sensitive operations
TimeoutControl
    Use a TimeoutControl node and a TimeoutNotification node together in a message flow to control events that occur at a specific time or at defined time intervals. The TimeoutControl node receives an input message that contains a timeout request. All or part of this input message is validated and stored to be propagated by an associated TimeoutNotification node in the message flow. The input message is also propagated unchanged to the next node in the message flow.
TimeoutNotification
    Use a stand-alone TimeoutNotification node to generate messages that are propagated at configured times or time intervals to the next node in the message flow for further processing.
Nodes for collating requests
Use the AggregateControl, AggregateReply, and AggregateRequest  nodes to collate related requests and responses. Use these nodes to generate several requests in response to one input message, to control and coordinate the responses that are received in response to those requests, and to combine the information that is provided by the responses to continue processing.
Error handling and reporting nodes
Trace
    Include a Trace node to generate one or more trace entries to record what is happening in the message flow at this point.
TryCatch
    Include a TryCatch node to control the error processing when exceptions are thrown.
Throw
    Include a Throw node to force an exception to be thrown, and specify the identity of the exception, to make it easier to diagnose the problem.
New nodes in v6.1
File and FTP nodes
FileInput node reads files from the local file system or FTP server
FileOutput node writes files to the local file system or FTP server
Route, database route nodes:
The new Route node provides a graphical technique to enable incoming requests to be examined, and flow sent down the appropriate part of the message flow, depending on the specified criteria.
The DatabaseRoute node provides a similar function to the Route node, but the routing decision is based on the contents of a relational database.
DatabaseRetrieve node enables data to be retrieved from one of more relational databases, and use a similar dialogue to the DatabaseRoute node.
New nodes in V7
V7 introduced new nodes for SCA (service component architecture). These are nodes are basically for use with websphere process server which uses SCA.
SCA Input Node: A WebSphere Process Server SCA Import component can use Message Broker as an SCA endpoint. The message received by the broker can be a SOAP over HTTP message or an MQ message on a queue, depending on the binding used by the node.
SCA Reply Node: This allows a response message to be sent from the broker back to the originating Process Server SCA client, in response to a prior message received by an SCA Input Node.
SCA Request Node: This allows synchronous requests to be made from the broker, allowing the broker to participate in synchronous message exchange patterns with a Process Server SCA export component. The message sent by the broker can be a SOAP message over HTTP, or an MQ message, depending on the binding used by the node. The node will perform a blocked wait for a specified time period until a response is received

Sunday 12 January 2014

ESQL Special characters

Special characters
Symbol
Name
Usage
;
semicolon
End of ESQL statement
.
period
Field reference separator or decimal point
=
equals
Comparison or assignment
greater than
Comparison
less than
Comparison
[]
square brackets
Array subscript
'
single quotation mark
Delimit string, date-time, and decimal literals
Note, that to escape a single quotation mark inside a string literal, you must use two single quotation marks.
||
double vertical bar
Concatenation
()
parentheses
Expression delimiter
"
quotation mark
Identifier delimiter
*
asterisk
Any name or multiply
+
plus
Arithmetic add
-
minus
Arithmetic subtract, date separator, or negation
/
forward slash
Arithmetic divide
_
underscore
LIKE single wildcard
%
percent
LIKE multiple wildcard
\
backslash
LIKE escape character
:
colon
Name space and Time literal separator
,
comma
List separator
<> 
less than greater than
Not equals
--
double minus
ESQL single line comment
/* */
slash asterisk asterisk slash
ESQL multiline comment
?
question mark
Substitution variable in PASSTHRU
<=
less than or equal
Comparison
>=
greater than or equal
Comparison
/*!{ }!*/
executable comment
Bypass tools check