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

Pavel Tavoda (Jira) issues at jboss.org
Thu Nov 7 04:51:00 EST 2019


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

Pavel Tavoda updated DROOLS-4731:
---------------------------------
    Description: 
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.

  was:
Setting long field value in THEN:
This are two problems:
1) package as kjar '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) with 'mvn clean install -DgenerateModel=YES' it result in 'incompatible types: int cannot be converted to java.lang.Long'
IntInRuleJava.drl - FAIL
IntInRuleMvel.drl - FAIL
LongInRuleJava.drl - OK
LongInRuleMvel.drl - OK
LongError.gdst - FAIL

I don't know how to turn off strict mode for maven plugin. Setting 'drools.dialect.mvel.strict' in kmodule.xml doesn't work.

Example project attached.



> 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