[rules-users] Fire specific rules deployed in guvnor that reside in the same package
Michael Anstis
michael.anstis at gmail.com
Tue Apr 9 13:27:49 EDT 2013
The rules in a XLS file form a "Decision Table." Each row in the XLS would
compile into a separate rule.
I suspect the asset you have created in Guvnor is called "rule1" and
represents a single XLS file.
Without seeing the XLS file it is impossible to comment further, but I
suspect again that it contains multiple rows.
With kind regards,
Mike
On 9 April 2013 17:54, ciberg2 <joaoguerra72 at gmail.com> wrote:
> Hi, I have Guvnor running with a package that has several BPMN processes
> and
> now I'm adding rules to it.
>
> The rules are made in Excel files and built into the package.
>
> I have a web application in JAVA that fires the rules and if I have only
> one
> rule in the package it works fine.
> But if I deploy more than one rule to the package the result is a list with
> the result of applying the input to all the rules that exist in the
> package.
>
> I tried using this as URL with no success, drools applies the input to all
> the rules in the package:
>
> http://127.0.0.1:8080/drools-guvnor/org.drools.guvnor.Guvnor/package/merap/LATEST/rule1
>
> How should I organize the rules? One package for each? It doesn't seem a
> good solution to me.
> Is it possible to fire only a specific rule? If yes, how?
>
> I use this code:
> public static KnowledgeBase readKnowledgeBase()
> throws Exception {
> UrlResource resource = (UrlResource) ResourceFactory
>
> .newUrlResource("
> http://127.0.0.1:8080/drools-guvnor/org.drools.guvnor.Guvnor/package/myPackage/LATEST
> ");
> resource.setBasicAuthentication("enabled");
> resource.setUsername("guest");
> resource.setPassword("guest");
> KnowledgeBuilder kbuilder = KnowledgeBuilderFactory
> .newKnowledgeBuilder();
> kbuilder.add(resource, ResourceType.PKG);
> KnowledgeBase kbase = kbuilder.newKnowledgeBase();
> kbase.addKnowledgePackages(kbuilder.getKnowledgePackages());
> return kbase;
> }
>
>
> Thank you
>
>
>
> --
> View this message in context:
> http://drools.46999.n3.nabble.com/Fire-specific-rules-deployed-in-guvnor-that-reside-in-the-same-package-tp4023266.html
> Sent from the Drools: User forum mailing list archive at Nabble.com.
> _______________________________________________
> rules-users mailing list
> rules-users at lists.jboss.org
> https://lists.jboss.org/mailman/listinfo/rules-users
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.jboss.org/pipermail/rules-users/attachments/20130409/96df3122/attachment.html
More information about the rules-users
mailing list