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
_______________________________________________
rules-users mailing list
[email protected]
https://lists.jboss.org/mailman/listinfo/rules-users

Reply via email to