[rules-users] Temporal operator "after"
Wolfgang Laun
wolfgang.laun at gmail.com
Fri Aug 13 15:35:28 EDT 2010
According to the Fusion manual, "after" is used like this:
$eventA : Foo(...)
$eventB : Bar( this after[0ms,1h] $eventA )
provided Foo and Bar have @role(event).
This works.
But, given a class Wrapper( Foo foo ), the pattern combination
Wrapper( $eventA : foo )
$eventB : Bar( this after[0ms,1h] $eventA )
results in a class cast exception at runtime, telling me that a Foo cannot
be cast to a org.drools.common.EventFactHandle.
Working around this by doing
Wrapper( $foo: foo )
$eventA : Foo( this == $foo )
$eventB : Bar( this after[0ms,1h] $eventA )
solves the problem, but is this really necessary and intentional? (The
documentation doesn't even hint at such a restriction.)
-W
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.jboss.org/pipermail/rules-users/attachments/20100813/08b1f404/attachment.html
More information about the rules-users
mailing list