[rules-users] Need Syntax help for a string match

Lindy hagan lindyhagan at gmail.com
Wed Nov 18 11:31:29 EST 2009


Problem is Customer & CustomerDetail are not related. Is there any work
around? Also I looked at the rete tree for matches using Jared Davis's mail
, this also results in the same identical structure as with | or in.



On Wed, Nov 18, 2009 at 11:18 AM, Wolfgang Laun <wolfgang.laun at gmail.com>wrote:

> 2009/11/18 Lindy hagan <lindyhagan at gmail.com>:
> >
> >
> > Adding to my initial question , based on the condition satisfied how can
> I
> > set a variable to "Y"in a different object (Other than
> > customer)?customerDetail is not static.
> > rule "Age Factor"
> >      when
> >           m : Customer( age matches "18,21,33,28,40,41")
> >      then
> >          System.out.println("Customer falls in age group ");
> >          // doAgeTasks();
> >        customerDetail.setFallsInAgeGroup("Y");  -- Need to do something
> like this.How can I do this?
> > end
>
> There must be some link between a customer's Customer and CustomerDetail
> facts.
>
> when
>  $m : Customer( $id : id, age matches "18,21,33,28,40,41")
>  $d : CustomerDetail( id == $id )
> then
>  $d.setFallsInAgeGroup("Y");
>
> -W
>
> _______________________________________________
> 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/20091118/42fe1187/attachment.html 


More information about the rules-users mailing list