[rules-users] Drools calculation of a date function
Hi, I am new to drools. I want to write a function that accepts two strings and returns a date. The two strings are one for the payment frequency and the other for the payment day. Following are my requirements: 1.If the payment frequency is daily, return current date 2.If the payment frequency is weekly and the payment day is let's say Monday, and the current day is Monday, then return current date. If the current day is Monday and the payment day is Tuesday, return current date + 1. Likewise, if the payment day is Wednesday, return current date + 2. 3.If the payment frequency is monthly and payment day is 15, retrieve the current month and current year and return MM-15-. Please help me write a function for this. Thank you so much in advance. ___ rules-users mailing list rules-users@lists.jboss.org https://lists.jboss.org/mailman/listinfo/rules-users
Re: [rules-users] Semantic of rules with not and coincide
Have a question using drools 6 - I am following the example: Repo looks fine, rules and artifact in: .m2/repository/org/acme/brms/acmepoc/1.0 code seems straightforward: // Install example1 in the local maven repo before to do this KieContainer kContainer = ks.newKieContainer(ks.newReleaseId(org.acme.brms, acmepoc, 1.0)); but get: Exception in thread main java.lang.RuntimeException: Cannot find KieModule: org.acme.brms:acmepoc:1.0 at org.drools.compiler.kie.builder.impl.KieServicesImpl.newKieContainer(KieServicesImpl.java:86) at com.sample.KieContainerFromKieRepoExample.go(KieContainerFromKieRepoExample.java:15) at com.sample.KieContainerFromKieRepoExample.main(KieContainerFromKieRepoExample.java:26) On Thu, Dec 5, 2013 at 5:22 PM, IK81 m...@kofler.me wrote: Dear all, I am currently stuck with a problem concerning the use of not and conincide. I want to analyze a stream of error code events from a set of devices and detect the following situations. Every event has a timestamp (long), a device id (String) and an error code (String). What I want to detect is the following - If I get two events, one with code C1 and one with C2 from a single device within 1 minute, it represents a special event combination. The order of their appearence is not relevant. - If I just get C1 (without the C2 within the time frame), just report C1 - If I just get C2 (without the C1 within the time frame), just report C2 I can successfully detect the special event combination with the following rule rule Detect combination when $e1 : Event ($d: device, code == C1) $e2 : Event (device == $d, code == C2, this coincides [1m] $e1) then ... do some output end Then I tried to implement the detection of C1 only as follows rule Detect code C1 when $e1 : Event ($d: device, code == C1) not ( $e2 : Event (device == $d, code == C2, this coincides [1m] $e1)) then ... do some other output end My understanding of the rule is that it should fire, if I get the event with code C1 and there is no other event with error code C2 for the same device that happens within one minute before and after the C1 event. To my surprise, the rule fires immediately when I insert an event with error code C1. Shouldn't the implementation wait at least 1 minute to be sure that no C2 error event will be inserted? BTW this is how I insert the events in my test case: clock.advanceTime(70, TimeUnit.SECONDS); FactHandle handle1 = ksession.insert( new Event(65000, A, C1) ); ksession.fireAllRules(); clock.advanceTime( 10, TimeUnit.SECONDS ); FactHandle handle2 = ksession.insert( new Event(75000, A, C2) ); ksession.fireAllRules(); clock.advanceTime( 2, TimeUnit.SECONDS ); And this is mainly the output I get: detected code C1 @ 7 event id=44b895e5-7287-404b-8204-3de5690b2360 timestamp=65000 device=A code=C1 detected combination @ 8 event id=44b895e5-7287-404b-8204-3de5690b2360 timestamp=65000 device=A code=C1 event id=fc89715b-fc30-4b12-ab31-a3884dcd4886 timestamp=75000 device=A code=C2 Any ideas concerning an alternative solution are highly welcomed. Thanks, Ingo ___ 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] KieContainer kContainer = ks.newKieContaine ....
Have a question using drools 6 - I am following the example: Repo looks fine, rules and artifact in: .m2/repository/org/acme/brms/acmepoc/1.0 code seems straightforward: // Install example1 in the local maven repo before to do this KieContainer kContainer = ks.newKieContainer(ks.newReleaseId(org.acme.brms, acmepoc, 1.0)); but get: Exception in thread main java.lang.RuntimeException: Cannot find KieModule: org.acme.brms:acmepoc:1.0 at org.drools.compiler.kie. builder.impl.KieServicesImpl.newKieContainer(KieServicesImpl.java:86) at com.sample.KieContainerFromKieRepoExample.go(KieContainerFromKieRepoExample.java:15) at com.sample.KieContainerFromKieRepoExample.main(KieContainerFromKieRepoExample.java:26) ___ rules-users mailing list rules-users@lists.jboss.org https://lists.jboss.org/mailman/listinfo/rules-users
[rules-users] brms depoylment diagrams
I am looking for deployment diagrams, from say dev to qa to prod I know there are several techniques, snapshots, webdav, import/export entire repo. Just wondering if there are some diagrams of rules sdlc in multiple environments ___ rules-users mailing list rules-users@lists.jboss.org https://lists.jboss.org/mailman/listinfo/rules-users
[rules-users] Entry-Point and Accumluate
Is it possible to use both in the same rule? Using Guided Rule Editor? ___ rules-users mailing list rules-users@lists.jboss.org https://lists.jboss.org/mailman/listinfo/rules-users
[rules-users] entry-point + accumulate in same rule using BRL (Guided Rule Editor)
I can't seem to re-create the below in BRL (entry-point + accumulate) I want to combine an entry-point and an accumulate function such as (the below is DRL, which works) *rule GSS-Sev1-Monitor* *no-loop true* *dialect mvel* *when* *$ticketStatistics : TicketStatistics( $ID : ID == null )* *accumulate($supportTicket:SupportTicket( ticketStatisticsID == $ID , severity == Sev-1 ) over window:time (5m) from entry-point gss-support-stream, $num : count( $supportTicket ))* *then* *$ticketStatistics.currentTicketCount = $num;* *update( $ticketStatistics );* *end* I can't seem to re-create this in Guvnor (BRL) ___ rules-users mailing list rules-users@lists.jboss.org https://lists.jboss.org/mailman/listinfo/rules-users
[rules-users] fusion
How would one write a rule that checked if say Message has been inserted into the stream 10 times over the last 30 days? ___ rules-users mailing list rules-users@lists.jboss.org https://lists.jboss.org/mailman/listinfo/rules-users
[rules-users] Problem deploying 5.3.0 drools server in Tomcat
Hi, When I deploy drools-camel-server-5.3.0.Final.war into tomcat (webapps folder), I see the following problem. I don't have a problem with the 5.3 Guvnor war file. Any idea what might be going on? INFO: Starting ProtocolHandler [ajp-apr-8009] Feb 6, 2012 9:06:40 PM org.apache.catalina.startup.Catalina start INFO: Server startup in 24453 ms INFO 06-02 21:07:17,196 (NilAuthenticator.java:authenticate:35) All use rs are guests. Feb 6, 2012 9:15:00 PM org.apache.catalina.startup.HostConfig deployWAR INFO: Deploying web application archive C:\apache-tomcat-7.0.25\webapps\drools-c amel-server-5.3.0.Final.war Feb 6, 2012 9:15:03 PM org.apache.catalina.loader.WebappClassLoader validateJarF ile INFO: validateJarFile(C:\apache-tomcat-7.0.25\webapps\drools-camel-server-5.3.0. Final\WEB-INF\lib\geronimo-servlet_3.0_spec-1.0.jar) - jar not loaded. See Servl et Spec 2.3, section 9.7.2. Offending class: javax/servlet/Servlet.class log4j:WARN No appenders could be found for logger (org.springframework.web.conte xt.ContextLoader). log4j:WARN Please initialize the log4j system properly. Thanks, Ravi. ___ rules-users mailing list rules-users@lists.jboss.org https://lists.jboss.org/mailman/listinfo/rules-users
[rules-users] How to use Salience in a decision table
Hello: Can Salience be used in a decision table. Thanks, Ravi ___ rules-users mailing list rules-users@lists.jboss.org https://lists.jboss.org/mailman/listinfo/rules-users
Re: [rules-users] Books on Drools
Thanks Mark\Ellen. Regards, Ravi Mark Proctor wrote: Ravi Krishnamurthy wrote: Hello: Could you suggest some books on Drools. There are no specific Drools books at the moment, some are on the way. We list related recommended reading material on the documentation page: http://labs.jboss.org/drools/documentation.html Mark Thanks, Ravi ___ 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] Decision table capabilities
Thanks Sowmya. Sowmya Yellamilli wrote: unfortunately not possible not only decision tables, across all drools implementations because only 'when -- then' is permitted not 'otherwise' Ravi Krishnamurthy wrote: Hello: 1) Is it possible to write any if then else kind of rule instead of stating all the possibilities in a decision table. For example: if a == 25 print (success) else if a == 10 print (not bad) else print (try again) Thanks, Ravi ___ rules-users mailing list rules-users@lists.jboss.org https://lists.jboss.org/mailman/listinfo/rules-users -- View this message in context: http://www.nabble.com/Decision-table-capabilities-tp20930053p20930310.html Sent from the drools - user 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] Decision table capabilities
Thanks Greg. Hope you will get your spare time soon :) Anyway I'm a newbie and don't know how to request the dev. Let me know how to make a request and I will do it. Regards, Ravi Greg Barton wrote: I've wanted this kind of functionality for a while, and if I have a spare month some time and the dev team approves I'll build it in. :) Don't hold your breath, though. If you want it quicker, bug the devs. --- On Wed, 12/10/08, Sowmya Yellamilli [EMAIL PROTECTED] wrote: From: Sowmya Yellamilli [EMAIL PROTECTED] Subject: Re: [rules-users] Decision table capabilities To: rules-users@lists.jboss.org Date: Wednesday, December 10, 2008, 1:27 AM unfortunately not possible not only decision tables, across all drools implementations because only 'when -- then' is permitted not 'otherwise' Ravi Krishnamurthy wrote: Hello: 1) Is it possible to write any if then else kind of rule instead of stating all the possibilities in a decision table. For example: if a == 25 print (success) else if a == 10 print (not bad) else print (try again) Thanks, Ravi ___ rules-users mailing list rules-users@lists.jboss.org https://lists.jboss.org/mailman/listinfo/rules-users -- View this message in context: http://www.nabble.com/Decision-table-capabilities-tp20930053p20930310.html Sent from the drools - user 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
[rules-users] Decision table capabilities
Hello: 1) Is it possible to write any if then else kind of rule instead of stating all the possibilities in a decision table. For example: if a == 25 print (success) else if a == 10 print (not bad) else print (try again) Thanks, Ravi ___ rules-users mailing list rules-users@lists.jboss.org https://lists.jboss.org/mailman/listinfo/rules-users
[rules-users] Books on Drools
Hello: Could you suggest some books on Drools. Thanks, Ravi ___ rules-users mailing list rules-users@lists.jboss.org https://lists.jboss.org/mailman/listinfo/rules-users
[rules-users] Some questions
Hello: Could some one give some input for the following questions 1) Can drools read the datas for facts from Excel 2) is Nested rules is supported in Drools 3) can rules communicate across .drl files 4) is there support for looping and collection Thanks in advance, Ravi ___ rules-users mailing list rules-users@lists.jboss.org https://lists.jboss.org/mailman/listinfo/rules-users
Re: [rules-users] How to monitor what rules are fired
Thanks Michael. I will look into it. Regards, Ravi Michael Rhoden wrote: Not sure if there are any examples around, but you could use AgendaEventListener to see any rules firing. -Michael - Original Message - From: Ravi Krishnamurthy [EMAIL PROTECTED] To: Rules Users List rules-users@lists.jboss.org Sent: Monday, October 27, 2008 11:31:40 AM GMT -06:00 US/Canada Central Subject: [rules-users] How to monitor what rules are fired Hello: Would like to monitor what rules are fired, how many times it is fired etc. Is it possible to do this with Drools 4.x Thanks for your help, Ravi ___ 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] How to monitor what rules are fired
Hello: Would like to monitor what rules are fired, how many times it is fired etc. Is it possible to do this with Drools 4.x Thanks for your help, Ravi ___ rules-users mailing list rules-users@lists.jboss.org https://lists.jboss.org/mailman/listinfo/rules-users
Re: [rules-users] Turning on and off a particular rule
Pallav: the enabled keywork works. In order to do this, the rules need to be updated at runtime. Wondering if there is any other way other than updating the rules to get this behavior during runtime. Thanks, Ravi Ravi wrote: Thanks Shyam, will try it out. *From:* [EMAIL PROTECTED] [EMAIL PROTECTED] On Behalf Of Shyam, Pallav (MSCIBARRA) [EMAIL PROTECTED] *Sent:* Monday, September 01, 2008 12:49 PM *To:* rules-users@lists.jboss.org *Subject:* Re: [rules-users] Turning on and off a particular rule To turn off a rule write enabled false on the line after the rule name. Pallav - Original Message - From: [EMAIL PROTECTED] [EMAIL PROTECTED] To: Rules Users List rules-users@lists.jboss.org Sent: Tue Sep 02 02:20:27 2008 Subject: [rules-users] Turning on and off a particular rule Hello: Wondering if it is possible to enable or disable a rule after the rules are defined in a project. Thanks, Ravi NOTICE: If received in error, please destroy and notify sender. Sender does not intend to waive confidentiality or privilege. Use of this email is prohibited when received in error. ___ rules-users mailing list rules-users@lists.jboss.org https://lists.jboss.org/mailman/listinfo/rules-users
[rules-users] Turning on and off a particular rule
Hello: Wondering if it is possible to enable or disable a rule after the rules are defined in a project. Thanks, Ravi ___ rules-users mailing list rules-users@lists.jboss.org https://lists.jboss.org/mailman/listinfo/rules-users
RE: [rules-users] Turning on and off a particular rule
Thanks Shyam, will try it out. From: [EMAIL PROTECTED] [EMAIL PROTECTED] On Behalf Of Shyam, Pallav (MSCIBARRA) [EMAIL PROTECTED] Sent: Monday, September 01, 2008 12:49 PM To: rules-users@lists.jboss.org Subject: Re: [rules-users] Turning on and off a particular rule To turn off a rule write enabled false on the line after the rule name. Pallav - Original Message - From: [EMAIL PROTECTED] [EMAIL PROTECTED] To: Rules Users List rules-users@lists.jboss.org Sent: Tue Sep 02 02:20:27 2008 Subject: [rules-users] Turning on and off a particular rule Hello: Wondering if it is possible to enable or disable a rule after the rules are defined in a project. Thanks, Ravi NOTICE: If received in error, please destroy and notify sender. Sender does not intend to waive confidentiality or privilege. Use of this email is prohibited when received in error. ___ rules-users mailing list rules-users@lists.jboss.org https://lists.jboss.org/mailman/listinfo/rules-users
[rules-users] Rule compilation error
Hello: I had generated the decisiontable using the eclipse plugin for drools 4.x. using the eclipse the DecisionsampleTest works fine but on running it from the command line gets the following error: /C:\FirstDroolPrj\binjava com.sample.DecisionTableTest org.drools.rule.InvalidRulePackage: Rule Compilation error : [Rule name=HelloWor ld_11, agendaGroup=MAIN, salience=0, no-loop=false] com/sample/Rule_HelloWorld_11_0.java (8:411) : The method update(Decisio nTableTest.Message) is undefined for the type Rule_HelloWorld_11_0 com/sample/Rule_HelloWorld_11_0.java (9:453) : The method update(Decisio nTableTest.Message) is undefined for the type Rule_HelloWorld_11_0 at org.drools.rule.Package.checkValidity(Package.java:419) at org.drools.common.AbstractRuleBase.addPackage(AbstractRuleBase.java:2 92) at com.sample.DecisionTableTest.readDecisionTable(DecisionTableTest.java :62) at com.sample.DecisionTableTest.main(DecisionTableTest.java:35) / Have attached the .xsl and the DecisionTableTest for the reference. Thanks for your help and time, Regards, Ravi Sample.xls Description: MS-Excel spreadsheet package com.sample; /* * Copyright 2005 JBoss Inc * * Licensed under the Apache License, Version 2.0 (the License); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an AS IS BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ import java.io.StringReader; import org.drools.RuleBase; import org.drools.RuleBaseFactory; import org.drools.WorkingMemory; import org.drools.compiler.PackageBuilder; import org.drools.decisiontable.InputType; import org.drools.decisiontable.SpreadsheetCompiler; import org.drools.rule.Package; public class DecisionTableTest { public static final void main(String[] args) { try { //load up the rulebase RuleBase ruleBase = readDecisionTable(); WorkingMemory workingMemory = ruleBase.newStatefulSession(); //go ! Message message = new Message(); message.setMessage( Hello World fellows ); message.setStatus( Message.HELLO ); workingMemory.insert( message ); workingMemory.fireAllRules(); } catch (Throwable t) { t.printStackTrace(); } } /** * Please note that this is the low level rule assembly API. */ private static RuleBase readDecisionTable() throws Exception { //read in the source final SpreadsheetCompiler converter = new SpreadsheetCompiler(); final String drl = converter.compile( /Sample.xls, InputType.XLS ); PackageBuilder builder = new PackageBuilder(); builder.addPackageFromDrl( new StringReader( drl ) ); Package pkg = builder.getPackage(); RuleBase ruleBase = RuleBaseFactory.newRuleBase(); ruleBase.addPackage( pkg ); return ruleBase; } public static class Message { public static final int HELLO = 0; public static final int GOODBYE = 1; private String message; private int status; public String getMessage() { return this.message; } public void setMessage(String message) { this.message = message; } public int getStatus() { return this.status; } public void setStatus( int status ) { this.status = status; } } }___ rules-users mailing list rules-users@lists.jboss.org https://lists.jboss.org/mailman/listinfo/rules-users
Re: [rules-users] Rule compilation error
Removed the update(m) from the xsl. Then the command line worked fine. Still not able to understand why it worked inside the eclipse and not outside. regards, Ravi Ravi wrote: Hello: I had generated the decisiontable using the eclipse plugin for drools 4.x. using the eclipse the DecisionsampleTest works fine but on running it from the command line gets the following error: /C:\FirstDroolPrj\binjava com.sample.DecisionTableTest org.drools.rule.InvalidRulePackage: Rule Compilation error : [Rule name=HelloWor ld_11, agendaGroup=MAIN, salience=0, no-loop=false] com/sample/Rule_HelloWorld_11_0.java (8:411) : The method update(Decisio nTableTest.Message) is undefined for the type Rule_HelloWorld_11_0 com/sample/Rule_HelloWorld_11_0.java (9:453) : The method update(Decisio nTableTest.Message) is undefined for the type Rule_HelloWorld_11_0 at org.drools.rule.Package.checkValidity(Package.java:419) at org.drools.common.AbstractRuleBase.addPackage(AbstractRuleBase.java:2 92) at com.sample.DecisionTableTest.readDecisionTable(DecisionTableTest.java :62) at com.sample.DecisionTableTest.main(DecisionTableTest.java:35) / Have attached the .xsl and the DecisionTableTest for the reference. Thanks for your help and time, Regards, Ravi ___ rules-users mailing list rules-users@lists.jboss.org https://lists.jboss.org/mailman/listinfo/rules-users
[rules-users] Split Constraint - Rule flow
Hi, I've a split constraint as same as LHS of my rule. Whenever i change condition of rule, i need to change the constraint as well. It is little bit painful for business users, right? Is there any way i can keep condition in common place. where constraint suppose to pick the same condition? Any suggestions are welcome. Thanks Ravi Thalupula -- View this message in context: http://www.nabble.com/Split-Constraint---Rule-flow-tp17800900p17800900.html Sent from the drools - user 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] ading incoming connection in Action - Rule flow
Hi, How can i read the incoming connection of my action ? using MVEL code. for example: Start--RuleGroup -- Split -- Action -- End in above example i need to read the name of Split in Action using MVEL code. it seems that current released version of drools, supporting only MVEL code in Action. If it is possible through the JAVA, plz let me know how i can write java code in Action( any configurations?). Thanks, Ravi Thalupula -- View this message in context: http://www.nabble.com/Reading-incoming-connection-in-Action---Rule-flow-tp17800998p17800998.html Sent from the drools - user mailing list archive at Nabble.com. ___ rules-users mailing list rules-users@lists.jboss.org https://lists.jboss.org/mailman/listinfo/rules-users
Re: Re[rules-users] ading incoming connection in Action - Rule flow
Hi Kris, Thanks for your information. Actually i have an action, which is common to a couple of splits, so in my action i need to log(log4j - file appender) that from which split request is coming from. I mean to say, on based on incoming split request, different message need to be log. http://www.nabble.com/file/p17802310/Action.JPG Action.JPG http://www.nabble.com/file/p17802310/Action.jpg Thanks, Ravi Thalupula Kris Verlaenen wrote: it seems that current released version of drools, supporting only MVEL code The action node allows you to simply execute a piece of code. While Drools 4.0.7 only allows you to use mvel fragments, the upcoming Drools 5.x release also allows you to use the Java dialect. It will also allow you to access globals or workingMemory etc. How can i read the incoming connection of my action ? using MVEL code. An action node currently does not have direct access to information about the previous node that triggered the action. Could you clarify why you would need this? In Drools5, sharing of information between nodes using globals or the working memory will be possible. But if you could provide a good use case on why you would need access to this information, I could see whether it would be possible to expose this kind of information in the action code as well. Kris for example: Start--RuleGroup -- Split -- Action -- End in above example i need to read the name of Split in Action using MVEL code. in Action. If it is possible through the JAVA, plz let me know how i can write java code in Action( any configurations?). Thanks, Ravi Thalupula -- View this message in context: http://www.nabble.com/Reading-incoming-connection-in-Action---Rule-flow-tp17800998p17800998.html Sent from the drools - user 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 -- View this message in context: http://www.nabble.com/Reading-incoming-connection-in-Action---Rule-flow-tp17800998p17802310.html Sent from the drools - user mailing list archive at Nabble.com. ___ rules-users mailing list rules-users@lists.jboss.org https://lists.jboss.org/mailman/listinfo/rules-users
Re: Re[rules-users] ading incoming connection in Action - Rule flow
Hi, is action will support below kind of stuff ? p : Person( ) modify( p ) { age =20} i'm getting error like java.lang.ClassCastException: java.lang.Class if it is possible please let me know right way of doing. Thanks Ravi Thalupula -- View this message in context: http://www.nabble.com/Reading-incoming-connection-in-Action---Rule-flow-tp17800998p17805626.html Sent from the drools - user mailing list archive at Nabble.com. ___ rules-users mailing list rules-users@lists.jboss.org https://lists.jboss.org/mailman/listinfo/rules-users
Re: Re[rules-users] ading incoming connection in Action - Rule flow
Hi Kris, Thanks a lot for providing valuable information. All the best for Drools team for their new releases. Regards, Ravi Thalupula -- View this message in context: http://www.nabble.com/Reading-incoming-connection-in-Action---Rule-flow-tp17800998p17815445.html Sent from the drools - user 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] logging
Hi, How can i log that where a rule is executed or not for supplied data? If the rule fires, in 'then' section i can have a log statement. How can i log that the rule is not executed?? I need to log in both scenarios. Thanks, Ravi Thalupula -- View this message in context: http://www.nabble.com/logging-tp17779598p17779598.html Sent from the drools - user 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] Constants initialize
Hi, Can some one suggest me how can i initialize a constant (String), which is common to all rules and the value of constant can able to change by Business users (BRMS). I think we can use global variable or fact, but that need to be supplied by client program and initialized at client side. I'm expecting initialization at rules side, which can easily maintain by business users. Thanks in advance. Regards, Ravi Thalupula -- View this message in context: http://www.nabble.com/Constants-initialize-tp17731133p17731133.html Sent from the drools - user 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 4.0.7 supports Clustering and DB interaction ?
Hi, Can some one answer my questions regarding drools support 1. is drools supports clustering? 2. is drools supports Database interactions? appreciate your help. it would be great for me, if any body provide examples for above things. -- View this message in context: http://www.nabble.com/Drools-4.0.7-supports-Clustering-and-DB-interaction---tp17553747p17553747.html Sent from the drools - user 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 4.0.7 supports Clustering and DB interaction ?
Hi Mike, Thanks for your quick response, just now read about from in the manual. Anstis, Michael (M.) wrote: Partial answer. 2. Drools supports database interactions. Have a look at the from clause which allows for retrieval of data from outside the working memory. Cheers, Mike -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Thalupula Ravi Sent: 30 May 2008 09:13 To: rules-users@lists.jboss.org Subject: [rules-users] Drools 4.0.7 supports Clustering and DB interaction ? Hi, Can some one answer my questions regarding drools support 1. is drools supports clustering? 2. is drools supports Database interactions? appreciate your help. it would be great for me, if any body provide examples for above things. -- View this message in context: http://www.nabble.com/Drools-4.0.7-supports-Clustering-and-DB-interaction--- tp17553747p17553747.html Sent from the drools - user 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 -- View this message in context: http://www.nabble.com/Drools-4.0.7-supports-Clustering-and-DB-interaction---tp17553747p17554745.html Sent from the drools - user 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] Advantages and Disadvantages of from
Hi Marcus, Again thanks for your information. Appreciate your help. Regards, Ravi T Marcus Ilgner wrote: Hi, On Fri, May 30, 2008 at 5:06 PM, Thalupula Ravi [EMAIL PROTECTED] wrote: Hi, Can some one describe about advantages and disadvantages of below to approaches 1. Interacting Database for information in rule ( using from or something else)? or 2. Required information supplied to rules in the form facts at one shot by client instead of again hitting the database. Thanks for your help:handshake: if you're going to use from in your rules, you should make sure that you provide some extra methods in your DAOs instead of only some generic getAll() method. This way, if there are some hundred thousands records in your database, Drools will not have to instantiate an object for each of them since the DAO/database can filter out those objects that are not relevant to the use case. If, for example, you write some rule that handles order processing, you could write a DAO method getUnprocessedOrders() which will ignore all orders that are already processed. AFAIK Drools does no sharing/caching of objects retrieved via equivalent from calls in different rules. When planning my current project, I quickly found that manually retrieving the objects and inserting them into the working memory gave me somewhat more flexibility but that of course depends on the use case at hand. Best regards Marcus ___ rules-users mailing list rules-users@lists.jboss.org https://lists.jboss.org/mailman/listinfo/rules-users -- View this message in context: http://www.nabble.com/Advantages-and-Disadvantages-of-%22from%22-tp17561274p17562867.html Sent from the drools - user 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] Re: Ant script for creating pkg files
Hi, You can use below ant script to build .pkg files project default=rules name=RuleProject !-- Uncomment this for Maven Runner -- property name=eclipsepath value=./ !-- Uncomment this for Eclipse Runner -- !-- property name=eclipsepath value=../../..// -- path id=cheese.classpath pathelement location=${eclipsepath}/build/Beans.jar/ /path target name=beans tstamp/ echo message=CREATING Beans JAR.../ jar jarfile=./build/Beans.jar fileset dir=./bin/ /jar /target path pathelement/pathelement /path path id=drools.classpath fileset dir=${eclipsepath}/build/lib/ include name=*.jar/ /fileset pathelement location=target/ /path taskdef name=compiler classname=org.drools.contrib.DroolsCompilerAntTask classpathref=drools.classpath / target name=rules compiler srcdir=${eclipsepath}/src/main/rules tofile=${eclipsepath}/target/cheese.pkg classpathref=cheese.classpath binformat=package include name=*.drl / !-- include name=*.brl / include name=*.xml / include name=*.dslr / -- /compiler /target /project reference http://www.nabble.com/Ant-compiler-task--td15906277.html#a15907448 Regards, Ravi T ___ rules-users mailing list rules-users@lists.jboss.org https://lists.jboss.org/mailman/listinfo/rules-users