[rules-users] "extends" in rules
Chandana Pingle
chandana.pingle at intunity.com.au
Thu Aug 20 23:22:20 EDT 2009
Thanks for ur reply
That works if i put everthing in one rule.
When using extends and trying to access the variable in RHS of sub rule
error in the editor is
Builder Error:Internal Error:Unable to find declaration in list while
generating the consequence invoker
Thanks
Chandana
On 8/21/09, mrhoden at franklinamerican.com <mrhoden at franklinamerican.com> wrote:
> It should work fine, the entire LHS is basically copied to the second
> rule. Just try it with it all in one rule and make sure you syntax is
> correct.
>
> -Michael
>
> On Aug 20, 2009, at 8:30 PM, Chandana Pingle
> <chandana.pingle at intunity.com.au
> > wrote:
>
>> Hi,
>>
>> I found an example on using "extends" to extend a rule from another
>> rule.
>> Using extends would only include the WHEN side of the rule.
>>
>> I want to use the variable defined in the parent rule in sub rule
>> ,something like below example,how do i do that?
>>
>> rule A
>> when
>> $a:String( )
>> eval($a=="abc")
>> then
>> do something
>> end
>>
>> rule B extends A
>> when
>> $b:String( )
>> $c:SomeClass()
>> then
>> $c.someMethod($a,$b) //i am not able to use $a here
>> end
>>
>>
>> Any suggestions?
>>
>> Thanks
>> Chandana
>> _______________________________________________
>> rules-users mailing list
>> rules-users at lists.jboss.org
>> https://lists.jboss.org/mailman/listinfo/rules-users
> _______________________________________________
> rules-users mailing list
> rules-users at lists.jboss.org
> https://lists.jboss.org/mailman/listinfo/rules-users
>
More information about the rules-users
mailing list