Assume that I have two data objects Person
and Address
. Person object has the fields name
and gender
and Address object has the fields city
and state
. Now I want to take some action based on this condition :
when
(person.name == 'jayram' && address.city == 'barhiya') ||
(person.gender == 'M' && address.state == 'bihar')
then
do something
How to accomplish this in drools rule file?