You could do the same thing by structuring your rules in a certain way. Have
an object of that defines the current context. i.e.
class Context {
String name;
}
The each rule matches on whether a given Context is asserted in working memory.
when
exists Context(name == "foo")
...
then
...
end
This can be as flexible as you please:
when
exists Context(name matches ".*startup.*")
...
then
...
end
--- On Tue, 9/2/08, Bagwell, Allen F <[EMAIL PROTECTED]> wrote:
> From: Bagwell, Allen F <[EMAIL PROTECTED]>
> Subject: RE: [rules-users] More than one agenda group for a rule?
> To: "Rules Users List" <[email protected]>
> Date: Tuesday, September 2, 2008, 1:20 PM
> Our rule engine software made by Talarian Corporation as
> part of their RTworks suite.
>
> The company was bought out by TIBCO several years ago, and
> the software is no longer supported. They essentially
> consigned it to the dust bin. And with a massive upgrade to
> our system, we had to find a rule engine alternative.
>
> The old RTworks rule engine concept of an AgendaGroup was
> called a "Context". You could assign a rule to as
> many contexts as you wanted. You just listed their names,
> separated by semi-colons, following the context keyword.
>
> There are always trade-offs when switching, but Drools has
> many more features we could only wish were present in the
> old software.
>
> -A
>
> ________________________________
> From: [EMAIL PROTECTED]
> [mailto:[EMAIL PROTECTED] On Behalf Of
> Mark Proctor
> Sent: Wednesday, August 27, 2008 2:06 PM
> To: Rules Users List
> Subject: Re: [rules-users] More than one agenda group for a
> rule?
>
> Bagwell, Allen F wrote:
>
> That's not so welcome news. Our old rule engine
> software had this ability. We'll find a work-around, but
> is this being considered in a later update to Drools? My
> thought is that rule should be like method: you really
> should only need to write it once.
>
>
> no plans to add this, especially as ruleflow is the
> preferred way to orchestration rules so that's where our
> focus is these days. Which is your old rule engine that
> supported this? I don't believe jess or clips allow a
> rule to live in multiple modules - which is what
> AgendaGroups is based on.
>
> Mark
>
> -A
>
>
> -----Original Message-----
> From:
> [EMAIL PROTECTED]<mailto:[EMAIL PROTECTED]>
> [mailto:[EMAIL PROTECTED] On Behalf Of
> Mark Proctor
> Sent: Wednesday, August 27, 2008 12:07 PM
> To: Rules Users List
> Subject: Re: [rules-users] More than one agenda group for a
> rule?
>
> Bagwell, Allen F wrote:
>
>
> I was wondering (hoping) that there is a way to put a rule
> into more
> than one agenda group?
>
> I've tried writing:
>
> rule "example"
> agenda-group "process x stuff"
> agenda-group "process y stuff"
> when
> (blah, blah, blah)
> then
> (blah, blah, blah)
> end
>
> But while the compiler has no problems with this it really
> only
> includes the rule in the last agenda-group listed.
>
>
> nope, not possible.
>
>
> Thanks,
> Allen
>
>
>
> ----------------------------------------------------------------------
> --
>
> _______________________________________________
> rules-users mailing list
> [email protected]<mailto:[email protected]>
> https://lists.jboss.org/mailman/listinfo/rules-users
>
>
>
>
> _______________________________________________
> rules-users mailing list
> [email protected]<mailto:[email protected]>
> https://lists.jboss.org/mailman/listinfo/rules-users
>
>
>
> _______________________________________________
> rules-users mailing list
> [email protected]<mailto:[email protected]>
> https://lists.jboss.org/mailman/listinfo/rules-users
>
>
>
> _______________________________________________
> rules-users mailing list
> [email protected]
> https://lists.jboss.org/mailman/listinfo/rules-users
_______________________________________________
rules-users mailing list
[email protected]
https://lists.jboss.org/mailman/listinfo/rules-users