Drools 3.0 and 4.0 XSD schema!
by vamshidhar reddy chitti
Hello Everybody,
cud anyone of u say me , where can i find the xsd for Drools 3.0 and 4.0 versions.
tnx in advance
Vamshi
---------------------------------
Beginnen Sie den Tag mit den neuesten Nachrichten. Machen Sie Yahoo! zu Ihrer Startseite!
17 years, 5 months
how to use StatelessSession's asyncExecute
by 邵俊军
hi,all
I'm a newer at DROOLS. who can give me some example about asyncExecute.
StatelessSession JAVADOC told me" This will assert the object in the
background. This is 'send and forget' execution."
but ,when to deal with it? and what should I do
any example code and advice will be popular
thanks
Richard.shao
17 years, 5 months
JBoss Drools BRMS Standalone
by Fernando Meyer
Now you can download BRMS standalone version, this distribution comes
with a built-in Tomcat 5.5.20 web server and the insurance example as
demo repository, so it runs out the box. If you want to test BRMS and
don't have enough time to deploy, just follow to downloads page
http://labs.jboss.com/drools/downloads
Brief install guide
1. Install a Java Development Kit (JDK) from http://java.sun.com/
javase/downloads/index.jsp (avoid JREs, Java EEs, Netbeans, etc. on
that page - you just want a JDK).
2. Set the JAVA_HOME variable to where you installed Java. Windows
installers may do this for you.
3. Run bin/startup.sh (*nix) or bin\startup.bat (Windows). Check that
there are no errors on the console. See below for troubleshooting
advice.
4. Point your browser at http://localhost/ You should see brms's
login box.
Problem
A common startup problem is when another program has claimed port 80,
which BRMS is configured to run on by default. To avoid this port
conflict, BRMS's port can be changed in conf/server.xml.
If you have installation (or other) problems, ask on the mailing
lists or irc.
http://labs.jboss.com/drools/irc.html
Fernando Meyer http://fmeyer.org
fmcamargo(a)gmail.com
PGP: 0xD804DDFB
17 years, 5 months
Production rules vs. ECA Rules
by qmars765@gmx.de
Dear List,
In JBoss Rules documentation it is written that they can be used for production rules. But I frequently read also in other sources about ECA rules.
Is there any significant difference between “ECA” and “Production” Rules?
If yes, what?
Thanks in advance for your feedback and best Regards,
Kioumars
--
GMX FreeMail: 1 GB Postfach, 5 E-Mail-Adressen, 10 Free SMS.
Alle Infos und kostenlose Anmeldung: http://www.gmx.net/de/go/freemail
17 years, 5 months
class Cast Exception when using OR (||) - Bug?
by Arjun Dhar
When I define a rule:
When
cntct:Contact (initialized==true)
exr:Relation( contact==cntct,
active:active==$1,
relationName=="Old")
Then
contact.getStatus().setStatus(true);
contact.getStatus().addToReasonTrace(drools.getRule().getName());
end
..The bove works.
BUT, when I do the following:
When
cntct:Contact (initialized==true)
exr:Relation( contact==cntct,
active:active==$1,
relationName=="Old")
|| Relation( contact==cntct,
active:active==$1,
relationName==null)
Then
contact.getStatus().setStatus(true);
contact.getStatus().addToReasonTrace(drools.getRule().getName());
end
... The script compiles anda stateless Session is created successfully, but at
runtime/execution it fails with the exception:
java.lang.ClassCastException: com.arjun.brms.businessObjects.Contact
org.drools.rule.EvalCondition.isAllowed(EvalCondition.java:75)
org.drools.reteoo.EvalConditionNode.assertTuple(EvalConditionNode.java:141)
org.drools.reteoo.SingleTupleSinkAdapter.propagateAssertTuple
(SingleTupleSinkAdapter.java:20)
org.drools.reteoo.JoinNode.assertTuple(JoinNode.java:120)
org.drools.reteoo.SingleTupleSinkAdapter.propagateAssertTuple
(SingleTupleSinkAdapter.java:20)
org.drools.reteoo.JoinNode.assertObject(JoinNode.java:162)
org.drools.reteoo.CompositeObjectSinkAdapter.propagateAssertObject
(CompositeObjectSinkAdapter.java:317)
org.drools.reteoo.AlphaNode.assertObject(AlphaNode.java:130)
org.drools.reteoo.CompositeObjectSinkAdapter.propagateAssertObject
(CompositeObjectSinkAdapter.java:308)
org.drools.reteoo.AlphaNode.assertObject(AlphaNode.java:130)
org.drools.reteoo.CompositeObjectSinkAdapter.propagateAssertObject
(CompositeObjectSinkAdapter.java:308)
org.drools.reteoo.ObjectTypeNode.assertObject(ObjectTypeNode.java:168)
org.drools.reteoo.Rete.assertObject(Rete.java:168)
org.drools.reteoo.ReteooRuleBase.assertObject(ReteooRuleBase.java:190)
org.drools.reteoo.ReteooWorkingMemory.doInsert(ReteooWorkingMemory.java:70)
org.drools.common.AbstractWorkingMemory.insert(AbstractWorkingMemory.java:848)
org.drools.common.AbstractWorkingMemory.insert(AbstractWorkingMemory.java:822)
org.drools.common.AbstractWorkingMemory.insert(AbstractWorkingMemory.java:623)
Class diagram:
~~~~~~~~~~~~~~~~
Contact<-- bi-directional association -->List<Relation>
Please advise! is this a bug?
thanks,
Arjun
17 years, 5 months
Bug: Shadow facts
by Arjun Dhar
Hi,
I have an Object 'Configuration'
public class BooleanConfiguration {
String paramName;
Boolean value;
Client client;
}
I asserted this object and the rule was not executing as I expected.
I put a break point in the object, and found that it set it correctly but
whenenver the rule engine called the get method the vaue of the object was null.
I traced this the place where it creates shadows in Rete.java.
I had observed a similar behaviour in version 3.1 or 3.6 (if there was a 3.6).
it was more prolific then. I have over 50 objects, only this one is giving a
problem.
I made the class 'final' (This prevents a shadow from being created), and voila
my rule worked as expected.
Note: None of the otehr objects needed a final, but had comeplex associations.
But this particular object does not run, unless declared final.
The fact that i have to use 'final' for it to work, seals it for me as a bug.
thanks,
Arjun
17 years, 5 months
fireAllRules fire an exception !
by hypnosat7
Hi,
I try to execute this code :
session.startProcess(ruleFlowId);
session.insert(fact);
session.fireAllRules();
But I have a NullPointerEception :
java.lang.NullPointerException
at mipih.Rule_Correction_acte_0.consequence(Rule_Correction_acte_0.java:15)
at
mipih.Rule_Correction_acte_0ConsequenceInvoker.evaluate(Rule_Correction_acte_0ConsequenceInvoker.java:23)
at org.drools.common.DefaultAgenda.fireActivation(DefaultAgenda.java:545)
at org.drools.common.DefaultAgenda.fireNextItem(DefaultAgenda.java:509)
at
org.drools.common.AbstractWorkingMemory.fireAllRules(AbstractWorkingMemory.java:430)
at
org.drools.common.AbstractWorkingMemory.fireAllRules(AbstractWorkingMemory.java:392)
Any help pls
--
View this message in context: http://www.nabble.com/fireAllRules-fire-an-exception-%21-tf4169266.html#a...
Sent from the drools - user mailing list archive at Nabble.com.
17 years, 5 months
Does the Rete Graph recognize associations independently?
by Arjun Dhar
Hi,
one doubt I've had while writing DRL scripts and also with others is:
A {
B b
C c
D d
};
If The rules are to be Written over A, B, C
Then should one assert B, C & D also? ---> Answer yes!
Ok, now that we've asserted them, in the Rule if one uses:
A.b; does the Rete graph recognize it as a node of A or B?
I suspect it is 'A'
Hence...
I take a safe approach and write rules on B,C independently but then ensure
those objects are reverse associated with A. This increases the risk of objects
not being released for GC (depends on JVM) if not nullified (and breaking the
circular associations).
So whats the best approach in designing objects for the Engine?
Thanks,
Arjun
17 years, 5 months
accumulate over multiple types
by Geoffrey De Smet
I 'd like to get the number of queens which have the same y.
I used to do this with a query:
query "multipleQueensHorizontal"
Queen($id : id, $y : y);
Queen(id > $id, y == $y);
end
And then ask the size() of it.
But now I should be able to do this with the accumulate function:
$multipleQueensHorizontal : Integer()
from accumulate(
$q1 : Queen($id : id, $y : y);
Queen(id > $id, y == $y);
, count($q1)
);
However, I get a parsing error on it:
Caused by: org.drools.rule.InvalidRulePackage: [31,37]: unknown:31:37
Unexpected token ';'[33,6]: unknown:33:6 mismatched token:
[@123,814:814=',',<12>,33:6]; expecting type THEN
Apparently the ; in of "$q1 : Queen($id : id, $y : y);" is inacceptable?
--
With kind regards,
Geoffrey De Smet
17 years, 5 months