[rules-users] Using java enums in guvnor test scenarios (6.0.1Final)

pacovalsera pichulines at gmail.com
Tue Jul 22 05:57:38 EDT 2014


Hi Toni, thanks for your quick response. As a workaround I'm defining a
getter/setter for the enum member based on a string arg. That is,

/	
public String getEnumMemberStr() {return enumMember.name();}
public void setEnumMemberStr(String enumMemberStr)
{enumMember=EnumType.valueOf(enumMemberStr);	}
/

Then I use them in the test scenario to initialize facts. To avoid type
errors I also define an enumeration for the new member (enumMemberStr), so
the scenario editor shows a combo rather and a free text field. In the rules
there is no problem in using the enum member (enumMember).

Meanwhile I'll wait for the fix in the next release.



--
View this message in context: http://drools.46999.n3.nabble.com/Using-java-enums-in-guvnor-test-scenarios-6-0-1Final-tp4030411p4030421.html
Sent from the Drools: User forum mailing list archive at Nabble.com.


More information about the rules-users mailing list