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 » PROPOGATE Function Behaviour

Post new topic  Reply to topic Goto page 1, 2  Next
 PROPOGATE Function Behaviour « View previous topic :: View next topic » 
Author Message
mcatama
PostPosted: Mon Oct 14, 2002 3:50 am    Post subject: PROPOGATE Function Behaviour Reply with quote

Novice

Joined: 10 Apr 2002
Posts: 17

I have a flow in WMQI 2.1 where I am using the PROPOGATE function to split my message in several smaller messages.

After the splitting, further processing is carried out on each new message and then they are all put to the same queue.

The problem is that I need either all the messages to arrive on the output queue or none at all, but the behaviour I am experiencing is the following:

* Message is split into a number (say, 4) of smaller messages
* First two messages pass through successfully
* Third message fails during additional processing
* Exception is thrown and caught at input node and is handled correctly
* Messages 1 and 2 still remain on the output queue

My message flow is transactional and I have tried creating my messages as a group when splitting them but I can't seem to get it to undo the put of messages 1 and 2.

So my questions are:
1. Is there something obvious that I am missing in order to ensure my all or nothing result?
2. Is this expected behaviour of the PROPOGATE funtion and if so does anyone have a workaround that would achieve this behaviour?

Thanks,
Alison
Back to top
View user's profile Send private message
lung
PostPosted: Mon Oct 14, 2002 5:01 pm    Post subject: Reply with quote

Master

Joined: 27 Aug 2002
Posts: 291
Location: Malaysia

I think this is the expected behaviour of the Propagate function. What Propagate does is it creates a new message and sends it to the flow, and nothing else. So, in your case, all the 4 smaller messages created will be INDEPENDENT of one another.

Maybe you can try using aggregation nodes.
_________________
lung
Back to top
View user's profile Send private message Send e-mail Yahoo Messenger MSN Messenger
kirani
PostPosted: Mon Oct 14, 2002 7:00 pm    Post subject: Reply with quote

Jedi Knight

Joined: 05 Sep 2001
Posts: 3779
Location: Torrance, CA, USA

Alison,

Have you tried setting Transaction property of MQOutput node to Yes?
_________________
Kiran


IBM Cert. Solution Designer & System Administrator - WBIMB V5
IBM Cert. Solutions Expert - WMQI
IBM Cert. Specialist - WMQI, MQSeries
IBM Cert. Developer - MQSeries

Back to top
View user's profile Send private message Visit poster's website
mcatama
PostPosted: Mon Oct 14, 2002 11:39 pm    Post subject: Reply with quote

Novice

Joined: 10 Apr 2002
Posts: 17

Kiran,

Yes I have tried setting the output node proprty to transactional. I also tried to create the new messages as a group by setting the group Id, message sequence number and message flag properties in the MQMD but this didn't make any difference either and there doesn't seem to be a property in the output node that allows you to specify "commit by group".

Alison
Back to top
View user's profile Send private message
lung
PostPosted: Tue Oct 15, 2002 5:11 pm    Post subject: Reply with quote

Master

Joined: 27 Aug 2002
Posts: 291
Location: Malaysia

Kiran,

I've always wondered what is that 'transaction' property for... Does it have anything to do with the 'transaction' in the message set?

How do use unit-of-work concept in WMQI?

Thanks!
_________________
lung
Back to top
View user's profile Send private message Send e-mail Yahoo Messenger MSN Messenger
kirani
PostPosted: Tue Oct 15, 2002 8:52 pm    Post subject: Reply with quote

Jedi Knight

Joined: 05 Sep 2001
Posts: 3779
Location: Torrance, CA, USA

Alison,

I think, Propgate command should not change the scope of UOW. There must be something wrong here! I will see if I can get this to work.

I think "commit by group" feature is not yet implemented in WMQI.

Lung,

Transaction property of MQOutput node tells Broker whether this node is a part of transaction or not. This property is not related to "Transaction" in MessageSet.

If your message flow is transactional then your message is processed in single unit-of-work.
_________________
Kiran


IBM Cert. Solution Designer & System Administrator - WBIMB V5
IBM Cert. Solutions Expert - WMQI
IBM Cert. Specialist - WMQI, MQSeries
IBM Cert. Developer - MQSeries

Back to top
View user's profile Send private message Visit poster's website
kirani
PostPosted: Tue Oct 15, 2002 9:08 pm    Post subject: Reply with quote

