[rules-users] Rule Compilation error : The Field ... is not visible

Ashish Soni learnspring at gmail.com
Wed Apr 1 13:12:53 EDT 2009


Thanks All.
I figured out the error and believe that it is because i didn't set the
dialect , but still i feel the error is incorrect and believe the Engine
should say No Dialect provided or it should default.

Regards,
Ashish


2009/4/1 Dave Macpherson <dave at praxis-inc.com>

>  Are you trying to update the grossAmount propery of the LineItem class?
> Perhaps it’s as simple as:
>
>
>
> rule "split line item"
> when
>     $item  : LineItem( grossAmount > 1000 )
> then
>
>     $item.setGrossAmount(500);
>
>     // you may also wish to update the LineItem fact in working memory if
> you want to trigger additional rules based on this update
> end
>
>
>
> *From:* rules-users-bounces at lists.jboss.org [mailto:
> rules-users-bounces at lists.jboss.org] *On Behalf Of *Ashish Soni
> *Sent:* April-01-09 9:40 AM
> *To:* Rules Users List
> *Subject:* [rules-users] Rule Compilation error : The Field ... is not
> visible
>
>
>
> Hi All ,
>
> I am sure there must be a silly mistake but i am not able to find out ,
> please help me as what is wrong in below rule
>
> package Test
> import com.abc.api.document.Document
> import com.abc.api.line.LineItem
>
> rule "split line item"
> when
>     $item  : LineItem( grossAmount > 1000 )
> then
>     modify( $item ) { grossAmount=500 };
>
> end
>
>
> 11:35:23,318 ERROR [] Rule Compilation error : [Rule name='split line
> item']
>         Test/Rule_split_line_item_0.java (7:565) : *The field
> LineItem.grossAmount is not visible*
>
>
>
> Thanks,
> Ashish
>
> _______________________________________________
> rules-users mailing list
> rules-users at lists.jboss.org
> https://lists.jboss.org/mailman/listinfo/rules-users
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.jboss.org/pipermail/rules-users/attachments/20090401/f80cfdda/attachment.html 


More information about the rules-users mailing list