ASG
IBM
Zystems
Cressida
Icon
Netflexity
 
  MQSeries.net
Search  Search       Tech Exchange      Education      Certifications      Library      Info Center      SupportPacs      LinkedIn  Search  Search                                                                   FAQ  FAQ   Usergroups  Usergroups
 
Register  ::  Log in Log in to check your private messages
 
RSS Feed - WebSphere MQ Support RSS Feed - Message Broker Support

MQSeries.net Forum Index » WebSphere Message Broker (ACE) Support » Usages of PROPAGATE not clear

Post new topic  Reply to topic
 Usages of PROPAGATE not clear « View previous topic :: View next topic » 
Author Message
datspats
PostPosted: Sat Jul 28, 2007 6:28 am    Post subject: Usages of PROPAGATE not clear Reply with quote

Voyager

Joined: 12 Apr 2007
Posts: 80
Location: Mumbai

Hello,

I want to use PROPAGATE node in my flow as per requirement, In my compute node,

I have the code in while loop which search for the content on line by line.

In the 'IF' condition below "IF_Check", is not satisfied then i need to propagte the message to out1 terminal immeditely and never execute loop again and generate failure report "errorcode" and finally put message to MQ output node,

if all condition are ok as per "IF_Check" then message successfully passed from out node and then finally to output node.

WHILE(some condition)
BEGIN
IF (IF_Check) THEN
some processing;
Continue processing for next line;
ELSE
PROPAGATE to terminal 'out1';
END IF;
END WHILE

In case of failure i.e. "IF_Check" fails then
propagate statement as mentioned causes two copies of message one in output node with failed report "errorcode" and other to failure queue attached to the CATCH terminal of the input node (I know this come becuase of empty message tree)
But
How do i get rid of messge in the failure queue attached to the CATCH terminal of the input queue, as I need only the message to the output queue with the failure report when IF_Check" fails .

Regards
Back to top
View user's profile Send private message Yahoo Messenger
jefflowrey
PostPosted: Sat Jul 28, 2007 6:56 am    Post subject: Reply with quote

Grand Poobah

Joined: 16 Oct 2002
Posts: 19981

else
propagate
return false
end if
_________________
I am *not* the model of the modern major general.
Back to top
View user's profile Send private message
joe.l3
PostPosted: Sat Jul 28, 2007 8:05 am    Post subject: Reply with quote

Novice

Joined: 24 Jul 2007
Posts: 20
Location: ITALY

I have used PROPAGATE statment to propagate two separated message to the next node of my workflow. Take a look to the following code. You can adjust it for you need.

CREATE COMPUTE MODULE MyComputeNode

CREATE FUNCTION Main() RETURNS BOOLEAN
BEGIN

DECLARE MsgQuantity INTEGER 2;
DECLARE MsgOutput INTEGER 1;

WHILE MsgOutput <= MsgQuantity DO

IF MsgOutput=1 THEN
CALL CopyMessageHeaders();
SET OutputRoot.XML.msg1='out1';
SET MsgOutput = MsgOutput+1;
PROPAGATE; -- the first message is propagated to the next node
END IF;

IF MsgOutput=2 THEN
CALL CopyMessageHeaders();
SET OutputRoot.XML.msg2='out2';
SET MsgOutput = MsgOutput+1; -- the second message is propagated to the next node
PROPAGATE;
END IF;

END WHILE;
RETURN FALSE;

END;

CREATE PROCEDURE CopyMessageHeaders()
BEGIN
DECLARE I INTEGER 1;
DECLARE J INTEGER CARDINALITY(InputRoot.*[]);

WHILE I < J DO
SET OutputRoot.*[I] = InputRoot.*[I];
SET I = I + 1;
END WHILE;
END;

END MODULE;
Back to top
View user's profile Send private message
datspats
PostPosted: Sat Jul 28, 2007 8:27 am    Post subject: Reply with quote

Voyager

Joined: 12 Apr 2007
Posts: 80
Location: Mumbai

Thanks for the both replies,

Regards
Back to top
View user's profile Send private message Yahoo Messenger
mrgate
PostPosted: Mon Jul 30, 2007 12:56 am    Post subject: Reply with quote

Centurion

Joined: 28 Feb 2007
Posts: 141
Location: India

Hey Joe.13,
what you have done is perfect and its not wrong. To decrease space complexity i.e. coding, instead of calling headers twice, copy only once and in the first if condition, instead of using only propagate, use propagate delete none so that headers are not removed.
Back to top
View user's profile Send private message
joe.l3
PostPosted: Thu Aug 02, 2007 5:08 am    Post subject: Reply with quote

Novice

Joined: 24 Jul 2007
Posts: 20
Location: ITALY

Thanks mrgate for your comment, but I don't understand about "...use propagate delete none...". Can you tell me some details?
(I have a WBI Toolkit 5.0 version)
Back to top
View user's profile Send private message
Vitor
PostPosted: Thu Aug 02, 2007 5:59 am    Post subject: Reply with quote

Grand High Poobah

Joined: 11 Nov 2005
Posts: 26093
Location: Texas, USA

"Delete None" is an option of the Propogate command. It's in the manual description.
_________________
Honesty is the best policy.
Insanity is the best defence.
Back to top
View user's profile Send private message
jefflowrey
PostPosted: Thu Aug 02, 2007 6:00 am    Post subject: Reply with quote

Grand Poobah

Joined: 16 Oct 2002
Posts: 19981

Vitor wrote:
"Delete None" is an option of the Propogate command. It's in the manual description.


But I believe it's new to v6... and so not available to a v5 Toolkit or Broker...
_________________
I am *not* the model of the modern major general.
Back to top
View user's profile Send private message
Vitor
PostPosted: Thu Aug 02, 2007 6:10 am    Post subject: Reply with quote

Grand High Poobah

Joined: 11 Nov 2005
Posts: 26093
Location: Texas, USA

jefflowrey wrote:
Vitor wrote:
"Delete None" is an option of the Propogate command. It's in the manual description.


But I believe it's new to v6... and so not available to a v5 Toolkit or Broker...


Doh!
_________________
Honesty is the best policy.
Insanity is the best defence.
Back to top
View user's profile Send private message
joe.l3
PostPosted: Thu Aug 02, 2007 6:19 am    Post subject: Reply with quote

Novice

Joined: 24 Jul 2007
Posts: 20
Location: ITALY

In the ESQL 5.0 manual there is not a "DELETE NONE" option for "PROPAGATE" so I think that it's new for 6.0 PROPAGATE.
Back to top
View user's profile Send private message
Vitor
PostPosted: Thu Aug 02, 2007 6:32 am    Post subject: Reply with quote

Grand High Poobah

Joined: 11 Nov 2005
Posts: 26093
Location: Texas, USA

joe.l3 wrote:
In the ESQL 5.0 manual there is not a "DELETE NONE" option for "PROPAGATE" so I think that it's new for 6.0 PROPAGATE.


I think you're right. As jefflowrey correctly points out!
_________________
Honesty is the best policy.
Insanity is the best defence.
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic  Reply to topic Page 1 of 1

MQSeries.net Forum Index » WebSphere Message Broker (ACE) Support » Usages of PROPAGATE not clear
Jump to:  



You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
Protected by Anti-Spam ACP
 
 


Theme by Dustin Baccetti
Powered by phpBB © 2001, 2002 phpBB Group

Copyright © MQSeries.net. All rights reserved.