Jedi Knight

Joined: 05 Sep 2001
Posts: 3779
Location: Torrance, CA, USA

You could find more info on Propagate command at url,
http://www.kolban.com/mq/wmqi/propagate_and_throw.htm

unit of work
Quote:

A recoverable sequence of operations performed by an application between two points of consistency. A unit of work begins when a transaction starts or after a user-requested syncpoint. It ends either at a user-requested syncpoint or at the end of a transaction. Contrast with unit of recovery.

_________________
Kiran


IBM Cert. Solution Designer & System Administrator - WBIMB V5
IBM Cert. Solutions Expert - WMQI
IBM Cert. Specialist - WMQI, MQSeries
IBM Cert. Developer - MQSeries

Back to top
View user's profile Send private message Visit poster's website
lung
PostPosted: Wed Oct 16, 2002 4:58 pm    Post subject: Reply with quote

Master

Joined: 27 Aug 2002
Posts: 291
Location: Malaysia

Thanks, kiran! I have another question...

I realised that the 'propagate' function, when issued, will send a message to the out terminal, and, at the same time, will delete off the outputroot message tree of the message (new message) that is still referenced by the compute node.

For example...
Code:
SET OutputRoot.XML.ABC.DEF = 'def';
PROPAGATE;
SET OutputRoot.XML.ABC.GHI = 'ghi';


The 1st message will consist of <ABC><DEF>def</DEF></ABC> and the 2nd message will be <ABC><GHI>ghi</GHI></ABC>

Is there any way to issue the 'propagate' function and at the same time retain the outputroot of the new message in the compute node? For example, what I'm trying to get in the 2nd message should be <ABC><DEF>def</DEF><GHI>ghi</GHI></ABC>

How do you ppl usually accomplish this? Thanks!

And another question... What is function of 'transaction' in the message set? How do you apply it in your message flows? Thanks again!
_________________
lung
Back to top
View user's profile Send private message Send e-mail Yahoo Messenger MSN Messenger
kirani
PostPosted: Wed Oct 16, 2002 9:01 pm    Post subject: Reply with quote

Jedi Knight

Joined: 05 Sep 2001
Posts: 3779
Location: Torrance, CA, USA

I tested failure condition with Propagate on my machine and it bhaves in similar fashion as Alison described in above post. As I think more about this it sounds logical. I think the main idea behind creating PROPAGATE function was to retain same copy of the output message tree, that is, if you are creating multiple messages using PROPAGATE command in your message flow, only one output tree is created and the same copy is shared by all messages that are propagated thru it. You can think of this as small UOW, which starts after propagate command and it is commited once your message flow reaches some logical end. In case of failure I don't think it is possible to rollback all messages without creating multiple copies of output tree.
Before PROPAGATE command we use to create "External Loop" in the message flow, but there is a problem with this logic, each time it will create a separate copy of the output tree. You will find more information about this in following thread:
http://www.mqseries.net/phpBB2/viewtopic.php?t=3202&highlight=loop

Lung,
You could make use of Environment tree to store first copy of your message and then use the copy stored into Environment tree to build your second message before issuing PROPAGATE command.
_________________
Kiran


IBM Cert. Solution Designer & System Administrator - WBIMB V5
IBM Cert. Solutions Expert - WMQI
IBM Cert. Specialist - WMQI, MQSeries
IBM Cert. Developer - MQSeries

Back to top
View user's profile Send private message Visit poster's website
lung
PostPosted: Wed Oct 16, 2002 9:35 pm    Post subject: Reply with quote

Master

Joined: 27 Aug 2002
Posts: 291
Location: Malaysia

Kiran,

I tried using the LocalEnvironment but it seems that the PROPAGATE command will clear the LocalEnvironment as well.
Code:
SET OutputRoot.XML.ABC.DEF = 'def';
SET OutputLocalEnvironment.Variables.OutputRoot = OutputRoot;
PROPAGATE;
SET OutputRoot = OutputLocalEnvironment.Variables.OutputRoot;
SET OutputRoot.XML.ABC.GHI = 'ghi';


1st message reaches the output queue successfully but the 2nd message will go to the failure queue. After some debugging, I realised that the 2nd message generated from the compute node is totally empty!

What's wrong? Any workaround?

