Uploaded image for project: 'jBPM'
  1. jBPM
  2. JBPM-8722

Imported or saved assets are stored incorrectly

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Unresolved
    • Icon: Major Major
    • None
    • 7.11.0.Final, 7.22.0.Final, 7.25.0.Final
    • Designer, KieServer
    • 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.

      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.

        1. forceUpdateValidation.rdrl
          0.3 kB
          Chris H
        2. PartValidationObj.java
          6 kB
          Chris H

            rhn-support-tsurdilo Tihomir Surdilovic (Inactive)
            chaas_pl Chris H (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Created:
              Updated: