This is the second part of my drools validation question. First part has been already answered and proposed solutions has been implemented in my code. First Part
This is
Added itemValue tests as seen in some comment
rule "land-orbuilding..."
when
Peson( $financeDetails: financeDetails, $personAddress: personAddress )
FinanceDetails( financeItemName == "Land or Building", itemValue == null || itemValue == 0 ) from $financeDetails
PersonAddress( status == AddressStatus.CURRENT,
type == AddressType.PHYSICAL,
useType == AddressUseType.HOME,
ownerShipType == "Own" ) from $personAddress
then
//...
end
How about reading some of that documentation? This is very much like the "first part", and only a minor variation.
rule "Check Details"
when
details:FinanceDetails (itemValue == 'LAND' || == 'Building')
address:PersonAddress(status == AddressStatus.CURRENT,
type == AddressType.PHYSICAL,
useType == AddressUseType.HOME,
ownerShipType == "Own" )
then
modify(details){itemValue=//set your value};
end