Thanks!
_________________
lung
Back to top
View user's profile Send private message Send e-mail Yahoo Messenger MSN Messenger
lung
PostPosted: Sun Oct 20, 2002 6:05 pm    Post subject: Reply with quote

Master

Joined: 27 Aug 2002
Posts: 291
Location: Malaysia

Other than LocalEnvironment, is there anything else that I can use?
_________________
lung
Back to top
View user's profile Send private message Send e-mail Yahoo Messenger MSN Messenger
kirani
PostPosted: Sun Oct 20, 2002 8:49 pm    Post subject: Reply with quote

Jedi Knight

Joined: 05 Sep 2001
Posts: 3779
Location: Torrance, CA, USA

Lung,
Yes, LocalEnvironment trees will get cleared after PROPAGATE command.

You should be able to use code similar to this..
Code:

SET OutputRoot = InputRoot;
-- Clear the body before creating a new one
SET OutputRoot.XML = NULL;
SET OutputRoot.XML.ABC.DEF = 'def';
-- Store current message body into Environment tree
SET Environment.Variables.Body = OutputRoot.XML;
PROPAGATE;
SET OutputRoot = InputRoot;
SET OutputRoot.XML = NULL;
SET OutputRoot.XML = Environment.Variables.Body;
SET OutputRoot.XML.ABC.GHI = 'ghi';
PROPAGATE;
RETURN FALSE;

_________________
Kiran


IBM Cert. Solution Designer & System Administrator - WBIMB V5
IBM Cert. Solutions Expert - WMQI
IBM Cert. Specialist - WMQI, MQSeries
IBM Cert. Developer - MQSeries

Back to top
View user's profile Send private message Visit poster's website
lung
PostPosted: Sun Oct 20, 2002 10:02 pm    Post subject: Reply with quote

Master

Joined: 27 Aug 2002
Posts: 291
Location: Malaysia

Kiran,

Why do we need to clear the body (=NULL) before creating a new one? In my scenario, I cannot afford to copy entire message from input root, I am actually copying just the message headers... Here's my actual ESQL

--Before this, there's lots of ESQL for transformation
--Which is why I cannot SET OutputRoot = InputRoot
--ESQL for PROPAGATE begins
SET Environment.Variables.OutputRoot = OutputRoot;
SET I = 1;
WHILE I < CARDINALITY(InputBody.Msg.AccNo[]) DO
SET OutputRoot = Environment.Variables.OutputRoot;
SET OutputRoot.XML.Msg.AcctNo = InputBody.Msg.AccNo[I];
PROPAGATE;
SET I=I+1;
END WHILE;

What I'm trying to achieve here is to generate an XML message with only one AccNo. The input message arrives with more than one AccNo. So for each AccNo the input message has, I have to generate THAT number of output messages.

The above code returns a perfect first message, but for the second message, again it is totally empty. Anything wrong with my ESQL?

Thanks!
_________________
lung
Back to top
View user's profile Send private message Send e-mail Yahoo Messenger MSN Messenger
wmqiguy
PostPosted: Tue Oct 22, 2002 5:15 pm    Post subject: Reply with quote

Centurion

Joined: 09 Oct 2002
Posts: 145
Location: Florida

This is the functionality of the PROPAGATE function as I understand it:

When the PROPAGATE function is called, whatever is in the Output side of the house is sent merrily on its way and there is not an Output tree left, but everything in the Input tree is still there for use to build the next Output tree.

This means that each time propagate is called, the Output tree has to be rebuilt. Therefore, the MQMD and the Properties folders need to be rebuilt also. That is how we have used the functionality.

Hope that helps.
Back to top
View user's profile Send private message
lung
PostPosted: Tue Oct 22, 2002 5:30 pm    Post subject: Reply with quote

Master

Joined: 27 Aug 2002
Posts: 291
Location: Malaysia

wmqiguy,

Yes, I suppose that's how the PROPAGATE function works. The question is, is there any workaround to RETAIN the outputroot AFTER issuing the PROPAGATE command? In my previous message, I tried using Environment as a medium to store my outputroot data before issuing PROPAGATE, but it doesn't work...
_________________
lung
Back to top
View user's profile Send private message Send e-mail Yahoo Messenger MSN Messenger
Display posts from previous:   
Post new topic  Reply to topic Goto page 1, 2  Next Page 1 of 2

MQSeries.net Forum Index » WebSphere Message Broker (ACE) Support » PROPOGATE Function Behaviour
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.