[rules-users] Agenda group doesn't stay set?

Bagwell, Allen F afbagwe at sandia.gov
Tue Apr 29 09:26:06 EDT 2008


Actually between yours and Mark's responses this is very useful.

Thanks so much!

-A

________________________________
From: rules-users-bounces at lists.jboss.org [mailto:rules-users-bounces at lists.jboss.org] On Behalf Of Kris Verlaenen
Sent: Monday, April 28, 2008 2:39 PM
To: Rules Users List
Subject: Re: [rules-users] Agenda group doesn't stay set?

Ruleflow groups allow you to group rules together and rules inside a ruleflow group only execute when the ruleflow-group is active.  You can use ruleflow groups inside a ruleflow but they can be used outside ruleflows as well.  You could manually activate and deactivate ruleflow groups using workingMemory.getAgenda().[de]activateRuleflowGroup(name).  You can decide whether a ruleflow group should auto-deactivate if it contains no more activations or not.

I guess it's not exactly what you are looking for but it might be useful.

Kris

----- Original Message -----
From: Bagwell, Allen F<mailto:afbagwe at sandia.gov>
To: Rules Users List<mailto:rules-users at lists.jboss.org>
Sent: Monday, April 28, 2008 8:49 PM
Subject: [rules-users] Agenda group doesn't stay set?


I'm writing rules in different agenda groups and witnessing something curious.

Right now when I put my fireAllRules() in a callback that is triggered every couple of seconds I have to do this:

Callback executes on receipt of a heartbeat message:
{
   session.setFocus("my_agenda");
   session.fireAllRules();
}

What I would prefer to do is this is set my agenda group external to the callback so I have the liberty to simply use the callback to execute rules on whatever agenda I give focus to elsewhere:

Callback executes on receipt of a heartbeat message:
{
   session.fireAllRules();
}

But this doesn't work.

My understanding is that unless you explicitly set the agenda-group each time, then fireAllRules() resets your agenda group to "MAIN"?

Is there a way to get the session to retain focus on the agenda group I specify until I see fit to change it?

Allen F. Bagwell
e-mail:  afbagwe at sandia.gov
phone:  505/284-4517
fax:  505/ 844-7886

There is no monument dedicated to the memory of a committee. -- Lester J. Pourciau




________________________________

_______________________________________________
rules-users mailing list
rules-users at lists.jboss.org
https://lists.jboss.org/mailman/listinfo/rules-users
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.jboss.org/pipermail/rules-users/attachments/20080429/b0c35f27/attachment.html 


More information about the rules-users mailing list