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