Re: [rules-users] Encrypt password in repository.xml
Boban, Instead of using an explicit JDBC connection string, you can instead find your MySQL connection via a JNDI lookup, externalizing your database connection information to your application server. You'll have to Google the exact details, but I believe you set the driver class to javax.naming.InitialContext and then the driver url to the JNDI name of your datasource. Kind regards, David On 4/20/11 6:39 AM, Boban Abraham boban_abra...@mindtree.com wrote: We use mysql to store the data, hence mysql db credentials are mentioned in repository.xml The DB user password in repository.xml is not encrypted currently. What are the options available to place encrypted password in repository.xml? -- View this message in context: http://drools.46999.n3.nabble.com/Encrypt-password-in-repository-xml-tp284 1654p2841654.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] compilation error - Import statements are colliding
I believe that you can only import one class with the same name, regardless of package. To access the other class within your code, you will need to refer to it every time with the fully qualified class name. This conforms to the behavior of Java source files. On 4/20/11 11:38 AM, Boban Abraham boban_abra...@mindtree.com wrote: Hi, We have scenario in which the imported java classes have same name but different package. The drools guvnor is throwing compilation error stating that import statements are colliding, even though the java class packages are different. Please let me know if there are any solutions for this issue. Thanks, Boban -- View this message in context: http://drools.46999.n3.nabble.com/compilation-error-Import-statements-are- colliding-tp2842283p2842283.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-Guvnor question about build and deploy packages
Patricia, My understanding (which is certainly open to being corrected) is that in general there is no way to do an incremental compilation of rules. The entire package is analyzed together and significant optimizations are performed to combine common items between rules (which is one of the big reasons why the engine executes so well!). So, generally, what you are doing is the best practice. When you say that you are experiencing a performance hit, are you talking about a delay in seeing the updates appear in your production application, or something else? Generally, the compilation is a one-time step, and even during compilation your enterprise application that is actually using the rules should continue to perform quite reasonably, since the compilation is going on in a separate application. David From: Patricia Bogoevici patriciabogoev...@yahoo.commailto:patriciabogoev...@yahoo.com Reply-To: Rules Users List rules-users@lists.jboss.orgmailto:rules-users@lists.jboss.org Date: Tue, 19 Apr 2011 10:45:59 -0500 To: Rules Users List rules-users@lists.jboss.orgmailto:rules-users@lists.jboss.org Subject: [rules-users] Drools-Guvnor – question about build and deploy packages I am using Drools-Guvnor 5.1 release in an enterprise application. The rules created are separated per packages, and for each package there is a snapshot package called LATEST. The KnowledgeAgent polls the snapshot packages to get the latest data and load into the rule engine. Whenever there is a new rule, or updates to an existing one, the application triggers the process of re-creating the package snapshot: builds all the rules within the package, and creates a new snapshot for the package. The main problem with this approach is that the time to build the package rules, increases quite a lot as the number if rules gets higher. This creates a serious performance hit in the real-time app whenever there is a change to the rules. I sneaked a bit to the source code, and noticed that when build package is called, Guvnor builds a new binary for all the rules within a package even though not all of them are modified. Would it be possible to incrementally create/update the package binary? This would speed up things a lot when the package has lots of rules but only one rule changes at the time. What is the best approach for creating the package snapshots? The approach we've taken is to build all the rules within a package into one snapshot, and we ran into this performance issue. Any ideas/suggestions is much appreciated. Thanks, Patricia ___ rules-users mailing list rules-users@lists.jboss.org https://lists.jboss.org/mailman/listinfo/rules-users
Re: [rules-users] Drools Guvnor - Websphere 7
I agree with Tihomir. Make sure that the web application is deployed with a PARENT_LAST classloader configuration. Also, you probably need to update the components.xml file to specify the location of the repository to a separate FS location that you know the application server user has access to. May or may not be necessary, but generally a good practice. Guvnor DOES run on WebSphere 7. David Faulkner david.faulk...@amentra.com From: rules-users-boun...@lists.jboss.org [rules-users-boun...@lists.jboss.org] On Behalf Of Tihomir Surdilovic [tsurd...@redhat.com] Sent: Tuesday, April 05, 2011 11:22 AM To: rules-users@lists.jboss.org Subject: Re: [rules-users] Drools Guvnor - Websphere 7 Seems you have an older jcr jar on your classpath that gets loaded before Guvnor's jcr-2.0.jar in WEB-INF/lib. On 4/5/11 11:07 AM, smileychappy wrote: I'm trying to install and run Guvnor on Websphere 7. When I try starting the app, I get the following exception [4/5/11 11:02:26:793 EDT] 0085 webappE com.ibm.ws.webcontainer.webapp.WebApp notifyServletContextCreated SRVE0283E: Exception caught while initializing context: {0} org.jboss.seam.InstantiationException: Could not instantiate Seam component: repositoryConfiguration at org.jboss.seam.Component.newInstance(Component.java:2066) at org.jboss.seam.contexts.Contexts.startup(Contexts.java:304) at org.jboss.seam.contexts.Contexts.startup(Contexts.java:278) at org.jboss.seam.contexts.ServletLifecycle.endInitialization(ServletLifecycle.java:112) at org.jboss.seam.init.Initialization.init(Initialization.java:727) at org.jboss.seam.servlet.SeamListener.contextInitialized(SeamListener.java:34) at com.ibm.ws.webcontainer.webapp.WebApp.notifyServletContextCreated(WebApp.java:1681) at com.ibm.ws.webcontainer.webapp.WebApp.commonInitializationFinish(WebApp.java:374) at com.ibm.ws.webcontainer.webapp.WebAppImpl.initialize(WebAppImpl.java:299) at com.ibm.ws.webcontainer.webapp.WebGroupImpl.addWebApplication(WebGroupImpl.java:100) at com.ibm.ws.webcontainer.VirtualHostImpl.addWebApplication(VirtualHostImpl.java:166) at com.ibm.ws.webcontainer.WSWebContainer.addWebApp(WSWebContainer.java:731) at com.ibm.ws.webcontainer.WSWebContainer.addWebApplication(WSWebContainer.java:616) at com.ibm.ws.webcontainer.component.WebContainerImpl.install(WebContainerImpl.java:376) at com.ibm.ws.webcontainer.component.WebContainerImpl.start(WebContainerImpl.java:668) at com.ibm.ws.runtime.component.ApplicationMgrImpl.start(ApplicationMgrImpl.java:1122) at com.ibm.ws.runtime.component.DeployedApplicationImpl.fireDeployedObjectStart(DeployedApplicationImpl.java:1315) at com.ibm.ws.runtime.component.DeployedModuleImpl.start(DeployedModuleImpl.java:623) at com.ibm.ws.runtime.component.DeployedApplicationImpl.start(DeployedApplicationImpl.java:940) at com.ibm.ws.runtime.component.ApplicationMgrImpl.startApplication(ApplicationMgrImpl.java:725) at com.ibm.ws.runtime.component.ApplicationMgrImpl$1.run(ApplicationMgrImpl.java:1266) at com.ibm.ws.security.auth.ContextManagerImpl.runAs(ContextManagerImpl.java:4599) at com.ibm.ws.security.auth.ContextManagerImpl.runAsSystem(ContextManagerImpl.java:4687) at com.ibm.ws.security.core.SecurityContext.runAsSystem(SecurityContext.java:255) at com.ibm.ws.runtime.component.ApplicationMgrImpl.startApplicationDynamically(ApplicationMgrImpl.java:1271) at com.ibm.ws.runtime.component.ApplicationMgrImpl.start(ApplicationMgrImpl.java:2043) at com.ibm.ws.runtime.component.CompositionUnitMgrImpl.start(CompositionUnitMgrImpl.java:439) at com.ibm.ws.runtime.component.CompositionUnitImpl.start(CompositionUnitImpl.java:123) at com.ibm.ws.runtime.component.CompositionUnitMgrImpl.start(CompositionUnitMgrImpl.java:382) at com.ibm.ws.runtime.component.CompositionUnitMgrImpl.startCompositionUnit(CompositionUnitMgrImpl.java:653) at com.ibm.ws.runtime.component.CompositionUnitMgrImpl.startCompositionUnit(CompositionUnitMgrImpl.java:615) at com.ibm.ws.runtime.component.ApplicationMgrImpl.startApplication(ApplicationMgrImpl.java:1177) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:48) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:37) at java.lang.reflect.Method.invoke(Method.java:600) at sun.reflect.misc.Trampoline.invoke(MethodUtil.java:37) at sun.reflect.GeneratedMethodAccessor21.invoke(Unknown Source) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:37) at java.lang.reflect.Method.invoke(Method.java:600
Re: [rules-users] Using Drools to model and solve a production scheduling problem with changeovers
Andrei, You should take a look at Drools Planner, which is designed to provide a framework for solving NP-hard problems using local search. I don't know how user-friendly you would consider it to be and there's no GUI, but it sounds like it may be a good fit for you. David Faulkner david.faulk...@amentra.commailto:david.faulk...@amentra.com From: rules-users-boun...@lists.jboss.org [rules-users-boun...@lists.jboss.org] On Behalf Of Andrei Neboian [andrei.nebo...@googlemail.com] Sent: Monday, March 28, 2011 5:03 PM To: rules-users@lists.jboss.org Subject: [rules-users] Using Drools to model and solve a production scheduling problem with changeovers Dear All, I am looking for a user-friendly platform which would allow me to model and solve a production scheduling problem with changeover times. Since it's an NP-Hard problem, I am getting convinced that a CP formulation would be most appropriate. Later on, a GUI should be designed to allow a user to interact with the model. Is drools a proper platform for this? Are there any examples of this type of problem solved with Drools? I need to tackle a problem with 4 parallel machines, over 100 jobs and 100 changeovertypes (sequence dependant setup times between each job). I would appreciate any help on this! Thanks Kind Regards, Andrei ___ rules-users mailing list rules-users@lists.jboss.org https://lists.jboss.org/mailman/listinfo/rules-users
Re: [rules-users] Misunderstanding salience?
Peter, The EXACT way to accomplish the functionality that you are looking for is activation-group; if two rules are in the same activation group, only one of them will fire. Note that the rule with HIGHER salience will fire first; to accomplish what you are looking for you'd have to give the exception rule a higher salience. I would also note that although there are specific instances where activation-group has a strong need, many in the community find that the most power and flexibility from the rule engine comes from letting go of trying to exactly order your rule execution, and instead letting the rule engine decide what would happen here. One way to accomplish this in your case would be to simply add (isZombie == false) to your constraint on the general rule. Another way that involves salience but NOT agenda groups is to set a high salience on your exception rule, but only add advice if advice is null. The possibilities are endless. With kind regards, David Faulkner david.faulk...@amentra.com From: rules-users-boun...@lists.jboss.org [mailto:rules-users-boun...@lists.jboss.org] On Behalf Of Peter Ashford Sent: Wednesday, March 09, 2011 7:24 AM To: Rules Users List Subject: Re: [rules-users] Misunderstanding salience? Actually, I think I've figured this one out : in the Zombie case, it's firing both rules and it's just that with the negative salience, the zombie exception rule is the last rule fired, therefore, the last thing written into advice. So... what would be the correct way to do what I'm trying to do here? The idea is that the Zombie exception rule should fire in preference to the general rule and that none of the general processing should occur at all (imaging that these rules had side-effects for the rest of the system they're attached to, we don't want all the general rule side effects to apply and then all the exception case side effects) Thanks in advance! Peter. From: rules-users-boun...@lists.jboss.org [mailto:rules-users-boun...@lists.jboss.org] On Behalf Of Peter Ashford Sent: Wednesday, 9 March 2011 1:31 p.m. To: rules-users@lists.jboss.org Subject: [rules-users] Misunderstanding salience? Hi There I'm new to drools. I've just set up the Drools-Server and it is (finally!) working and serving my test rule-set. The one thing that's not working as I expect it is the rule ordering via salience. This is my simple test rule set: rule General brain eating advice when p : Patient(eatsBrains == true) then p.setAdvice(Stop eating brains, or at least, try to cut down); end rule Zombie exception to brain eating advice salience -50 when p : Patient(eatsBrains == true, isZombie == true) then p.setAdvice(Evidence suggests that the undead cannot contract Kuru or that the effects are irellevant given the + patient's current zombified state.\nSuggest euthenasing patient lest he/she eat your (or someone + else's) brains); end The idea is that the first rule fires all the time unless the patient happens to be a zombie, in which case the exception rule (the second rule) kicks in. Now, as I have it here, with the exception at salience at -50 it actually works, which is the opposite of what I was expecting. I'd thought that I would have had to have the exception at a higher salience to fire first. That was what I tried first but that didn't work - everyone got the general advice, zombies included. What am I misunderstanding here? Thanks! Peter. --- It is very difficult to get a man to understand something when his tribal identity depends on his not understanding it - Michael Bérubé on Republican climate change denial. ___ rules-users mailing list rules-users@lists.jboss.org https://lists.jboss.org/mailman/listinfo/rules-users
Re: [rules-users] Two instances of drools-guvnor can point to same database?
Sartaj, You can have two nodes of Guvnor in a clustered configuration. Note that there are significant changes to your repository configuration that need to be made to fully support a clustered deployment. Please refer to http://wiki.apache.org/jackrabbit/Clustering for more information. Good luck! David Faulkner david.faulk...@amentra.com From: rules-users-boun...@lists.jboss.org [mailto:rules-users-boun...@lists.jboss.org] On Behalf Of Sartaj Shaik Sent: Friday, March 04, 2011 3:13 PM To: rules-users@lists.jboss.org Subject: [rules-users] Two instances of drools-guvnor can point to same database? Hi, Can we deploy guvnor in two instances of jboss server pointing to same oracle database? Do we need to modify any settings to use same database by all the instances? =-=-= 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] Migrating from one environment to another
Chris, Using WebDAV is probably the best way of doing this. When you copy a rule into the appropriate location from one WebDAV directory to another, Guvnor will pick up that rule and install it in the specified location in the repository. One thing that's very important to note is that only a subset of the information available in Guvnor is available through WebDAV (or the REST API)! At this point, my understanding is that it's practically impossible to get some of the rule metadata out of Guvnor; the work on the AtomPub interface may address a lot of these concerns. But if your plan is to do something like migrate documentation or test cases and not just rules, make sure you test the feasibility first! My understanding from reading previous posts and discussions related to this is that the details of this type of Guvnor-Guvnor migration are hard. Do you import the whole history? What if the users from one instance aren't in the other? What do you do if categories and statuses aren't available? I agree that despite these issues that this is still an obviously useful feature. David Faulkner david.faulk...@amentra.commailto:david.faulk...@amentra.com From: rules-users-boun...@lists.jboss.org [rules-users-boun...@lists.jboss.org] On Behalf Of Steve Ronderos [steve.ronde...@ni.com] Sent: Wednesday, February 16, 2011 6:26 PM To: Rules Users List Subject: Re: [rules-users] Migrating from one environment to another Hi Chris, You may be able to accomplish migrating a single package via the WebDAV interface and a script in your favorite language. Here are some relevant results from a quick google search: http://downloads.jboss.com/drools/docs/5.1.1.34858.FINAL/drools-guvnor/html/ch01.html#d0e1301 http://blog.athico.com/2008/05/accessing-guvnor-as-filesystem-webdav.html http://thoughts.inphina.com/2011/02/14/adding-rules-to-drools-guvnor-programmatically-with-webdav/ Hope this is helpful, Steve rules-users-boun...@lists.jboss.org wrote on 02/16/2011 05:12:45 PM: From: Chris Selwyn ch...@selwyn-family.me.uk To: rules-users@lists.jboss.org Date: 02/16/2011 05:14 PM Subject: Re: [rules-users] Migrating from one environment to another Sent by: rules-users-boun...@lists.jboss.org Thanks for the confirmation Michael. I must say that I am surprised. It seems such an obviously useful thing. Is there a reason why it does not exit? Is there a problem in building such a thing? Chris On 16/02/2011 22:33, Michael Anstis wrote: @Chris, I don't believe there is such a mechanism. @Sathya, Hijacking a previous post is unlikely to get you a reply. Thanks, Mike On 16 February 2011 22:04, Chris Selwyn ch...@selwyn-family.me.uk wrote: I am aware of the Guvnor export/import mechanism to move an entire repository and the method of importing a DRL to create a package. But what I have been looking for is a mechanism to move the entire contents of a Guvnor package (DSL, model, DSLR file, DRL files etc) from one Guvnor instance to another, so far without luck. Is there such a mechanism? Chris Selwyn ___ 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 No virus found in this message. Checked by AVG - www.avg.comUrlBlockedError.aspx Version: 10.0.1204 / Virus Database: 1435/3447 - Release Date: 02/16/11 ___ 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