Spawning multiple processes from a synchronous parallel webservice (Invoke Process)

Spawning multiple processes from a synchronous parallel webservice (Invoke Process)

  
We expose a synchronous webservice. Inside that, we would like to have parallel execution to speed up the response time.  We are able to do do parallel processing within a BPT. But, the issue we are facing is when we call a BPT Process from the synchronous Invoke (Webservice action). The parent thread fires the BPT process and forgets and provides the response immediately. We need the parent process to wait until the BPT process completes. Any suggestions to get this done, please.
Hi Badiger,

What do you expect to be the serial and the parallel execution times? I think the solution will need to have that into consideration.

Cheers,
Miguel
Why not just have the parent look for a flag in the DB to be set, and spin until it sees that value change... and have the child process change it? One row per request ID, and have a system that generates random request IDs?

J.Ja
Hi Justin, 

Thank you for the reply. thing which made me to worry about spinning is that "Performance". Do you suggest that it is the best approach can be adopted?  
Instead  of contonuously spinning, planning to use "wait" for some interval of time and spin again till status changes in DB.  

Not sure outsystem got "wait" feature like in java, to use it in "actions" and not in "processes".
Please suggest me if any alternative functionality available ?

Appreciate your help.

Cheers,
Miguel Ventura wrote:
Hi Badiger,

What do you expect to be the serial and the parallel execution times? I think the solution will need to have that into consideration.

Cheers,
Miguel
 Hi Miguel,

Thank you. Yes, planning that it could take 2-3 minutes as  the highest boundary. Would have been better if there is an way to configure this timeout at runtime based on external services response time.

Current plan is to interface with atleast 10 interfaces parallely and wait till all 10 compltes then respond back.. As external systems are legacy too and may take some more time than expected.



thnks
badiger
 
If it is going to be a short wait, it won't be an issue. If it will be a longer wait, yes, it will be an issue.

There's a component in the Forge that includes a "Wait" command, it uses Thread.Sleep so it should not be horrible on performance.

J.Ja