[rules-users] Ignore subsequent conditions in a Decision Table based on previous condition
Hi, I'm new to Drools and I'm implementing rules using Excel decision tables and I need some of your help. I have some rules in which depending on a condition the following condition is not necessary, how can I define a table that akllows to define this? For instance I have: CONDITION CONDITION CONDITION ACTION Y result1 NN Y result2 NN N result3 NY N result4 NY Y result5 In the example above (I hope you can see it right) if the first condition value is Y the other 2 conditions values don't matter and despite their value the result will always be the same. I wouldn't want to have to write all the possible combinations as these in the real case will add a lot of complexity to the tables. How can I accomplish this? Is it possible to do it in Excel? If not, how can I do it in another way (for instantance with guvnor web-based tables). -- View this message in context: http://drools.46999.n3.nabble.com/Ignore-subsequent-conditions-in-a-Decision-Table-based-on-previous-condition-tp4022778.html Sent from the Drools: User forum mailing list archive at Nabble.com. ___ rules-users mailing list rules-users@lists.jboss.org https://lists.jboss.org/mailman/listinfo/rules-users
Re: [rules-users] Ignore subsequent conditions in a Decision Table based on previous condition
manstis, thank you for your fast reply! I can't believe it was so simple and I couldn't find the answer :) (bangs head against the wall). I will do that then. Thank you again. -- View this message in context: http://drools.46999.n3.nabble.com/Ignore-subsequent-conditions-in-a-Decision-Table-based-on-previous-condition-tp4022778p4022780.html Sent from the Drools: User forum mailing list archive at Nabble.com. ___ rules-users mailing list rules-users@lists.jboss.org https://lists.jboss.org/mailman/listinfo/rules-users
[rules-users] Fire specific rules deployed in guvnor that reside in the same package
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@lists.jboss.org https://lists.jboss.org/mailman/listinfo/rules-users
Re: [rules-users] Fire specific rules deployed in guvnor that reside in the same package
Hi, thank you for the fast reply. Let me try to explain, I have several decision tables, each decision table corresponds to an Excel file. Each XLS has several rows that correspond to the options for that decision table. When I transcribed to the post I incorrectly changed the name of the asset to rule1 when it is in fact decisiontable1. If you want to see here is decisiontable1 - https://dl.dropbox.com/u/1799315/decisiontable1.xls And here is decisiontable2 - https://dl.dropbox.com/u/1799315/decisiontable2.xls When I fire the rules, let's say with Y,Y,Y, I get this as result - [answer2,answer8] I want only to get the result from decisiontable1 and whatever I use as URL I get always a result of the two tables. I tried - http://127.0.0.1:8080/drools-guvnor/org.drools.guvnor.Guvnor/package/myPackage/LATEST and http://127.0.0.1:8080/drools-guvnor/org.drools.guvnor.Guvnor/package/myPackage/LATEST/decisiontable1 Thank you and I hope i've been clear now. -- View this message in context: http://drools.46999.n3.nabble.com/Fire-specific-rules-deployed-in-guvnor-that-reside-in-the-same-package-tp4023266p4023276.html Sent from the Drools: User forum mailing list archive at Nabble.com. ___ rules-users mailing list rules-users@lists.jboss.org https://lists.jboss.org/mailman/listinfo/rules-users
Re: [rules-users] Fire specific rules deployed in guvnor that reside in the same package
I use the JBPM eclipse plugin and commit the Excel decision tables into the repository, then I build the package. Is this what you needed to know? -- View this message in context: http://drools.46999.n3.nabble.com/Fire-specific-rules-deployed-in-guvnor-that-reside-in-the-same-package-tp4023266p4023291.html Sent from the Drools: User forum mailing list archive at Nabble.com. ___ rules-users mailing list rules-users@lists.jboss.org https://lists.jboss.org/mailman/listinfo/rules-users
Re: [rules-users] Fire specific rules deployed in guvnor that reside in the same package
They don't difer. Whether I use http://127.0.0.1:8080/drools-guvnor/org.drools.guvnor.Guvnor/package/myPackage/LATEST/decisiontable1 or http://127.0.0.1:8080/drools-guvnor/org.drools.guvnor.Guvnor/package/myPackage/LATEST the result is the same, I get 2 results, one for each table. (i.e. [answer2, answer10] ) where answer2 is the result of decisiontable1 and answer10 is the result of decisiontable2. I did some googling and the only solutions I found were people putting each table in a indivudual package, but that doesn't seem a good solution. Someone talked about changeSet.xml but I could understand how to use it to solve my problem. -- View this message in context: http://drools.46999.n3.nabble.com/Fire-specific-rules-deployed-in-guvnor-that-reside-in-the-same-package-tp4023266p4023294.html Sent from the Drools: User forum mailing list archive at Nabble.com. ___ rules-users mailing list rules-users@lists.jboss.org https://lists.jboss.org/mailman/listinfo/rules-users
Re: [rules-users] Fire specific rules deployed in guvnor that reside in the same package
I managed to get it working thanks to your (precious) help. I ended up with this code (I put it here so it can help someone in the future): public static KnowledgeBase readKnowledgeBase(String decisionTable) throws Exception { UrlResource resource = (UrlResource) ResourceFactory .newUrlResource("http://localhost:8080/drools-guvnor/rest/packages/myPackage/assets/decisiontable1/binary";); resource.setBasicAuthentication("enabled"); resource.setUsername("guest"); resource.setPassword("guest"); KnowledgeBuilder kbuilder = KnowledgeBuilderFactory .newKnowledgeBuilder(); kbuilder.add(resource, ResourceType.DTABLE); KnowledgeBase kbase = kbuilder.newKnowledgeBase(); kbase.addKnowledgePackages(kbuilder.getKnowledgePackages()); return kbase; } Changed the URL to http://localhost:8080/drools-guvnor/rest/packages/myPackage/assets/decisiontable1/binary and ResourceType to DTABLE. In my real implementation the name of the asset will be a variable of course. -- View this message in context: http://drools.46999.n3.nabble.com/Fire-specific-rules-deployed-in-guvnor-that-reside-in-the-same-package-tp4023266p4023298.html Sent from the Drools: User forum mailing list archive at Nabble.com. ___ rules-users mailing list rules-users@lists.jboss.org https://lists.jboss.org/mailman/listinfo/rules-users
Re: [rules-users] Fire specific rules deployed in guvnor that reside in the same package
I tried that just now and I get this exception: Caused by: org.drools.compiler.DroolsParserException: Unexpected exception raised while parsing. This is a bug. Please contact the Development team : 15:39:37,332 ERROR [stderr] (http--0.0.0.0-8080-3) Index: 726, Size: 726 -- View this message in context: http://drools.46999.n3.nabble.com/Fire-specific-rules-deployed-in-guvnor-that-reside-in-the-same-package-tp4023266p4023301.html Sent from the Drools: User forum mailing list archive at Nabble.com. ___ rules-users mailing list rules-users@lists.jboss.org https://lists.jboss.org/mailman/listinfo/rules-users
Re: [rules-users] Fire specific rules deployed in guvnor that reside in the same package
This is the file I get using http://localhost:8080/drools-guvnor/rest/packages/myPackage/assets/decisiontable1/source https://dl.dropbox.com/u/1799315/source Using http://localhost:8080/drools-guvnor/rest/packages/myPackage/assets/decisiontable1/binary I get the Excel file. Do you need something else? -- View this message in context: http://drools.46999.n3.nabble.com/Fire-specific-rules-deployed-in-guvnor-that-reside-in-the-same-package-tp4023266p4023304.html Sent from the Drools: User forum mailing list archive at Nabble.com. ___ rules-users mailing list rules-users@lists.jboss.org https://lists.jboss.org/mailman/listinfo/rules-users
Re: [rules-users] Fire specific rules deployed in guvnor that reside in the same package
The file I uploaded it's exactly what I obtain when using the URL http://localhost:8080/drools-guvnor/rest/packages/myPackage/assets/decisiontable1/source Dropbox is not changing anything, I confirm that the file I get with the URL is not a text file. -- View this message in context: http://drools.46999.n3.nabble.com/Fire-specific-rules-deployed-in-guvnor-that-reside-in-the-same-package-tp4023266p4023308.html Sent from the Drools: User forum mailing list archive at Nabble.com. ___ rules-users mailing list rules-users@lists.jboss.org https://lists.jboss.org/mailman/listinfo/rules-users
[rules-users] Deploy package across several Drools-Guvnor servers (unattended)
Hi, I have a application that will be installed in several locations, and because of connection constraints, each location will run its own Drools-Guvnor server with a deployed package consisting of decision tables and BPMN processes. I want to make possible that when some asset is changed centrally, this change can be deployed (or replicated) across all Drools servers. I read about KnowledgeAgent to make hot deployments, but as far as I understood someone has to still build the package in each of the servers. Is it possible to do what I want? If yes please give me some tips on how to do it. If not what can I do to solve the deployment across multiple servers problem? -- View this message in context: http://drools.46999.n3.nabble.com/Deploy-package-across-several-Drools-Guvnor-servers-unattended-tp4023348.html Sent from the Drools: User forum mailing list archive at Nabble.com. ___ rules-users mailing list rules-users@lists.jboss.org https://lists.jboss.org/mailman/listinfo/rules-users
[rules-users] Maintain assets synchronized between members of a team
Hi, My Drools project is going well and now it's time for some people starting creating and deploying new Excel decision tables onto the repository. For that we are using the Eclipse plugin, I've created a general project that replicates the package structure so everyone can start deploying these new tables. My problem is maintaining all the projects in each team member computer synchronized. Using Eclipse Tools I can commit and update existing assets but I've not found a way to get all the new assets not existing in the local computer. The only way is getting resources from repository but that has to be done one by one which is not an ideal way to do it because there will be many, and to add to the problem doing that the downloaded excel files lose all formatting and become corrupted. I thought of using GIT to synch all the files but it seems silly to have to put the files in a new repository when I already have them in one (Guvnor). What do you think will be the best way to guarantee that all team members have the same versions of the assests on their local computers? -- View this message in context: http://drools.46999.n3.nabble.com/Maintain-assets-synchronized-between-members-of-a-team-tp4023533.html Sent from the Drools: User forum mailing list archive at Nabble.com. ___ rules-users mailing list rules-users@lists.jboss.org https://lists.jboss.org/mailman/listinfo/rules-users
Re: [rules-users] Maintain assets synchronized between members of a team
I can update existing assets using Eclipse, but if the asset is not in the local computer I can only get them one by one. We speak of a external source control, so you use GIT or SVN for source control not relying only on Guvnor, is that correct? -- View this message in context: http://drools.46999.n3.nabble.com/Maintain-assets-synchronized-between-members-of-a-team-tp4023533p4023541.html Sent from the Drools: User forum mailing list archive at Nabble.com. ___ rules-users mailing list rules-users@lists.jboss.org https://lists.jboss.org/mailman/listinfo/rules-users
Re: [rules-users] Maintain assets synchronized between members of a team
Sorry, by "We speak" I meant "You speak". -- View this message in context: http://drools.46999.n3.nabble.com/Maintain-assets-synchronized-between-members-of-a-team-tp4023533p4023542.html Sent from the Drools: User forum mailing list archive at Nabble.com. ___ rules-users mailing list rules-users@lists.jboss.org https://lists.jboss.org/mailman/listinfo/rules-users