[rules-users] getWorkingMemoryEntryPoint returns null - two rules with same name

Davide Sottara dsotty at gmail.com
Thu May 2 12:20:16 EDT 2013


At least in latest versions, duplicate rules with the same name are
reported as errors by the KnowledgeBuilder.
I didn't check 5.3, so I wouldn't know for sure about that version.


On 05/02/2013 07:03 AM, ScalaEnthusiast wrote:
> All,
>
> I was getting a null returned when requesting an entrypoint using
> getWorkingMemoryEntryPoint("myEntryPoint") in BRMS 5.3.1 (Drools 5.3). To be
> clear "myEntryPoint" is an entry point defined in my technical rule. 
>
> What was causing my issue was that there were two rules of the same name
> (cut-n-paste error), one with the entry-point and one without. As soon as I
> changed the name of one of the rules, I no longer received the null pointer
> error - I was able to get the entry point from the session.
>
> I am posting this for others who may run into this [edge] case and to see if
> this would be considered a bug. The package source shows that the rule
> without the entry point came first and the one with the entry-point was
> second. Not sure how the system handles loading rules but I wouldn't think
> two rules with the same name should be allowed. Is this a validation issue
> that Guvnor needs to deal with?
>
> Any thoughts from those in the know?
>
> Thanks,
> ScalaEnthusiast
>
>
>
> --
> View this message in context: http://drools.46999.n3.nabble.com/getWorkingMemoryEntryPoint-returns-null-two-rules-with-same-name-tp4023629.html
> Sent from the Drools: User forum mailing list archive at Nabble.com.
> _______________________________________________
> rules-users mailing list
> rules-users at lists.jboss.org
> https://lists.jboss.org/mailman/listinfo/rules-users
>



More information about the rules-users mailing list