[rules-users] Checking facts between them

Vincent Delbart delbart.0466 at apside.net
Wed Sep 3 03:13:32 EDT 2008


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 at lists.jboss.org
[mailto:rules-users-bounces at 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 at lists.jboss.org
[mailto:rules-users-bounces at lists.jboss.org] On Behalf Of Delaunay
Gaetan
Sent: Tuesday, September 02, 2008 9:17 PM
To: rules-users at 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 at 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 at lists.jboss.org
https://lists.jboss.org/mailman/listinfo/rules-users





More information about the rules-users mailing list