[rules-users] Rule processing blocking when I/O is involved in a BPMN 2.0 Task

Wolfgang Laun wolfgang.laun at gmail.com
Wed Feb 8 12:32:48 EST 2012


When a rule fires in the thread running your session and triggers the
Web service, you should dispatch a ServiceCall object into a queue.
Other threads should then handle the pending services. Use a thread
pool for servicing the queue.

-W



On 08/02/2012, Alberto R. Galdo <argaldo at gmail.com> wrote:
> Hi,
>
>     Our setup consists on some BPMN process being executed when a rule
> fires. Our process has a node of type Task for which a handler is available
> at the knowledge session. Our handler invokes a web service and waits (
> blocks ) for the response before completing the task and letting the BPMN
> process continue.
>
>     Well, we've inserted a hundred facts in the session that trigger the
> rule that triggers the BPMN process that triggers the web service call ...
> what we are seeing ( using the statistics gathered using JMX and our own
> experience ) is that 100 rule activations are created and only one fires,
> the rest, are "waiting" for the web service to respond. When the web
> service responds then another rule fires, and so on. For an iliterate point
> of view, seems that there's only one thread for it all, drools expert,
> fusion and flow ...
>
>     Our session is stateful and we this is how we manage our session:
>
>            new Thread(new Runnable()       {
>                 public void run() {
>                     session.fireUntilHalt();
>                 }
>             }).start();
>
>
>      How do we get the rules to fire in parallel? Is there any better way
> to get this done ( to get the processes executed in parallel and not
> blocking the execution of the rules)?
>
> Greets,
>
>
> Alberto R. Galdo
> argaldo at gmail.com
>



More information about the rules-users mailing list