<html>
<head>
<meta content="text/html; charset=ISO-8859-1"
http-equiv="Content-Type">
</head>
<body bgcolor="#FFFFFF" text="#000000">
Thanks for the clear recipe!<br>
<br>
I've documented step 2 and 3 in the optaplanner manual (step 1 is
already partially documented and the other part is documented in
guvnor's docs).<br>
<br>
Step 4 sounds like a bug, so please raise an issue<br>
if uploading the optaplanner-core jar as a POJO model jar, still
causes a NoClassDefFoundError unless you put the jar in guvnor's
WEB-INF/lib dir too:<br>
<a class="moz-txt-link-freetext" href="https://issues.jboss.org/browse/GUVNOR">https://issues.jboss.org/browse/GUVNOR</a><br>
<br>
<div class="moz-cite-prefix">On 25-06-13 14:12, Bartek wrote:<br>
</div>
<blockquote cite="mid:51C98948.4060002@wp.pl" type="cite">
<meta content="text/html; charset=ISO-8859-1"
http-equiv="Content-Type">
<div class="moz-cite-prefix">I get it to work. Four steps where
needed:<br>
1. Adding <br>
<br>
private KnowledgeBase <b>kBase</b>;//injected with Spring<br>
....<br>
// Build the Solver<br>
SolverFactory solverFactory = new
XmlSolverFactory("/planner/solverConfig.xml");<br>
RuleBase ruleBase = ((InternalKnowledgeBase) <b>kBase</b>).getRuleBase();<br>
solverFactory.getSolverConfig().getScoreDirectorFactoryConfig().setRuleBase(ruleBase);<br>
<br>
to my code to link Guvnor and solverFactory.<br>
<br>
And spring integration with Drools:<br>
<br>
<drools:kbase id="knowledgeBase"/><br>
<drools:kagent kbase="knowledgeBase" id="kagent"
new-instance="false"> <br>
<drools:resources> <br>
<drools:resource type="PKG" <br>
source="${drools.url}"<br>
basic-authentication="enabled" <br>
username="admin" <br>
password="admin"/> <br>
</drools:resources> <br>
</drools:kagent><br>
<br>
<bean id="planner" class="..."><br>
<property name="<b>kBase</b>"
ref="knowledgeBase"/><br>
</bean><br>
<br>
2. Importing drools-planner-core-5.5.0.Final.jar in Guvnor
(Upload POJO Model jar)<br>
3. Adding global in Guvnor:<br>
global
org.drools.planner.core.score.buildin.hardandsoft.HardAndSoftScoreHolder
scoreHolder <br>
4. Adding drools-planner-core-5.5.0.Final.jar to WEB-INF/lib in
Guvnor instalation directory. Without that I still get
NoClassDefFoundError while importing my domain in Guvnor.<br>
<br>
Best regards<br>
<br>
W dniu 2013-06-18 10:52, Geoffrey De Smet pisze:<br>
</div>
<blockquote cite="mid:51C01FD4.10400@gmail.com" type="cite">
<meta content="text/html; charset=ISO-8859-1"
http-equiv="Content-Type">
<br>
<blockquote cite="mid:51C0106F.2070100@wp.pl" type="cite">
<div class="moz-cite-prefix"> <br>
Is it generally good idea to try use guvnor to define
scores? <br>
</div>
</blockquote>
Yes, if you need that flexibility, as it allows you to change
your score rules through the guvnor web interface.<br>
However, this is mostly uncharted territory: some users have
already successfully done it (there are mails on this mailing
list's archive),<br>
but there's little documentation and no example for it. Feel to
do a write up once you get it to work, for the next person
wanting to do this :)<br>
<br>
</blockquote>
<br>
<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>