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.