Author |
Message
|
shilpa.sabade |
Posted: Tue Jan 28, 2014 10:10 am Post subject: Message Grouping - collector node doesnt solve! |
|
|
Voyager
Joined: 23 Feb 2011 Posts: 76
|
Hi All,
Am looking for logic to solve the below.
Scenario :
Am trying to group the "Item Details " that come as individual messages between two control messages ie Start of and ENDof.
Here is the sample :
Code: |
Message 1 : <RETALIX> <SPO> <PONUMBER>1000</PONUMBER> </SPO> </RETALIX>
Message 2 : <RETALIX>
<PO_ITEM>
<FAC>01</FAC>
<WHSE>04</WHSE>
<PONUMBER>1000</PONUMBER>
<ITEMNUMBER>00500061</ITEMNUMBER>
<QUANTITY>160</QUANTITY>
</PO_ITEM>
</RETALIX>
Message 3 : <RETALIX>
<PO_ITEM>
<FAC>01</FAC>
<WHSE>04</WHSE>
<PONUMBER>1000</PONUMBER>
<ITEMNUMBER>00500062</ITEMNUMBER>
<QUANTITY>160</QUANTITY>
</PO_ITEM>
</RETALIX>
Message 4 :<RETALIX> <EPO> <PONUMBER>1000</PONUMBER> </EPO> </RETALIX>
So for this is what i have tried :
1. Collectro node : Grouping based on PONUMBER ..
but .. here .. Number of item detail messages or Time is unknown.
Is there a way to configure Quantity Property during the flow execution?
if we send it as part of SOP message.?
|
|
|
Back to top |
|
 |
mqjeff |
Posted: Tue Jan 28, 2014 10:16 am Post subject: |
|
|
Grand Master
Joined: 25 Jun 2008 Posts: 17447
|
Use the sequence/reqsequence node. |
|
Back to top |
|
 |
shilpa.sabade |
Posted: Tue Jan 28, 2014 10:34 am Post subject: |
|
|
Voyager
Joined: 23 Feb 2011 Posts: 76
|
mqjeff wrote: |
Use the sequence/reqsequence node. |
I Cant visualize how sequence/reqsequence nodes can be used here?  |
|
Back to top |
|
 |
mqjeff |
Posted: Tue Jan 28, 2014 11:11 am Post subject: |
|
|
Grand Master
Joined: 25 Jun 2008 Posts: 17447
|
... sorry, misread what you are trying to do.
If you want to assemble all of the separate messages into a single message tree, then you need a collector node - or build your own collection mechanism using a database, cache, or an MQGet node pattern.
for collecter, i'd create three inputs - one for the start message, one for the end message, and one for the messages in the middle. |
|
Back to top |
|
 |
shilpa.sabade |
Posted: Tue Jan 28, 2014 12:06 pm Post subject: |
|
|
Voyager
Joined: 23 Feb 2011 Posts: 76
|
mqjeff wrote: |
... sorry, misread what you are trying to do.
If you want to assemble all of the separate messages into a single message tree, then you need a collector node - or build your own collection mechanism using a database, cache, or an MQGet node pattern.
for collecter, i'd create three inputs - one for the start message, one for the end message, and one for the messages in the middle. |
MQJEFF,
with collector node and 3 inputs .. how to configure quantity for middlemessages ?
Can you please explain more about solution using MQGET node. |
|
Back to top |
|
 |
McueMart |
Posted: Wed Jan 29, 2014 4:16 am Post subject: |
|
|
 Chevalier
Joined: 29 Nov 2011 Posts: 490 Location: UK...somewhere
|
Are the messages coming over MQ? Could the sending system send the messages as an MQ group? |
|
Back to top |
|
 |
shilpa.sabade |
Posted: Thu Jan 30, 2014 11:49 am Post subject: |
|
|
Voyager
Joined: 23 Feb 2011 Posts: 76
|
I am trying a solution with MQGet node here ,
While testing the flow in debug mode .. Message control never enters MQGet Node out terminal .. always go through No Message terminal, though message is in input queue.
MQInput is set to browse the message
Quote: |
MQINPUT -- COMPUTE -- MQGET -- COMPUTE --MQOUT
|
In First compute node
Quote: |
MQGETLoop: LOOP
PROPAGATE TO TERMINAL 'out' ENVIRONMENT OutputLocalEnvironment DELETE NONE; |
Second compute node
Quote: |
Looking for EOP message and Setting ENV Variable to TRUE |
Message comes First compute node all fine but never enters MQGet Node OUT.
I verified Transaction Mode - on both input and get node its set to Automatic
as of now i have not set any MQGMO options.
Please help here.
Last edited by shilpa.sabade on Thu Jan 30, 2014 12:07 pm; edited 2 times in total |
|
Back to top |
|
 |
shilpa.sabade |
Posted: Thu Jan 30, 2014 11:53 am Post subject: |
|
|
Voyager
Joined: 23 Feb 2011 Posts: 76
|
|
Back to top |
|
 |
smdavies99 |
Posted: Thu Jan 30, 2014 12:20 pm Post subject: |
|
|
 Jedi Council
Joined: 10 Feb 2003 Posts: 6076 Location: Somewhere over the Rainbow this side of Never-never land.
|
In the time you have been waiting for someone to do your job for you, you could have developed a complete solution to your problem.
I tried something similar to you using the collector node and I could not get it to work reliably.
So I re-engineered a solution to replace the collector node using a pair of DB Tables and a timer.
All the records are written to the DB table in their entirety while the index table holds just that the inde anx the start of the collection time.
The timer kicks in every 30secs and if there is a 'collection' more than 30 seconds old it assembles the collection and sends it on its way in exactly the same format as you would get out of a collector node.
This solution has been in full production use for 15 months now and has processed in excess on 1 million collections with a range of message counts from 1 to 18.
The whole thing took me 4-5 hours to develop.
Think outside the box and try different things. You never know, some of them may actually work. (to your everlasting surprise and pleasure) _________________ WMQ User since 1999
MQSI/WBI/WMB/'Thingy' User since 2002
Linux user since 1995
Every time you reinvent the wheel the more square it gets (anon). If in doubt think and investigate before you ask silly questions. |
|
Back to top |
|
 |
shilpa.sabade |
Posted: Thu Jan 30, 2014 12:25 pm Post subject: |
|
|
Voyager
Joined: 23 Feb 2011 Posts: 76
|
smdavies99 wrote: |
In the time you have been waiting for someone to do your job for you, you could have developed a complete solution to your problem.
I |
Sir .. I have tried a solution with Collector it seems to work .. as of now am trying the developerswork 'dynamic message grouping ' using MQ grouping as i dnt have the facility of using database. |
|
Back to top |
|
 |
|