]
Luca Molteni moved RHDM-1531 to DROOLS-5895:
--------------------------------------------
Project: Drools (was: Red Hat Decision Manager)
Key: DROOLS-5895 (was: RHDM-1531)
Workflow: GIT Pull Request workflow (was: CDW with docs v1)
Docs QE Status: NEW
Component/s: executable model
(was: BRE)
Environment: (was: The issue was found in RHDM 7.9.0.)
Affects Version/s: (was: 7.9.0.GA)
QE Status: NEW
Compound assignment operation like BigDecimal_type_property +=
BigDecimal_value causes a compilation error in executable model.
-------------------------------------------------------------------------------------------------------------------------------
Key: DROOLS-5895
URL:
https://issues.redhat.com/browse/DROOLS-5895
Project: Drools
Issue Type: Bug
Components: executable model
Reporter: Luca Molteni
Assignee: Luca Molteni
Priority: Major
Labels: support
Compiling a rule like (*1) which is described in MVEL dialect and uses a compound
assignment operation like _BigDecimal_type_property_ += _BigDecimal_value_, for example,
- $bus.weight += $bus.weight; ..... (6c) or
- BigDecimal bd1 = 1000; $bus.weight += bd1; ..... (6d)
with executable rule models enabled, an error like (*2) occurs. $bus.weight is a
BigDecimal type property.
The same issue also occurs in the case of using '-='.
For '*=' and '/=', no compilation error occurs but the value of
$bus.weight does not change by the operation.
(*1)
{noformat}
package com.example.reproducer
import com.example.reproducer.Bus
dialect "mvel"
rule "bus6c"
when
$bus : Bus()
then
$bus.weight += $bus.weight; ..... (6c)
System.out.println("***** " + $bus + ", weight = " +
$bus.weight);
update($bus);
end
{noformat}
(*2)
{noformat}
[ERROR]
/work2/cases/02801729/reproducer_02801729_6c_6d/target/generated-sources/drools-model-compiler/main/java/com/example/reproducer/PF9/LambdaConsequenceF9B783ABDBE8B65F49FDA13227908E7F.java:[19,56]
void cannot be dereferenced
{noformat}