[jboss-jira] [JBoss JIRA] (JBRULES-3708) Map-accessing constraints stop matching after they are jit-optimized

Esteban Aliverti (JIRA) jira-events at lists.jboss.org
Tue Dec 18 03:39:08 EST 2012


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

Esteban Aliverti updated JBRULES-3708:
--------------------------------------

    Workaround Description: 
The workaround I've found is to cast the result of Map.get() to Double:

rule "Rule 2"
when
    TestObject((*(Double)*data[Parameter.PARAM_A]) > 3)
then
    System.out.println("Rule 2 fired!");
end


  was:
The workaround I've found is to cast the result of Map.get() to Double:
{{monospaced}}
rule "Rule 2"
when
    TestObject((*(Double)*data[Parameter.PARAM_A]) > 3)
then
    System.out.println("Rule 2 fired!");
end
{{monospaced}}


    
> Map-accessing constraints stop matching after they are jit-optimized
> --------------------------------------------------------------------
>
>                 Key: JBRULES-3708
>                 URL: https://issues.jboss.org/browse/JBRULES-3708
>             Project: JBRULES
>          Issue Type: Bug
>      Security Level: Public(Everyone can see) 
>          Components: drools-core
>    Affects Versions: 5.5.0.Final
>            Reporter: Esteban Aliverti
>            Assignee: Mark Proctor
>              Labels: jit
>
> Having the following rules:
> {{monospaced}}
> declare TestObject
>     data    :   java.util.Map  //This is a Map<Parameter, Double>
> end
> rule "Rule 2"
> when
>     TestObject(data[Parameter.PARAM_A] > 3)
> then
>     System.out.println("Rule 2 fired!");
> end
> {{monospaced}}
> And repeatedly inserting a TestObject with data[PARAM_A] = 4 into a session makes the rule to stop matching.
> Maybe the title of the issue is wrong and JIT has nothing to do, but that is the only explanation I've found.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira


More information about the jboss-jira mailing list