[jboss-jira] [JBoss JIRA] (DROOLS-3972) Evaluation of facts hasn't been affected by 'modify()' when parsing String to Double

Almas Toimbekov (Jira) issues at jboss.org
Thu May 16 23:10:00 EDT 2019


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

Almas Toimbekov commented on DROOLS-3972:
-----------------------------------------

Yes, it must be Double.parseDouble(amount) == 20.0
I have it changed in the code section. Just a typo when I changed it back from amount.startsWith("20")
But the problem exists.
Output: 
First
Second
Outpput when amount.startsWith("20") or amount == "20":
First
Second
Rule is fired


> Evaluation of facts hasn't been affected by 'modify()'  when parsing String to Double
> -------------------------------------------------------------------------------------
>
>                 Key: DROOLS-3972
>                 URL: https://issues.jboss.org/browse/DROOLS-3972
>             Project: Drools
>          Issue Type: Bug
>          Components: executable model
>    Affects Versions: 7.20.0.Final
>         Environment: Ubuntu
>            Reporter: Almas Toimbekov
>            Assignee: Mario Fusco
>            Priority: Major
>              Labels: double, evaluation, execution, parse
>
> When I modify amount in an example below from 5 to 20 (both are Strings) and then try to evaluate this fact parsing it to Double - the third rule doesn't fire. But it fires when use 'update()' instead of 'modify() {}'



--
This message was sent by Atlassian Jira
(v7.12.1#712002)


More information about the jboss-jira mailing list