Facing a problem using RuleFlow Groups
by Neha29
Hi ,
The version of Drools that I have used is 4.0.4
I have used ruleflow groups to create my rule file.
It has a split node (XOR) in which I specify a constraint on which a
ruleflow-group is to be selected .
Insert arraylists as facts in the working memory one by one.
The problem I face is that when I insert these arraylists in the same
session , it doesn't evaluate every constraint in the split node .
The work around I am using , it that I create a new session for every
arraylist , this works just fine . But creating a new session always is an
overhead .
Can you please assist me with this situation .
Thank You
Harsh Jetly
--
View this message in context: http://www.nabble.com/Facing-a-problem-using-RuleFlow-Groups-tp18864233p1...
Sent from the drools - user mailing list archive at Nabble.com.
16 years, 2 months
Re: [rules-users] BRMS import
by Amninder
Hi Micheal,
all the blogs are a lto of help THANKS
i am a newby to Drools.
i was able to successfully convert brl to drl also you BRMS help was also
gr8
Now i want to make changes in Components.xml(Security changes etc)
could you post some kind of sample help snippet.
Also if i want to upload an existing rule project into the BRMS how do i do
that?
Michael Neale wrote:
>
> Hi Mike.
>
> Sorry for the late reply, been flat out finishing things off ;)
>
> yes you can do that, you can import it into a package from the web GUI.
>
> On 6/16/07, Shepherd, Michael <Michael.Shepherd(a)xerox.com> wrote:
>>
>> Hi,
>>
>>
>>
>> Can I import an existing set of JBoss rules (Drools 3) into BRMS?
>>
>>
>>
>> Thanks,
>>
>> Mike
>>
>> _______________________________________________
>> rules-users mailing list
>> rules-users(a)lists.jboss.org
>> https://lists.jboss.org/mailman/listinfo/rules-users
>>
>>
>
> _______________________________________________
> rules-users mailing list
> rules-users(a)lists.jboss.org
> https://lists.jboss.org/mailman/listinfo/rules-users
>
>
--
View this message in context: http://www.nabble.com/BRMS-import-tp11154417p18809686.html
Sent from the drools - user mailing list archive at Nabble.com.
16 years, 2 months
eval rule in RuleAgent
by niall
Hi,
I have the following drl file.
==================================
package bugTestingFail
rule "Price hits Target"
when
eval ( true )
then
end
==================================
It is managed by a RuleAgent.
However, when I change the drl file from the source, I get the following except
ion:
RuleAgent(MARKET_DATA) INFO (Wed Aug 06 15:43:53 EST 2008): Applying changes to
the rulebase.
RuleAgent(MARKET_DATA) EXCEPTION (Wed Aug 06 15:43:53 EST 2008):
org.drools.reteoo.EvalConditionNode$EvalMemory cannot be cast to
org.drools.reteoo.BetaMemory. Stack trace should follow.
java.lang.ClassCastException: org.drools.reteoo.EvalConditionNode$EvalMemory
cannot be cast to org.drools.reteoo.BetaMemory
at org.drools.reteoo.EvalConditionNode.doRemove(EvalConditionNode.java:265)
at org.drools.common.BaseNode.remove(BaseNode.java:87)
at org.drools.reteoo.RuleTerminalNode.doRemove(RuleTerminalNode.java:505)
at org.drools.common.BaseNode.remove(BaseNode.java:87)
at org.drools.reteoo.ReteooBuilder.removeRule(ReteooBuilder.java:242)
at org.drools.reteoo.ReteooRuleBase.removeRule(ReteooRuleBase.java:366)
at org.drools.common.AbstractRuleBase.removeRule(AbstractRuleBase.java:705)
at org.drools.common.AbstractRuleBase.removePackage(AbstractRuleBase.java:622)
at org.drools.agent.PackageProvider.removePackage(PackageProvider.java:45)
at org.drools.agent.PackageProvider.applyChanges(PackageProvider.java:63)
at org.drools.agent.RuleAgent.refreshRuleBase(RuleAgent.java:320)
at org.drools.agent.RuleAgent$2.run(RuleAgent.java:438)
at java.util.TimerThread.mainLoop(Timer.java:512)
at java.util.TimerThread.run(Timer.java:462)
This only happens to me when I am editing rules files that have an eval
condition.
Is this a bug?
Cheers,
Niall
16 years, 2 months
compiler jar files
by Reid Kaufmann
Is it possible to load rules from DRL using neither the eclipse-jdt-core
or janino jars? For example, is it possible to avoid this dependency if
the mvel dialectic is used?
reid
16 years, 2 months
Should I use drools for this application ?
by Harsh Jetly
Hi ,
I am using Drools version 4.0.4
I have an application which fetches data from a database.
Each row from the db is stored in a domain object and these objects are
inserted into arraylists depending on a specific id.
Then I insert the arraylist into the rule engine , the output required is
the selection of one object from the arraylist and putting it into a global
arraylist.
I have tested this application with about 2500 rows . It takes 7 secs .
Also I have tested this application without using a rule engine , I wrote
business logic in my code . It took me 5 seconds .
One point that I need to be clarified is can we except performance
improvement by using drools ?
Can I derive a conclusion from this excerise , that this application is not
to be used with drools or is there something that I am doing wrong .
Also is there some document which can tell me where and when to exactly use
drools ?
Thanks a ton
Harsh Jetlyharsh.jetly(a)lntinfotech.com
--
View this message in context: http://www.nabble.com/Should-I-use-drools-for-this-application---tp188495...
Sent from the drools - user mailing list archive at Nabble.com.
16 years, 2 months
Facing a problem using RuleFlow Groups
by Harsh Jetly
Hi ,
The version of Drools that I have used is 4.0.4
I have used ruleflow groups to create my rule file.
It has a split node (XOR) in which I specify a constraint on which a
ruleflow-group is to be selected .
Insert arraylists as facts in the working memory one by one.
The problem I face is that when I insert these arraylists in the same
session , it doesn't evaluate every constraint in the split node .
The work around I am using , it that I create a new session for every
arraylist , this works just fine . But creating a new session always is an
overhead .
Can you please assist me with this situation .
Thank You
Harsh Jetly
--
View this message in context: http://www.nabble.com/Facing-a-problem-using-RuleFlow-Groups-tp18848954p1...
Sent from the drools - user mailing list archive at Nabble.com.
16 years, 2 months
eval in RuleAgent
by niall
Hi,
I have the following drl file.
==================================
package bugTestingFail
rule "Price hits Target"
when
eval ( true )
then
end
==================================
It is managed by a RuleAgent.
However, when I change the drl file from the source, I get the following
exception:
RuleAgent(MARKET_DATA) INFO (Wed Aug 06 15:43:53 EST 2008): Applying changes to
the rulebase.
RuleAgent(MARKET_DATA) EXCEPTION (Wed Aug 06 15:43:53 EST 2008):
org.drools.reteoo.EvalConditionNode$EvalMemory cannot be cast to
org.drools.reteoo.BetaMemory. Stack trace should follow.
java.lang.ClassCastException: org.drools.reteoo.EvalConditionNode$EvalMemory
cannot be cast to org.drools.reteoo.BetaMemory
at org.drools.reteoo.EvalConditionNode.doRemove(EvalConditionNode.java:265)
at org.drools.common.BaseNode.remove(BaseNode.java:87)
at org.drools.reteoo.RuleTerminalNode.doRemove(RuleTerminalNode.java:505)
at org.drools.common.BaseNode.remove(BaseNode.java:87)
at org.drools.reteoo.ReteooBuilder.removeRule(ReteooBuilder.java:242)
at org.drools.reteoo.ReteooRuleBase.removeRule(ReteooRuleBase.java:366)
at org.drools.common.AbstractRuleBase.removeRule(AbstractRuleBase.java:705)
at org.drools.common.AbstractRuleBase.removePackage(AbstractRuleBase.java:622)
at org.drools.agent.PackageProvider.removePackage(PackageProvider.java:45)
at org.drools.agent.PackageProvider.applyChanges(PackageProvider.java:63)
at org.drools.agent.RuleAgent.refreshRuleBase(RuleAgent.java:320)
at org.drools.agent.RuleAgent$2.run(RuleAgent.java:438)
at java.util.TimerThread.mainLoop(Timer.java:512)
at java.util.TimerThread.run(Timer.java:462)
This only happens to me when I am editing rules files that have an eval
condition.
I this a bug?
16 years, 2 months
Truth Maintenance, equals, and hashCode
by ringsah@comcast.net
I have a question about logical assertions and truth maintenance. First of all, the Drools manual states:
2.5.8.2. Important note: Equality for Java objects
It is important to note that for Truth Maintenance (and logical assertions) to work at all, your Fact objects (which may be Javabeans) override equals and hashCode methods (from java.lang.Object) correctly. As the truth maintenance system needs to know when 2 different physical objects are equal in value, BOTH equals and hashCode must be overridden correctly, as per the Java standard.
Two objects are equal if and only if their equals methods return true for each other and if their hashCode methods return the same values. See the Java API for more details (but do keep in mind you MUST override both equals and hashCode).
Does this mean that in order to use logical assertions that I have to override equals and hashCode? What if I have a class that I would like to use as fact in a logical assertions, but for this class equality should be the same as identity. In other words, I don't want to override equals and hashCode, because the versions of these methods inherited from Object have the correct behavior for my application. Will this class still be okay to use as facts in logical assertions?
Thanks,
-Hans
16 years, 2 months
Custom BRMS security - location of custom java class
by KEVIN_CHEONG@CRGL-THIRDPARTY.COM
Hi,
I finally have time to work on this again.
I was looking around in the Seam tutorials (security topic) and I found out how to write a custom class for security. I'm starting out with a really simple example and I have attached the code I am using below. My issue now is that I don't know where the class is to be placed in the drools-brms war file that is being edited. I have tried placing it alongside the other security files (package: org.drools.brms.server.security), but that isn't working. It seems to me like there is some other config file which needs to be edited to provide the name of the additional class? Any help will be really appreciated.
Thanks!
In my components.xml file:
<security:identity authenticate-method="#{authenticator.authenticate}" />
This is the java class:
package org.drools.brms.server.security;
import org.jboss.seam.security.Identity;
import org.jboss.seam.annotations.*;
@Name("authenticator")
public class Authenticator {
private static final String valid_user = "admin";
private static final String valid_password = "password";
public boolean authenticate() {
String username = Identity.instance().getUsername();
String password = Identity.instance().getPassword();
if((username.equals(valid_user)) && (password.equals(valid_password))) {
return true;
}
return false;
}
}
16 years, 2 months