Re: [rules-users] hot deployment behavior
You have it right. If any rule is modified, it's effective removed and added. Removal of a rule, remove's all it's matches, activations and logical inserts. There is no way to preserve this information for a rule that modified. It would be very hard to determine what information is or is not safe to preserve. If the rule is a very minor change then add a new rule instead, it will re-use all the available sharing (matched information). It can build up a second set of justifiers for the logical insertions. Then you can remove the old role. Mark On 21 Jan 2013, at 23:59, William Guinn william.gu...@summussoftware.com wrote: Would someone be so kind to describe exactly what happens when we hot deploy a rule change to a stateful session. It looks like the old version of the rule is deleted, in turn forcing a retraction of any RHS that was logically inserted (all our inserts are logical) as a consequence of this rule (and any cascading effects) that has no other LHS to support its existence. Then the new rule is inserted, the agenda is rebuilt based on the current working memory contents, and the rule is automatically fired (in our case recreating everything it just deleted) Do I have this right? Is there a way to change the behavior to be less invasive? This rebuild can take minutes, and I am not running at high volume yet. For example what if the updated rule logically has no impact on existing working memory contents, let’s say it’s a maintenance change for future facts or new conditions? If the operation did not delete and rebuild everything, rather if it determined the impact of the change, and only replaced retracted/deleted what is affected by the logic change, would this be faster? Bottom line it would be highly desirable for this to be minimally invasive. thanks image001.gif Bill Guinn | Sr. Vice President, and CTO SUMMUS Software, Inc. 3179 Skyway Court, Fremont, CA 94539 510.780.3895 office | 916.715.6433 mobile @summussoftware twitter william.gu...@summussoftware.com image002.png image003.jpg NOTICE TO RECIPIENT: THIS E-MAIL (INCLUDING ANY ATTACHMENTS) IS MEANT FOR ONLY THE INTENDED RECIPIENT OF THE TRANSMISSION, MAY CONTAIN CONFIDENTIAL INFORMATION, AND IS PROTECTED BY LAW. IF YOU RECEIVED THIS E-MAIL IN ERROR, PLEASE IMMEDIATELY NOTIFY THE SENDER OF THE ERROR BY RETURN E-MAIL, DELETE THIS COMMUNICATION AND SHRED ANY ATTACHMENTS. UNAUTHORIZED REVIEW, USE, DISSEMINATION, DISTRIBUTION, COPYING OR TAKING OF ANY ACTION BASED ON THIS COMMUNICATION IS STRICTLY PROHIBITED. ___ 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] Hot deployment in Drools
1) Please read about KnowledgeAgent, but you'd still need to upload the revised worksheet to Guvnor. 2) Please read about AgendaEventListener's re: which rules fired. Guvnor maintains audit history for who changed rules, but I'm not sure whether there's a (public) API to retrieve this other than through Guvnor's UI. On 27 April 2011 11:20, Sumeet Karawal sumeet.kara...@tcs.com wrote: Hi, I have some queries about Drools - Guvnor : 1) Is hot deployment possible in Guvnor, how can we do that? How can we change rules on fly? eg we are using Decision Table for rules and if we change some data in that sheet, how will the changes get reflected in the rule engine? 2) Does the rule engine maintain a log file (in expert as well as in Guvnor). How to do an Audit check eg. for getting which rules were fired, which user changed the rules and at what time? Thanks Regards, Sumeet Karawal Mailto: sumeet.kara...@tcs.com =-=-= Notice: The information contained in this e-mail message and/or attachments to it may contain confidential or privileged information. If you are not the intended recipient, any dissemination, use, review, distribution, printing or copying of the information contained in this e-mail message and/or attachments to it are strictly prohibited. If you have received this communication in error, please notify us by reply e-mail or telephone and immediately and permanently delete the message and any attachments. Thank you ___ 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] Hot deployment in Drools
Thanks Michael. Also for other rule resources like .drl or .dsl and using Drools - Expert, can we change the rules on the fly. Regards, Sumeet Karawal Mailto: sumeet.kara...@tcs.com From: Michael Anstis michael.ans...@gmail.com To: Rules Users List rules-users@lists.jboss.org Date: 04/27/2011 04:09 PM Subject:Re: [rules-users] Hot deployment in Drools Sent by:rules-users-boun...@lists.jboss.org 1) Please read about KnowledgeAgent, but you'd still need to upload the revised worksheet to Guvnor. 2) Please read about AgendaEventListener's re: which rules fired. Guvnor maintains audit history for who changed rules, but I'm not sure whether there's a (public) API to retrieve this other than through Guvnor's UI. On 27 April 2011 11:20, Sumeet Karawal sumeet.kara...@tcs.com wrote: Hi, I have some queries about Drools - Guvnor : 1) Is hot deployment possible in Guvnor, how can we do that? How can we change rules on fly? eg we are using Decision Table for rules and if we change some data in that sheet, how will the changes get reflected in the rule engine? 2) Does the rule engine maintain a log file (in expert as well as in Guvnor). How to do an Audit check eg. for getting which rules were fired, which user changed the rules and at what time? Thanks Regards, Sumeet Karawal Mailto: sumeet.kara...@tcs.com =-=-= Notice: The information contained in this e-mail message and/or attachments to it may contain confidential or privileged information. If you are not the intended recipient, any dissemination, use, review, distribution, printing or copying of the information contained in this e-mail message and/or attachments to it are strictly prohibited. If you have received this communication in error, please notify us by reply e-mail or telephone and immediately and permanently delete the message and any attachments. Thank you ___ 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 =-=-= Notice: The information contained in this e-mail message and/or attachments to it may contain confidential or privileged information. If you are not the intended recipient, any dissemination, use, review, distribution, printing or copying of the information contained in this e-mail message and/or attachments to it are strictly prohibited. If you have received this communication in error, please notify us by reply e-mail or telephone and immediately and permanently delete the message and any attachments. Thank you ___ rules-users mailing list rules-users@lists.jboss.org https://lists.jboss.org/mailman/listinfo/rules-users
Re: [rules-users] Hot deployment in Drools
If you use KnowledgeAgent and poll the location of your rule assets (DRL, DSLR, decision tables etc) then yes, I believe so. On 27 April 2011 11:58, Sumeet Karawal sumeet.kara...@tcs.com wrote: Thanks Michael. Also for other rule resources like .drl or .dsl and using Drools - Expert, can we change the rules on the fly. Regards, Sumeet Karawal Mailto: sumeet.kara...@tcs.com From: Michael Anstis michael.ans...@gmail.com To: Rules Users List rules-users@lists.jboss.org Date: 04/27/2011 04:09 PM Subject:Re: [rules-users] Hot deployment in Drools Sent by:rules-users-boun...@lists.jboss.org 1) Please read about KnowledgeAgent, but you'd still need to upload the revised worksheet to Guvnor. 2) Please read about AgendaEventListener's re: which rules fired. Guvnor maintains audit history for who changed rules, but I'm not sure whether there's a (public) API to retrieve this other than through Guvnor's UI. On 27 April 2011 11:20, Sumeet Karawal sumeet.kara...@tcs.com wrote: Hi, I have some queries about Drools - Guvnor : 1) Is hot deployment possible in Guvnor, how can we do that? How can we change rules on fly? eg we are using Decision Table for rules and if we change some data in that sheet, how will the changes get reflected in the rule engine? 2) Does the rule engine maintain a log file (in expert as well as in Guvnor). How to do an Audit check eg. for getting which rules were fired, which user changed the rules and at what time? Thanks Regards, Sumeet Karawal Mailto: sumeet.kara...@tcs.com =-=-= Notice: The information contained in this e-mail message and/or attachments to it may contain confidential or privileged information. If you are not the intended recipient, any dissemination, use, review, distribution, printing or copying of the information contained in this e-mail message and/or attachments to it are strictly prohibited. If you have received this communication in error, please notify us by reply e-mail or telephone and immediately and permanently delete the message and any attachments. Thank you ___ 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 =-=-= Notice: The information contained in this e-mail message and/or attachments to it may contain confidential or privileged information. If you are not the intended recipient, any dissemination, use, review, distribution, printing or copying of the information contained in this e-mail message and/or attachments to it are strictly prohibited. If you have received this communication in error, please notify us by reply e-mail or telephone and immediately and permanently delete the message and any attachments. Thank you ___ 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] Hot Deployment
Ok. I put that in but I'm having trouble getting it to recognize the uri I'm passing in. I'm passing in file:///c:/svn/code/sleuth/src/net/intellidata/sleuth/description/rules/ and I'm getting the following exception: RuleAgent(default) INFO (Mon Apr 07 13:14:40 MDT 2008): Configuring with newInstance=true, secondsToRefresh=300 RuleAgent(default) INFO (Mon Apr 07 13:14:40 MDT 2008): Configuring package provider : URLScanner monitoring URLs: file:/c:/svn/code/sleuth/src/net/intellidata/sleuth/description/rules/ with local cache dir of . java.lang.ClassCastException: sun.net.www.protocol.file.FileURLConnection at org.drools.agent.HttpClientImpl.checkLastUpdated(HttpClientImpl.java:26) at org.drools.agent.URLScanner.hasChanged(URLScanner.java:141) at org.drools.agent.URLScanner.getChangeSet(URLScanner.java:108) at org.drools.agent.URLScanner.loadPackageChanges(URLScanner.java:88) at org.drools.agent.RuleAgent.checkForChanges(RuleAgent.java:330) at org.drools.agent.RuleAgent.refreshRuleBase(RuleAgent.java:298) at org.drools.agent.RuleAgent.configure(RuleAgent.java:284) at org.drools.agent.RuleAgent.init(RuleAgent.java:208) at org.drools.agent.RuleAgent.newRuleAgent(RuleAgent.java:176) at org.drools.agent.RuleAgent.newRuleAgent(RuleAgent.java:148) at net.intellidata.sleuth.description.rules.DescriptionRuleLoader.loadRules(Des criptionRuleLoader.java:48) at net.intellidata.sleuth.description.rules.DescriptionRuleLoaderTest.testDescr iptionRuleLoader(DescriptionRuleLoaderTest.java:32) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source) at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source) at java.lang.reflect.Method.invoke(Unknown Source) at junit.framework.TestCase.runTest(TestCase.java:154) at junit.framework.TestCase.runBare(TestCase.java:127) at junit.framework.TestResult$1.protect(TestResult.java:106) at junit.framework.TestResult.runProtected(TestResult.java:124) at junit.framework.TestResult.run(TestResult.java:109) at junit.framework.TestCase.run(TestCase.java:118) at org.eclipse.jdt.internal.junit.runner.junit3.JUnit3TestReference.run(JUnit3T estReference.java:130) at org.eclipse.jdt.internal.junit.runner.TestExecution.run(TestExecution.java:3 8) at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRu nner.java:460) at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRu nner.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) The goal here is to monitor the directory above for any changes to the files or additional files that show up. Any help would be appreciated. ___ Brian Trezise Staff Software Engineer IntelliData, Inc 3173 s. uravan way aurora, colorado 80013 T: 720.524.4864 [EMAIL PROTECTED] From: Paul Browne [mailto:[EMAIL PROTECTED] Sent: Friday, April 04, 2008 3:56 PM To: [EMAIL PROTECTED]; Rules Users List Subject: Re: [rules-users] Hot Deployment Brian, I'm guessing that you mean the RuleAgent Class. The Javadoc on this class gives more info. Code sample (assuming that you have the BRMS setup as per the doc). You'll need to change to whatever settings are appropriate for your BRMS. Properties prop = new Properties(); prop.setProperty(url,uri); prop.setProperty(newInstance, true); prop.setProperty(localCacheDir, .); prop.setProperty(poll, 300); // poll every 300 seconds for hot deployment. //Get a new RuleBase using these properties RuleAgent agent = RuleAgent.newRuleAgent(prop); RuleBase rb = agent.getRuleBase(); Then use the RuleBase as normal Paul Brian Trezise wrote: In the What's New? Section of the Drools 4.0 documentation there is a reference in 1.1.2 to a Rules Engine Agent for hot deployment and BRMS integration. This would be ideal for the application I am currently developing. However, this is the only mention of this agent anywhere in the documentation. Does anybody know anything about this, how to use it, any documentation about it? Thanks, ___ Brian Trezise Staff Software Engineer IntelliData, Inc 3173 s. uravan way aurora, colorado 80013 T: 720.524.4864 [EMAIL PROTECTED] _ ___ rules-users mailing list rules-users@lists.jboss.org https
RE: [rules-users] Hot Deployment
Hi Brian, The goal here is to monitor the directory above for any changes to the files or additional files that show up. Any help would be appreciated. If you want to monitor a local dir try using the dir property instead of url. In your case you would then have something like: Properties prop = new Properties(); prop.setProperty(dir, c:/svn/code/sleuth/src/net/intellidata/sleuth/description/rules/); prop.setProperty(poll, 300); // poll every 300 seconds for hot deployment. I'm not sure if you would need these properties. prop.setProperty(newInstance, true); prop.setProperty(localCacheDir, .); Have a look at Section 7.1.1. Deployment using the RuleAgent of the online manual at http://downloads.jboss.com/drools/docs/4.0.6.19326.GA/html/index.html Regards, Nico From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Brian Trezise Sent: 07 April 2008 10:19 PM To: [EMAIL PROTECTED]; 'Rules Users List' Subject: RE: [rules-users] Hot Deployment Ok... I put that in but I'm having trouble getting it to recognize the uri I'm passing in... I'm passing in file:///c:/svn/code/sleuth/src/net/intellidata/sleuth/description/rules / and I'm getting the following exception: RuleAgent(default) INFO (Mon Apr 07 13:14:40 MDT 2008): Configuring with newInstance=true, secondsToRefresh=300 RuleAgent(default) INFO (Mon Apr 07 13:14:40 MDT 2008): Configuring package provider : URLScanner monitoring URLs: file:/c:/svn/code/sleuth/src/net/intellidata/sleuth/description/rules/ with local cache dir of . java.lang.ClassCastException: sun.net.www.protocol.file.FileURLConnection at org.drools.agent.HttpClientImpl.checkLastUpdated(HttpClientImpl.java:26) at org.drools.agent.URLScanner.hasChanged(URLScanner.java:141) at org.drools.agent.URLScanner.getChangeSet(URLScanner.java:108) at org.drools.agent.URLScanner.loadPackageChanges(URLScanner.java:88) at org.drools.agent.RuleAgent.checkForChanges(RuleAgent.java:330) at org.drools.agent.RuleAgent.refreshRuleBase(RuleAgent.java:298) at org.drools.agent.RuleAgent.configure(RuleAgent.java:284) at org.drools.agent.RuleAgent.init(RuleAgent.java:208) at org.drools.agent.RuleAgent.newRuleAgent(RuleAgent.java:176) at org.drools.agent.RuleAgent.newRuleAgent(RuleAgent.java:148) at net.intellidata.sleuth.description.rules.DescriptionRuleLoader.loadRules (DescriptionRuleLoader.java:48) at net.intellidata.sleuth.description.rules.DescriptionRuleLoaderTest.testD escriptionRuleLoader(DescriptionRuleLoaderTest.java:32) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source) at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source) at java.lang.reflect.Method.invoke(Unknown Source) at junit.framework.TestCase.runTest(TestCase.java:154) at junit.framework.TestCase.runBare(TestCase.java:127) at junit.framework.TestResult$1.protect(TestResult.java:106) at junit.framework.TestResult.runProtected(TestResult.java:124) at junit.framework.TestResult.run(TestResult.java:109) at junit.framework.TestCase.run(TestCase.java:118) at org.eclipse.jdt.internal.junit.runner.junit3.JUnit3TestReference.run(JUn it3TestReference.java:130) at org.eclipse.jdt.internal.junit.runner.TestExecution.run(TestExecution.ja va:38) at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTe stRunner.java:460) at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTe stRunner.java:673) at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.run(RemoteTestRun ner.java:386) at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.main(RemoteTestRu nner.java:196) The goal here is to monitor the directory above for any changes to the files or additional files that show up. Any help would be appreciated. ___ Brian Trezise Staff Software Engineer IntelliData, Inc 3173 s. uravan way aurora, colorado 80013 T: 720.524.4864 [EMAIL PROTECTED] From: Paul Browne [mailto:[EMAIL PROTECTED] Sent: Friday, April 04, 2008 3:56 PM To: [EMAIL PROTECTED]; Rules Users List Subject: Re: [rules-users] Hot Deployment Brian, I'm guessing that you mean the RuleAgent Class. The Javadoc on this class gives more info. Code sample (assuming that you have the BRMS setup as per the doc). You'll need to change to whatever settings are appropriate for your BRMS. Properties prop = new Properties(); prop.setProperty(url,uri); prop.setProperty(newInstance, true); prop.setProperty
Re: [rules-users] Hot Deployment
Brian, I'm guessing that you mean the RuleAgent Class. The Javadoc on this class gives more info. Code sample (assuming that you have the BRMS setup as per the doc). You'll need to change to whatever settings are appropriate for your BRMS. Properties prop = new Properties(); prop.setProperty(url,uri); prop.setProperty(newInstance, true); prop.setProperty(localCacheDir, .); prop.setProperty(poll, 300); // poll every 300 seconds for hot deployment. //Get a new RuleBase using these properties RuleAgent agent = RuleAgent.newRuleAgent(prop); RuleBase rb = agent.getRuleBase(); Then use the RuleBase as normal Paul Brian Trezise wrote: In the What's New? Section of the Drools 4.0 documentation there is a reference in 1.1.2 to a Rules Engine Agent for hot deployment and BRMS integration. This would be ideal for the application I am currently developing. However, this is the only mention of this agent anywhere in the documentation. Does anybody know anything about this, how to use it, any documentation about it? Thanks, *___ Brian Trezise Staff Software Engineer IntelliData, Inc *3173 s. uravan way aurora, colorado 80013 T: 720.524.4864 [EMAIL PROTECTED] ___ 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