[jboss-jira] [JBoss JIRA] (DROOLS-4731) Working with Long field

Mario Fusco (Jira) issues at jboss.org
Mon Nov 11 10:03:00 EST 2019


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

Mario Fusco resolved DROOLS-4731.
---------------------------------
    Resolution: Rejected


There's no reason why you should be allowed to call a method accepting a Long passing an int to into inside a consequence. You cannot do this in Java and the consequence is basically Java code. It works in mvel (in some cases) but with the introduction of the executable model we want a more strictly typed drl.

> Working with Long field
> -----------------------
>
>                 Key: DROOLS-4731
>                 URL: https://issues.jboss.org/browse/DROOLS-4731
>             Project: Drools
>          Issue Type: Bug
>          Components: core engine
>    Affects Versions: 7.28.0.Final
>            Reporter: Pavel Tavoda
>            Assignee: Mario Fusco
>            Priority: Major
>         Attachments: error-with-long.zip
>
>
> Setting long field value in THEN:
> This are 3 different problems:
> 1) package as kjar with 'mvn clean install' result in "Error: unable to resolve method using strict-mode: org.drools.core.spi.Activation.setValue(java.lang.Integer)"
> RESULT:
> IntInRuleJava.drl - FAIL
> IntInRuleMvel.drl - FAIL
> LongInRuleJava.drl - OK
> LongInRuleMvel.drl - FAIL
> LongError.gdst - FAIL
> 2) package as kjar with 'mvn clean install -Ddrools.dialect.mvel.strict=false', same error on different files:
> IntInRuleJava.drl - FAIL
> IntInRuleMvel.drl - OK
> LongInRuleJava.drl - OK
> LongInRuleMvel.drl - OK
> LongError.gdst - OK
> 3) with 'mvn clean install -DgenerateModel=YES' it result in 'incompatible types: int cannot be converted to java.lang.Long', setting strict false have no influence on result
> IntInRuleJava.drl - FAIL
> IntInRuleMvel.drl - FAIL
> LongInRuleJava.drl - OK
> LongInRuleMvel.drl - OK
> LongError.gdst - FAIL
> Setting 'drools.dialect.mvel.strict' in kmodule.xml doesn't work.
> Example project attached.



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


More information about the jboss-jira mailing list