I've tried both solution but it doesn't work.
-> triggerRuntimeException; CausedByException is:
null
javax.ejb.EJBException: RuntimeException; CausedByException is:
null
at
org.jboss.ejb.plugins.LogInterceptor.handleException(LogInterceptor.java:381)
at org.jboss.ejb.plugins.LogInterceptor.invoke(LogInterceptor.java:195)
java.lang.NullPointerException
at
org.drools.common.DoubleBetaConstraints.updateFromTuple(DoubleBetaConstraints.java:125)
at org.drools.reteoo.JoinNode.assertTuple(JoinNode.java:102)
at
org.drools.reteoo.SingleTupleSinkAdapter.propagateAssertTuple(SingleTupleSinkAdapter.java:20)
at org.drools.reteoo.JoinNode.assertObject(JoinNode.java:149)
at
org.drools.reteoo.CompositeObjectSinkAdapter.propagateAssertObject(CompositeObjectSinkAdapter.java:317)
Does anyone have an idea?
If you don't want the same Object in RHS, you have to add one
condition :
rule "compare dates"
when
$f:FactObject($d1 : date)
FactObject(this != $f, date == $d1)
then
end
-----Message d'origine-----
De : rules-users-bounces(a)lists.jboss.org
[mailto:rules-users-bounces@lists.jboss.org] De la part de Shyam, Pallav
(MSCIBARRA)
Envoyé : mardi 2 septembre 2008 18:06
À : Rules Users List
Objet : RE: [rules-users] Checking facts between them
rule "compare dates"
when
FactObject($d1 : date)
FactObject(date == $d1)
then
end
This assumes there is an object FactObject with attribute date.
-----Original Message-----
From: rules-users-bounces(a)lists.jboss.org
[mailto:rules-users-bounces@lists.jboss.org] On Behalf Of Delaunay
Gaetan
Sent: Tuesday, September 02, 2008 9:17 PM
To: rules-users(a)lists.jboss.org
Subject: [rules-users] Checking facts between them
Hi all,
I was wondering if it was possible to create a rule which checks if a
fact is equal to another one. For example in my case i'd like to compare
the date of fact with the date of fact +1. I hope you understand what i
mean.
What kind of rule will be suitable to do that?
Thanks
Gaetan
_______________________________________________
rules-users mailing list
rules-users(a)lists.jboss.org
https://lists.jboss.org/mailman/listinfo/rules-users
--------------------------------------------------------
NOTICE: If received in error, please destroy and notify sender. Sender does
not intend to waive confidentiality or privilege. Use of this email is
prohibited when received in error.
_______________________________________________
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