Basic Questions
by Zully Yineth Romero Albarracin
Hello,
I've been reading about Jboss Drools and I have questions to do.
1. I still don't undertand why in the download section (about jboss rules)
exist Jboss Rules and Drools. What's the difference?
2. When I downloaded the examples, I found files like .drl (drools files,
they allow to write rules using a meta language), .dsl (I don't know how to
use them) and .rule files. What's the difference?
3. How can I validate the rules from xml files?
Thank you so much your help.
17 years, 8 months
fit-for-rules documentation
by Isabelle Hupont
Hi,
I'm working on a JBoss-Rules-based decision project and I would like to
create a scenario manager in order to make “what if” scenario testing. I
have seen that Fit-to-rules would be of great interest for my work but,
unfortunately, I didn't found much information about it. Could you please
tell me were to find documentation about libraries, implementation, etc.?
Thanks
--
View this message in context: http://www.nabble.com/fit-for-rules-documentation-tf3570519.html#a9975295
Sent from the drools - user mailing list archive at Nabble.com.
17 years, 8 months
Object parameter
by fakhfakh ismail
Hello,
First sorry for my bad english
I have a problem when I execute this code
rule "userrole"
when
user1: BnUserValue(name : name, creationDate : creationDate)
and
ActiviteOut : BnNodeValue( BnRole: BnRole )
and
lien: BnEdgeValue(id : id)
then
System.out.println("oui ça marche");
end
BnRole is attribut type ; BnRoleValue (class declared)
when I remote this attribue(BnRole) this code work
all the attribut which I set with type different to classique type (String, Integer, Date, List,... ) implique an error execution I don't know why I import all my class and I'm sure that class haven't error
the error is
the error is
org.drools.rule.InvalidRulePackage: Unable to create Field Extractor for 'BnRole'
class BnRolevalue et Bn Value is in the joint piece
please help me it's very urgent
thank you for your help
Best regards
Ismail
---------------------------------
Découvrez une nouvelle façon d'obtenir des réponses à toutes vos questions ! Profitez des connaissances, des opinions et des expériences des internautes sur Yahoo! Questions/Réponses.
17 years, 8 months
object parameter object
by fakhfakh ismail
Hello,
First sorry for my bad english
I have a problem when I execute this code
rule "userrole"
when
user1: BnUserValue(name : name, creationDate : creationDate)
and
ActiviteOut : BnNodeValue( BnRole: BnRole )
and
lien: BnEdgeValue(id : id)
then
System.out.println("oui ça marche");
end
BnRole is attribut type ; BnRoleValue (class declared)
when I remote this attribue(BnRole) this code work
all the attribut which I set with type different to classique type (String, Integer, Date, List,... ) implique an error execution I don't know why I import all my class and I'm sure that class haven't error
the error is
the error is
org.drools.rule.InvalidRulePackage: Unable to create Field Extractor for 'BnRole'
thank you for your help
Best regards
Ismail
---------------------------------
Découvrez une nouvelle façon d'obtenir des réponses à toutes vos questions ! Profitez des connaissances, des opinions et des expériences des internautes sur Yahoo! Questions/Réponses.
17 years, 8 months
Problems with int and Integer inside Return Value and Predicate Expression
by Felipe Piccolini
The Solicitud object has sumaMontoLCG and sumaMontoGarantia atts as
int (primitives).
Im using 3.0.6 and java 1.5
I have this simple rule:
rule "montos maximos y minimos"
salience 888
when
a: Actor(tipo :tipoActor == Actor.JefeOficina, max: limiteMaximo,
min: limiteMinimo)
s: Solicitud( sumaLCG: sumaMontoLCG < max, sumaGTIA:
sumaMontoGarantia -> ( (sumaLCG.intValue() - sumaGTIA.intValue()) <
min.intValue()) )
then
System.out.println("Suma LCG:"+sumaLCG);
System.out.println("Actor lim max:"+max);
System.out.println("Actor tipo:"+tipo);
end
Fire the rule shows me this error:
org.drools.RuntimeDroolsException:
java.lang.ArrayIndexOutOfBoundsException: 1
at org.drools.rule.PredicateConstraint.isAllowed(Unknown Source)
at org.drools.common.BetaNodeBinder.isAllowed(Unknown Source)
at org.drools.reteoo.TupleSource.attemptJoin(Unknown Source)
at org.drools.reteoo.JoinNode.assertTuple(Unknown Source)
at org.drools.reteoo.LeftInputAdapterNode.createAndAssertTuple
(Unknown Source)
at org.drools.reteoo.LeftInputAdapterNode.assertObject(Unknown Source)
at org.drools.reteoo.ObjectSource.propagateAssertObject(Unknown Source)
at org.drools.reteoo.AlphaNode.assertObject(Unknown Source)
at org.drools.reteoo.ObjectSource.propagateAssertObject(Unknown Source)
at org.drools.reteoo.ObjectTypeNode.assertObject(Unknown Source)
at org.drools.reteoo.Rete.assertObject(Unknown Source)
at org.drools.reteoo.ReteooRuleBase.assertObject(Unknown Source)
at org.drools.reteoo.ReteooWorkingMemory.doAssertObject(Unknown Source)
at org.drools.common.AbstractWorkingMemory.assertObject(Unknown Source)
at org.drools.common.AbstractWorkingMemory.assertObject(Unknown Source)
at
cl.bluesoft.jbrules.loader.solcred.SolcredRulesPoC.fireRulesSOLCRED
(SolcredRulesPoC.java:85)
at cl.bluesoft.jbrules.loader.solcred.SolcredRulesPoC.main
(SolcredRulesPoC.java:40)
Caused by: java.lang.ArrayIndexOutOfBoundsException: 1
at org.drools.reteoo.FactHandleList.get(Unknown Source)
at org.drools.reteoo.TupleKey.get(Unknown Source)
at org.drools.reteoo.ReteTuple.get(Unknown Source)
at org.drools.reteoo.ReteTuple.get(Unknown Source)
at
cl.bluesoft.jbrules.rules.solcred.Rule_montos_maximos_y_minimos_0Predica
te0Invoker.evaluate
(Rule_montos_maximos_y_minimos_0Predicate0Invoker.java:14)
... 17 more
When I change the column to:
s: Solicitud( sumaLCG: sumaMontoLCG < max, sumaGTIA:
sumaMontoGarantia -> ( (sumaLCG - sumaGTIA) < min) )
its shows this error:
org.drools.rule.InvalidRulePackage: Rule Compilation error The
operator - is undefined for the argument type(s) java.lang.Integer,
java.lang.Integer
at org.drools.rule.Package.checkValidity(Unknown Source)
at org.drools.common.AbstractRuleBase.addPackage(Unknown Source)
at cl.bluesoft.jbrules.loader.solcred.SolcredRulesPoC.readRule
(SolcredRulesPoC.java:60)
at cl.bluesoft.jbrules.loader.solcred.SolcredRulesPoC.main
(SolcredRulesPoC.java:36)
This happens in a predicate or in a value expression, so I cant use
this formula... What is wrong?
Thx.
Felipe Piccolini M.
felipe.piccolini(a)bluesoft.cl
17 years, 8 months
object problem
by fakhfakh ismail
Hello,
First sorry for my bad english
I have a problem when I execute this code
rule "userrole"
when
user1: BnUserValue(name : name, creationDate : creationDate)
and
ActiviteOut : BnNodeValue( BnRole: BnRole )
and
lien: BnEdgeValue(id : id)
then
System.out.println("oui ça marche");
end
BnRole is attribut type ; BnRoleValue (class declared)
when I remote this attribue(BnRole) this code work
all the attribut which I set with type different to classique type (String, Integer, Date, List,... ) implique an error execution I don't know why I import all my class and I'm sure that class haven't error
thank you for your help
Best regards
Ismail
---------------------------------
Découvrez une nouvelle façon d'obtenir des réponses à toutes vos questions ! Profitez des connaissances, des opinions et des expériences des internautes sur Yahoo! Questions/Réponses.
17 years, 8 months
Object in parameter
by fakhfakh ismail
Hello,
First sorry for my bad English
when I execute this rule an error is affiched.
when
user1: BnUserValue(name : name)
and
ActiviteOut : BnNodeValue()
and
lien: BnEdgeValue(id : id, OutBnNode : OutBnNode)
then
System.out.println("oui ça marche");
end
the problem is when I remove the object OutBnNode : OutBnNode the parameter there's not error I want to is this error exist because I can't set parameter with type not String, Integer, Date, ....
Best regard
---------------------------------
Découvrez une nouvelle façon d'obtenir des réponses à toutes vos questions ! Profitez des connaissances, des opinions et des expériences des internautes sur Yahoo! Questions/Réponses.
17 years, 8 months
Add/remove objects from working memory are very CPU intensive
by Einat Idan
Hi,
I encountered a serious performance problem using Jboss Rules 3.0.1. The
process was executed on a pretty strong machine - a DL350 4 cpu RedHat
machine. The process was using about 100% CPU and I used a profiler to see
what's going on:
My application adds/removes objects to/from the working memory of a stateful
rule session quite intensively (2000-3000 per sec), though the intensive
actions were related to a single rule session and only a few extra rule
sessions existed simultaneously. It turned out that about 7-10% of CPU was
consumed per a single add/remove operation. More specifically,
ReteooWorkingMemory.doRetract() and ReteooWorkingMemory.doAssertObject()
were the major consumers. I would expect a basic operation like this to be
significantly less CPU intensive.
Would you please provide more information, is my benchmark too ambitious? Do
you recommend an upgrade to version 3.0.6? 3.1? If so, please elaborate what
were the performance improvements.
Best regards,
Einat Idan
17 years, 8 months