Uploaded image for project: 'AppFormer'
  1. AppFormer
  2. AF-789

External Data Objects not properly migrated when upgrading to 6.4.0.Final via git clone of older repository

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Unresolved
    • Icon: Major Major
    • Backlog
    • None
    • VFS
    • None
    • Hide

      Create rules in an earlier version of Drools (6.1.0.Final in my case) that require an Import Suggestion such as java.lang.Number.
      Create a rule that uses that import suggestion (in my case I did a From Accumulate that evaluated a Number.intValue() comparison)
      Save, etc.
      Clone the git repository into a 6.4.0.Final version
      Attempt to open the rule created above, and the error mentioned in the description will popup, as well as the editor not displaying the rule at all.

      Show
      Create rules in an earlier version of Drools (6.1.0.Final in my case) that require an Import Suggestion such as java.lang.Number. Create a rule that uses that import suggestion (in my case I did a From Accumulate that evaluated a Number.intValue() comparison) Save, etc. Clone the git repository into a 6.4.0.Final version Attempt to open the rule created above, and the error mentioned in the description will popup, as well as the editor not displaying the rule at all.
    • NEW
    • NEW

      When cloning an older Git repository into Drools 6.4.0.Final (potentially other versions as well, of course), the External Data Objects do not seem to be migrated properly. The previous implementation of Import Suggestions did not require setting the available EDOs on the rules themselves, and the migration to 6.4.0 seems to only convert the Import Suggestions to EDOs, but does not apply them to rules where necessary.

      See Google Groups post:
      https://groups.google.com/forum/#!topic/drools-usage/ZY4RNY9Rah8

      I am upgrading from 6.1.0.Final to 6.4.0.Final and have cloned my Git repository. Most of my rules are Guided Rule Templates, and when I open some of them they work just fine, but others I get the following error:

      Unable to complete your request. The following exception occurred: No such field org.drools.workbench.models.datamodel.rule.ExpressionUnboundFact.fact ---- Debugging information ---- field : fact class : org.drools.workbench.models.datamodel.rule.ExpressionUnboundFact required-type : org.drools.workbench.models.datamodel.rule.ExpressionUnboundFact converter-type : com.thoughtworks.xstream.converters.reflection.ReflectionConverter path : /rule/lhs/fromAccumulateCompositePattern/factPattern/constraintList/constraints/org.drools.workbench.models.datamodel.rule.SingleFieldConstraintEBLeftSide/expLeftSide/parts/org.drools.workbench.models.datamodel.rule.ExpressionUnboundFact/fact class[1] : java.util.LinkedList converter-type[1] : com.thoughtworks.xstream.converters.collections.CollectionConverter class[2] : org.drools.workbench.models.datamodel.rule.ExpressionFormLine class[3] : org.drools.workbench.models.datamodel.rule.SingleFieldConstraintEBLeftSide class[4] : [Lorg.drools.workbench.models.datamodel.rule.FieldConstraint; converter-type[2] : com.thoughtworks.xstream.converters.collections.ArrayConverter class[5] : org.drools.workbench.models.datamodel.rule.CompositeFieldConstraint class[6] : org.drools.workbench.models.datamodel.rule.FactPattern class[7] : org.drools.workbench.models.datamodel.rule.FromAccumulateCompositeFactPattern class[8] : [Lorg.drools.workbench.models.datamodel.rule.IPattern; class[9] : org.drools.workbench.models.guided.template.shared.TemplateModel version : 1.4.7 -------------------------------.

      Source code (from one generated template rule):
      Number( intValue() >= 1 , intValue() <= 2 ) from accumulate ( GroupState( name in ( "DDS_Server_Group", "DDS_Builder_Group" ) , $failed : failed > 0 ), sum($failed))

      I tried to recreate the rule from scratch and it validated just fine, with the same source as above.

      What I think is happening is that when my code was imported from 6.1.0 to 6.4.0, something didn't get linked correctly due to the transition from the "Import Suggestions" to the "External Data Objects" and the fact that you now need to manually import things like java.lang.Number on each rule in order to use them.

            Unassigned Unassigned
            devyndraen Stephen Slaboda (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated: