Hi,
 
In one-to-many relationship object type, Drools generate multiple results based on child objects data length. ie. No of child records
belongs to parent object. I wanted the RHS part should be executed only if conditions imposed
on child object satisfies.

I have two facts with 1-* relationship defined in object mapping.

class Invoice{}

class Order{

private Set<Invoice> invoices;

}

I wanted RHS should be executed with only one result  irrespective of child records length.

rule "Multiple results set"
when
 
    order: Order()
    invoice : Invoice() from order.invoices
  

  then
      
    System.out.println("Rule Example (Multiple results set)"+order.getId());
end;

Result:
 Rule Example (Multiple results set)1000
 Rule Example (Multiple results set)1000


Please help me in resolving this issue.

Regards,
Riyaz