Execute multiple execSQL at once

i have a number of queries that i need to run to get data from different databases, then combine the data, do something with it. however, each query can take average 30 minutes to run. i am not quite sure how to implement in IS so these queries can be executed in parallel, and have a service to wait for all the results and combine them. this is, however, pretty easy to implement using ES approach using a number jdbc adapters and join adapter.

i like to do this in IS because of wm6 is here although my company is still using IS46 and ES 501.

is that even dorable in IS without the broker?

thanks for your attention

You can write individual child services for each of the SQL calls. At the end of each child service use the pub.sync:notify service to notify any waiting services. Then in one parent flow service call each of these child services. Make sure that you call them asynchronouly using Service.doThreadedInvoke(). Then in the parent service use pub.sync:wait to wait for the results from each of the SQL services. Using this pattern the parent will kick off all the child services parallely and then wait for them to complete.

thanks Rupinder for the information. it makes sense but after a number of try i still could not make it work. here is what i have

sequence
doThreadInvoke(sql1)
doThreadInvoke(sql2)
sync:wait

sql1
execSQL
sync:notify

sql2
execSQL
sync:notify

i probably made a flow that does note match what you described.

do you have a sample flow?

thanks a lot

Got it after. Thanks!

Can you please post the solution to the group.

Thanks,
Raju.