<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 19-09-13 09:56, SNELS Nick wrote:<br>
    </div>
    <blockquote cite="mid:4E40FACF43E9614B8C999B2DCB96CD82CE3B35@jutter"
      type="cite">
      <meta http-equiv="Content-Type" content="text/html;
        charset=ISO-8859-1">
      <style>
<!--
@font-face
        {font-family:Calibri}
@font-face
        {font-family:"Trebuchet MS"}
p.MsoNormal, li.MsoNormal, div.MsoNormal
        {margin:0cm;
        margin-bottom:.0001pt;
        font-size:11.0pt;
        font-family:"Calibri","sans-serif"}
a:link, span.MsoHyperlink
        {color:blue;
        text-decoration:underline}
a:visited, span.MsoHyperlinkFollowed
        {color:purple;
        text-decoration:underline}
span.E-mailStijl17
        {font-family:"Trebuchet MS","sans-serif";
        color:windowtext}
.MsoChpDefault
        {}
@page WordSection1
        {margin:70.85pt 70.85pt 70.85pt 70.85pt}
div.WordSection1
        {}
-->
</style>
      <div class="WordSection1">
        <p class="MsoNormal"><span style="font-size:10.0pt;
            font-family:&quot;Trebuchet MS&quot;,&quot;sans-serif&quot;">Hi,</span></p>
        <p class="MsoNormal"><span style="font-size:10.0pt;
            font-family:&quot;Trebuchet MS&quot;,&quot;sans-serif&quot;">&nbsp;</span></p>
        <p class="MsoNormal"><span style="font-size:10.0pt;
            font-family:&quot;Trebuchet MS&quot;,&quot;sans-serif&quot;">I
            have the following Drools rule in Optaplanner:</span></p>
        <p class="MsoNormal"><span style="font-size:10.0pt;
            font-family:&quot;Trebuchet MS&quot;,&quot;sans-serif&quot;">&nbsp;</span></p>
        <p class="MsoNormal"><span style="font-size:10.0pt;
            font-family:&quot;Trebuchet MS&quot;,&quot;sans-serif&quot;">rule
            "oneShiftPerDay"</span></p>
        <p class="MsoNormal"><span style="font-size:10.0pt;
            font-family:&quot;Trebuchet MS&quot;,&quot;sans-serif&quot;">&nbsp;&nbsp;&nbsp;
            when</span></p>
        <p class="MsoNormal"><span style="font-size:10.0pt;
            font-family:&quot;Trebuchet MS&quot;,&quot;sans-serif&quot;">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
            $leftAssignment : ShiftAssignment($leftId : id, $employee :
            employee, $shiftDate : shiftDate, employee != null)</span></p>
        <p class="MsoNormal"><span style="font-size:10.0pt;
            font-family:&quot;Trebuchet MS&quot;,&quot;sans-serif&quot;">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
            $rightAssignment : ShiftAssignment(employee == $employee,
            shiftDate == $shiftDate, id &gt; $leftId)</span></p>
        <p class="MsoNormal"><span style="font-size:10.0pt;
            font-family:&quot;Trebuchet MS&quot;,&quot;sans-serif&quot;">&nbsp;&nbsp;&nbsp;
            then</span></p>
        <p class="MsoNormal"><span style="font-size:10.0pt;
            font-family:&quot;Trebuchet MS&quot;,&quot;sans-serif&quot;">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
            scoreHolder.addHardConstraintMatch(kcontext, -1);</span></p>
        <p class="MsoNormal"><span style="font-size:10.0pt;
            font-family:&quot;Trebuchet MS&quot;,&quot;sans-serif&quot;">end</span></p>
        <p class="MsoNormal"><span style="font-size:10.0pt;
            font-family:&quot;Trebuchet MS&quot;,&quot;sans-serif&quot;">&nbsp;</span></p>
        <p class="MsoNormal"><span style="font-size:10.0pt;
            font-family:&quot;Trebuchet MS&quot;,&quot;sans-serif&quot;">But
            when I run the solver I get the following error:</span></p>
        <p class="MsoNormal"><span style="font-size:10.0pt;
            font-family:&quot;Trebuchet MS&quot;,&quot;sans-serif&quot;">&nbsp;</span></p>
        <p class="MsoNormal"><span style="font-size:10.0pt;
            font-family:&quot;Trebuchet MS&quot;,&quot;sans-serif&quot;">09:02:46.128
            [main] ERROR o.d.c.k.b.impl.AbstractKieModule - Unable to
            build KieBaseModel:defaultKieBase</span></p>
        <p class="MsoNormal"><span style="font-size:10.0pt;
            font-family:&quot;Trebuchet MS&quot;,&quot;sans-serif&quot;">Error
            importing :
            'be.comp.permanenties.domain.solver.EmployeeAssignmentTotal'</span></p>
        <p class="MsoNormal"><span style="font-size:10.0pt;
            font-family:&quot;Trebuchet MS&quot;,&quot;sans-serif&quot;">Error
            importing :
            'be.comp.permanenties.domain.solver.EmployeeWorkSequence'</span></p>
        <p class="MsoNormal"><span style="font-size:10.0pt;
            font-family:&quot;Trebuchet MS&quot;,&quot;sans-serif&quot;">Rule
            Compilation error : [Rule name='oneShiftPerDay']</span></p>
        <p class="MsoNormal"><span style="font-size:10.0pt;
            font-family:&quot;Trebuchet MS&quot;,&quot;sans-serif&quot;">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
            be/comp/permanenties/solver/Rule_oneShiftPerDay544009415.java
            (2:220) : Only a type can be imported.
            be.comp.permanenties.domain.solver.EmployeeWorkSequence
            resolves to a package</span></p>
        <p class="MsoNormal"><span style="font-size:10.0pt;
            font-family:&quot;Trebuchet MS&quot;,&quot;sans-serif&quot;">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
            be/comp/permanenties/solver/Rule_oneShiftPerDay544009415.java
            (2:978) :</span></p>
      </div>
    </blockquote>
    Take a look at line 2 of your drl file.
    <blockquote cite="mid:4E40FACF43E9614B8C999B2DCB96CD82CE3B35@jutter"
      type="cite">
      <div class="WordSection1">
        <p class="MsoNormal"><span style="font-size:10.0pt;
            font-family:&quot;Trebuchet MS&quot;,&quot;sans-serif&quot;">
            Only a type can be imported.
            be.comp.permanenties.domain.solver.EmployeeAssignmentTotal
            resolves to a package</span></p>
      </div>
    </blockquote>
    Apparently it says something like<br>
    &nbsp; "import be.comp.permanenties.domain.solver.EmployeeAssignmentTotal"<br>
    and then take a look at your java packages and classes<br>
    if that exists as a class (and is case sensitive correct).<br>
    <br>
    <blockquote cite="mid:4E40FACF43E9614B8C999B2DCB96CD82CE3B35@jutter"
      type="cite">
      <div class="WordSection1">
        <p class="MsoNormal"><span style="font-size:10.0pt;
            font-family:&quot;Trebuchet MS&quot;,&quot;sans-serif&quot;">&nbsp;</span></p>
        <p class="MsoNormal"><span style="font-size:10.0pt;
            font-family:&quot;Trebuchet MS&quot;,&quot;sans-serif&quot;">How
            can I solve this error? Thanks.
          </span></p>
        <p class="MsoNormal"><span style="font-size:10.0pt;
            font-family:&quot;Trebuchet MS&quot;,&quot;sans-serif&quot;">&nbsp;</span></p>
        <p class="MsoNormal"><span style="font-size:10.0pt;
            font-family:&quot;Trebuchet MS&quot;,&quot;sans-serif&quot;">Kind
            regards,</span></p>
        <p class="MsoNormal"><span style="font-size:10.0pt;
            font-family:&quot;Trebuchet MS&quot;,&quot;sans-serif&quot;">&nbsp;</span></p>
        <p class="MsoNormal"><span style="font-size:10.0pt;
            font-family:&quot;Trebuchet MS&quot;,&quot;sans-serif&quot;">Nick</span></p>
      </div>
    </blockquote>
    Out of curiosity, what kind of employee scheduling do you do at the
    OCMW?<br>
    That would make an interesting, understandable, tangible use case to
    blog about it :)<br>
    <blockquote cite="mid:4E40FACF43E9614B8C999B2DCB96CD82CE3B35@jutter"
      type="cite">
      <div class="WordSection1">
      </div>
      <br>
      <a moz-do-not-send="true" href="http://www.ocmwturnhout.be"><img
          moz-do-not-send="true"
src="http://www.ocmwturnhout.be/_uploads/ocmw.turnhout.be/Afbeeldingen/werkenbijocmwturnhout.jpg"
          alt="http://www.ocmwturnhout.be" height="107" width="480">
      </a>
      <p style="font-size:9px; font-family:'Trebuchet MS'"><br>
        Dit bericht is onderworpen aan de bepalingen van onze <a
          moz-do-not-send="true"
          href="http://www.ocmwturnhout.be/nl/content/2436">
          disclaimer</a> </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>