[jboss-jira] [JBoss JIRA] (DROOLS-5215) With executable model drools keyword is not found when used in a method call

Matteo Casalino (Jira) issues at jboss.org
Fri Apr 3 07:00:58 EDT 2020


     [ https://issues.redhat.com/browse/DROOLS-5215?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Matteo Casalino updated DROOLS-5215:
------------------------------------
    Description: 
Executable model rule compilation fails on rule consequents using the _drools_ keyword as a parameter of a method call.

Example of DRL that fails to compile:

{noformat}
    function printRuleName(String ruleName) {
      System.out.println(ruleName);
    }
    
    rule "drools keyword in method call"
    when
    then
        printRuleName(drools.getRule().getName());
    end
{noformat}

The example works fine when compiling without executable model.

  was:
Executable model rule compilation fails on rule consequents using the _drools _ keyword as a parameter of a method call.

Example of DRL that fails to compile:

{noformat}
    function printRuleName(String ruleName) {
      System.out.println(ruleName);
    }
    
    rule "drools keyword in method call"
    when
    then
        printRuleName(drools.getRule().getName());
    end
{noformat}

The example works fine when compiling without executable model.



> With executable model drools keyword is not found when used in a method call
> ----------------------------------------------------------------------------
>
>                 Key: DROOLS-5215
>                 URL: https://issues.redhat.com/browse/DROOLS-5215
>             Project: Drools
>          Issue Type: Bug
>          Components: core engine
>    Affects Versions: 7.35.0.Final
>            Reporter: Matteo Casalino
>            Assignee: Mario Fusco
>            Priority: Major
>         Attachments: drools-keyword-in-method-call.zip
>
>
> Executable model rule compilation fails on rule consequents using the _drools_ keyword as a parameter of a method call.
> Example of DRL that fails to compile:
> {noformat}
>     function printRuleName(String ruleName) {
>       System.out.println(ruleName);
>     }
>     
>     rule "drools keyword in method call"
>     when
>     then
>         printRuleName(drools.getRule().getName());
>     end
> {noformat}
> The example works fine when compiling without executable model.



--
This message was sent by Atlassian Jira
(v7.13.8#713008)


More information about the jboss-jira mailing list