<html>
<head>
<meta content="text/html; charset=ISO-8859-1"
http-equiv="Content-Type">
</head>
<body bgcolor="#FFFFFF" text="#000000">
<br>
<div class="moz-cite-prefix">On 17-06-13 15:33, Bartek wrote:<br>
</div>
<blockquote cite="mid:51BF102F.9030209@wp.pl" type="cite">
<meta http-equiv="content-type" content="text/html;
charset=ISO-8859-1">
Hello,<br>
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.<br>
I found in documentation: <br>
<br>
<h5 class="title" style="font-size: 9pt; color: rgb(74, 93, 117);
line-height: 15px; margin-top: 0em; font-family: 'Lucida
Grande', Geneva, Verdana, Arial, sans-serif; background-color:
transparent; font-style: normal; font-variant: normal;
letter-spacing: normal; orphans: auto; text-align: justify;
text-indent: 0px; text-transform: none; white-space: normal;
widows: auto; word-spacing: 0px; -webkit-text-stroke-width:
0px;"><a moz-do-not-send="true" id="d0e3847">5.3.4.2.2. A
RuleBase (possibly defined by Guvnor)</a><a
moz-do-not-send="true" id="d0e3847"><span class="java_plain"
style="color: rgb(0, 0, 0);"></span></a></h5>
<h5 class="title" style="font-size: 9pt; color: rgb(74, 93, 117);
line-height: 15px; margin-top: 0em; font-family: 'Lucida
Grande', Geneva, Verdana, Arial, sans-serif; background-color:
transparent; font-style: normal; font-variant: normal;
letter-spacing: normal; orphans: auto; text-align: justify;
text-indent: 0px; text-transform: none; white-space: normal;
widows: auto; word-spacing: 0px; -webkit-text-stroke-width:
0px;"><a moz-do-not-send="true" id="d0e3847"><span
class="java_plain" style="color: rgb(0, 0, 0);"> solverFactory</span><span
class="java_separator" style="color: rgb(0, 0, 0);">.</span><span
class="java_plain" style="color: rgb(0, 0, 0);">getSolverConfig</span><span
class="java_separator" style="color: rgb(0, 0, 0);">().</span><span
class="java_plain" style="color: rgb(0, 0, 0);">getScoreDirectorFactoryConfig</span><span
class="java_separator" style="color: rgb(0, 0, 0);">.</span><span
class="java_plain" style="color: rgb(0, 0, 0);">setRuleBase</span><span
class="java_separator" style="color: rgb(0, 0, 0);">(</span><span
class="java_plain" style="color: rgb(0, 0, 0);">ruleBase</span><span
class="java_separator" style="color: rgb(0, 0, 0);">);</span></a></h5>
<p><br>
How I can get rule base? (If it is correct way do integrate with
guvnor)<br>
</p>
</blockquote>
yes, it's the correct way for optaplanner 5.5.x with drools 5.5.x:<br>
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: <br>
<span class="comment-copy"><code>((InternalKnowledgeBase)
myKnowledgeBase).getRuleBase()</code></span><br>
<br>
See
<a class="moz-txt-link-freetext" href="http://stackoverflow.com/questions/11017613/live-rule-creation-in-drools-planner">http://stackoverflow.com/questions/11017613/live-rule-creation-in-drools-planner</a><br>
IIRC, KnowledgeAgent connects to guvnor and builds a KnowledgeBase.<br>
<br>
<br>
That being said, for optaplanner 6.0.x with drools 6.0.x,<br>
everything is standardized on KieBase (~ drools 6 api) (which is
like the KnowledgeBase in the 5 api).<br>
We recently released 6.0.0.Beta3 (drools, guvnor and optaplanner
release together).<br>
So there's<br>
solverFactory.getSolverConfig().getScoreDirectorFactoryConfig.setKieBase(kieBase);<br>
The optaplanner and drools stuff is pretty stable, even if it's
called Beta3 (CR1 is coming soon),<br>
but I have no idea about the state of guvnor's KieBase support.<br>
<br>
<blockquote cite="mid:51BF102F.9030209@wp.pl" type="cite">
<p> Thanks,<br>
</p>
<br>
<fieldset class="mimeAttachmentHeader"></fieldset>
<br>
<pre wrap="">_______________________________________________
rules-users mailing list
<a class="moz-txt-link-abbreviated" href="mailto:rules-users@lists.jboss.org">rules-users@lists.jboss.org</a>
<a class="moz-txt-link-freetext" href="https://lists.jboss.org/mailman/listinfo/rules-users">https://lists.jboss.org/mailman/listinfo/rules-users</a></pre>
</blockquote>
<br>
</body>
</html>