[rules-users] Use of a static variable on rules

Francisco Brum francisco.brum at link.pt
Fri Feb 16 10:34:49 EST 2007


Still having problems, but this time the error is;

Rule Compilation error Expression "org.codehaus.janino.Java$LocalVariable at e96254" is not a type Exception

__________________________________
Francisco Brum - francisco.brum at link.pt
Link Consulting - http://www.link.pt/
Tel.: 213 100 031
Av. Duque D'Ávila, 23 4º Esq.
1000-138 Lisboa


-----Original Message-----
From: rules-users-bounces at lists.jboss.org [mailto:rules-users-bounces at lists.jboss.org] On Behalf Of Anstis, Michael (M.)
Sent: sexta-feira, 16 de Fevereiro de 2007 15:04
To: Rules Users List
Subject: RE: [rules-users] Use of a static variable on rules

I've successfully used constant strings in rules like this.

	Public class Types {
		Public static final String SMURF = "SMURF";
	}

	Rule "A"
	When
		$s : Person ( type == Types.SMURF )
	Then
		stopGargamel($s);
	End

Cheers,

Mike

-----Original Message-----
From: rules-users-bounces at lists.jboss.org [mailto:rules-users-bounces at lists.jboss.org] On Behalf Of Francisco Brum
Sent: 16 February 2007 14:52
To: Rules Users List
Subject: [rules-users] Use of a static variable on rules

Hello everybody!

I'm using a global class in my rules, and tried to compare a fact field with a static variable.

This is the rule

Rule "A"
When 
	Service(state == ((plannerAux).SCHEDULE))
Then
	Dosomething()
End

This is the declaration of the static variable from plannerAux.

	public static String SCHEDULE = "SCHEDULE";

But I'm having this error:

Rule Compilation error Expression "(plannerAux)" is not a type Exception:1 errors while compiling unit Rule_A.java"

M'I doing something wrong or this is not possible to do?

__________________________________
Francisco Brum - francisco.brum at link.pt
Link Consulting - http://www.link.pt/
Tel.: 213 100 031
Av. Duque D'Ávila, 23 4º Esq.
1000-138 Lisboa

_______________________________________________
rules-users mailing list
rules-users at lists.jboss.org
https://lists.jboss.org/mailman/listinfo/rules-users

_______________________________________________
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