Re: [rules-users] Spring 4.0 Drools 6.0.1 Integration issue
I debugged the issue. Hi The problem is that it fails when you have the sessions and modules defined in a jar. The path to the pom.properties in the jar file is: META-INF\maven\com.verisk.sws.csp\cepCSP Also I have the issue with webpshere. This treats jars as wsjar There is no condition in the kie-spring integration code to handle wsjar. So it thinks it is a file system and subsequetly fails. Thanks, Alan -- View this message in context: http://drools.46999.n3.nabble.com/Spring-4-0-Drools-6-0-1-Integration-issue-tp4028052p4028928.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] DSL sentence with multiple variables is defect
The issue is solved with build kie-wb 2014-03-22 from https://hudson.jboss.org/hudson/view/JBoss%20AS/job/kie-wb-distributions/1248/. The previous build kie-wb 2014-03-15 had the error. Thank you very much for fixing, direct or indirect :-). Kai. 2014-03-14 16:51 GMT+01:00 Kai Jemella kjeme...@gmail.com: My example was bad, because the dsl starts with the same sentence as the first one in the mortgages project. Can you please try to set the credit rating variable to OK in the Guided Editor, then save, close and reopen the rule. Now you should see that OK was replaced by AA. This happens because the value is not in the enum and the editor uses the first enum value. When you change the typ of rating to String, you should see this value in the rating input field: OK and applicant dates is after 14-Mär-2014 Im using this kie-wb build https://hudson.jboss.org/hudson/job/kie-wb-distributions/1243/ Isn't this the 6.1.0.Beta1 Version ? Thanks for helping, Kai. 2014-03-13 17:36 GMT+01:00 Michael Anstis michael.ans...@gmail.com: I tried with the latest code (6.1.0.Beta1) and it works OK. [when]When the credit rating is {rating:ENUM:Applicant.creditRating} and applicant dates is after {dos:DATE:default} = applicant:Applicant(creditRating=={rating}, applicationDate{dos}) 1.|package org.mortgages; 2.| 3.|import java.lang.Number; 4.| 5.|rule 6.|dialect mvel 7.|when 8.|applicant:Applicant(creditRating==AA, applicationDate 13-Mar-2014) 9.|then 10.|end On 13 March 2014 15:49, Kai Jemella kjeme...@gmail.com wrote: Hi, i recognized that DSL with multiple variables not working in current 6.1.0-SNAPSHOT master. First i created a jira issue in the drools project: https://issues.jboss.org/browse/DROOLS-428 I thought it was ui issue. I had closed the ticket and recreated it in guvnor project. https://issues.jboss.org/browse/GUVNOR-2081 Now i figured out, that also without edit and save the GuidedRule in kie workbench, the issue exists. Should i now reopen the drools ticket? Should i create a unit test for the issue? Thanks, Kai Jemella. ___ 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] Embedded sub-process in drools rule flow
Hi all, Can anyone please tell me whether it is possible to design nested blocks in rule flow. I know that using sub-process, we can embed different rule tasks, but my rule flow file is getting bulkier by the day and I wanted to know if i can have a few rules in a sub-process, but the rule tasks executed by the sub-process should not be visible in the uppermost layer. DOuble clicking on that should take me inside the sub-process and show the rules executed by it. Also if it is not possible to have such an operation with the build in blocks in drools rule flow, can anyone tell me how i can have a custom made block which has that functionality. I have designed custom blocks having simple properties, but i have no idea how this should be done. Hope to get an answer here. Regards sanjay ___ rules-users mailing list rules-users@lists.jboss.org https://lists.jboss.org/mailman/listinfo/rules-users
Re: [rules-users] KnowledgeAgentImpl memory leak (5.5.0.Final)
First of all thank you very much for your helpWe have downloaded drools-5.5.x source code and tried your patch and we have noticed:- When our resources (guvnor) are not accessible KnowledgeAgent does not rebuild kbase- When our resources (guvnor) are accessible and we made some change then KnowledgeAgent rebuild kbase after every loop because guvnor responses LastModified (((HttpURLConnection) conn).getLastModified) as GMT datetime but it is not (it depends of the timezone)We have done more changes in drools-core.5.5.0.FINAL in the class UrlResource.java version to fix this private long grabLastMod() throws IOException {// use File if possible, as http rounds milliseconds on some machines, this fine level of granularity is only really an issue for testing// http://bugs.sun.com/bugdatabase/view_bug.do?bug_id=4504473if (file.equals(url.getProtocol())) {File file = getFile(); return file.lastModified();}URLConnection conn = openURLConnection(getURL());if (conn instanceof HttpURLConnection) { ((HttpURLConnection) conn).setRequestMethod(HEAD);}...* long date = 0;try {date = Long.parseLong(conn.getHeaderField(lastModified));} catch (Exception e) { /* well, we tried ... */}if (date == 0) { date = conn.getLastModified();}*...return date;}On the other hand if cache file is updated KnowledgeAgent keeps rebuilding kbase, so to fix this we update lastRead variablepublic InputStream getInputStream() throws IOException {try {long lastMod = grabLastMod();if (lastMod == 0) {//we will try the cache...if (cacheFileExists()) { *this.lastRead = getCacheFile().lastModified();*return fromCache();}}..Finally, all these changes do not solve the problem of memory leak with incremental kbase changes because resource changes generate a kbase rebuilding (guvnor up). This causes a kbase memory increase -- View this message in context: http://drools.46999.n3.nabble.com/KnowledgeAgentImpl-memory-leak-5-5-0-Final-tp4028798p4028932.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] KnowledgeAgentImpl memory leak (5.5.0.Final)
First of all thank you very much for your help We have downloaded drools-5.5.x source code and tried your patch and we have noticed: - When our resources (guvnor) are not accessible KnowledgeAgent does not rebuild kbase - When our resources (guvnor) are accessible and we made some change then KnowledgeAgent rebuild kbase after every loop because guvnor responses LastModified (((HttpURLConnection) conn).getLastModified) as GMT datetime but it is not (it depends of the timezone) We have done more changes in drools-core.5.5.0.FINAL in the class UrlResource.java version to fix this private long grabLastMod() throws IOException { // use File if possible, as http rounds milliseconds on some machines, this fine level of granularity is only really an issue for testing // http://bugs.sun.com/bugdatabase/view_bug.do?bug_id=4504473 if (file.equals(url.getProtocol())) { File file = getFile(); return file.lastModified(); } URLConnection conn = openURLConnection(getURL()); if (conn instanceof HttpURLConnection) { ((HttpURLConnection) conn).setRequestMethod(HEAD); } ... *long date = 0; try { date = Long.parseLong(conn.getHeaderField(lastModified)); } catch (Exception e) { /* well, we tried ... */ } if (date == 0) { date = conn.getLastModified(); } * ... return date; } On the other hand if cache file is updated KnowledgeAgent keeps rebuilding kbase, so to fix this we update lastRead variable public InputStream getInputStream() throws IOException { try { long lastMod = grabLastMod(); if (lastMod == 0) { //we will try the cache... if (cacheFileExists()) { *this.lastRead = getCacheFile().lastModified(); * return fromCache(); } } .. Finally, all these changes do not solve the problem of memory leak with incremental kbase changes because resource changes generate a kbase rebuilding (guvnor up). This causes a kbase memory increase -- View this message in context: http://drools.46999.n3.nabble.com/KnowledgeAgentImpl-memory-leak-5-5-0-Final-tp4028798p4028934.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] Getting started
Can someone please help out ? -- View this message in context: http://drools.46999.n3.nabble.com/Getting-started-tp4028926p4028935.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] Getting started
Hi, I'm sure what you're trying to do in your example, but there is a simple working example using drools 6 here: https://github.com/droolsjbpm/drools/tree/master/drools-examples-api/default-kiesession I took this as a starting point and adapted it to meet my requirements. -- View this message in context: http://drools.46999.n3.nabble.com/Getting-started-tp4028926p4028936.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] [MVEL BUG] MVEL Parsing error
Hi, I found a MVEL bug : When I want to compile a specific expression with MVEL, a NullPointerException is thrown. Test Case (Java Language) : String expression = 5 + 1/10 * (VAR - 5); MVEL.compileExpression(expression); When I launch this test, I get an error : java.lang.NullPointerException at org.mvel2.MVELInterpretedRuntime.parse(MVELInterpretedRuntime.java:47) at org.mvel2.MVEL.eval(MVEL.java:408) at org.mvel2.ast.Substatement.getReducedValue(Substatement.java:48) at org.mvel2.compiler.AbstractParser.arithmeticFunctionReduction(AbstractParser.java:2479) at org.mvel2.compiler.ExpressionCompiler.compileReduce(ExpressionCompiler.java:318) at org.mvel2.compiler.ExpressionCompiler._compile(ExpressionCompiler.java:172) at org.mvel2.compiler.ExpressionCompiler.compile(ExpressionCompiler.java:62) at org.mvel2.MVEL.compileExpression(MVEL.java:810) at org.mvel2.MVEL.compileExpression(MVEL.java:820) at org.mvel2.MVEL.compileExpression(MVEL.java:723) ... I get this error in rare case with this syntax but with different one, it works. Expressions which work : 5 + 1+10 * (VAR - 5) 5 + 1-10 * (VAR - 5) 5 + (1/10) * (VAR - 5) 5 + (VAR - 5) * 1/10 Expressions which not work : 5 + 1/10 * (VAR - 5) 5 + 1*10 * (VAR - 5) Thanks -- View this message in context: http://drools.46999.n3.nabble.com/MVEL-BUG-MVEL-Parsing-error-tp4028939.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] Simplified view for business users
I have to expose a guided decision table to some non technical users. Is there a different view that they can use to modify/add/delete rows in a guided decision table and do a hot deploy? Using Jboss AS7. Thanks, Vikas. -- View this message in context: http://drools.46999.n3.nabble.com/Simplified-view-for-business-users-tp4028940.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] Simplified view for business users
Use of Drools Workbench and KieScanner would provide a solution. On 24 March 2014 18:36, vvicky72 vvick...@hotmail.com wrote: I have to expose a guided decision table to some non technical users. Is there a different view that they can use to modify/add/delete rows in a guided decision table and do a hot deploy? Using Jboss AS7. Thanks, Vikas. -- View this message in context: http://drools.46999.n3.nabble.com/Simplified-view-for-business-users-tp4028940.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] Simplified view for business users
I am using both. And they work great. But so far I have been updating the guided decision table using the admin role. When I create a user in JBoss with user privileges, it wont allow me to even login to Drools workbench. I know guvnor had a different user management approach. But Drools workbench guide does not have enough info on this. Thanks,Vikas. Date: Mon, 24 Mar 2014 19:12:14 + From: michael.ans...@gmail.com To: rules-users@lists.jboss.org Subject: Re: [rules-users] Simplified view for business users Use of Drools Workbench and KieScanner would provide a solution. On 24 March 2014 18:36, vvicky72 vvick...@hotmail.com wrote: I have to expose a guided decision table to some non technical users. Is there a different view that they can use to modify/add/delete rows in a guided decision table and do a hot deploy? Using Jboss AS7. Thanks, Vikas. -- View this message in context: http://drools.46999.n3.nabble.com/Simplified-view-for-business-users-tp4028940.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] Spring 4.0 Drools 6.0.1 Integration issue
Hi Alan- I am not able to reproduce the issue anymore. It 'just' is working fine. No problems at all. We recently did install a lot of long due ubuntu updates though. Really sorry for this. .K Date: Mon, 24 Mar 2014 04:56:22 -0700 From: ml-node+s46999n4028928...@n3.nabble.com To: kmans...@hotmail.com Subject: Re: Spring 4.0 Drools 6.0.1 Integration issue I debugged the issue. Hi The problem is that it fails when you have the sessions and modules defined in a jar. The path to the pom.properties in the jar file is: META-INF\maven\com.verisk.sws.csp\cepCSP Also I have the issue with webpshere. This treats jars as wsjar There is no condition in the kie-spring integration code to handle wsjar. So it thinks it is a file system and subsequetly fails. Thanks, Alan If you reply to this email, your message will be added to the discussion below: http://drools.46999.n3.nabble.com/Spring-4-0-Drools-6-0-1-Integration-issue-tp4028052p4028928.html To unsubscribe from Spring 4.0 Drools 6.0.1 Integration issue, click here. NAML -- View this message in context: http://drools.46999.n3.nabble.com/Spring-4-0-Drools-6-0-1-Integration-issue-tp4028052p4028943.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] Spring 4.0 Drools 6.0.1 Integration issue
Hi Alan- I am not able to reproduce the issue anymore. It 'just' is working fine. No problems at all. We recently did install a lot of long due ubuntu updates though. Really sorry for this. .K Date: Fri, 21 Mar 2014 17:13:29 -0700 From: ml-node+s46999n4028919...@n3.nabble.com To: kmans...@hotmail.com Subject: Re: [rules-users] Spring 4.0 Drools 6.0.1 Integration issue It’s not a known issue, but that doesn’t mean it isn’t an issue. I guess open a JIRA, and maybe take a look into yourself, to see if you can figure out the fix. http://docs.jboss.org/drools/release/5.5.0.Final/droolsjbpm-introduction-docs/html/gettingstarted.html Mark On 21 Mar 2014, at 21:27, alanvarghese [hidden email] wrote: The above code works perfectly if it is a batch program. It doesn't work in a Spring MVC web project. Is that a known issue? ContextLoader E org.springframework.web.context.ContextLoader initWebApplicationContext Context initialization failed java.lang.NullPointerException at java.io.File.init(File.java:233) at org.drools.compiler.kie.builder.impl.ClasspathKieProject.getPomProperties(ClasspathKieProject.java:228) at org.kie.spring.KModuleBeanFactoryPostProcessor.postProcessBeanFactory(KModuleBeanFactoryPostProcessor.java:95) at org.springframework.context.support.AbstractApplicationContext.invokeBeanFactoryPostProcessors(AbstractApplicationContext.java:694) at org.springframework.context.support.AbstractApplicationContext.invokeBeanFactoryPostProcessors(AbstractApplicationContext.java:684) at org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:461) at org.springframework.web.context.ContextLoader.configureAndRefreshWebApplicationContext(ContextLoader.java:389) at org.springframework.web.context.ContextLoader.initWebApplicationContext(ContextLoader.java:294) at org.springframework.web.context.ContextLoaderListener.contextInitialized(ContextLoaderListener.java:112) at com.ibm.ws.webcontainer.webapp.WebApp.notifyServletContextCreated(WebApp.java:1680) at com.ibm.ws.webcontainer.webapp.WebAppImpl.initialize(WebAppImpl.java:410) at com.ibm.ws.webcontainer.webapp.WebGroupImpl.addWebApplication(WebGroupImpl.java:88) at com.ibm.ws.webcontainer.VirtualHostImpl.addWebApplication(VirtualHostImpl.java:169) at com.ibm.ws.webcontainer.WSWebContainer.addWebApp(WSWebContainer.java:746) at com.ibm.ws.webcontainer.WSWebContainer.addWebApplication(WSWebContainer.java:634) at com.ibm.ws.webcontainer.component.WebContainerImpl.install(WebContainerImpl.java:422) at com.ibm.ws.webcontainer.component.WebContainerImpl.start(WebContainerImpl.java:714) at com.ibm.ws.runtime.component.ApplicationMgrImpl.start(ApplicationMgrImpl.java:1160) at com.ibm.ws.runtime.component.DeployedApplicationImpl.fireDeployedObjectStart(DeployedApplicationImpl.java:1369) at com.ibm.ws.runtime.component.DeployedModuleImpl.start(DeployedModuleImpl.java:639) at com.ibm.ws.runtime.component.DeployedApplicationImpl.start(DeployedApplicationImpl.java:967) at com.ibm.ws.runtime.component.ApplicationMgrImpl.startApplication(ApplicationMgrImpl.java:766) at com.ibm.ws.runtime.component.ApplicationMgrImpl.startApplicationDynamically(ApplicationMgrImpl.java:1354) at com.ibm.ws.runtime.component.ApplicationMgrImpl.start(ApplicationMgrImpl.java:2150) at com.ibm.ws.runtime.component.CompositionUnitMgrImpl.start(CompositionUnitMgrImpl.java:445) at com.ibm.ws.runtime.component.CompositionUnitImpl.start(CompositionUnitImpl.java:123) at com.ibm.ws.runtime.component.CompositionUnitMgrImpl.start(CompositionUnitMgrImpl.java:388) at com.ibm.ws.runtime.component.CompositionUnitMgrImpl.access$500(CompositionUnitMgrImpl.java:116) at com.ibm.ws.runtime.component.CompositionUnitMgrImpl$1.run(CompositionUnitMgrImpl.java:663) at com.ibm.ws.security.auth.ContextManagerImpl.runAs(ContextManagerImpl.java:5363) at com.ibm.ws.security.auth.ContextManagerImpl.runAsSystem(ContextManagerImpl.java:5579) at com.ibm.ws.security.core.SecurityContext.runAsSystem(SecurityContext.java:255) at com.ibm.ws.runtime.component.CompositionUnitMgrImpl.startCompositionUnit(CompositionUnitMgrImpl.java:677) at com.ibm.ws.runtime.component.CompositionUnitMgrImpl.startCompositionUnit(CompositionUnitMgrImpl.java:621) at com.ibm.ws.runtime.component.ApplicationMgrImpl.startApplication(ApplicationMgrImpl.java:1246) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:60) at
[rules-users] User Security with guvnor 5.4 and Tomcat 6.0.36
Hi, I have searched extensively for any answers, but have obviously not been looking in the right places. Tomcat is my app server: it should define the users. This is no problem: since it is a small application we want to define our users in tomcat-users.xml, using the UserDatabaseRealm (in preference to MemoryRealm). JAAS or other options are overkill for us. Now, what should I do on the guvnor side? I understand I should be looking at the WEB-INF/beans.xml config file. I can't find much documentation on the contents of this file in general, and nothing specific that seems to help me. A lot of the advice out there seems JBoss AS specific or precedes the move in 5.4 to beans.xml. But, I understand that tomcat in this setting is not supplying a JAAS context, which seemed to be the most likely option. Do I need to implement a version of org.drools.guvnor.server.security.DemoAuthenticator? Is that our only option? Hasn't someone done this before? What would you do in this situation? Any assistance would be greatly appreciated. Thanks, Pete -- View this message in context: http://drools.46999.n3.nabble.com/User-Security-with-guvnor-5-4-and-Tomcat-6-0-36-tp4028945.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