--- Begin Message ---Hello Mark Thanks for your reply. Actually I have already developed a framework in which for loading the rule file I am using the following steps: drl =new InputStreamReader(new FileInputStream(this.fileName)); drlStr = this.getInputStreamAsString(drl); strReader = new StringReader(drlStr); builder.addPackageFromXml(strReader); pkg = builder.getPackage(); ruleBase.addPackage(pkg); and for firing the rules the steps are: StatefulSession session = ruleBase.newStatefulSession(); session.insert(this.beanObj); Agenda agenda=session.getAgenda(); AgendaGroup agendagroup=agenda.getAgendaGroup("airline"); session.setFocus(agendagroup); session.fireAllRules(); Now I want to fire all the rules in parallel to decrease the time taken by the application. How can I do this? Can I use org.drools.concurrent package for this task which is in the drools-core-4.0.3.jar. Any information will be appreciated. Thanks.With Regards Prateek ________________________________ From: [EMAIL PROTECTED] on behalf of [EMAIL PROTECTED] Sent: Wed 11/28/2007 8:13 PM To: [email protected] Subject: rules-users Digest, Vol 12, Issue 79 Send rules-users mailing list submissions to [email protected] To subscribe or unsubscribe via the World Wide Web, visit https://lists.jboss.org/mailman/listinfo/rules-users or, via email, send a message with subject or body 'help' to [EMAIL PROTECTED] You can reach the person managing the list at [EMAIL PROTECTED] When replying, please edit your Subject line so it is more specific than "Re: Contents of rules-users digest..." Today's Topics: 1. Re: RegEx in LHS (Markus Helbig) 2. about use of org.drools.concurrent package ([EMAIL PROTECTED]) 3. Get compiled Java Code of Rules (Markus Helbig) 4. Re: Get compiled Java Code of Rules (Darko IVANCAN) 5. Re: about use of org.drools.concurrent package (Mark Proctor) 6. Re: Get compiled Java Code of Rules (Mark Proctor) 7. Duplicate variable issue (Eric Miles) ---------------------------------------------------------------------- Message: 1 Date: Wed, 28 Nov 2007 13:26:17 +0100 From: "Markus Helbig" <[EMAIL PROTECTED]> Subject: Re: [rules-users] RegEx in LHS To: "Rules Users List" <[email protected]> Message-ID: <[EMAIL PROTECTED]> Content-Type: text/plain; charset=UTF-8 ok thanks ... Markus 2007/11/28, Edson Tirelli <[EMAIL PROTECTED]>: > > Markus, > > The engine processes the mappings in the order they are written, so you > must always write more restrictive patterns first and less restrictive > patterns second: > > [condition][]Title contains not {value}=title not matches {value} > [condition][]Title contains {value}=title matches {value} > > []s > Edson > > 2007/11/28, Markus Helbig <[EMAIL PROTECTED] >: > > > > Hi all, > > > > i'd like to have following DSL conditions > > > > [condition][]Title contains {value}=title matches {value} > > [condition][]Title contains not {value}=title not matches {value} > > > > > > Currently (using Drools 4.0.3) it seems the parsers resolves to the > > first condtion and is matching the word "not" to {value}, so i tried > > > > [condition][]Title contains\s+{value}=title matches {value} > > [condition][]Title contains\snot\s{value}=title not matches {value} > > > > > > but this doesn't help, because second one again matches to the first > > rule ... also it is missing one parameter ... > > > > Any solutions? > > > > Cheers > > > > Markus > > _______________________________________________ > > rules-users mailing list > > [email protected] > > https://lists.jboss.org/mailman/listinfo/rules-users > > > > > > -- > Edson Tirelli > JBoss Drools Core Development > Office: +55 11 3529-6000 > Mobile: +55 11 9287-5646 > JBoss, a division of Red Hat @ www.jboss.com > _______________________________________________ > rules-users mailing list > [email protected] > https://lists.jboss.org/mailman/listinfo/rules-users > > ------------------------------ Message: 2 Date: Wed, 28 Nov 2007 19:06:04 +0530 From: <[EMAIL PROTECTED]> Subject: [rules-users] about use of org.drools.concurrent package To: <[email protected]> Message-ID: <[EMAIL PROTECTED]> Content-Type: text/plain; charset="iso-8859-1" Hello all I am using Drools 4.0.3 in my application. I want to know about the use of org.drools.concurrent package which is in the drools-core-4.0.3.jar. What type of concurrent operations I can do by the classes of this package. Any information will be appreciated. Thanks. With Regards Prateek The information contained in this electronic message and any attachments to this message are intended for the exclusive use of the addressee(s) and may contain proprietary, confidential or privileged information. If you are not the intended recipient, you should not disseminate, distribute or copy this e-mail. Please notify the sender immediately and destroy all copies of this message and any attachments. WARNING: Computer viruses can be transmitted via email. The recipient should check this email and any attachments for the presence of viruses. The company accepts no liability for any damage caused by any virus transmitted by this email. www.wipro.com -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.jboss.org/pipermail/rules-users/attachments/20071128/c4f1ea47/attachment-0001.html ------------------------------ Message: 3 Date: Wed, 28 Nov 2007 14:58:58 +0100 From: "Markus Helbig" <[EMAIL PROTECTED]> Subject: [rules-users] Get compiled Java Code of Rules To: [email protected] Message-ID: <[EMAIL PROTECTED]> Content-Type: text/plain; charset=UTF-8 Hi, is there any possibility to get the compiled java code of the rules ... could be helpful for several reasons ... Cheers Markus ------------------------------ Message: 4 Date: Wed, 28 Nov 2007 14:11:04 +0000 From: Darko IVANCAN <[EMAIL PROTECTED]> Subject: Re: [rules-users] Get compiled Java Code of Rules To: Rules Users List <[email protected]> Message-ID: <[EMAIL PROTECTED]> Content-Type: text/plain; charset=UTF-8 Hi, The package can be serialized. See manual: deployment options. The package can also be downloaded from the BRMS. Hope this helps, Darko Ivancan On 28/11/2007 13:58, Markus Helbig wrote: > Hi, > > is there any possibility to get the compiled java code of the rules > ... could be helpful for several reasons ... > > Cheers > > Markus > _______________________________________________ > rules-users mailing list > [email protected] > https://lists.jboss.org/mailman/listinfo/rules-users > > > ------------------------------ Message: 5 Date: Wed, 28 Nov 2007 14:19:51 +0000 From: Mark Proctor <[EMAIL PROTECTED]> Subject: Re: [rules-users] about use of org.drools.concurrent package To: Rules Users List <[email protected]> Message-ID: <[EMAIL PROTECTED]> Content-Type: text/plain; charset="iso-8859-1" The only reason to use this is to impement an Async executor service, (see the async methods on the stateful and stateless sessions), If you don't like the default one you can configure a different once, just follow the existing designs and interfaces for the DefaultExecutorService - the used ExecutorService is configured in the RuleBaseConfiguration. Mark [EMAIL PROTECTED] wrote: > Hello all > > I am using Drools 4.0.3 in my application. > I want to know about the use of *org.drools.concurrent *package which > is in the *drools-core-4.0.3.jar*. > What type of concurrent operations I can do by the classes of this > package. > > Any information will be appreciated. > Thanks. > > /*With Regards*/ > /*Prateek */ > > The information contained in this electronic message and any > attachments to this message are intended for the exclusive use of the > addressee(s) and may contain proprietary, confidential or privileged > information. If you are not the intended recipient, you should not > disseminate, distribute or copy this e-mail. Please notify the sender > immediately and destroy all copies of this message and any attachments. > > WARNING: Computer viruses can be transmitted via email. The recipient > should check this email and any attachments for the presence of > viruses. The company accepts no liability for any damage caused by any > virus transmitted by this email. > > www.wipro.com > > ------------------------------------------------------------------------ > > _______________________________________________ > rules-users mailing list > [email protected] > https://lists.jboss.org/mailman/listinfo/rules-users > -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.jboss.org/pipermail/rules-users/attachments/20071128/6d534e1f/attachment-0001.html ------------------------------ Message: 6 Date: Wed, 28 Nov 2007 14:26:23 +0000 From: Mark Proctor <[EMAIL PROTECTED]> Subject: Re: [rules-users] Get compiled Java Code of Rules To: Rules Users List <[email protected]> Message-ID: <[EMAIL PROTECTED]> Content-Type: text/plain; charset=UTF-8; format=flowed Markus Helbig wrote: > Hi, > > is there any possibility to get the compiled java code of the rules > ... could be helpful for several reasons ... > > There is no public api for this. If you are adventurous you can use the internal stuff PackageCompilatData data = pkg.getPackageCompilationData(); // gets the internal data store List list = data.list() // returns the list of files Byte[] bytes = data.read( (String) list.get(0) ) // get the bytecode for the first file in the list data.write( name, bytes ) // replace existing bytecode with new bytecode Doing the write action will also wire up the byte[] to the Rete network, so you can actually use this to hotswap consequence etc. But I must stress this is voodoo stuff and your on your own and the api could change at any time :) > Cheers > > Markus > _______________________________________________ > rules-users mailing list > [email protected] > https://lists.jboss.org/mailman/listinfo/rules-users > > ------------------------------ Message: 7 Date: Wed, 28 Nov 2007 09:43:40 -0500 From: Eric Miles <[EMAIL PROTECTED]> Subject: [rules-users] Duplicate variable issue To: [email protected] Message-ID: <[EMAIL PROTECTED]> Content-Type: text/plain All, I have a rule that I'm trying to run against, but I'm getting a duplicate parameter error that doesn't make much sense to me. Here is the rule: rule "Daily Core Hours" ruleflow-group "maxiflex-messages" when ScheduleDay($day: day, $schedIn: timeIn, $schedOut: timeOut) not SmartTimeMessage(message == ("Core hours for day " + ($day + 1) + " have not been met")) Integer(intValue > 0 && intValue < ($schedOut - $schedIn)) from accumulate( SmartTimeLine(tito.day == $day, $timeOut: tito.timeOut, $timeIn: tito.timeIn), init( int total = 0; ), action( total += calculateTime($schedIn, $schedOut, (Integer)$timeIn, (Integer)$timeOut); ), reverse( total -= calculateTime($schedIn, $schedOut, (Integer)$timeIn, (Integer)$timeOut); ), result( total ) ) then SmartTimeMessage message = new SmartTimeMessage(); message.setType(SmartTimeMessageType.WARNING); message.setMessage("Core hours for day " + ($day + 1) + " have not been met"); insert(message); end function int calculateTime(int schedIn, int schedOut, int timeIn, int timeOut) { int beginTime = 0, endTime = 0; if(timeIn < schedIn) { beginTime = schedIn; } else { beginTime = timeIn; } if(timeOut > schedOut) { endTime = schedOut; } else { endTime = timeOut; } return (endTime - beginTime); } The following is the error: org.drools.rule.InvalidRulePackage: Rule Compilation error : [Rule name=Daily Core Hours, agendaGroup=MAIN, salience=0, no-loop=false] com/kronos/webta/service/smarttime/rules/Rule_Daily_Core_Hours_0.java (32:1301) : Duplicate parameter $schedOut com/kronos/webta/service/smarttime/rules/Rule_Daily_Core_Hours_0.java (32:1330) : Duplicate parameter $schedIn com/kronos/webta/service/smarttime/rules/Rule_Daily_Core_Hours_0.java (41:1735) : Duplicate parameter $schedOut com/kronos/webta/service/smarttime/rules/Rule_Daily_Core_Hours_0.java (41:1764) : Duplicate parameter $schedIn com/kronos/webta/service/smarttime/rules/Rule_Daily_Core_Hours_0.java (51:2330) : Duplicate parameter $schedOut com/kronos/webta/service/smarttime/rules/Rule_Daily_Core_Hours_0.java (51:2359) : Duplicate parameter $schedIn com/kronos/webta/service/smarttime/rules/Rule_Daily_Core_Hours_0.java (58:2738) : Duplicate parameter $schedOut com/kronos/webta/service/smarttime/rules/Rule_Daily_Core_Hours_0.java (58:2767) : Duplicate parameter $schedIn at org.drools.rule.Package.checkValidity(Package.java:424) at org.drools.common.AbstractRuleBase.addPackage(AbstractRuleBase.java:364) at com.kronos.webta.service.smarttime.rules.maxiflex.FlowTest.setUpBeforeClass(FlowTest.java:79) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25) at java.lang.reflect.Method.invoke(Method.java:585) at org.junit.internal.runners.ClassRoadie.runBefores(ClassRoadie.java:49) at org.junit.internal.runners.ClassRoadie.runProtected(ClassRoadie.java:36) at org.junit.internal.runners.JUnit4ClassRunner.run(JUnit4ClassRunner.java:42) at org.eclipse.jdt.internal.junit4.runner.JUnit4TestReference.run(JUnit4TestReference.java:38) at org.eclipse.jdt.internal.junit.runner.TestExecution.run(TestExecution.java:38) at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:460) at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:673) at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.run(RemoteTestRunner.java:386) at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.main(RemoteTestRunner.java:196) Any help with this? Thanks in advance! Eric ------------------------------ _______________________________________________ rules-users mailing list [email protected] https://lists.jboss.org/mailman/listinfo/rules-users End of rules-users Digest, Vol 12, Issue 79 *******************************************<<winmail.dat>>
--- End Message ---
The information contained in this electronic message and any attachments to this message are intended for the exclusive use of the addressee(s) and may contain proprietary, confidential or privileged information. If you are not the intended recipient, you should not disseminate, distribute or copy this e-mail. Please notify the sender immediately and destroy all copies of this message and any attachments. WARNING: Computer viruses can be transmitted via email. The recipient should check this email and any attachments for the presence of viruses. The company accepts no liability for any damage caused by any virus transmitted by this email. www.wipro.com
_______________________________________________ rules-users mailing list [email protected] https://lists.jboss.org/mailman/listinfo/rules-users
