[rules-users] Explicit class cast in RHS

Alessandro Terrinoni aleterrinoni at hotmail.com
Wed Apr 8 12:19:47 EDT 2009


Hello

in my working memory I insert an object like this

public class Foo{
private IntType prop;

...
}

where IntType is a class, but in practice prop is either of type TypeA or TypeB, both extending the IntType class.


then i have a rule like this:

rule "abc"
    
    when
        
        Foo(p : prop, p.name == "propertyA")
        
    then 
        // call some method defined only in the TypeA class
        
end


how do i explicitly cast p into a TypeA object to call the method defined only in that class?

thanks in advance,
Alessandro Terrinoni
_________________________________________________________________
Chiama gratis dal tuo PC! Parla su Messenger
http://clk.atdmt.com/GBL/go/140630369/direct/01/
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.jboss.org/pipermail/rules-users/attachments/20090408/b3e1e29b/attachment.html 


More information about the rules-users mailing list