Hi all,
I am always confused about what we can do in the "then" part of the rule.
In particular, I have problem duplicate a list. For example:
when:
$b: Book( "james" memberOf authors )
then:
Test fact = new Test();
fact.getList().addAll( $b.authors );
insert(fact);
end
The error message reads like this:
BuildError: Unable to build expression for 'consequence': [Error:
Failed to compile: 2 compilation error(s):
- (1,7) unqualified type in strict mode for: $b
- (1,12) unqualified type in strict mode for: authors]
What is the right way to do this?
Thanks.
-Simon