Details
-
Bug
-
Resolution: Unresolved
-
Major
-
None
-
7.11.0.Final, 7.22.0.Final, 7.25.0.Final
-
None
-
NEW
-
NEW
-
- Create a new Project, import the data object PartValidationObj.java.
- Next import the rule forceUpdateValidation.rdrl and open it.
- The contents of the imported rule differ from the original file.
Description
When importing or saving the following Rule file as "Guided Rule" the content gets rewritten after saving and reopening the rule:
forceUpdateValidation.rdrl:
package ext.at.prolicht.pwe.rmi.common.data.drools; import java.lang.Number; rule "forceUpdateValidation" dialect "mvel" when $valObj : PartValidationObj( attributes.get("Part.PM.UpdateForceField") == "" || attributes.get("Part.PM.UpdateForceField") == null ) then $valObj.setErrorMessage( "Garbage String must not be null!" ); end
The modified file looks like:
package ext.at.prolicht.pwe.rmi.common.data.drools; import java.lang.Number; rule "forceUpdateValidation" dialect "mvel" when $valObj : PartValidationObj( attributes.get("get("Part").PM.UpdateForceField") == "" || attributes.get("get("Part").PM.UpdateForceField") == null ) then $valObj.setErrorMessage( "Garbage String must not be null!" ); end
I think that the problem is related to the dots in the string that gets passed to the get method of the hashmap.