<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 18-06-13 09:46, Bartek wrote:<br>
    </div>
    <blockquote cite="mid:51C0106F.2070100@wp.pl" type="cite">
      <meta content="text/html; charset=ISO-8859-1"
        http-equiv="Content-Type">
      <div class="moz-cite-prefix">Thanks for your answer, it helps.<br>
        But just after solving one problem I am facing another. When
        uploading my domain facts to Guvnor I get exception (from guvnor
        logs):<br>
        <br>
        ...<br>
        &nbsp;Servlet.service() for servlet AssetFileServlet threw exception:
        javax.enterprise.event.ObserverException<br>
        ...<br>
        Caused by: <b>java.lang.NoClassDefFoundError:
          org/drools/planner/core/solution/Solution</b><br>
        &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; at java.lang.ClassLoader.defineClass1(Native Method)
        [rt.jar:1.7.0_07]<br>
        ...<br>
        <br>
        I suppose there are no&nbsp; Optaplanner classes on guvnor classpath.
        Should they be? Or mayby guvnor do not need my problem
        definition(so guvnor wont need to use Solution interface )?<br>
      </div>
    </blockquote>
    Your domain classes will have @PlanningEntity and @PlanningVariable
    annotations (as well as the Solution interface),<br>
    so you'll need to add the optaplanner-core jar (just as you added
    your domain model jar) into guvnor.<br>
    <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>
    <blockquote cite="mid:51C0106F.2070100@wp.pl" type="cite">
      <div class="moz-cite-prefix"> <br>
        <br>
        W dniu 2013-06-17 15:52, Geoffrey De Smet pisze:<br>
      </div>
      <blockquote cite="mid:51BF14AA.70909@gmail.com" type="cite">
        <meta content="text/html; charset=ISO-8859-1"
          http-equiv="Content-Type">
        <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&nbsp; should be integrated? I am using
          Drools 5.5.0.Final. I have configuration&nbsp; 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.&nbsp;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);">&nbsp;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 moz-do-not-send="true" 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>
        &nbsp;
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 moz-do-not-send="true" class="moz-txt-link-abbreviated" href="mailto:rules-users@lists.jboss.org">rules-users@lists.jboss.org</a>
<a moz-do-not-send="true" 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>
        <br>
        <fieldset class="mimeAttachmentHeader"></fieldset>
        <br>
        <pre wrap="">_______________________________________________
rules-users mailing list
<a moz-do-not-send="true" class="moz-txt-link-abbreviated" href="mailto:rules-users@lists.jboss.org">rules-users@lists.jboss.org</a>
<a moz-do-not-send="true" 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>
      <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>