Hi,<br><br>I get the following error when I try to build and deploy:<br>Unable to build constraint as '_default' is invalid : [Rule name='myRuleName']<br><br>It yields this error because of this pattern in my drl file:<br>
MyType(_default == DefaultType.YES)<br><br>In my java class MyType I have something like this:<br>public class MyType {<br> ....<br> @XmlAttribute(name = "default")<br> protected DefaultType _default;<br>
....<br>}<br><br>where DefaultType is an enum. <br>Here is the hole enum class:<br><br>@XmlType(name = "defaultType")<br>@XmlEnum<br>public enum DefaultType {<br><br> @XmlEnumValue("yes")<br> YES("yes");<br>
private final String value;<br><br> DefaultType(String v) {<br> value = v;<br> }<br><br> public String value() {<br> return value;<br> }<br><br> public static DefaultType fromValue(String v) {<br>
for (DefaultType c: DefaultType.values()) {<br> if (c.value.equals(v)) {<br> return c;<br> }<br> }<br> throw new IllegalArgumentException(v);<br> }<br>}<br><br>
Can you help me? I don't see where the problem is...<br>Any suggestions are much appreciated.<br>