<div dir="ltr"><div>The rules in a XLS file form a "Decision Table." Each row in the XLS would compile into a separate rule.<br><br></div>I suspect the asset you have created in Guvnor is called "rule1" and represents a single XLS file. <br>
<br>Without seeing the XLS file it is impossible to comment further, but I suspect again that it contains multiple rows.<br><br>With kind regards,<br><br>Mike<br></div><div class="gmail_extra"><br><br><div class="gmail_quote">
On 9 April 2013 17:54, ciberg2 <span dir="ltr"><<a href="mailto:joaoguerra72@gmail.com" target="_blank">joaoguerra72@gmail.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
Hi, I have Guvnor running with a package that has several BPMN processes and<br>
now I'm adding rules to it.<br>
<br>
The rules are made in Excel files and built into the package.<br>
<br>
I have a web application in JAVA that fires the rules and if I have only one<br>
rule in the package it works fine.<br>
But if I deploy more than one rule to the package the result is a list with<br>
the result of applying the input to all the rules that exist in the package.<br>
<br>
I tried using this as URL with no success, drools applies the input to all<br>
the rules in the package:<br>
<a href="http://127.0.0.1:8080/drools-guvnor/org.drools.guvnor.Guvnor/package/merap/LATEST/rule1" target="_blank">http://127.0.0.1:8080/drools-guvnor/org.drools.guvnor.Guvnor/package/merap/LATEST/rule1</a><br>
<br>
How should I organize the rules? One package for each? It doesn't seem a<br>
good solution to me.<br>
Is it possible to fire only a specific rule? If yes, how?<br>
<br>
I use this code:<br>
public static KnowledgeBase readKnowledgeBase()<br>
throws Exception {<br>
UrlResource resource = (UrlResource) ResourceFactory<br>
<br>
.newUrlResource("<a href="http://127.0.0.1:8080/drools-guvnor/org.drools.guvnor.Guvnor/package/myPackage/LATEST" target="_blank">http://127.0.0.1:8080/drools-guvnor/org.drools.guvnor.Guvnor/package/myPackage/LATEST</a>");<br>
resource.setBasicAuthentication("enabled");<br>
resource.setUsername("guest");<br>
resource.setPassword("guest");<br>
KnowledgeBuilder kbuilder = KnowledgeBuilderFactory<br>
.newKnowledgeBuilder();<br>
kbuilder.add(resource, ResourceType.PKG);<br>
KnowledgeBase kbase = kbuilder.newKnowledgeBase();<br>
kbase.addKnowledgePackages(kbuilder.getKnowledgePackages());<br>
return kbase;<br>
}<br>
<br>
<br>
Thank you<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-tp4023266.html" target="_blank">http://drools.46999.n3.nabble.com/Fire-specific-rules-deployed-in-guvnor-that-reside-in-the-same-package-tp4023266.html</a><br>
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>
</blockquote></div><br></div>