[rules-users] Executing rules actions asynchronously

Carlos Vieira cvieira at telbit.pt
Wed Oct 31 11:46:03 EDT 2007


Hi Spyros,

Well, i tried launching a thread for each Web Service call, and it works
ok... but i need to use the return of Web Service in the right side of
the rule to, for example, insert another fact... so, i have to wait for
the execution...
What i want is to execute a set of actions (in the right side of a rule)
in a different thread.

But i will look for JMS to see capabilities, and to see if fit my purposes.

Thx for the help

Regards
    Carlos V.

Spyros Sakellariou wrote:
> Hi Carlos,
>
> I don't know if this is possible in drools but an alternative is instead of
> calling web services synchronously from drools, to call them asynchronously
> using JMS.  That way you don't have to wait for each service to return. 
>
> Spyros
>
>
> -----Original Message-----
> From: rules-users-bounces at lists.jboss.org
> [mailto:rules-users-bounces at lists.jboss.org] On Behalf Of Carlos Vieira
> Sent: Wednesday, October 31, 2007 5:02 PM
> To: rules-users at lists.jboss.org
> Subject: [rules-users] Executing rules actions asynchronously
>
> Hi,
>
> I'm facing a situation, that maybe some of you just solved out in the past.
> I need that the execution of matched rules ( Activations that are
> already in the Agenda, referencing those rules) is done asynchronously.
>
> In more detail, i need that each set of actions owned by two or more
> rules, runs in a separated thread.
> The problem here is that i need to invoke external Web Services in rule
> actions.... well, some Web Services may take too long to return
> something, what makes the other actions of other rules to wait for
> this... what is not an expected behavior...
>
> Any one knows if jboss rules already support this kind of approach? If
> not, any one has passed through this?
> Accessing to the mechanism of firing individual rules seems to be the
> best way, overriding a couple of classes..... how can i fire just one
> rule with jboss rules? is this the best choice?
>
> Well, if anyone has any idea, it would be nice
>
> Regards
>     Carlos V.
>
> _______________________________________________
> rules-users mailing list
> rules-users at lists.jboss.org
> https://lists.jboss.org/mailman/listinfo/rules-users
>   

-------------- next part --------------
A non-text attachment was scrubbed...
Name: cvieira.vcf
Type: text/x-vcard
Size: 167 bytes
Desc: not available
Url : http://lists.jboss.org/pipermail/rules-users/attachments/20071031/f5f52e64/attachment.vcf 


More information about the rules-users mailing list