After some more experimenting I found out something interesting: In the <process> of my deploy.xml <in-memory> was set to "true", which apparently caused the sequential execution. When setting it to "false" the invokes are executed concurrently !!!
Is this a known issue that concurrency is not possible with <in-memory> set to "true" ? In addition when using <in-memory> set to "true" there must be some kind of timeout. I set the runtime of my webservice to 2 minutes. The second call to the webservice was executed exactly after 1 minute. So it gives you the impression that the second call is concurrent wioth a delay, but I assume that the first invoke is aborted (in the engine) and the 2nd call is therefore in sequence. Bye, Daniel > -----Ursprüngliche Nachricht----- > Von: Alex Boisvert [mailto:[email protected]] > Gesendet: Freitag, 27. März 2009 16:11 > An: [email protected] > Betreff: Re: Problem with flow and extension activities > > How long are your invokes? Sub-second or greater than a few seconds? > I > suggest you try for yourself with invokes that take more than a few > seconds. > > I'd be happy to review the evidence that supports your proof. :) > > alex > > > On Fri, Mar 27, 2009 at 8:06 AM, <[email protected]> wrote: > > > Hi Alex, > > > > as far I understand your answer you are saying that the two invokes > from my > > example should be executed concurrently. > > My tests however prove that both are executed in sequence. > > > > I've read the Jacob tutorial but found it not really helpful to my > problem. > > My use case is really simple: > > I want to call two webservices (or extension activities), each > executing a > > search (running few seconds). In order to reduce runtime I want them > to be > > called concurrently, so that the runtime is MAX(T1, T2). At the > moment the > > runtime is T1+T2. > > > > Has no one else had a similar use case ? > > > > Bye, > > Daniel > > > > > -----Ursprüngliche Nachricht----- > > > Von: Alex Boisvert [mailto:[email protected]] > > > Gesendet: Dienstag, 24. März 2009 14:55 > > > An: [email protected] > > > Betreff: Re: Problem with flow and extension activities > > > > > > You may want to go through our Jacob tutorial to understand the > > > concurrency > > > semantics, > > > http://ode.apache.org/jacob.html > > > > > > Essentially, inside the engine all process instances operations are > > > serialized (through Jacob and the instance lock) to avoid > concurrency > > > issues. Activities that may block or take a long time are > designed > > > in > > > such a way that they do not block inside the engine, instead they > > > register a > > > channel and use it for callback when the asynchronous > response/event > > > occurs. > > > > > > The invoke activity is a good example of that. Only one invoke > will > > > be > > > initiated at once, although multiple invokes can be pending and > > > executed > > > concurrently. So in effect, the serialization only applies to the > > > engine > > > reaching out to the integration layer and requesting to perform an > > > invoke. The invokes are handled concurrency by the integration > layer > > > in a > > > different thread. > > > > > > In your case, you'd see something like, > > > > > > [Thread 1: operations are serialized] > > > T1 start flow > > > T1 start invoke 1 > > > T1 start invoke 2 > > > T1 commit > > > > > > [Thread 2 and 3: invokes happen concurrently] > > > T2 perform invoke 2 > > > T3 perform invoke 2 > > > > > > T2 receives response, updates message exchange > > > T2 enters the engine, obtains instance lock > > > T2 updates instance state > > > T2 commit > > > > > > T3 receives response, updates message exchange > > > T3 enters the engine, obtains instance lock > > > T3 updates instance state > > > T3 if there's something else to do after the flow, do it > > > T3 ... runs until some activity require async response/event > > > T3 commit > > > > > > Hope this helps, > > > alex > > > > > > On Tue, Mar 24, 2009 at 3:43 AM, <[email protected]> wrote: > > > > > > > Hi all, > > > > > > > > the problem seems not to be related to extension activities only. > I > > > did a > > > > test invoking webservices: > > > > > > > > ... > > > > <flow> > > > > <invoke name="sayHi" partnerLink="HelloWorld" > > > > portType="hw:HelloWorld" operation="sayHi" inputVariable="hi" > > > > outputVariable="response"> > > > > </invoke> > > > > > > > > <invoke name="sayHo" partnerLink="HelloWorld" > > > > portType="hw:HelloWorld" operation="sayHi" inputVariable="ho" > > > > outputVariable="response2"> > > > > </invoke> > > > > </flow> > > > > ... > > > > > > > > The two invoke elements are executed in random order. However > the > > > second > > > > invoke call is not executed until the first invoke returns. It > seems > > > that > > > > the same Thread is used to execute the invoke calls. We use the > > > integrated > > > > SimpleScheduler. > > > > > > > > Anyone any ideas what's going wrong here ? > > > > > > > > Bye, > > > > Daniel > > > > > > > > > > > > > -----Ursprüngliche Nachricht----- > > > > > Von: [email protected] > [mailto:[email protected]] > > > > > Gesendet: Montag, 23. März 2009 18:32 > > > > > An: [email protected] > > > > > Betreff: Problem with flow and extension activities > > > > > > > > > > Hi all, > > > > > > > > > > in the SMILA project we are using extension activities to > execute > > > > java > > > > > code in BPEL. This works without any problems. > > > > > > > > > > Now I tried to execute two extension activities concurrently > within > > > a > > > > > <flow> (see attachment). The execution still works, but the > > > extension > > > > > activities are not executed concurrently but in sequence. I > > > debugged > > > > > and > > > > > found that the extension activities are executed by the same > > > thread. > > > > > > > > > > We currently use ODE 2.0. > > > > > > > > > > Is there any error on my bpel workflow ? Or is there a > ThreadPool > > > > > that's > > > > > size needs to be increased ? Or some other configuration option > ? > > > > > > > > > > Thanks for your help! > > > > > > > > > > Bye, > > > > > Daniel > > > > > > > > > >
