[rules-users] Inserting Collection into WorkingMemory

VinuJay vinod.jayendra at wipro.com
Thu Jun 11 01:21:43 EDT 2009


Hi my fact object looks like this,

class ProcessRequest {
  
  Long requestId;

  String processType;

  String assigneeUsers;

  List<String> businessData;

  //Getters and Setters

}
I have inserted the fact object into working memory in this way
WorkingMemory workingMemory = ruleBase.newStatefulSession();	
FactHandle factObject = workingMemory.insert(processRequest );
workingMemory.fireAllRules();

My question is how to use the values in the business data for comparison in
the rules.drl file rule "Audit"
when
	p: ProcessRequest(processType == "Audit" && SSN == 1234) then
	p.setAssigneeUsers("AuditUser1");
end

When i try with the above rule it says no field extractor found for SSN, SSN
is part of the businessdata(List<String>)

Please do suggest me
1. How to make the Workingmemory aware of the Collection - businessData 2.
Change the rules.drl file syntax to access values from Collection.
-- 
View this message in context: http://www.nabble.com/Inserting-Collection-into-WorkingMemory-tp23975474p23975474.html
Sent from the drools - user mailing list archive at Nabble.com.




More information about the rules-users mailing list