[jboss-jira] [JBoss JIRA] (DROOLS-604) Problems in code generation and parsing when a method is called from Guided Rules Editor

Abel Marrero Santos (JIRA) issues at jboss.org
Thu Sep 18 09:44:02 EDT 2014


    [ https://issues.jboss.org/browse/DROOLS-604?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13003915#comment-13003915 ] 

Abel Marrero Santos commented on DROOLS-604:
--------------------------------------------

I have also found this issue that I think is related:

If instead of trying to "call a method on a" you go to "add free form drl" and you write the code for a method call like let's say:

a.secondMethod("string 1", "string 2");

You can save the model, see that the source code is well generated and even "validate" the code. The problem appears when you "save" the model, "close" the editor and you "re-open" it. Apparently the parser recognize the code of a method call and instead of writing free form DRL it generates the UI components of a method call. But if you go to the "source tab" you can see that it generates now two action steps instead of just one like these:

a.secondMethod("string 1");
a.secondMethod("string 2");

and you can not validate the model anymore because such methods don't exist in the model.

> Problems in code generation and parsing when a method is called from Guided Rules Editor
> ----------------------------------------------------------------------------------------
>
>                 Key: DROOLS-604
>                 URL: https://issues.jboss.org/browse/DROOLS-604
>             Project: Drools
>          Issue Type: Bug
>    Affects Versions: 6.1.0.Final, 6.2.0.Beta1, 6.2.0.Beta2
>            Reporter: Abel Marrero Santos
>            Assignee: Mark Proctor
>            Priority: Critical
>
> Hello guys,
> I have found a problem in code generation when we use the feature "call a method on <variable>" from the Guided Rule Editor. An InvocationTargetException caused by a ClassCastException is thrown in RuleModelDRLPersistenceImpl.generateSetMethodCallsMethod method.
> I have found other issues that I think are related and that I will try to mention in the comments. I can also provide you with the maven artifact that I'm using.



--
This message was sent by Atlassian JIRA
(v6.3.1#6329)


More information about the jboss-jira mailing list