<div dir="ltr">Can it be done for the drl file pointed at xml file? Instead of pass the path to drl file, the drl content?<div><br></div><div>here&#39;s what i&#39;ve done to use the xml by java over the cloudcomputing example:</div>

<div><br></div><div>--------------------</div><div><br></div><div><div><div>String t = &quot;&lt;?xml version=\&quot;1.0\&quot; encoding=\&quot;UTF-8\&quot;?&gt;&lt;solver&gt;&lt;solutionClass&gt;org.drools.planner.examples.cloudbalancing.domain.CloudBalance&lt;/solutionClass&gt;&lt;planningEntityClass&gt;org.drools.planner.examples.cloudbalancing.domain.CloudProcess&lt;/planningEntityClass&gt;&lt;scoreDirectorFactory&gt;&lt;scoreDefinitionType&gt;HARD_AND_SOFT&lt;/scoreDefinitionType&gt;&lt;scoreDrl&gt;/org/drools/planner/examples/cloudbalancing/solver/cloudBalancingScoreRules.drl&lt;/scoreDrl&gt;&lt;/scoreDirectorFactory&gt;&lt;termination&gt;&lt;maximumSecondsSpend&gt;120&lt;/maximumSecondsSpend&gt;&lt;/termination&gt;&lt;constructionHeuristic&gt;&lt;constructionHeuristicType&gt;FIRST_FIT_DECREASING&lt;/constructionHeuristicType&gt;&lt;constructionHeuristicPickEarlyType&gt;FIRST_LAST_STEP_SCORE_EQUAL_OR_IMPROVING&lt;/constructionHeuristicPickEarlyType&gt;&lt;/constructionHeuristic&gt;&lt;localSearch&gt;&lt;acceptor&gt;&lt;planningEntityTabuSize&gt;7&lt;/planningEntityTabuSize&gt;&lt;/acceptor&gt;&lt;forager&gt;&lt;minimalAcceptedSelection&gt;1000&lt;/minimalAcceptedSelection&gt;&lt;/forager&gt;&lt;/localSearch&gt;&lt;/solver&gt;&quot;;</div>
<div><br></div><div>    <span class="" style="white-space:pre">        </span>byte b[] = t.getBytes();</div><div>    <span class="" style="white-space:pre">        </span>ByteArrayInputStream bt = new ByteArrayInputStream(b);</div><div>
        SolverFactory solverFactory = new XmlSolverFactory().configure(bt);</div><div>        Solver solver = solverFactory.buildSolver();</div></div></div><div>---------------------</div><div><br></div><div style>cloudBalancingScoreRules.drl is the file I want to get from database as text and apply it to the xml. Is it possible to do inside this configuration or will I have to implement a xml file pointing it everytime?</div>
<div><br></div><div class="gmail_extra"><br><br><div class="gmail_quote">
2013/1/22 Geoffrey De Smet <span dir="ltr">&lt;<a href="mailto:ge0ffrey.spam@gmail.com" target="_blank">ge0ffrey.spam@gmail.com</a>&gt;</span><br><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-color:rgb(204,204,204);border-left-style:solid;padding-left:1ex">


  
    
  
  <div bgcolor="#FFFFFF" text="#000000">
    Use a ByteArrayInputStream based on that String<br>
    and give it to:<br>
    org.drools.planner.config.XmlSolverFactory#configure(InputStream)<br>
    <br>
    <div>Op 22-01-13 15:51, André Fróes schreef:<br>
    </div>
    <blockquote type="cite">
      <div dir="ltr">Can I provide the plain xml code to a
        SolverFactory?
        <div><br>
        </div>
        <div>SolverFactory solverFactory = new
          XmlSolverFactory(&lt;&lt;xmlHere&gt;&gt;);<br>
        </div>
        <div><br>
        </div>
        <div>I know that I can provide the path to a config
          file.</div>
      </div>
      <br>
      <fieldset></fieldset>
      <br>
      <pre>_______________________________________________
rules-users mailing list
<a href="mailto:rules-users@lists.jboss.org" target="_blank">rules-users@lists.jboss.org</a>
<a href="https://lists.jboss.org/mailman/listinfo/rules-users" target="_blank">https://lists.jboss.org/mailman/listinfo/rules-users</a>
</pre>
    </blockquote>
    <br>
  </div>

<br>_______________________________________________<br>
rules-users mailing list<br>
<a href="mailto:rules-users@lists.jboss.org" target="_blank">rules-users@lists.jboss.org</a><br>
<a href="https://lists.jboss.org/mailman/listinfo/rules-users" target="_blank">https://lists.jboss.org/mailman/listinfo/rules-users</a><br>
<br></blockquote></div><br></div></div>