On 17-06-13 15:33, Bartek wrote:
Hello,
How Optaplanner and Guvnor  should be integrated? I am using Drools 5.5.0.Final. I have configuration  with spring so I have access to KnowledgeBase.
I found in documentation:

5.3.4.2.2. A RuleBase (possibly defined by Guvnor)
 solverFactory.getSolverConfig().getScoreDirectorFactoryConfig.setRuleBase(ruleBase);


How I can get rule base? (If it is correct way do integrate with guvnor)

yes, it's the correct way for optaplanner 5.5.x with drools 5.5.x:
IIRC, the guvnor docs explains how you can get a KnowledgeBase (~ drools 5 api), which you can transform into a RuleBase (~ drools 4 api which is still available in 5.5.x) like this:
((InternalKnowledgeBase) myKnowledgeBase).getRuleBase()

See http://stackoverflow.com/questions/11017613/live-rule-creation-in-drools-planner
IIRC, KnowledgeAgent connects to guvnor and builds a KnowledgeBase.


That being said, for optaplanner 6.0.x with drools 6.0.x,
everything is standardized on KieBase (~ drools 6 api) (which is like the KnowledgeBase in the 5 api).
We recently released 6.0.0.Beta3 (drools, guvnor and optaplanner release together).
So there's
  solverFactory.getSolverConfig().getScoreDirectorFactoryConfig.setKieBase(kieBase);
The optaplanner and drools stuff is pretty stable, even if it's called Beta3 (CR1 is coming soon),
but I have no idea about the state of guvnor's KieBase support.

Thanks,



_______________________________________________
rules-users mailing list
rules-users@lists.jboss.org
https://lists.jboss.org/mailman/listinfo/rules-users