Hi,
I always assumed that one can refer to the properties of the
bound column in the LHS like this:
MyRecord {
String
field1, field2;
}
MyRecord2 {
String
field1, field3;
}
Rule xxx
When
$r1:
MyRecord (field1 == “xxx”)
$r2:
MyRecord2 (field1 == $r1.field1)
Then
System.out.println(“found
match: “+$r2+”, “+$r1);
End
Compiler does complain on ‘$r1’ usage in the LHS
(as part of constraint for MyRecord2 fact), but works OK if used only in RHS.
The error I’m getting is: “Unable to find class $r1”. “$r1.getField1()”
doesn’t work either (getting “mismatched token, expecting ‘)’
“ error).
Thanks,
Vlad