[rules-users] Assistance with DSL syntax

Edson Tirelli tirelli at post.com
Wed Sep 12 20:55:02 EDT 2007


   Yes, that is correct.
   Why do you mean by a "cleaner" way?

    []s
    Edson

2007/9/12, Christopher.Mathrusse at sybase.com <
Christopher.Mathrusse at sybase.com>:
>
>
> I'm using a DSL with my DRL file and I've read through the documentation
> but I've gotten hung-up on the syntax. Below is a rule from my DRL and the
> expansion in my DSL.
>
> My rule in the DRL:
> *rule* "Maximum Order Amount Exceeded"
> *salience* 9800
>         *when*
>                    There *is* an Order *with*
>                    - an amount that exceeds 100000
>         *then*
>                 Manually release the Order
>
> *end*
>
>
> My DSL:
> [condition][]There is an Order with=Order()
> [condition][]- an amount that exceeds {number}=amount >= {number}
> [consequence][]Manually release the Order=setManualRelease(drools.getRule
> ().getName());
>
> What I would like to do is add to my consequence the following in red:
> [consequence][]Manually release the Order=setManualRelease(drools.getRule
> ().getName());*retract(theOrder);*
>
>
> I know that I would need to modify my condition statement to be able to
> use the variable *theOrder*  in my call to retract:
> [condition][]There is an Order with=*theOrder *: Order()
>
>
> but is there a cleaner way to achieve this?
>
> _______________________________________________
> rules-users mailing list
> rules-users at lists.jboss.org
> https://lists.jboss.org/mailman/listinfo/rules-users
>
>


-- 
  Edson Tirelli
  Software Engineer - JBoss Rules Core Developer
  Office: +55 11 3529-6000
  Mobile: +55 11 9287-5646
  JBoss, a division of Red Hat @ www.jboss.com
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.jboss.org/pipermail/rules-users/attachments/20070912/f9f21288/attachment.html 


More information about the rules-users mailing list