Re: [rules-users] Explicit class cast in RHS

2009-04-09 Thread David Sinclair
only provide Foo objects as facts. Do i have to provide > also the field prop objects as facts for the rule to match? > > -- > Date: Wed, 8 Apr 2009 12:26:01 -0400 > Subject: Re: [rules-users] Explicit class cast in RHS > From: dsincl...@chariotsolutions.c

RE: [rules-users] Explicit class cast in RHS

2009-04-09 Thread Alessandro Terrinoni
This way my rule doesn't match At the moment i only provide Foo objects as facts. Do i have to provide also the field prop objects as facts for the rule to match? Date: Wed, 8 Apr 2009 12:26:01 -0400 Subject: Re: [rules-users] Explicit class cast in RHS From: dsincl...@chariotsolutions.c

Re: [rules-users] Explicit class cast in RHS

2009-04-08 Thread Edson Tirelli
The RHS of rules contain semantic code based on the dialect you are using. In your example, java. So, just cast it: ( (TypeA) p ).methodFromTypeA(); []s Edson 2009/4/8 Alessandro Terrinoni > Hello > > in my working memory I insert an object like this > > public class Foo{ > > privat

Re: [rules-users] Explicit class cast in RHS

2009-04-08 Thread David Sinclair
rule "abc" when Foo($prop : prop) TypeA (this == $prop, name == "PropertyA") then ... 2009/4/8 Alessandro Terrinoni > Hello > > in my working memory I insert an object like this > > public class Foo{ > > private IntType prop; > > ... > > } > > where IntType is a class, but in practic

[rules-users] Explicit class cast in RHS

2009-04-08 Thread Alessandro Terrinoni
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 F