Author |
Message
|
deepak_paul |
Posted: Sun Dec 16, 2012 11:19 am Post subject: Batch Report in Broker |
|
|
Centurion
Joined: 04 Oct 2008 Posts: 147 Location: US
|
All,
Here is my scenario:
1. Operation folks send a single batch message(XML) for below operations to be performed,
a. Retrieve all all relevant records from database. For each record, do below steps.(could be more than 10000)
i. Send a trigger msg to downstream app for each record from Database
ii. Delete the respective record from database
b. Send a email report consolidating the status of the whole batch (like 99996 records passed 4 records failed)
Implementation:
a. I have first message flow which can get a single batch XML msg and retrieves all record database and propagates each record to Output Queue one by one.
b. Second Message flow gets each record and send trigger msg to downstream app and delete the record from database.
I would like to know how elegantly i can implement the second operation as to how get the whole batch status with passed records and failed records.
Constraints:
1. I would like to perform this operation preferably in Broker(No storing in database and then retrieving). (tried with Row Shared variable but does not seem to be promising)
Please let me know if you have any good suggestions. |
|
Back to top |
|
 |
kash3338 |
Posted: Sun Dec 16, 2012 10:01 pm Post subject: Re: Batch Report in Broker |
|
|
Shaman
Joined: 08 Feb 2009 Posts: 709 Location: Chennai, India
|
deepak_paul wrote: |
b. Send a email report consolidating the status of the whole batch (like 99996 records passed 4 records failed) |
When you say status through mail, is it only the count that you need to send or any other details added to it?
If it is just the count (No. of success and failure), and you dont want to use a SHARED variable or DB, you can make use of MQ Queue (temporary) with a simple XML which has <Success> and <Failure> count updated in the second flow and finally you can get this xml and send the mail.
You can have a MQGet and MQOut in you second flow and keep updating the counters for every record. Once you get the last message, get the XML from the MQ queue and send an EMail.
deepak_paul wrote: |
Constraints:
1. I would like to perform this operation preferably in Broker(No storing in database and then retrieving). (tried with Row Shared variable but does not seem to be promising) |
Your constraint on usage of DB is valid, but what is not promising in using the SHARED variable? Can you please explain that? |
|
Back to top |
|
 |
zpat |
Posted: Mon Dec 17, 2012 1:43 am Post subject: |
|
|
 Jedi Council
Joined: 19 May 2001 Posts: 5866 Location: UK
|
You could generate the messages as a MQ message group. |
|
Back to top |
|
 |
visasimbu |
Posted: Mon Dec 17, 2012 8:19 am Post subject: Re: Batch Report in Broker |
|
|
 Disciple
Joined: 06 Nov 2009 Posts: 171
|
kash3338 wrote: |
If it is just the count (No. of success and failure), and you dont want to use a SHARED variable or DB, you can make use of MQ Queue (temporary) with a simple XML which has <Success> and <Failure> count updated in the second flow and finally you can get this xml and send the mail.
You can have a MQGet and MQOut in you second flow and keep updating the counters for every record. Once you get the last message, get the XML from the MQ queue and send an EMail.
|
Will this solution applicable for multi instance/multi threaded flow ? |
|
Back to top |
|
 |
kash3338 |
Posted: Mon Dec 17, 2012 8:54 am Post subject: Re: Batch Report in Broker |
|
|
Shaman
Joined: 08 Feb 2009 Posts: 709 Location: Chennai, India
|
visasimbu wrote: |
Will this solution applicable for multi instance/multi threaded flow ? |
No this wont help in case of multi instance, but the OP has not mentioned about multi instance in his flows.
Also, if the OP can explain on his problems in using SHARED variable, it would be better because SHARED variables seems to be better oiption for this design. Also the problem of multi instance can be handled using ATOMIC. |
|
Back to top |
|
 |
visasimbu |
Posted: Mon Dec 17, 2012 9:07 am Post subject: Re: Batch Report in Broker |
|
|
 Disciple
Joined: 06 Nov 2009 Posts: 171
|
kash3338 wrote: |
because SHARED variables seems to be better oiption for this design.
|
If it is Just a count, I hope sequence node will resolve this design issue. It will count the number of messages under one message group. |
|
Back to top |
|
 |
|