flozano commented on issue #5925:
URL: 
https://github.com/apache/incubator-kie-drools/issues/5925#issuecomment-2105813817

   I understand not wanting to fix blindly unless the scenario is clear.
   
   The DRL is this:
   ```java
   package com.mycompany.myproject.engine.rules.model;
   //generated from Decision Table
   import com.mycompany.myproject.engine.rules.model.*;
   global com.mycompany.myproject.engine.rules.model.ServerCodeRuntimeService 
serverCode;
   dialect "mvel"
   // rule values at B13, header at B8
   rule "Tank Rules-SmartBIN_13"
        salience 65535
        when
                $asset: 
Sbtanknew_1_0_6($asset.devices.tank_device.properties.tanklevel_status != 
"Nearing Empty", $asset.devices.tank_device.readings.tank_level < 
$asset.properties.empty_fill_level_threshold)
        then
                
$asset.getDevices().getTank_device().getProperties().setTanklevel_status("Nearing
 Empty");
                
$asset.getDevices().getTank_device().getProperties().setTanklevel_color("Red");
                $asset.getProperties().setTank_level_status("CRITICAL");
                AlertMessage message = new AlertMessage("Nearing Empty");
                message.withParam("value", 
$asset.devices.tank_device.readings.tank_level);
                message.withParam("alias", "sb_device_tank_level");
                message.withParam("field", "Tank Level");
                message.withParam("is_required", "Required");
                insert(message);
   end
   
   ```
   
   if I drop `$asset.devices.tank_device.readings.tank_level < 
$asset.properties.empty_fill_level_threshold`, the above error goes away and a 
different one appears, but this one I need to investigate further. It also 
seems related to the fact that a generic class is involved. (I understand 
`$asset` inside the condition is redundant).
   
   the model classes (eg:Sbtanknew_1_0_6) are derived from base classes and are 
runtime generated with byte-buddy, overriding several generic parameters of the 
parent class. I think this is where the issue comes from, and why it's not easy 
to isolate. I will try. 


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to