[rules-users] enums
Scott Reed
sreed at avacoda.com
Mon Jul 28 21:38:47 EDT 2008
Thomas,
This is beyond my level of expertise. I hope someone else here can
help you. It looks like a bug.
Sorry,
Scott
thomas kukofka wrote:
> Hi,
>
> I tried this. No problem at all.
>
> I can use enums also like this:
> io: InputObject(type == InputObject.Parameter.PARAMETERNAME)
> Only this causes the error:
>
> private HashMap<Parameter, String> stringParameters;
>
> public HashMap<Parameter, String> getStringParameters() {
>
> return stringParameters;
> }
>
> public void setStringParameters(HashMap<Parameter, String> stringParameters) {
> this.stringParameters = stringParameters;
> }
> /
>
> io: InputObject ( stringParameters[InputObject.Parameter.ParameterName] ==/ /"something") -//> Field/method 'InputObject' not found for class 'com.rules.InputObject'Rule
>
> />/ Compilation error//
> /
> If I use String instead of Parameter it works again:
>
> private HashMap<String, String> stringParameters;
>
> / io: InputObject ( stringParameters["somestring"] ==/ /"something") /
>
>
> Thomas
>
>
>
>
> *Scott Reed*
>
> sreed at avacoda.com
>
> <mailto:rules-users%40lists.jboss.org?Subject=%5Brules-users%5D%20enums&In-Reply-To=d8ac9d7f0807280443j5c9edd90u2112c0e05a3c375f%40mail.gmail.com>
>
> /Mon Jul 28 09:10:48 EDT 2008/
>
>
> Try a simple rule that just checks for any InputObject to make sure you
> have the class imported correctly.
>
>
> Rule "x"
> when
>
> InputObject()
> then
> end
>
>
> thomas kukofka wrote:
> >/ Hello,
>
> />/
> />/ If have an input object Inputobject which contains an enum Parameter which contains all allowed parameters of InputObject:
>
> />/
> />/
> />/ The entries for the parameters are stored in a map:
>
> />/ private HashMap<Parameter, String> stringParameters;
> />/
>
> />/ If I try:
> />/ io: InputObject ( stringParameters[InputObject.Parameter.ParameterName] ==
>
> />/
> />/
> />/ "something")
>
> />/
> />/ I got the error
>
> />/ =>Field/method 'InputObject' not found for class 'com.rules.InputObject'Rule
> />/ Compilation error
>
> />/
> />/ Kind Regards
>
> />/ Thomas/
> ------------------------------------------------------------------------
>
> _______________________________________________
> rules-users mailing list
> rules-users at lists.jboss.org
> https://lists.jboss.org/mailman/listinfo/rules-users
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.jboss.org/pipermail/rules-users/attachments/20080728/c0a59e99/attachment.html
More information about the rules-users
mailing list