I wrote a method to compile these rules using the KnowledgeBaseBeanFactory, but the unit tests using it did not fail (i.e. did not repro the bug). Here is my method:
public static KnowledgeBase createKnowledgeBaseUsingBeanFactory(String path) throws Exception { List<DroolsResourceAdapter> resourceAdapters = new ArrayList<DroolsResourceAdapter>(); KnowledgeBaseBeanFactory factory = new KnowledgeBaseBeanFactory(); if (path.endsWith(".drl")) { resourceAdapters.add(new DroolsResourceAdapter(path, ResourceType.DRL)); } else if (path.endsWith(".xls")) { DecisionTableConfiguration dtconf = KnowledgeBuilderFactory.newDecisionTableConfiguration(); dtconf.setInputType(DecisionTableInputType.XLS); resourceAdapters.add(new DroolsResourceAdapter(path, ResourceType.DTABLE, dtconf)); } else { throw new IllegalArgumentException("unknown knowledge base type for path '" + path + "'"); } factory.setResources(resourceAdapters); factory.afterPropertiesSet(); return (KnowledgeBase) factory.getObject(); } These rules started life as an Excel spreadsheet. I have tried compiling the spreadsheet to DRL (using DecisionTableFactory) and also, as I said above, compiling it to PKG format, and all three versions of these rules exhibit the problem behavior (I thought the pkg format worked, but for my QA testers the pkg file exhibited the bug: it did not load properly at server start time (via Spring) but did load correctly on hot deploy (via Change Scanner). Short of completely starting over with the spreadsheet I don't know what else to try. I did scan the DRL for non-printable characters, in case Excel was creating something strange, but the only "invisible" characters I saw were CRLF and Tabs, which are normal in DRL. I'll attach the DRL version of the rules here in case anyone can spot something questionable with it. http://drools.46999.n3.nabble.com/file/n4018764/documentListTable.drl documentListTable.drl -- View this message in context: http://drools.46999.n3.nabble.com/Compiled-rules-differ-KnowledgeAgent-vs-ResourceChangeScanner-tp4018608p4018764.html Sent from the Drools: User forum mailing list archive at Nabble.com. _______________________________________________ rules-users mailing list rules-users@lists.jboss.org https://lists.jboss.org/mailman/listinfo/rules-users