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

Pavel Tavoda (Jira) issues at jboss.org
Mon Nov 11 10:25:00 EST 2019


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

Pavel Tavoda commented on DROOLS-4731:
--------------------------------------

Yes, it makes no sense and it's provided only for clarification. But here are some strange cases which I expected to work:
1)
LongInRuleMvel.drl - Should work even in strict mode
LongError.gdst - Value should be translated to LONG constant (with l postfix) it's defined in XML as LONG only translator from GDST -> RULE ignores it

2) It's generally OK only I don't see place where to specify drools.dialect.mvel.strict=false. On maven command line it's not always right place and it's not working in maven config, maven plugin config and also not in kmodule.xml config. Documentation is silent about this.

3)
IntInRuleMvel.drl - should work (but OK it's 50/50 case) you can always postfix with l. However if you want be consistent than this scenario should also fail in 2) ;-)
LongError.gdst - same problem as 1)

> 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