<div dir="ltr">If you use .../assets/decisiontable1/source you get DRL and not the XLS. You can then use ResourceType.DRL.<br><br>Mentioning because if the name of the asset is a variable (and who knows, perhaps not always a XLS) you won&#39;t need to change your code.<br>
</div><div class="gmail_extra"><br><br><div class="gmail_quote">On 10 April 2013 15:34, ciberg2 <span dir="ltr">&lt;<a href="mailto:joaoguerra72@gmail.com" target="_blank">joaoguerra72@gmail.com</a>&gt;</span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
I managed to get it working thanks to your (precious) help.<br>
<br>
I ended up with this code (I put it here so it can help someone in the<br>
future):<br>
    public static KnowledgeBase readKnowledgeBase(String decisionTable)<br>
<div class="im">            throws Exception {<br>
        UrlResource resource = (UrlResource) ResourceFactory<br>
<br>
</div>.newUrlResource(&quot;<a href="http://localhost:8080/drools-guvnor/rest/packages/myPackage/assets/decisiontable1/binary" target="_blank">http://localhost:8080/drools-guvnor/rest/packages/myPackage/assets/decisiontable1/binary</a>&quot;);<br>

        resource.setBasicAuthentication(&quot;enabled&quot;);<br>
<div class="im">        resource.setUsername(&quot;guest&quot;);<br>
        resource.setPassword(&quot;guest&quot;);<br>
        KnowledgeBuilder kbuilder = KnowledgeBuilderFactory<br>
                .newKnowledgeBuilder();<br>
</div>        kbuilder.add(resource, ResourceType.DTABLE);<br>
<div class="im">        KnowledgeBase kbase = kbuilder.newKnowledgeBase();<br>
        kbase.addKnowledgePackages(kbuilder.getKnowledgePackages());<br>
        return kbase;<br>
    }<br>
<br>
</div>Changed the URL to<br>
<a href="http://localhost:8080/drools-guvnor/rest/packages/myPackage/assets/decisiontable1/binary" target="_blank">http://localhost:8080/drools-guvnor/rest/packages/myPackage/assets/decisiontable1/binary</a><br>
and ResourceType to DTABLE.<br>
<br>
In my real implementation the name of the asset will be a variable of<br>
course.<br>
<br>
<br>
<br>
--<br>
View this message in context: <a href="http://drools.46999.n3.nabble.com/Fire-specific-rules-deployed-in-guvnor-that-reside-in-the-same-package-tp4023266p4023298.html" target="_blank">http://drools.46999.n3.nabble.com/Fire-specific-rules-deployed-in-guvnor-that-reside-in-the-same-package-tp4023266p4023298.html</a><br>

<div class="HOEnZb"><div class="h5">Sent from the Drools: User forum mailing list archive at Nabble.com.<br>
_______________________________________________<br>
rules-users mailing list<br>
<a href="mailto:rules-users@lists.jboss.org">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>
</div></div></blockquote></div><br></div>