Monday, 21 October 2013

SCENARIO ON USAGE OF TRANSACTION MODE(sync -point),CORRELATIONID,ENVIRONMENT VARIABLES AND GET NODE


Message Flow 1(Main):





Message Flow 2(Sub):

INPUT:



(1)STANDARD INPUT INITIALIZATION:


DECLARE ptr REFERENCE to InputRoot.XMLNSC.EmployeeDetails.Employee[1];
DECLARE i INTEGER 1;

(2)MESSAGE FLOWS THROUGH ‘out1’ TERMINAL AND IN TURN LINKS TO MESSAGEFLOW 2(NOT SUBFLOW) BY HAVING SAME QUEUE NAMES TO FURTHER PROCESS THE STANDARD INPUT MESSAGE.
              

(3)RE-PROCESSING THE STANDARD INPUT.

(4)GETS THE RE-PROCESSED INPUT (say,a+100) INTO GETNODE,WHOSE PURPOSE IS TO GET THE INPUT IN THE MIDDLE OF THE FLOW AND FINALLY SETS TO ENVIRONMENT VARIABLES.

CODE TO SET THE RE-PROCESSED INPUT TO ENVIRONMENT VARIABLES:

          CREATE FIELD Environment.EmployeeDetails;
     DECLARE envPtr REFERENCE to Environment.EmployeeDetails;
     CREATE LASTCHILD OF envPtr AS envPtr NAME 'Employee';
     set envPtr = InputRoot.XMLNSC.Employee;      
     RETURN TRUE;

-ONCE THE BOTH THE FLOWS END,THE OUTPUT MESSAGE CREATED IN ENVIRONMENT TREE WILL BE PROPAGATED TO OUT TERMINAL(Final Output Node in the first step).HERE THE POINT IS, JUST BECAUSE THESE ARE ENVIRONMENT VARIABLES,WE COULD EASILY ABLE TO RE-GET THE INPUT RE-PROCESSED MESSAGE IN TO THE OUTPUT STRUCTURE WITHOUT SCOPING THEM TILL NEXT NODE(localEnvironment) USING SET OutputRoot.XMLNSC=Environment;
USE OF TRANSACTION MODE:

BY PUTTING THE INPUT NODE ADVANCED PROPERTY,TRANSACTION MODE TO “NO” THE WHOLE FLOW WILL NOT BE TREATED AS A TRANSACTION AND WILL NOT TERMINATE EVEN THERE IS  SHIFT FROM Message Flow 1(Main) TO Message Flow 2(Sub) DUE TO SAME QUEUE NAMES.

EXCEPTION CASES : IF TRANSACTION MODE IS ‘YES’ then GETNODE(Gets ReProcessed-Output) Terminates through ‘No Message’ terminal and IF ‘Get by correlation ID’ is unchecked in request property of GETNODE.

IMPORTANT NOTE:-
When working with MQGET node for our surprise we observed that when the MQOutput node name and the MQGet node names are similar the message is appearing in the MQGet node Queue even though the Queue names configured to both the nodes are different.

MQGet node can be used anywhere in a message flow to store message temporarily.Using Compute node we copied the message id of the incoming message to correlation id of output message which helps to retrieve the temporarily message from the queue.
        By using the statement like SET OutputRoot.MQMD.CorrelId  =  InputRoot.MQMD.MsgId

This node name activity was a bug in this WMB V 8.0.0.1 this was being cleared when the same PI is being deployed in the IIB9 it was generating the error if any two nodes have the similar name with in the flow.

No comments:

Post a Comment