TWO Same Object Types in WorkingMemory
by Saleem Lakhani
Hi,
I need to have two objects of the same class present in the working
memory at the same time. Both objects can have other nested objects of
different classes.
The reason is I need to compare data change b/w two objects. E.g;
originalObject_A.getPersonTO().getAge() !=
changedObject_A.getPersonTO().getAge()
I am using Drools 3.0, DRLs and DSL.
Thanks
Saleem Lakhani
17 years, 9 months
RE: [rules-users] ClassNotFoundException when using a function in a rule
by Antonio Giurini
I am having a similar problem, but I'm using java 14 (for compatibility with
a third party library):
java.lang.NoClassDefFoundError: Validity/ScadenzaCalcolata
at ASMAccessorImpl_140430961206010324450.getValue(Unknown Source)
Could someone suggest another workaround?
Is there a know bug? How can I check for bugs
thanks, A.
Switched from java 1.6 to java 1.5 and I don't have the problem anymore . So
I guess there is some issue with functions and java 1.6 in release 4.0.4
--zoly
________________________________
From: rules-users-bounces(a)lists.jboss.org
[mailto:rules-users-bounces@lists.jboss.org] On Behalf Of Zoltan Farkas
Sent: Tuesday, March 04, 2008 11:33 AM
To: Rules Users List
Subject: [rules-users] ClassNotFoundException when using a function in a
rule
Here is the exception:
Exception in thread "mythread" java.lang.NoClassDefFoundError:
com/daxtechnologies/optima/fault/eventprocessor/NewEvent
at ASMAccessorImpl_716163221204646531490.getValue(Unknown Source)
at org.mvel.ASTNode.getReducedValueAccelerated(ASTNode.java:174)
at org.mvel.MVELRuntime.execute(MVELRuntime.java:88)
--
View this message in context: http://www.nabble.com/Executing-BRMS-Snap-shot-tp15819564p16091916.html
Sent from the drools - user mailing list archive at Nabble.com.
17 years, 9 months
Atlanta area contact?
by Benjamin McMillan
Hi all,
Is anyone involved in (as in, an actual dev or lead) Drools residing in
the Atlanta area, by any chance?
Thanks,
Benjamin J McMillan | Application Development Analyst
Software Research Center
Aflac Incorporated
Tel: 770-448-9823 x. 8964 | Fax: 770-448-4770
3720 DaVinci Court, Suite 225, Norcross GA 30092
BMcMillan2(a)aflac.com | aflac.com
This e-mail and any attachments may contain confidential information
intended solely for the use of the addressee. If the reader of this
message is not the intended recipient, any distribution, copying, or use
of this e-mail or its attachments is prohibited. If you received this
message in error, please notify the sender immediately by e-mail and
delete this message and any copies. Thank you
Confidentiality Notice:
This e-mail and any attachments may contain confidential information intended solely for the use of the addressee. If the reader of this message is not the intended recipient, any distribution, copying, or use of this e-mail or its attachments is prohibited. If you received this message in error, please notify the sender immediately by e-mail and delete this message and any copies. Thank you.
17 years, 9 months
Upgrade 4.0.4 to 4.0.5 failed !?
by Markus Helbig
Dear Drools users,
i tried to replace Drools 4.0.4 with 4.0.5 and know i get the following errors:
[20.03.08 09:21:24:100 CET] 00000036 SystemOut O 2008-03-20
09:21:24 XXX XXXX ERROR Exception executing predicate
org.drools.base.mvel.MVELPredicateExpression@329c329c -
org.drools.RuntimeDroolsException: Exception executing predicate
org.drools.base.mvel.MVELPredicateExpression@329c329c
org.drools.RuntimeDroolsException: Exception executing predicate
org.drools.base.mvel.MVELPredicateExpression@329c329c
at org.drools.rule.PredicateConstraint.isAllowed(PredicateConstraint.java:216)
at org.drools.rule.OrConstraint.isAllowed(OrConstraint.java:50)
at org.drools.reteoo.AlphaNode.assertObject(AlphaNode.java:137)
at org.drools.reteoo.CompositeObjectSinkAdapter.propagateAssertObject(CompositeObjectSinkAdapter.java:318)
at org.drools.reteoo.AlphaNode.assertObject(AlphaNode.java:145)
at org.drools.reteoo.SingleObjectSinkAdapter.propagateAssertObject(SingleObjectSinkAdapter.java:22)
at org.drools.reteoo.AlphaNode.assertObject(AlphaNode.java:145)
at org.drools.reteoo.SingleObjectSinkAdapter.propagateAssertObject(SingleObjectSinkAdapter.java:22)
at org.drools.reteoo.AlphaNode.assertObject(AlphaNode.java:145)
at org.drools.reteoo.CompositeObjectSinkAdapter.propagateAssertObject(CompositeObjectSinkAdapter.java:318)
at org.drools.reteoo.ObjectTypeNode.assertObject(ObjectTypeNode.java:153)
at org.drools.reteoo.Rete.assertObject(Rete.java:175)
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:915)
at org.drools.common.AbstractWorkingMemory.insert(AbstractWorkingMemory.java:887)
at org.drools.common.AbstractWorkingMemory.insert(AbstractWorkingMemory.java:688)
Caused by:
java.lang.ClassCastException:
org/drools/rule/AbstractCompositeConstraint$MultiFieldConstraintContextEntry
incompatible with
org/drools/rule/PredicateConstraint$PredicateContextEntry
at org.drools.rule.PredicateConstraint.isAllowed(PredicateConstraint.java:209)
at org.drools.rule.OrConstraint.isAllowed(OrConstraint.java:50)
at org.drools.reteoo.AlphaNode.assertObject(AlphaNode.java:137)
at org.drools.reteoo.CompositeObjectSinkAdapter.propagateAssertObject(CompositeObjectSinkAdapter.java:318)
at org.drools.reteoo.AlphaNode.assertObject(AlphaNode.java:145)
at org.drools.reteoo.SingleObjectSinkAdapter.propagateAssertObject(SingleObjectSinkAdapter.java:22)
at org.drools.reteoo.AlphaNode.assertObject(AlphaNode.java:145)
at org.drools.reteoo.SingleObjectSinkAdapter.propagateAssertObject(SingleObjectSinkAdapter.java:22)
at org.drools.reteoo.AlphaNode.assertObject(AlphaNode.java:145)
at org.drools.reteoo.CompositeObjectSinkAdapter.propagateAssertObject(CompositeObjectSinkAdapter.java:318)
at org.drools.reteoo.ObjectTypeNode.assertObject(ObjectTypeNode.java:153)
at org.drools.reteoo.Rete.assertObject(Rete.java:175)
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:915)
at org.drools.common.AbstractWorkingMemory.insert(AbstractWorkingMemory.java:887)
at org.drools.common.AbstractWorkingMemory.insert(AbstractWorkingMemory.java:688)
What do i have to change? Do i miss sth important?
Cheers
Markus
17 years, 9 months
firing rules dynamically
by hanumesh.m
Hi,
I am working with an application, where in it does polls a directory
regularly. When ever it finds a file in the directory, it reads the file
name ( which contains some mask say ABC-834-xxxx ), which my application
sets the ABC-834 to bean of rules. Based on this mask, the targetQ for this
file-content will be decided.
I am able to do that using .drl file. But as partners increase new files
with their masks will be placed in the source folder. So I have an admin
module which creates partners with the details of mask, sourceQueue and
destinationQ which will act as my rules.
I need to get all the rules from the database as soon as I found a file in
the source folder, so that I can fire all the rules and decide on the target
queue.(Assuming, partner details will be upadted using admin module)
Any help for this situation will be very helpful.
Thanks in Advance,
Hanumesh M
--
View this message in context: http://www.nabble.com/firing-rules-dynamically-tp16142265p16142265.html
Sent from the drools - user mailing list archive at Nabble.com.
17 years, 9 months
Drools and Repast S
by Marcus Lunzenauer
Hi,
I am trying to use Drools inside of my Repast S[1] project. I have got
some errors running my simple rules:
> Unable to resolve ObjectType 'Message' : [Rule name=Your First Rule,
> agendaGroup=MAIN, salience=0, no-loop=false]
> test.MessageRule Compilation error : [Rule name=Your First Rule,
> agendaGroup=MAIN, salience=0, no-loop=false]
> apackage/Rule_Your_First_Rule_0.java (2:25) : Only a type can be
> imported. test.Message resolves to a package
> apackage/Rule_Your_First_Rule_0.java (7:250) : message cannot be
> resolved
There are two Java classes involved:
* MyAgent.class - my Repast S agent (basically a modified
HelloWorldExample from the Drools examples)
* Message.class - a bean
Both live in the package test.
My rule file consists of:
> package apackage
> import test.Message;
>
> rule "Your First Rule"
> when
> Message( message : message )
> then
> System.out.println(message);
> end
When I am running my MyAgent class as a Java application, everything is
ok. But if I am incorporating my MyAgent class into Repast S, I get the
aforementioned error.
So how can I find the source of this error? Does anyone have a clue how
to proceed?
I would be so glad, if you could help me. (Using JESS would be much less
fun :-)
Best Regards,
Marcus
[1]: http://repast.sourceforge.net/
17 years, 9 months
use data enumeration in DSL in BRMS
by Felbecker, Tobias
Hi,
I have a following DSL sentence defined:
[when] when the fact field is {field} =Fact(field=="{field}") ....
And I have a defined a data enumeration :
'Fact.field' : (new com.helper.DataProvider()).getValues()
When you choose "Add a restriction on a field" then I get the dropdown
with the values but when I choose the DSL sentence that I have a input
field.
Is it possible to have the dropdown values in the dsl sentence??
Cheers Tobi
17 years, 9 months
Uploading the fact model to the DRools BRMS
by Felbecker, Tobias
Hi, I fixed the Problem.
First I got rid of the Error
[STDOUT] ERROR 16-01 11:42:25,609 (Contexts.java:flushAndDest
royContexts:335) could not discover transaction status ...
by editing the web.xml of drools-jbrms ear. I found that earlier in this
list.
After that my exception changed into
java.lang.UnsupportedClassVersionError: Bad version number in .class
file ....
So I created my jars with some different Java versions and with jdk 1.6
the exception was gone. I don't why this is, cause drools and JBoss
should work with 1.5.
Cheers Tobi
Message: 2
Date: Tue, 18 Mar 2008 18:11:31 +0100
From: "Felbecker, Tobias" <t.felbecker(a)sap.com>
Subject:
To: <rules-users(a)lists.jboss.org>
Message-ID:
<72C6F8BBBED23343950D2C03D78E1BF84D3978(a)dewdfe1g.wdf.sap.corp>
Content-Type: text/plain; charset="us-ascii"
Hi ,
I got the same problem and wonder if there is a solution for that yet.
I'am using
JBOSS: AS 4.2.2 GA
DBMR: 4.0.4
JAVA: 1.5.0_15
After uploading the jar, editing the import in the package configuration
and finally validating the package I get the following exception:
java.lang.reflect.InvocationTargetException at
sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.jav
a:39) at
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessor
Impl.java:25) at java.lang.reflect.Method.invoke(Method.java:585) at
org.jboss.seam.util.Reflections.invoke(Reflections.java:21) at.....
The import statement should and the packaging of the jar file seems to
be correct. Otherwise there would be a Class not found error but no
exception.
I tried all kinds of packaging: binaries, source and binaries, creating
the jar through eclipse and from cmd.
This is my very simple java class:
package test;
public class MyBean{
public MyBean(){
}
private int number;
public int getNumber() {
return number;
}
public void setNumber(int number) {
this.number = number;
}
}
Cheers Tobi
17 years, 9 months