<div dir="ltr">Succeed to create a KieBuilder with the following change :<div><br></div><div><pre class="" style="word-wrap:break-word;width:763px;margin-top:0px;margin-bottom:0px;padding:0px"><div class="" id="file-gistfile1-txt-LC54">
<font color="#000000" face="Consolas, Liberation Mono, Courier, monospace"><span style="line-height:15.994318008422852px">        KieFileSystem kfs = kieServices.newKieFileSystem()
                .write(&quot;src/main/resources/temp.drl&quot;, packages)
                .writeKModuleXML(createKieProjectWithPackages(kieServices).toXML());</span></font><font color="#000000" face="Consolas, Liberation Mono, Courier, monospace"><span style="line-height:16px"><br></span></font></div>
<div class="" id="file-gistfile1-txt-LC54"><font color="#000000" face="Consolas, Liberation Mono, Courier, monospace"><span style="line-height:15.994318008422852px"><br></span></font></div><div class="" id="file-gistfile1-txt-LC54" style>
<font color="#000000" face="Consolas, Liberation Mono, Courier, monospace"><span style="line-height:15.994318008422852px">As you see adding &quot;src/main/resources/temp.drl&quot; is required otherwise (but I don&#39;t know why for the moment) the string is not parsed by Drools parse and no packages are added</span></font></div>
<div class="" id="file-gistfile1-txt-LC54" style><font color="#000000" face="Consolas, Liberation Mono, Courier, monospace"><span style="line-height:15.994318008422852px"><br></span></font></div><div class="" id="file-gistfile1-txt-LC54" style>
<font color="#000000" face="Consolas, Liberation Mono, Courier, monospace"><span style="line-height:15.994318008422852px">Remark : Could it be possible that we have a bung as normally we should be able to create a KieFileSystem without passing location of an non existent drl file &quot;</span></font><span style="color:rgb(0,0,0);font-family:Consolas,&#39;Liberation Mono&#39;,Courier,monospace;line-height:15.994318008422852px">src/main/resources/temp.drl</span><span style="line-height:15.994318008422852px;color:rgb(0,0,0);font-family:Consolas,&#39;Liberation Mono&#39;,Courier,monospace">&quot; ?</span></div>
</pre></div><div class="gmail_extra"><br><br><div class="gmail_quote">On Tue, Apr 23, 2013 at 8:22 AM, Jervis Liu <span dir="ltr">&lt;<a href="mailto:jliu@redhat.com" target="_blank">jliu@redhat.com</a>&gt;</span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
  
    
  
  <div text="#000000" bgcolor="#FFFFFF"><div class="im">
    <div>On 2013/4/19 19:40, Charles Moulliard
      wrote:<br>
    </div>
    <blockquote type="cite">
      <div dir="ltr">Hi,
        <div><br>
        </div>
        <div>I try to fetch using REST from Guvnor the mortgages
          packages, drl, .. . With the String retrieved, I would like to
          recreate a Knowledge repository to insert a fact in a session
          and fire Drools rules</div>
        <div><br>
        </div>
        <div>Here is the code :</div>
        <div><br>
        </div>
        <div><a href="https://gist.github.com/cmoulliard/4e9b6dc3ff384715ff9a" target="_blank">https://gist.github.com/cmoulliard/4e9b6dc3ff384715ff9a</a></div>
      </div>
    </blockquote></div>
    Hi, your code looks alright. What content did you get back from URL
    <a href="http://127.0.0.1:8080/guvnor.war/rest/packages/mortgages/source" target="_blank">http://127.0.0.1:8080/guvnor.war/rest/packages/mortgages/source</a> ?
    and did you see any errors on servers log?<br>
    <br>
    Cheers,<br>
    Jervis<br>
    <blockquote type="cite"><div class="im">
      <div dir="ltr">
        <div><br>
        </div>
        <div>Apparently no packages have been created from source /
          string retrieved. What is wrong ?</div>
        <div><br>
        </div>
        <div>Regards,<br clear="all">
          <div><br>
          </div>
          -- <br>
          <div>Charles Moulliard</div>
          <div>Apache Committer / Sr. Enterprise Architect (RedHat)</div>
          <div>Twitter : @cmoulliard | Blog : <a href="http://cmoulliard.blogspot.com" target="_blank">http://cmoulliard.blogspot.com</a></div>
          <div><br>
          </div>
        </div>
      </div>
      <br>
      <fieldset></fieldset>
      <br>
      </div><pre>_______________________________________________
rules-dev mailing list
<a href="mailto:rules-dev@lists.jboss.org" target="_blank">rules-dev@lists.jboss.org</a>
<a href="https://lists.jboss.org/mailman/listinfo/rules-dev" target="_blank">https://lists.jboss.org/mailman/listinfo/rules-dev</a></pre>
    </blockquote>
    <br>
  </div>

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