global com.itemfile.rules.ValidationErrorMap errors;
rule "Item should have a valid status"
when
ItemVo( statusCode : itemStatusCode != null)
ItemVo( statusCode == true ) from itemValidationDao.isValidItemStatus(statusCode)
then
errors.addValidationError("nullItemStatusCode","Item Status Code is null");
System.out.println("Item Base Defaults Called" + itemValidationDao.isValidItemStatus(statusCode));
System.out.println("Item Status Code is null");
end
Caused by: org.drools.rule.InvalidRulePackage: unknown:32:28 Unexpected token 'itemValidationDao'
isValidItemStatus () method returns a boolean and i need to check if thats true than go to the RHS side .... somehow it does not recognize itemValidationDao in LHS side .. RHS same call works ...
Can anybody suggest how to call database in LHS
...
thanks