[rules-users] problems using the from

Mark Proctor mproctor at codehaus.org
Tue Aug 7 07:42:43 EDT 2007


There was a regression with MVEL in resolving globals, which has now 
been resolved. A Snapshot will be out later today, that you can test 
against. 4.0.1 I hope for end of this week.

Mark
hypnosat7 wrote:
> Hi,
>   This is my rule :
>
>
> #declare any global variables here
> global MockServiceRepository service
>
>
> rule "Your First Rule"
> 	
> 	when
> 		
>  		Variable($list : values ) from service.findVariableByName("njdn","dedkm")
> 		r : Rum(diagnostic  memberOf (value in $list))
> 	then 
> 		System.out.println("test From ok");
> 		
> end
>
> And this is the errors
>
> 	testFromPackage/Rule_Your_First_Rule_0.java (12:581) : value cannot be
> resolved
> 	testFromPackage/Rule_Your_First_Rule_0.java (12:587) : Syntax error on
> token "in", instanceof expected
> 	testFromPackage/Rule_Your_First_Rule_0.java (12:590) : $list cannot be
> resolved to a type
>
>
> I have a class Variable with a values property :
> 	private Set<VariableValue> values = new LinkedHashSet<VariableValue>();
>
> And a class VariableValue with those properties :
> 	private String id;
>
> 	protected String value;
>
> 	private Variable variable;
>
>
>   




More information about the rules-users mailing list