[rules-users] agenda-groups

Wolfgang Laun wolfgang.laun at gmail.com
Tue May 8 08:56:30 EDT 2012


Periodically calling fireAllRules() in a thread running parallel to the one(s)
doing insertions doesn't make sense to me.

-W

On 08/05/2012, gboro54 <gboro54 at gmail.com> wrote:
> I am not currently using agenda-groups. I believe my issue right now is one
> of thread safety. A little background: I currently have a thread pulling
> messages from a database running on the main thread. In several other
> threads, I have drools session being fired every so often. It appears that
> there may be a some type of deadlock caused by invoking fireAllRules on one
> thread, while another is trying to insert. I am working through right now
> to
> debug the issue. Has anyone else experienced this issue?
>
>
> Vincent Legendre wrote
>>
>>> I am having an issue where I have a catch all
>>> retraction rule setup as the lowest salience.
>>
>> Not sure to understand that (note that I am not english native ...)
>>
>>> I see activations created for the facts but they are never fired.  Any
>>> thoughts on why this may happen?
>>
>> Send some rules. Activations never fired is just too vague to have a
>> single answer.
>> If you use agenda groups, may be that the group is simply not on focus ...
>>
>> Add a first rule that set the focus, or set auto-focus for all your "low
>> salience" rules, or don't set agenda group for them (their group will be
>> the MAIN group).
>>
>>> The session is run on a separate thread with fireAllRules called every
>>> 1/2
>>> second. I have tried syncronizing inserts on the session so that thread
>>> would not be in the middle of firing when new facts come in but that
>>> does
>>> not seem to do anything....
>>
>> Why not using fireUntilHalt instead ?
>> Run your session.fireUntilHalt in a separate thread, and insert things in
>> that session.
>> insert (or update or retract) will wake up the session.
>>
>> Of course, one day, you have to call halt() on your session to get out.
>> _______________________________________________
>> rules-users mailing list
>> rules-users at .jboss
>> https://lists.jboss.org/mailman/listinfo/rules-users
>>
>
>
> --
> View this message in context:
> http://drools.46999.n3.nabble.com/agenda-groups-tp3968541p3971147.html
> Sent from the Drools: User forum mailing list archive at Nabble.com.
> _______________________________________________
> rules-users mailing list
> rules-users at lists.jboss.org
> https://lists.jboss.org/mailman/listinfo/rules-users
>


More information about the rules-users mailing list