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 » High level flow suggestions for handling 2 XML message files

Post new topic  Reply to topic
 High level flow suggestions for handling 2 XML message files « View previous topic :: View next topic » 
Author Message
emqueuer
PostPosted: Fri Jun 22, 2007 7:59 am    Post subject: High level flow suggestions for handling 2 XML message files Reply with quote

Novice

Joined: 21 Jun 2007
Posts: 24

Hello,
I have a large message flow that processes an xml file. I need to insert a subflow mid-way that gets (I presume using an MQGet) a 2nd XML file containing some mappings. The intention is to compare a field from the 1st file with the contents of mappings in the 2nd file and update the 1st file if applicable. What is the best way to deal with these 2 xml files assuming my comapring is happening in a 'compute' node.

Any help would be appreciated (I am slowly getting to grips with this)

Thanks

Daniel
Back to top
View user's profile Send private message
marcin.kasinski
PostPosted: Fri Jun 22, 2007 10:58 am    Post subject: Re: High level flow suggestions for handling 2 XML message f Reply with quote

Sentinel

Joined: 21 Dec 2004
Posts: 850
Location: Poland / Warsaw

I think you should tell us more about it.

What is in XML 1 and XML 2 ?
You mentioned both of there XMLs are in queue.

Does your app sends 2 messages and first is red by MQInput node and second you would like to get by MQGET.

... or maybe you use second XML as some kind of database access to get additional information ?

Tell us more and we will try to give you better design concept..
_________________
Marcin
Back to top
View user's profile Send private message Visit poster's website
emqueuer
PostPosted: Mon Jun 25, 2007 1:03 am    Post subject: Reply with quote

Novice

Joined: 21 Jun 2007
Posts: 24

Marcin,
A message flow currently exists which modifies an xml file before sending it off to another component. The xml file enters the flow at the beginning by means of an MQInput node. What I need to do is to add a new subflow mid way through the existing message flow. The subflow will use an MQGet node to get a second XML file, containing a set of mappings of user ids. I then need to search the mappings xml file for the user id contained in the first XML file and change the latter if necessary. This code I already have.

The mapping xml message does not originate from a database, it will be manually sent - however it probably will be cached somewhere so the ability must also exist to refresh the cache.

My initial concern is how 2 xml files/messages can similtaneously exist in the sub flow? Or should I extract the user id from the first message (before the proposed MQGet) and put it into a variable...then do the MQGET etc..?

I hope this is clear

Daniel
Back to top
View user's profile Send private message
marcin.kasinski
PostPosted: Mon Jun 25, 2007 1:49 am    Post subject: Reply with quote

Sentinel

Joined: 21 Dec 2004
Posts: 850
Location: Poland / Warsaw

emqueuer wrote:


The mapping xml message does not originate from a database, it will be manually sent - however it probably will be cached somewhere so the ability must also exist to refresh the cache.


Manually ?
If you invoke MQGet this message will be removed from queue.
What will put another message into this queue ? Is this additional MQ put really necessary here ? IS MQ necessary here ?
Why you dont want to store this mapping data in database ?
I think it is better palce.

Place it into database and cache it.


emqueuer wrote:

My initial concern is how 2 xml files/messages can similtaneously exist in the sub flow? Or should I extract the user id from the first message (before the proposed MQGet) and put it into a variable...then do the MQGET etc..?



You can :

- put only needed data from one of these messages into Environment tree.
- put soem data into SHARED variable if you need caching.
_________________
Marcin
Back to top
View user's profile Send private message Visit poster's website
emqueuer
PostPosted: Mon Jun 25, 2007 2:09 am    Post subject: Reply with quote

Novice

Joined: 21 Jun 2007
Posts: 24

[quote="marcin.kasinski"]
emqueuer wrote:

If you invoke MQGet this message will be removed from queue.



Can I not have 2 queues with different names?
Back to top
View user's profile Send private message
marcin.kasinski
PostPosted: Mon Jun 25, 2007 2:19 am    Post subject: Reply with quote

Sentinel

Joined: 21 Dec 2004
Posts: 850
Location: Poland / Warsaw

[quote="emqueuer"]
marcin.kasinski wrote:
emqueuer wrote:

If you invoke MQGet this message will be removed from queue.



Can I not have 2 queues with different names?


You can, but think about your design.

I don't get it.

To proces every message in your flow you will have to invoke additional MQ get.

If you invoke MQGet this message will be removed from queue, so you will need additional MQ Put to store new mapping in queue.

I think you are trying to use MQ in database way, don't you.

It is not good desing pattern.
_________________
Marcin
Back to top
View user's profile Send private message Visit poster's website
elvis_gn
PostPosted: Mon Jun 25, 2007 2:42 am    Post subject: Reply with quote

Padawan

Joined: 08 Oct 2004
Posts: 1905
Location: Dubai

Hi emqueuer,

Who puts the xml in the second queue ? Who is giving you the UserId's in the 2nd xml...

How do u handle conditions when there are multiple messages in the 2nd queue ?

I think the first question is the important one which you need to answer....if the application which is sending you the 1st msg is the one putting it there then they can might as well send it in one msg,

If you yourself had put the msg into the 2nd queue earlier, how do you plan to correlate the 1st to its correct 2nd...?

Regards.
Back to top
View user's profile Send private message Send e-mail
emqueuer
PostPosted: Mon Jun 25, 2007 3:42 am    Post subject: Reply with quote

Novice

Joined: 21 Jun 2007
Posts: 24

I see your point. However in the scope of the design (albeit at very high level) that I have been given I am supposed to obtain this XML mapping file from a queue. This solution is very likely to be a short term one so any design shortcomings can be overlooked.

For now, if it is assumed that the mapping file is retrieved (either from a database or cache) in a separate message flow and the MQOutput's destination mode is 'Destination List', how can I retrieve this file using an MQGet in my subflow, which will then allow me to do my comparisons etc...?

Daniel
Back to top
View user's profile Send private message
Vitor
PostPosted: Mon Jun 25, 2007 3:49 am    Post subject: Reply with quote

Grand High Poobah

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

emqueuer wrote:
For now, if it is assumed that the mapping file is retrieved (either from a database or cache) in a separate message flow and the MQOutput's destination mode is 'Destination List', how can I retrieve this file using an MQGet in my subflow, which will then allow me to do my comparisons etc...?


At the risk of being obvious, if you store the mappings in a database or indeed in a file, the MQGet node will be unable to retrieve it. You'll need a Database node (or similar).

I echo the concerns voiced here about your design. There do seem to be a lot of places (even in the short term) where it can break.
_________________
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 » High level flow suggestions for handling 2 XML message files
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.