[rules-users] How to use global hashmap in drools

bbarani bbarani at gmail.com
Wed Oct 30 12:48:40 EDT 2013


I am trying to use a global hashmap in drools but not sure how to create a
global hashmap.

I have a very simple function that counts the number of values passed hence
I would need a global hash map to increment the count.

The below function initializes the map every time the function is called, I
want to store the values in map until all the data gets processed.

function String getValue(String a, String b){  
*    Map<String, String> hashValue = new HashMap<String, String>();  
*    hashValue.put(a,b);
    return hashValue.size();
}




--
View this message in context: http://drools.46999.n3.nabble.com/How-to-use-global-hashmap-in-drools-tp4026555.html
Sent from the Drools: User forum mailing list archive at Nabble.com.


More information about the rules-users mailing list