[rules-users] Drools templates header arguments
I am working on a project, using templates to generate all my rules. I have one problem though, I wanna parse my arguments to the template as a ArrayList, and do somthing like this: template header ruleId args package dk.prks import com.poc.entity.Bill; import com.poc.entity.BillLine; import com.poc.entity.Description; import java.util.ArrayList; template 01 rule @{ruleId}_@{row.rowNumber} dialect mvel when $bill : Bill ($line : lines) and BillLine( service == @{args.get(0)}, $lineNr : lineNr) from $line and BillLine( service == @{args.get(1)}, lineNr $lineNr) from $line then $bill.setColor(1); end end template However, this is not possible. Furthermore I want to stretch that performance is an issue, and i want the generated file to only contain the values from the list, and not make any look ups in the array when running my rules -- View this message in context: http://drools.46999.n3.nabble.com/Drools-templates-header-arguments-tp4026908.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] Drools templates header arguments
afaik that's not possible. Basically the templates replace the value for @{param} with param.toString() (that's why your approach is not working). Regarding your concerns about performance: the templates are translated into rules once - afterwards there is no connection between the variables and the rules in KnowledgeBase. You could instead write a module that replaces the @{param} fields with values from your arrayList within your rules (e.g. loading the rules from a file into string, then use regex or whatever suits you best). Then just insert the rules somewhat like this: String myRules = rule test when @{arr[1]}x... then ... ; String parameterizedRules =MyTemplateBuilder.build(myRules, yourParams); Reader rdr = new StringReader(parameterizedRules); kbuilder.add(ResourceFactory.newReaderResource(rdr), ResourceType.DRL); - Alex On 25 Nov 2013, at 11:43, petert peter.j.troel...@gmail.com wrote: I am working on a project, using templates to generate all my rules. I have one problem though, I wanna parse my arguments to the template as a ArrayList, and do somthing like this: template header ruleId args package dk.prks import com.poc.entity.Bill; import com.poc.entity.BillLine; import com.poc.entity.Description; import java.util.ArrayList; template 01 rule @{ruleId}_@{row.rowNumber} dialect mvel when $bill : Bill ($line : lines) and BillLine( service == @{args.get(0)}, $lineNr : lineNr) from $line and BillLine( service == @{args.get(1)}, lineNr $lineNr) from $line then $bill.setColor(1); end end template However, this is not possible. Furthermore I want to stretch that performance is an issue, and i want the generated file to only contain the values from the list, and not make any look ups in the array when running my rules -- View this message in context: http://drools.46999.n3.nabble.com/Drools-templates-header-arguments-tp4026908.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 signature.asc Description: Message signed with OpenPGP using GPGMail ___ rules-users mailing list rules-users@lists.jboss.org https://lists.jboss.org/mailman/listinfo/rules-users
Re: [rules-users] Drools 6 Unable to build index of kmodule.xml
If I have a standard non maven web project whats the best way to integrate a very simple stateless session call to all the new KIW-WB interfaces as due to company restrtaioctions I cannot convert my non-maven web project? -- View this message in context: http://drools.46999.n3.nabble.com/Drools-6-Unable-to-build-index-of-kmodule-xml-tp4026791p4026910.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] Drools 6 getting started
Basically I have a web app in which I would like to run some drools rules from the new KIW-WB objects. e.g. KieContainer objects Does anyone have a link to an idiots guide to getting started to Drools 6? I'm looking to build a drools 6 maven project from one of the standard example KIE-WB projects. What do i need MAven , GIthub etc and how do I build it? I then need to be able to use this project within a non-maven project, i.e. build a jar from within the maven project that can then be used by my non-maven java project. With the old deprecated KnowledgeBase classes I used to be able to do this really easily. Any suggestions would be most welcome and appreciated. -- View this message in context: http://drools.46999.n3.nabble.com/Drools-6-getting-started-tp4026911.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] Drools templates header arguments
If performance is an issue, make sure that the rule doesn't fire repeatedly or creates some overhead, due to large sizes of Bill.lines and multiple occurrences of args(0) and args(1) in ascending line order. -W On 25/11/2013, petert peter.j.troel...@gmail.com wrote: I am working on a project, using templates to generate all my rules. I have one problem though, I wanna parse my arguments to the template as a ArrayList, and do somthing like this: template header ruleId args package dk.prks import com.poc.entity.Bill; import com.poc.entity.BillLine; import com.poc.entity.Description; import java.util.ArrayList; template 01 rule @{ruleId}_@{row.rowNumber} dialect mvel when $bill : Bill ($line : lines) and BillLine( service == @{args.get(0)}, $lineNr : lineNr) from $line and BillLine( service == @{args.get(1)}, lineNr $lineNr) from $line then $bill.setColor(1); end end template However, this is not possible. Furthermore I want to stretch that performance is an issue, and i want the generated file to only contain the values from the list, and not make any look ups in the array when running my rules -- View this message in context: http://drools.46999.n3.nabble.com/Drools-templates-header-arguments-tp4026908.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 mailing list rules-users@lists.jboss.org https://lists.jboss.org/mailman/listinfo/rules-users
Re: [rules-users] Drools 6 getting started
The links weren’t suppose to go up yet, sorry. We haven’t finished preparing the videos and there is a new website to come. In the mean time you need to read the Workbench Installation Guide: http://docs.jboss.org/drools/release/6.0.0.Final/drools-docs/html/wb.Workbench.html#wb.Installation And the Build, Deploy and Utilize here: http://docs.jboss.org/drools/release/6.0.0.Final/drools-docs/html/KIEChapter.html#KIEOverviewSection Installation is trivla, you drop the jar in JBossAS and you are ready to go - as per the first video in the playlist. It has a starting playground. Just click “build and deploy” for a project and you are good to go: http://tinyurl.com/pnq6497 The workbench installation docs tell you how to configure the location of things like the GIT repo, the maven repo etc. Although it will start with default “working folder”. Mark On 25 Nov 2013, at 11:40, captainrhino graeme.kitc...@axa-travel-insurance.com wrote: Basically I have a web app in which I would like to run some drools rules from the new KIW-WB objects. e.g. KieContainer objects Does anyone have a link to an idiots guide to getting started to Drools 6? I'm looking to build a drools 6 maven project from one of the standard example KIE-WB projects. What do i need MAven , GIthub etc and how do I build it? I then need to be able to use this project within a non-maven project, i.e. build a jar from within the maven project that can then be used by my non-maven java project. With the old deprecated KnowledgeBase classes I used to be able to do this really easily. Any suggestions would be most welcome and appreciated. -- View this message in context: http://drools.46999.n3.nabble.com/Drools-6-getting-started-tp4026911.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 mailing list rules-users@lists.jboss.org https://lists.jboss.org/mailman/listinfo/rules-users
Re: [rules-users] Drools 6 Unable to build index of kmodule.xml
Turn it into a maven recognised JAR, manually place a pom.properties in the JARs META-INF. You don’t need to convert it to a maven project, with a pom.xml in the source, or build it with maven. Then look at the build/deploy/utiize example 4.2.5.6. Default KieSession from File http://docs.jboss.org/drools/release/6.0.0.Final/drools-docs/html/KIEChapter.html#KIEOverviewSection pom.properties: A pom.properties file, located in the archive in META-INF/maven/${groupId}/${artifactId}/pom.properties The fiel contents contains 3 lines: version=${project.version} groupId=${project.groupId} artifactId=${project.artifactId} If your company restricts you from placing a single pom.properties in a jar, you’ll have to manually build a KieModule at runtime - similar to the old pragmatic KnowledegBuilder code. See 4.2.5.10. Programaticaly build a KieModule using Meta Models Mark On 25 Nov 2013, at 11:19, captainrhino graeme.kitc...@axa-travel-insurance.com wrote: If I have a standard non maven web project whats the best way to integrate a very simple stateless session call to all the new KIW-WB interfaces as due to company restrtaioctions I cannot convert my non-maven web project? -- View this message in context: http://drools.46999.n3.nabble.com/Drools-6-Unable-to-build-index-of-kmodule-xml-tp4026791p4026910.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 mailing list rules-users@lists.jboss.org https://lists.jboss.org/mailman/listinfo/rules-users
Re: [rules-users] Drools 6 getting started
Do you know if they have worked out the Guvnor / EAP 6.0 Resty issue just yet? I had to resort to using Tomcat7 after installing and configuring EAP 6 because of that. :-( On Mon, Nov 25, 2013 at 7:46 AM, Mark Proctor mproc...@codehaus.org wrote: The links weren’t suppose to go up yet, sorry. We haven’t finished preparing the videos and there is a new website to come. In the mean time you need to read the Workbench Installation Guide: http://docs.jboss.org/drools/release/6.0.0.Final/drools-docs/html/wb.Workbench.html#wb.Installation And the Build, Deploy and Utilize here: http://docs.jboss.org/drools/release/6.0.0.Final/drools-docs/html/KIEChapter.html#KIEOverviewSection Installation is trivla, you drop the jar in JBossAS and you are ready to go - as per the first video in the playlist. It has a starting playground. Just click “build and deploy” for a project and you are good to go: http://tinyurl.com/pnq6497 The workbench installation docs tell you how to configure the location of things like the GIT repo, the maven repo etc. Although it will start with default “working folder”. Mark On 25 Nov 2013, at 11:40, captainrhino graeme.kitc...@axa-travel-insurance.com wrote: Basically I have a web app in which I would like to run some drools rules from the new KIW-WB objects. e.g. KieContainer objects Does anyone have a link to an idiots guide to getting started to Drools 6? I'm looking to build a drools 6 maven project from one of the standard example KIE-WB projects. What do i need MAven , GIthub etc and how do I build it? I then need to be able to use this project within a non-maven project, i.e. build a jar from within the maven project that can then be used by my non-maven java project. With the old deprecated KnowledgeBase classes I used to be able to do this really easily. Any suggestions would be most welcome and appreciated. -- View this message in context: http://drools.46999.n3.nabble.com/Drools-6-getting-started-tp4026911.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 mailing list rules-users@lists.jboss.org https://lists.jboss.org/mailman/listinfo/rules-users -- # Matthew R. Versaggi, President CEO Versaggi Information Systems, Inc. Adjunct Professor of eBusiness DePaul University Email: mailto:m...@versaggi.com, profversa...@gmail.com M: 630-292-8422 LinkedIn: http://www.linkedin.com/in/versaggi # ___ rules-users mailing list rules-users@lists.jboss.org https://lists.jboss.org/mailman/listinfo/rules-users
Re: [rules-users] Drools 6 getting started
Hi All Anyone know, How to build a KnowledgeBase externally and how to dynamically reload it while the application is running.? Thanks regards Govind P From: rules-users-boun...@lists.jboss.org [mailto:rules-users-boun...@lists.jboss.org] On Behalf Of Matthew Versaggi Sent: 25 November 2013 13:36 To: Rules Users List Subject: Re: [rules-users] Drools 6 getting started Do you know if they have worked out the Guvnor / EAP 6.0 Resty issue just yet? I had to resort to using Tomcat7 after installing and configuring EAP 6 because of that. :-( On Mon, Nov 25, 2013 at 7:46 AM, Mark Proctor mproc...@codehaus.orgmailto:mproc...@codehaus.org wrote: The links weren't suppose to go up yet, sorry. We haven't finished preparing the videos and there is a new website to come. In the mean time you need to read the Workbench Installation Guide: http://docs.jboss.org/drools/release/6.0.0.Final/drools-docs/html/wb.Workbench.html#wb.Installation And the Build, Deploy and Utilize here: http://docs.jboss.org/drools/release/6.0.0.Final/drools-docs/html/KIEChapter.html#KIEOverviewSection Installation is trivla, you drop the jar in JBossAS and you are ready to go - as per the first video in the playlist. It has a starting playground. Just click build and deploy for a project and you are good to go: http://tinyurl.com/pnq6497 The workbench installation docs tell you how to configure the location of things like the GIT repo, the maven repo etc. Although it will start with default working folder. Mark On 25 Nov 2013, at 11:40, captainrhino graeme.kitc...@axa-travel-insurance.commailto:graeme.kitc...@axa-travel-insurance.com wrote: Basically I have a web app in which I would like to run some drools rules from the new KIW-WB objects. e.g. KieContainer objects Does anyone have a link to an idiots guide to getting started to Drools 6? I'm looking to build a drools 6 maven project from one of the standard example KIE-WB projects. What do i need MAven , GIthub etc and how do I build it? I then need to be able to use this project within a non-maven project, i.e. build a jar from within the maven project that can then be used by my non-maven java project. With the old deprecated KnowledgeBase classes I used to be able to do this really easily. Any suggestions would be most welcome and appreciated. -- View this message in context: http://drools.46999.n3.nabble.com/Drools-6-getting-started-tp4026911.html Sent from the Drools: User forum mailing list archive at Nabble.comhttp://Nabble.com. ___ rules-users mailing list rules-users@lists.jboss.orgmailto:rules-users@lists.jboss.org https://lists.jboss.org/mailman/listinfo/rules-users ___ rules-users mailing list rules-users@lists.jboss.orgmailto:rules-users@lists.jboss.org https://lists.jboss.org/mailman/listinfo/rules-users -- # Matthew R. Versaggi, President CEO Versaggi Information Systems, Inc. Adjunct Professor of eBusiness DePaul University Email: mailto:m...@versaggi.commailto:m...@versaggi.com, profversa...@gmail.commailto:profversa...@gmail.com M: 630-292-8422 LinkedIn: http://www.linkedin.com/in/versaggi # MASTEK LTD. In the US, we're called MAJESCOMASTEK ~~ Opinions expressed in this e-mail are those of the individual and not that of Mastek Limited, unless specifically indicated to that effect. Mastek Limited does not accept any responsibility or liability for it. This e-mail and attachments (if any) transmitted with it are confidential and/or privileged and solely for the use of the intended person or entity to which it is addressed. Any review, re-transmission, dissemination or other use of or taking of any action in reliance upon this information by persons or entities other than the intended recipient is prohibited. This e-mail and its attachments have been scanned for the presence of computer viruses. It is the responsibility of the recipient to run the virus check on e-mails and attachments before opening them. If you have received this e-mail in error, kindly delete this e-mail from desktop and server. ~~ ___ rules-users mailing list rules-users@lists.jboss.org https://lists.jboss.org/mailman/listinfo/rules-users
[rules-users] drools 5.5 property reactive issue
I am seeing a weird pattern(or at least unexpected one) when running drools 5.5 in property reactive mode. I have to rules such as: rule Rule 1 when $order:Order(orderType==A, orderVolume1000) then insert(new Charge($order,code1,-.25)); end rule Rule 2 when $order:Order(orderType==A) then insert(new Charge($order,code2,-.24)); end rule Set best price when $order:Order($id:id, $setCharge:charge) $charge:Charge(orderId=$id,$setCharge==null || chargeAmount$setCharge.chargeAmount) then modify($order){setCharge($charge)}; end If I insert and Order of 1001 I see all 3 activations get created, Rule 2 fires first thus triggering set price rule and the activation of Rule 1 is cancelled. If I add a @watch(charge) to the end of the rules or set up salience Rule 1 fires. Could someone help me understand why the firing of Rule 2 and thus the set best price rule cause rule 1 to get cancelled without the @watch? -- View this message in context: http://drools.46999.n3.nabble.com/drools-5-5-property-reactive-issue-tp4026917.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] Exception when uploading JAR without POM in 6.0.0-Final
Unfortunately, can' upload that jar. I tried making some other jars without POM and they worked. I will try and get some more time this week to see if I can reproduce with other jar. -- View this message in context: http://drools.46999.n3.nabble.com/Exception-when-uploading-JAR-without-POM-in-6-0-0-Final-tp4026893p4026918.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] Drools 6 getting started
Do you know if they have worked out the Guvnor / EAP 6.0 Resty issue just yet? I had to resort to using Tomcat7 after installing and configuring EAP 6 because of that. :-( Could you be a little more specific? KIE Workbench 6.0 has been and continued to be tested on EAP. Thanks, Mike On 25 November 2013 13:36, Matthew Versaggi profversa...@gmail.com wrote: Do you know if they have worked out the Guvnor / EAP 6.0 Resty issue just yet? I had to resort to using Tomcat7 after installing and configuring EAP 6 because of that. :-( On Mon, Nov 25, 2013 at 7:46 AM, Mark Proctor mproc...@codehaus.orgwrote: The links weren’t suppose to go up yet, sorry. We haven’t finished preparing the videos and there is a new website to come. In the mean time you need to read the Workbench Installation Guide: http://docs.jboss.org/drools/release/6.0.0.Final/drools-docs/html/wb.Workbench.html#wb.Installation And the Build, Deploy and Utilize here: http://docs.jboss.org/drools/release/6.0.0.Final/drools-docs/html/KIEChapter.html#KIEOverviewSection Installation is trivla, you drop the jar in JBossAS and you are ready to go - as per the first video in the playlist. It has a starting playground. Just click “build and deploy” for a project and you are good to go: http://tinyurl.com/pnq6497 The workbench installation docs tell you how to configure the location of things like the GIT repo, the maven repo etc. Although it will start with default “working folder”. Mark On 25 Nov 2013, at 11:40, captainrhino graeme.kitc...@axa-travel-insurance.com wrote: Basically I have a web app in which I would like to run some drools rules from the new KIW-WB objects. e.g. KieContainer objects Does anyone have a link to an idiots guide to getting started to Drools 6? I'm looking to build a drools 6 maven project from one of the standard example KIE-WB projects. What do i need MAven , GIthub etc and how do I build it? I then need to be able to use this project within a non-maven project, i.e. build a jar from within the maven project that can then be used by my non-maven java project. With the old deprecated KnowledgeBase classes I used to be able to do this really easily. Any suggestions would be most welcome and appreciated. -- View this message in context: http://drools.46999.n3.nabble.com/Drools-6-getting-started-tp4026911.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 mailing list rules-users@lists.jboss.org https://lists.jboss.org/mailman/listinfo/rules-users -- # Matthew R. Versaggi, President CEO Versaggi Information Systems, Inc. Adjunct Professor of eBusiness DePaul University Email: mailto:m...@versaggi.com, profversa...@gmail.com M: 630-292-8422 LinkedIn: http://www.linkedin.com/in/versaggi # ___ rules-users mailing list rules-users@lists.jboss.org https://lists.jboss.org/mailman/listinfo/rules-users ___ rules-users mailing list rules-users@lists.jboss.org https://lists.jboss.org/mailman/listinfo/rules-users
Re: [rules-users] Drools 6 getting started
i.e. KIE Workbench 6.0 has been, and continues to be, tested on EAP 6.1.0. On 25 November 2013 14:53, Michael Anstis michael.ans...@gmail.com wrote: Do you know if they have worked out the Guvnor / EAP 6.0 Resty issue just yet? I had to resort to using Tomcat7 after installing and configuring EAP 6 because of that. :-( Could you be a little more specific? KIE Workbench 6.0 has been and continued to be tested on EAP. Thanks, Mike On 25 November 2013 13:36, Matthew Versaggi profversa...@gmail.comwrote: Do you know if they have worked out the Guvnor / EAP 6.0 Resty issue just yet? I had to resort to using Tomcat7 after installing and configuring EAP 6 because of that. :-( On Mon, Nov 25, 2013 at 7:46 AM, Mark Proctor mproc...@codehaus.orgwrote: The links weren’t suppose to go up yet, sorry. We haven’t finished preparing the videos and there is a new website to come. In the mean time you need to read the Workbench Installation Guide: http://docs.jboss.org/drools/release/6.0.0.Final/drools-docs/html/wb.Workbench.html#wb.Installation And the Build, Deploy and Utilize here: http://docs.jboss.org/drools/release/6.0.0.Final/drools-docs/html/KIEChapter.html#KIEOverviewSection Installation is trivla, you drop the jar in JBossAS and you are ready to go - as per the first video in the playlist. It has a starting playground. Just click “build and deploy” for a project and you are good to go: http://tinyurl.com/pnq6497 The workbench installation docs tell you how to configure the location of things like the GIT repo, the maven repo etc. Although it will start with default “working folder”. Mark On 25 Nov 2013, at 11:40, captainrhino graeme.kitc...@axa-travel-insurance.com wrote: Basically I have a web app in which I would like to run some drools rules from the new KIW-WB objects. e.g. KieContainer objects Does anyone have a link to an idiots guide to getting started to Drools 6? I'm looking to build a drools 6 maven project from one of the standard example KIE-WB projects. What do i need MAven , GIthub etc and how do I build it? I then need to be able to use this project within a non-maven project, i.e. build a jar from within the maven project that can then be used by my non-maven java project. With the old deprecated KnowledgeBase classes I used to be able to do this really easily. Any suggestions would be most welcome and appreciated. -- View this message in context: http://drools.46999.n3.nabble.com/Drools-6-getting-started-tp4026911.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 mailing list rules-users@lists.jboss.org https://lists.jboss.org/mailman/listinfo/rules-users -- # Matthew R. Versaggi, President CEO Versaggi Information Systems, Inc. Adjunct Professor of eBusiness DePaul University Email: mailto:m...@versaggi.com, profversa...@gmail.com M: 630-292-8422 LinkedIn: http://www.linkedin.com/in/versaggi # ___ rules-users mailing list rules-users@lists.jboss.org https://lists.jboss.org/mailman/listinfo/rules-users ___ rules-users mailing list rules-users@lists.jboss.org https://lists.jboss.org/mailman/listinfo/rules-users
Re: [rules-users] drools 5.5 property reactive issue
This issue seems to be related to: http://drools.46999.n3.nabble.com/Property-reactive-broken-in-5-5-0-Final-td4021231.html http://drools.46999.n3.nabble.com/Property-reactive-broken-in-5-5-0-Final-td4021231.html -- View this message in context: http://drools.46999.n3.nabble.com/drools-5-5-property-reactive-issue-tp4026917p4026921.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] Drools 6 getting started
There are a set of examples, with docs here: 4.2.5. Build, Deploy and Utilize Examples http://docs.jboss.org/drools/release/6.0.0.Final/drools-docs/html/KIEChapter.html#KIEExamplesSection Not sure what you mean by externally? Do you mean programmatically or from command line? For programmatically - similar to the old KnowledgeBuilder api: 4.2.5.10. Programaticaly build a KieModule using Meta Models For command line, just include the maven plugin: 4.2.2.3. Building with Maven To dynamically update you have two alternatives. you can do it manually or you can do it automated via kie-ci. To do it manually, load the target KieModule into the KieRepository, and on the existing KieContainer call updateToVersion( ReleaseID ). This example shows how to load a KieModule into the KieRepository. While in the example it uses the ReleaseId to create a new KieContainer, it’s a one line addition to instead update an existing one. 4.2.5.7. Named KieSession from File If you want to do it automated, from a maven repo, you can use kie-ci: 4.2.5.5. KieContainer from KieRepository You can use the KieScanner to automate this, based on a poll. 4.2.3.3. KieScanner” updateToVersion only works for jars built with with the programmatic api, or with maven using the KIE plugin. Mark On 25 Nov 2013, at 13:40, Govind J. Parashar govind.paras...@mastek.com wrote: Hi All Anyone know, How to build a KnowledgeBase externally and how to dynamically reload it while the application is running.? Thanks regards Govind P From: rules-users-boun...@lists.jboss.org [mailto:rules-users-boun...@lists.jboss.org] On Behalf Of Matthew Versaggi Sent: 25 November 2013 13:36 To: Rules Users List Subject: Re: [rules-users] Drools 6 getting started Do you know if they have worked out the Guvnor / EAP 6.0 Resty issue just yet? I had to resort to using Tomcat7 after installing and configuring EAP 6 because of that. :-( On Mon, Nov 25, 2013 at 7:46 AM, Mark Proctor mproc...@codehaus.org wrote: The links weren’t suppose to go up yet, sorry. We haven’t finished preparing the videos and there is a new website to come. In the mean time you need to read the Workbench Installation Guide: http://docs.jboss.org/drools/release/6.0.0.Final/drools-docs/html/wb.Workbench.html#wb.Installation And the Build, Deploy and Utilize here: http://docs.jboss.org/drools/release/6.0.0.Final/drools-docs/html/KIEChapter.html#KIEOverviewSection Installation is trivla, you drop the jar in JBossAS and you are ready to go - as per the first video in the playlist. It has a starting playground. Just click “build and deploy” for a project and you are good to go: http://tinyurl.com/pnq6497 The workbench installation docs tell you how to configure the location of things like the GIT repo, the maven repo etc. Although it will start with default “working folder”. Mark On 25 Nov 2013, at 11:40, captainrhino graeme.kitc...@axa-travel-insurance.com wrote: Basically I have a web app in which I would like to run some drools rules from the new KIW-WB objects. e.g. KieContainer objects Does anyone have a link to an idiots guide to getting started to Drools 6? I'm looking to build a drools 6 maven project from one of the standard example KIE-WB projects. What do i need MAven , GIthub etc and how do I build it? I then need to be able to use this project within a non-maven project, i.e. build a jar from within the maven project that can then be used by my non-maven java project. With the old deprecated KnowledgeBase classes I used to be able to do this really easily. Any suggestions would be most welcome and appreciated. -- View this message in context: http://drools.46999.n3.nabble.com/Drools-6-getting-started-tp4026911.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 mailing list rules-users@lists.jboss.org https://lists.jboss.org/mailman/listinfo/rules-users -- # Matthew R. Versaggi, President CEO Versaggi Information Systems, Inc. Adjunct Professor of eBusiness DePaul University Email: mailto:m...@versaggi.com, profversa...@gmail.com M: 630-292-8422 LinkedIn: http://www.linkedin.com/in/versaggi # MASTEK LTD. In the US, we're called MAJESCOMASTEK ~~ Opinions expressed in this e-mail are those of the individual and not that of Mastek Limited, unless specifically indicated to that effect. Mastek Limited does not accept any responsibility or liability
Re: [rules-users] Drools templates header arguments
Thanks guys.. :) 2013/11/25 Wolfgang Laun wolfgang.l...@gmail.com If performance is an issue, make sure that the rule doesn't fire repeatedly or creates some overhead, due to large sizes of Bill.lines and multiple occurrences of args(0) and args(1) in ascending line order. -W On 25/11/2013, petert peter.j.troel...@gmail.com wrote: I am working on a project, using templates to generate all my rules. I have one problem though, I wanna parse my arguments to the template as a ArrayList, and do somthing like this: template header ruleId args package dk.prks import com.poc.entity.Bill; import com.poc.entity.BillLine; import com.poc.entity.Description; import java.util.ArrayList; template 01 rule @{ruleId}_@{row.rowNumber} dialect mvel when $bill : Bill ($line : lines) and BillLine( service == @{args.get(0)}, $lineNr : lineNr) from $line and BillLine( service == @{args.get(1)}, lineNr $lineNr) from $line then $bill.setColor(1); end end template However, this is not possible. Furthermore I want to stretch that performance is an issue, and i want the generated file to only contain the values from the list, and not make any look ups in the array when running my rules -- View this message in context: http://drools.46999.n3.nabble.com/Drools-templates-header-arguments-tp4026908.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 mailing list rules-users@lists.jboss.org https://lists.jboss.org/mailman/listinfo/rules-users ___ rules-users mailing list rules-users@lists.jboss.org https://lists.jboss.org/mailman/listinfo/rules-users
Re: [rules-users] drools 5.5 property reactive issue
a lot has been fixed in 5.6 and 6.0. Please either try 5.6.CR1 or 6.0.FINAL. Mark On 25 Nov 2013, at 15:33, gboro54 gbor...@gmail.com wrote: This issue seems to be related to: http://drools.46999.n3.nabble.com/Property-reactive-broken-in-5-5-0-Final-td4021231.html http://drools.46999.n3.nabble.com/Property-reactive-broken-in-5-5-0-Final-td4021231.html -- View this message in context: http://drools.46999.n3.nabble.com/drools-5-5-property-reactive-issue-tp4026917p4026921.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 mailing list rules-users@lists.jboss.org https://lists.jboss.org/mailman/listinfo/rules-users
[rules-users] What is URL for Guvnor REST API in 6.0.0-Final?
I've been trying URL's similar to http://localhost:8080/guvnor-6.0.0.CR3/rest/packages but can't find them. -- View this message in context: http://drools.46999.n3.nabble.com/What-is-URL-for-Guvnor-REST-API-in-6-0-0-Final-tp4026926.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] What is URL for Guvnor REST API in 6.0.0-Final?
6.0 does not have the same REST API as prior versions. All that we expose is basic operations to manipulate Organizational Units, Repositories and Projects; including building and deploying. The GIT backend 6.0 has means we recommend using any git library to clone the repository, perform whatever CRUD operations you require and push back. Documentation has details of the REST methods we support in 6.0. With kind regards, Mike Sent on the move On 25 Nov 2013 19:04, SrjTx clickt...@yahoo.com wrote: I've been trying URL's similar to http://localhost:8080/guvnor-6.0.0.CR3/rest/packages but can't find them. -- View this message in context: http://drools.46999.n3.nabble.com/What-is-URL-for-Guvnor-REST-API-in-6-0-0-Final-tp4026926.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 mailing list rules-users@lists.jboss.org https://lists.jboss.org/mailman/listinfo/rules-users
Re: [rules-users] What is URL for Guvnor REST API in 6.0.0-Final?
The rest api has changed. Depoyment has changed. We don’t have “packages” any more. We have projects. http://docs.jboss.org/drools/release/6.0.0.Final/drools-docs/html/wb.WorkbenchIntegration.html#drools.WorkbenchRemoteAPI /repositories/{repositoryName}/projects/{projectName}/maven/compile /repositories/{repositoryName}/projects/{projectName}/maven/install /repositories/{repositoryName}/projects/{projectName}/maven/deploy Install builds the JAR and places it in the local m2_repo, which is exposed over http for clients to download. Deploy is used, if you wish to push the build to external repositories. Mark On 25 Nov 2013, at 18:40, SrjTx clickt...@yahoo.com wrote: I've been trying URL's similar to http://localhost:8080/guvnor-6.0.0.CR3/rest/packages but can't find them. -- View this message in context: http://drools.46999.n3.nabble.com/What-is-URL-for-Guvnor-REST-API-in-6-0-0-Final-tp4026926.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 mailing list rules-users@lists.jboss.org https://lists.jboss.org/mailman/listinfo/rules-users
Re: [rules-users] drools 5.5 property reactive issue
I plan to do an update to 6 early next month(that was planned before this issue). Thanks! Mark Proctor wrote a lot has been fixed in 5.6 and 6.0. Please either try 5.6.CR1 or 6.0.FINAL. Mark On 25 Nov 2013, at 15:33, gboro54 lt; gboro54@ gt; wrote: This issue seems to be related to: http://drools.46999.n3.nabble.com/Property-reactive-broken-in-5-5-0-Final-td4021231.html lt;http://drools.46999.n3.nabble.com/Property-reactive-broken-in-5-5-0-Final-td4021231.htmlgt; -- View this message in context: http://drools.46999.n3.nabble.com/drools-5-5-property-reactive-issue-tp4026917p4026921.html Sent from the Drools: User forum mailing list archive at Nabble.com. ___ rules-users mailing list rules-users@.jboss https://lists.jboss.org/mailman/listinfo/rules-users ___ rules-users mailing list rules-users@.jboss https://lists.jboss.org/mailman/listinfo/rules-users -- View this message in context: http://drools.46999.n3.nabble.com/drools-5-5-property-reactive-issue-tp4026917p4026929.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] What is URL for Guvnor REST API in 6.0.0-Final?
Thanks guys! Here's our use-case/flow. Could you please share your recommendations on our application integration with Guvnor 6.0.0 We have SwitchYard 1.1 applications that are using the kie method to interact with a Drools backend. In this method you point what used to be a 5.5 CHANGE_SET backend and the middleware takes care of the typical sync of change sets with the application so that it have visibility into the rule in its runtime from the guvnor control point. With 6.0.0, as you say, things of change. We would like to continue using the SwitchYard kie interface with 6.0.0. 1. As per (Comment 8 at https://community.jboss.org/thread/234691), it looks like kie integration is much more complex and not clear as to how I would integrate. Is there than an authoritative document that shows the equivalent 6.0.0 flow, so that our application can get visibility into the rules, etc. as it did with 5.5 2. As per the comment about GIT, if git the access API for retrieving packages, is there documentation about how to unmarshall data in git so that we can write some middleware to insert into kie layer in SwitchYard to hit the repo via git? 3. Assuming we are using the guvnor frontend to manage rules, deploy rules, compile assets, etc. We are not looking for APIs to manage functionality. We need the equivalent of REST to get the information about the assests inside the packages/model. For example, in 5.5 there were multiple REST calls where you could specify an asset UUID and get its source code over rest - In the case of BRL rules that source was XML. That XML is what we need. Can you comment on approaches to getting the equivalent data in the new git scenario? Thanks! -- View this message in context: http://drools.46999.n3.nabble.com/What-is-URL-for-Guvnor-REST-API-in-6-0-0-Final-tp4026926p4026931.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] drools 5.5 property reactive issue
Could you please try 5.6.CR1? It is compatible with 5.5 and fixes a number of bugs there, so it shouldn't take more than a temporary version switch Thanks Davide On 11/25/2013 12:48 PM, gboro54 wrote: I plan to do an update to 6 early next month(that was planned before this issue). Thanks! Mark Proctor wrote a lot has been fixed in 5.6 and 6.0. Please either try 5.6.CR1 or 6.0.FINAL. Mark On 25 Nov 2013, at 15:33, gboro54 lt; gboro54@ gt; wrote: This issue seems to be related to: http://drools.46999.n3.nabble.com/Property-reactive-broken-in-5-5-0-Final-td4021231.html lt;http://drools.46999.n3.nabble.com/Property-reactive-broken-in-5-5-0-Final-td4021231.htmlgt; -- View this message in context: http://drools.46999.n3.nabble.com/drools-5-5-property-reactive-issue-tp4026917p4026921.html Sent from the Drools: User forum mailing list archive at Nabble.com. ___ rules-users mailing list rules-users@.jboss https://lists.jboss.org/mailman/listinfo/rules-users ___ rules-users mailing list rules-users@.jboss https://lists.jboss.org/mailman/listinfo/rules-users -- View this message in context: http://drools.46999.n3.nabble.com/drools-5-5-property-reactive-issue-tp4026917p4026929.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 mailing list rules-users@lists.jboss.org https://lists.jboss.org/mailman/listinfo/rules-users
Re: [rules-users] What is URL for Guvnor REST API in 6.0.0-Final?
Comments inline. But just a reminder, if you see how to improve the docs, please contribute. http://docs.jboss.org/drools/release/6.0.0.Final/drools-docs/html/Welcome.html#gettingstarted Mark On 25 Nov 2013, at 19:52, SrjTx clickt...@yahoo.com wrote: Thanks guys! Here's our use-case/flow. Could you please share your recommendations on our application integration with Guvnor 6.0.0 We have SwitchYard 1.1 applications that are using the kie method to interact with a Drools backend. In this method you point what used to be a 5.5 CHANGE_SET backend and the middleware takes care of the typical sync of change sets with the application so that it have visibility into the rule in its runtime from the guvnor control point. With 6.0.0, as you say, things of change. We would like to continue using the SwitchYard kie interface with 6.0.0. ChangeSet no longer exists. We build jars, we publish jars, we consume jars. Nothing much more to it. 1. As per (Comment 8 at https://community.jboss.org/thread/234691), it looks like kie integration is much more complex and not clear as to how I would integrate. Is there than an authoritative document that shows the equivalent 6.0.0 flow, so that our application can get visibility into the rules, etc. as it did with 5.5 My recommendation is to read the overview: http://docs.jboss.org/drools/release/6.0.0.Final/drools-docs/html/KIEChapter.html#KIEOverviewSection Then to go through the build/deploy/utilize set of exemples and corresponding tutorial. http://docs.jboss.org/drools/release/6.0.0.Final/drools-docs/html/KIEChapter.html#KIEExamplesSection It’s a change from 5.x. but once people get the hang of it, they’ll find it simpler and more streamlined. 2. As per the comment about GIT, if git the access API for retrieving packages, is there documentation about how to unmarshall data in git so that we can write some middleware to insert into kie layer in SwitchYard to hit the repo via git? Packages do not exist as a deployable component. There is the source, contained in GIT. There is a JAR published via maven. GIT is just source, the drl etc. Just use standard GIT commands to check it out. You don’t need to marshal it, it’s just source. The JAR is just a jar, that’s published by maven. The local m2_repo is exposed via http url, making it a remotely accessible maven repository. Download the jar, unzip it inspect the contents. 3. Assuming we are using the guvnor frontend to manage rules, deploy rules, compile assets, etc. We are not looking for APIs to manage functionality. We need the equivalent of REST to get the information about the assests inside the packages/model. For example, in 5.5 there were multiple REST calls where you could specify an asset UUID and get its source code over rest - In the case of BRL rules that source was XML. That XML is what we need. Can you comment on approaches to getting the equivalent data in the new git scenario? All source is in GIT, it’s not encoded or anything special. All languages have bindings for GIT access. Mark Thanks! -- View this message in context: http://drools.46999.n3.nabble.com/What-is-URL-for-Guvnor-REST-API-in-6-0-0-Final-tp4026926p4026931.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 mailing list rules-users@lists.jboss.org https://lists.jboss.org/mailman/listinfo/rules-users
[rules-users] no-loop and 6.0 : DROOLS-353
We’ve just found (and fixed) a no-loop bug. https://issues.jboss.org/browse/DROOLS-353 In general we recommend @PropertyReactive over no-loop (and lock-on-active), for best practice. If you hit this bug, which is caused by a modify, and you cannot migrate your stuff to @PropertyReactive you can fall back to using ReteOO mode for your execution. Or use our latest SNAPSHOT builds from master. As mentioned this is fixed and will be in the next binary release - but that will not likely happen until january(guesstimate) now, as our time is focused on preparing the BRMS 6.0 product release. Mark ___ rules-users mailing list rules-users@lists.jboss.org https://lists.jboss.org/mailman/listinfo/rules-users
[rules-users] BEST_FIT Null Pointer Exception
I am currently using final 6.0 and I used constructionHeuristicTypeBEST_FIT/constructionHeuristicType but after I have run it propmts java.lang.NullPointerException pointing to my PlanningVariableStrengComparator. Did I miss something? My planning variable comparator by the way is : public class MyVariableStrengthComparator implements ComparatorMyVariable, Serializable { public int compare(MyVariable a, MyVariable b) { return new CompareToBuilder() .append(a.getId(), b.getId()) .toComparison(); } } -- View this message in context: http://drools.46999.n3.nabble.com/BEST-FIT-Null-Pointer-Exception-tp4026935.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] Drools 5.5.0 - Execution Performance
Hello, first of all I'd like to mention that i am pretty new to Drools, so please be patient :-) We are using Drools 5.5.0. we have a knowledgeBase of about 500 rules and a pretty complex object structure. So far everything is working fine … at the moment we are testing the performance of the engine and we encountered a quite strange thing. We generated about 10 objects, inserted it into the session and measured time needed for execution of rules. To simulate a high number of facts, we inserted the same objects over and over again (100x, 1000x, 1x). When the first objects were inserted, the time of execution was about 100ms but for each iteration the execution got faster and faster (20ms, 10ms and later on even 1ms) .. Now my question: Are the objects somehow cached in the working memory, so that execution gets faster or does this increase of performance has an other reason? I read a few things about shadow facts which are not present anymore since Drools 5 and sync and async Rete and I think this could be a potential answer for my question, but I am not able to understand this completely. For me it is important to know whether the increase of performance is only due to the fact that we are inserting the same facts over and over again or if a significant increase of performance is still possible if facts are not identical? Can someone help me? Thanks in advance -- View this message in context: http://drools.46999.n3.nabble.com/Drools-5-5-0-Execution-Performance-tp4026936.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] Drools 5.5.0 - Execution Performance
You are aware of Java's JIT compilation? Do you retract the facts after each cycle? Is the Working Memory in Identity or Equality assertion mode? Micro-benchmarking Java is tricky. Beware of the Microbenchmark! (Dr Heinz Kabutz, http://www.javaspecialists.eu/archive/Issue124.html) Try to separate the effects by inserting one set of facts until insertion times have stabilized. Of course, Identity without retraction will not tell you anything about the speed of handling assertions with your particular rule set. -W On 25/11/2013, ch3xy igor.stri...@gmail.com wrote: Hello, first of all I'd like to mention that i am pretty new to Drools, so please be patient :-) We are using Drools 5.5.0. we have a knowledgeBase of about 500 rules and a pretty complex object structure. So far everything is working fine … at the moment we are testing the performance of the engine and we encountered a quite strange thing. We generated about 10 objects, inserted it into the session and measured time needed for execution of rules. To simulate a high number of facts, we inserted the same objects over and over again (100x, 1000x, 1x). When the first objects were inserted, the time of execution was about 100ms but for each iteration the execution got faster and faster (20ms, 10ms and later on even 1ms) .. Now my question: Are the objects somehow cached in the working memory, so that execution gets faster or does this increase of performance has an other reason? I read a few things about shadow facts which are not present anymore since Drools 5 and sync and async Rete and I think this could be a potential answer for my question, but I am not able to understand this completely. For me it is important to know whether the increase of performance is only due to the fact that we are inserting the same facts over and over again or if a significant increase of performance is still possible if facts are not identical? Can someone help me? Thanks in advance -- View this message in context: http://drools.46999.n3.nabble.com/Drools-5-5-0-Execution-Performance-tp4026936.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 mailing list rules-users@lists.jboss.org https://lists.jboss.org/mailman/listinfo/rules-users
Re: [rules-users] BEST_FIT Null Pointer Exception
Can you copy-paste the whole stacktrace? On 25-11-13 21:51, newbie wrote: I am currently using final 6.0 and I used constructionHeuristicTypeBEST_FIT/constructionHeuristicType but after I have run it propmts java.lang.NullPointerException pointing to my PlanningVariableStrengComparator. Did I miss something? My planning variable comparator by the way is : public class MyVariableStrengthComparator implements ComparatorMyVariable, Serializable { public int compare(MyVariable a, MyVariable b) { return new CompareToBuilder() .append(a.getId(), b.getId()) .toComparison(); } } -- View this message in context: http://drools.46999.n3.nabble.com/BEST-FIT-Null-Pointer-Exception-tp4026935.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 mailing list rules-users@lists.jboss.org https://lists.jboss.org/mailman/listinfo/rules-users