Mahesh Srinivas

addPropertyValueFilter not working in for loop

Discussion created by Mahesh Srinivas on Feb 14, 2009
Latest reply on Feb 16, 2009 by Jostein Ulseth



I have two queries:


1. My first Query: I have an object in a collection having a property/attribute whose value is of Long type in Java. It gets converted to Integer type while importing in BA and the default value is null. Since, Integer and null cannot be compared in BA because it throws a compilation error that 'Integer and null are not compatible types', I used  addPropertyValueFilter.


The problem is that if I have multiple objects in a collection, using addPropertyValueFilter on the property of that object is throwing 'Expression Evaluation error'. Unexpected value : unavailable while executing the rules through JSR Rules engine in Java. Please note that it works fine if I have a single object in the collection.h


Here is how I used my add PropertyValueFilter in my rules:


if true then{



for each Object in {


   if partyOwnershipBo.partyId is unavailable then {






 2. My Second Query: In a for loop, If a particular condition is satisfied, I want to return from the rule not from the ruleset. Using stop() or exit() function stops executing  the ruleset. I want to continue processing other rules in the ruleset(Only return/break from the current rule).How can this be implemented in BA?


Any help/solution regarding the above queries will be  appreciated.