At first glance, the problem is with the MyType property DefaultType
_default. What are the names of the getter and setter?
Renaming the field to
DefaultType default
with getter getDefault and setter setDefault is bound to fix the problem.
-W
2011/7/27 Eugenia Carcel <eujenia(a)gmail.com>
Hi,
I get the following error when I try to build and deploy:
Unable to build constraint as '_default' is invalid : [Rule
name='myRuleName']
It yields this error because of this pattern in my drl file:
MyType(_default == DefaultType.YES)
In my java class MyType I have something like this:
public class MyType {
....
@XmlAttribute(name = "default")
protected DefaultType _default;
....
}
where DefaultType is an enum.
Here is the hole enum class:
@XmlType(name = "defaultType")
@XmlEnum
public enum DefaultType {
@XmlEnumValue("yes")
YES("yes");
private final String value;
DefaultType(String v) {
value = v;
}
public String value() {
return value;
}
public static DefaultType fromValue(String v) {
for (DefaultType c: DefaultType.values()) {
if (c.value.equals(v)) {
return c;
}
}
throw new IllegalArgumentException(v);
}
}
Can you help me? I don't see where the problem is...
Any suggestions are much appreciated.
_______________________________________________
rules-users mailing list
rules-users(a)lists.jboss.org
https://lists.jboss.org/mailman/listinfo/rules-users