"Declares" are compiled into java classes, so the only limitations would be posed by the JVM.
I tried to run your snippet, but it works fine (you should still follow conventions and use upper case
names for the declared types).
The CCE you get, moreover, seems to point to a different issue.
Could you post a full reproducer, together with details on your environment - Drools version, JVM, OS, etc...
Thanks
Davide

On 09/30/2013 12:13 AM, richie wrote:
Hi all, Is there any limitation about the length of attribute's name when declare type in drl file?

I encountered a problem these days, I declared a new type in rule file, when fire rules, it always throw java.lang.ClassCaseException: test.obj cannot be cast to test.obj. As I inspected, this is caused by the length of an attribute's name is too long, it's 35 characters, if I remove this attribute, there's no exception.

Following is snippet of my rule file:

package test

declare obj
@propertyReactive
type : String
name : String
attribute_name_too_long_reach_limitation: Boolean
end

rule "a"
dialect "mvel"
salience 0
no-loop
when
$obj:obj(type == "a")
then
modify ($obj) {name = "abc"};
end



View this message in context: Is there any limitation about the length of attribute's name when declare type in drl file
Sent from the Drools: User forum mailing list archive at Nabble.com.


_______________________________________________
rules-users mailing list
rules-users@lists.jboss.org
https://lists.jboss.org/mailman/listinfo/rules-users