Regarding your comment for DAO's in the WHEN clause. I'd say that's a
very strong anti-pattern. In general our approach has been to look for
the absence of the fact being inserted, and move the DAO call into the
THEN clause. I'm sure you're thinking, "what if my DAO doesn't return
anything?"
We have used a "BreadCrumb" fact to avoid this in the past. We had a
situation where there wasn't a direct loop (rule A triggering rule A)
but rather a trifecta of facts (Rule A triggers Rule B which trigger
Rule C which triggered Rule A).
To solve for this we created a simple "RuleBreadCrumb"
We've tested this behavior under load and there is a brief (duration of
about 1 - 1.5 seconds) uptick when the rulebase switch happens, but we
noticed consistent and rapid recovery.
I have not confirmed this but I believe what happens is a new
KnowledgeBase is built, and once it's build is complet
e: [rules-users] KnowledgeAgent doesn't load dsl files and
dslrfile from a change-set correctly - JIRA:JBRULES-2377 updated
I think it is related with
https://jira.jboss.org/jira/browse/JBRULES-2350
On Wed, Jan 27, 2010 at 1:20 AM, Pegram, Macon
wrote:
I have updated the JIRA ticket with more
I have updated the JIRA ticket with more detailed information. If this
issue is important to you, please vote up its importance so that we can
hopefully capture the attention of the development team.
You can find the JIRA ticket at:
https://jira.jboss.org/jira/browse/JBRULES-2377
Thanks!
Macon
I did my trace (which led to the comments below) on 5.1M1, but the I
noticed the problem originally on 5.0.1 so I don't believe there's any
version that will work for you at this time.
Macon
-Original Message-
From: rules-users-boun...@lists.jboss.org
[mailto:rules-users-boun...@lists.jbo
That's actually my ticket, and I've been hoping to get it resolved for
awhile now. I've posted to this mailing list as well as the actual
ticket but haven't heard responses from anyone.
I've recently done more research into the issue, and have some updated
information that needs to be attached
Yes...
We've used a combination of JUnit, and Easymock to test individual
rules. At a very high level, we do the following:
- In the static setupBeforeClass() method we construct a
KnowledgeBuilder, load any necessary rule files, and construct a
KnowledgeBase using the KnowledgeB
All,
I asked this question earlier this week, but didn't get a response. I
may have provided too much information, so let me distill it down to
this simple question
Can DSL/DSLR files be loaded and accessed as part of a KnowledgeBase
constructed using the KnowledgeAgent / changeset mo
To accomplish this is largely a "renaming" operation. They are
syntactically the same. I did a similar thing a few months ago and it
mostly involved renaming everything from RuleXXX to KnowledgeXXX.
From: rules-users-boun...@lists.jboss.org
[mailto:rules-u
All,
Are DSL and DSLR files supported by the KnowledgeAgent / Changeset code.
Here's the details of my test case:
I have a Changeset file I'm trying to load which looks like the
following:
There's a single DSL and a single DSLR file in this folder.
Assuming a proper classpath, the attached jar file runs from the
commandline.
java -cp test-case.jar TestDrive
I suspect your issue may stem from the setup code calling your rule
instead of the rules themselves. I've included source code in the jar
file, but I'll include it inline in this
Given the following rules (contrived example):
rule "Monetary 1"
when
Currency(typeID in (CurrencyConst.DOLLAR,
CurrencyConst.EURO, CurrencyConst.YEN))
then
insert(new Fact());
end
rule "Monetary 2"
when
Currency(typeID in (C
ot get any overhead at runtime because all the interpretation
happens at compilation, as you says
lucaz
El 22/10/2009, a las 11:28, Pegram, Macon escribió:
All,
Given the following rule:
rule "Add ABC123 Feature"
when
not MyFeature(testCD == &quo
All,
Given the following rule:
rule "Add ABC123 Feature"
when
not MyFeature(testCD == "ABC123")
UserRequest(someValue == "ABC123_FEATURE")
$eligible : FeatureEligible(testCD == "ABC123")
then
insert(new MyFeature($eligible));
libs inside the war.
2009/10/16 Pegram, Macon
I was asked how I deployed Guvnor on Weblogic 10.x. I believe the procedure
will be the same for both 9.x and 10.x...
You will have to make some changes to the WAR file.
1. Create a weblogic.xml file like the one below and put it in W
I was asked how I deployed Guvnor on Weblogic 10.x. I believe the
procedure will be the same for both 9.x and 10.x...
You will have to make some changes to the WAR file.
1. Create a weblogic.xml file like the one below and put it in WEB-INF\
http://www.bea.com/ns/weblogic/weblogic-w
ouldn't do me any good. Do you see why I'm having
trouble doing anything useful with the new API? In Drool 5, are you
supposed to approach this in a different way (not in an agenda
listener?)
Pegram, Macon wrote:
>
> The primary reason to move to the "Knowledge APIs" ap
The primary reason to move to the "Knowledge APIs" apart from what
you've already mentioned is that they help to bring together the newest
features of Drools. In a single KnowledgeBase you can now have not only
rules, but Flows, and Complex Event Processing.
As to tracking activity on the agen
What you need to do is implement your own SystemEventListener
implementation to override the default one. Before you do anything
meaningful with Drools, you'll want to override the default by calling:
SystemEventListenerFactory.setSystemEventListener();
Here's a basic no-op listener:
There are a host of other options. You just need some way to make your
resources available via a URL of some type. The Rules resources could
just as easily be deployed in a web server, FTP or in Guvnor.
-Original Message-
From: rules-users-boun...@lists.jboss.org
[mailto:rules-users-bou
It's actually not terribly difficult to pull off. The key things you'll
want to do are:
- Initialize and start the ResourceChangeNotifierService.
- Initialize but DO NOT start the ResourceChangeScanner
service.
- Determine how you're going to trigger your rescan.
-
Chris,
I believe in one of your earlier emails you said that there were several
MyDataObject instances in working memory. (I seem to recall you saying there
were 3).
When you do an "update" (or a retract, or insert) you're notifying Drools that
the state of it's working memory has changed.
users-boun...@lists.jboss.org
[mailto:rules-users-boun...@lists.jboss.org] On Behalf Of Mel Odeus
Sent: Wednesday, September 23, 2009 4:23 PM
To: Rules Users List
Subject: Re: [rules-users] Support on Weblogic?
May i ask what kind of application you use drools for?
2009/9/23 Pegram, Macon
I am
n Wed, Sep 23, 2009 at 3:52 PM, Pegram, Macon
wrote:
The short answer is "YES". I have had success running both Guvnor and a
Drools application on Weblogic.
Guvnor took a little configuration, but it will run on Weblogic. As for
straight Drools... It's just an API, so there
The short answer is "YES". I have had success running both Guvnor and a
Drools application on Weblogic.
Guvnor took a little configuration, but it will run on Weblogic. As for
straight Drools... It's just an API, so there's nothing special about it
that should present a problem for any type of
I had been wondering the same thing, so I finally decided to take a look @ the
Drools source.
These log message are provided by the SystemEventListener interface. There's
no direct way (that I can see) in the code to set and enforce an actual "log
level" (Someone please tell me I'm wrong h
p ($item : this[$upc] != null) from $stock
Item (onSale == true) from $item
then
// Buy stuff
End
-Original Message-
From: rules-users-boun...@lists.jboss.org
[mailto:rules-users-boun...@lists.jboss.org] On Behalf Of Pegram, Macon
Sent: Friday, August 21, 2009 2:15 PM
To: Rule
upc : upc != null)
Item(onSale == true, upc == $upc)
then
Buy stuff
end
--- On Fri, 8/21/09, Pegram, Macon wrote:
> From: Pegram, Macon
> Subject: [rules-users] Looking for attributes on an element obtained from a
> Map
> To: &quo
I was hoping the recent conversation regarding maps this would come up, but so
far it hasn't.
How do I check for conditions on the element referenced in the map?
So given the following scenario:
SearchItem is the item being searched for by the user
Item has the attributes: UPC
se, but I
think that did it. If it reverts back to the old problem, I will try
your
brand new runtime folder suggestion then, Macon.
Thanks again for everyone's help.
Edson Tirelli-3 wrote:
>
>Cool, living and learning! Thanks,
>
>Edson
>
> 2009/8/20 Pegram,
There's another way.
In the Eclipse Plugin Preferences (Eclipse -> Preferences -> Drools ->
Installed Drools Runtime) you point to the location of the Drools
runtime you want to use. If you swap out the MVEL file at the location
of your Drools Runtime it should pick up the right version of
According to MVEL they've added a convenience for checking the
"emptiness" of a value (see: http://mvel.codehaus.org/Value+Tests )
In MVEL you'd simply write: myMap == empty
This seemed like a MUCH cleaner way to write some of the LHS of the
rules, so I thought I'd try it out.
Given
33 matches
Mail list logo