|
List Info
Thread: Agenda group doesn't stay set?
|
|
| Agenda group doesn't stay set? |
  United States |
2008-04-28 13:49:24 |
|
|
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 sandia.gov
phone: 505/284-4517
fax: 505/ 844-7886
There is no monument dedicated to the memory of a committee. -- Lester J. Pourciau
|
| Re: Agenda group doesn't stay set? |

|
2008-04-28 14:13:30 |
|
Bagwell, Allen F wrote:
ES02SNLNT.srn.sandia.gov"
type="cite">
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"?
No not quite. It's a stack. when you setFocus, you are assigning that
group to the top of the stack. when you call fireAllRules() it iterates
through that stack, firing all the rules in the top one, popping it,
firing all the rules in the next group until it reaches MAIN (which is
always at the bottom of the stack) and returns when that is empty.
ES02SNLNT.srn.sandia.gov"
type="cite">
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
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
lists.jboss.org">rules-users lists.jboss.org
https://lists.jboss.org/mailman/listinfo/rules-users
|
| Re: Agenda group doesn't stay set? |
  Belgium |
2008-04-28 15:39:11 |
|
|
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 -----
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 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 lists.jboss.org https://lists.jboss.org/mailman/listinfo/rules-users
|
| RE: Agenda group doesn't stay set? |
  United States |
2008-04-29 08:26:06 |
|
|
Actually between yours and Mark's responses this is very
useful.
Thanks so much!
-A
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 -----
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 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 lists.jboss.org https://lists.jboss.org/mailman/listinfo/rules-users
|
[1-4]
|
|
|
about | contact Other archives ( Real Estate discussion Medical topics )
|