I have tried<br><br>declare EventA<br> @role( event )<br> x : Void<br>end<br>declare EventB<br> @role( event )<br> x : Void<br>end<br>rule "mock-A" # only rule for EventA, EventB<br>when<br> $b: EventB()<br>
$a: EventA( this after[0,10s] $b )<br>then<br>end<br><br>and <br> org.drools.rule.TypeDeclaration tda = (org.drools.rule.TypeDeclaration)rpkg.pkg.getTypeDeclaration( "EventA" );<br> System.out.println( "EventA expires: " + tda.getExpirationOffset() + " role:" + tda.getRole());<br>
org.drools.rule.TypeDeclaration tdb = (org.drools.rule.TypeDeclaration)rpkg.pkg.getTypeDeclaration( "EventB" );<br> System.out.println( "EventB expires: " + tdb.getExpirationOffset() + " role:" + tdb.getRole());<br>
<br>which prints<br> EventA expires: -1 role:EVENT<br> EventB expires: -1 role:EVENT<br><br>Since the DRL code is equivalent to example 2.19 ("correlate orders") in Fusion, this raises the question whether the inferred expiration offset is actually computed as described.<br>
<br>-W<br><br><br>