Rule name length hard limit of 60 characters?

316 views
Skip to first unread message

David Weir

unread,
Jul 9, 2015, 1:54:00 PM7/9/15
to drools...@googlegroups.com
Using drools 6.2.0-final.
If I create a rule with a name longer than 60 characters, I get this error:

  text=[ERR 105] Line 916:8 required (...)+ loop did not match anything at input ''], Message [id=2, level=ERROR, path=<MY_RULES_FILE>, line=922, column=0


The docs say that "Best practice is to keep rule names relatively short, i.e. under 60 characters." 


This seems like a suggestion, not a hard limit.

Is this a hard limit?


David.

David Weir

unread,
Jul 9, 2015, 1:56:48 PM7/9/15
to drools...@googlegroups.com
I have a similar problem when I have this condition:
    not( 
    State( state == "5eb9e666d579a46a7b633cf9c54f0513-4feb219ba036e807162ad9e165a38c32" )   ) 

I get this error:

  text=[ERR 105] Line 922:23 required (...)+ loop did not match anything at input ''], Message [id=3, level=ERROR, path=<MY_RULES_FILE>, line=924, column=0


So is there a mysterious 60 character limit floating around?

David Weir

unread,
Jul 9, 2015, 4:10:15 PM7/9/15
to drools...@googlegroups.com
never mind. problem caused by unmatched " 

Mario Fusco

unread,
Jul 10, 2015, 6:22:18 AM7/10/15
to drools...@googlegroups.com
Hi David,

where did you read that sentence about keeping rule names short? I cannot find it in our docs.

Mario

--
You received this message because you are subscribed to the Google Groups "Drools Usage" group.
To unsubscribe from this group and stop receiving emails from it, send an email to drools-usage...@googlegroups.com.
To post to this group, send email to drools...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/drools-usage/a22ece07-741d-4ec6-8dc4-e45cc65a60cd%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

David Weir

unread,
Jul 10, 2015, 12:59:10 PM7/10/15
to drools...@googlegroups.com
Javadocs on org.drools.compiler.lang.api.RuleDescrBuilder.name(String n)

I’m building my drl files programmatically and came across this little nugget:

The name of the rule. Best practice is to keep rule names relatively short, i.e. under 60 characters.

Parameters:
name name of the rule
Returns:
itself

David.

You received this message because you are subscribed to a topic in the Google Groups "Drools Usage" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/drools-usage/RV0AUHFP6ks/unsubscribe.
To unsubscribe from this group and all its topics, send an email to drools-usage...@googlegroups.com.

To post to this group, send email to drools...@googlegroups.com.
Reply all
Reply to author
Forward
0 new messages