Author |
Message
|
Gaya3 |
Posted: Mon Feb 18, 2008 2:46 am Post subject: Propagate Issues |
|
|
 Jedi
Joined: 12 Sep 2006 Posts: 2493 Location: Boston, US
|
Hi
I have made a sample flow,
here is the ESQL, Here i am not getting second output,
I am getting Gayathri to the First Terminal Out, and for the second its prompting, No Data found in the message,
As you can see from the code that i am even copying the outputroot to a String,
Let me what went wrong here....
CREATE COMPUTE MODULE Propagate_Msg_Flow_Compute
CREATE FUNCTION Main() RETURNS BOOLEAN
BEGIN
CALL CopyMessageHeaders();
SET OutputRoot.XML.Name = 'Gayathri';
PROPAGATE TO TERMINAL 'Out' DELETE NONE;
CALL CopyEntireMessage();
PROPAGATE TO TERMINAL 'Out1' DELETE NONE;
RETURN TRUE;
END;
CREATE PROCEDURE CopyMessageHeaders() BEGIN
DECLARE I INTEGER 1;
DECLARE J INTEGER;
SET J = CARDINALITY(InputRoot.*[]);
WHILE I < J DO
SET OutputRoot.*[I] = InputRoot.*[I];
SET I = I + 1;
END WHILE;
END;
CREATE PROCEDURE CopyEntireMessage() BEGIN
SET OutputRoot.XML.Name = 'MQ Series';
END;
END MODULE;
Regards
Gayathri[/b] _________________ Regards
Gayathri
-----------------------------------------------
Do Something Before you Die |
|
Back to top |
|
 |
AJStar |
Posted: Mon Feb 18, 2008 3:01 am Post subject: Re: Propagate Issues |
|
|
 Acolyte
Joined: 27 Jun 2007 Posts: 64
|
Gaya3 wrote: |
RETURN TRUE;
|
... by default propagates to Out terminal. You have already propagated to Out once using PROPAGATE.
Not sure if thats the issue, but just something that I found in the code. _________________ Regards
AJ |
|
Back to top |
|
 |
Gaya3 |
Posted: Mon Feb 18, 2008 3:14 am Post subject: |
|
|
 Jedi
Joined: 12 Sep 2006 Posts: 2493 Location: Boston, US
|
Hi
I agree with you, but how can we handle this issue,
If i make Return False, i will get same message on the outputs
Regards
Gayathri _________________ Regards
Gayathri
-----------------------------------------------
Do Something Before you Die |
|
Back to top |
|
 |
AJStar |
Posted: Mon Feb 18, 2008 3:29 am Post subject: |
|
|
 Acolyte
Joined: 27 Jun 2007 Posts: 64
|
Try this
Code: |
CREATE COMPUTE MODULE Propagate_Msg_Flow_Compute
CREATE FUNCTION Main() RETURNS BOOLEAN
BEGIN
CALL CopyMessageHeaders();
SET OutputRoot.XML.Name = 'Gayathri';
PROPAGATE TO TERMINAL 'Out1' DELETE NONE;
CALL CopyEntireMessage();
RETURN TRUE;
END; |
By the way, I don't see anything wrong in ur code apart from the return true, which also on the other hand may not throw any error. _________________ Regards
AJ |
|
Back to top |
|
 |
jefflowrey |
Posted: Mon Feb 18, 2008 4:04 am Post subject: |
|
|
Grand Poobah
Joined: 16 Oct 2002 Posts: 19981
|
It's never never a good idea to call CopyHeaders AND CopyEntireMessage.
The Delete NONE is not going to remove anything.
So likely Gaya3 is making a big mess of the message tree by calling CopyEntireMessage. _________________ I am *not* the model of the modern major general. |
|
Back to top |
|
 |
Gaya3 |
Posted: Mon Feb 18, 2008 4:13 am Post subject: |
|
|
 Jedi
Joined: 12 Sep 2006 Posts: 2493 Location: Boston, US
|
Hi Jeff,
Usually i calls only one function, that is always Copy message headers.
Here its a sample flow,
Fine i have removed the same, but the logic is not working for me
I want the 2 different message to be routed to 2 different queues using propagate command
Regards
Gayathri _________________ Regards
Gayathri
-----------------------------------------------
Do Something Before you Die |
|
Back to top |
|
 |
jefflowrey |
Posted: Mon Feb 18, 2008 4:16 am Post subject: |
|
|
Grand Poobah
Joined: 16 Oct 2002 Posts: 19981
|
I guess the point is that you need to ensure that at PROPAGATE, the message tree looks correct for what you want it to be.
And you need to understand what the implications of the DELETE options you've specified will have on the message tree. This will help you to make sure the message tree looks correct for what you want it to be before the NEXT propagate. _________________ I am *not* the model of the modern major general. |
|
Back to top |
|
 |
Bill.Matthews |
Posted: Mon Feb 18, 2008 5:34 am Post subject: |
|
|
 Master
Joined: 23 Sep 2003 Posts: 232 Location: IBM (Retired)
|
For the Propagate to Terminal statement - the name of the terminal in ESQL is all lowercase - out1 for example - not Out1. _________________ Bill Matthews |
|
Back to top |
|
 |
fschofer |
Posted: Mon Feb 18, 2008 5:39 am Post subject: |
|
|
 Knight
Joined: 02 Jul 2001 Posts: 524 Location: Mainz, Germany
|
Hi, maybe its a problem with the TerminalExpression
try out and out1 instead of Out and Out1
Quote: |
TO TERMINAL clause
If the TO TERMINAL clause is present, TerminalExpression is evaluated. If the result is of type CHARACTER, a message is propagated to a terminal according to the rule:
‘nowhere’ : no propagation
‘failure’ : Failure
‘out’ : Out
‘out1' : Out1
‘out2' : Out2
‘out3' : Out3
‘out4’ : Out4 |
Greetings Frank |
|
Back to top |
|
 |
Gaya3 |
Posted: Tue Feb 19, 2008 12:01 am Post subject: |
|
|
 Jedi
Joined: 12 Sep 2006 Posts: 2493 Location: Boston, US
|
Hi Thanks to All,
Thanks to Jeff too,As you said the entire mqmd and message tree is getting deleted. its required to recreate the same
As bill said, The name of the terminal has to be in lower case
It looks good now
Regards
Gayathri _________________ Regards
Gayathri
-----------------------------------------------
Do Something Before you Die |
|
Back to top |
|
 |
|