[rules-users] Question on BRMS Data Enumeration
Barbara L Burns
blburns at alcatel-lucent.com
Fri Mar 28 11:17:37 EDT 2008
I'm trying to do a simple example of loading enums programmatically pretty much
following the user guide example.
I'm on Drools and BRMS 4.0.5, Java 1.6 running under Jboss.
I'm trying to define this 'data enumeration/drop down list'
package com.alcatel_lucent.utils;
import java.util.ArrayList;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
public class DataEnumSource {
public Map<String, List<String>> loadData(){
Map<String, List<String>> map =
new HashMap<String,List<String>>();
List<String> l = new ArrayList<String>();
l.add("foo");
l.add("boo");
map.put("AvpSubscriptionId.subscriptionIdType", l);
l = new ArrayList<String>();
l.add("apple");
l.add("bannana");
map.put("AvpServiceContext.serviceContextId",l);
return map;
}
}
The jar containing the DataEnumSource has been defined as a model within BRMS.
Here's what I put in the 'Data enumeration' text window
=(new DataEnumSource()).loadData()
When validating the Data enumeration from BRMS, I get the following error:
Unable to load enumeration data.
unable to resolve class: DataEnumSource
Error type: org.mvel.CompileException
Any insight as to what might be the problem?
More information about the rules-users
mailing list