[rules-dev] MVEL strict mode - explanation?

Michael Anstis michael.anstis at gmail.com
Mon Oct 31 08:39:40 EDT 2011


It was MVEL dialect.

Thanks for the explanation.

On 28 October 2011 18:44, Mark Proctor <mproctor at codehaus.org> wrote:

>  Is the rule using the MVEL or the Java dialect? MVEL does not yet support
> generic's notation.
>
> Mark
>
> On 28/10/2011 05:36, Michael Anstis wrote:
>
> Hi,
>
> With Drools-5.4.0-SNAPSHOT, MVEL2-2.1.0.drools4 the following compiles OK:-
>
>     org.drools.runtime.process.WorkItemManager wim =
> drools.getWorkingMemory().getWorkItemManager();
>     org.drools.SessionConfiguration sessionConfiguration =
> (org.drools.SessionConfiguration)
> kcontext.getKnowledgeRuntime().getSessionConfiguration();
>     java.util.Map handlers = sessionConfiguration.getWorkItemHandlers();
>
> However moving the last Map to generics (as you'd expect is needed for
> strict mode) does not:-
>
>     org.drools.runtime.process.WorkItemManager wim =
> drools.getWorkingMemory().getWorkItemManager();
>     org.drools.SessionConfiguration sessionConfiguration =
> (org.drools.SessionConfiguration)
> kcontext.getKnowledgeRuntime().getSessionConfiguration();
>      java.util.Map<java.lang.String,
> org.drools.runtime.process.WorkItemHandler> handlers =
> sessionConfiguration.getWorkItemHandlers();
>
> Unable to Analyse Expression org.drools.runtime.process.WorkItemManager
> wim = drools.getWorkingMemory().getWorkItemManager();
> org.drools.SessionConfiguration sessionConfiguration =
> (org.drools.SessionConfiguration)
> kcontext.getKnowledgeRuntime().getSessionConfiguration();
> java.util.Map<java.lang.String, org.drools.runtime.process.WorkItemHandler>
> handlers = sessionConfiguration.getWorkItemHandlers();: [Error: unable to
> resolve method using strict-mode: org.drools.spi.KnowledgeHelper.,()] [Near
> : {... Map<java.lang.String, org.drools.runtime.process.W ....}] ^ [Line:
> 3, Column: 32]
>
> Can anybody explain?
>
> Thanks,
>
> Mike
>
>
> _______________________________________________
> rules-dev mailing listrules-dev at lists.jboss.orghttps://lists.jboss.org/mailman/listinfo/rules-dev
>
>
>
> _______________________________________________
> rules-dev mailing list
> rules-dev at lists.jboss.org
> https://lists.jboss.org/mailman/listinfo/rules-dev
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.jboss.org/pipermail/rules-dev/attachments/20111031/5f280024/attachment.html 


More information about the rules-dev mailing list