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.