[rules-users] How to write below rule using Guvnor ( Invoice and Line Item scenario )

Ashish Soni learnspring at gmail.com
Mon Mar 30 22:37:18 EDT 2009


Hi All ,

I am trying to write below rule in Guvnor Guided Editor but not able to do
so , Any help or suggestion will be appreciated  -

Let say i have a Invoice Object which contains collection of Line Items

Class Invoice
{
   private Collection<LineItem> lineItems;
}

Class LineItem
{
   private double grossAmount;
}

Now i want to write a rule on Invoice object so that when ever there is only
one LineItem in the collection and the gross amount is greater then $100
then split the lineitem in two with setting equal gross amount in each Line
Item i.e after the rule execution the Collection of the LineItem should
contain two line item object with equal gross amount .

Please let me know how can i create this rule using Guvnor guided editor.


Regards,
Ashish
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.jboss.org/pipermail/rules-users/attachments/20090330/c6da56d6/attachment.html 


More information about the rules-users mailing list