[rules-dev] Fine Grained Property Change Listeners (Slot Specific)
Wolfgang Laun
wolfgang.laun at gmail.com
Wed Jan 18 05:00:29 EST 2012
On 18/01/2012, Geoffrey De Smet <ge0ffrey.spam at gmail.com> wrote:
> throw new IllegalStateException("The factClass (" + factClass + ")
> has a property (" + property + ") that has a @Modifies annotation, but
> the class isn't annotated with @PropSpecific.");
Use less words:
"In class (" + factClass + ") property (" + property + ") is annotated
with @Modifies, but the class isn't annotated with @PropSpecific."
However, there's a good case for permitting this: testing to try both
ways, to track down a (user) bug,... Commenting out @PropSpecific is
just like turning off the main switch. If you get errors, you'll have
to mess with all the @Modifies, too.
>
> 2) @Modifies( "firstName, lastName" ) should not put the comma (,)
> inside the quotes. Go for:
> @Modifies( "firstName", "lastName" )
Then it must be:
@Modifies( { "firstName", "lastName" } )
>
> 3) What's the point of doing a @PropSpecific on a field instead of a class?
>> declare Person
>> @propSpecific
>> firstName : String
The answer is: DRL syntax requires it this way.
Cheers
Wolfgang
More information about the rules-dev
mailing list