drools ide apparently not finding my drools configuration file
by John J. Franey
This is not a showstopper, when my application runs in a junit test, drools
is finding my configuration file.
Eclipse's Problems View is showing the error: "No accumulator function found
for identifier: ..."
However, I DO HAVE the accumulator function listed in my
drools.packagebuilder.conf and this is on my build path.
How do I tell the drools eclipse IDE where my configuration file is so it
will stop complaining for something that isn't so?
I'm running Eclipse 3.3.1.1 and Jboss Rules 4.0.2.
--
View this message in context: http://www.nabble.com/drools-ide-apparently-not-finding-my-drools-configu...
Sent from the drools - user mailing list archive at Nabble.com.
17 years
Enumeration in IDE plug-in
by mmquelo massi
Hi there!
Merry xmas everybody!
Maybe the last FAQ of the year.... ;-P....
Is it possible to define an enumeration within the Drools Eclipse Plug-in as
well as we
are used in the BRMS version??
I mean stuff like "'Person.sex' : ['M', 'F']"
Is there a particoular file format to do that?
Thanks !!
Massi
17 years
RE:brms help
by Sikkandar Nawabjan
Hi,
We have a rule base(drls and dsls) we want to use our existing rule base in brms so that in future if any rule required to add we can use brms. is that possible?
How to do that? am new to brms.
what is the most right way. i found brl and webgui. which one i should use
Basha
17 years
Eclipse 3.3.2 versus 3.4
by J Michael Dean
I am successfully using Drools in RCP development with Eclipse 3.3.1.1
but am having problems with an unrelated plugin for building
interfaces, etc. The vendor indicates that I should move to one of
these two Eclipse builds and the question is whether Drools is known
to work or not with Eclipse 3.4M4? The current 3.3.2 builds of
Eclipse have broken tests so not enthusiastic about that. Thanks.
- Mike
17 years
LHS with combined "from" condition
by Martin Book
Hello,
i have following problem with defining a rule:
- Object type A contains object OA with attribute session(long).
- Object type B contains object OB with attribute session(long).
I would like to get any object of type B that contains object OB with
OB.session==OA.session
My LHS looks like this:
When
$a:A()
OA($sess : session) from $a.getOA()
$b:B()
OB(session==$sess) from $b.getOB()
Then
.
The problem is that condition two matches before condition three and
condition three could not be set before condition two. Is it possible to
group the conditions?
kind regards and merry Christmas
Martin
17 years
NPE with enum?
by Andrew Robinson
I have an enumeration called AccessType:
public enum AccessType
{
READ,
UPDATE,
DELETE
}
In a rule, I have:
$rt: ResourceType( )
and $perm: ResourceTypePermission( accessType != AccessType.READ
) from $rt.permissions
and com.christws.entities.Role($rolename: name) from $perm.role
and Role(name == $rolename)
I am getting the following exception:
java.lang.NullPointerException
at org.drools.base.com.christws.entities.ResourceTypePermission7859095$getAccessType.getValue(Unknown
Source)
at org.drools.base.ClassFieldExtractor.getValue(ClassFieldExtractor.java:127)
at org.drools.base.evaluators.ObjectFactory$ObjectNotEqualEvaluator.evaluate(ObjectFactory.java:175)
at org.drools.rule.LiteralRestriction.isAllowed(LiteralRestriction.java:61)
at org.drools.rule.LiteralConstraint.isAllowed(LiteralConstraint.java:82)
at org.drools.reteoo.FromNode.assertTuple(FromNode.java:73)
at org.drools.reteoo.SingleTupleSinkAdapter.propagateAssertTuple(SingleTupleSinkAdapter.java:20)
at org.drools.reteoo.JoinNode.assertObject(JoinNode.java:149)
at org.drools.reteoo.SingleObjectSinkAdapter.propagateAssertObject(SingleObjectSinkAdapter.java:22)
at org.drools.reteoo.ObjectTypeNode.assertObject(ObjectTypeNode.java:153)
at org.drools.reteoo.Rete.assertObject(Rete.java:177)
at org.drools.reteoo.ReteooRuleBase.assertObject(ReteooRuleBase.java:192)
at org.drools.reteoo.ReteooWorkingMemory.doInsert(ReteooWorkingMemory.java:71)
at org.drools.common.AbstractWorkingMemory.insert(AbstractWorkingMemory.java:886)
at org.drools.common.AbstractWorkingMemory.insert(AbstractWorkingMemory.java:858)
at org.drools.common.AbstractWorkingMemory.insert(AbstractWorkingMemory.java:659)
at org.jboss.seam.security.RuleBasedIdentity.hasPermission(RuleBasedIdentity.java:143)
at org.jboss.seam.security.Identity.checkPermission(Identity.java:474)
The accessType is not null (checked with the debugger). Do you know
why I would be getting this? If it matters, the getAccessType method
and the accessType field are defined in an abstract super class of
ResourceTypePermission (ResourceTypePermission extends RolePermission
extends Permission which has the field)
drools version 4.0.3
-Andrew
17 years
Binding Not
by Joshua Undesser
I have a question on the return value of a not statement........
I have two fairly large rules in respect to the LHS when declarations.
They are identical except for the fact that in one of them, I am checking to
see if one more object exits, while in the other I am checking to see if it
doesn't exist. It seems silly to try have duplicate rules expressively
typed when this is the only difference. So what i tried to do was bind the
value of the not statement as shown below....
rule "Rule Name"
no-loop = true
when
.........
$msg : (or Message (description == "OK")
not Message (description == "OK"))
.........
then
if ($msg == null) {
createMessage("OK"); //
}
.... rest of RHS.....
end
I figured if the Message object didn't exist, null would be returned and
assigned to the $msg variable. But it was not. For now I have it
separated into two rules, but logically I would like to combine them, as
every other part of the LHS and RHS match.
Anyone have any suggestions?
--
View this message in context: http://www.nabble.com/Binding-Not-tp14463587p14463587.html
Sent from the drools - user mailing list archive at Nabble.com.
17 years
JBossRules 4.0.3 : recreating RuleBase instance with addPackage() from serialized rules file (10MB - 2500 rules) takes ages!
by Davy Toch
We're currently using JBoss Drools 4.0.3. We have a set of rules that is
serialized to a file of about 10MB (about 2500 rules). When
deserializing it, the addPackage() call takes about 2.5 minutes!
Our code looks as follows:
InputStream is = Test.class.getResourceAsStream("/Test.rules.binary");
ObjectInputStream ois = new ObjectInputStream(is);
Package pkg = new Package();
pkg.readExternal(ois);
RuleBase ruleBase = RuleBaseFactory.newRuleBase();
ruleBase.addPackage(pkg); // this takes 2.5 minutes !
Is this normal? Also, is there some documentation describing the
expected performance of JBoss rules compilation and (de)serialization
(and perhaps some tips on how to improve the performance)?
Best regards,
Davy Toch
17 years
retract() problem
by Guardian
Hi all,
The problem is, if i retract some objects (EJB3.0 entities) from my
workingMemory the agenda wont´t be refreshed. There are rules that should be
fired if the objects are retracted from the workingMemory, but nothing
happens.
Thanks,
Dennis Jansen
17 years