From michael.anstis at gmail.com Thu May 1 04:10:01 2014 From: michael.anstis at gmail.com (Michael Anstis) Date: Thu, 1 May 2014 09:10:01 +0100 Subject: [rules-users] Rule Orchestration In-Reply-To: <1398702244953-4029375.post@n3.nabble.com> References: <1398695733473-4029371.post@n3.nabble.com> <1398702244953-4029375.post@n3.nabble.com> Message-ID: Is "prodList" a global? I'd be tempted to make it a regular fact inserted into Working Memory and have DT1's action update the fact after inserting the product. See http://stackoverflow.com/questions/17848823/drools-using-a-global-variable-in-condition-and-updating-it-in-consequence On 28 April 2014 17:24, swaroop wrote: > Hi , > > Please find the screen shots attached > DT One > > > DT Two > > > Let me know if this works else i will share the spreadsheets > > > > > -- > View this message in context: > http://drools.46999.n3.nabble.com/Rule-Orchestration-tp4029371p4029375.html > Sent from the Drools: User forum mailing list archive at Nabble.com. > _______________________________________________ > rules-users mailing list > rules-users at lists.jboss.org > https://lists.jboss.org/mailman/listinfo/rules-users > -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.jboss.org/pipermail/rules-users/attachments/20140501/3b73e089/attachment.html From hagai.shatz at gmail.com Thu May 1 04:36:23 2014 From: hagai.shatz at gmail.com (Hagai Shatz) Date: Thu, 1 May 2014 09:36:23 +0100 Subject: [rules-users] OptaPlanner: Solver.isEveryProblemFactChangeProcessed() return true before the last fact change is processed In-Reply-To: References: <1398853036689-4029389.post@n3.nabble.com> <1398863254852-4029392.post@n3.nabble.com> Message-ID: <9DE81C3F-BF21-482C-9D97-DCA7FE54FEF0@gmail.com> I'm working on a scheduling solution for traveling engineers. Similar to vehicle routing but with daily routes and more complex constrains (like dependencies between visits). Thanks, Hagai Shatz On 30 Apr 2014, at 20:31, Geoffrey De Smet wrote: > On 30-04-14 15:07, Hagai wrote: > I do use it from other threads in the following 2 scenarios: > > 1. In a thread that monitors a stream of messages with fact changes. Just > before the thread add a new problem fact change to the solver, the code > checks if the message is relevant by examining the current solution facts. > But if there is a pending problem fact change in the queue, this evaluation > cannot be done and a new problem fact change must be added (even if it will > not do any change when processed). The idea is to minimize the situations > where a message does not result in any change to facts and the solver > restart itself to process the a fact change that does not change anything. > > 2. The solver produce many new solutions when starting and after fact > changes. After some time, less new solutions are found. But when a new > solution is found, some additional improvements are usually found shortly > after. To reduce the amount of new best solutions produced by the > application, a thread is scheduled to read/save/send the best solution after > a short idle time (no new best solution for X ms). To make sure the best > solution is valid, the code checks if every problem facts change processed. > If there are still fact changes to process, the solver will produce another > best solution shortly with the updated facts. Thanks for the feedback: it's very helpful for me to know how it's used better. Out of interest: What kind of planning problem are you solving? > > I hope this fix is simple to do so I can remove my workaround. Yes, I'll fix the problem (I might go for an alternative on the peek()'s) on Friday (holiday tomorrow with plans). > > BTW, I'm looking forward to use the new demon mode (instead of a similar > implementation outside of the solver). Grab 6.1.0-SNAPSHOT if you can't wait. Or read the SNAPSHOT docs. Feedback/concerns welcome. > > > > -- > View this message in context: http://drools.46999.n3.nabble.com/OptaPlanner-Solver-isEveryProblemFactChangeProcessed-return-true-before-the-last-fact-change-is-procd-tp4029389p4029392.html > Sent from the Drools: User forum mailing list archive at Nabble.com. > _______________________________________________ > rules-users mailing list > rules-users at lists.jboss.org > https://lists.jboss.org/mailman/listinfo/rules-users _______________________________________________ rules-users mailing list rules-users at lists.jboss.org https://lists.jboss.org/mailman/listinfo/rules-users From juby.joseph.ninan at student.tue.nl Thu May 1 10:36:46 2014 From: juby.joseph.ninan at student.tue.nl (jjn) Date: Thu, 1 May 2014 07:36:46 -0700 (PDT) Subject: [rules-users] Integrate jBPM with OptaPlanner In-Reply-To: References: <1398795172193-4029384.post@n3.nabble.com> Message-ID: <1398955006261-4029398.post@n3.nabble.com> Hi Geoffrey I was thinking something like this 1. Create a data model for a request in jBPM, where there will be a fields - id, complexity 2. Create a process model in jBPM for incoming requests being processed by specific actors 3. Somehow call optaplanner (??) Now lets say there are 10 requests Optaplanner can be used to assign requests to employees (based on the capability of the employee and the complexity of the request), for eg. request id 1, request id 3 are done by employee 2. Now in jBPM, I want request 1 and request 3 to be processed by employee 2(actor) Maybe use a decision table - When there is request 1 and request 3, then assign employee 2 to do a particular task -- View this message in context: http://drools.46999.n3.nabble.com/Integrate-jBPM-with-OptaPlanner-tp4029384p4029398.html Sent from the Drools: User forum mailing list archive at Nabble.com. From dcrissma at redhat.com Thu May 1 14:10:44 2014 From: dcrissma at redhat.com (Dennis Crissman) Date: Thu, 01 May 2014 14:10:44 -0400 Subject: [rules-users] kie workbench unable to authenticate In-Reply-To: References: Message-ID: <53628E24.2010905@redhat.com> I am using tomcat7 and followed the instructions below, so that I now having a standing server. I cannot however log into that server. No exceptions or errors are thrown or displayed. Any suggestions? conf/tomcat-users.xml ... -------- Original Message -------- Subject: Re: [rules-users] Problems deploying war Date: Thu, 24 Apr 2014 16:45:17 +0100 From: Michael Anstis Reply-To: Rules Users List To: Rules Users List OK, repeated. 1) Downloaded Tomcat 7.0 from http://tomcat.apache.org/download-70.cgi 2) Downloaded Drools Workbench distribution from? http://drools.jboss.org/downloads.html 3) Copied 3 required JARs to /lib 4) Changed Tomcat's Manager upload limit in /webapps/manager/WEB-INF/web.xml 5) Started Tomcat 6) Browse to Manager application 7) Upload kie-drools-wb-distribution-wars-6.0.1.Final-tomcat7.0.war 8) Success. 9) Click on link in Tomcat's Manager and KIE Drools Workbench launched successfully. 10) Logged in with user defined in /webapps/kie-drools-wb-distribution-wars-6.0.1.Final-tomcat7.0/WEB-INF/classes/users.properties On 15 April 2014 14:57, Ven Tadipatri > wrote: I'm not sure what you mean by the J2ee security section. I didn't see anything like that in the web.xml.? There didn't appear to be any code that was commented out. Thanks, Ven On 04/15/2014 08:40 AM, Michael Anstis wrote: > If you're using 6.0 (as opposed to 6.1.0-SNAPSHOT) did you also > uncomment the J2EE security section in the web.xml? > > > On 15 April 2014 13:27, Ven Tadipatri > wrote: > > I've added the following libraries to the lib folder (I'm > assuming you mean the Tomcat library, not the webapp-specific > WEB-INF/lib folder ): > -rwxr-xr-x 1 svc-tomcat svc-tomcat? ? 43519 Apr 14 08:38 > javax.security.jacc-api-1.4.jar > -rwxr-xr-x 1 svc-tomcat svc-tomcat? ? ? 6992 Apr 14 08:38 > kie-tomcat-integration-6.0.1.Final.jar > -rwxr-xr-x 1 svc-tomcat svc-tomcat? ? 26084 Apr 14 08:38 > slf4j-api-1.7.5.jar > > The following lines are in the server.xml: > ? ? ? ? unpackWARs="true" autoDeploy="true"> > > ? ? ? ? ? ? ? className="org.apache.catalina.valves.AccessLogValve" > directory="logs" > ? ? ? ? ? ? ? ? ? ? ? ? ? ? prefix="localhost_access_log." > suffix=".txt" > ? ? ? ? ? ? ? ? ? ? ? ? ? ? pattern="%h %l %u %t > "%r" %s %b" /> > > ? ? ? ? ? ? className="org.kie.integration.tomcat.JACCValve" /> > ? ? ? > > There doesn't seem to be any log output when the login fails. > It just brings me back to the same url: > http://localhost:8080/kie-drools-wb-distribution-wars-6.0.1.Final-tomcat7.0/org.kie.workbench.drools.KIEDroolsWebapp/j_security_check > Any ideas? > > Thanks, > Ven > > > > On 04/14/2014 11:50 AM, Michael Anstis wrote: >> You'll need to add the additional libraries to /lib and >> configure Catalina with the additional "Valve", as described >> in previous emails. >> >> These configure Tomcat to use the tomcat-users.xml file. >> >> >> On 14 April 2014 14:36, Ven Tadipatri >> > >> wrote: >> >> You're right - I'm getting closer :) >> Now, the >> http://localhost:8080/kie-drools-wb-distribution-wars-6.0.1.Final-tomcat7.0/ >> url comes up, but when I try to log in with the user and >> password in my >> tomcat-users.xml file, it doesn't log me in. >> >> I was able to bring up the main page both with the binary >> distribution (which came up with a KIE IDE logo) and the >> one I built with maven from sources >> (which came up with a UF logo). The login page looked >> identical except for the logo. >> >> This is what my tomcat-users.xml file looks like: >> >> ? >> ? > roles="analyst,admin"/> >> ? > roles="analyst,admin"/> >> >> (The password has been starred out in this e-mail) >> The only change I made to the war was >> ? mv >> org.uberfire.security.auth.AuthenticationSource-TOMCAT-JEE-SECURITY >> org.uberfire.security.auth.AuthenticationSource >> >> Is there something I have to do with the login.config or >> realm.properties? >> >> Thanks, >> Ven >> >> >> On 04/14/2014 09:17 AM, Michael Anstis wrote: >>> You're almost there by the look of it!!! >>> >>> I replied to your other questions about why the >>> workbench is trying to access git.. you can disable this >>> and then you shouldn't get the error you paste (I assume >>> you can't access github.com from >>> where you're trying to deploy). >>> >>> The JBoss AS7 WAR works "out of the box".. no need to >>> configure anything extra, or download any WARs :) >>> >>> I would encourage you to delete .niogit folder in /bin >>> when trying to deploy (if you had errors before). >>> >>> .niogit is where the workbench stores it's configuration >>> and any downloaded git repositories. >>> >>> >>> On 14 April 2014 14:14, Ven Tadipatri >>> >> > wrote: >>> >>> I'm not quite sure why it's so challenging to get >>> the war deployed with Tomcat. Is it easier to deploy >>> the war with Jboss? >>> These are the exceptions I'm getting, even after >>> adding "-Dorg.kie.demo=false" to the CATALINA_OPTS >>> in catalina.sh >>> I want to disable the access to remote git repos. >>> >>> INFO: Deploying web application archive >>> /opt/tomcat/tomcat7/webapps/drools-workbench-6.0.1.Final-tomcat7.0.war >>> 2014-04-14 09:04:23,985 [localhost-startStop-1] >>> INFO? Found kmodule: >>> jar:file:/opt/tomcat/tomcat7/webapps/drools-workbench-6.0.1.Final-tomcat7.0/WEB-INF/lib/drools-wb-rest-defaultapprover-6.0.1.Final.jar!/META-INF/kmodule.xml >>> 2014-04-14 09:04:24,036 [localhost-startStop-1] >>> INFO? KieModule was added:ZipKieModule[ >>> ReleaseId=org.drools:drools-wb-rest-defaultapprover:6.0.1.Finalfile=/opt/tomcat/tomcat7/webapps/drools-workbench-6.0.1.Final-tomcat7.0/WEB-INF/lib/drools-wb-rest-defaultapprover-6.0.1.Final.jar] >>> 2014-04-14 09:04:24,036 [localhost-startStop-1] >>> INFO? Found kmodule: >>> jar:file:/opt/tomcat/tomcat7/webapps/drools-workbench-6.0.1.Final-tomcat7.0/WEB-INF/lib/drools-wb-rest-defaultapprover-6.0.1.Final.jar!/META-INF/kmodule.xml >>> 2014-04-14 09:04:24,039 [localhost-startStop-1] >>> INFO? KieModule was added:ZipKieModule[ >>> ReleaseId=org.drools:drools-wb-rest-defaultapprover:6.0.1.Finalfile=/opt/tomcat/tomcat7/webapps/drools-workbench-6.0.1.Final-tomcat7.0/WEB-INF/lib/drools-wb-rest-defaultapprover-6.0.1.Final.jar] >>> 2014-04-14 09:07:36,460 [localhost-startStop-1] >>> ERROR Failed to setup Repository 'uf-playground' >>> >>> java.lang.RuntimeException: >>> https://github.com/guvnorngtestuser1/guvnorng-playground.git: >>> cannot open git-upload-pack >>> ? ? ? ? ? ? ? at >>> org.uberfire.backend.server.repositories.git.GitRepositoryFactoryHelper.newRepository(GitRepositoryFactoryHelper.java:80)~[uberfire-backend-server-0.3.1.Final.jar:0.3.1.Final] >>> ? ? ? ? ? ? ? at >>> org.uberfire.backend.server.repositories.git.GitRepositoryFactoryHelper$Proxy$_$$_WeldClientProxy.newRepository(GitRepositoryFactoryHelper$Proxy$_$$_WeldClientProxy.java)~[uberfire-backend-server-0.3.1.Final.jar:0.3.1.Final] >>> >>> >>> >>> >>> Thanks, >>> Ven >>> >>> >>> On 04/14/2014 08:57 AM, Michael Anstis wrote: >>>> If apply the additional configuration you are >>>> telling Tomcat to use Users defined in >>>> /conf/tomcat-users.xml >>>> >>>> I modified the WAR by unzipping it, modifying the >>>> relevant files and then zipping it back into a WAR >>>> before deploying. >>>> >>>> >>>> On 14 April 2014 13:53, Ven Tadipatri >>>> >>> > wrote: >>>> >>>> Hi Michael, >>>> ? ? Unfortunately I can't seem to get the 6.0.1 >>>> version up and running. I followed the steps >>>> below, finding the 3 jars listed below online. >>>> But still, Tomcat just hangs for a bit, then >>>> throws a bunch of severe warnings. There don't >>>> seem to be any log messages describing the problem. >>>> Also, I'm a bit confused by the directions - >>>> how can we modify the WEB-INF directory before >>>> the war is deployed? And how do we define users >>>> in the login.config file? >>>> >>>> >>>> Thanks, >>>> Ven >>>> >>>> On 04/11/2014 10:49 AM, Michael Anstis wrote: >>>>> Hi, >>>>> >>>>> There have been a few people with Tomcat >>>>> deployment issues for kie-drools-wb, so I >>>>> thought I'd give it a try. >>>>> >>>>> These are the steps I followed for >>>>> *successful* deployment (most of which is >>>>> already documented, but not obvious, in the >>>>> WAR's README.txt file):- >>>>> >>>>> *6.0.1* >>>>> * >>>>> * >>>>> Starting with a clean install of Tomcat 7. >>>>> >>>>> 1. Copy "kie-tomcat-integration" JAR into >>>>> TOMCAT_HOME/lib (org.kie:kie-tomcat-integration) >>>>> 2. Copy "JACC" JAR into TOMCAT_HOME/lib >>>>> (javax.security.jacc:artifactId=javax.security.jacc-api >>>>> in JBoss Maven Repository) >>>>> 3. Copy "slf4j-api" JAR into TOMCAT_HOME/lib >>>>> (org.slf4j:artifactId=slf4j-api in JBoss Maven >>>>> Repository) >>>>> 4. Add valve configuration into >>>>> TOMCAT_HOME/conf/server.xml inside >>>>> element as last valve definition: >>>>> >>>>> ? ? ? >>>> className="org.kie.integration.tomcat.JACCValve" >>>>> /> >>>>> >>>>> 5. Edit TOMCAT_HOME/conf/tomcat-users.xml to >>>>> include roles and users, make sure there will >>>>> be 'analyst' or 'admin' roles defined as it's >>>>> required to be authorized to use kie-wb >>>>> 6. Delete? >>>>> org.uberfire.security.auth.AuthenticationSource? inside >>>>> WEB-INF/classes/META-INF/services >>>>> 7. Rename >>>>> org.uberfire.security.auth.AuthenticationSource-TOMCAT-JEE-SECURITY >>>>> to >>>>> org.uberfire.security.auth.AuthenticationSource? >>>>> inside WEB-INF/classes/META-INF/services >>>>> 8. Increase Java's PermGen space by adding >>>>> file? TOMCAT_HOME/bin/setenv.sh? containing? >>>>> export JAVA_OPTS="-Xmx1024m -XX:MaxPermSize=256m" >>>>> 9. Start Tomcat with TOMCAT_HOME/bin/startup.sh >>>>> 10. Go to Management Console, >>>>> http://localhost:8080/management >>>>> 11. Deploy modified WAR >>>>> >>>>> If you do not complete these steps the WAR >>>>> works "out of the box" but you'll need to >>>>> define Users in? WEB-INF/classes/login.config >>>>> >>>>> *6.1.0-SNAPSHOT* >>>>> * >>>>> * >>>>> Starting with a clean install of Tomcat 7. >>>>> >>>>> 1. Copy "kie-tomcat-integration" JAR into >>>>> TOMCAT_HOME/lib (org.kie:kie-tomcat-integration) >>>>> 2. Copy "JACC" JAR into TOMCAT_HOME/lib >>>>> (javax.security.jacc:artifactId=javax.security.jacc-api >>>>> in JBoss Maven Repository) >>>>> 3. Copy "slf4j-api" JAR into TOMCAT_HOME/lib >>>>> (org.slf4j:artifactId=slf4j-api in JBoss Maven >>>>> Repository) >>>>> 4. Add valve configuration into >>>>> TOMCAT_HOME/conf/server.xml inside Host >>>>> element as last valve definition: >>>>> >>>>> ? ? >>>> className="org.kie.integration.tomcat.JACCValve" >>>>> /> >>>>> >>>>> 5. Edit TOMCAT_HOME/conf/tomcat-users.xml to >>>>> include roles and users, make sure there will >>>>> be 'analyst' or 'admin' roles defined as it's >>>>> required to be authorized to use kie-wb >>>>> 6. Start Tomcat with? TOMCAT_HOME/bin/startup.sh >>>>> 7. Go to Management Console,? >>>>> http://localhost:8080/management >>>>> 8. Deploy modified WAR >>>>> >>>>> With kind regards, >>>>> >>>>> Mike >>>>> * >>>>> * >>>>> >>>>> >>>>> >>>>> On 10 April 2014 19:25, Ven Tadipatri >>>>> >>>> > wrote: >>>>> >>>>> Hi, >>>>> ? I'm trying to get set up with Drools >>>>> and Guvnor.? I've had some success >>>>> building a test program with Drools, but >>>>> when I saw that there's a webapp >>>>> to manage and view rules, I was interested >>>>> in getting that working as well. >>>>> Unfortunately I haven't had much success >>>>> with that. >>>>> ? I downloaded the >>>>> kie-drools-wb-distribution-6.0.1.Final.zip >>>>> file from the JBoss drools website and >>>>> dropped the >>>>> binaries/kie-drools-wb-distribution-wars-6.0.1.Final-tomcat7.0.war >>>>> into my Tomcat directory.? Tomcat was just >>>>> hanging for a while, then spit out a bunch >>>>> of error messages: >>>>> Apr 10, 2014 2:21:40 PM >>>>> org.apache.catalina.core.StandardContext >>>>> startInternal >>>>> INFO: Deploying web application archive >>>>> /opt/tomcat/tomcat7/webapps/kie-drools-wb-distribution-wars-6.0.1.Final-tomcat7.0.war >>>>> Apr 10, 2014 2:21:40 PM >>>>> org.apache.catalina.core.StandardContext >>>>> startInternal >>>>> SEVERE: Error listenerStart >>>>> Apr 10, 2014 2:21:40 PM >>>>> org.apache.catalina.core.StandardContext >>>>> startInternal >>>>> SEVERE: Context >>>>> [/kie-drools-wb-distribution-wars-6.0.1.Final-tomcat7.0] >>>>> startup failed due to previous errors >>>>> Apr 10, 2014 2:21:40 PM >>>>> org.apache.catalina.loader.WebappClassLoader >>>>> clearReferencesThreads >>>>> SEVERE: The web application >>>>> [/kie-drools-wb-distribution-wars-6.0.1.Final-tomcat7.0] >>>>> appears to have started a thread named >>>>> [pool-4-thread-1] but has failed to stop >>>>> it. This is very likely to create a memory >>>>> leak. >>>>> Apr 10, 2014 2:21:40 PM >>>>> org.apache.catalina.loader.WebappClassLoader >>>>> clearReferencesThreads >>>>> SEVERE: The web application >>>>> [/kie-drools-wb-distribution-wars-6.0.1.Final-tomcat7.0] >>>>> appears to have started a thread named >>>>> [Thread-3] but has failed to stop it. This >>>>> is very likely to create a memory leak. >>>>> Apr 10, 2014 2:21:40 PM >>>>> org.apache.catalina.loader.WebappClassLoader >>>>> clearReferencesThreads >>>>> SEVERE: The web application >>>>> [/kie-drools-wb-distribution-wars-6.0.1.Final-tomcat7.0] >>>>> appears to have started a thread named >>>>> [pool-7-thread-1] but has failed to stop >>>>> it. This is very likely to create a memory >>>>> leak. >>>>> Apr 10, 2014 2:21:40 PM >>>>> org.apache.catalina.loader.WebappClassLoader >>>>> clearReferencesThreads >>>>> SEVERE: The web application >>>>> [/kie-drools-wb-distribution-wars-6.0.1.Final-tomcat7.0] >>>>> appears to have started a thread named >>>>> [Git-Daemon-Accept] but has failed to stop >>>>> it. This is very likely to create a memory >>>>> leak. >>>>> Apr 10, 2014 2:21:40 PM >>>>> org.apache.catalina.loader.WebappClassLoader >>>>> checkThreadLocalMapForLeaks >>>>> SEVERE: The web application >>>>> [/kie-drools-wb-distribution-wars-6.0.1.Final-tomcat7.0] >>>>> created a ThreadLocal with key of type >>>>> [org.jboss.errai.config.util.ClassScanner$1] >>>>> (value >>>>> [org.jboss.errai.config.util.ClassScanner$1 at 1b3870a5]) >>>>> and a value of type [java.lang.Boolean] >>>>> (value [true]) but failed to remove it >>>>> when the web application was stopped. >>>>> Threads are going to be renewed over time >>>>> to try and avoid a probable memory leak. >>>>> Apr 10, 2014 2:21:40 PM >>>>> org.apache.catalina.loader.WebappClassLoader >>>>> checkThreadLocalMapForLeaks >>>>> SEVERE: The web application >>>>> [/kie-drools-wb-distribution-wars-6.0.1.Final-tomcat7.0] >>>>> created a ThreadLocal with key of type >>>>> [org.jboss.solder.servlet.beanManager.ServletContextAttributeProvider$1] >>>>> (value >>>>> [org.jboss.solder.servlet.beanManager.ServletContextAttributeProvider$1 at 166b6e99]) >>>>> and a value of type >>>>> [org.apache.catalina.core.ApplicationContextFacade] >>>>> (value >>>>> [org.apache.catalina.core.ApplicationContextFacade at 672a0a4e]) >>>>> but failed to remove it when the web >>>>> application was stopped. Threads are going >>>>> to be renewed over time to try and avoid a >>>>> probable memory leak. >>>>> Apr 10, 2014 2:21:40 PM >>>>> org.apache.catalina.loader.WebappClassLoader >>>>> checkThreadLocalMapForLeaks >>>>> SEVERE: The web application >>>>> [/kie-drools-wb-distribution-wars-6.0.1.Final-tomcat7.0] >>>>> created a ThreadLocal with key of type >>>>> [org.eclipse.jgit.nls.NLS$1] (value >>>>> [org.eclipse.jgit.nls.NLS$1 at 790abbcb]) and >>>>> a value of type [org.eclipse.jgit.nls.NLS] >>>>> (value >>>>> [org.eclipse.jgit.nls.NLS at 2faf4a82]) but >>>>> failed to remove it when the web >>>>> application was stopped. Threads are going >>>>> to be renewed over time to try and avoid a >>>>> probable memory leak. >>>>> >>>>> ? Next I tried building the workbench from >>>>> source: >>>>> https://github.com/droolsjbpm/drools-wb/archive/6.0.1.Final.zip >>>>> ? The maven build worked, and I dropped >>>>> the tomcat war into the tomcat directory >>>>> (removing any existing webapps and wars). >>>>> Starting Tomcat now produced these errors: >>>>> >>>>> INFO: Deploying web application archive >>>>> /opt/tomcat/tomcat7/webapps/drools-workbench-6.0.1.Final-tomcat7.0.war >>>>> 2014-04-10 13:46:31,975 >>>>> [localhost-startStop-1] >>>>> >>>>> ERROR Failed to setup Repository >>>>> 'uf-playground' >>>>> java.lang.RuntimeException: >>>>> https://github.com/guvnorngtestuser1/guvnorng-playground.git: >>>>> cannot open git-upload-pack >>>>> >>>>> What is the webapp trying to do with Git? >>>>> Do I need to point it at some git repo? >>>>> >>>>> I tried the jboss instructions here: >>>>> >>>>> http://blog.athico.com/2013/05/how-to-build-and-run-drools-and-guvnor.html >>>>> >>>>> But that didn't work either, with Jboss >>>>> just hanging as well.? Any clues on what >>>>> might be going wrong? >>>>> >>>>> Thanks, >>>>> Ven >>>>> >>>>> _______________________________________________ >>>>> rules-users mailing list >>>>> rules-users at lists.jboss.org >>>>> >>>>> https://lists.jboss.org/mailman/listinfo/rules-users >>>>> >>>>> >>>> >>>> >>>> _______________________________________________ >>>> rules-users mailing list >>>> rules-users at lists.jboss.org >>>> >>>> https://lists.jboss.org/mailman/listinfo/rules-users >>>> >>>> >>>> >>>> >>>> _______________________________________________ >>>> rules-users mailing list >>>> rules-users at lists.jboss.org >>>> https://lists.jboss.org/mailman/listinfo/rules-users >>> >>> >>> _______________________________________________ >>> rules-users mailing list >>> rules-users at lists.jboss.org >>> >>> https://lists.jboss.org/mailman/listinfo/rules-users >>> >>> >>> >>> >>> _______________________________________________ >>> rules-users mailing list >>> rules-users at lists.jboss.org >>> https://lists.jboss.org/mailman/listinfo/rules-users >> >> >> _______________________________________________ >> rules-users mailing list >> rules-users at lists.jboss.org >> >> https://lists.jboss.org/mailman/listinfo/rules-users >> >> >> >> >> _______________________________________________ >> rules-users mailing list >> rules-users at lists.jboss.org >> https://lists.jboss.org/mailman/listinfo/rules-users > > > _______________________________________________ > rules-users mailing list > rules-users at lists.jboss.org > https://lists.jboss.org/mailman/listinfo/rules-users > > > > > _______________________________________________ > rules-users mailing list > rules-users at lists.jboss.org > https://lists.jboss.org/mailman/listinfo/rules-users _______________________________________________ rules-users mailing list rules-users at lists.jboss.org https://lists.jboss.org/mailman/listinfo/rules-users -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.jboss.org/pipermail/rules-users/attachments/20140501/87105fcd/attachment-0001.html -------------- next part -------------- _______________________________________________ rules-users mailing list rules-users at lists.jboss.org https://lists.jboss.org/mailman/listinfo/rules-users From michael.anstis at gmail.com Thu May 1 14:20:47 2014 From: michael.anstis at gmail.com (Michael Anstis) Date: Thu, 1 May 2014 19:20:47 +0100 Subject: [rules-users] kie workbench unable to authenticate In-Reply-To: <53628E24.2010905@redhat.com> References: <53628E24.2010905@redhat.com> Message-ID: The instructions immediately below your email state the configuration uses Users defined in WEB-INF/classes/users.properties. You need to add the additional J2EE security configuration to web.xml and the related Tomcat Valve definition to Tomcat (I forget exactly where but think I've mentioned it before in other emails on this thread). Sent on the move On 1 May 2014 19:11, "Dennis Crissman" wrote: > I am using tomcat7 and followed the instructions below, so that I now > having a standing server. I cannot however log into that server. No > exceptions or errors are thrown or displayed. Any suggestions? > > conf/tomcat-users.xml > ... > > > > > > > > > roles="manager-gui,admin-gui,admin-script"/> > > > > -------- Original Message -------- Subject: Re: [rules-users] Problems > deploying war Date: Thu, 24 Apr 2014 16:45:17 +0100 From: Michael > Anstis Reply-To: Rules > Users List To: > Rules Users List > > OK, repeated. > > 1) Downloaded Tomcat 7.0 from http://tomcat.apache.org/download-70.cgi > > 2) Downloaded Drools Workbench distribution from? > http://drools.jboss.org/downloads.html > > 3) Copied 3 required JARs to /lib > > 4) Changed Tomcat's Manager upload limit in > /webapps/manager/WEB-INF/web.xml > > 5) Started Tomcat > > 6) Browse to Manager application > > 7) Upload kie-drools-wb-distribution-wars-6.0.1.Final-tomcat7.0.war > > 8) Success. > > 9) Click on link in Tomcat's Manager and KIE Drools Workbench launched > successfully. > > 10) Logged in with user defined in > /webapps/kie-drools-wb-distribution-wars-6.0.1.Final-tomcat7.0/WEB-INF/classes/users.properties > > > > On 15 April 2014 14:57, Ven Tadipatri wrote: > >> I'm not sure what you mean by the J2ee security section. I didn't see >> anything like that in the web.xml.? There didn't appear to be >> any code that was commented out. >> >> Thanks, >> Ven >> >> >> On 04/15/2014 08:40 AM, Michael Anstis wrote: >> >> If you're using 6.0 (as opposed to 6.1.0-SNAPSHOT) did you also >> uncomment the J2EE security section in the web.xml? >> >> >> On 15 April 2014 13:27, Ven Tadipatri wrote: >> >>> I've added the following libraries to the lib folder (I'm assuming >>> you mean the Tomcat library, not the webapp-specific WEB-INF/lib folder ): >>> -rwxr-xr-x 1 svc-tomcat svc-tomcat? ? 43519 Apr 14 08:38 >>> javax.security.jacc-api-1.4.jar >>> -rwxr-xr-x 1 svc-tomcat svc-tomcat? ? ? 6992 Apr 14 08:38 >>> kie-tomcat-integration-6.0.1.Final.jar >>> -rwxr-xr-x 1 svc-tomcat svc-tomcat? ? 26084 Apr 14 08:38 >>> slf4j-api-1.7.5.jar >>> >>> The following lines are in the server.xml: >>> ? ? ? ? >> autoDeploy="true"> >>> >>> ? ? ? ? ? ? ? >> className="org.apache.catalina.valves.AccessLogValve" directory="logs" >>> ? ? ? ? ? ? ? ? ? ? ? ? ? ? prefix="localhost_access_log." suffix=".txt" >>> ? ? ? ? ? ? ? ? ? ? ? ? ? ? pattern="%h %l %u %t "%r" %s %b" >>> /> >>> >>> ? ? ? ? ? ? >>> ? ? ? >>> >>> There doesn't seem to be any log output when the login fails. It just >>> brings me back to the same url: >>> >>> http://localhost:8080/kie-drools-wb-distribution-wars-6.0.1.Final-tomcat7.0/org.kie.workbench.drools.KIEDroolsWebapp/j_security_check >>> Any ideas? >>> >>> Thanks, >>> Ven >>> >>> >>> >>> On 04/14/2014 11:50 AM, Michael Anstis wrote: >>> >>> You'll need to add the additional libraries to /lib and configure >>> Catalina with the additional "Valve", as described in previous emails. >>> >>> These configure Tomcat to use the tomcat-users.xml file. >>> >>> >>> On 14 April 2014 14:36, Ven Tadipatri wrote: >>> >>>> You're right - I'm getting closer :) >>>> Now, the >>>> http://localhost:8080/kie-drools-wb-distribution-wars-6.0.1.Final-tomcat7.0/url comes up, but when I try to log in with the user and password in my >>>> tomcat-users.xml file, it doesn't log me in. >>>> >>>> I was able to bring up the main page both with the binary distribution >>>> (which came up with a KIE IDE logo) and the one I built with maven from >>>> sources >>>> (which came up with a UF logo). The login page looked identical except >>>> for the logo. >>>> >>>> This is what my tomcat-users.xml file looks like: >>>> >>>> ? >>>> ? >>>> ? >>>> >>>> (The password has been starred out in this e-mail) >>>> The only change I made to the war was >>>> ? mv >>>> org.uberfire.security.auth.AuthenticationSource-TOMCAT-JEE-SECURITY >>>> org.uberfire.security.auth.AuthenticationSource >>>> >>>> Is there something I have to do with the login.config or >>>> realm.properties? >>>> >>>> Thanks, >>>> Ven >>>> >>>> >>>> On 04/14/2014 09:17 AM, Michael Anstis wrote: >>>> >>>> You're almost there by the look of it!!! >>>> >>>> I replied to your other questions about why the workbench is trying >>>> to access git.. you can disable this and then you shouldn't get the error >>>> you paste (I assume you can't access github.com from where you're >>>> trying to deploy). >>>> >>>> The JBoss AS7 WAR works "out of the box".. no need to configure >>>> anything extra, or download any WARs :) >>>> >>>> I would encourage you to delete .niogit folder in /bin when trying to >>>> deploy (if you had errors before). >>>> >>>> .niogit is where the workbench stores it's configuration and any >>>> downloaded git repositories. >>>> >>>> >>>> On 14 April 2014 14:14, Ven Tadipatri wrote: >>>> >>>>> I'm not quite sure why it's so challenging to get the war deployed >>>>> with Tomcat. Is it easier to deploy the war with Jboss? >>>>> These are the exceptions I'm getting, even after adding >>>>> "-Dorg.kie.demo=false" to the CATALINA_OPTS in catalina.sh >>>>> I want to disable the access to remote git repos. >>>>> >>>>> INFO: Deploying web application archive >>>>> /opt/tomcat/tomcat7/webapps/drools-workbench-6.0.1.Final-tomcat7.0.war >>>>> 2014-04-14 09:04:23,985 [localhost-startStop-1] INFO? Found kmodule: >>>>> jar:file:/opt/tomcat/tomcat7/webapps/drools-workbench-6.0.1.Final-tomcat7.0/WEB-INF/lib/drools-wb-rest-defaultapprover-6.0.1.Final.jar!/META-INF/kmodule.xml >>>>> 2014-04-14 09:04:24,036 [localhost-startStop-1] INFO? KieModule was >>>>> added:ZipKieModule[ >>>>> ReleaseId=org.drools:drools-wb-rest-defaultapprover:6.0.1.Finalfile=/opt/tomcat/tomcat7/webapps/drools-workbench-6.0.1.Final-tomcat7.0/WEB-INF/lib/drools-wb-rest-defaultapprover-6.0.1.Final.jar] >>>>> 2014-04-14 09:04:24,036 [localhost-startStop-1] INFO? Found kmodule: >>>>> jar:file:/opt/tomcat/tomcat7/webapps/drools-workbench-6.0.1.Final-tomcat7.0/WEB-INF/lib/drools-wb-rest-defaultapprover-6.0.1.Final.jar!/META-INF/kmodule.xml >>>>> 2014-04-14 09:04:24,039 [localhost-startStop-1] INFO? KieModule was >>>>> added:ZipKieModule[ >>>>> ReleaseId=org.drools:drools-wb-rest-defaultapprover:6.0.1.Finalfile=/opt/tomcat/tomcat7/webapps/drools-workbench-6.0.1.Final-tomcat7.0/WEB-INF/lib/drools-wb-rest-defaultapprover-6.0.1.Final.jar] >>>>> 2014-04-14 09:07:36,460 [localhost-startStop-1] ERROR Failed to setup >>>>> Repository 'uf-playground' >>>>> >>>>> java.lang.RuntimeException: >>>>> https://github.com/guvnorngtestuser1/guvnorng-playground.git: cannot >>>>> open git-upload-pack >>>>> ? ? ? ? ? ? ? at >>>>> org.uberfire.backend.server.repositories.git.GitRepositoryFactoryHelper.newRepository(GitRepositoryFactoryHelper.java:80)~[uberfire-backend-server-0.3.1.Final.jar:0.3.1.Final] >>>>> ? ? ? ? ? ? ? at >>>>> org.uberfire.backend.server.repositories.git.GitRepositoryFactoryHelper$Proxy$_$$_WeldClientProxy.newRepository(GitRepositoryFactoryHelper$Proxy$_$$_WeldClientProxy.java)~[uberfire-backend-server-0.3.1.Final.jar:0.3.1.Final] >>>>> >>>>> >>>>> >>>>> >>>>> Thanks, >>>>> Ven >>>>> >>>>> >>>>> On 04/14/2014 08:57 AM, Michael Anstis wrote: >>>>> >>>>> If apply the additional configuration you are telling Tomcat to use >>>>> Users defined in /conf/tomcat-users.xml >>>>> >>>>> I modified the WAR by unzipping it, modifying the relevant files and >>>>> then zipping it back into a WAR before deploying. >>>>> >>>>> >>>>> On 14 April 2014 13:53, Ven Tadipatri wrote: >>>>> >>>>>> Hi Michael, >>>>>> ? ? Unfortunately I can't seem to get the 6.0.1 version up and >>>>>> running. I followed the steps below, finding the 3 jars listed below online. >>>>>> But still, Tomcat just hangs for a bit, then throws a bunch of severe >>>>>> warnings. There don't seem to be any log messages describing the problem. >>>>>> Also, I'm a bit confused by the directions - how can we modify the >>>>>> WEB-INF directory before the war is deployed? And how do we define users >>>>>> in the login.config file? >>>>>> >>>>>> >>>>>> Thanks, >>>>>> Ven >>>>>> >>>>>> On 04/11/2014 10:49 AM, Michael Anstis wrote: >>>>>> >>>>>> Hi, >>>>>> >>>>>> There have been a few people with Tomcat deployment issues for >>>>>> kie-drools-wb, so I thought I'd give it a try. >>>>>> >>>>>> These are the steps I followed for *successful* deployment (most of >>>>>> which is already documented, but not obvious, in the WAR's README.txt >>>>>> file):- >>>>>> >>>>>> *6.0.1* >>>>>> >>>>>> Starting with a clean install of Tomcat 7. >>>>>> >>>>>> 1. Copy "kie-tomcat-integration" JAR into TOMCAT_HOME/lib >>>>>> (org.kie:kie-tomcat-integration) >>>>>> 2. Copy "JACC" JAR into TOMCAT_HOME/lib(javax.security.jacc:artifactId=javax.security.jacc-api in JBoss Maven >>>>>> Repository) >>>>>> 3. Copy "slf4j-api" JAR into TOMCAT_HOME/lib(org.slf4j:artifactId=slf4j-api in JBoss Maven Repository) >>>>>> 4. Add valve configuration into TOMCAT_HOME/conf/server.xml inside >>>>>> element as last valve definition: >>>>>> >>>>>> ? ? ? >>>>>> >>>>>> 5. Edit TOMCAT_HOME/conf/tomcat-users.xml to include roles and >>>>>> users, make sure there will be 'analyst' or 'admin' roles defined as it's >>>>>> required to be authorized to use kie-wb >>>>>> 6. Delete? org.uberfire.security.auth.AuthenticationSource? inside >>>>>> WEB-INF/classes/META-INF/services >>>>>> 7. Rename >>>>>> org.uberfire.security.auth.AuthenticationSource-TOMCAT-JEE-SECURITYto >>>>>> org.uberfire.security.auth.AuthenticationSource? inside >>>>>> WEB-INF/classes/META-INF/services >>>>>> 8. Increase Java's PermGen space by adding file? TOMCAT_HOME/bin/ >>>>>> setenv.sh? containing? export JAVA_OPTS="-Xmx1024m >>>>>> -XX:MaxPermSize=256m" >>>>>> 9. Start Tomcat with TOMCAT_HOME/bin/startup.sh >>>>>> 10. Go to Management Console, http://localhost:8080/management >>>>>> 11. Deploy modified WAR >>>>>> >>>>>> If you do not complete these steps the WAR works "out of the box" >>>>>> but you'll need to define Users in? WEB-INF/classes/login.config >>>>>> >>>>>> *6.1.0-SNAPSHOT* >>>>>> >>>>>> Starting with a clean install of Tomcat 7. >>>>>> >>>>>> 1. Copy "kie-tomcat-integration" JAR into TOMCAT_HOME/lib >>>>>> (org.kie:kie-tomcat-integration) >>>>>> 2. Copy "JACC" JAR into TOMCAT_HOME/lib >>>>>> (javax.security.jacc:artifactId=javax.security.jacc-api in JBoss Maven >>>>>> Repository) >>>>>> 3. Copy "slf4j-api" JAR into TOMCAT_HOME/lib >>>>>> (org.slf4j:artifactId=slf4j-api in JBoss Maven Repository) >>>>>> 4. Add valve configuration into TOMCAT_HOME/conf/server.xml inside >>>>>> Host element as last valve definition: >>>>>> >>>>>> ? ? >>>>>> >>>>>> 5. Edit TOMCAT_HOME/conf/tomcat-users.xml to include roles and >>>>>> users, make sure there will be 'analyst' or 'admin' roles defined as it's >>>>>> required to be authorized to use kie-wb >>>>>> 6. Start Tomcat with? TOMCAT_HOME/bin/startup.sh >>>>>> 7. Go to Management Console,? http://localhost:8080/management >>>>>> 8. Deploy modified WAR >>>>>> >>>>>> With kind regards, >>>>>> >>>>>> Mike >>>>>> >>>>>> >>>>>> >>>>>> >>>>>> On 10 April 2014 19:25, Ven Tadipatri wrote: >>>>>> >>>>>>> Hi, >>>>>>> ? I'm trying to get set up with Drools and Guvnor.? I've had some >>>>>>> success building a test program with Drools, but when I saw that there's a >>>>>>> webapp >>>>>>> to manage and view rules, I was interested in getting that working >>>>>>> as well. Unfortunately I haven't had much success with that. >>>>>>> ? I downloaded the kie-drools-wb-distribution-6.0.1.Final.zip file >>>>>>> from the JBoss drools website and dropped the >>>>>>> binaries/kie-drools-wb-distribution-wars-6.0.1.Final-tomcat7.0.war >>>>>>> into my Tomcat directory.? Tomcat was just hanging for a while, >>>>>>> then spit out a bunch of error messages: >>>>>>> Apr 10, 2014 2:21:40 PM org.apache.catalina.core.StandardContext >>>>>>> startInternal >>>>>>> INFO: Deploying web application archive >>>>>>> /opt/tomcat/tomcat7/webapps/kie-drools-wb-distribution-wars-6.0.1.Final-tomcat7.0.war >>>>>>> Apr 10, 2014 2:21:40 PM org.apache.catalina.core.StandardContext >>>>>>> startInternal >>>>>>> SEVERE: Error listenerStart >>>>>>> Apr 10, 2014 2:21:40 PM org.apache.catalina.core.StandardContext >>>>>>> startInternal >>>>>>> SEVERE: Context >>>>>>> [/kie-drools-wb-distribution-wars-6.0.1.Final-tomcat7.0] startup failed due >>>>>>> to previous errors >>>>>>> Apr 10, 2014 2:21:40 PM org.apache.catalina.loader.WebappClassLoader >>>>>>> clearReferencesThreads >>>>>>> SEVERE: The web application >>>>>>> [/kie-drools-wb-distribution-wars-6.0.1.Final-tomcat7.0] appears to have >>>>>>> started a thread named [pool-4-thread-1] but has failed to stop it. This is >>>>>>> very likely to create a memory leak. >>>>>>> Apr 10, 2014 2:21:40 PM org.apache.catalina.loader.WebappClassLoader >>>>>>> clearReferencesThreads >>>>>>> SEVERE: The web application >>>>>>> [/kie-drools-wb-distribution-wars-6.0.1.Final-tomcat7.0] appears to have >>>>>>> started a thread named [Thread-3] but has failed to stop it. This is very >>>>>>> likely to create a memory leak. >>>>>>> Apr 10, 2014 2:21:40 PM org.apache.catalina.loader.WebappClassLoader >>>>>>> clearReferencesThreads >>>>>>> SEVERE: The web application >>>>>>> [/kie-drools-wb-distribution-wars-6.0.1.Final-tomcat7.0] appears to have >>>>>>> started a thread named [pool-7-thread-1] but has failed to stop it. This is >>>>>>> very likely to create a memory leak. >>>>>>> Apr 10, 2014 2:21:40 PM org.apache.catalina.loader.WebappClassLoader >>>>>>> clearReferencesThreads >>>>>>> SEVERE: The web application >>>>>>> [/kie-drools-wb-distribution-wars-6.0.1.Final-tomcat7.0] appears to have >>>>>>> started a thread named [Git-Daemon-Accept] but has failed to stop it. This >>>>>>> is very likely to create a memory leak. >>>>>>> Apr 10, 2014 2:21:40 PM org.apache.catalina.loader.WebappClassLoader >>>>>>> checkThreadLocalMapForLeaks >>>>>>> SEVERE: The web application >>>>>>> [/kie-drools-wb-distribution-wars-6.0.1.Final-tomcat7.0] created a >>>>>>> ThreadLocal with key of type [org.jboss.errai.config.util.ClassScanner$1] >>>>>>> (value [org.jboss.errai.config.util.ClassScanner$1 at 1b3870a5]) and a >>>>>>> value of type [java.lang.Boolean] (value [true]) but failed to remove it >>>>>>> when the web application was stopped. Threads are going to be renewed over >>>>>>> time to try and avoid a probable memory leak. >>>>>>> Apr 10, 2014 2:21:40 PM org.apache.catalina.loader.WebappClassLoader >>>>>>> checkThreadLocalMapForLeaks >>>>>>> SEVERE: The web application >>>>>>> [/kie-drools-wb-distribution-wars-6.0.1.Final-tomcat7.0] created a >>>>>>> ThreadLocal with key of type >>>>>>> [org.jboss.solder.servlet.beanManager.ServletContextAttributeProvider$1] >>>>>>> (value >>>>>>> [org.jboss.solder.servlet.beanManager.ServletContextAttributeProvider$1 at 166b6e99]) >>>>>>> and a value of type [org.apache.catalina.core.ApplicationContextFacade] >>>>>>> (value [org.apache.catalina.core.ApplicationContextFacade at 672a0a4e]) >>>>>>> but failed to remove it when the web application was stopped. Threads are >>>>>>> going to be renewed over time to try and avoid a probable memory leak. >>>>>>> Apr 10, 2014 2:21:40 PM org.apache.catalina.loader.WebappClassLoader >>>>>>> checkThreadLocalMapForLeaks >>>>>>> SEVERE: The web application >>>>>>> [/kie-drools-wb-distribution-wars-6.0.1.Final-tomcat7.0] created a >>>>>>> ThreadLocal with key of type [org.eclipse.jgit.nls.NLS$1] (value >>>>>>> [org.eclipse.jgit.nls.NLS$1 at 790abbcb]) and a value of type >>>>>>> [org.eclipse.jgit.nls.NLS] (value [org.eclipse.jgit.nls.NLS at 2faf4a82]) >>>>>>> but failed to remove it when the web application was stopped. Threads are >>>>>>> going to be renewed over time to try and avoid a probable memory leak. >>>>>>> >>>>>>> ? Next I tried building the workbench from source: >>>>>>> https://github.com/droolsjbpm/drools-wb/archive/6.0.1.Final.zip >>>>>>> ? The maven build worked, and I dropped the tomcat war into the >>>>>>> tomcat directory (removing any existing webapps and wars). Starting Tomcat >>>>>>> now produced these errors: >>>>>>> >>>>>>> INFO: Deploying web application archive >>>>>>> /opt/tomcat/tomcat7/webapps/drools-workbench-6.0.1.Final-tomcat7.0.war >>>>>>> 2014-04-10 13:46:31,975 [localhost-startStop-1] >>>>>>> >>>>>>> ERROR Failed to setup Repository 'uf-playground' >>>>>>> java.lang.RuntimeException: >>>>>>> https://github.com/guvnorngtestuser1/guvnorng-playground.git: >>>>>>> cannot open git-upload-pack >>>>>>> >>>>>>> What is the webapp trying to do with Git? Do I need to point it at >>>>>>> some git repo? >>>>>>> >>>>>>> I tried the jboss instructions here: >>>>>>> >>>>>>> >>>>>>> http://blog.athico.com/2013/05/how-to-build-and-run-drools-and-guvnor.html >>>>>>> >>>>>>> But that didn't work either, with Jboss just hanging as well.? Any >>>>>>> clues on what might be going wrong? >>>>>>> >>>>>>> Thanks, >>>>>>> Ven >>>>>>> >>>>>>> _______________________________________________ >>>>>>> rules-users mailing list >>>>>>> rules-users at lists.jboss.org >>>>>>> https://lists.jboss.org/mailman/listinfo/rules-users >>>>>>> >>>>>> >>>>>> >>>>>> >>>>>> _______________________________________________ >>>>>> rules-users mailing list >>>>>> rules-users at lists.jboss.org >>>>>> https://lists.jboss.org/mailman/listinfo/rules-users >>>>>> >>>>> >>>>> >>>>> >>>>> _______________________________________________ >>>>> rules-users mailing listrules-users at lists.jboss.orghttps://lists.jboss.org/mailman/listinfo/rules-users >>>>> >>>>> >>>>> >>>>> _______________________________________________ >>>>> rules-users mailing list >>>>> rules-users at lists.jboss.org >>>>> https://lists.jboss.org/mailman/listinfo/rules-users >>>>> >>>> >>>> >>>> >>>> _______________________________________________ >>>> rules-users mailing listrules-users at lists.jboss.orghttps://lists.jboss.org/mailman/listinfo/rules-users >>>> >>>> >>>> >>>> _______________________________________________ >>>> rules-users mailing list >>>> rules-users at lists.jboss.org >>>> https://lists.jboss.org/mailman/listinfo/rules-users >>>> >>> >>> >>> >>> _______________________________________________ >>> rules-users mailing listrules-users at lists.jboss.orghttps://lists.jboss.org/mailman/listinfo/rules-users >>> >>> >>> >>> _______________________________________________ >>> rules-users mailing list >>> rules-users at lists.jboss.org >>> https://lists.jboss.org/mailman/listinfo/rules-users >>> >> >> >> >> _______________________________________________ >> rules-users mailing listrules-users at lists.jboss.orghttps://lists.jboss.org/mailman/listinfo/rules-users >> >> >> >> _______________________________________________ >> rules-users mailing list >> rules-users at lists.jboss.org >> https://lists.jboss.org/mailman/listinfo/rules-users >> > > > > > _______________________________________________ > rules-users mailing list > rules-users at lists.jboss.org > https://lists.jboss.org/mailman/listinfo/rules-users > -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.jboss.org/pipermail/rules-users/attachments/20140501/a60eb6db/attachment-0001.html From JAlejos at matson.com Thu May 1 16:57:15 2014 From: JAlejos at matson.com (Jens Alejos at OAK CORP x4287) Date: Thu, 1 May 2014 20:57:15 +0000 Subject: [rules-users] Guvnor 5.3.0 crashing OOM JoinNodeLeftTuple Message-ID: Hello, Our Guvnor 5.3.0 is generating an OOM and crashing the server. At the time of the crash we could see lots objects holding a lot of stuff in memory, most notably 23,878,166 org.drools.reteoo.JoinNodeLeftTuple, each of which takes 72 bytes. For 1.7 GB of heap. I believe the real issue is something is going wrong in guvnor that it is creating way to many of these org.drools.reteoo.JoinNodeLeftTuple objects. Do you guys have had this issue? Is this because of a Guvnor guided editor bug? Thanks NOTICE: This message, including any attachments, is intended for the use of the party to which it is addressed and may contain information that is privileged, confidential and exempt from disclosure. If you are not the intended recipient, any dissemination, distribution or copying of this communication is strictly prohibited. If you have received this communication in error, please contact the sender immediately by reply e-mail, and delete the original and any copies of this message. It is the sole responsibility of the recipient to ensure that this message and any attachments are virus free. -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.jboss.org/pipermail/rules-users/attachments/20140501/4750b403/attachment.html From dsotty at gmail.com Thu May 1 17:12:00 2014 From: dsotty at gmail.com (Davide Sottara) Date: Thu, 01 May 2014 14:12:00 -0700 Subject: [rules-users] Guvnor 5.3.0 crashing OOM JoinNodeLeftTuple In-Reply-To: References: Message-ID: <5362B8A0.5050201@gmail.com> This is unlikely a problem of the guided editor. Tuples are created when you run the rules in a session. We'd need to know which rules you're running and how you are inserting/retracting facts. Best Davide On 05/01/2014 01:57 PM, Jens Alejos at OAK CORP x4287 wrote: > > Hello, > > > > Our Guvnor 5.3.0 is generating an OOM and crashing the server. > > > > At the time of the crash we could see lots objects holding a lot of > stuff in memory, most notably 23,878,166 > org.drools.reteoo.JoinNodeLeftTuple, each of which takes 72 bytes. For > 1.7 GB of heap. > > I believe the real issue is something is going wrong in guvnor that it > is creating way to many of these org.drools.reteoo.JoinNodeLeftTuple > objects. > > Do you guys have had this issue? Is this because of a Guvnor guided > editor bug? > > > > Thanks > > > > NOTICE: This message, including any attachments, is intended for the > use of the party to which it is addressed and may contain information > that is privileged, confidential and exempt from disclosure. If you > are not the intended recipient, any dissemination, distribution or > copying of this communication is strictly prohibited. If you have > received this communication in error, please contact the sender > immediately by reply e-mail, and delete the original and any copies of > this message. It is the sole responsibility of the recipient to ensure > that this message and any attachments are virus free. > > > _______________________________________________ > rules-users mailing list > rules-users at lists.jboss.org > https://lists.jboss.org/mailman/listinfo/rules-users -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.jboss.org/pipermail/rules-users/attachments/20140501/1210172f/attachment.html From mproctor at codehaus.org Thu May 1 19:36:41 2014 From: mproctor at codehaus.org (Mark Proctor) Date: Fri, 2 May 2014 00:36:41 +0100 Subject: [rules-users] Guvnor 5.3.0 crashing OOM JoinNodeLeftTuple In-Reply-To: <5362B8A0.5050201@gmail.com> References: <5362B8A0.5050201@gmail.com> Message-ID: You?d also need to show that it?s still an issue in 5.6, or 6.0. Mark On 1 May 2014, at 22:12, Davide Sottara wrote: > This is unlikely a problem of the guided editor. Tuples are created when you run the rules in a session. > We'd need to know which rules you're running and how you are inserting/retracting facts. > Best > Davide > > On 05/01/2014 01:57 PM, Jens Alejos at OAK CORP x4287 wrote: >> Hello, >> >> Our Guvnor 5.3.0 is generating an OOM and crashing the server. >> >> At the time of the crash we could see lots objects holding a lot of stuff in memory, most notably 23,878,166 org.drools.reteoo.JoinNodeLeftTuple, each of which takes 72 bytes. For 1.7 GB of heap. >> I believe the real issue is something is going wrong in guvnor that it is creating way to many of these org.drools.reteoo.JoinNodeLeftTuple objects. >> Do you guys have had this issue? Is this because of a Guvnor guided editor bug? >> >> Thanks >> >> >> NOTICE: This message, including any attachments, is intended for the use of the party to which it is addressed and may contain information that is privileged, confidential and exempt from disclosure. If you are not the intended recipient, any dissemination, distribution or copying of this communication is strictly prohibited. If you have received this communication in error, please contact the sender immediately by reply e-mail, and delete the original and any copies of this message. It is the sole responsibility of the recipient to ensure that this message and any attachments are virus free. >> >> _______________________________________________ >> rules-users mailing list >> rules-users at lists.jboss.org >> https://lists.jboss.org/mailman/listinfo/rules-users > > _______________________________________________ > rules-users mailing list > rules-users at lists.jboss.org > https://lists.jboss.org/mailman/listinfo/rules-users -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.jboss.org/pipermail/rules-users/attachments/20140502/0243e5ba/attachment.html From calcacuervo at gmail.com Thu May 1 23:07:30 2014 From: calcacuervo at gmail.com (Demian Calcaprina) Date: Fri, 2 May 2014 00:07:30 -0300 Subject: [rules-users] Question about length windows Message-ID: Hi Guys, I have one question about how lenght windows will work. I have a rule like this. Basically, it is a "crosses" function, where the value of my object crosses a value. rule "mytest" dialect "mvel" when t2_1 : Tick( value < 102.352 ) over window:length (1) t1_1 : Tick( this before t2_1 , value >= 102.352 ) over window:length (2) then //DO SOMETHING end 23:51:32,150 INFO [org.drools.core.audit.WorkingMemoryConsoleLogger] (Camel (camel-1) thread #2 - JmsConsumer[]) ACTIVATION FIRED rule:mytest activationId:berarrr_1 [0, 27, 26] declarations: t2_1=Tick [value=102.351, tickTime=Fri May 02 05:51:31 ART 2014](27); t1_1=Tick [value=102.352, tickTime=Fri May 02 05:51:12 ART 2014](26) 23:53:30,560 INFO [org.drools.core.audit.WorkingMemoryConsoleLogger] (Camel (camel-1) thread #2 - JmsConsumer[]) ACTIVATION CREATED rule:mytest activationId:berarrr_1 [0, 146, 26] declarations: t2_1=Tick [value=102.349, tickTime=Fri May 02 05:53:30 ART 2014](146); t1_1=Tick [value=102.352, tickTime=Fri May 02 05:51:12 ART 2014](26) If you see, the first activation, the window:length(1), matched the object 27 window:length(2), matched the object 26 Then, after 2 minutes and some Ticks insertes in the WM window:length(1), matched the object 146 but window:length(2), still matched the object 26 I would expect, that, as object 26 was the first one to be inserted, then it is outside the window:length(2). Is my understanding correct? Am I making something wrong? I am using Drools 6. Thanks! Demian -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.jboss.org/pipermail/rules-users/attachments/20140502/81597d86/attachment-0001.html From wolfgang.laun at gmail.com Fri May 2 00:46:41 2014 From: wolfgang.laun at gmail.com (Wolfgang Laun) Date: Fri, 2 May 2014 06:46:41 +0200 Subject: [rules-users] Question about length windows In-Reply-To: References: Message-ID: A window:length is filled depending on the constraints but independent of how old the participating facts are. What you want to achieve can be done without windows: t2_1 : Tick( value < 102.352 ) t1_1 : Tick( this before t2_1 , value >= 102.352 ) not Tick( this before t2_1 && after t1_1 ) The last pattern ascertains that the preceding pair of facts is adjacent. (The three timestamps should be different.) You can also use rules based on an auxiliary fact maintaining state: While value < 102.352, state is set to "below"; as soon as a fact with value >= 102.352 matches state == "below", the threshold is passed and state is set to "above"... -W On 02/05/2014, Demian Calcaprina wrote: > Hi Guys, I have one question about how lenght windows will work. > > I have a rule like this. Basically, it is a "crosses" function, where the > value of my object crosses a value. > > rule "mytest" > dialect "mvel" > when > t2_1 : Tick( value < 102.352 ) over window:length (1) > t1_1 : Tick( this before t2_1 , value >= 102.352 ) over window:length (2) > then > //DO SOMETHING > end > > 23:51:32,150 INFO [org.drools.core.audit.WorkingMemoryConsoleLogger] > (Camel (camel-1) thread #2 - JmsConsumer[]) ACTIVATION FIRED rule:mytest > activationId:berarrr_1 [0, 27, 26] declarations: t2_1=Tick [value=102.351, > tickTime=Fri May 02 05:51:31 ART 2014](27); t1_1=Tick [value=102.352, > tickTime=Fri May 02 05:51:12 ART 2014](26) > > 23:53:30,560 INFO [org.drools.core.audit.WorkingMemoryConsoleLogger] > (Camel (camel-1) thread #2 - JmsConsumer[]) ACTIVATION CREATED rule:mytest > activationId:berarrr_1 [0, 146, 26] declarations: t2_1=Tick [value=102.349, > tickTime=Fri May 02 05:53:30 ART 2014](146); t1_1=Tick [value=102.352, > tickTime=Fri May 02 05:51:12 ART 2014](26) > > If you see, the first activation, the > window:length(1), matched the object 27 > window:length(2), matched the object 26 > > Then, after 2 minutes and some Ticks insertes in the WM > window:length(1), matched the object 146 > but window:length(2), still matched the object 26 > > I would expect, that, as object 26 was the first one to be inserted, then > it is outside the window:length(2). > > Is my understanding correct? Am I making something wrong? I am using Drools > 6. > > Thanks! > > Demian > From dsotty at gmail.com Fri May 2 00:59:20 2014 From: dsotty at gmail.com (Davide Sottara) Date: Thu, 01 May 2014 21:59:20 -0700 Subject: [rules-users] Question about length windows In-Reply-To: References: Message-ID: <53632628.8070608@gmail.com> On 05/01/2014 09:46 PM, Wolfgang Laun wrote: > A window:length is filled depending on the constraints but independent > of how old the participating facts are. Currently only ALPHA constraints determine which facts are filtered by a length window. There is a JIRA to include beta constraints, but it has not yet been discussed. So yes, if none of your facts had value > 102.352, it is possible for (26) to be still in the window when (146) comes in. Davide > > What you want to achieve can be done without windows: > > t2_1 : Tick( value < 102.352 ) > t1_1 : Tick( this before t2_1 , value >= 102.352 ) > not Tick( this before t2_1 && after t1_1 ) > > The last pattern ascertains that the preceding pair of facts is > adjacent. (The three timestamps should be different.) > > You can also use rules based on an auxiliary fact maintaining state: > While value < 102.352, state is set to "below"; as soon as a > fact with value >= 102.352 matches state == "below", the > threshold is passed and state is set to "above"... > > -W > > > On 02/05/2014, Demian Calcaprina wrote: >> Hi Guys, I have one question about how lenght windows will work. >> >> I have a rule like this. Basically, it is a "crosses" function, where the >> value of my object crosses a value. >> >> rule "mytest" >> dialect "mvel" >> when >> t2_1 : Tick( value < 102.352 ) over window:length (1) >> t1_1 : Tick( this before t2_1 , value >= 102.352 ) over window:length (2) >> then >> //DO SOMETHING >> end >> >> 23:51:32,150 INFO [org.drools.core.audit.WorkingMemoryConsoleLogger] >> (Camel (camel-1) thread #2 - JmsConsumer[]) ACTIVATION FIRED rule:mytest >> activationId:berarrr_1 [0, 27, 26] declarations: t2_1=Tick [value=102.351, >> tickTime=Fri May 02 05:51:31 ART 2014](27); t1_1=Tick [value=102.352, >> tickTime=Fri May 02 05:51:12 ART 2014](26) >> >> 23:53:30,560 INFO [org.drools.core.audit.WorkingMemoryConsoleLogger] >> (Camel (camel-1) thread #2 - JmsConsumer[]) ACTIVATION CREATED rule:mytest >> activationId:berarrr_1 [0, 146, 26] declarations: t2_1=Tick [value=102.349, >> tickTime=Fri May 02 05:53:30 ART 2014](146); t1_1=Tick [value=102.352, >> tickTime=Fri May 02 05:51:12 ART 2014](26) >> >> If you see, the first activation, the >> window:length(1), matched the object 27 >> window:length(2), matched the object 26 >> >> Then, after 2 minutes and some Ticks insertes in the WM >> window:length(1), matched the object 146 >> but window:length(2), still matched the object 26 >> >> I would expect, that, as object 26 was the first one to be inserted, then >> it is outside the window:length(2). >> >> Is my understanding correct? Am I making something wrong? I am using Drools >> 6. >> >> Thanks! >> >> Demian >> > _______________________________________________ > rules-users mailing list > rules-users at lists.jboss.org > https://lists.jboss.org/mailman/listinfo/rules-users > From nanda4passion at gmail.com Fri May 2 01:35:00 2014 From: nanda4passion at gmail.com (maxynandy) Date: Thu, 1 May 2014 22:35:00 -0700 (PDT) Subject: [rules-users] Drools 5.4 Message-ID: <1399008900643-4029407.post@n3.nabble.com> if we have guvnor,we have a additional context (Url for Guvnor related modules). We would like to have a Single Context for our application. 1)Let me know whether any risk is seen in merging the application war and guvnor war. 2)Alternatives for loading the rules dynamically other than using Guvnor. Thanks, maxynandy -- View this message in context: http://drools.46999.n3.nabble.com/Drools-5-4-tp4029407.html Sent from the Drools: User forum mailing list archive at Nabble.com. From ge0ffrey.spam at gmail.com Fri May 2 04:27:50 2014 From: ge0ffrey.spam at gmail.com (Geoffrey De Smet) Date: Fri, 02 May 2014 10:27:50 +0200 Subject: [rules-users] Integrate jBPM with OptaPlanner In-Reply-To: <1398955006261-4029398.post@n3.nabble.com> References: <1398795172193-4029384.post@n3.nabble.com> <1398955006261-4029398.post@n3.nabble.com> Message-ID: On 01-05-14 16:36, jjn wrote: > Hi Geoffrey > > I was thinking something like this > 1. Create a data model for a request in jBPM, where there will be a fields - > id, complexity > 2. Create a process model in jBPM for incoming requests being processed by > specific actors > 3. Somehow call optaplanner (??) > > Now lets say there are 10 requests > Optaplanner can be used to assign requests to employees (based on the > capability of the employee and the complexity of the request), for eg. > request id 1, request id 3 are done by employee 2. Sounds like the CloudBalancing example: instead of processes you have requests, instead of machines you have employees. The capacity of the employee should be at least the sum of the demand of the requests. You might also want to add a soft constraints for fairness/load balancing (see docs section "fairness constraints"). > > Now in jBPM, I want request 1 and request 3 to be processed by employee > 2(actor) I'd use "immovable planning entities" for that. See this blog: http://www.optaplanner.org/blog/2013/10/11/WillSkynetControlOurSchedule.html Basically, you're locking some requests to some employees and ask OptaPlanner to schedule the rest around that. > > Maybe use a decision table - > When there is request 1 and request 3, then assign employee 2 to do a > particular task For decision tables, see my latest 2 video's and the dinner party example in 6.1.0.Beta3. Decision tables already work in 6.0.1.Final already too (but there's no example there). > > > > > -- > View this message in context: http://drools.46999.n3.nabble.com/Integrate-jBPM-with-OptaPlanner-tp4029384p4029398.html > Sent from the Drools: User forum mailing list archive at Nabble.com. > _______________________________________________ > rules-users mailing list > rules-users at lists.jboss.org > https://lists.jboss.org/mailman/listinfo/rules-users > From ge0ffrey.spam at gmail.com Fri May 2 05:09:25 2014 From: ge0ffrey.spam at gmail.com (Geoffrey De Smet) Date: Fri, 02 May 2014 11:09:25 +0200 Subject: [rules-users] OptaPlanner: Solver.isEveryProblemFactChangeProcessed() return true before the last fact change is processed In-Reply-To: <9DE81C3F-BF21-482C-9D97-DCA7FE54FEF0@gmail.com> References: <1398853036689-4029389.post@n3.nabble.com> <1398863254852-4029392.post@n3.nabble.com> <9DE81C3F-BF21-482C-9D97-DCA7FE54FEF0@gmail.com> Message-ID: Bug fixed: https://github.com/droolsjbpm/optaplanner/commit/4389730069327837fb375f3b1702911a1ee7e294 I went for a slightly different solution, to confine the logic as much as possible in the BasicPlumbingTermination class. Thanks for reporting :) On 01-05-14 10:36, Hagai Shatz wrote: > I'm working on a scheduling solution for traveling engineers. Similar to vehicle routing but with daily routes and more complex constrains (like dependencies between visits). > > > Thanks, > Hagai Shatz > > On 30 Apr 2014, at 20:31, Geoffrey De Smet wrote: > > >> On 30-04-14 15:07, Hagai wrote: >> I do use it from other threads in the following 2 scenarios: >> >> 1. In a thread that monitors a stream of messages with fact changes. Just >> before the thread add a new problem fact change to the solver, the code >> checks if the message is relevant by examining the current solution facts. >> But if there is a pending problem fact change in the queue, this evaluation >> cannot be done and a new problem fact change must be added (even if it will >> not do any change when processed). The idea is to minimize the situations >> where a message does not result in any change to facts and the solver >> restart itself to process the a fact change that does not change anything. >> >> 2. The solver produce many new solutions when starting and after fact >> changes. After some time, less new solutions are found. But when a new >> solution is found, some additional improvements are usually found shortly >> after. To reduce the amount of new best solutions produced by the >> application, a thread is scheduled to read/save/send the best solution after >> a short idle time (no new best solution for X ms). To make sure the best >> solution is valid, the code checks if every problem facts change processed. >> If there are still fact changes to process, the solver will produce another >> best solution shortly with the updated facts. > Thanks for the feedback: it's very helpful for me to know how it's used > better. > Out of interest: What kind of planning problem are you solving? > >> I hope this fix is simple to do so I can remove my workaround. > Yes, I'll fix the problem (I might go for an alternative on the > peek()'s) on Friday (holiday tomorrow with plans). > >> BTW, I'm looking forward to use the new demon mode (instead of a similar >> implementation outside of the solver). > Grab 6.1.0-SNAPSHOT if you can't wait. Or read the SNAPSHOT docs. > Feedback/concerns welcome. > >> >> >> -- >> View this message in context: http://drools.46999.n3.nabble.com/OptaPlanner-Solver-isEveryProblemFactChangeProcessed-return-true-before-the-last-fact-change-is-procd-tp4029389p4029392.html >> Sent from the Drools: User forum mailing list archive at Nabble.com. >> _______________________________________________ >> rules-users mailing list >> rules-users at lists.jboss.org >> https://lists.jboss.org/mailman/listinfo/rules-users > > _______________________________________________ > rules-users mailing list > rules-users at lists.jboss.org > https://lists.jboss.org/mailman/listinfo/rules-users > > _______________________________________________ > rules-users mailing list > rules-users at lists.jboss.org > https://lists.jboss.org/mailman/listinfo/rules-users > From dcrissma at redhat.com Fri May 2 09:50:58 2014 From: dcrissma at redhat.com (Dennis Crissman) Date: Fri, 02 May 2014 09:50:58 -0400 Subject: [rules-users] kie workbench unable to authenticate In-Reply-To: References: <53628E24.2010905@redhat.com> Message-ID: <5363A2C2.6020102@redhat.com> Valve is in place grep org.apache.catalina.valves.AccessLogValve conf/server.xml grep TOMCAT-JEE-SECURITY conf/web.xml -Dennis On 05/01/2014 02:20 PM, Michael Anstis wrote: > > The instructions immediately below your email state the configuration > uses Users defined in WEB-INF/classes/users.properties. > > You need to add the additional J2EE security configuration to web.xml > and the related Tomcat Valve definition to Tomcat (I forget exactly > where but think I've mentioned it before in other emails on this thread). > > Sent on the move > > On 1 May 2014 19:11, "Dennis Crissman" > wrote: > > I am using tomcat7 and followed the instructions below, so that I > now having a standing server. I cannot however log into that > server. No exceptions or errors are thrown or displayed. Any > suggestions? > > conf/tomcat-users.xml > ... > > > > > > > > > roles="manager-gui,admin-gui,admin-script"/> > > > > -------- Original Message -------- > Subject: Re: [rules-users] Problems deploying war > Date: Thu, 24 Apr 2014 16:45:17 +0100 > From: Michael Anstis > > Reply-To: Rules Users List > > To: Rules Users List > > > > > OK, repeated. > > 1) Downloaded Tomcat 7.0 from http://tomcat.apache.org/download-70.cgi > > 2) Downloaded Drools Workbench distribution from? > http://drools.jboss.org/downloads.html > > 3) Copied 3 required JARs to /lib > > 4) Changed Tomcat's Manager upload limit in > /webapps/manager/WEB-INF/web.xml > > 5) Started Tomcat > > 6) Browse to Manager application > > 7) Upload kie-drools-wb-distribution-wars-6.0.1.Final-tomcat7.0.war > > 8) Success. > > 9) Click on link in Tomcat's Manager and KIE Drools Workbench > launched successfully. > > 10) Logged in with user defined in > /webapps/kie-drools-wb-distribution-wars-6.0.1.Final-tomcat7.0/WEB-INF/classes/users.properties > > > > On 15 April 2014 14:57, Ven Tadipatri > wrote: > > I'm not sure what you mean by the J2ee security section. I > didn't see anything like that in the web.xml.? There didn't > appear to be > any code that was commented out. > > Thanks, > Ven > > > On 04/15/2014 08:40 AM, Michael Anstis wrote: >> If you're using 6.0 (as opposed to 6.1.0-SNAPSHOT) did you >> also uncomment the J2EE security section in the web.xml? >> >> >> On 15 April 2014 13:27, Ven Tadipatri >> > >> wrote: >> >> I've added the following libraries to the lib folder (I'm >> assuming you mean the Tomcat library, not the >> webapp-specific WEB-INF/lib folder ): >> -rwxr-xr-x 1 svc-tomcat svc-tomcat? ? 43519 Apr 14 08:38 >> javax.security.jacc-api-1.4.jar >> -rwxr-xr-x 1 svc-tomcat svc-tomcat? ? ? 6992 Apr 14 >> 08:38 kie-tomcat-integration-6.0.1.Final.jar >> -rwxr-xr-x 1 svc-tomcat svc-tomcat? ? 26084 Apr 14 08:38 >> slf4j-api-1.7.5.jar >> >> The following lines are in the server.xml: >> ? ? ? ? > unpackWARs="true" autoDeploy="true"> >> >> ? ? ? ? ? ? ? > className="org.apache.catalina.valves.AccessLogValve" >> directory="logs" >> ? ? ? ? ? ? ? ? ? ? ? ? ? ? >> prefix="localhost_access_log." suffix=".txt" >> ? ? ? ? ? ? ? ? ? ? ? ? ? ? pattern="%h %l %u %t >> "%r" %s %b" /> >> >> ? ? ? ? ? ? > className="org.kie.integration.tomcat.JACCValve" /> >> ? ? ? >> >> There doesn't seem to be any log output when the login >> fails. It just brings me back to the same url: >> http://localhost:8080/kie-drools-wb-distribution-wars-6.0.1.Final-tomcat7.0/org.kie.workbench.drools.KIEDroolsWebapp/j_security_check >> Any ideas? >> >> Thanks, >> Ven >> >> >> >> On 04/14/2014 11:50 AM, Michael Anstis wrote: >>> You'll need to add the additional libraries to /lib and >>> configure Catalina with the additional "Valve", as >>> described in previous emails. >>> >>> These configure Tomcat to use the tomcat-users.xml file. >>> >>> >>> On 14 April 2014 14:36, Ven Tadipatri >>> >> > wrote: >>> >>> You're right - I'm getting closer :) >>> Now, the >>> http://localhost:8080/kie-drools-wb-distribution-wars-6.0.1.Final-tomcat7.0/ >>> url comes up, but when I try to log in with the user >>> and password in my >>> tomcat-users.xml file, it doesn't log me in. >>> >>> I was able to bring up the main page both with the >>> binary distribution (which came up with a KIE IDE >>> logo) and the one I built with maven from sources >>> (which came up with a UF logo). The login page >>> looked identical except for the logo. >>> >>> This is what my tomcat-users.xml file looks like: >>> >>> ? >>> ? >> roles="analyst,admin"/> >>> ? >> roles="analyst,admin"/> >>> >>> (The password has been starred out in this e-mail) >>> The only change I made to the war was >>> ? mv >>> org.uberfire.security.auth.AuthenticationSource-TOMCAT-JEE-SECURITY >>> org.uberfire.security.auth.AuthenticationSource >>> >>> Is there something I have to do with the >>> login.config or realm.properties? >>> >>> Thanks, >>> Ven >>> >>> >>> On 04/14/2014 09:17 AM, Michael Anstis wrote: >>>> You're almost there by the look of it!!! >>>> >>>> I replied to your other questions about why the >>>> workbench is trying to access git.. you can disable >>>> this and then you shouldn't get the error you paste >>>> (I assume you can't access github.com >>>> from where you're trying to >>>> deploy). >>>> >>>> The JBoss AS7 WAR works "out of the box".. no need >>>> to configure anything extra, or download any WARs :) >>>> >>>> I would encourage you to delete .niogit folder in >>>> /bin when trying to deploy (if you had errors before). >>>> >>>> .niogit is where the workbench stores it's >>>> configuration and any downloaded git repositories. >>>> >>>> >>>> On 14 April 2014 14:14, Ven Tadipatri >>>> >>> > wrote: >>>> >>>> I'm not quite sure why it's so challenging to >>>> get the war deployed with Tomcat. Is it easier >>>> to deploy the war with Jboss? >>>> These are the exceptions I'm getting, even >>>> after adding "-Dorg.kie.demo=false" to the >>>> CATALINA_OPTS in catalina.sh >>>> I want to disable the access to remote git repos. >>>> >>>> INFO: Deploying web application archive >>>> /opt/tomcat/tomcat7/webapps/drools-workbench-6.0.1.Final-tomcat7.0.war >>>> 2014-04-14 09:04:23,985 [localhost-startStop-1] >>>> INFO? Found kmodule: >>>> jar:file:/opt/tomcat/tomcat7/webapps/drools-workbench-6.0.1.Final-tomcat7.0/WEB-INF/lib/drools-wb-rest-defaultapprover-6.0.1.Final.jar!/META-INF/kmodule.xml >>>> 2014-04-14 09:04:24,036 [localhost-startStop-1] >>>> INFO? KieModule was added:ZipKieModule[ >>>> ReleaseId=org.drools:drools-wb-rest-defaultapprover:6.0.1.Finalfile=/opt/tomcat/tomcat7/webapps/drools-workbench-6.0.1.Final-tomcat7.0/WEB-INF/lib/drools-wb-rest-defaultapprover-6.0.1.Final.jar] >>>> 2014-04-14 09:04:24,036 [localhost-startStop-1] >>>> INFO? Found kmodule: >>>> jar:file:/opt/tomcat/tomcat7/webapps/drools-workbench-6.0.1.Final-tomcat7.0/WEB-INF/lib/drools-wb-rest-defaultapprover-6.0.1.Final.jar!/META-INF/kmodule.xml >>>> 2014-04-14 09:04:24,039 [localhost-startStop-1] >>>> INFO? KieModule was added:ZipKieModule[ >>>> ReleaseId=org.drools:drools-wb-rest-defaultapprover:6.0.1.Finalfile=/opt/tomcat/tomcat7/webapps/drools-workbench-6.0.1.Final-tomcat7.0/WEB-INF/lib/drools-wb-rest-defaultapprover-6.0.1.Final.jar] >>>> 2014-04-14 09:07:36,460 [localhost-startStop-1] >>>> ERROR Failed to setup Repository 'uf-playground' >>>> >>>> java.lang.RuntimeException: >>>> https://github.com/guvnorngtestuser1/guvnorng-playground.git: >>>> cannot open git-upload-pack >>>> ? ? ? ? ? ? ? at >>>> org.uberfire.backend.server.repositories.git.GitRepositoryFactoryHelper.newRepository(GitRepositoryFactoryHelper.java:80)~[uberfire-backend-server-0.3.1.Final.jar:0.3.1.Final] >>>> ? ? ? ? ? ? ? at >>>> org.uberfire.backend.server.repositories.git.GitRepositoryFactoryHelper$Proxy$_$$_WeldClientProxy.newRepository(GitRepositoryFactoryHelper$Proxy$_$$_WeldClientProxy.java)~[uberfire-backend-server-0.3.1.Final.jar:0.3.1.Final] >>>> >>>> >>>> >>>> >>>> Thanks, >>>> Ven >>>> >>>> >>>> On 04/14/2014 08:57 AM, Michael Anstis wrote: >>>>> If apply the additional configuration you are >>>>> telling Tomcat to use Users defined in >>>>> /conf/tomcat-users.xml >>>>> >>>>> I modified the WAR by unzipping it, modifying >>>>> the relevant files and then zipping it back >>>>> into a WAR before deploying. >>>>> >>>>> >>>>> On 14 April 2014 13:53, Ven Tadipatri >>>>> >>>> > wrote: >>>>> >>>>> Hi Michael, >>>>> ? ? Unfortunately I can't seem to get the >>>>> 6.0.1 version up and running. I followed >>>>> the steps below, finding the 3 jars listed >>>>> below online. >>>>> But still, Tomcat just hangs for a bit, >>>>> then throws a bunch of severe warnings. >>>>> There don't seem to be any log messages >>>>> describing the problem. >>>>> Also, I'm a bit confused by the directions >>>>> - how can we modify the WEB-INF directory >>>>> before the war is deployed? And how do we >>>>> define users >>>>> in the login.config file? >>>>> >>>>> >>>>> Thanks, >>>>> Ven >>>>> >>>>> On 04/11/2014 10:49 AM, Michael Anstis wrote: >>>>>> Hi, >>>>>> >>>>>> There have been a few people with Tomcat >>>>>> deployment issues for kie-drools-wb, so I >>>>>> thought I'd give it a try. >>>>>> >>>>>> These are the steps I followed for >>>>>> *successful* deployment (most of which is >>>>>> already documented, but not obvious, in >>>>>> the WAR's README.txt file):- >>>>>> >>>>>> *6.0.1* >>>>>> * >>>>>> * >>>>>> Starting with a clean install of Tomcat 7. >>>>>> >>>>>> 1. Copy "kie-tomcat-integration" JAR into >>>>>> TOMCAT_HOME/lib >>>>>> (org.kie:kie-tomcat-integration) >>>>>> 2. Copy "JACC" JAR into TOMCAT_HOME/lib >>>>>> (javax.security.jacc:artifactId=javax.security.jacc-api >>>>>> in JBoss Maven Repository) >>>>>> 3. Copy "slf4j-api" JAR into >>>>>> TOMCAT_HOME/lib >>>>>> (org.slf4j:artifactId=slf4j-api in JBoss >>>>>> Maven Repository) >>>>>> 4. Add valve configuration into >>>>>> TOMCAT_HOME/conf/server.xml inside >>>>>> element as last valve definition: >>>>>> >>>>>> ? ? ? >>>>> className="org.kie.integration.tomcat.JACCValve" >>>>>> /> >>>>>> >>>>>> 5. Edit TOMCAT_HOME/conf/tomcat-users.xml >>>>>> to include roles and users, make sure >>>>>> there will be 'analyst' or 'admin' roles >>>>>> defined as it's required to be authorized >>>>>> to use kie-wb >>>>>> 6. Delete? >>>>>> org.uberfire.security.auth.AuthenticationSource? inside >>>>>> WEB-INF/classes/META-INF/services >>>>>> 7. Rename >>>>>> org.uberfire.security.auth.AuthenticationSource-TOMCAT-JEE-SECURITY >>>>>> to >>>>>> org.uberfire.security.auth.AuthenticationSource? >>>>>> inside WEB-INF/classes/META-INF/services >>>>>> 8. Increase Java's PermGen space by >>>>>> adding file? >>>>>> TOMCAT_HOME/bin/setenv.sh? containing? >>>>>> export JAVA_OPTS="-Xmx1024m >>>>>> -XX:MaxPermSize=256m" >>>>>> 9. Start Tomcat with >>>>>> TOMCAT_HOME/bin/startup.sh >>>>>> 10. Go to Management Console, >>>>>> http://localhost:8080/management >>>>>> 11. Deploy modified WAR >>>>>> >>>>>> If you do not complete these steps the >>>>>> WAR works "out of the box" but you'll >>>>>> need to define Users in? >>>>>> WEB-INF/classes/login.config >>>>>> >>>>>> *6.1.0-SNAPSHOT* >>>>>> * >>>>>> * >>>>>> Starting with a clean install of Tomcat 7. >>>>>> >>>>>> 1. Copy "kie-tomcat-integration" JAR into >>>>>> TOMCAT_HOME/lib >>>>>> (org.kie:kie-tomcat-integration) >>>>>> 2. Copy "JACC" JAR into TOMCAT_HOME/lib >>>>>> (javax.security.jacc:artifactId=javax.security.jacc-api >>>>>> in JBoss Maven Repository) >>>>>> 3. Copy "slf4j-api" JAR into >>>>>> TOMCAT_HOME/lib >>>>>> (org.slf4j:artifactId=slf4j-api in JBoss >>>>>> Maven Repository) >>>>>> 4. Add valve configuration into >>>>>> TOMCAT_HOME/conf/server.xml inside Host >>>>>> element as last valve definition: >>>>>> >>>>>> ? ? >>>>> className="org.kie.integration.tomcat.JACCValve" >>>>>> /> >>>>>> >>>>>> 5. Edit TOMCAT_HOME/conf/tomcat-users.xml >>>>>> to include roles and users, make sure >>>>>> there will be 'analyst' or 'admin' roles >>>>>> defined as it's required to be authorized >>>>>> to use kie-wb >>>>>> 6. Start Tomcat with? >>>>>> TOMCAT_HOME/bin/startup.sh >>>>>> 7. Go to Management Console,? >>>>>> http://localhost:8080/management >>>>>> 8. Deploy modified WAR >>>>>> >>>>>> With kind regards, >>>>>> >>>>>> Mike >>>>>> * >>>>>> * >>>>>> >>>>>> >>>>>> >>>>>> On 10 April 2014 19:25, Ven Tadipatri >>>>>> >>>>> > wrote: >>>>>> >>>>>> Hi, >>>>>> ? I'm trying to get set up with >>>>>> Drools and Guvnor.? I've had some >>>>>> success building a test program with >>>>>> Drools, but when I saw that there's a >>>>>> webapp >>>>>> to manage and view rules, I was >>>>>> interested in getting that working as >>>>>> well. Unfortunately I haven't had >>>>>> much success with that. >>>>>> ? I downloaded the >>>>>> kie-drools-wb-distribution-6.0.1.Final.zip >>>>>> file from the JBoss drools website >>>>>> and dropped the >>>>>> binaries/kie-drools-wb-distribution-wars-6.0.1.Final-tomcat7.0.war >>>>>> into my Tomcat directory.? Tomcat was >>>>>> just hanging for a while, then spit >>>>>> out a bunch of error messages: >>>>>> Apr 10, 2014 2:21:40 PM >>>>>> org.apache.catalina.core.StandardContext >>>>>> startInternal >>>>>> INFO: Deploying web application >>>>>> archive >>>>>> /opt/tomcat/tomcat7/webapps/kie-drools-wb-distribution-wars-6.0.1.Final-tomcat7.0.war >>>>>> Apr 10, 2014 2:21:40 PM >>>>>> org.apache.catalina.core.StandardContext >>>>>> startInternal >>>>>> SEVERE: Error listenerStart >>>>>> Apr 10, 2014 2:21:40 PM >>>>>> org.apache.catalina.core.StandardContext >>>>>> startInternal >>>>>> SEVERE: Context >>>>>> [/kie-drools-wb-distribution-wars-6.0.1.Final-tomcat7.0] >>>>>> startup failed due to previous errors >>>>>> Apr 10, 2014 2:21:40 PM >>>>>> org.apache.catalina.loader.WebappClassLoader >>>>>> clearReferencesThreads >>>>>> SEVERE: The web application >>>>>> [/kie-drools-wb-distribution-wars-6.0.1.Final-tomcat7.0] >>>>>> appears to have started a thread >>>>>> named [pool-4-thread-1] but has >>>>>> failed to stop it. This is very >>>>>> likely to create a memory leak. >>>>>> Apr 10, 2014 2:21:40 PM >>>>>> org.apache.catalina.loader.WebappClassLoader >>>>>> clearReferencesThreads >>>>>> SEVERE: The web application >>>>>> [/kie-drools-wb-distribution-wars-6.0.1.Final-tomcat7.0] >>>>>> appears to have started a thread >>>>>> named [Thread-3] but has failed to >>>>>> stop it. This is very likely to >>>>>> create a memory leak. >>>>>> Apr 10, 2014 2:21:40 PM >>>>>> org.apache.catalina.loader.WebappClassLoader >>>>>> clearReferencesThreads >>>>>> SEVERE: The web application >>>>>> [/kie-drools-wb-distribution-wars-6.0.1.Final-tomcat7.0] >>>>>> appears to have started a thread >>>>>> named [pool-7-thread-1] but has >>>>>> failed to stop it. This is very >>>>>> likely to create a memory leak. >>>>>> Apr 10, 2014 2:21:40 PM >>>>>> org.apache.catalina.loader.WebappClassLoader >>>>>> clearReferencesThreads >>>>>> SEVERE: The web application >>>>>> [/kie-drools-wb-distribution-wars-6.0.1.Final-tomcat7.0] >>>>>> appears to have started a thread >>>>>> named [Git-Daemon-Accept] but has >>>>>> failed to stop it. This is very >>>>>> likely to create a memory leak. >>>>>> Apr 10, 2014 2:21:40 PM >>>>>> org.apache.catalina.loader.WebappClassLoader >>>>>> checkThreadLocalMapForLeaks >>>>>> SEVERE: The web application >>>>>> [/kie-drools-wb-distribution-wars-6.0.1.Final-tomcat7.0] >>>>>> created a ThreadLocal with key of >>>>>> type >>>>>> [org.jboss.errai.config.util.ClassScanner$1] >>>>>> (value >>>>>> [org.jboss.errai.config.util.ClassScanner$1 at 1b3870a5]) >>>>>> and a value of type >>>>>> [java.lang.Boolean] (value [true]) >>>>>> but failed to remove it when the web >>>>>> application was stopped. Threads are >>>>>> going to be renewed over time to try >>>>>> and avoid a probable memory leak. >>>>>> Apr 10, 2014 2:21:40 PM >>>>>> org.apache.catalina.loader.WebappClassLoader >>>>>> checkThreadLocalMapForLeaks >>>>>> SEVERE: The web application >>>>>> [/kie-drools-wb-distribution-wars-6.0.1.Final-tomcat7.0] >>>>>> created a ThreadLocal with key of >>>>>> type >>>>>> [org.jboss.solder.servlet.beanManager.ServletContextAttributeProvider$1] >>>>>> (value >>>>>> [org.jboss.solder.servlet.beanManager.ServletContextAttributeProvider$1 at 166b6e99]) >>>>>> and a value of type >>>>>> [org.apache.catalina.core.ApplicationContextFacade] >>>>>> (value >>>>>> [org.apache.catalina.core.ApplicationContextFacade at 672a0a4e]) >>>>>> but failed to remove it when the web >>>>>> application was stopped. Threads are >>>>>> going to be renewed over time to try >>>>>> and avoid a probable memory leak. >>>>>> Apr 10, 2014 2:21:40 PM >>>>>> org.apache.catalina.loader.WebappClassLoader >>>>>> checkThreadLocalMapForLeaks >>>>>> SEVERE: The web application >>>>>> [/kie-drools-wb-distribution-wars-6.0.1.Final-tomcat7.0] >>>>>> created a ThreadLocal with key of >>>>>> type [org.eclipse.jgit.nls.NLS$1] >>>>>> (value >>>>>> [org.eclipse.jgit.nls.NLS$1 at 790abbcb]) and >>>>>> a value of type >>>>>> [org.eclipse.jgit.nls.NLS] (value >>>>>> [org.eclipse.jgit.nls.NLS at 2faf4a82]) >>>>>> but failed to remove it when the web >>>>>> application was stopped. Threads are >>>>>> going to be renewed over time to try >>>>>> and avoid a probable memory leak. >>>>>> >>>>>> ? Next I tried building the workbench >>>>>> from source: >>>>>> https://github.com/droolsjbpm/drools-wb/archive/6.0.1.Final.zip >>>>>> ? The maven build worked, and I >>>>>> dropped the tomcat war into the >>>>>> tomcat directory (removing any >>>>>> existing webapps and wars). Starting >>>>>> Tomcat now produced these errors: >>>>>> >>>>>> INFO: Deploying web application >>>>>> archive >>>>>> /opt/tomcat/tomcat7/webapps/drools-workbench-6.0.1.Final-tomcat7.0.war >>>>>> 2014-04-10 13:46:31,975 >>>>>> [localhost-startStop-1] >>>>>> >>>>>> ERROR Failed to setup Repository >>>>>> 'uf-playground' >>>>>> java.lang.RuntimeException: >>>>>> https://github.com/guvnorngtestuser1/guvnorng-playground.git: >>>>>> cannot open git-upload-pack >>>>>> >>>>>> What is the webapp trying to do with >>>>>> Git? Do I need to point it at some >>>>>> git repo? >>>>>> >>>>>> I tried the jboss instructions here: >>>>>> >>>>>> http://blog.athico.com/2013/05/how-to-build-and-run-drools-and-guvnor.html >>>>>> >>>>>> But that didn't work either, with >>>>>> Jboss just hanging as well.? Any >>>>>> clues on what might be going wrong? >>>>>> >>>>>> Thanks, >>>>>> Ven >>>>>> >>>>>> _______________________________________________ >>>>>> rules-users mailing list >>>>>> rules-users at lists.jboss.org >>>>>> >>>>>> https://lists.jboss.org/mailman/listinfo/rules-users >>>>>> >>>>>> >>>>> >>>>> >>>>> _______________________________________________ >>>>> rules-users mailing list >>>>> rules-users at lists.jboss.org >>>>> >>>>> https://lists.jboss.org/mailman/listinfo/rules-users >>>>> >>>>> >>>>> >>>>> >>>>> _______________________________________________ >>>>> rules-users mailing list >>>>> rules-users at lists.jboss.org >>>>> https://lists.jboss.org/mailman/listinfo/rules-users >>>> >>>> >>>> _______________________________________________ >>>> rules-users mailing list >>>> rules-users at lists.jboss.org >>>> >>>> https://lists.jboss.org/mailman/listinfo/rules-users >>>> >>>> >>>> >>>> >>>> _______________________________________________ >>>> rules-users mailing list >>>> rules-users at lists.jboss.org >>>> https://lists.jboss.org/mailman/listinfo/rules-users >>> >>> >>> _______________________________________________ >>> rules-users mailing list >>> rules-users at lists.jboss.org >>> >>> https://lists.jboss.org/mailman/listinfo/rules-users >>> >>> >>> >>> >>> _______________________________________________ >>> rules-users mailing list >>> rules-users at lists.jboss.org >>> https://lists.jboss.org/mailman/listinfo/rules-users >> >> >> _______________________________________________ >> rules-users mailing list >> rules-users at lists.jboss.org >> >> https://lists.jboss.org/mailman/listinfo/rules-users >> >> >> >> >> _______________________________________________ >> rules-users mailing list >> rules-users at lists.jboss.org >> https://lists.jboss.org/mailman/listinfo/rules-users > > > _______________________________________________ > rules-users mailing list > rules-users at lists.jboss.org > https://lists.jboss.org/mailman/listinfo/rules-users > > > > > > _______________________________________________ > rules-users mailing list > rules-users at lists.jboss.org > https://lists.jboss.org/mailman/listinfo/rules-users > -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.jboss.org/pipermail/rules-users/attachments/20140502/e00ebe89/attachment-0001.html From nkgxgongxi at gmail.com Fri May 2 11:06:01 2014 From: nkgxgongxi at gmail.com (nkgxgongxi) Date: Fri, 2 May 2014 08:06:01 -0700 (PDT) Subject: [rules-users] halting on sub-optimal solution Message-ID: <1399043161966-4029411.post@n3.nabble.com> Hi everyone, Could anyone help me by providing me some advice on how to make the searching more efficient? I wrote a program based on OptaPlanner to solve a scheduling problem, and I knew the expected optimal solution. My program runs well to keep finding better solution, however, when it comes to a solution which is really close to the optimal one, the program just halts there. I mean, it keeps searching, but can't reach the optimal even after 10hrs of running time. I am currently using tabu search and simulate Annealing to control the local search, and I have tried several different combinations of parameters, but there is no improvement found. I will appreciate your help. Regards, Gong -- View this message in context: http://drools.46999.n3.nabble.com/halting-on-sub-optimal-solution-tp4029411.html Sent from the Drools: User forum mailing list archive at Nabble.com. From dcrissma at redhat.com Fri May 2 11:29:25 2014 From: dcrissma at redhat.com (Dennis Crissman) Date: Fri, 02 May 2014 11:29:25 -0400 Subject: [rules-users] kie workbench unable to authenticate In-Reply-To: <5363A2C2.6020102@redhat.com> References: <53628E24.2010905@redhat.com> <5363A2C2.6020102@redhat.com> Message-ID: <5363B9D5.50901@redhat.com> I figured it out. Looks like the TOMCAT-JEE-SECURITY sections of the web.xml are not packaged in the download. They can be found in the below url. Just copy over those sections and it seems to work. https://github.com/droolsjbpm/kie-wb-distributions/blob/5255111cb52460e7c9da47c07ce84f4f0dc36055/kie-drools-wb/kie-drools-wb-distribution-wars/src/main/tomcat7/WEB-INF/web.xml -Dennis On 05/02/2014 09:50 AM, Dennis Crissman wrote: > Valve is in place > grep org.apache.catalina.valves.AccessLogValve conf/server.xml > directory="logs" > > > I do not see the a security section exists in the web.xml. Please tell > me what I am missing. > grep TOMCAT-JEE-SECURITY > webapps/kie-drools-wb-distribution-wars-6.0.1.Final-tomcat7.0/WEB-INF/web.xml > > > grep TOMCAT-JEE-SECURITY conf/web.xml > > > -Dennis > > On 05/01/2014 02:20 PM, Michael Anstis wrote: >> >> The instructions immediately below your email state the configuration >> uses Users defined in WEB-INF/classes/users.properties. >> >> You need to add the additional J2EE security configuration to web.xml >> and the related Tomcat Valve definition to Tomcat (I forget exactly >> where but think I've mentioned it before in other emails on this thread). >> >> Sent on the move >> >> On 1 May 2014 19:11, "Dennis Crissman" > > wrote: >> >> I am using tomcat7 and followed the instructions below, so that I >> now having a standing server. I cannot however log into that >> server. No exceptions or errors are thrown or displayed. Any >> suggestions? >> >> conf/tomcat-users.xml >> ... >> >> >> >> >> >> >> >> >> > roles="manager-gui,admin-gui,admin-script"/> >> >> >> >> -------- Original Message -------- >> Subject: Re: [rules-users] Problems deploying war >> Date: Thu, 24 Apr 2014 16:45:17 +0100 >> From: Michael Anstis >> >> Reply-To: Rules Users List >> >> To: Rules Users List >> >> >> >> >> OK, repeated. >> >> 1) Downloaded Tomcat 7.0 from >> http://tomcat.apache.org/download-70.cgi >> >> 2) Downloaded Drools Workbench distribution from? >> http://drools.jboss.org/downloads.html >> >> 3) Copied 3 required JARs to /lib >> >> 4) Changed Tomcat's Manager upload limit in >> /webapps/manager/WEB-INF/web.xml >> >> 5) Started Tomcat >> >> 6) Browse to Manager application >> >> 7) Upload kie-drools-wb-distribution-wars-6.0.1.Final-tomcat7.0.war >> >> 8) Success. >> >> 9) Click on link in Tomcat's Manager and KIE Drools Workbench >> launched successfully. >> >> 10) Logged in with user defined in >> /webapps/kie-drools-wb-distribution-wars-6.0.1.Final-tomcat7.0/WEB-INF/classes/users.properties >> >> >> >> On 15 April 2014 14:57, Ven Tadipatri > > wrote: >> >> I'm not sure what you mean by the J2ee security section. I >> didn't see anything like that in the web.xml.? There didn't >> appear to be >> any code that was commented out. >> >> Thanks, >> Ven >> >> >> On 04/15/2014 08:40 AM, Michael Anstis wrote: >>> If you're using 6.0 (as opposed to 6.1.0-SNAPSHOT) did you >>> also uncomment the J2EE security section in the web.xml? >>> >>> >>> On 15 April 2014 13:27, Ven Tadipatri >>> > >>> wrote: >>> >>> I've added the following libraries to the lib folder >>> (I'm assuming you mean the Tomcat library, not the >>> webapp-specific WEB-INF/lib folder ): >>> -rwxr-xr-x 1 svc-tomcat svc-tomcat? ? 43519 Apr 14 >>> 08:38 javax.security.jacc-api-1.4.jar >>> -rwxr-xr-x 1 svc-tomcat svc-tomcat? ? ? 6992 Apr 14 >>> 08:38 kie-tomcat-integration-6.0.1.Final.jar >>> -rwxr-xr-x 1 svc-tomcat svc-tomcat? ? 26084 Apr 14 >>> 08:38 slf4j-api-1.7.5.jar >>> >>> The following lines are in the server.xml: >>> ? ? ? ? >> unpackWARs="true" autoDeploy="true"> >>> >>> ? ? ? ? ? ? ? >> className="org.apache.catalina.valves.AccessLogValve" >>> directory="logs" >>> ? ? ? ? ? ? ? ? ? ? ? ? ? ? >>> prefix="localhost_access_log." suffix=".txt" >>> ? ? ? ? ? ? ? ? ? ? ? ? ? ? pattern="%h %l %u %t >>> "%r" %s %b" /> >>> >>> ? ? ? ? ? ? >> className="org.kie.integration.tomcat.JACCValve" /> >>> ? ? ? >>> >>> There doesn't seem to be any log output when the login >>> fails. It just brings me back to the same url: >>> http://localhost:8080/kie-drools-wb-distribution-wars-6.0.1.Final-tomcat7.0/org.kie.workbench.drools.KIEDroolsWebapp/j_security_check >>> Any ideas? >>> >>> Thanks, >>> Ven >>> >>> >>> >>> On 04/14/2014 11:50 AM, Michael Anstis wrote: >>>> You'll need to add the additional libraries to /lib and >>>> configure Catalina with the additional "Valve", as >>>> described in previous emails. >>>> >>>> These configure Tomcat to use the tomcat-users.xml file. >>>> >>>> >>>> On 14 April 2014 14:36, Ven Tadipatri >>>> >>> > wrote: >>>> >>>> You're right - I'm getting closer :) >>>> Now, the >>>> http://localhost:8080/kie-drools-wb-distribution-wars-6.0.1.Final-tomcat7.0/ >>>> url comes up, but when I try to log in with the >>>> user and password in my >>>> tomcat-users.xml file, it doesn't log me in. >>>> >>>> I was able to bring up the main page both with the >>>> binary distribution (which came up with a KIE IDE >>>> logo) and the one I built with maven from sources >>>> (which came up with a UF logo). The login page >>>> looked identical except for the logo. >>>> >>>> This is what my tomcat-users.xml file looks like: >>>> >>>> ? >>>> ? >>> roles="analyst,admin"/> >>>> ? >>> roles="analyst,admin"/> >>>> >>>> (The password has been starred out in this e-mail) >>>> The only change I made to the war was >>>> ? mv >>>> org.uberfire.security.auth.AuthenticationSource-TOMCAT-JEE-SECURITY >>>> org.uberfire.security.auth.AuthenticationSource >>>> >>>> Is there something I have to do with the >>>> login.config or realm.properties? >>>> >>>> Thanks, >>>> Ven >>>> >>>> >>>> On 04/14/2014 09:17 AM, Michael Anstis wrote: >>>>> You're almost there by the look of it!!! >>>>> >>>>> I replied to your other questions about why the >>>>> workbench is trying to access git.. you can >>>>> disable this and then you shouldn't get the error >>>>> you paste (I assume you can't access github.com >>>>> from where you're trying to >>>>> deploy). >>>>> >>>>> The JBoss AS7 WAR works "out of the box".. no need >>>>> to configure anything extra, or download any WARs :) >>>>> >>>>> I would encourage you to delete .niogit folder in >>>>> /bin when trying to deploy (if you had errors before). >>>>> >>>>> .niogit is where the workbench stores it's >>>>> configuration and any downloaded git repositories. >>>>> >>>>> >>>>> On 14 April 2014 14:14, Ven Tadipatri >>>>> >>>> > wrote: >>>>> >>>>> I'm not quite sure why it's so challenging to >>>>> get the war deployed with Tomcat. Is it easier >>>>> to deploy the war with Jboss? >>>>> These are the exceptions I'm getting, even >>>>> after adding "-Dorg.kie.demo=false" to the >>>>> CATALINA_OPTS in catalina.sh >>>>> I want to disable the access to remote git repos. >>>>> >>>>> INFO: Deploying web application archive >>>>> /opt/tomcat/tomcat7/webapps/drools-workbench-6.0.1.Final-tomcat7.0.war >>>>> 2014-04-14 09:04:23,985 >>>>> [localhost-startStop-1] INFO? Found kmodule: >>>>> jar:file:/opt/tomcat/tomcat7/webapps/drools-workbench-6.0.1.Final-tomcat7.0/WEB-INF/lib/drools-wb-rest-defaultapprover-6.0.1.Final.jar!/META-INF/kmodule.xml >>>>> 2014-04-14 09:04:24,036 >>>>> [localhost-startStop-1] INFO? KieModule was >>>>> added:ZipKieModule[ >>>>> ReleaseId=org.drools:drools-wb-rest-defaultapprover:6.0.1.Finalfile=/opt/tomcat/tomcat7/webapps/drools-workbench-6.0.1.Final-tomcat7.0/WEB-INF/lib/drools-wb-rest-defaultapprover-6.0.1.Final.jar] >>>>> 2014-04-14 09:04:24,036 >>>>> [localhost-startStop-1] INFO? Found kmodule: >>>>> jar:file:/opt/tomcat/tomcat7/webapps/drools-workbench-6.0.1.Final-tomcat7.0/WEB-INF/lib/drools-wb-rest-defaultapprover-6.0.1.Final.jar!/META-INF/kmodule.xml >>>>> 2014-04-14 09:04:24,039 >>>>> [localhost-startStop-1] INFO? KieModule was >>>>> added:ZipKieModule[ >>>>> ReleaseId=org.drools:drools-wb-rest-defaultapprover:6.0.1.Finalfile=/opt/tomcat/tomcat7/webapps/drools-workbench-6.0.1.Final-tomcat7.0/WEB-INF/lib/drools-wb-rest-defaultapprover-6.0.1.Final.jar] >>>>> 2014-04-14 09:07:36,460 >>>>> [localhost-startStop-1] ERROR Failed to setup >>>>> Repository 'uf-playground' >>>>> >>>>> java.lang.RuntimeException: >>>>> https://github.com/guvnorngtestuser1/guvnorng-playground.git: >>>>> cannot open git-upload-pack >>>>> ? ? ? ? ? ? ? at >>>>> org.uberfire.backend.server.repositories.git.GitRepositoryFactoryHelper.newRepository(GitRepositoryFactoryHelper.java:80)~[uberfire-backend-server-0.3.1.Final.jar:0.3.1.Final] >>>>> ? ? ? ? ? ? ? at >>>>> org.uberfire.backend.server.repositories.git.GitRepositoryFactoryHelper$Proxy$_$$_WeldClientProxy.newRepository(GitRepositoryFactoryHelper$Proxy$_$$_WeldClientProxy.java)~[uberfire-backend-server-0.3.1.Final.jar:0.3.1.Final] >>>>> >>>>> >>>>> >>>>> >>>>> Thanks, >>>>> Ven >>>>> >>>>> >>>>> On 04/14/2014 08:57 AM, Michael Anstis wrote: >>>>>> If apply the additional configuration you are >>>>>> telling Tomcat to use Users defined in >>>>>> /conf/tomcat-users.xml >>>>>> >>>>>> I modified the WAR by unzipping it, modifying >>>>>> the relevant files and then zipping it back >>>>>> into a WAR before deploying. >>>>>> >>>>>> >>>>>> On 14 April 2014 13:53, Ven Tadipatri >>>>>> >>>>> > wrote: >>>>>> >>>>>> Hi Michael, >>>>>> ? ? Unfortunately I can't seem to get the >>>>>> 6.0.1 version up and running. I followed >>>>>> the steps below, finding the 3 jars >>>>>> listed below online. >>>>>> But still, Tomcat just hangs for a bit, >>>>>> then throws a bunch of severe warnings. >>>>>> There don't seem to be any log messages >>>>>> describing the problem. >>>>>> Also, I'm a bit confused by the >>>>>> directions - how can we modify the >>>>>> WEB-INF directory before the war is >>>>>> deployed? And how do we define users >>>>>> in the login.config file? >>>>>> >>>>>> >>>>>> Thanks, >>>>>> Ven >>>>>> >>>>>> On 04/11/2014 10:49 AM, Michael Anstis wrote: >>>>>>> Hi, >>>>>>> >>>>>>> There have been a few people with Tomcat >>>>>>> deployment issues for kie-drools-wb, so >>>>>>> I thought I'd give it a try. >>>>>>> >>>>>>> These are the steps I followed for >>>>>>> *successful* deployment (most of which >>>>>>> is already documented, but not obvious, >>>>>>> in the WAR's README.txt file):- >>>>>>> >>>>>>> *6.0.1* >>>>>>> * >>>>>>> * >>>>>>> Starting with a clean install of Tomcat 7. >>>>>>> >>>>>>> 1. Copy "kie-tomcat-integration" JAR >>>>>>> into TOMCAT_HOME/lib >>>>>>> (org.kie:kie-tomcat-integration) >>>>>>> 2. Copy "JACC" JAR into TOMCAT_HOME/lib >>>>>>> (javax.security.jacc:artifactId=javax.security.jacc-api >>>>>>> in JBoss Maven Repository) >>>>>>> 3. Copy "slf4j-api" JAR into >>>>>>> TOMCAT_HOME/lib >>>>>>> (org.slf4j:artifactId=slf4j-api in JBoss >>>>>>> Maven Repository) >>>>>>> 4. Add valve configuration into >>>>>>> TOMCAT_HOME/conf/server.xml inside >>>>>>> element as last valve definition: >>>>>>> >>>>>>> ? ? ? >>>>>> className="org.kie.integration.tomcat.JACCValve" >>>>>>> /> >>>>>>> >>>>>>> 5. Edit >>>>>>> TOMCAT_HOME/conf/tomcat-users.xml to >>>>>>> include roles and users, make sure there >>>>>>> will be 'analyst' or 'admin' roles >>>>>>> defined as it's required to be >>>>>>> authorized to use kie-wb >>>>>>> 6. Delete? >>>>>>> org.uberfire.security.auth.AuthenticationSource? inside >>>>>>> WEB-INF/classes/META-INF/services >>>>>>> 7. Rename >>>>>>> org.uberfire.security.auth.AuthenticationSource-TOMCAT-JEE-SECURITY >>>>>>> to >>>>>>> org.uberfire.security.auth.AuthenticationSource? >>>>>>> inside WEB-INF/classes/META-INF/services >>>>>>> 8. Increase Java's PermGen space by >>>>>>> adding file? >>>>>>> TOMCAT_HOME/bin/setenv.sh? containing? >>>>>>> export JAVA_OPTS="-Xmx1024m >>>>>>> -XX:MaxPermSize=256m" >>>>>>> 9. Start Tomcat with >>>>>>> TOMCAT_HOME/bin/startup.sh >>>>>>> 10. Go to Management Console, >>>>>>> http://localhost:8080/management >>>>>>> 11. Deploy modified WAR >>>>>>> >>>>>>> If you do not complete these steps the >>>>>>> WAR works "out of the box" but you'll >>>>>>> need to define Users in? >>>>>>> WEB-INF/classes/login.config >>>>>>> >>>>>>> *6.1.0-SNAPSHOT* >>>>>>> * >>>>>>> * >>>>>>> Starting with a clean install of Tomcat 7. >>>>>>> >>>>>>> 1. Copy "kie-tomcat-integration" JAR >>>>>>> into TOMCAT_HOME/lib >>>>>>> (org.kie:kie-tomcat-integration) >>>>>>> 2. Copy "JACC" JAR into TOMCAT_HOME/lib >>>>>>> (javax.security.jacc:artifactId=javax.security.jacc-api >>>>>>> in JBoss Maven Repository) >>>>>>> 3. Copy "slf4j-api" JAR into >>>>>>> TOMCAT_HOME/lib >>>>>>> (org.slf4j:artifactId=slf4j-api in JBoss >>>>>>> Maven Repository) >>>>>>> 4. Add valve configuration into >>>>>>> TOMCAT_HOME/conf/server.xml inside Host >>>>>>> element as last valve definition: >>>>>>> >>>>>>> ? ? >>>>>> className="org.kie.integration.tomcat.JACCValve" >>>>>>> /> >>>>>>> >>>>>>> 5. Edit >>>>>>> TOMCAT_HOME/conf/tomcat-users.xml to >>>>>>> include roles and users, make sure there >>>>>>> will be 'analyst' or 'admin' roles >>>>>>> defined as it's required to be >>>>>>> authorized to use kie-wb >>>>>>> 6. Start Tomcat with? >>>>>>> TOMCAT_HOME/bin/startup.sh >>>>>>> 7. Go to Management Console,? >>>>>>> http://localhost:8080/management >>>>>>> 8. Deploy modified WAR >>>>>>> >>>>>>> With kind regards, >>>>>>> >>>>>>> Mike >>>>>>> * >>>>>>> * >>>>>>> >>>>>>> >>>>>>> >>>>>>> On 10 April 2014 19:25, Ven Tadipatri >>>>>>> >>>>>> > wrote: >>>>>>> >>>>>>> Hi, >>>>>>> ? I'm trying to get set up with >>>>>>> Drools and Guvnor.? I've had some >>>>>>> success building a test program with >>>>>>> Drools, but when I saw that there's >>>>>>> a webapp >>>>>>> to manage and view rules, I was >>>>>>> interested in getting that working >>>>>>> as well. Unfortunately I haven't had >>>>>>> much success with that. >>>>>>> ? I downloaded the >>>>>>> kie-drools-wb-distribution-6.0.1.Final.zip >>>>>>> file from the JBoss drools website >>>>>>> and dropped the >>>>>>> binaries/kie-drools-wb-distribution-wars-6.0.1.Final-tomcat7.0.war >>>>>>> into my Tomcat directory.? Tomcat >>>>>>> was just hanging for a while, then >>>>>>> spit out a bunch of error messages: >>>>>>> Apr 10, 2014 2:21:40 PM >>>>>>> org.apache.catalina.core.StandardContext >>>>>>> startInternal >>>>>>> INFO: Deploying web application >>>>>>> archive >>>>>>> /opt/tomcat/tomcat7/webapps/kie-drools-wb-distribution-wars-6.0.1.Final-tomcat7.0.war >>>>>>> Apr 10, 2014 2:21:40 PM >>>>>>> org.apache.catalina.core.StandardContext >>>>>>> startInternal >>>>>>> SEVERE: Error listenerStart >>>>>>> Apr 10, 2014 2:21:40 PM >>>>>>> org.apache.catalina.core.StandardContext >>>>>>> startInternal >>>>>>> SEVERE: Context >>>>>>> [/kie-drools-wb-distribution-wars-6.0.1.Final-tomcat7.0] >>>>>>> startup failed due to previous errors >>>>>>> Apr 10, 2014 2:21:40 PM >>>>>>> org.apache.catalina.loader.WebappClassLoader >>>>>>> clearReferencesThreads >>>>>>> SEVERE: The web application >>>>>>> [/kie-drools-wb-distribution-wars-6.0.1.Final-tomcat7.0] >>>>>>> appears to have started a thread >>>>>>> named [pool-4-thread-1] but has >>>>>>> failed to stop it. This is very >>>>>>> likely to create a memory leak. >>>>>>> Apr 10, 2014 2:21:40 PM >>>>>>> org.apache.catalina.loader.WebappClassLoader >>>>>>> clearReferencesThreads >>>>>>> SEVERE: The web application >>>>>>> [/kie-drools-wb-distribution-wars-6.0.1.Final-tomcat7.0] >>>>>>> appears to have started a thread >>>>>>> named [Thread-3] but has failed to >>>>>>> stop it. This is very likely to >>>>>>> create a memory leak. >>>>>>> Apr 10, 2014 2:21:40 PM >>>>>>> org.apache.catalina.loader.WebappClassLoader >>>>>>> clearReferencesThreads >>>>>>> SEVERE: The web application >>>>>>> [/kie-drools-wb-distribution-wars-6.0.1.Final-tomcat7.0] >>>>>>> appears to have started a thread >>>>>>> named [pool-7-thread-1] but has >>>>>>> failed to stop it. This is very >>>>>>> likely to create a memory leak. >>>>>>> Apr 10, 2014 2:21:40 PM >>>>>>> org.apache.catalina.loader.WebappClassLoader >>>>>>> clearReferencesThreads >>>>>>> SEVERE: The web application >>>>>>> [/kie-drools-wb-distribution-wars-6.0.1.Final-tomcat7.0] >>>>>>> appears to have started a thread >>>>>>> named [Git-Daemon-Accept] but has >>>>>>> failed to stop it. This is very >>>>>>> likely to create a memory leak. >>>>>>> Apr 10, 2014 2:21:40 PM >>>>>>> org.apache.catalina.loader.WebappClassLoader >>>>>>> checkThreadLocalMapForLeaks >>>>>>> SEVERE: The web application >>>>>>> [/kie-drools-wb-distribution-wars-6.0.1.Final-tomcat7.0] >>>>>>> created a ThreadLocal with key of >>>>>>> type >>>>>>> [org.jboss.errai.config.util.ClassScanner$1] >>>>>>> (value >>>>>>> [org.jboss.errai.config.util.ClassScanner$1 at 1b3870a5]) >>>>>>> and a value of type >>>>>>> [java.lang.Boolean] (value [true]) >>>>>>> but failed to remove it when the web >>>>>>> application was stopped. Threads are >>>>>>> going to be renewed over time to try >>>>>>> and avoid a probable memory leak. >>>>>>> Apr 10, 2014 2:21:40 PM >>>>>>> org.apache.catalina.loader.WebappClassLoader >>>>>>> checkThreadLocalMapForLeaks >>>>>>> SEVERE: The web application >>>>>>> [/kie-drools-wb-distribution-wars-6.0.1.Final-tomcat7.0] >>>>>>> created a ThreadLocal with key of >>>>>>> type >>>>>>> [org.jboss.solder.servlet.beanManager.ServletContextAttributeProvider$1] >>>>>>> (value >>>>>>> [org.jboss.solder.servlet.beanManager.ServletContextAttributeProvider$1 at 166b6e99]) >>>>>>> and a value of type >>>>>>> [org.apache.catalina.core.ApplicationContextFacade] >>>>>>> (value >>>>>>> [org.apache.catalina.core.ApplicationContextFacade at 672a0a4e]) >>>>>>> but failed to remove it when the web >>>>>>> application was stopped. Threads are >>>>>>> going to be renewed over time to try >>>>>>> and avoid a probable memory leak. >>>>>>> Apr 10, 2014 2:21:40 PM >>>>>>> org.apache.catalina.loader.WebappClassLoader >>>>>>> checkThreadLocalMapForLeaks >>>>>>> SEVERE: The web application >>>>>>> [/kie-drools-wb-distribution-wars-6.0.1.Final-tomcat7.0] >>>>>>> created a ThreadLocal with key of >>>>>>> type [org.eclipse.jgit.nls.NLS$1] >>>>>>> (value >>>>>>> [org.eclipse.jgit.nls.NLS$1 at 790abbcb]) >>>>>>> and a value of type >>>>>>> [org.eclipse.jgit.nls.NLS] (value >>>>>>> [org.eclipse.jgit.nls.NLS at 2faf4a82]) >>>>>>> but failed to remove it when the web >>>>>>> application was stopped. Threads are >>>>>>> going to be renewed over time to try >>>>>>> and avoid a probable memory leak. >>>>>>> >>>>>>> ? Next I tried building the >>>>>>> workbench from source: >>>>>>> https://github.com/droolsjbpm/drools-wb/archive/6.0.1.Final.zip >>>>>>> ? The maven build worked, and I >>>>>>> dropped the tomcat war into the >>>>>>> tomcat directory (removing any >>>>>>> existing webapps and wars). Starting >>>>>>> Tomcat now produced these errors: >>>>>>> >>>>>>> INFO: Deploying web application >>>>>>> archive >>>>>>> /opt/tomcat/tomcat7/webapps/drools-workbench-6.0.1.Final-tomcat7.0.war >>>>>>> 2014-04-10 13:46:31,975 >>>>>>> [localhost-startStop-1] >>>>>>> >>>>>>> ERROR Failed to setup Repository >>>>>>> 'uf-playground' >>>>>>> java.lang.RuntimeException: >>>>>>> https://github.com/guvnorngtestuser1/guvnorng-playground.git: >>>>>>> cannot open git-upload-pack >>>>>>> >>>>>>> What is the webapp trying to do with >>>>>>> Git? Do I need to point it at some >>>>>>> git repo? >>>>>>> >>>>>>> I tried the jboss instructions here: >>>>>>> >>>>>>> http://blog.athico.com/2013/05/how-to-build-and-run-drools-and-guvnor.html >>>>>>> >>>>>>> But that didn't work either, with >>>>>>> Jboss just hanging as well.? Any >>>>>>> clues on what might be going wrong? >>>>>>> >>>>>>> Thanks, >>>>>>> Ven >>>>>>> >>>>>>> _______________________________________________ >>>>>>> rules-users mailing list >>>>>>> rules-users at lists.jboss.org >>>>>>> >>>>>>> https://lists.jboss.org/mailman/listinfo/rules-users >>>>>>> >>>>>>> >>>>>> >>>>>> >>>>>> _______________________________________________ >>>>>> rules-users mailing list >>>>>> rules-users at lists.jboss.org >>>>>> >>>>>> https://lists.jboss.org/mailman/listinfo/rules-users >>>>>> >>>>>> >>>>>> >>>>>> >>>>>> _______________________________________________ >>>>>> rules-users mailing list >>>>>> rules-users at lists.jboss.org >>>>>> https://lists.jboss.org/mailman/listinfo/rules-users >>>>> >>>>> >>>>> _______________________________________________ >>>>> rules-users mailing list >>>>> rules-users at lists.jboss.org >>>>> >>>>> https://lists.jboss.org/mailman/listinfo/rules-users >>>>> >>>>> >>>>> >>>>> >>>>> _______________________________________________ >>>>> rules-users mailing list >>>>> rules-users at lists.jboss.org >>>>> https://lists.jboss.org/mailman/listinfo/rules-users >>>> >>>> >>>> _______________________________________________ >>>> rules-users mailing list >>>> rules-users at lists.jboss.org >>>> >>>> https://lists.jboss.org/mailman/listinfo/rules-users >>>> >>>> >>>> >>>> >>>> _______________________________________________ >>>> rules-users mailing list >>>> rules-users at lists.jboss.org >>>> https://lists.jboss.org/mailman/listinfo/rules-users >>> >>> >>> _______________________________________________ >>> rules-users mailing list >>> rules-users at lists.jboss.org >>> >>> https://lists.jboss.org/mailman/listinfo/rules-users >>> >>> >>> >>> >>> _______________________________________________ >>> rules-users mailing list >>> rules-users at lists.jboss.org >>> https://lists.jboss.org/mailman/listinfo/rules-users >> >> >> _______________________________________________ >> rules-users mailing list >> rules-users at lists.jboss.org >> https://lists.jboss.org/mailman/listinfo/rules-users >> >> >> >> >> >> _______________________________________________ >> rules-users mailing list >> rules-users at lists.jboss.org >> https://lists.jboss.org/mailman/listinfo/rules-users >> > > > > _______________________________________________ > rules-users mailing list > rules-users at lists.jboss.org > https://lists.jboss.org/mailman/listinfo/rules-users -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.jboss.org/pipermail/rules-users/attachments/20140502/0ee28965/attachment-0001.html From michael.anstis at gmail.com Fri May 2 11:48:18 2014 From: michael.anstis at gmail.com (Michael Anstis) Date: Fri, 2 May 2014 16:48:18 +0100 Subject: [rules-users] kie workbench unable to authenticate In-Reply-To: <5363B9D5.50901@redhat.com> References: <53628E24.2010905@redhat.com> <5363A2C2.6020102@redhat.com> <5363B9D5.50901@redhat.com> Message-ID: Thank-you Dennis for hunting it down. The "master" branch (6.1.0.Beta3) contain the J2EE entries for the Tomcat assembly (not commented out either). I hope our Users don't have the same trouble on going. Apologies for the problems you've had to contend with. On 2 May 2014 16:29, Dennis Crissman wrote: > I figured it out. Looks like the TOMCAT-JEE-SECURITY sections of the > web.xml are not packaged in the download. They can be found in the below > url. Just copy over those sections and it seems to work. > > > https://github.com/droolsjbpm/kie-wb-distributions/blob/5255111cb52460e7c9da47c07ce84f4f0dc36055/kie-drools-wb/kie-drools-wb-distribution-wars/src/main/tomcat7/WEB-INF/web.xml > > -Dennis > > On 05/02/2014 09:50 AM, Dennis Crissman wrote: > > Valve is in place > grep org.apache.catalina.valves.AccessLogValve conf/server.xml > directory="logs" > > > I do not see the a security section exists in the web.xml. Please tell me > what I am missing. > grep TOMCAT-JEE-SECURITY > webapps/kie-drools-wb-distribution-wars-6.0.1.Final-tomcat7.0/WEB-INF/web.xml > > > grep TOMCAT-JEE-SECURITY conf/web.xml > > > -Dennis > > On 05/01/2014 02:20 PM, Michael Anstis wrote: > > The instructions immediately below your email state the configuration uses > Users defined in WEB-INF/classes/users.properties. > > You need to add the additional J2EE security configuration to web.xml and > the related Tomcat Valve definition to Tomcat (I forget exactly where but > think I've mentioned it before in other emails on this thread). > > Sent on the move > On 1 May 2014 19:11, "Dennis Crissman" wrote: > >> I am using tomcat7 and followed the instructions below, so that I now >> having a standing server. I cannot however log into that server. No >> exceptions or errors are thrown or displayed. Any suggestions? >> >> conf/tomcat-users.xml >> ... >> >> >> >> >> >> >> >> >> > roles="manager-gui,admin-gui,admin-script"/> >> >> >> >> -------- Original Message -------- Subject: Re: [rules-users] Problems >> deploying war Date: Thu, 24 Apr 2014 16:45:17 +0100 From: Michael >> Anstis Reply-To: Rules >> Users List To: >> Rules Users List >> >> OK, repeated. >> >> 1) Downloaded Tomcat 7.0 from http://tomcat.apache.org/download-70.cgi >> >> 2) Downloaded Drools Workbench distribution from? >> http://drools.jboss.org/downloads.html >> >> 3) Copied 3 required JARs to /lib >> >> 4) Changed Tomcat's Manager upload limit in >> /webapps/manager/WEB-INF/web.xml >> >> 5) Started Tomcat >> >> 6) Browse to Manager application >> >> 7) Upload kie-drools-wb-distribution-wars-6.0.1.Final-tomcat7.0.war >> >> 8) Success. >> >> 9) Click on link in Tomcat's Manager and KIE Drools Workbench launched >> successfully. >> >> 10) Logged in with user defined in >> /webapps/kie-drools-wb-distribution-wars-6.0.1.Final-tomcat7.0/WEB-INF/classes/users.properties >> >> >> >> On 15 April 2014 14:57, Ven Tadipatri wrote: >> >>> I'm not sure what you mean by the J2ee security section. I didn't see >>> anything like that in the web.xml.? There didn't appear to be >>> any code that was commented out. >>> >>> Thanks, >>> Ven >>> >>> >>> On 04/15/2014 08:40 AM, Michael Anstis wrote: >>> >>> If you're using 6.0 (as opposed to 6.1.0-SNAPSHOT) did you also >>> uncomment the J2EE security section in the web.xml? >>> >>> >>> On 15 April 2014 13:27, Ven Tadipatri wrote: >>> >>>> I've added the following libraries to the lib folder (I'm assuming >>>> you mean the Tomcat library, not the webapp-specific WEB-INF/lib folder ): >>>> -rwxr-xr-x 1 svc-tomcat svc-tomcat? ? 43519 Apr 14 08:38 >>>> javax.security.jacc-api-1.4.jar >>>> -rwxr-xr-x 1 svc-tomcat svc-tomcat? ? ? 6992 Apr 14 08:38 >>>> kie-tomcat-integration-6.0.1.Final.jar >>>> -rwxr-xr-x 1 svc-tomcat svc-tomcat? ? 26084 Apr 14 08:38 >>>> slf4j-api-1.7.5.jar >>>> >>>> The following lines are in the server.xml: >>>> ? ? ? ? >>> unpackWARs="true" autoDeploy="true"> >>>> >>>> ? ? ? ? ? ? ? >>> className="org.apache.catalina.valves.AccessLogValve" directory="logs" >>>> ? ? ? ? ? ? ? ? ? ? ? ? ? ? prefix="localhost_access_log." >>>> suffix=".txt" >>>> ? ? ? ? ? ? ? ? ? ? ? ? ? ? pattern="%h %l %u %t "%r" %s %b" >>>> /> >>>> >>>> ? ? ? ? ? ? >>>> ? ? ? >>>> >>>> There doesn't seem to be any log output when the login fails. It just >>>> brings me back to the same url: >>>> >>>> http://localhost:8080/kie-drools-wb-distribution-wars-6.0.1.Final-tomcat7.0/org.kie.workbench.drools.KIEDroolsWebapp/j_security_check >>>> Any ideas? >>>> >>>> Thanks, >>>> Ven >>>> >>>> >>>> >>>> On 04/14/2014 11:50 AM, Michael Anstis wrote: >>>> >>>> You'll need to add the additional libraries to /lib and configure >>>> Catalina with the additional "Valve", as described in previous emails. >>>> >>>> These configure Tomcat to use the tomcat-users.xml file. >>>> >>>> >>>> On 14 April 2014 14:36, Ven Tadipatri wrote: >>>> >>>>> You're right - I'm getting closer :) >>>>> Now, the >>>>> http://localhost:8080/kie-drools-wb-distribution-wars-6.0.1.Final-tomcat7.0/url comes up, but when I try to log in with the user and password in my >>>>> tomcat-users.xml file, it doesn't log me in. >>>>> >>>>> I was able to bring up the main page both with the binary distribution >>>>> (which came up with a KIE IDE logo) and the one I built with maven from >>>>> sources >>>>> (which came up with a UF logo). The login page looked identical except >>>>> for the logo. >>>>> >>>>> This is what my tomcat-users.xml file looks like: >>>>> >>>>> ? >>>>> ? >>>>> ? >>>>> >>>>> (The password has been starred out in this e-mail) >>>>> The only change I made to the war was >>>>> ? mv >>>>> org.uberfire.security.auth.AuthenticationSource-TOMCAT-JEE-SECURITY >>>>> org.uberfire.security.auth.AuthenticationSource >>>>> >>>>> Is there something I have to do with the login.config or >>>>> realm.properties? >>>>> >>>>> Thanks, >>>>> Ven >>>>> >>>>> >>>>> On 04/14/2014 09:17 AM, Michael Anstis wrote: >>>>> >>>>> You're almost there by the look of it!!! >>>>> >>>>> I replied to your other questions about why the workbench is trying >>>>> to access git.. you can disable this and then you shouldn't get the error >>>>> you paste (I assume you can't access github.com from where you're >>>>> trying to deploy). >>>>> >>>>> The JBoss AS7 WAR works "out of the box".. no need to configure >>>>> anything extra, or download any WARs :) >>>>> >>>>> I would encourage you to delete .niogit folder in /bin when trying >>>>> to deploy (if you had errors before). >>>>> >>>>> .niogit is where the workbench stores it's configuration and any >>>>> downloaded git repositories. >>>>> >>>>> >>>>> On 14 April 2014 14:14, Ven Tadipatri wrote: >>>>> >>>>>> I'm not quite sure why it's so challenging to get the war deployed >>>>>> with Tomcat. Is it easier to deploy the war with Jboss? >>>>>> These are the exceptions I'm getting, even after adding >>>>>> "-Dorg.kie.demo=false" to the CATALINA_OPTS in catalina.sh >>>>>> I want to disable the access to remote git repos. >>>>>> >>>>>> INFO: Deploying web application archive >>>>>> /opt/tomcat/tomcat7/webapps/drools-workbench-6.0.1.Final-tomcat7.0.war >>>>>> 2014-04-14 09:04:23,985 [localhost-startStop-1] INFO? Found >>>>>> kmodule: >>>>>> jar:file:/opt/tomcat/tomcat7/webapps/drools-workbench-6.0.1.Final-tomcat7.0/WEB-INF/lib/drools-wb-rest-defaultapprover-6.0.1.Final.jar!/META-INF/kmodule.xml >>>>>> 2014-04-14 09:04:24,036 [localhost-startStop-1] INFO? KieModule was >>>>>> added:ZipKieModule[ >>>>>> ReleaseId=org.drools:drools-wb-rest-defaultapprover:6.0.1.Finalfile=/opt/tomcat/tomcat7/webapps/drools-workbench-6.0.1.Final-tomcat7.0/WEB-INF/lib/drools-wb-rest-defaultapprover-6.0.1.Final.jar] >>>>>> 2014-04-14 09:04:24,036 [localhost-startStop-1] INFO? Found kmodule: >>>>>> jar:file:/opt/tomcat/tomcat7/webapps/drools-workbench-6.0.1.Final-tomcat7.0/WEB-INF/lib/drools-wb-rest-defaultapprover-6.0.1.Final.jar!/META-INF/kmodule.xml >>>>>> 2014-04-14 09:04:24,039 [localhost-startStop-1] INFO? KieModule was >>>>>> added:ZipKieModule[ >>>>>> ReleaseId=org.drools:drools-wb-rest-defaultapprover:6.0.1.Finalfile=/opt/tomcat/tomcat7/webapps/drools-workbench-6.0.1.Final-tomcat7.0/WEB-INF/lib/drools-wb-rest-defaultapprover-6.0.1.Final.jar] >>>>>> 2014-04-14 09:07:36,460 [localhost-startStop-1] ERROR Failed to setup >>>>>> Repository 'uf-playground' >>>>>> >>>>>> java.lang.RuntimeException: >>>>>> https://github.com/guvnorngtestuser1/guvnorng-playground.git: cannot >>>>>> open git-upload-pack >>>>>> ? ? ? ? ? ? ? at >>>>>> org.uberfire.backend.server.repositories.git.GitRepositoryFactoryHelper.newRepository(GitRepositoryFactoryHelper.java:80)~[uberfire-backend-server-0.3.1.Final.jar:0.3.1.Final] >>>>>> ? ? ? ? ? ? ? at >>>>>> org.uberfire.backend.server.repositories.git.GitRepositoryFactoryHelper$Proxy$_$$_WeldClientProxy.newRepository(GitRepositoryFactoryHelper$Proxy$_$$_WeldClientProxy.java)~[uberfire-backend-server-0.3.1.Final.jar:0.3.1.Final] >>>>>> >>>>>> >>>>>> >>>>>> >>>>>> Thanks, >>>>>> Ven >>>>>> >>>>>> >>>>>> On 04/14/2014 08:57 AM, Michael Anstis wrote: >>>>>> >>>>>> If apply the additional configuration you are telling Tomcat to use >>>>>> Users defined in /conf/tomcat-users.xml >>>>>> >>>>>> I modified the WAR by unzipping it, modifying the relevant files >>>>>> and then zipping it back into a WAR before deploying. >>>>>> >>>>>> >>>>>> On 14 April 2014 13:53, Ven Tadipatri wrote: >>>>>> >>>>>>> Hi Michael, >>>>>>> ? ? Unfortunately I can't seem to get the 6.0.1 version up and >>>>>>> running. I followed the steps below, finding the 3 jars listed below online. >>>>>>> But still, Tomcat just hangs for a bit, then throws a bunch of >>>>>>> severe warnings. There don't seem to be any log messages describing the >>>>>>> problem. >>>>>>> Also, I'm a bit confused by the directions - how can we modify the >>>>>>> WEB-INF directory before the war is deployed? And how do we define users >>>>>>> in the login.config file? >>>>>>> >>>>>>> >>>>>>> Thanks, >>>>>>> Ven >>>>>>> >>>>>>> On 04/11/2014 10:49 AM, Michael Anstis wrote: >>>>>>> >>>>>>> Hi, >>>>>>> >>>>>>> There have been a few people with Tomcat deployment issues for >>>>>>> kie-drools-wb, so I thought I'd give it a try. >>>>>>> >>>>>>> These are the steps I followed for *successful* deployment (most >>>>>>> of which is already documented, but not obvious, in the WAR's README.txt >>>>>>> file):- >>>>>>> >>>>>>> *6.0.1* >>>>>>> >>>>>>> Starting with a clean install of Tomcat 7. >>>>>>> >>>>>>> 1. Copy "kie-tomcat-integration" JAR into TOMCAT_HOME/lib >>>>>>> (org.kie:kie-tomcat-integration) >>>>>>> 2. Copy "JACC" JAR into TOMCAT_HOME/lib(javax.security.jacc:artifactId=javax.security.jacc-api in JBoss Maven >>>>>>> Repository) >>>>>>> 3. Copy "slf4j-api" JAR into TOMCAT_HOME/lib(org.slf4j:artifactId=slf4j-api in JBoss Maven Repository) >>>>>>> 4. Add valve configuration into TOMCAT_HOME/conf/server.xml inside >>>>>>> element as last valve definition: >>>>>>> >>>>>>> ? ? ? >>>>>>> >>>>>>> 5. Edit TOMCAT_HOME/conf/tomcat-users.xml to include roles and >>>>>>> users, make sure there will be 'analyst' or 'admin' roles defined as it's >>>>>>> required to be authorized to use kie-wb >>>>>>> 6. Delete? org.uberfire.security.auth.AuthenticationSource? inside >>>>>>> WEB-INF/classes/META-INF/services >>>>>>> 7. Rename >>>>>>> org.uberfire.security.auth.AuthenticationSource-TOMCAT-JEE-SECURITYto >>>>>>> org.uberfire.security.auth.AuthenticationSource? inside >>>>>>> WEB-INF/classes/META-INF/services >>>>>>> 8. Increase Java's PermGen space by adding file? TOMCAT_HOME/bin/ >>>>>>> setenv.sh? containing? export JAVA_OPTS="-Xmx1024m >>>>>>> -XX:MaxPermSize=256m" >>>>>>> 9. Start Tomcat with TOMCAT_HOME/bin/startup.sh >>>>>>> 10. Go to Management Console, http://localhost:8080/management >>>>>>> 11. Deploy modified WAR >>>>>>> >>>>>>> If you do not complete these steps the WAR works "out of the box" >>>>>>> but you'll need to define Users in? WEB-INF/classes/login.config >>>>>>> >>>>>>> *6.1.0-SNAPSHOT* >>>>>>> >>>>>>> Starting with a clean install of Tomcat 7. >>>>>>> >>>>>>> 1. Copy "kie-tomcat-integration" JAR into TOMCAT_HOME/lib >>>>>>> (org.kie:kie-tomcat-integration) >>>>>>> 2. Copy "JACC" JAR into TOMCAT_HOME/lib >>>>>>> (javax.security.jacc:artifactId=javax.security.jacc-api in JBoss Maven >>>>>>> Repository) >>>>>>> 3. Copy "slf4j-api" JAR into TOMCAT_HOME/lib >>>>>>> (org.slf4j:artifactId=slf4j-api in JBoss Maven Repository) >>>>>>> 4. Add valve configuration into TOMCAT_HOME/conf/server.xml inside >>>>>>> Host element as last valve definition: >>>>>>> >>>>>>> ? ? >>>>>>> >>>>>>> 5. Edit TOMCAT_HOME/conf/tomcat-users.xml to include roles and >>>>>>> users, make sure there will be 'analyst' or 'admin' roles defined as it's >>>>>>> required to be authorized to use kie-wb >>>>>>> 6. Start Tomcat with? TOMCAT_HOME/bin/startup.sh >>>>>>> 7. Go to Management Console,? http://localhost:8080/management >>>>>>> 8. Deploy modified WAR >>>>>>> >>>>>>> With kind regards, >>>>>>> >>>>>>> Mike >>>>>>> >>>>>>> >>>>>>> >>>>>>> >>>>>>> On 10 April 2014 19:25, Ven Tadipatri wrote: >>>>>>> >>>>>>>> Hi, >>>>>>>> ? I'm trying to get set up with Drools and Guvnor.? I've had some >>>>>>>> success building a test program with Drools, but when I saw that there's a >>>>>>>> webapp >>>>>>>> to manage and view rules, I was interested in getting that working >>>>>>>> as well. Unfortunately I haven't had much success with that. >>>>>>>> ? I downloaded the kie-drools-wb-distribution-6.0.1.Final.zip file >>>>>>>> from the JBoss drools website and dropped the >>>>>>>> binaries/kie-drools-wb-distribution-wars-6.0.1.Final-tomcat7.0.war >>>>>>>> into my Tomcat directory.? Tomcat was just hanging for a while, >>>>>>>> then spit out a bunch of error messages: >>>>>>>> Apr 10, 2014 2:21:40 PM org.apache.catalina.core.StandardContext >>>>>>>> startInternal >>>>>>>> INFO: Deploying web application archive >>>>>>>> /opt/tomcat/tomcat7/webapps/kie-drools-wb-distribution-wars-6.0.1.Final-tomcat7.0.war >>>>>>>> Apr 10, 2014 2:21:40 PM org.apache.catalina.core.StandardContext >>>>>>>> startInternal >>>>>>>> SEVERE: Error listenerStart >>>>>>>> Apr 10, 2014 2:21:40 PM org.apache.catalina.core.StandardContext >>>>>>>> startInternal >>>>>>>> SEVERE: Context >>>>>>>> [/kie-drools-wb-distribution-wars-6.0.1.Final-tomcat7.0] startup failed due >>>>>>>> to previous errors >>>>>>>> Apr 10, 2014 2:21:40 PM >>>>>>>> org.apache.catalina.loader.WebappClassLoader clearReferencesThreads >>>>>>>> SEVERE: The web application >>>>>>>> [/kie-drools-wb-distribution-wars-6.0.1.Final-tomcat7.0] appears to have >>>>>>>> started a thread named [pool-4-thread-1] but has failed to stop it. This is >>>>>>>> very likely to create a memory leak. >>>>>>>> Apr 10, 2014 2:21:40 PM >>>>>>>> org.apache.catalina.loader.WebappClassLoader clearReferencesThreads >>>>>>>> SEVERE: The web application >>>>>>>> [/kie-drools-wb-distribution-wars-6.0.1.Final-tomcat7.0] appears to have >>>>>>>> started a thread named [Thread-3] but has failed to stop it. This is very >>>>>>>> likely to create a memory leak. >>>>>>>> Apr 10, 2014 2:21:40 PM >>>>>>>> org.apache.catalina.loader.WebappClassLoader clearReferencesThreads >>>>>>>> SEVERE: The web application >>>>>>>> [/kie-drools-wb-distribution-wars-6.0.1.Final-tomcat7.0] appears to have >>>>>>>> started a thread named [pool-7-thread-1] but has failed to stop it. This is >>>>>>>> very likely to create a memory leak. >>>>>>>> Apr 10, 2014 2:21:40 PM >>>>>>>> org.apache.catalina.loader.WebappClassLoader clearReferencesThreads >>>>>>>> SEVERE: The web application >>>>>>>> [/kie-drools-wb-distribution-wars-6.0.1.Final-tomcat7.0] appears to have >>>>>>>> started a thread named [Git-Daemon-Accept] but has failed to stop it. This >>>>>>>> is very likely to create a memory leak. >>>>>>>> Apr 10, 2014 2:21:40 PM >>>>>>>> org.apache.catalina.loader.WebappClassLoader checkThreadLocalMapForLeaks >>>>>>>> SEVERE: The web application >>>>>>>> [/kie-drools-wb-distribution-wars-6.0.1.Final-tomcat7.0] created a >>>>>>>> ThreadLocal with key of type [org.jboss.errai.config.util.ClassScanner$1] >>>>>>>> (value [org.jboss.errai.config.util.ClassScanner$1 at 1b3870a5]) and >>>>>>>> a value of type [java.lang.Boolean] (value [true]) but failed to remove it >>>>>>>> when the web application was stopped. Threads are going to be renewed over >>>>>>>> time to try and avoid a probable memory leak. >>>>>>>> Apr 10, 2014 2:21:40 PM >>>>>>>> org.apache.catalina.loader.WebappClassLoader checkThreadLocalMapForLeaks >>>>>>>> SEVERE: The web application >>>>>>>> [/kie-drools-wb-distribution-wars-6.0.1.Final-tomcat7.0] created a >>>>>>>> ThreadLocal with key of type >>>>>>>> [org.jboss.solder.servlet.beanManager.ServletContextAttributeProvider$1] >>>>>>>> (value >>>>>>>> [org.jboss.solder.servlet.beanManager.ServletContextAttributeProvider$1 at 166b6e99]) >>>>>>>> and a value of type [org.apache.catalina.core.ApplicationContextFacade] >>>>>>>> (value [org.apache.catalina.core.ApplicationContextFacade at 672a0a4e]) >>>>>>>> but failed to remove it when the web application was stopped. Threads are >>>>>>>> going to be renewed over time to try and avoid a probable memory leak. >>>>>>>> Apr 10, 2014 2:21:40 PM >>>>>>>> org.apache.catalina.loader.WebappClassLoader checkThreadLocalMapForLeaks >>>>>>>> SEVERE: The web application >>>>>>>> [/kie-drools-wb-distribution-wars-6.0.1.Final-tomcat7.0] created a >>>>>>>> ThreadLocal with key of type [org.eclipse.jgit.nls.NLS$1] (value >>>>>>>> [org.eclipse.jgit.nls.NLS$1 at 790abbcb]) and a value of type >>>>>>>> [org.eclipse.jgit.nls.NLS] (value [org.eclipse.jgit.nls.NLS at 2faf4a82]) >>>>>>>> but failed to remove it when the web application was stopped. Threads are >>>>>>>> going to be renewed over time to try and avoid a probable memory leak. >>>>>>>> >>>>>>>> ? Next I tried building the workbench from source: >>>>>>>> https://github.com/droolsjbpm/drools-wb/archive/6.0.1.Final.zip >>>>>>>> ? The maven build worked, and I dropped the tomcat war into the >>>>>>>> tomcat directory (removing any existing webapps and wars). Starting Tomcat >>>>>>>> now produced these errors: >>>>>>>> >>>>>>>> INFO: Deploying web application archive >>>>>>>> /opt/tomcat/tomcat7/webapps/drools-workbench-6.0.1.Final-tomcat7.0.war >>>>>>>> 2014-04-10 13:46:31,975 [localhost-startStop-1] >>>>>>>> >>>>>>>> ERROR Failed to setup Repository 'uf-playground' >>>>>>>> java.lang.RuntimeException: >>>>>>>> https://github.com/guvnorngtestuser1/guvnorng-playground.git: >>>>>>>> cannot open git-upload-pack >>>>>>>> >>>>>>>> What is the webapp trying to do with Git? Do I need to point it at >>>>>>>> some git repo? >>>>>>>> >>>>>>>> I tried the jboss instructions here: >>>>>>>> >>>>>>>> >>>>>>>> http://blog.athico.com/2013/05/how-to-build-and-run-drools-and-guvnor.html >>>>>>>> >>>>>>>> But that didn't work either, with Jboss just hanging as well.? Any >>>>>>>> clues on what might be going wrong? >>>>>>>> >>>>>>>> Thanks, >>>>>>>> Ven >>>>>>>> >>>>>>>> _______________________________________________ >>>>>>>> rules-users mailing list >>>>>>>> rules-users at lists.jboss.org >>>>>>>> https://lists.jboss.org/mailman/listinfo/rules-users >>>>>>>> >>>>>>> >>>>>>> >>>>>>> >>>>>>> _______________________________________________ >>>>>>> rules-users mailing list >>>>>>> rules-users at lists.jboss.org >>>>>>> https://lists.jboss.org/mailman/listinfo/rules-users >>>>>>> >>>>>> >>>>>> >>>>>> >>>>>> _______________________________________________ >>>>>> rules-users mailing listrules-users at lists.jboss.orghttps://lists.jboss.org/mailman/listinfo/rules-users >>>>>> >>>>>> >>>>>> >>>>>> _______________________________________________ >>>>>> rules-users mailing list >>>>>> rules-users at lists.jboss.org >>>>>> https://lists.jboss.org/mailman/listinfo/rules-users >>>>>> >>>>> >>>>> >>>>> >>>>> _______________________________________________ >>>>> rules-users mailing listrules-users at lists.jboss.orghttps://lists.jboss.org/mailman/listinfo/rules-users >>>>> >>>>> >>>>> >>>>> _______________________________________________ >>>>> rules-users mailing list >>>>> rules-users at lists.jboss.org >>>>> https://lists.jboss.org/mailman/listinfo/rules-users >>>>> >>>> >>>> >>>> >>>> _______________________________________________ >>>> rules-users mailing listrules-users at lists.jboss.orghttps://lists.jboss.org/mailman/listinfo/rules-users >>>> >>>> >>>> >>>> _______________________________________________ >>>> rules-users mailing list >>>> rules-users at lists.jboss.org >>>> https://lists.jboss.org/mailman/listinfo/rules-users >>>> >>> >>> >>> >>> _______________________________________________ >>> rules-users mailing listrules-users at lists.jboss.orghttps://lists.jboss.org/mailman/listinfo/rules-users >>> >>> >>> >>> _______________________________________________ >>> rules-users mailing list >>> rules-users at lists.jboss.org >>> https://lists.jboss.org/mailman/listinfo/rules-users >>> >> >> >> >> >> _______________________________________________ >> rules-users mailing list >> rules-users at lists.jboss.org >> https://lists.jboss.org/mailman/listinfo/rules-users >> > > > > _______________________________________________ > rules-users mailing listrules-users at lists.jboss.orghttps://lists.jboss.org/mailman/listinfo/rules-users > > > > _______________________________________________ > rules-users mailing list > rules-users at lists.jboss.org > https://lists.jboss.org/mailman/listinfo/rules-users > -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.jboss.org/pipermail/rules-users/attachments/20140502/7a43f344/attachment-0001.html From ge0ffrey.spam at gmail.com Fri May 2 12:01:18 2014 From: ge0ffrey.spam at gmail.com (Geoffrey De Smet) Date: Fri, 02 May 2014 18:01:18 +0200 Subject: [rules-users] halting on sub-optimal solution - OptaPlanner In-Reply-To: <1399043161966-4029411.post@n3.nabble.com> References: <1399043161966-4029411.post@n3.nabble.com> Message-ID: It might be stuck in a local optima, some things to check: A) Read the section "score trap" in the docs, to verify you don't have a score trap B) The default move types ( and ) aren't strong enough to escape local optima. B1) Try adding a . I am adding a pillarChangeMove for 6.1.0.Beta4, and probably also support for selecting subpillars. B2) Take a look at that suboptimal best solution and figure out what course-grained move it needs to do to escape the local optima. Then either creates a custom Move (see docs "MoveListFactory") B3) or compose the build-in ones with and mimicSelection. C) For very small datasets, tabu search's entity size can be too large (especially with subchain move selectors and pillar move selectors). Tabu ratio (see docs) is a way around that. D) If your dataset is really small, you can always just switch to brute force or the much faster branchAndBound (as of 6.1.0.Beta3). Note: neither scale to medium/big datasets. HTH On 02-05-14 17:06, nkgxgongxi wrote: > Hi everyone, > > Could anyone help me by providing me some advice on how to make the > searching more efficient? > > I wrote a program based on OptaPlanner to solve a scheduling problem, and I > knew the expected optimal solution. My program runs well to keep finding > better solution, however, when it comes to a solution which is really close > to the optimal one, the program just halts there. I mean, it keeps > searching, but can't reach the optimal even after 10hrs of running time. > > I am currently using tabu search and simulate Annealing to control the local > search, and I have tried several different combinations of parameters, but > there is no improvement found. > > I will appreciate your help. > > Regards, > Gong > > > > -- > View this message in context: http://drools.46999.n3.nabble.com/halting-on-sub-optimal-solution-tp4029411.html > Sent from the Drools: User forum mailing list archive at Nabble.com. > _______________________________________________ > rules-users mailing list > rules-users at lists.jboss.org > https://lists.jboss.org/mailman/listinfo/rules-users > From mailtosunny85 at gmail.com Fri May 2 12:17:24 2014 From: mailtosunny85 at gmail.com (Sunny Singh) Date: Fri, 2 May 2014 11:17:24 -0500 Subject: [rules-users] Using dynamic package names with Drools 6.0 Spring integration. Message-ID: Hello, I am trying to integrate Drools 6.0 with my application using Drools-Spring integration features. Issues faced: I need to define the knowledge bases in a spring context XML and make the package names to be dynamically passed into the knowledge bases using Spring Expression Language when the Spring container is created at the start-up. But, the package names are not being injected into the knowledge base when it is created by Drools framework. If I define the package names and hard-code them into the "packages" property of the kbase tag, it works. Could you please let me know if there is a way to make the package names being passed dynamically passed into the "packages" property of the kbase tag. This is because my client application would supply the packages names when the knowledge bases are setup and I am trying not to hard-code these. XML Configuration: Thanks! -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.jboss.org/pipermail/rules-users/attachments/20140502/e1e803ba/attachment.html From wtang at kana.com Sun May 4 16:43:48 2014 From: wtang at kana.com (wtang) Date: Sun, 4 May 2014 13:43:48 -0700 (PDT) Subject: [rules-users] Is property reactive bug in 5.5 fixed in 6.0 Message-ID: <1399236228376-4029419.post@n3.nabble.com> Hi, I am having issues with property reactive causing some rules not to get fired. Looks like someone also encountered this issue in 5.5 and it was agreed to be a bug. I am using 6.0 and was wondering if this bug is fixed. Here is the detail of the property reactive bug in 5.5: http://drools.46999.n3.nabble.com/same-criteria-across-multiple-rules-cancels-activation-with-Property-Reactive-Facts-td4021204.html#a4021208 thanks! Wing Tang -- View this message in context: http://drools.46999.n3.nabble.com/Is-property-reactive-bug-in-5-5-fixed-in-6-0-tp4029419.html Sent from the Drools: User forum mailing list archive at Nabble.com. From mproctor at codehaus.org Sun May 4 16:58:09 2014 From: mproctor at codehaus.org (Mark Proctor) Date: Sun, 4 May 2014 21:58:09 +0100 Subject: [rules-users] Is property reactive bug in 5.5 fixed in 6.0 In-Reply-To: <1399236228376-4029419.post@n3.nabble.com> References: <1399236228376-4029419.post@n3.nabble.com> Message-ID: <27499128-D3D9-48B0-A581-18C8DAA95E8E@codehaus.org> not aware of any property reactive bugs, make sure you try master to be sure: http://downloads.jboss.org/drools/release/snapshot/master/ Mark On 4 May 2014, at 21:43, wtang wrote: > Hi, > > I am having issues with property reactive causing some rules not to get > fired. Looks like someone also encountered this issue in 5.5 and it was > agreed to be a bug. I am using 6.0 and was wondering if this bug is fixed. > > Here is the detail of the property reactive bug in 5.5: > > http://drools.46999.n3.nabble.com/same-criteria-across-multiple-rules-cancels-activation-with-Property-Reactive-Facts-td4021204.html#a4021208 > > > thanks! Wing Tang > > > > -- > View this message in context: http://drools.46999.n3.nabble.com/Is-property-reactive-bug-in-5-5-fixed-in-6-0-tp4029419.html > Sent from the Drools: User forum mailing list archive at Nabble.com. > _______________________________________________ > rules-users mailing list > rules-users at lists.jboss.org > https://lists.jboss.org/mailman/listinfo/rules-users From wtang at kana.com Sun May 4 19:34:50 2014 From: wtang at kana.com (wtang) Date: Sun, 4 May 2014 16:34:50 -0700 (PDT) Subject: [rules-users] Is property reactive bug in 5.5 fixed in 6.0 In-Reply-To: <27499128-D3D9-48B0-A581-18C8DAA95E8E@codehaus.org> References: <1399236228376-4029419.post@n3.nabble.com> <27499128-D3D9-48B0-A581-18C8DAA95E8E@codehaus.org> Message-ID: <1399246490517-4029421.post@n3.nabble.com> if you please could click on the link on the original post, you will see it has Mark Proctor name on it and you were pushing for a fix in future release of 5.5. Please let me know if this bug have been fixed in 6.0. thx, Wing -- View this message in context: http://drools.46999.n3.nabble.com/Is-property-reactive-bug-in-5-5-fixed-in-6-0-tp4029419p4029421.html Sent from the Drools: User forum mailing list archive at Nabble.com. From mproctor at codehaus.org Sun May 4 20:01:15 2014 From: mproctor at codehaus.org (Mark Proctor) Date: Mon, 5 May 2014 01:01:15 +0100 Subject: [rules-users] Is property reactive bug in 5.5 fixed in 6.0 In-Reply-To: <1399246490517-4029421.post@n3.nabble.com> References: <1399236228376-4029419.post@n3.nabble.com> <27499128-D3D9-48B0-A581-18C8DAA95E8E@codehaus.org> <1399246490517-4029421.post@n3.nabble.com> Message-ID: We did a number of property reactive fixes for 5.6 and 6.0, but I do not know if the one in that mailing list entry was fixed, as they never submitted a unit test to us, as a pull request, as per: "I also wrote a page on how to submit unit tests and bug fixes: http://docs.jboss.org/drools/release/5.4.0.Final/droolsjbpm-introduction-docs/html/gettingstarted.html" Mark On 5 May 2014, at 00:34, wtang wrote: > if you please could click on the link on the original post, you will see it > has Mark Proctor name on it and you were pushing for a fix in future release > of 5.5. > > Please let me know if this bug have been fixed in 6.0. > > thx, Wing > > > > -- > View this message in context: http://drools.46999.n3.nabble.com/Is-property-reactive-bug-in-5-5-fixed-in-6-0-tp4029419p4029421.html > Sent from the Drools: User forum mailing list archive at Nabble.com. > _______________________________________________ > rules-users mailing list > rules-users at lists.jboss.org > https://lists.jboss.org/mailman/listinfo/rules-users -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.jboss.org/pipermail/rules-users/attachments/20140505/f8164acc/attachment.html From mproctor at codehaus.org Sun May 4 20:02:43 2014 From: mproctor at codehaus.org (Mark Proctor) Date: Mon, 5 May 2014 01:02:43 +0100 Subject: [rules-users] Using dynamic package names with Drools 6.0 Spring integration. In-Reply-To: References: Message-ID: <71719130-FFA1-4C4D-A345-5565BBEFE080@codehaus.org> I expect this is functionality that would have to be added to our spring implementation. An ideal task for someone wanting to contribute to the project: http://docs.jboss.org/drools/release/5.5.0.Final/droolsjbpm-introduction-docs/html/gettingstarted.html Mark On 2 May 2014, at 17:17, Sunny Singh wrote: > Hello, > > I am trying to integrate Drools 6.0 with my application using Drools-Spring integration features. > > Issues faced: > > I need to define the knowledge bases in a spring context XML and make the package names to be dynamically passed into the knowledge bases using Spring Expression Language when the Spring container is created at the start-up. But, the package names are not being injected into the knowledge base when it is created by Drools framework. > > If I define the package names and hard-code them into the "packages" property of the kbase tag, it works. > > Could you please let me know if there is a way to make the package names being passed dynamically passed into the "packages" property of the kbase tag. This is because my client application would supply the packages names when the knowledge bases are setup and I am trying not to hard-code these. > > XML Configuration: > > > > > > > > > > Thanks! > > _______________________________________________ > rules-users mailing list > rules-users at lists.jboss.org > https://lists.jboss.org/mailman/listinfo/rules-users -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.jboss.org/pipermail/rules-users/attachments/20140505/0dacf852/attachment.html From dsotty at gmail.com Sun May 4 21:20:05 2014 From: dsotty at gmail.com (Davide Sottara) Date: Sun, 04 May 2014 18:20:05 -0700 Subject: [rules-users] Is property reactive bug in 5.5 fixed in 6.0 In-Reply-To: <1399246490517-4029421.post@n3.nabble.com> References: <1399236228376-4029419.post@n3.nabble.com> <27499128-D3D9-48B0-A581-18C8DAA95E8E@codehaus.org> <1399246490517-4029421.post@n3.nabble.com> Message-ID: <5366E745.5060705@gmail.com> Bugs about @PR were reported and fixed in 5.6 and 6.x The fixes cover the bug described in the original thread. More issues related with @PR were fixed here: https://issues.jboss.org/browse/DROOLS-91?jql=project%20%3D%20DROOLS%20AND%20text%20~%20%22property%20reactive%22 If you have encountered a specific problem with one of your rules, please report it. Thanks Davide On 05/04/2014 04:34 PM, wtang wrote: > if you please could click on the link on the original post, you will see it > has Mark Proctor name on it and you were pushing for a fix in future release > of 5.5. > > Please let me know if this bug have been fixed in 6.0. > > thx, Wing > > > > -- > View this message in context: http://drools.46999.n3.nabble.com/Is-property-reactive-bug-in-5-5-fixed-in-6-0-tp4029419p4029421.html > Sent from the Drools: User forum mailing list archive at Nabble.com. > _______________________________________________ > rules-users mailing list > rules-users at lists.jboss.org > https://lists.jboss.org/mailman/listinfo/rules-users > From duncanlyon at gmail.com Mon May 5 08:18:23 2014 From: duncanlyon at gmail.com (SydneyTechHead) Date: Mon, 5 May 2014 05:18:23 -0700 (PDT) Subject: [rules-users] Drools causes switch(enum e) to break? In-Reply-To: <1399212311198-4029417.post@n3.nabble.com> References: <1397471489169-4029233.post@n3.nabble.com> <1399212311198-4029417.post@n3.nabble.com> Message-ID: <1399292303125-4029427.post@n3.nabble.com> I've reproduced this issue with a simple example: 1. Create a new "Drools Project" in Eclipse Kepler with Drools 6.0.1.Final installed (JDK 1.7) with simple "Hello World" rule example. Project builds OK. 2. Create the following new class: public class EnumTest { private enum EnumType { On, Off } private EnumType et = EnumType.On; public EnumTest() {} public String TypeText() { switch(et) { case On: return "On"; case Off: return "Off"; default: return ""; } } } 3. Rebuild project. Eclipse reports Problem: Drools Error: "Cannot switch on a value of type EnumTest.EnumType. Only convertible int values or enum variables are permitted" 4. Export Ant Build file for the project and run the Ant Build. Build successful. 5. Create a vanilla Java Project (no Drools) and add the same EnumTest class. Eclipse project builds OK. As the project builds OK via Ant, it appears that this is an issue with the Eclipse incremental builder conflicting with Drools 6. As noted in my previous post, it appears that Eclipse may be reducing JDK compiler compliance level down to 1.5 or referencing JRE 1.5 in class path as a result of this conflict, as I've occasionally noticed it changing these settings in project properties. Any ideas or clues why this may be the case and what is the best channel to report this Eclipse issue? -- View this message in context: http://drools.46999.n3.nabble.com/Drools-causes-switch-enum-e-to-break-tp4029233p4029427.html Sent from the Drools: User forum mailing list archive at Nabble.com. From roland.olsson at gmail.com Mon May 5 10:47:51 2014 From: roland.olsson at gmail.com (rt_olsson) Date: Mon, 5 May 2014 07:47:51 -0700 (PDT) Subject: [rules-users] How to set up KIE WB + Drools Camel Server 6.0.1 Message-ID: <1399301271096-4029428.post@n3.nabble.com> Hi. I'm currently in the process of setting up a Drools (6.0.1) environment from scratch. The web applications are deployed on Tomcat (7.0.52) and everything is using an MySQL (5.6.13) database. The goal is to have the KIE Workbench up and running, together with jBPM and Drools. We also want to communicate with Drools/jBPM via some kind of REST/SOAP service(s). I have cloned the Drools source code repositories and built the various binaries from there. This is what I've done: 1) Installed Tomcat 7.0.52 a) applied configuration for Bitronix TM and the local MySQL server (according to instructions in KIE WB README) 2) Deployed Drools Camel Server 6.0.1 (drools-camel-server-example-6.0.1.Final) a) added a dependency to kie-ci to the pom.xml file b) built and deployed to the local Tomcat server c) in WEB-INF/classes/knowledge-services.xml, changed the kie:kbase packages attribute to reference "com.acme.drools" d) restarted the webapp 3) Built and deployed KIE WB 6.0.1 (kie-wb-6.0.1.Final-tomcat7) to the local Tomcat server a) applied Tomcat specified configuration according to the README file b) restarted the webapp 4) In KIE WB: a) created a new repository b) created a new organizational unit and attached it to the new repository c) created a project d) in the project I created one guided decision table with one accompanying data model class, all this in the same package "com.acme.drools". The decision table matches the defined class and various attribute values combinations. If there is a match the rule's action is to set a new attribute of the object. e) built and deployed the project to the local Maven repository At this point I can't see any evidence in the logs that the Drools Camel server really picks up the newly created kjar. How do I know if it has? Should I expect it to load the jar? Do I maybe need to configure something more or differently to make the two apps work together? 5) Via the Drools Camel REST API, I then inserted a fact that should trigger the rule created and deployed in 4d+e. Unfortunately, it doesn't. Nothing happens. I can't get this to work. It is obviously something that I don't fully understand when it comes to the interaction between KIE WB and Drools. Does anyone out there have a small example of a working setup of KIE WB and Drools Camel Server __with__ integration of the two through Maven? Regards Roland -- View this message in context: http://drools.46999.n3.nabble.com/How-to-set-up-KIE-WB-Drools-Camel-Server-6-0-1-tp4029428.html Sent from the Drools: User forum mailing list archive at Nabble.com. From ch007m at gmail.com Mon May 5 14:45:53 2014 From: ch007m at gmail.com (Charles Moulliard) Date: Mon, 5 May 2014 20:45:53 +0200 Subject: [rules-users] How to set up KIE WB + Drools Camel Server 6.0.1 In-Reply-To: <1399301271096-4029428.post@n3.nabble.com> References: <1399301271096-4029428.post@n3.nabble.com> Message-ID: Could you share your project created (github repo) to let us to have a look and help you ? I have created a camel drools example (running in Apache Karaf - OSGI Container) but you should be able to deploy the project as a WAR in tomcat ( https://github.com/cmoulliard/droolsjbpm-osgi-examples/tree/master/spring-camel-decision-table ). On Mon, May 5, 2014 at 4:47 PM, rt_olsson wrote: > Hi. > > I'm currently in the process of setting up a Drools (6.0.1) environment > from > scratch. The web applications are deployed on Tomcat (7.0.52) and > everything > is using an MySQL (5.6.13) database. The goal is to have the KIE Workbench > up and running, together with jBPM and Drools. We also want to communicate > with Drools/jBPM via some kind of REST/SOAP service(s). > > I have cloned the Drools source code repositories and built the various > binaries from there. > > This is what I've done: > > 1) Installed Tomcat 7.0.52 > a) applied configuration for Bitronix TM and the local MySQL server > (according to instructions in KIE WB README) > 2) Deployed Drools Camel Server 6.0.1 > (drools-camel-server-example-6.0.1.Final) > a) added a dependency to kie-ci to the pom.xml file > b) built and deployed to the local Tomcat server > c) in WEB-INF/classes/knowledge-services.xml, changed the kie:kbase > packages attribute to reference "com.acme.drools" > d) restarted the webapp > 3) Built and deployed KIE WB 6.0.1 (kie-wb-6.0.1.Final-tomcat7) to the > local > Tomcat server > a) applied Tomcat specified configuration according to the README file > b) restarted the webapp > 4) In KIE WB: > a) created a new repository > b) created a new organizational unit and attached it to the new repository > c) created a project > d) in the project I created one guided decision table with one > accompanying > data model class, all this in the same package "com.acme.drools". The > decision table matches the defined class and various attribute values > combinations. If there is a match the rule's action is to set a new > attribute of the object. > e) built and deployed the project to the local Maven repository > > At this point I can't see any evidence in the logs that the Drools Camel > server really picks up the newly created kjar. How do I know if it has? > Should I expect it to load the jar? Do I maybe need to configure something > more or differently to make the two apps work together? > > 5) Via the Drools Camel REST API, I then inserted a fact that should > trigger > the rule created and deployed in 4d+e. Unfortunately, it doesn't. Nothing > happens. > > I can't get this to work. It is obviously something that I don't fully > understand when it comes to the interaction between KIE WB and Drools. > > Does anyone out there have a small example of a working setup of KIE WB and > Drools Camel Server __with__ integration of the two through Maven? > > Regards > Roland > > > > > > -- > View this message in context: > http://drools.46999.n3.nabble.com/How-to-set-up-KIE-WB-Drools-Camel-Server-6-0-1-tp4029428.html > Sent from the Drools: User forum mailing list archive at Nabble.com. > _______________________________________________ > rules-users mailing list > rules-users at lists.jboss.org > https://lists.jboss.org/mailman/listinfo/rules-users > -- Charles Moulliard Apache Committer / Architect @RedHat Twitter : @cmoulliard | Blog : http://cmoulliard.github.io -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.jboss.org/pipermail/rules-users/attachments/20140505/22d12ca7/attachment.html From duncanlyon at gmail.com Mon May 5 19:23:34 2014 From: duncanlyon at gmail.com (SydneyTechHead) Date: Mon, 5 May 2014 16:23:34 -0700 (PDT) Subject: [rules-users] Drools causes switch(enum e) to break? In-Reply-To: <1399292303125-4029427.post@n3.nabble.com> References: <1397471489169-4029233.post@n3.nabble.com> <1399212311198-4029417.post@n3.nabble.com> <1399292303125-4029427.post@n3.nabble.com> Message-ID: <1399332214613-4029430.post@n3.nabble.com> I've added this to a similarly reported issue with Eclipse and enums here: https://bugs.eclipse.org/bugs/show_bug.cgi?id=413368 However, note that the reported issue is happening with vanilla Java projects. I can compile OK in Eclipse with a standard project - I only have the issue when creating, or converting to, a Drools 6 project. Any clues as to why Drools may be triggering this issue, or any cached settings I may be able to delete to clean up Eclipse, from the smart folks here will be greatly appreciated. -- View this message in context: http://drools.46999.n3.nabble.com/Drools-causes-switch-enum-e-to-break-tp4029233p4029430.html Sent from the Drools: User forum mailing list archive at Nabble.com. From ashishna at gmail.com Mon May 5 19:32:33 2014 From: ashishna at gmail.com (Ashish Nayyar) Date: Tue, 6 May 2014 09:32:33 +1000 Subject: [rules-users] Rules not picked when packaged inside the JAR In-Reply-To: <1398750710805-4029378.post@n3.nabble.com> References: <1398750710805-4029378.post@n3.nabble.com> Message-ID: Can anyone help here please ? I am working on DROOLS 6.0.1 application. I have my rule files (*.drl) packaged inside a separate project which is included as a jar file as a maven dependency. When I deploy my project, KIEModule is not able to find the rules files (which are packaged inside the jar above). I am not getting an error though but rules are not getting fired. If I manually place the rules files under classpath say WEB-INF/rules/*.drl they are detected and rules are executed. I was under impression that KIEmodules are auto discovered from anywhere in classpath. Any pointers are appreciated. This is general question hence I have not included the comprehensive code files. Everything start working once I place the *.drl files in the classpath (take them outside of jar). I have opened the JIRA issue @ Link Thanks On Tue, Apr 29, 2014 at 3:51 PM, ash316 wrote: > I am working on DROOLS 6.0.1 application. I have my rule files (*.drl) > packaged inside a separate project which is included as a jar file as a > maven dependency. When I deploy my project, KIEModule is not able to find > the rules files (which are packaged inside the jar above). I am not getting > an error though but rules are not getting fired. If I manually place the > rules files under classpath say WEB-INF/rules/*.drl they are detected and > rules are executed. I was under impression that KIEmodules are auto > discovered from anywhere in classpath. Any pointers are appreciated. This > is general question hence I have not included the comprehensive code files. > Everything start working once I place the *.drl files in the classpath > (take them outside of jar). I have opened the JIRA issue @ LinkThanks > ------------------------------ > View this message in context: Rules not picked when packaged inside the > JAR > Sent from the Drools: User forum mailing list archiveat Nabble.com. > > _______________________________________________ > rules-users mailing list > rules-users at lists.jboss.org > https://lists.jboss.org/mailman/listinfo/rules-users > -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.jboss.org/pipermail/rules-users/attachments/20140506/b7437881/attachment.html From mproctor at codehaus.org Mon May 5 22:02:18 2014 From: mproctor at codehaus.org (Mark Proctor) Date: Tue, 6 May 2014 03:02:18 +0100 Subject: [rules-users] Rules not picked when packaged inside the JAR In-Reply-To: References: <1398750710805-4029378.post@n3.nabble.com> Message-ID: <12175C44-DBE9-4E36-B6E9-DA6E4D786B78@codehaus.org> This may be a container issue, which container are you using? It doesn?t locate resources via the classloader. Instead it locates the jar on the file system and scans the contents of the jar. The jar must have a kmodule.xml file inside of it to be recognised and it?s resources added. We know this works for normal jars. Inside of JBoss EAP you need to add the JBoss VFS jar (I think). We recently made weblogic work, and are currently investigating websphere. Mark On 6 May 2014, at 00:32, Ashish Nayyar wrote: > Can anyone help here please ? > > I am working on DROOLS 6.0.1 application. I have my rule files (*.drl) packaged inside a separate project which is included as a jar file as a maven dependency. When I deploy my project, KIEModule is not able to find the rules files (which are packaged inside the jar above). I am not getting an error though but rules are not getting fired. If I manually place the rules files under classpath say WEB-INF/rules/*.drl they are detected and rules are executed. I was under impression that KIEmodules are auto discovered from anywhere in classpath. Any pointers are appreciated. This is general question hence I have not included the comprehensive code files. Everything start working once I place the *.drl files in the classpath (take them outside of jar). I have opened the JIRA issue @ Link Thanks > > > On Tue, Apr 29, 2014 at 3:51 PM, ash316 wrote: > I am working on DROOLS 6.0.1 application. I have my rule files (*.drl) packaged inside a separate project which is included as a jar file as a maven dependency. When I deploy my project, KIEModule is not able to find the rules files (which are packaged inside the jar above). I am not getting an error though but rules are not getting fired. If I manually place the rules files under classpath say WEB-INF/rules/*.drl they are detected and rules are executed. I was under impression that KIEmodules are auto discovered from anywhere in classpath. Any pointers are appreciated. This is general question hence I have not included the comprehensive code files. Everything start working once I place the *.drl files in the classpath (take them outside of jar). I have opened the JIRA issue @ Link Thanks > View this message in context: Rules not picked when packaged inside the JAR > Sent from the Drools: User forum mailing list archive at Nabble.com. > > _______________________________________________ > rules-users mailing list > rules-users at lists.jboss.org > https://lists.jboss.org/mailman/listinfo/rules-users > > _______________________________________________ > rules-users mailing list > rules-users at lists.jboss.org > https://lists.jboss.org/mailman/listinfo/rules-users -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.jboss.org/pipermail/rules-users/attachments/20140506/321be30b/attachment-0001.html From ashishna at gmail.com Mon May 5 22:51:21 2014 From: ashishna at gmail.com (ash316) Date: Mon, 5 May 2014 19:51:21 -0700 (PDT) Subject: [rules-users] Rules not picked when packaged inside the JAR In-Reply-To: <12175C44-DBE9-4E36-B6E9-DA6E4D786B78@codehaus.org> References: <1398750710805-4029378.post@n3.nabble.com> <12175C44-DBE9-4E36-B6E9-DA6E4D786B78@codehaus.org> Message-ID: I am using JBOSS 6.1 EAP and my application also uses kie-spring 6.1-Beta On May 6, 2014 12:03 PM, "Mark Proctor [via Drools]" < ml-node+s46999n4029432h51 at n3.nabble.com> wrote: > This may be a container issue, which container are you using? > > It doesn?t locate resources via the classloader. Instead it locates the > jar on the file system and scans the contents of the jar. The jar must have > a kmodule.xml file inside of it to be recognised and it?s resources added. > > We know this works for normal jars. Inside of JBoss EAP you need to add > the JBoss VFS jar (I think). We recently made weblogic work, and are > currently investigating websphere. > > Mark > On 6 May 2014, at 00:32, Ashish Nayyar <[hidden email]> > wrote: > > Can anyone help here please ? > > I am working on DROOLS 6.0.1 application. I have my rule files (*.drl) > packaged inside a separate project which is included as a jar file as a > maven dependency. When I deploy my project, KIEModule is not able to find > the rules files (which are packaged inside the jar above). I am not getting > an error though but rules are not getting fired. If I manually place the > rules files under classpath say WEB-INF/rules/*.drl they are detected and > rules are executed. I was under impression that KIEmodules are auto > discovered from anywhere in classpath. Any pointers are appreciated. This > is general question hence I have not included the comprehensive code files. > Everything start working once I place the *.drl files in the classpath > (take them outside of jar). I have opened the JIRA issue @ Link > Thanks > > > On Tue, Apr 29, 2014 at 3:51 PM, ash316 <[hidden email] > > wrote: > >> I am working on DROOLS 6.0.1 application. I have my rule files (*.drl) >> packaged inside a separate project which is included as a jar file as a >> maven dependency. When I deploy my project, KIEModule is not able to find >> the rules files (which are packaged inside the jar above). I am not getting >> an error though but rules are not getting fired. If I manually place the >> rules files under classpath say WEB-INF/rules/*.drl they are detected and >> rules are executed. I was under impression that KIEmodules are auto >> discovered from anywhere in classpath. Any pointers are appreciated. This >> is general question hence I have not included the comprehensive code files. >> Everything start working once I place the *.drl files in the classpath >> (take them outside of jar). I have opened the JIRA issue @ LinkThanks >> ------------------------------ >> View this message in context: Rules not picked when packaged inside the >> JAR >> Sent from the Drools: User forum mailing list archiveat >> Nabble.com. >> >> _______________________________________________ >> rules-users mailing list >> [hidden email] >> https://lists.jboss.org/mailman/listinfo/rules-users >> > > _______________________________________________ > rules-users mailing list > [hidden email] > https://lists.jboss.org/mailman/listinfo/rules-users > > > > _______________________________________________ > rules-users mailing list > [hidden email] > https://lists.jboss.org/mailman/listinfo/rules-users > > ------------------------------ > If you reply to this email, your message will be added to the discussion > below: > > http://drools.46999.n3.nabble.com/Rules-not-picked-when-packaged-inside-the-JAR-tp4029378p4029432.html > To unsubscribe from Rules not picked when packaged inside the JAR, click > here > . > NAML > -- View this message in context: http://drools.46999.n3.nabble.com/Rules-not-picked-when-packaged-inside-the-JAR-tp4029378p4029433.html Sent from the Drools: User forum mailing list archive at Nabble.com. -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.jboss.org/pipermail/rules-users/attachments/20140505/e9d14016/attachment.html From hagai.shatz at gmail.com Tue May 6 10:17:59 2014 From: hagai.shatz at gmail.com (Hagai) Date: Tue, 6 May 2014 07:17:59 -0700 (PDT) Subject: [rules-users] NullPointerException when calling ScoreDirector.beforeEntityAdded with new Vehicle Message-ID: <1399385879348-4029434.post@n3.nabble.com> Using OptaPlanner 6.0.1.Final with problem like vehiclerouting. In vehiclerouting the Vehicle and Customer are both planning entities. They both implements the Standstill interface that is annotated with @PlanningEntity and their collections are annotated with @PlanningEntityCollectionProperty on the solution class. Flowing the code of VehicleRoutingPanel.insertLocationAndCustomer to insert a new Vehicle to the solution, my code is failing when the new Vehicle is reported to the score director: scoreDirector.beforeEntityAdded(newVehicle); The exception is NullPointerException at org.optaplanner.core.impl.domain.variable.listener.PlanningVariableListenerSupport.beforeEntityAdded(PlanningVariableListenerSupport.java:54) It looks like the PlanningVariableListenerSupport.entityVariableListenerMap does not have item for the Vehicle entity, there is only one item for the Customer entity in this map. I get the same problem when calling ScoreDirector.beforeEntityRemoved to remove a Vehicle. Is this a bug or do I need to handle Vehicle entities differently? -- View this message in context: http://drools.46999.n3.nabble.com/NullPointerException-when-calling-ScoreDirector-beforeEntityAdded-with-new-Vehicle-tp4029434.html Sent from the Drools: User forum mailing list archive at Nabble.com. From ganeshneelekani at gmail.com Tue May 6 10:33:06 2014 From: ganeshneelekani at gmail.com (ganeshneelekani) Date: Tue, 6 May 2014 07:33:06 -0700 (PDT) Subject: [rules-users] Starting resource change scanner and notifier in drools-server. In-Reply-To: <658E6A38563DE04EB725D002D485E70904AB3070@fizzback-sbs.Fizzback.local> References: <658E6A38563DE04EB725D002D485E70904AB3070@fizzback-sbs.Fizzback.local> Message-ID: <1399386786411-4029435.post@n3.nabble.com> Hi Can any one provide me sample code of using spring annotation and drools-guvnor involves using changeset.xml Thanks Ganesh Neelekani -- View this message in context: http://drools.46999.n3.nabble.com/Starting-resource-change-scanner-and-notifier-in-drools-server-tp1528921p4029435.html Sent from the Drools: User forum mailing list archive at Nabble.com. From ganeshneelekani at gmail.com Tue May 6 10:37:12 2014 From: ganeshneelekani at gmail.com (ganeshneelekani) Date: Tue, 6 May 2014 07:37:12 -0700 (PDT) Subject: [rules-users] Spring, KnowledgeAgent, and Guvnor In-Reply-To: <1321040111199-3500761.post@n3.nabble.com> References: <1321040111199-3500761.post@n3.nabble.com> Message-ID: <1399387032042-4029436.post@n3.nabble.com> Hi Can you please provide me sample code involves spring and drools Thanks Ganesh Neelekani -- View this message in context: http://drools.46999.n3.nabble.com/Spring-KnowledgeAgent-and-Guvnor-tp3500761p4029436.html Sent from the Drools: User forum mailing list archive at Nabble.com. From mproctor at codehaus.org Tue May 6 10:54:14 2014 From: mproctor at codehaus.org (Mark Proctor) Date: Tue, 6 May 2014 15:54:14 +0100 Subject: [rules-users] Rules not picked when packaged inside the JAR In-Reply-To: References: <1398750710805-4029378.post@n3.nabble.com> <12175C44-DBE9-4E36-B6E9-DA6E4D786B78@codehaus.org> Message-ID: Have you tried this without using spring? Would be good to know if the problem is with our spring implementation or not. Mark On 6 May 2014, at 03:51, ash316 wrote: > I am using JBOSS 6.1 EAP and my application also uses kie-spring 6.1-Beta > > On May 6, 2014 12:03 PM, "Mark Proctor [via Drools]" <[hidden email]> wrote: > This may be a container issue, which container are you using? > > It doesn?t locate resources via the classloader. Instead it locates the jar on the file system and scans the contents of the jar. The jar must have a kmodule.xml file inside of it to be recognised and it?s resources added. > > We know this works for normal jars. Inside of JBoss EAP you need to add the JBoss VFS jar (I think). We recently made weblogic work, and are currently investigating websphere. > > Mark > On 6 May 2014, at 00:32, Ashish Nayyar <[hidden email]> wrote: > >> Can anyone help here please ? >> >> I am working on DROOLS 6.0.1 application. I have my rule files (*.drl) packaged inside a separate project which is included as a jar file as a maven dependency. When I deploy my project, KIEModule is not able to find the rules files (which are packaged inside the jar above). I am not getting an error though but rules are not getting fired. If I manually place the rules files under classpath say WEB-INF/rules/*.drl they are detected and rules are executed. I was under impression that KIEmodules are auto discovered from anywhere in classpath. Any pointers are appreciated. This is general question hence I have not included the comprehensive code files. Everything start working once I place the *.drl files in the classpath (take them outside of jar). I have opened the JIRA issue @ Link Thanks >> >> >> On Tue, Apr 29, 2014 at 3:51 PM, ash316 <[hidden email]> wrote: >> I am working on DROOLS 6.0.1 application. I have my rule files (*.drl) packaged inside a separate project which is included as a jar file as a maven dependency. When I deploy my project, KIEModule is not able to find the rules files (which are packaged inside the jar above). I am not getting an error though but rules are not getting fired. If I manually place the rules files under classpath say WEB-INF/rules/*.drl they are detected and rules are executed. I was under impression that KIEmodules are auto discovered from anywhere in classpath. Any pointers are appreciated. This is general question hence I have not included the comprehensive code files. Everything start working once I place the *.drl files in the classpath (take them outside of jar). I have opened the JIRA issue @ Link Thanks >> View this message in context: Rules not picked when packaged inside the JAR >> Sent from the Drools: User forum mailing list archive at Nabble.com. >> >> _______________________________________________ >> rules-users mailing list >> [hidden email] >> https://lists.jboss.org/mailman/listinfo/rules-users > > _______________________________________________ > rules-users mailing list > [hidden email] > https://lists.jboss.org/mailman/listinfo/rules-users > > > _______________________________________________ > rules-users mailing list > [hidden email] > https://lists.jboss.org/mailman/listinfo/rules-users > > If you reply to this email, your message will be added to the discussion below: > http://drools.46999.n3.nabble.com/Rules-not-picked-when-packaged-inside-the-JAR-tp4029378p4029432.html > To unsubscribe from Rules not picked when packaged inside the JAR, click here. > NAML > > View this message in context: Re: [rules-users] Rules not picked when packaged inside the JAR > Sent from the Drools: User forum mailing list archive at Nabble.com. > _______________________________________________ > rules-users mailing list > rules-users at lists.jboss.org > https://lists.jboss.org/mailman/listinfo/rules-users -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.jboss.org/pipermail/rules-users/attachments/20140506/1be07199/attachment-0001.html From ganeshneelekani at gmail.com Tue May 6 10:57:08 2014 From: ganeshneelekani at gmail.com (ganeshneelekani) Date: Tue, 6 May 2014 07:57:08 -0700 (PDT) Subject: [rules-users] Requesting for sample spring+drools code Message-ID: <1399388228850-4029438.post@n3.nabble.com> Hi Team I am doing a project using spring and drools, Can any one provide me complete sample code which built using drools guvnor which takes changeset.xml and Spring. Thanks, Regards, Ganesh Neelekani -- View this message in context: http://drools.46999.n3.nabble.com/Requesting-for-sample-spring-drools-code-tp4029438.html Sent from the Drools: User forum mailing list archive at Nabble.com. From mproctor at codehaus.org Tue May 6 11:43:13 2014 From: mproctor at codehaus.org (Mark Proctor) Date: Tue, 6 May 2014 16:43:13 +0100 Subject: [rules-users] Requesting for sample spring+drools code In-Reply-To: <1399388228850-4029438.post@n3.nabble.com> References: <1399388228850-4029438.post@n3.nabble.com> Message-ID: I would recommend you move to 6.0, where changsets are no longer needed. 6.0 example spring/camel WAR: https://github.com/droolsjbpm/droolsjbpm-integration/tree/master/drools-camel-server-example Mark On 6 May 2014, at 15:57, ganeshneelekani wrote: > Hi Team > > I am doing a project using spring and drools, > Can any one provide me complete sample code which built using drools guvnor > which takes changeset.xml and Spring. > > > Thanks, > > Regards, > Ganesh Neelekani > > > > > -- > View this message in context: http://drools.46999.n3.nabble.com/Requesting-for-sample-spring-drools-code-tp4029438.html > Sent from the Drools: User forum mailing list archive at Nabble.com. > _______________________________________________ > rules-users mailing list > rules-users at lists.jboss.org > https://lists.jboss.org/mailman/listinfo/rules-users From ge0ffrey.spam at gmail.com Tue May 6 14:15:19 2014 From: ge0ffrey.spam at gmail.com (Geoffrey De Smet) Date: Tue, 06 May 2014 20:15:19 +0200 Subject: [rules-users] NullPointerException when calling ScoreDirector.beforeEntityAdded with new Vehicle In-Reply-To: <1399385879348-4029434.post@n3.nabble.com> References: <1399385879348-4029434.post@n3.nabble.com> Message-ID: <536926B7.6000706@gmail.com> Thanks for reporting. That's a terminology bug. The Vehicle isn't both an entity and not an entity... A) It's an entity because it has @PlanningVariable and a shadow variable. B) But it's also not an entity because it doesn't have any genuine variables, and therefore ScoreDirector throws that NPE... (which should be a better error message too). I 'll fix this for 6.1, probably by discarding B). Could you file a jira for this? https://issues.jboss.org/browse/PLANNER Workaround for 6.0.1: Presuming you're doing this in a ProblemFactChange, call scoreDirector.beforeProblemFactRemoved() instead of beforeEntityRemoved() => Treat it as a problem fact for that... but treat is as an entity for everything else. hth On 06-05-14 16:17, Hagai wrote: > Using OptaPlanner 6.0.1.Final with problem like vehiclerouting. > > In vehiclerouting the Vehicle and Customer are both planning entities. They > both implements the Standstill interface that is annotated with > @PlanningEntity and their collections are annotated with > @PlanningEntityCollectionProperty on the solution class. > > Flowing the code of VehicleRoutingPanel.insertLocationAndCustomer to insert > a new Vehicle to the solution, my code is failing when the new Vehicle is > reported to the score director: > scoreDirector.beforeEntityAdded(newVehicle); > > The exception is NullPointerException at > org.optaplanner.core.impl.domain.variable.listener.PlanningVariableListenerSupport.beforeEntityAdded(PlanningVariableListenerSupport.java:54) > > It looks like the PlanningVariableListenerSupport.entityVariableListenerMap > does not have item for the Vehicle entity, there is only one item for the > Customer entity in this map. > > I get the same problem when calling ScoreDirector.beforeEntityRemoved to > remove a Vehicle. > > Is this a bug or do I need to handle Vehicle entities differently? > > > > -- > View this message in context: http://drools.46999.n3.nabble.com/NullPointerException-when-calling-ScoreDirector-beforeEntityAdded-with-new-Vehicle-tp4029434.html > Sent from the Drools: User forum mailing list archive at Nabble.com. > _______________________________________________ > rules-users mailing list > rules-users at lists.jboss.org > https://lists.jboss.org/mailman/listinfo/rules-users > From bjorn.nord at databyran.se Tue May 6 15:29:45 2014 From: bjorn.nord at databyran.se (=?iso-8859-1?Q?Bj=F6rn_Nord?=) Date: Tue, 6 May 2014 19:29:45 +0000 Subject: [rules-users] Possibility to use variable reference in date comparison using coincides? Message-ID: <7F925E0D5694D44D9C305E627DC48FA827AEE62C@TRINITY.db.local> Hi, Is there a way to use a reference to a variable in the coincide-section like the one I have tried below with $expireWeeks? rule "Request expired analysis" dialect "mvel" when SettingForDefinition( definition == "DonationAnalysisRequest" , $code : setting, $expireWeeks : value) Donation( $donationDate : sampleDate) // $expireWeeks below does not work. not PerformedDonationAnalysis(code == $code, sampleDate coincides [$expireWeeks] $donationDate) then ... End Kindest regards, Bj?rn From ronak.patel at hp.com Tue May 6 15:55:26 2014 From: ronak.patel at hp.com (Patel, Ronak (Autonomy)) Date: Tue, 6 May 2014 19:55:26 +0000 Subject: [rules-users] NullPointerException when calling FactType.set and FactType.setFromMap Message-ID: <1B84B80A3500194EA7DFFE0EFF9C2CA647576236@G4W3206.americas.hpqcorp.net> Hello all, I'm getting a NullPointerException when calling org.kie.api.definition.type.FactType.set(Object, String, Object) and also when I call org.kie.api.definition.type.FactType.setFromMap(Object, Map). The exception stack trace points to the same line in both cases: Exception in thread "main" java.lang.NullPointerException at org.drools.core.factmodel.ClassDefinition.set(ClassDefinition.java:255) ... Doing some debugging, I found that the getFieldAccessor() call in org.drools.core.factmodel.ClassDefinition, line 255, is returning null, which is what's causing this. I didn't dig deeper than that, though. I created the data model in Drools Workbench 6.0.1 final and I've double-checked that the field I'm passing in to set a value exists on the object. Below is my code and it's throwing the NPE on the last line. I'm going to try to use standard Java reflection instead for now, but any assistance on this would be appreciated. I can provide any other code, the KieModule JAR produced by Workbench, or anything else, if needed. KieServices ks = KieServices.Factory.get(); KieContainer kContainer = ks.newKieContainer(ks.newReleaseId("com.hp.pa.sample", "realestate", "LATEST")); KieSession kSession = kContainer.newKieSession(); KieBase kBase = kSession.getKieBase(); FactType agentAssignmentType = kBase.getFactType("com.hp.pa.sample.realestate", "AgentAssignmentData"); FactType property4SaleType = kBase.getFactType("com.hp.pa.sample.realestate", "PropertyForSale"); if (agentAssignmentType == null || property4SaleType == null) System.err.println("Could not find a FactType"); Object agentAssignment = null; Object property4Sale = null; try { agentAssignment = agentAssignmentType.newInstance(); property4Sale = property4SaleType.newInstance(); } catch (InstantiationException e) { e.printStackTrace(); } catch (IllegalAccessException e) { e.printStackTrace(); } property4SaleType.set(property4Sale, "city", "San Diego"); Thank you, Ronak Patel Software Designer HP Autonomy -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.jboss.org/pipermail/rules-users/attachments/20140506/16c2cf9c/attachment-0001.html From michael.anstis at gmail.com Tue May 6 16:08:28 2014 From: michael.anstis at gmail.com (Michael Anstis) Date: Tue, 6 May 2014 21:08:28 +0100 Subject: [rules-users] NullPointerException when calling FactType.set and FactType.setFromMap In-Reply-To: <1B84B80A3500194EA7DFFE0EFF9C2CA647576236@G4W3206.americas.hpqcorp.net> References: <1B84B80A3500194EA7DFFE0EFF9C2CA647576236@G4W3206.americas.hpqcorp.net> Message-ID: Data Modeller generates Java classes in 6.x whereas we generated DRL Declarative Types before. The getFactType() API is for manipulating declared types. Java's standard Reflection API is for manipulating Java classes. Sent on the move On 6 May 2014 20:57, "Patel, Ronak (Autonomy)" wrote: > Hello all, > > > > I?m getting a NullPointerException when calling > org.kie.api.definition.type.FactType.set(Object, String, Object) and also > when I call org.kie.api.definition.type.FactType.setFromMap(Object, > Map). The exception stack trace points to the same line in > both cases: > > > > Exception in thread "main" *java.lang.NullPointerException* > > at org.drools.core.factmodel.ClassDefinition.set( > *ClassDefinition.java:255*) > > ... > > > > Doing some debugging, I found that the getFieldAccessor() call in > org.drools.core.factmodel.ClassDefinition, line 255, is returning null, > which is what?s causing this. I didn?t dig deeper than that, though. > > > > I created the data model in Drools Workbench 6.0.1 final and I?ve > double-checked that the field I?m passing in to set a value exists on the > object. Below is my code and it?s throwing the NPE on the last line. > > > > I?m going to try to use standard Java reflection instead for now, but any > assistance on this would be appreciated. I can provide any other code, the > KieModule JAR produced by Workbench, or anything else, if needed. > > > > KieServices ks = KieServices.Factory.*get*(); > > KieContainer kContainer = ks.newKieContainer(ks.newReleaseId( > "com.hp.pa.sample", "realestate", "LATEST")); > > KieSession kSession = kContainer.newKieSession(); > > KieBase kBase = kSession.getKieBase(); > > > > FactType agentAssignmentType = kBase.getFactType( > "com.hp.pa.sample.realestate", "AgentAssignmentData"); > > FactType property4SaleType = kBase.getFactType( > "com.hp.pa.sample.realestate", "PropertyForSale"); > > > > *if* (agentAssignmentType == *null* || property4SaleType == *null* > ) > > System.*err*.println("Could not find a FactType"); > > > > Object agentAssignment = *null*; > > Object property4Sale = *null*; > > *try* { > > agentAssignment = agentAssignmentType.newInstance(); > > property4Sale = property4SaleType.newInstance(); > > } *catch* (InstantiationException e) { > > e.printStackTrace(); > > } *catch* (IllegalAccessException e) { > > e.printStackTrace(); > > } > > > > property4SaleType.set(property4Sale, "city", "San Diego"); > > > > Thank you, > > > > > *Ronak Patel *Software Designer > HP Autonomy > > _______________________________________________ > rules-users mailing list > rules-users at lists.jboss.org > https://lists.jboss.org/mailman/listinfo/rules-users > -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.jboss.org/pipermail/rules-users/attachments/20140506/40eafa61/attachment.html From ronak.patel at hp.com Tue May 6 16:22:27 2014 From: ronak.patel at hp.com (Patel, Ronak (Autonomy)) Date: Tue, 6 May 2014 20:22:27 +0000 Subject: [rules-users] NullPointerException when calling FactType.set and FactType.setFromMap In-Reply-To: References: <1B84B80A3500194EA7DFFE0EFF9C2CA647576236@G4W3206.americas.hpqcorp.net>, Message-ID: Ah, OK, thanks for the clarification. I'll give the Java Reflection API a try with this in that case. On May 6, 2014, at 1:10 PM, "Michael Anstis" > wrote: Data Modeller generates Java classes in 6.x whereas we generated DRL Declarative Types before. The getFactType() API is for manipulating declared types. Java's standard Reflection API is for manipulating Java classes. Sent on the move On 6 May 2014 20:57, "Patel, Ronak (Autonomy)" > wrote: Hello all, I?m getting a NullPointerException when calling org.kie.api.definition.type.FactType.set(Object, String, Object) and also when I call org.kie.api.definition.type.FactType.setFromMap(Object, Map). The exception stack trace points to the same line in both cases: Exception in thread "main" java.lang.NullPointerException at org.drools.core.factmodel.ClassDefinition.set(ClassDefinition.java:255) ... Doing some debugging, I found that the getFieldAccessor() call in org.drools.core.factmodel.ClassDefinition, line 255, is returning null, which is what?s causing this. I didn?t dig deeper than that, though. I created the data model in Drools Workbench 6.0.1 final and I?ve double-checked that the field I?m passing in to set a value exists on the object. Below is my code and it?s throwing the NPE on the last line. I?m going to try to use standard Java reflection instead for now, but any assistance on this would be appreciated. I can provide any other code, the KieModule JAR produced by Workbench, or anything else, if needed. KieServices ks = KieServices.Factory.get(); KieContainer kContainer = ks.newKieContainer(ks.newReleaseId("com.hp.pa.sample", "realestate", "LATEST")); KieSession kSession = kContainer.newKieSession(); KieBase kBase = kSession.getKieBase(); FactType agentAssignmentType = kBase.getFactType("com.hp.pa.sample.realestate", "AgentAssignmentData"); FactType property4SaleType = kBase.getFactType("com.hp.pa.sample.realestate", "PropertyForSale"); if (agentAssignmentType == null || property4SaleType == null) System.err.println("Could not find a FactType"); Object agentAssignment = null; Object property4Sale = null; try { agentAssignment = agentAssignmentType.newInstance(); property4Sale = property4SaleType.newInstance(); } catch (InstantiationException e) { e.printStackTrace(); } catch (IllegalAccessException e) { e.printStackTrace(); } property4SaleType.set(property4Sale, "city", "San Diego"); Thank you, Ronak Patel Software Designer HP Autonomy _______________________________________________ rules-users mailing list rules-users at lists.jboss.org https://lists.jboss.org/mailman/listinfo/rules-users _______________________________________________ rules-users mailing list rules-users at lists.jboss.org https://lists.jboss.org/mailman/listinfo/rules-users From hagai.shatz at gmail.com Tue May 6 16:24:30 2014 From: hagai.shatz at gmail.com (Hagai) Date: Tue, 6 May 2014 13:24:30 -0700 (PDT) Subject: [rules-users] NullPointerException when calling ScoreDirector.beforeEntityAdded with new Vehicle In-Reply-To: <536926B7.6000706@gmail.com> References: <1399385879348-4029434.post@n3.nabble.com> <536926B7.6000706@gmail.com> Message-ID: <756855FA-C077-4552-90F0-CF2A4DCC98AF@gmail.com> Thanks for clarifying this, I totally agree that the Vehicle is a planning entity and it should be treated as such thought. I will be happy to open a JIRA for this. Can you point me to instructions or do/don?t do list so I will do it properly? Can you please clarify another thing regarding changes to entities in a ProblemFactChange code: When a fact is changed, you call ScoreDirector.beforeProblemFactChanged and ScoreDirector.afterProblemFactChange on the fact object, regardless of the change specifics. However, there is no such equivalent for entities. My understanding is that you have to call ScoreDirector.beforeVariableChanged and ScoreDirector.afterVariableChange for every change, even for changes to none-panning variables For example, when changing the Customer.demand or the Vehicle.capacity. It becomes tricky when you need to change none planning variables that take part in calculating the actual solution. For example, changing the TimeWindowedCustomer.readyTime might result in constraint violation that is not reflected in the score (arrive before ready time) until the code in ArrivalTimeUpdatingVariableListener is invoked. Can you please confirm or correct my understanding? Thanks, Hagai On 6 May 2014, at 19:16, ge0ffrey [via Drools] wrote: > Thanks for reporting. > > That's a terminology bug. > The Vehicle isn't both an entity and not an entity... > A) It's an entity because it has @PlanningVariable and a shadow variable. > B) But it's also not an entity because it doesn't have any genuine > variables, > and therefore ScoreDirector throws that NPE... (which should be a better > error message too). > I 'll fix this for 6.1, probably by discarding B). > > Could you file a jira for this? > https://issues.jboss.org/browse/PLANNER > > Workaround for 6.0.1: > Presuming you're doing this in a ProblemFactChange, > call scoreDirector.beforeProblemFactRemoved() instead of > beforeEntityRemoved() > => Treat it as a problem fact for that... but treat is as an entity > for everything else. > > hth > > On 06-05-14 16:17, Hagai wrote: > > > Using OptaPlanner 6.0.1.Final with problem like vehiclerouting. > > > > In vehiclerouting the Vehicle and Customer are both planning entities. They > > both implements the Standstill interface that is annotated with > > @PlanningEntity and their collections are annotated with > > @PlanningEntityCollectionProperty on the solution class. > > > > Flowing the code of VehicleRoutingPanel.insertLocationAndCustomer to insert > > a new Vehicle to the solution, my code is failing when the new Vehicle is > > reported to the score director: > > scoreDirector.beforeEntityAdded(newVehicle); > > > > The exception is NullPointerException at > > org.optaplanner.core.impl.domain.variable.listener.PlanningVariableListenerSupport.beforeEntityAdded(PlanningVariableListenerSupport.java:54) > > > > It looks like the PlanningVariableListenerSupport.entityVariableListenerMap > > does not have item for the Vehicle entity, there is only one item for the > > Customer entity in this map. > > > > I get the same problem when calling ScoreDirector.beforeEntityRemoved to > > remove a Vehicle. > > > > Is this a bug or do I need to handle Vehicle entities differently? > > > > > > > > -- > > View this message in context: http://drools.46999.n3.nabble.com/NullPointerException-when-calling-ScoreDirector-beforeEntityAdded-with-new-Vehicle-tp4029434.html > > Sent from the Drools: User forum mailing list archive at Nabble.com. > > _______________________________________________ > > rules-users mailing list > > [hidden email] > > https://lists.jboss.org/mailman/listinfo/rules-users > > > > _______________________________________________ > rules-users mailing list > [hidden email] > https://lists.jboss.org/mailman/listinfo/rules-users > > > If you reply to this email, your message will be added to the discussion below: > http://drools.46999.n3.nabble.com/NullPointerException-when-calling-ScoreDirector-beforeEntityAdded-with-new-Vehicle-tp4029434p4029440.html > To unsubscribe from NullPointerException when calling ScoreDirector.beforeEntityAdded with new Vehicle, click here. > NAML -- View this message in context: http://drools.46999.n3.nabble.com/NullPointerException-when-calling-ScoreDirector-beforeEntityAdded-with-new-Vehicle-tp4029434p4029444.html Sent from the Drools: User forum mailing list archive at Nabble.com. -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.jboss.org/pipermail/rules-users/attachments/20140506/fdb73ed7/attachment-0001.html From apykhtin at ebay.com Tue May 6 17:08:38 2014 From: apykhtin at ebay.com (Pykhtin, Alex) Date: Tue, 6 May 2014 21:08:38 +0000 Subject: [rules-users] KieScanner not working Message-ID: <78690DEA1EFE6D44902ACFECBEAC4BF41281BC6F@DEN-EXDDA-S22.corp.ebay.com> I'm trying to use KieScanner in 6.0.1.Final build and just can't make it work. Maybe it's actually an issue with my using of Maven. Here's my code: ReleaseId releaseId = ks.newReleaseId( "com.study", "project_jar", "0.0.1-SNAPSHOT" ); KieContainer kContainer = ks.newKieContainer( releaseId ); KieSession kSession = kContainer.newKieSession("ksession-rules_jar"); KieScanner kScanner = ks.newKieScanner( kContainer ); Where "com.study" is my fictional domain and "project_jar" is the jar of my project. It has dependency on "drools_jar" which is a kjar of version "0.0.1-SNAPSHOT" (same version for both jars, by the way). Later, I'm trying to test drools_jar updating by doing two things: 1. Rebuilding and deploying drools_jar to the local repository; 2. Calling kScanner.scanNow() And KieScanner is not picking up the changes. If I'm deploying drools_jar with the same "0.0.1-SNAPSHOT" version, nothing happens, until the next time I restart my project. If I'm deploying drools_jar with the new "0.0.2-SNAPSHOT" version, then it's not a correct dependency and KieScanner is not picking it up (as I expected). If I'm rebuilding project_jar with a new dependency on "0.0.2-SNAPSHOT" of drools_jar, KieScanner is not picking it up either, but restart helps (as I expected). What is the proper practice of using KieScanner? Thanks, Alex -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.jboss.org/pipermail/rules-users/attachments/20140506/e0d25197/attachment.html From mproctor at codehaus.org Tue May 6 17:57:30 2014 From: mproctor at codehaus.org (Mark Proctor) Date: Tue, 6 May 2014 22:57:30 +0100 Subject: [rules-users] KieScanner not working In-Reply-To: <78690DEA1EFE6D44902ACFECBEAC4BF41281BC6F@DEN-EXDDA-S22.corp.ebay.com> References: <78690DEA1EFE6D44902ACFECBEAC4BF41281BC6F@DEN-EXDDA-S22.corp.ebay.com> Message-ID: I believe the way it is at the moment, the head version must change for it to detect a change in the over all build. I don?t think it detects and updates transitively only. Mark On 6 May 2014, at 22:08, Pykhtin, Alex wrote: > I?m trying to use KieScanner in 6.0.1.Final build and just can?t make it work. Maybe it?s actually an issue with my using of Maven. > > Here?s my code: > > ReleaseId releaseId = ks.newReleaseId( "com.study", "project_jar", "0.0.1-SNAPSHOT" ); > KieContainer kContainer = ks.newKieContainer( releaseId ); > KieSession kSession = kContainer.newKieSession("ksession-rules_jar"); > KieScanner kScanner = ks.newKieScanner( kContainer ); > > Where ?com.study? is my fictional domain and ?project_jar? is the jar of my project. It has dependency on ?drools_jar? which is a kjar of version ?0.0.1-SNAPSHOT? (same version for both jars, by the way). > > Later, I?m trying to test drools_jar updating by doing two things: > > 1. Rebuilding and deploying drools_jar to the local repository; > 2. Calling kScanner.scanNow() > > And KieScanner is not picking up the changes. > If I?m deploying drools_jar with the same ?0.0.1-SNAPSHOT? version, nothing happens, until the next time I restart my project. > If I?m deploying drools_jar with the new ?0.0.2-SNAPSHOT? version, then it?s not a correct dependency and KieScanner is not picking it up (as I expected). > If I?m rebuilding project_jar with a new dependency on ?0.0.2-SNAPSHOT? of drools_jar, KieScanner is not picking it up either, but restart helps (as I expected). > > What is the proper practice of using KieScanner? > > Thanks, > Alex > _______________________________________________ > rules-users mailing list > rules-users at lists.jboss.org > https://lists.jboss.org/mailman/listinfo/rules-users -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.jboss.org/pipermail/rules-users/attachments/20140506/6ce94877/attachment.html From mproctor at codehaus.org Tue May 6 17:59:16 2014 From: mproctor at codehaus.org (Mark Proctor) Date: Tue, 6 May 2014 22:59:16 +0100 Subject: [rules-users] Possibility to use variable reference in date comparison using coincides? In-Reply-To: <7F925E0D5694D44D9C305E627DC48FA827AEE62C@TRINITY.db.local> References: <7F925E0D5694D44D9C305E627DC48FA827AEE62C@TRINITY.db.local> Message-ID: <4450ADB2-6944-452B-9049-87775897A224@codehaus.org> Not right now. Mark On 6 May 2014, at 20:29, Bj?rn Nord wrote: > Hi, > > Is there a way to use a reference to a variable in the coincide-section like the one I have tried below with $expireWeeks? > > > rule "Request expired analysis" > dialect "mvel" > when > SettingForDefinition( definition == "DonationAnalysisRequest" , $code : setting, $expireWeeks : value) > Donation( $donationDate : sampleDate) > // $expireWeeks below does not work. > not PerformedDonationAnalysis(code == $code, sampleDate coincides [$expireWeeks] $donationDate) > then > ... > End > > Kindest regards, > > Bj?rn > > _______________________________________________ > rules-users mailing list > rules-users at lists.jboss.org > https://lists.jboss.org/mailman/listinfo/rules-users From bjorn.nord at databyran.se Tue May 6 18:00:44 2014 From: bjorn.nord at databyran.se (=?iso-8859-1?Q?Bj=F6rn_Nord?=) Date: Tue, 6 May 2014 22:00:44 +0000 Subject: [rules-users] Possibility to use variable reference in date comparison using coincides? In-Reply-To: <4450ADB2-6944-452B-9049-87775897A224@codehaus.org> References: <7F925E0D5694D44D9C305E627DC48FA827AEE62C@TRINITY.db.local> <4450ADB2-6944-452B-9049-87775897A224@codehaus.org> Message-ID: <7F925E0D5694D44D9C305E627DC48FA827AEE699@TRINITY.db.local> OK, thanks. Med v?nlig h?lsning Bj?rn Nord?????????????? [mailto:bjorn.nord at databyran.se] Databyr?n AB????????? [http://www.databyran.se/] Box 23114 104 35 Stockholm??? Tel +46 8 50 65 64 00 ??????????????????????????? ? Fax +46?8 50 65 64 30 Databyr?n AB??r certifierad enligt ISO 9001:2008 T?nk p? milj?n innan du skriver ut detta e-postmeddelande -----Original Message----- From: Mark Proctor [mailto:mproctor at codehaus.org] Sent: den 6 maj 2014 23:59 To: Rules Users List Subject: Re: [rules-users] Possibility to use variable reference in date comparison using coincides? Not right now. Mark On 6 May 2014, at 20:29, Bj?rn Nord wrote: > Hi, > > Is there a way to use a reference to a variable in the coincide-section like the one I have tried below with $expireWeeks? > > > rule "Request expired analysis" > dialect "mvel" > when > SettingForDefinition( definition == "DonationAnalysisRequest" , $code : setting, $expireWeeks : value) > Donation( $donationDate : sampleDate) > // $expireWeeks below does not work. > not PerformedDonationAnalysis(code == $code, sampleDate coincides [$expireWeeks] $donationDate) > then > ... > End > > Kindest regards, > > Bj?rn > > _______________________________________________ > rules-users mailing list > rules-users at lists.jboss.org > https://lists.jboss.org/mailman/listinfo/rules-users _______________________________________________ rules-users mailing list rules-users at lists.jboss.org https://lists.jboss.org/mailman/listinfo/rules-users From newohybat at gmail.com Tue May 6 18:12:55 2014 From: newohybat at gmail.com (=?ISO-8859-2?Q?Jan_=A9=BBastn=FD?=) Date: Wed, 07 May 2014 00:12:55 +0200 Subject: [rules-users] Drools 6.0.0 activation-group + salience bug or feature? Message-ID: <53695E67.3090006@gmail.com> Hi, I came across in my view strange behaviour of rules defined with activation-group and salience. I use this combination to set the priority of exclusively fired rules "Democracy City Tiles Production" and "Basic City Tiles Production". Their definitions: rule "Democracy City Tiles Production" dialect "mvel" ruleflow-group "manageProductions" activation-group "cityProduction" salience 5 when PlayerDTO($owner:id, government=="democracy") $city:CityDTO( owner==$owner ,$cityId:id ,$managedTiles:managedTiles ) accumulate( TileDTO ( id memberOf $managedTiles ,$foodProd:foodProduction ,$resourcesProd:resourcesProduction ,$tradeProd:tradeProduction ) @watch(foodProduction,resourcesProduction,tradeProduction) ,$sumFood : sum($foodProd) ,$sumResources : sum($resourcesProd) ,$sumTrade : sum(($tradeProd<1)?$tradeProd:($tradeProd+1)) ) UpdateCityProduction(cityId==$cityId) then modify($city){ setFoodProduction($sumFood) ,setResourcesProduction($sumResources) ,setTradeProduction($sumTrade) } end and rule "Basic City Tiles Production" dialect "mvel" ruleflow-group "manageProductions" activation-group "cityProduction" when PlayerDTO($owner:id) $city:CityDTO( owner==$owner ,$cityId:id ,$managedTiles:managedTiles ) accumulate( TileDTO ( id memberOf $managedTiles ,$foodProd:foodProduction ,$resourcesProd:resourcesProduction ,$tradeProd:tradeProduction ) @watch(foodProduction,resourcesProduction,tradeProduction) ,$sumFood : sum($foodProd) ,$sumResources : sum($resourcesProd) ,$sumTrade : sum($tradeProd) ) UpdateCityProduction(cityId==$cityId) then modify($city){ setFoodProduction($sumFood) ,setResourcesProduction($sumResources) ,setTradeProduction($sumTrade) } end But problem occurs when two CityDTO objects are in the session. I would like to fire one rule for each CityDTO, but the activation-group cancels all the activations after first is fired. So only one activation in place of two fires. Here is the log: ==>[BeforeActivationFiredEvent: getActivation()=[[ Democracy City Tiles Production active=false ] [ [fact 0:12:36803987:36803987:12:DEFAULT:NON_TRAIT:UpdateCityProduction( cityId=5 )] [fact 0:16:2083264739:2083264739:16:null:NON_TRAIT:[Ljava.lang.Object;@7c2c18e3] [fact 0:11:792938926:966:11:DEFAULT:NON_TRAIT:CityDTO [id=5, name=marefy, cityCentre=null, owner=1, improvements=[], currentImprovement=null, enabledImprovements=[], homeUnits=[], currentUnit=null, enabledUnitTypes=[], tradeRoutes=[], managedTiles=[1, 2], size=5, weLoveDay=false, disorder=false, foodProduction=0, foodConsumption=0, foodSurplus=0, foodStock=0, resourcesProduction=0, resourcesConsumption=0, resourcesSurplus=null, tradeProduction=0, corruption=0, luxuriesAmount=0, luxuriesSpent=0, taxesAmount=0, researchAmount=0, peopleHappy=2, peopleUnhappy=1, peopleContent=1, peopleEntertainers=0, peopleTaxmen=1, peopleScientists=0, pollutionChance=0, improvementsUpkeep=0, unitsSupport=0]] [fact 0:9:1762763035:99463566:9:DEFAULT:NON_TRAIT:PlayerDTO [id=1, name=honza, government=democracy, enabledGovernments=null, currentAdvance=null, advances=null, enabledAdvances=null, treasury=0, research=0, researchSpent=null, turnsAvailable=null, luxuriesRatio=0, taxesRatio=0, researchRatio=0]] ] ], getKnowledgeRuntime()=org.drools.core.impl.StatefulKnowledgeSessionImpl at 6a5b07f2] ==>[ActivationCancelledEvent: getCause()=CLEAR, getActivation()=[[ Basic City Tiles Production active=false ] [ [fact 0:15:807492131:807492131:15:null:NON_TRAIT:[Ljava.lang.Object;@30215a23] [fact 0:11:792938926:966:11:DEFAULT:NON_TRAIT:CityDTO [id=5, name=marefy, cityCentre=null, owner=1, improvements=[], currentImprovement=null, enabledImprovements=[], homeUnits=[], currentUnit=null, enabledUnitTypes=[], tradeRoutes=[], managedTiles=[1, 2], size=5, weLoveDay=false, disorder=false, foodProduction=0, foodConsumption=0, foodSurplus=0, foodStock=0, resourcesProduction=0, resourcesConsumption=0, resourcesSurplus=null, tradeProduction=0, corruption=0, luxuriesAmount=0, luxuriesSpent=0, taxesAmount=0, researchAmount=0, peopleHappy=2, peopleUnhappy=1, peopleContent=1, peopleEntertainers=0, peopleTaxmen=1, peopleScientists=0, pollutionChance=0, improvementsUpkeep=0, unitsSupport=0]] [fact 0:12:36803987:36803987:12:DEFAULT:NON_TRAIT:UpdateCityProduction( cityId=5 )] ] ], getKnowledgeRuntime()=org.drools.core.impl.StatefulKnowledgeSessionImpl at 6a5b07f2] ==>[ActivationCancelledEvent: getCause()=CLEAR, getActivation()=[[ Basic City Tiles Production active=false ] [ [fact 0:23:833001332:833001332:23:null:NON_TRAIT:[Ljava.lang.Object;@31a69774] [fact 0:18:1816369501:968:18:DEFAULT:NON_TRAIT:CityDTO [id=7, name=Brno, cityCentre=null, owner=1, improvements=[], currentImprovement=null, enabledImprovements=[], homeUnits=[], currentUnit=null, enabledUnitTypes=[], tradeRoutes=[], managedTiles=[3, 4], size=1, weLoveDay=false, disorder=false, foodProduction=0, foodConsumption=0, foodSurplus=0, foodStock=0, resourcesProduction=0, resourcesConsumption=0, resourcesSurplus=null, tradeProduction=0, corruption=0, luxuriesAmount=0, luxuriesSpent=0, taxesAmount=0, researchAmount=0, peopleHappy=0, peopleUnhappy=0, peopleContent=1, peopleEntertainers=0, peopleTaxmen=0, peopleScientists=0, pollutionChance=0, improvementsUpkeep=0, unitsSupport=0]] [fact 0:20:1314789527:1314789527:20:DEFAULT:NON_TRAIT:UpdateCityProduction( cityId=7 )] ] ], getKnowledgeRuntime()=org.drools.core.impl.StatefulKnowledgeSessionImpl at 6a5b07f2] ==>[ActivationCancelledEvent: getCause()=CLEAR, getActivation()=[[ Democracy City Tiles Production active=false ] [ [fact 0:20:1314789527:1314789527:20:DEFAULT:NON_TRAIT:UpdateCityProduction( cityId=7 )] [fact 0:19:1857434733:1857434733:19:null:NON_TRAIT:[Ljava.lang.Object;@6eb6346d] [fact 0:18:1816369501:968:18:DEFAULT:NON_TRAIT:CityDTO [id=7, name=Brno, cityCentre=null, owner=1, improvements=[], currentImprovement=null, enabledImprovements=[], homeUnits=[], currentUnit=null, enabledUnitTypes=[], tradeRoutes=[], managedTiles=[3, 4], size=1, weLoveDay=false, disorder=false, foodProduction=0, foodConsumption=0, foodSurplus=0, foodStock=0, resourcesProduction=0, resourcesConsumption=0, resourcesSurplus=null, tradeProduction=0, corruption=0, luxuriesAmount=0, luxuriesSpent=0, taxesAmount=0, researchAmount=0, peopleHappy=0, peopleUnhappy=0, peopleContent=1, peopleEntertainers=0, peopleTaxmen=0, peopleScientists=0, pollutionChance=0, improvementsUpkeep=0, unitsSupport=0]] [fact 0:9:1762763035:99463566:9:DEFAULT:NON_TRAIT:PlayerDTO [id=1, name=honza, government=democracy, enabledGovernments=null, currentAdvance=null, advances=null, enabledAdvances=null, treasury=0, research=0, researchSpent=null, turnsAvailable=null, luxuriesRatio=0, taxesRatio=0, researchRatio=0]] ] ], getKnowledgeRuntime()=org.drools.core.impl.StatefulKnowledgeSessionImpl at 6a5b07f2] Is it a bug? Thanks Jan From mproctor at codehaus.org Tue May 6 19:49:20 2014 From: mproctor at codehaus.org (Mark Proctor) Date: Wed, 7 May 2014 00:49:20 +0100 Subject: [rules-users] Drools 6.0.0 activation-group + salience bug or feature? In-Reply-To: <53695E67.3090006@gmail.com> References: <53695E67.3090006@gmail.com> Message-ID: <09BEC9A4-98A3-435F-9C0B-1A38F5F90E82@codehaus.org> That?s what an activation-group does. The first rule (with the highest salience) fires, the others are cancelled. Out of interest, what?s the game? Something online we can look at? I have an interest in games development for Drools, and have been slowly adding examples. Space invaders was my latest one: https://www.youtube.com/watch?v=wORlAZoxttA https://github.com/droolsjbpm/drools/tree/master/drools-examples/src/main/java/org/drools/games/invaders Mark On 6 May 2014, at 23:12, Jan ??astn? wrote: > Hi, > I came across in my view strange behaviour of rules defined with > activation-group and salience. I use this combination to set the > priority of exclusively fired rules "Democracy City Tiles Production" > and "Basic City Tiles Production". > Their definitions: > rule "Democracy City Tiles Production" > dialect "mvel" > ruleflow-group "manageProductions" > activation-group "cityProduction" > salience 5 > when > PlayerDTO($owner:id, government=="democracy") > $city:CityDTO( > owner==$owner > ,$cityId:id > ,$managedTiles:managedTiles > ) > accumulate( > TileDTO ( > id memberOf $managedTiles > ,$foodProd:foodProduction > ,$resourcesProd:resourcesProduction > ,$tradeProd:tradeProduction > ) > @watch(foodProduction,resourcesProduction,tradeProduction) > ,$sumFood : sum($foodProd) > ,$sumResources : sum($resourcesProd) > ,$sumTrade : > sum(($tradeProd<1)?$tradeProd:($tradeProd+1)) > ) > UpdateCityProduction(cityId==$cityId) > then > modify($city){ > setFoodProduction($sumFood) > ,setResourcesProduction($sumResources) > ,setTradeProduction($sumTrade) > } > end > > and > > rule "Basic City Tiles Production" > dialect "mvel" > ruleflow-group "manageProductions" > activation-group "cityProduction" > when > PlayerDTO($owner:id) > $city:CityDTO( > owner==$owner > ,$cityId:id > ,$managedTiles:managedTiles > ) > accumulate( > TileDTO ( > id memberOf $managedTiles > ,$foodProd:foodProduction > ,$resourcesProd:resourcesProduction > ,$tradeProd:tradeProduction > ) > @watch(foodProduction,resourcesProduction,tradeProduction) > ,$sumFood : sum($foodProd) > ,$sumResources : sum($resourcesProd) > ,$sumTrade : sum($tradeProd) > ) > UpdateCityProduction(cityId==$cityId) > then > modify($city){ > setFoodProduction($sumFood) > ,setResourcesProduction($sumResources) > ,setTradeProduction($sumTrade) > } > end > > But problem occurs when two CityDTO objects are in the session. I would > like to fire one rule for each CityDTO, but the activation-group cancels > all the activations after first is fired. So only one activation in > place of two fires. Here is the log: > > ==>[BeforeActivationFiredEvent: getActivation()=[[ Democracy City Tiles > Production active=false ] [ [fact > 0:12:36803987:36803987:12:DEFAULT:NON_TRAIT:UpdateCityProduction( > cityId=5 )] > [fact > 0:16:2083264739:2083264739:16:null:NON_TRAIT:[Ljava.lang.Object;@7c2c18e3] > [fact 0:11:792938926:966:11:DEFAULT:NON_TRAIT:CityDTO [id=5, > name=marefy, cityCentre=null, owner=1, improvements=[], > currentImprovement=null, enabledImprovements=[], homeUnits=[], > currentUnit=null, enabledUnitTypes=[], tradeRoutes=[], managedTiles=[1, > 2], size=5, weLoveDay=false, disorder=false, foodProduction=0, > foodConsumption=0, foodSurplus=0, foodStock=0, resourcesProduction=0, > resourcesConsumption=0, resourcesSurplus=null, tradeProduction=0, > corruption=0, luxuriesAmount=0, luxuriesSpent=0, taxesAmount=0, > researchAmount=0, peopleHappy=2, peopleUnhappy=1, peopleContent=1, > peopleEntertainers=0, peopleTaxmen=1, peopleScientists=0, > pollutionChance=0, improvementsUpkeep=0, unitsSupport=0]] > [fact 0:9:1762763035:99463566:9:DEFAULT:NON_TRAIT:PlayerDTO [id=1, > name=honza, government=democracy, enabledGovernments=null, > currentAdvance=null, advances=null, enabledAdvances=null, treasury=0, > research=0, researchSpent=null, turnsAvailable=null, luxuriesRatio=0, > taxesRatio=0, researchRatio=0]] ] ], > getKnowledgeRuntime()=org.drools.core.impl.StatefulKnowledgeSessionImpl at 6a5b07f2] > ==>[ActivationCancelledEvent: getCause()=CLEAR, getActivation()=[[ Basic > City Tiles Production active=false ] [ [fact > 0:15:807492131:807492131:15:null:NON_TRAIT:[Ljava.lang.Object;@30215a23] > [fact 0:11:792938926:966:11:DEFAULT:NON_TRAIT:CityDTO [id=5, > name=marefy, cityCentre=null, owner=1, improvements=[], > currentImprovement=null, enabledImprovements=[], homeUnits=[], > currentUnit=null, enabledUnitTypes=[], tradeRoutes=[], managedTiles=[1, > 2], size=5, weLoveDay=false, disorder=false, foodProduction=0, > foodConsumption=0, foodSurplus=0, foodStock=0, resourcesProduction=0, > resourcesConsumption=0, resourcesSurplus=null, tradeProduction=0, > corruption=0, luxuriesAmount=0, luxuriesSpent=0, taxesAmount=0, > researchAmount=0, peopleHappy=2, peopleUnhappy=1, peopleContent=1, > peopleEntertainers=0, peopleTaxmen=1, peopleScientists=0, > pollutionChance=0, improvementsUpkeep=0, unitsSupport=0]] > [fact 0:12:36803987:36803987:12:DEFAULT:NON_TRAIT:UpdateCityProduction( > cityId=5 )] ] ], > getKnowledgeRuntime()=org.drools.core.impl.StatefulKnowledgeSessionImpl at 6a5b07f2] > ==>[ActivationCancelledEvent: getCause()=CLEAR, getActivation()=[[ Basic > City Tiles Production active=false ] [ [fact > 0:23:833001332:833001332:23:null:NON_TRAIT:[Ljava.lang.Object;@31a69774] > [fact 0:18:1816369501:968:18:DEFAULT:NON_TRAIT:CityDTO [id=7, name=Brno, > cityCentre=null, owner=1, improvements=[], currentImprovement=null, > enabledImprovements=[], homeUnits=[], currentUnit=null, > enabledUnitTypes=[], tradeRoutes=[], managedTiles=[3, 4], size=1, > weLoveDay=false, disorder=false, foodProduction=0, foodConsumption=0, > foodSurplus=0, foodStock=0, resourcesProduction=0, > resourcesConsumption=0, resourcesSurplus=null, tradeProduction=0, > corruption=0, luxuriesAmount=0, luxuriesSpent=0, taxesAmount=0, > researchAmount=0, peopleHappy=0, peopleUnhappy=0, peopleContent=1, > peopleEntertainers=0, peopleTaxmen=0, peopleScientists=0, > pollutionChance=0, improvementsUpkeep=0, unitsSupport=0]] > [fact > 0:20:1314789527:1314789527:20:DEFAULT:NON_TRAIT:UpdateCityProduction( > cityId=7 )] ] ], > getKnowledgeRuntime()=org.drools.core.impl.StatefulKnowledgeSessionImpl at 6a5b07f2] > ==>[ActivationCancelledEvent: getCause()=CLEAR, getActivation()=[[ > Democracy City Tiles Production active=false ] [ [fact > 0:20:1314789527:1314789527:20:DEFAULT:NON_TRAIT:UpdateCityProduction( > cityId=7 )] > [fact > 0:19:1857434733:1857434733:19:null:NON_TRAIT:[Ljava.lang.Object;@6eb6346d] > [fact 0:18:1816369501:968:18:DEFAULT:NON_TRAIT:CityDTO [id=7, name=Brno, > cityCentre=null, owner=1, improvements=[], currentImprovement=null, > enabledImprovements=[], homeUnits=[], currentUnit=null, > enabledUnitTypes=[], tradeRoutes=[], managedTiles=[3, 4], size=1, > weLoveDay=false, disorder=false, foodProduction=0, foodConsumption=0, > foodSurplus=0, foodStock=0, resourcesProduction=0, > resourcesConsumption=0, resourcesSurplus=null, tradeProduction=0, > corruption=0, luxuriesAmount=0, luxuriesSpent=0, taxesAmount=0, > researchAmount=0, peopleHappy=0, peopleUnhappy=0, peopleContent=1, > peopleEntertainers=0, peopleTaxmen=0, peopleScientists=0, > pollutionChance=0, improvementsUpkeep=0, unitsSupport=0]] > [fact 0:9:1762763035:99463566:9:DEFAULT:NON_TRAIT:PlayerDTO [id=1, > name=honza, government=democracy, enabledGovernments=null, > currentAdvance=null, advances=null, enabledAdvances=null, treasury=0, > research=0, researchSpent=null, turnsAvailable=null, luxuriesRatio=0, > taxesRatio=0, researchRatio=0]] ] ], > getKnowledgeRuntime()=org.drools.core.impl.StatefulKnowledgeSessionImpl at 6a5b07f2] > > > Is it a bug? > Thanks > Jan > _______________________________________________ > rules-users mailing list > rules-users at lists.jboss.org > https://lists.jboss.org/mailman/listinfo/rules-users From wtang at kana.com Wed May 7 01:42:09 2014 From: wtang at kana.com (wtang) Date: Tue, 6 May 2014 22:42:09 -0700 (PDT) Subject: [rules-users] Is property reactive bug in 5.5 fixed in 6.0 In-Reply-To: <5366E745.5060705@gmail.com> References: <1399236228376-4029419.post@n3.nabble.com> <27499128-D3D9-48B0-A581-18C8DAA95E8E@codehaus.org> <1399246490517-4029421.post@n3.nabble.com> <5366E745.5060705@gmail.com> Message-ID: <1399441329335-4029453.post@n3.nabble.com> thank for all your reply! here is an example of a rule that did not work: declare myobject @propertyReactive p1: integer end rule1 when (p1 == 1) p1 = 2 rule2 when (p1 == 2) system.out.println("hello"); rule2 never get executed with propertyReactive. Take out PR and it will fire. I am still trying to figure out how to submit jira bug. Sorry! Wing -- View this message in context: http://drools.46999.n3.nabble.com/Is-property-reactive-bug-in-5-5-fixed-in-6-0-tp4029419p4029453.html Sent from the Drools: User forum mailing list archive at Nabble.com. From dsotty at gmail.com Wed May 7 01:50:10 2014 From: dsotty at gmail.com (Davide Sottara) Date: Tue, 06 May 2014 22:50:10 -0700 Subject: [rules-users] Is property reactive bug in 5.5 fixed in 6.0 In-Reply-To: <1399441329335-4029453.post@n3.nabble.com> References: <1399236228376-4029419.post@n3.nabble.com> <27499128-D3D9-48B0-A581-18C8DAA95E8E@codehaus.org> <1399246490517-4029421.post@n3.nabble.com> <5366E745.5060705@gmail.com> <1399441329335-4029453.post@n3.nabble.com> Message-ID: <5369C992.3030106@gmail.com> Please try 5.6 or 6.x, the problem is known in 5.5 and it won't be possible to fix it there On 05/06/2014 10:42 PM, wtang wrote: > thank for all your reply! > > here is an example of a rule that did not work: > > declare myobject > @propertyReactive > p1: integer > end > > rule1 > when (p1 == 1) > p1 = 2 > > rule2 > when (p1 == 2) > system.out.println("hello"); > > rule2 never get executed with propertyReactive. Take out PR and it will > fire. I am still trying to figure out how to submit jira bug. Sorry! > > Wing > > > > -- > View this message in context: http://drools.46999.n3.nabble.com/Is-property-reactive-bug-in-5-5-fixed-in-6-0-tp4029419p4029453.html > Sent from the Drools: User forum mailing list archive at Nabble.com. > _______________________________________________ > rules-users mailing list > rules-users at lists.jboss.org > https://lists.jboss.org/mailman/listinfo/rules-users > From rupesh.gopinathan at ibsplc.com Wed May 7 02:21:11 2014 From: rupesh.gopinathan at ibsplc.com (Rupesh M G) Date: Wed, 7 May 2014 06:21:11 +0000 Subject: [rules-users] OptaPlanner scalability In-Reply-To: References: <85C0DCE544FC0948BCF39A3CB17CF1C7D4C1CCDA@PBOX1.ibsplc.com> Message-ID: <85C0DCE544FC0948BCF39A3CB17CF1C7D4C1ED82@PBOX1.ibsplc.com> Kindly give some more ideas on how you experimented the nearby selection. I would like to try that in my application. Regards, Rupesh -----Original Message----- From: rules-users-bounces at lists.jboss.org [mailto:rules-users-bounces at lists.jboss.org] On Behalf Of Geoffrey De Smet Sent: 30 April 2014 18:42 To: rules-users at lists.jboss.org Subject: Re: [rules-users] OptaPlanner scalability On 30-04-14 15:04, Rupesh M G wrote: > Hi, > > I tested Optaplanner successfully for a fleet planning application. > Upto 1200 trips with around 80 vehicles for 3 days is fine. > I'm reaching the target of 0 hard constraints in less than 30 minutes. > > But my target is to plan for a month with 12000 trips using 80 vehicles. > This time it didn't complete even after 12 hours. > I found the memory (< 500 MB) and CPU (25%) usage is less. > So tried running 3 solver threads and grouping the vehicles. > Now CPU usage increases. > > I followed the vehicle routing sample application and the config xml is very similar. > I used late acceptance (200) and accept count (1000). > > I'm using incremental score calculation; and applied change & swap filters in the config xml. > > Requesting experts for some thoughts on how Optaplanner can scale on similar situations. See the 2 blog articles by Roman about VRP in this section: http://www.optaplanner.org/learn/testimonialsAndCaseStudies.html He uses geo-fencing to scale. I don't believe geo-fencing is the best approach, I am working on nearby selection, which I believe will be better (because it still allows any location to go to any other location): https://issues.jboss.org/browse/PLANNER-202 Some time ago, I did an experiment with nearby selection on a TSP variant with 150 000 locations and it worked well. Also, the 6.1 beta's have seen some small perf improvements related to vehicle routing IIRC. > > Thanks & Regards, > Rupesh > > > > > > DISCLAIMER: "The information in this e-mail and any attachment is intended only for the person to whom it is addressed and may contain confidential and/or privileged material. If you have received this e-mail in error, kindly contact the sender and destroy all copies of the original communication. IBS makes no warranty, express or implied, nor guarantees the accuracy, adequacy or completeness of the information contained in this email or any attachment and is not liable for any errors, defects, omissions, viruses or for resultant loss or damage, if any, direct or indirect." > > _______________________________________________ > rules-users mailing list > rules-users at lists.jboss.org > https://lists.jboss.org/mailman/listinfo/rules-users > _______________________________________________ rules-users mailing list rules-users at lists.jboss.org https://lists.jboss.org/mailman/listinfo/rules-users DISCLAIMER: "The information in this e-mail and any attachment is intended only for the person to whom it is addressed and may contain confidential and/or privileged material. If you have received this e-mail in error, kindly contact the sender and destroy all copies of the original communication. IBS makes no warranty, express or implied, nor guarantees the accuracy, adequacy or completeness of the information contained in this email or any attachment and is not liable for any errors, defects, omissions, viruses or for resultant loss or damage, if any, direct or indirect." From ge0ffrey.spam at gmail.com Wed May 7 02:36:27 2014 From: ge0ffrey.spam at gmail.com (Geoffrey De Smet) Date: Wed, 07 May 2014 08:36:27 +0200 Subject: [rules-users] OptaPlanner scalability In-Reply-To: <85C0DCE544FC0948BCF39A3CB17CF1C7D4C1ED82@PBOX1.ibsplc.com> References: <85C0DCE544FC0948BCF39A3CB17CF1C7D4C1CCDA@PBOX1.ibsplc.com> <85C0DCE544FC0948BCF39A3CB17CF1C7D4C1ED82@PBOX1.ibsplc.com> Message-ID: In an experiment I did over 1 year ago (with an older version of optaplanner): https://github.com/ge0ffrey/traveling-santa-problem/tree/master/src/main/java/org/droolsplannerdelirium/travelingsanta/solver/move Warning: Here be dragons. That entire repo/code is a hack, an experiment and has no intention to live up the quality standards of the optaplanner code or examples... But that experiment is not really nearby selection (it doesn't use a beta distribution IIRC). I am hoping to start at nearby selection in optaplanner-core itself, in a user-friendly, powerful implementation, in a week or 2. On 07-05-14 08:21, Rupesh M G wrote: > Kindly give some more ideas on how you experimented the nearby selection. > I would like to try that in my application. > > Regards, > Rupesh > > -----Original Message----- > From: rules-users-bounces at lists.jboss.org [mailto:rules-users-bounces at lists.jboss.org] On Behalf Of Geoffrey De Smet > Sent: 30 April 2014 18:42 > To: rules-users at lists.jboss.org > Subject: Re: [rules-users] OptaPlanner scalability > > > On 30-04-14 15:04, Rupesh M G wrote: >> Hi, >> >> I tested Optaplanner successfully for a fleet planning application. >> Upto 1200 trips with around 80 vehicles for 3 days is fine. >> I'm reaching the target of 0 hard constraints in less than 30 minutes. >> >> But my target is to plan for a month with 12000 trips using 80 vehicles. >> This time it didn't complete even after 12 hours. >> I found the memory (< 500 MB) and CPU (25%) usage is less. >> So tried running 3 solver threads and grouping the vehicles. >> Now CPU usage increases. >> >> I followed the vehicle routing sample application and the config xml is very similar. >> I used late acceptance (200) and accept count (1000). >> >> I'm using incremental score calculation; and applied change & swap filters in the config xml. >> >> Requesting experts for some thoughts on how Optaplanner can scale on similar situations. > See the 2 blog articles by Roman about VRP in this section: > http://www.optaplanner.org/learn/testimonialsAndCaseStudies.html > He uses geo-fencing to scale. > > I don't believe geo-fencing is the best approach, I am working on nearby selection, which I believe will be better (because it still allows any location to go to any other location): > https://issues.jboss.org/browse/PLANNER-202 > Some time ago, I did an experiment with nearby selection on a TSP variant with 150 000 locations and it worked well. > > Also, the 6.1 beta's have seen some small perf improvements related to vehicle routing IIRC. > >> Thanks & Regards, >> Rupesh >> >> >> >> >> >> DISCLAIMER: "The information in this e-mail and any attachment is intended only for the person to whom it is addressed and may contain confidential and/or privileged material. If you have received this e-mail in error, kindly contact the sender and destroy all copies of the original communication. IBS makes no warranty, express or implied, nor guarantees the accuracy, adequacy or completeness of the information contained in this email or any attachment and is not liable for any errors, defects, omissions, viruses or for resultant loss or damage, if any, direct or indirect." >> >> _______________________________________________ >> rules-users mailing list >> rules-users at lists.jboss.org >> https://lists.jboss.org/mailman/listinfo/rules-users >> > > _______________________________________________ > rules-users mailing list > rules-users at lists.jboss.org > https://lists.jboss.org/mailman/listinfo/rules-users > > > DISCLAIMER: "The information in this e-mail and any attachment is intended only for the person to whom it is addressed and may contain confidential and/or privileged material. If you have received this e-mail in error, kindly contact the sender and destroy all copies of the original communication. IBS makes no warranty, express or implied, nor guarantees the accuracy, adequacy or completeness of the information contained in this email or any attachment and is not liable for any errors, defects, omissions, viruses or for resultant loss or damage, if any, direct or indirect." > > _______________________________________________ > rules-users mailing list > rules-users at lists.jboss.org > https://lists.jboss.org/mailman/listinfo/rules-users > From newohybat at gmail.com Wed May 7 02:59:49 2014 From: newohybat at gmail.com (=?UTF-8?B?SmFuIMWgxaVhc3Ruw70=?=) Date: Wed, 07 May 2014 08:59:49 +0200 Subject: [rules-users] Drools 6.0.0 activation-group + salience bug or feature? In-Reply-To: <09BEC9A4-98A3-435F-9C0B-1A38F5F90E82@codehaus.org> References: <53695E67.3090006@gmail.com> <09BEC9A4-98A3-435F-9C0B-1A38F5F90E82@codehaus.org> Message-ID: <5369D9E5.5010402@gmail.com> Thanks for answer, well I thought that the activation-group and salience applies only on the rules with the same LHS, I mean exact match by equality. But there it cancels different ones. Nevermind. The game doesn't exist (yet). It is for my diploma thesis coordinated by Red Hat. I have to implement game logic of civilization-like game. As for my project, I started blog a while ago, but lately I'm busy writing my diploma thesis, so I haven't updated it for a while. Here it is: http://civilization-mmo.blogspot.com/ . Also you can visit my github account where again there are some projects concerning the game, but current version is to be added in short time. Hopefully by 26 may it shall be updated. Jan Dne 7.5.2014 01:49, Mark Proctor napsal(a): > That?s what an activation-group does. The first rule (with the highest salience) fires, the others are cancelled. > > Out of interest, what?s the game? Something online we can look at? I have an interest in games development for Drools, and have been slowly adding examples. Space invaders was my latest one: > https://www.youtube.com/watch?v=wORlAZoxttA > https://github.com/droolsjbpm/drools/tree/master/drools-examples/src/main/java/org/drools/games/invaders > > Mark > On 6 May 2014, at 23:12, Jan ??astn? wrote: > >> Hi, >> I came across in my view strange behaviour of rules defined with >> activation-group and salience. I use this combination to set the >> priority of exclusively fired rules "Democracy City Tiles Production" >> and "Basic City Tiles Production". >> Their definitions: >> rule "Democracy City Tiles Production" >> dialect "mvel" >> ruleflow-group "manageProductions" >> activation-group "cityProduction" >> salience 5 >> when >> PlayerDTO($owner:id, government=="democracy") >> $city:CityDTO( >> owner==$owner >> ,$cityId:id >> ,$managedTiles:managedTiles >> ) >> accumulate( >> TileDTO ( >> id memberOf $managedTiles >> ,$foodProd:foodProduction >> ,$resourcesProd:resourcesProduction >> ,$tradeProd:tradeProduction >> ) >> @watch(foodProduction,resourcesProduction,tradeProduction) >> ,$sumFood : sum($foodProd) >> ,$sumResources : sum($resourcesProd) >> ,$sumTrade : >> sum(($tradeProd<1)?$tradeProd:($tradeProd+1)) >> ) >> UpdateCityProduction(cityId==$cityId) >> then >> modify($city){ >> setFoodProduction($sumFood) >> ,setResourcesProduction($sumResources) >> ,setTradeProduction($sumTrade) >> } >> end >> >> and >> >> rule "Basic City Tiles Production" >> dialect "mvel" >> ruleflow-group "manageProductions" >> activation-group "cityProduction" >> when >> PlayerDTO($owner:id) >> $city:CityDTO( >> owner==$owner >> ,$cityId:id >> ,$managedTiles:managedTiles >> ) >> accumulate( >> TileDTO ( >> id memberOf $managedTiles >> ,$foodProd:foodProduction >> ,$resourcesProd:resourcesProduction >> ,$tradeProd:tradeProduction >> ) >> @watch(foodProduction,resourcesProduction,tradeProduction) >> ,$sumFood : sum($foodProd) >> ,$sumResources : sum($resourcesProd) >> ,$sumTrade : sum($tradeProd) >> ) >> UpdateCityProduction(cityId==$cityId) >> then >> modify($city){ >> setFoodProduction($sumFood) >> ,setResourcesProduction($sumResources) >> ,setTradeProduction($sumTrade) >> } >> end >> >> But problem occurs when two CityDTO objects are in the session. I would >> like to fire one rule for each CityDTO, but the activation-group cancels >> all the activations after first is fired. So only one activation in >> place of two fires. Here is the log: >> >> ==>[BeforeActivationFiredEvent: getActivation()=[[ Democracy City Tiles >> Production active=false ] [ [fact >> 0:12:36803987:36803987:12:DEFAULT:NON_TRAIT:UpdateCityProduction( >> cityId=5 )] >> [fact >> 0:16:2083264739:2083264739:16:null:NON_TRAIT:[Ljava.lang.Object;@7c2c18e3] >> [fact 0:11:792938926:966:11:DEFAULT:NON_TRAIT:CityDTO [id=5, >> name=marefy, cityCentre=null, owner=1, improvements=[], >> currentImprovement=null, enabledImprovements=[], homeUnits=[], >> currentUnit=null, enabledUnitTypes=[], tradeRoutes=[], managedTiles=[1, >> 2], size=5, weLoveDay=false, disorder=false, foodProduction=0, >> foodConsumption=0, foodSurplus=0, foodStock=0, resourcesProduction=0, >> resourcesConsumption=0, resourcesSurplus=null, tradeProduction=0, >> corruption=0, luxuriesAmount=0, luxuriesSpent=0, taxesAmount=0, >> researchAmount=0, peopleHappy=2, peopleUnhappy=1, peopleContent=1, >> peopleEntertainers=0, peopleTaxmen=1, peopleScientists=0, >> pollutionChance=0, improvementsUpkeep=0, unitsSupport=0]] >> [fact 0:9:1762763035:99463566:9:DEFAULT:NON_TRAIT:PlayerDTO [id=1, >> name=honza, government=democracy, enabledGovernments=null, >> currentAdvance=null, advances=null, enabledAdvances=null, treasury=0, >> research=0, researchSpent=null, turnsAvailable=null, luxuriesRatio=0, >> taxesRatio=0, researchRatio=0]] ] ], >> getKnowledgeRuntime()=org.drools.core.impl.StatefulKnowledgeSessionImpl at 6a5b07f2] >> ==>[ActivationCancelledEvent: getCause()=CLEAR, getActivation()=[[ Basic >> City Tiles Production active=false ] [ [fact >> 0:15:807492131:807492131:15:null:NON_TRAIT:[Ljava.lang.Object;@30215a23] >> [fact 0:11:792938926:966:11:DEFAULT:NON_TRAIT:CityDTO [id=5, >> name=marefy, cityCentre=null, owner=1, improvements=[], >> currentImprovement=null, enabledImprovements=[], homeUnits=[], >> currentUnit=null, enabledUnitTypes=[], tradeRoutes=[], managedTiles=[1, >> 2], size=5, weLoveDay=false, disorder=false, foodProduction=0, >> foodConsumption=0, foodSurplus=0, foodStock=0, resourcesProduction=0, >> resourcesConsumption=0, resourcesSurplus=null, tradeProduction=0, >> corruption=0, luxuriesAmount=0, luxuriesSpent=0, taxesAmount=0, >> researchAmount=0, peopleHappy=2, peopleUnhappy=1, peopleContent=1, >> peopleEntertainers=0, peopleTaxmen=1, peopleScientists=0, >> pollutionChance=0, improvementsUpkeep=0, unitsSupport=0]] >> [fact 0:12:36803987:36803987:12:DEFAULT:NON_TRAIT:UpdateCityProduction( >> cityId=5 )] ] ], >> getKnowledgeRuntime()=org.drools.core.impl.StatefulKnowledgeSessionImpl at 6a5b07f2] >> ==>[ActivationCancelledEvent: getCause()=CLEAR, getActivation()=[[ Basic >> City Tiles Production active=false ] [ [fact >> 0:23:833001332:833001332:23:null:NON_TRAIT:[Ljava.lang.Object;@31a69774] >> [fact 0:18:1816369501:968:18:DEFAULT:NON_TRAIT:CityDTO [id=7, name=Brno, >> cityCentre=null, owner=1, improvements=[], currentImprovement=null, >> enabledImprovements=[], homeUnits=[], currentUnit=null, >> enabledUnitTypes=[], tradeRoutes=[], managedTiles=[3, 4], size=1, >> weLoveDay=false, disorder=false, foodProduction=0, foodConsumption=0, >> foodSurplus=0, foodStock=0, resourcesProduction=0, >> resourcesConsumption=0, resourcesSurplus=null, tradeProduction=0, >> corruption=0, luxuriesAmount=0, luxuriesSpent=0, taxesAmount=0, >> researchAmount=0, peopleHappy=0, peopleUnhappy=0, peopleContent=1, >> peopleEntertainers=0, peopleTaxmen=0, peopleScientists=0, >> pollutionChance=0, improvementsUpkeep=0, unitsSupport=0]] >> [fact >> 0:20:1314789527:1314789527:20:DEFAULT:NON_TRAIT:UpdateCityProduction( >> cityId=7 )] ] ], >> getKnowledgeRuntime()=org.drools.core.impl.StatefulKnowledgeSessionImpl at 6a5b07f2] >> ==>[ActivationCancelledEvent: getCause()=CLEAR, getActivation()=[[ >> Democracy City Tiles Production active=false ] [ [fact >> 0:20:1314789527:1314789527:20:DEFAULT:NON_TRAIT:UpdateCityProduction( >> cityId=7 )] >> [fact >> 0:19:1857434733:1857434733:19:null:NON_TRAIT:[Ljava.lang.Object;@6eb6346d] >> [fact 0:18:1816369501:968:18:DEFAULT:NON_TRAIT:CityDTO [id=7, name=Brno, >> cityCentre=null, owner=1, improvements=[], currentImprovement=null, >> enabledImprovements=[], homeUnits=[], currentUnit=null, >> enabledUnitTypes=[], tradeRoutes=[], managedTiles=[3, 4], size=1, >> weLoveDay=false, disorder=false, foodProduction=0, foodConsumption=0, >> foodSurplus=0, foodStock=0, resourcesProduction=0, >> resourcesConsumption=0, resourcesSurplus=null, tradeProduction=0, >> corruption=0, luxuriesAmount=0, luxuriesSpent=0, taxesAmount=0, >> researchAmount=0, peopleHappy=0, peopleUnhappy=0, peopleContent=1, >> peopleEntertainers=0, peopleTaxmen=0, peopleScientists=0, >> pollutionChance=0, improvementsUpkeep=0, unitsSupport=0]] >> [fact 0:9:1762763035:99463566:9:DEFAULT:NON_TRAIT:PlayerDTO [id=1, >> name=honza, government=democracy, enabledGovernments=null, >> currentAdvance=null, advances=null, enabledAdvances=null, treasury=0, >> research=0, researchSpent=null, turnsAvailable=null, luxuriesRatio=0, >> taxesRatio=0, researchRatio=0]] ] ], >> getKnowledgeRuntime()=org.drools.core.impl.StatefulKnowledgeSessionImpl at 6a5b07f2] >> >> >> Is it a bug? >> Thanks >> Jan >> _______________________________________________ >> rules-users mailing list >> rules-users at lists.jboss.org >> https://lists.jboss.org/mailman/listinfo/rules-users > > _______________________________________________ > rules-users mailing list > rules-users at lists.jboss.org > https://lists.jboss.org/mailman/listinfo/rules-users From mario.fusco at gmail.com Wed May 7 04:26:15 2014 From: mario.fusco at gmail.com (Mario Fusco) Date: Wed, 7 May 2014 01:26:15 -0700 (PDT) Subject: [rules-users] KieScanner not working In-Reply-To: <78690DEA1EFE6D44902ACFECBEAC4BF41281BC6F@DEN-EXDDA-S22.corp.ebay.com> References: <78690DEA1EFE6D44902ACFECBEAC4BF41281BC6F@DEN-EXDDA-S22.corp.ebay.com> Message-ID: <1399451175910-4029458.post@n3.nabble.com> Hi Alex, sorry but I am not fully understanding your use case. You wrote that ?drools_jar? is a kjar (i.e. is a project containing a kmodule.xml file) but "project_jar? isn't. Nevertheless in your code snippet you're creating a KieContainer against "project_jar? that actually isn't a kproject. Of course this couldn't work so I am pretty sure I am misunderstanding the description of your use case. Can you please better clarify what is a kjar and what isn't (i.e. which project contains the kmodule.xml file). It would be even better if you could open a ticket on our Jira and attach your samples projects there, so we can be sure that I am reproducing exactly your use case. Thanks, Mario -- View this message in context: http://drools.46999.n3.nabble.com/rules-users-KieScanner-not-working-tp4029446p4029458.html Sent from the Drools: User forum mailing list archive at Nabble.com. From srivastavamohit91 at gmail.com Wed May 7 04:42:22 2014 From: srivastavamohit91 at gmail.com (Mohit Srivastava) Date: Wed, 7 May 2014 14:12:22 +0530 Subject: [rules-users] KieScanner not working In-Reply-To: <1399451175910-4029458.post@n3.nabble.com> References: <78690DEA1EFE6D44902ACFECBEAC4BF41281BC6F@DEN-EXDDA-S22.corp.ebay.com> <1399451175910-4029458.post@n3.nabble.com> Message-ID: Hi, That was happened to me too, but I change the kie-ci version to 6.1.0.Beta2. That works for me. On Wed, May 7, 2014 at 1:56 PM, Mario Fusco wrote: > Hi Alex, > > sorry but I am not fully understanding your use case. > You wrote that ?drools_jar? is a kjar (i.e. is a project containing a > kmodule.xml file) but "project_jar? isn't. > Nevertheless in your code snippet you're creating a KieContainer against > "project_jar? that actually isn't a kproject. Of course this couldn't work > so I am pretty sure I am misunderstanding the description of your use case. > Can you please better clarify what is a kjar and what isn't (i.e. which > project contains the kmodule.xml file). It would be even better if you > could > open a ticket on our Jira and attach your samples projects there, so we can > be sure that I am reproducing exactly your use case. > > Thanks, > Mario > > > > -- > View this message in context: > http://drools.46999.n3.nabble.com/rules-users-KieScanner-not-working-tp4029446p4029458.html > Sent from the Drools: User forum mailing list archive at Nabble.com. > > _______________________________________________ > rules-users mailing list > rules-users at lists.jboss.org > https://lists.jboss.org/mailman/listinfo/rules-users > -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.jboss.org/pipermail/rules-users/attachments/20140507/9ffc4a33/attachment.html From mario.fusco at gmail.com Wed May 7 05:42:40 2014 From: mario.fusco at gmail.com (Mario Fusco) Date: Wed, 7 May 2014 02:42:40 -0700 (PDT) Subject: [rules-users] KieScanner not working In-Reply-To: References: <78690DEA1EFE6D44902ACFECBEAC4BF41281BC6F@DEN-EXDDA-S22.corp.ebay.com> <1399451175910-4029458.post@n3.nabble.com> Message-ID: <1399455760193-4029460.post@n3.nabble.com> Alex, sorry but what you're saying is just NOT possible and it doesn't depend on kie-ci. If your project_jar doesn't contain a kmodule.xml file, you CANNOT do something like: ReleaseId releaseId = ks.newReleaseId( "com.study", "project_jar", "0.0.1-SNAPSHOT" ); KieContainer kContainer = ks.newKieContainer( releaseId ); If you try to you should get a RuntimeException saying: java.lang.RuntimeException: Cannot find KieModule: com.study:project_jar:0.0.1-SNAPSHOT I suggest you to open a ticket on our Jira and upload your sample projects there so I could reproduce your actual issue. Thanks, Mario -- View this message in context: http://drools.46999.n3.nabble.com/rules-users-KieScanner-not-working-tp4029446p4029460.html Sent from the Drools: User forum mailing list archive at Nabble.com. From mario.fusco at gmail.com Wed May 7 05:47:22 2014 From: mario.fusco at gmail.com (Mario Fusco) Date: Wed, 7 May 2014 02:47:22 -0700 (PDT) Subject: [rules-users] KieScanner not working In-Reply-To: References: <78690DEA1EFE6D44902ACFECBEAC4BF41281BC6F@DEN-EXDDA-S22.corp.ebay.com> <1399451175910-4029458.post@n3.nabble.com> Message-ID: <1399456042429-4029461.post@n3.nabble.com> Oops, sorry Mohit (and sorry Alex). I didn't check the sender of the last email and I thought it was sent by the guy who opened this thread. However I confirm that it is not possible to create a KieContainer out of a project that doesn't contain a kmodule.xml file. Do you agree, Mohit? Mario -- View this message in context: http://drools.46999.n3.nabble.com/rules-users-KieScanner-not-working-tp4029446p4029461.html Sent from the Drools: User forum mailing list archive at Nabble.com. From srivastavamohit91 at gmail.com Wed May 7 06:04:10 2014 From: srivastavamohit91 at gmail.com (Mohit Srivastava) Date: Wed, 7 May 2014 15:34:10 +0530 Subject: [rules-users] KieScanner not working In-Reply-To: <1399456042429-4029461.post@n3.nabble.com> References: <78690DEA1EFE6D44902ACFECBEAC4BF41281BC6F@DEN-EXDDA-S22.corp.ebay.com> <1399451175910-4029458.post@n3.nabble.com> <1399456042429-4029461.post@n3.nabble.com> Message-ID: Yes. As much I know, kmodule.xml is mandatory to use KieContainer. On Wed, May 7, 2014 at 3:17 PM, Mario Fusco wrote: > Oops, sorry Mohit (and sorry Alex). I didn't check the sender of the last > email and I thought it was sent by the guy who opened this thread. > > However I confirm that it is not possible to create a KieContainer out of a > project that doesn't contain a kmodule.xml file. Do you agree, Mohit? > > Mario > > > > -- > View this message in context: > http://drools.46999.n3.nabble.com/rules-users-KieScanner-not-working-tp4029446p4029461.html > Sent from the Drools: User forum mailing list archive at Nabble.com. > _______________________________________________ > rules-users mailing list > rules-users at lists.jboss.org > https://lists.jboss.org/mailman/listinfo/rules-users > -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.jboss.org/pipermail/rules-users/attachments/20140507/61b89eed/attachment.html From richard.ambridge at gmail.com Wed May 7 09:44:11 2014 From: richard.ambridge at gmail.com (RichardAmbridge) Date: Wed, 7 May 2014 06:44:11 -0700 (PDT) Subject: [rules-users] Drools 6.0.1 Negative Patterns in Stream Mode not working Message-ID: <1399470251796-4029463.post@n3.nabble.com> I am using drools 6.0.1 and I have the following test. public class DroolsTest { public DroolsTest() { } @Test public void work() throws InterruptedException, IOException, ClassNotFoundException { StringBuilder sb = new StringBuilder(); sb.append("package drools\n"); sb.append("import drools.MyObject;\n\n"); sb.append("declare MyObject\n" + " @role ( event )\n" + "end\n\n"); sb.append("rule \"Template2\"\n" + "\n" + "salience 0\n" + "dialect \"mvel\"\n" + "when\n" + " $s : MyObject(val==0)\n" + " not( MyObject(val==1, this after [0s,5s] $s ) )\n" + "\n" + "then\n" + " System.out.println(\"Template 2 fired\")\n" + " $s.name=\"2\";\n" + "\n" + "end\n"); KieServices kieServices = KieServices.Factory.get(); KieFileSystem kfs = kieServices.newKieFileSystem(); kfs.write("src/main/resources/rules.drl", sb.toString()); KieBuilder kieBuilder = kieServices.newKieBuilder(kfs); kieBuilder.buildAll(); Results results = kieBuilder.getResults(); assertFalse(results.hasMessages(Message.Level.ERROR)); if (results.hasMessages(Message.Level.WARNING)) { System.out.println("Warnings logged"); } KieContainer kieContainer = kieServices.newKieContainer(kieBuilder.getKieModule().getReleaseId()); KieBaseConfiguration kieBaseConfiguration = kieServices.newKieBaseConfiguration(); kieBaseConfiguration.setOption(EventProcessingOption.STREAM); KieBase kieBase = kieContainer.newKieBase(kieBaseConfiguration); KieSession ksession = kieBase.newKieSession(); MyObject one = new MyObject(); one.val = 0; FactHandle fh1 = ksession.insert(one); System.out.println("Insert one"); ksession.fireAllRules(); for (int i = 0; i < 13; i++) { System.out.println("Sleep:" + i); Thread.sleep(1000); //After 5 seconds, rule should fire } assertEquals("2", one.name); System.out.println("End"); ksession.halt(); ksession.dispose(); } public class MyObject implements Serializable { String name; int val; boolean fired; public String getName() { return name; } public void setName(String name) { this.name = name; } public int getVal() { return val; } public void setVal(int val) { this.val = val; } public boolean isFired() { return fired; } public void setFired(boolean fired) { this.fired = fired; } } } The rule is using + " $s : MyObject(val==0)\n" + " not( MyObject(val==1, this after [0s,5s] $s ) )\n" So, if a MyObject with val==0 is inserted, then after 5 seconds no MyObject with val==1 is found the rule will fire. This works in Drools 5.5.0 In 6.0.1 the rule doesn't fire. Please help. I want to use drools 6 but cannot with this problem. Thanks -- View this message in context: http://drools.46999.n3.nabble.com/Drools-6-0-1-Negative-Patterns-in-Stream-Mode-not-working-tp4029463.html Sent from the Drools: User forum mailing list archive at Nabble.com. From apykhtin at ebay.com Wed May 7 09:46:03 2014 From: apykhtin at ebay.com (pictin) Date: Wed, 7 May 2014 06:46:03 -0700 (PDT) Subject: [rules-users] KieScanner not working In-Reply-To: <1399456042429-4029461.post@n3.nabble.com> References: <78690DEA1EFE6D44902ACFECBEAC4BF41281BC6F@DEN-EXDDA-S22.corp.ebay.com> <1399451175910-4029458.post@n3.nabble.com> <1399456042429-4029461.post@n3.nabble.com> Message-ID: <1399470363808-4029464.post@n3.nabble.com> > However I confirm that it is not possible to create a KieContainer out of a project that doesn't contain a kmodule.xml file. Sorry, Mario, I didn't make myself clear. My project_jar is indeed a kjar. I just not looking to have any rules in project_jar dynamically updated. What I'm focusing on is drools_jar, for which I want the rules to get updated. project_jar depends on drools_jar: com.study drools_jar 0.0.1-SNAPSHOT Initial version of rules runs just fine when project_jar is deployed. However, KieScanner is not picking up any updates in drools_jar. Also, can you please point me to Drools Jira? -- View this message in context: http://drools.46999.n3.nabble.com/rules-users-KieScanner-not-working-tp4029446p4029464.html Sent from the Drools: User forum mailing list archive at Nabble.com. From mario.fusco at gmail.com Wed May 7 10:07:41 2014 From: mario.fusco at gmail.com (Mario Fusco) Date: Wed, 7 May 2014 07:07:41 -0700 (PDT) Subject: [rules-users] KieScanner not working In-Reply-To: <1399470363808-4029464.post@n3.nabble.com> References: <78690DEA1EFE6D44902ACFECBEAC4BF41281BC6F@DEN-EXDDA-S22.corp.ebay.com> <1399451175910-4029458.post@n3.nabble.com> <1399456042429-4029461.post@n3.nabble.com> <1399470363808-4029464.post@n3.nabble.com> Message-ID: <1399471661662-4029465.post@n3.nabble.com> Our Jira is here: https://issues.jboss.org/browse/DROOLS Can you please open a ticket there and also attach your sample projects so I can be sure that I am reproducing your issue? Thanks, Mario -- View this message in context: http://drools.46999.n3.nabble.com/rules-users-KieScanner-not-working-tp4029446p4029465.html Sent from the Drools: User forum mailing list archive at Nabble.com. From apykhtin at ebay.com Wed May 7 11:34:49 2014 From: apykhtin at ebay.com (pictin) Date: Wed, 7 May 2014 08:34:49 -0700 (PDT) Subject: [rules-users] KieScanner not working In-Reply-To: <1399471661662-4029465.post@n3.nabble.com> References: <78690DEA1EFE6D44902ACFECBEAC4BF41281BC6F@DEN-EXDDA-S22.corp.ebay.com> <1399451175910-4029458.post@n3.nabble.com> <1399456042429-4029461.post@n3.nabble.com> <1399470363808-4029464.post@n3.nabble.com> <1399471661662-4029465.post@n3.nabble.com> Message-ID: <1399476889056-4029466.post@n3.nabble.com> Created https://issues.jboss.org/browse/DROOLS-477 -- View this message in context: http://drools.46999.n3.nabble.com/rules-users-KieScanner-not-working-tp4029446p4029466.html Sent from the Drools: User forum mailing list archive at Nabble.com. From hagai.shatz at gmail.com Wed May 7 12:22:33 2014 From: hagai.shatz at gmail.com (Hagai) Date: Wed, 7 May 2014 09:22:33 -0700 (PDT) Subject: [rules-users] How to implement immovable planning entities for vehicle routing problem? Message-ID: <1399479753704-4029467.post@n3.nabble.com> I am implementing a vehiclerouting like solution with OptaPlanner 6.0.1.Final. According to the documentation for continuous planning, the way to 'lock' parts of the solution is by declaring a movableEntitySelectionFilter on the planning entity: Section 14.3.1. Immovable planning entities. However, this does not work well with chained entities where parts of the solution is calculated, like in the vehiclerouting example. For example, let's assume the following chains, where [Customer A] and [Customer C] are immovable: [Vehicle 1] <- *[Customer A]* <- [Customer B] [Vehicle 2] <- *[Customer C]* <- [Customer D] Even if we filter immovable entities, a move to set the variable [Vehicle 2] as previous standstill to [Customer B] can be selected with the following result that changes the immovable entity [Customer C]: [Vehicle 1] <- *[Customer A]* [Vehicle 2] <- [Customer B] <- *[Customer C]* <- [Customer D] A workaround is to filter moves with immovable entities as well as moves with immovable variables (variables are also entities). However, this can only work when immovable entities are placed at the beginning of chines before any movable entities. Is there a better way to implement immovable planning entities for vehicle routing problem? -- View this message in context: http://drools.46999.n3.nabble.com/How-to-implement-immovable-planning-entities-for-vehicle-routing-problem-tp4029467.html Sent from the Drools: User forum mailing list archive at Nabble.com. From mproctor at codehaus.org Wed May 7 13:21:56 2014 From: mproctor at codehaus.org (Mark Proctor) Date: Wed, 7 May 2014 18:21:56 +0100 Subject: [rules-users] Drools 6.0.1 Negative Patterns in Stream Mode not working In-Reply-To: <1399470251796-4029463.post@n3.nabble.com> References: <1399470251796-4029463.post@n3.nabble.com> Message-ID: <19B3C317-FD19-4DE3-A5BD-6CA25ADFA816@codehaus.org> Can you try 6.1 beta2? And if there is still a bug, please open a jira: http://mvnrepository.com/artifact/org.drools/drools-core/6.1.0.Beta2 Ideally please submit a self contained unit test, as a pull request. As explained here: http://docs.jboss.org/drools/release/5.5.0.Final/droolsjbpm-introduction-docs/html/gettingstarted.html Mark On 7 May 2014, at 14:44, RichardAmbridge wrote: > I am using drools 6.0.1 and I have the following test. > > public class DroolsTest { > > public DroolsTest() { > } > > @Test > public void work() throws InterruptedException, IOException, > ClassNotFoundException { > > StringBuilder sb = new StringBuilder(); > sb.append("package drools\n"); > sb.append("import drools.MyObject;\n\n"); > > sb.append("declare MyObject\n" > + " @role ( event )\n" > + "end\n\n"); > > sb.append("rule \"Template2\"\n" > + "\n" > + "salience 0\n" > + "dialect \"mvel\"\n" > + "when\n" > + " $s : MyObject(val==0)\n" > + " not( MyObject(val==1, this after [0s,5s] $s ) )\n" > + "\n" > + "then\n" > + " System.out.println(\"Template 2 fired\")\n" > + " $s.name=\"2\";\n" > + "\n" > + "end\n"); > > KieServices kieServices = KieServices.Factory.get(); > > KieFileSystem kfs = kieServices.newKieFileSystem(); > kfs.write("src/main/resources/rules.drl", sb.toString()); > > KieBuilder kieBuilder = kieServices.newKieBuilder(kfs); > kieBuilder.buildAll(); > Results results = kieBuilder.getResults(); > assertFalse(results.hasMessages(Message.Level.ERROR)); > if (results.hasMessages(Message.Level.WARNING)) { > System.out.println("Warnings logged"); > } > KieContainer kieContainer = > kieServices.newKieContainer(kieBuilder.getKieModule().getReleaseId()); > > KieBaseConfiguration kieBaseConfiguration = > kieServices.newKieBaseConfiguration(); > kieBaseConfiguration.setOption(EventProcessingOption.STREAM); > KieBase kieBase = kieContainer.newKieBase(kieBaseConfiguration); > KieSession ksession = kieBase.newKieSession(); > > MyObject one = new MyObject(); > one.val = 0; > > FactHandle fh1 = ksession.insert(one); > System.out.println("Insert one"); > ksession.fireAllRules(); > for (int i = 0; i < 13; i++) { > System.out.println("Sleep:" + i); > Thread.sleep(1000); > //After 5 seconds, rule should fire > } > assertEquals("2", one.name); > > System.out.println("End"); > ksession.halt(); > ksession.dispose(); > } > > public class MyObject implements Serializable { > > String name; > int val; > boolean fired; > > public String getName() { > return name; > } > > public void setName(String name) { > this.name = name; > } > > public int getVal() { > return val; > } > > public void setVal(int val) { > this.val = val; > } > > public boolean isFired() { > return fired; > } > > public void setFired(boolean fired) { > this.fired = fired; > } > > } > } > > > The rule is using > + " $s : MyObject(val==0)\n" > + " not( MyObject(val==1, this after [0s,5s] $s ) )\n" > > So, if a MyObject with val==0 is inserted, then after 5 seconds no MyObject > with val==1 is found the rule will fire. > This works in Drools 5.5.0 > > In 6.0.1 the rule doesn't fire. > > Please help. I want to use drools 6 but cannot with this problem. > > Thanks > > > > > -- > View this message in context: http://drools.46999.n3.nabble.com/Drools-6-0-1-Negative-Patterns-in-Stream-Mode-not-working-tp4029463.html > Sent from the Drools: User forum mailing list archive at Nabble.com. > _______________________________________________ > rules-users mailing list > rules-users at lists.jboss.org > https://lists.jboss.org/mailman/listinfo/rules-users From raojinghai at gmail.com Wed May 7 20:12:45 2014 From: raojinghai at gmail.com (rjh) Date: Wed, 7 May 2014 17:12:45 -0700 (PDT) Subject: [rules-users] Drools 6.0.1 Negative Patterns in Stream Mode not working In-Reply-To: <1399470251796-4029463.post@n3.nabble.com> References: <1399470251796-4029463.post@n3.nabble.com> Message-ID: <1399507965063-4029474.post@n3.nabble.com> You should set TimedRuleExectionOption to YES. See here http://docs.jboss.org/drools/release/6.0.1.Final/drools-docs/html_single/index.html#d0e592 -- View this message in context: http://drools.46999.n3.nabble.com/Drools-6-0-1-Negative-Patterns-in-Stream-Mode-not-working-tp4029463p4029474.html Sent from the Drools: User forum mailing list archive at Nabble.com. From raojinghai at gmail.com Wed May 7 21:24:55 2014 From: raojinghai at gmail.com (raojinghai at gmail.com) Date: Wed, 7 May 2014 18:24:55 -0700 Subject: [rules-users] Drools eclipse plugin problem Message-ID: Hi, Whenever I use classes from any third party jar files (not in JRE System Library and Drools Library), I got error messages in Eclipse IDE. At the place where I import the class, the error message is "Only a type can be imported. ... resolves to a package". At the place where I use the class, the error message is "... cannot be resolved to a type". However, I have included the jar file in classpath. The project can be executed successfully in Eclipse even with the error message in IDE. To make the problem easier to describe and to reproduce if anybody interested, I use the example reported at https://issues.jboss.org/browse/DROOLS-373. Both my problem and this are about external libraries, so I feel they may have some connections. Below are my steps: 1. Download drools6scratch-kiemavenclasspath.zip from jira and unzip the file 2. In eclipse, Import -> Existing Maven Projects, and select the unzipped folder 3. After import, convert the project to Drools Project Then I get errors in both package.drl and AppTest.java. The attached screenshots can give more details. This happens to every imported class from third party libraries. But the classes from JRE System Libraries or Drools Libraries are fine. So I have to disable drools builder, which also turns off drools validation in eclipse. It is very inconvenient for my development work. I believe many people are using eclipse for drools development, but I am surprise nobody complains about it on Internet. First I suspect its configuration problem on my side, but I tried with fresh installation on both MacOS and windows 7, and I always get the same problem. Below is my environment: - OS: Mac OS X 10.9.2 and Windows 7 - Eclipse Kepler (Standard and for Java EE Developer) - Drool Eclipse Plugin - JBoss Drools Core 6.0.1Final. - Java SE 1.7 - Drools Runtime 6.0.1 Thank you so much if anybody can help. Jinghai -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.jboss.org/pipermail/rules-users/attachments/20140507/81f9d30f/attachment-0001.html -------------- next part -------------- A non-text attachment was scrubbed... Name: Screen Shot 2014-05-02 at 12.16.56 PM.png Type: image/png Size: 47346 bytes Desc: not available Url : http://lists.jboss.org/pipermail/rules-users/attachments/20140507/81f9d30f/attachment-0003.png -------------- next part -------------- A non-text attachment was scrubbed... Name: Screen Shot 2014-05-02 at 12.17.14 PM.png Type: image/png Size: 84254 bytes Desc: not available Url : http://lists.jboss.org/pipermail/rules-users/attachments/20140507/81f9d30f/attachment-0004.png -------------- next part -------------- A non-text attachment was scrubbed... Name: Screen Shot 2014-05-02 at 12.18.14 PM .png Type: image/png Size: 113914 bytes Desc: not available Url : http://lists.jboss.org/pipermail/rules-users/attachments/20140507/81f9d30f/attachment-0005.png From richard.ambridge at gmail.com Thu May 8 03:23:50 2014 From: richard.ambridge at gmail.com (RichardAmbridge) Date: Thu, 8 May 2014 00:23:50 -0700 (PDT) Subject: [rules-users] Drools 6.0.1 Negative Patterns in Stream Mode not working In-Reply-To: <1399470251796-4029463.post@n3.nabble.com> References: <1399470251796-4029463.post@n3.nabble.com> Message-ID: <1399533830253-4029478.post@n3.nabble.com> Thank you for the reply. Adding: KieSessionConfiguration ksconf = KieServices.Factory.get().newKieSessionConfiguration(); ksconf.setOption(TimedRuleExectionOption.YES); KieSession ksession = kieBase.newKieSession(ksconf, null); as per the docs solved the problem. -- View this message in context: http://drools.46999.n3.nabble.com/Drools-6-0-1-Negative-Patterns-in-Stream-Mode-not-working-tp4029463p4029478.html Sent from the Drools: User forum mailing list archive at Nabble.com. From bijkerkrick at hotmail.com Thu May 8 04:08:38 2014 From: bijkerkrick at hotmail.com (dBijkoo) Date: Thu, 8 May 2014 01:08:38 -0700 (PDT) Subject: [rules-users] Drools Planner: what if possible values of a PlanningVariable are dependent of another one? In-Reply-To: <50C8B0A4.5090407@gmail.com> References: <50C7A4D3.7050900@van.asperen.org> <50C8B0A4.5090407@gmail.com> Message-ID: <1399536518225-4029480.post@n3.nabble.com> Im dealing with the almost the same problem as the original poster. The only difference is that the subset of entity specific variables and the total amount of possible variables spread over all entity specific variables has a factor of up to 24 in between them. This combined with the amount of enities makes it a huge increase in total amount of possibilities. This gives me the feeling that using the evaluation class wastes a lot of time evaluation solution which would never be viable. Since the original post is 1 and a half years old and a lot of new versions have been released since then, I was wondering if the same solution applies to my problem aswell and how it compares to my solution which i described below. At the moment i solved it as follows: PlanningEntity A has the following @PlanningVariable annotation a class x where the @ValueRangeProvider of x is provided by the @PlanningSolution annotated class. a class y where the @ValueRangeProvider uses x to provide the subset of classes y if x is not null, otherwise it returns an empty list (code below) @ValueRangeProvider(id = "timePeriods") public List getTimePeriods(){ ScheduleBlock s = getScheduleBlock(); if(s == null) { return new ArrayList(); } return getScheduleBlock().getTimePeriods(); } This feels like a hack/workaround for the problem but feel free to let me know what you think, Thanks -- View this message in context: http://drools.46999.n3.nabble.com/rules-users-Drools-Planner-what-if-possible-values-of-a-PlanningVariable-are-dependent-of-another-on-tp4021175p4029480.html Sent from the Drools: User forum mailing list archive at Nabble.com. From richard.ambridge at gmail.com Thu May 8 05:04:46 2014 From: richard.ambridge at gmail.com (RichardAmbridge) Date: Thu, 8 May 2014 02:04:46 -0700 (PDT) Subject: [rules-users] Multiple threads for KieBuilder Message-ID: <1399539886095-4029481.post@n3.nabble.com> Hi, We have over 20000 rules in our drools implementation. In drools 5 we could build multiple packages in different threads and then create a Knowledge base joining all those packages together. e.g. Thread: knowledgeB = KnowledgeBuilderFactory.newKnowledgeBuilder(); knowledgeB.add(ResourceFactory.newReaderResource(new StringReader(sb.toString())), ResourceType.DRL); Then in the main compiler, once all threads have finished KnowledgeBase knowledgeBase = KnowledgeBaseFactory.newKnowledgeBase(conf); for each thread: knowledgeBase.addKnowledgePackages(thrds[t].getKnowledgeB().getKnowledgePackages()); I can't seem to find anyway to do that with the new KIE implementation. What I would like to do is something like: Thread: Create sb to have lots of rules KieServices kieServices = KieServices.Factory.get(); KieFileSystem kfs = kieServices.newKieFileSystem(); kfs.write("src/main/resources/rules.drl", sb.toString()); KieBuilder kieBuilder = kieServices.newKieBuilder(kfs); kieBuilder.buildAll(); ..check errors KieContainer kieContainer = kieServices.newKieContainer(kieBuilder.getKieModule().getReleaseId()); KieBase kieBase = kieContainer.newKieBase(kieBaseConfiguration); In main compiling, create multiple threads, each with its own rule set. Then when all threads completed, take all the kieBase objects and merge into one base. then KieSession ksession=mergedKieBase.newKieSession(); We compile our rules offline and then load into our running servers. The compile server is a multicore server, but buildAll is single threaded. Is this possible? Many thanks for the support, Ric -- View this message in context: http://drools.46999.n3.nabble.com/Multiple-threads-for-KieBuilder-tp4029481.html Sent from the Drools: User forum mailing list archive at Nabble.com. From ge0ffrey.spam at gmail.com Thu May 8 08:00:35 2014 From: ge0ffrey.spam at gmail.com (Geoffrey De Smet) Date: Thu, 08 May 2014 14:00:35 +0200 Subject: [rules-users] Drools Planner: what if possible values of a PlanningVariable are dependent of another one? In-Reply-To: <1399536518225-4029480.post@n3.nabble.com> References: <50C7A4D3.7050900@van.asperen.org> <50C8B0A4.5090407@gmail.com> <1399536518225-4029480.post@n3.nabble.com> Message-ID: On 08-05-14 10:08, dBijkoo wrote: > Im dealing with the almost the same problem as the original poster. The only > difference is that the subset of entity specific variables and the total > amount of possible variables spread over all entity specific variables has a > factor of up to 24 in between them. This combined with the amount of enities > makes it a huge increase in total amount of possibilities. This gives me the > feeling that using the evaluation class wastes a lot of time evaluation > solution which would never be viable. > > Since the original post is 1 and a half years old and a lot of new versions > have been released since then, I was wondering if the same solution applies > to my problem aswell and how it compares to my solution which i described > below. > > > At the moment i solved it as follows: > PlanningEntity A has the following @PlanningVariable annotation > > a class x where the @ValueRangeProvider of x is provided by the > @PlanningSolution annotated class. > a class y where the @ValueRangeProvider uses x to provide the subset of > classes y if x is not null, otherwise it returns an empty list (code > below) > > @ValueRangeProvider(id = "timePeriods") > public List getTimePeriods(){ > ScheduleBlock s = getScheduleBlock(); > if(s == null) { > return new ArrayList(); > } > return getScheduleBlock().getTimePeriods(); > } > > This feels like a hack/workaround for the problem but feel free to let me > know what you think, In OptaPlanner's architecture current philosophy, this is not legal: a value range should be stable for each variable (of each entity) during solving. This not guaranteed to work (and it is guaranteed not to work if you do phase caching of moves: it will invalidly exclude part of the search space). If it does work for you, I am interested to know more about this - so I can consider to make this approach legal. > > Thanks > > > > -- > View this message in context: http://drools.46999.n3.nabble.com/rules-users-Drools-Planner-what-if-possible-values-of-a-PlanningVariable-are-dependent-of-another-on-tp4021175p4029480.html > Sent from the Drools: User forum mailing list archive at Nabble.com. > _______________________________________________ > rules-users mailing list > rules-users at lists.jboss.org > https://lists.jboss.org/mailman/listinfo/rules-users > From ge0ffrey.spam at gmail.com Thu May 8 08:10:11 2014 From: ge0ffrey.spam at gmail.com (Geoffrey De Smet) Date: Thu, 08 May 2014 14:10:11 +0200 Subject: [rules-users] How to implement immovable planning entities for vehicle routing problem? In-Reply-To: <1399479753704-4029467.post@n3.nabble.com> References: <1399479753704-4029467.post@n3.nabble.com> Message-ID: On 07-05-14 18:22, Hagai wrote: > I am implementing a vehiclerouting like solution with OptaPlanner > 6.0.1.Final. > According to the documentation for continuous planning, the way to 'lock' > parts of the solution is by declaring a movableEntitySelectionFilter on the > planning entity: Section 14.3.1. Immovable planning entities. > However, this does not work well with chained entities where parts of the > solution is calculated, like in the vehiclerouting example. > > For example, let's assume the following chains, where [Customer A] and > [Customer C] are immovable: > [Vehicle 1] <- *[Customer A]* <- [Customer B] > [Vehicle 2] <- *[Customer C]* <- [Customer D] > > Even if we filter immovable entities, a move to set the variable [Vehicle 2] > as previous standstill to [Customer B] can be selected with the following > result that changes the immovable entity [Customer C]: > [Vehicle 1] <- *[Customer A]* > [Vehicle 2] <- [Customer B] <- *[Customer C]* <- [Customer D] > > A workaround is to filter moves with immovable entities as well as moves > with immovable variables (variables are also entities). However, this can > only work when immovable entities are placed at the beginning of chines > before any movable entities. > > Is there a better way to implement immovable planning entities for vehicle > routing problem? Can you report this in a jira? As part of fixing that jira, I 'll add the ability to lock entities in the example TSP or VRP (like it's possible in course scheduling). > > > -- > View this message in context: http://drools.46999.n3.nabble.com/How-to-implement-immovable-planning-entities-for-vehicle-routing-problem-tp4029467.html > Sent from the Drools: User forum mailing list archive at Nabble.com. > _______________________________________________ > rules-users mailing list > rules-users at lists.jboss.org > https://lists.jboss.org/mailman/listinfo/rules-users > From bijkerkrick at hotmail.com Thu May 8 08:38:36 2014 From: bijkerkrick at hotmail.com (dBijkoo) Date: Thu, 8 May 2014 05:38:36 -0700 (PDT) Subject: [rules-users] Drools Planner: what if possible values of a PlanningVariable are dependent of another one? In-Reply-To: References: <50C7A4D3.7050900@van.asperen.org> <50C8B0A4.5090407@gmail.com> <1399536518225-4029480.post@n3.nabble.com> Message-ID: <1399552716058-4029484.post@n3.nabble.com> ge0ffrey wrote > In OptaPlanner's architecture current philosophy, this is not legal: > a value range should be stable for each variable (of each entity) during > solving. > This not guaranteed to work (and it is guaranteed not to work if you do > phase caching of moves: > it will invalidly exclude part of the search space). So if I understand you correctly phase caching moves is the way to go? ge0ffrey wrote > If it does work for you, I am interested to know more about this - so I > can consider to make this approach legal. It is working for me, to give you a better impression of my approach i added an image of my "planning classdiagram". Observation contains 2 annotated planningVariables getScheduleBlock() and getPeriod(). in the getPeriod() function it checks if the scheduleBlock is not null, if so it uses scheduleBlock.getPlanningsPeriods() function to return a list of periods. If have any more questions feel free to ask, we are all working to make OptaPlanner better. I can even send you a zip of my current code if you are interested. -- View this message in context: http://drools.46999.n3.nabble.com/rules-users-Drools-Planner-what-if-possible-values-of-a-PlanningVariable-are-dependent-of-another-on-tp4021175p4029484.html Sent from the Drools: User forum mailing list archive at Nabble.com. From ge0ffrey.spam at gmail.com Thu May 8 09:00:20 2014 From: ge0ffrey.spam at gmail.com (Geoffrey De Smet) Date: Thu, 08 May 2014 15:00:20 +0200 Subject: [rules-users] Drools Planner: what if possible values of a PlanningVariable are dependent of another one? In-Reply-To: <1399552716058-4029484.post@n3.nabble.com> References: <50C7A4D3.7050900@van.asperen.org> <50C8B0A4.5090407@gmail.com> <1399536518225-4029480.post@n3.nabble.com> <1399552716058-4029484.post@n3.nabble.com> Message-ID: On 08-05-14 14:38, dBijkoo wrote: > ge0ffrey wrote >> In OptaPlanner's architecture current philosophy, this is not legal: >> a value range should be stable for each variable (of each entity) during >> solving. >> This not guaranteed to work (and it is guaranteed not to work if you do >> phase caching of moves: >> it will invalidly exclude part of the search space). > So if I understand you correctly phase caching moves is the way to go? No Phase caching moves is definitely NOT the way to go :) Phase caching means it caches as moves at the beginning of the solver phase. So as some variables change value in steps, the possible move set doesn't. > > > ge0ffrey wrote >> If it does work for you, I am interested to know more about this - so I >> can consider to make this approach legal. > It is working for me, to give you a better impression of my approach i added > an image of my "planning classdiagram". > > Observation contains 2 annotated planningVariables getScheduleBlock() and > getPeriod(). in the getPeriod() function it checks if the scheduleBlock is > not null, if so it uses scheduleBlock.getPlanningsPeriods() function to > return a list of periods. I believe this approach will hit the wall when you try to add a move that changes the 2 variables of an entity in a single move. Side note: To do this, you can configure a of 2 for which the second has an that mimics the first one's. IIRC, the course timetabling example has such a config example. What will happen is that it will select a variable for the period from the range of the Observation's old block and meanwhile also change the block. There's a number of features this approach won't allow you to do (and I might not recall all of them). Because I want to solve this problem, without limiting so many features, I want to solve it differently in the future. > > If have any more questions feel free to ask, we are all working to make > OptaPlanner better. +1 yes, definitely :) I understand the need for this problem, and why the current recommended solution is suboptimal (to large search space). Feel free to make a jira for the problem (not your proposed solution). > I can even send you a zip of my current code if you are > interested. My time is too limited to review code zips (unless it's a reproducer for an accepted bug). Anyway, what is the recommended solution? Not sure. A) Either just allow all combinations, that will work. B) Or try @Entity class Observation { @Variable block; } @Entity class Block { @Variable("periodRange) period; @VariableProvider("periodRange") getPeriodRange(); } Not sure if this matches for your case - multiple Observations might share the same Block for a different period... This is allowed - (it's called ValueRange from planning entity) and more deeply supported (although it does have a few limits too). C) Or try class BlockPeriod { Block; Period; } @Entity class Observation { @Variable BlockPeriod; } Hmm. I like alternative C! > > > > -- > View this message in context: http://drools.46999.n3.nabble.com/rules-users-Drools-Planner-what-if-possible-values-of-a-PlanningVariable-are-dependent-of-another-on-tp4021175p4029484.html > Sent from the Drools: User forum mailing list archive at Nabble.com. > _______________________________________________ > rules-users mailing list > rules-users at lists.jboss.org > https://lists.jboss.org/mailman/listinfo/rules-users > From kurrent93 at gmail.com Thu May 8 10:22:43 2014 From: kurrent93 at gmail.com (kurrent93) Date: Thu, 8 May 2014 07:22:43 -0700 (PDT) Subject: [rules-users] Restrict size/resource usage of drools session Message-ID: <1399558963156-4029486.post@n3.nabble.com> Hi We have an application where users write their own rules via a UI, and these are then translated into drl, and run in a dedicated drools session. Each user can have one or more sessions. However, there are times when something goes wrong - say a rule starts looping - and it consumes all the resources - the server is running at 100% cpu, and it then effects all users. I realize we can optimize the the generated rules to prevent such issues, and we are working on this - however am interested to know if there are any ways - such as somehow sandboxing / restricting the resources that a drools session can use, so that should a rule cause problems, it will not effect the other running drools sessions. Thanks for any advice on this problem. -- View this message in context: http://drools.46999.n3.nabble.com/Restrict-size-resource-usage-of-drools-session-tp4029486.html Sent from the Drools: User forum mailing list archive at Nabble.com. From wolfgang.laun at gmail.com Thu May 8 10:52:21 2014 From: wolfgang.laun at gmail.com (Wolfgang Laun) Date: Thu, 8 May 2014 16:52:21 +0200 Subject: [rules-users] Restrict size/resource usage of drools session In-Reply-To: <1399558963156-4029486.post@n3.nabble.com> References: <1399558963156-4029486.post@n3.nabble.com> Message-ID: There are options to restrict the size of the JVM memory allocation pool. Loops can go over two or more rules, so take care. Catching such loops is possible, up to a limit. -W On 08/05/2014, kurrent93 wrote: > Hi > > We have an application where users write their own rules via a UI, and > these > are then translated into drl, and run in a dedicated drools session. Each > user can have one or more sessions. > > However, there are times when something goes wrong - say a rule starts > looping - and it consumes all the resources - the server is running at 100% > cpu, and it then effects all users. > > I realize we can optimize the the generated rules to prevent such issues, > and we are working on this - however am interested to know if there are any > ways - such as somehow sandboxing / restricting the resources that a drools > session can use, so that should a rule cause problems, it will not effect > the other running drools sessions. > > Thanks for any advice on this problem. > > > > -- > View this message in context: > http://drools.46999.n3.nabble.com/Restrict-size-resource-usage-of-drools-session-tp4029486.html > Sent from the Drools: User forum mailing list archive at Nabble.com. > _______________________________________________ > rules-users mailing list > rules-users at lists.jboss.org > https://lists.jboss.org/mailman/listinfo/rules-users > From kurrent93 at gmail.com Thu May 8 10:55:31 2014 From: kurrent93 at gmail.com (kurrent93) Date: Thu, 8 May 2014 07:55:31 -0700 (PDT) Subject: [rules-users] Restrict size/resource usage of drools session In-Reply-To: References: <1399558963156-4029486.post@n3.nabble.com> Message-ID: <1399560931755-4029488.post@n3.nabble.com> I was thinking of having a master session that can listen to activation events of the child sessions, and then can take action should a threshold be breached. Can you recommend what eventlisteners would be useful in this scenario? -- View this message in context: http://drools.46999.n3.nabble.com/Restrict-size-resource-usage-of-drools-session-tp4029486p4029488.html Sent from the Drools: User forum mailing list archive at Nabble.com. From wolfgang.laun at gmail.com Thu May 8 11:39:24 2014 From: wolfgang.laun at gmail.com (Wolfgang Laun) Date: Thu, 8 May 2014 17:39:24 +0200 Subject: [rules-users] Restrict size/resource usage of drools session In-Reply-To: <1399560931755-4029488.post@n3.nabble.com> References: <1399558963156-4029486.post@n3.nabble.com> <1399560931755-4029488.post@n3.nabble.com> Message-ID: If you can set a limit for activations following one insert, an AgendaEventListener registering Before/AfterMatchFired is the natural choice. You might also limit secondary insertions (WorkingMemoryEventListener: ObjectInsertedEvent) or fact updates (ObjectUpdatedEvent). All of this is highly dependent on the scenarios enacted by the rule set. -W On 08/05/2014, kurrent93 wrote: > I was thinking of having a master session that can listen to activation > events of the child sessions, and then can take action should a threshold > be > breached. > > Can you recommend what eventlisteners would be useful in this scenario? > > > > -- > View this message in context: > http://drools.46999.n3.nabble.com/Restrict-size-resource-usage-of-drools-session-tp4029486p4029488.html > Sent from the Drools: User forum mailing list archive at Nabble.com. > _______________________________________________ > rules-users mailing list > rules-users at lists.jboss.org > https://lists.jboss.org/mailman/listinfo/rules-users > From kurrent93 at gmail.com Thu May 8 11:46:40 2014 From: kurrent93 at gmail.com (kurrent93) Date: Thu, 8 May 2014 08:46:40 -0700 (PDT) Subject: [rules-users] Restrict size/resource usage of drools session In-Reply-To: References: <1399558963156-4029486.post@n3.nabble.com> <1399560931755-4029488.post@n3.nabble.com> Message-ID: <1399564000087-4029490.post@n3.nabble.com> Thanks, yes good idea. I will look into that. -- View this message in context: http://drools.46999.n3.nabble.com/Restrict-size-resource-usage-of-drools-session-tp4029486p4029490.html Sent from the Drools: User forum mailing list archive at Nabble.com. From ashishna at gmail.com Thu May 8 20:06:52 2014 From: ashishna at gmail.com (Ashish Nayyar) Date: Fri, 9 May 2014 10:06:52 +1000 Subject: [rules-users] Not able to use in Kie Spring Message-ID: Hi, I am trying to include a another kbase in KIE Spring project. This is the configuration *knowledge-services.xml* *kmodule.xml* My KIE modules are discovered and I can see following in the logs 09:59:36,642 DEBUG [org.drools.compiler.kie.builder.impl.ClasspathKieProject] (ServerService Thread Pool -- 91) Found and used pom.properties META-INF/maven/au.org.nps.dsaas/rules-repository/pom.properties 09:59:36,645 DEBUG [org.drools.compiler.kie.builder.impl.ClasspathKieProject] (ServerService Thread Pool -- 91) Discovered classpath module au.org.nps.dsaas:rules-repository:0.0.1-SNAPSHOT But Spring context fails to load and I get the following errors: 09:59:39,547 ERROR [org.drools.compiler.kie.builder.impl.AbstractKieModule] (ServerService Thread Pool -- 91) Unable to build KieBase, could not find include: rules1Package As per the official documentation ( http://docs.jboss.org/drools/release/6.0.1.Final/drools-docs/html/ch.kie.spring.html) , I can use the includes property of KBASE tag provided in Spring KIE. I am using kie spring 6.1.0 Beta Any suggestions? Thanks Ashish -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.jboss.org/pipermail/rules-users/attachments/20140509/b72af976/attachment.html From bijkerkrick at hotmail.com Fri May 9 05:20:52 2014 From: bijkerkrick at hotmail.com (dBijkoo) Date: Fri, 9 May 2014 02:20:52 -0700 (PDT) Subject: [rules-users] Drools Planner: what if possible values of a PlanningVariable are dependent of another one? In-Reply-To: References: <50C7A4D3.7050900@van.asperen.org> <50C8B0A4.5090407@gmail.com> <1399536518225-4029480.post@n3.nabble.com> <1399552716058-4029484.post@n3.nabble.com> Message-ID: <1399627252831-4029492.post@n3.nabble.com> ge0ffrey wrote > On 08-05-14 14:38, dBijkoo wrote: >> ge0ffrey wrote >>> In OptaPlanner's architecture current philosophy, this is not legal: >>> a value range should be stable for each variable (of each entity) during >>> solving. >>> This not guaranteed to work (and it is guaranteed not to work if you do >>> phase caching of moves: >>> it will invalidly exclude part of the search space). >> So if I understand you correctly phase caching moves is the way to go? > No > Phase caching moves is definitely NOT the way to go :) > Phase caching means it caches as moves at the beginning of the solver > phase. > So as some variables change value in steps, the possible move set doesn't. Ah yes I see, misread it. ge0ffrey wrote > Anyway, what is the recommended solution? > Not sure. > > A) Either just allow all combinations, that will work. > > B) Or try > @Entity class Observation { > @Variable block; > } > @Entity class Block { > @Variable("periodRange) period; > @VariableProvider("periodRange") getPeriodRange(); > } > > Not sure if this matches for your case - multiple Observations might > share the same Block for a different period... > > This is allowed - (it's called ValueRange from planning entity) and more > deeply supported (although it does have a few limits too). > > C) Or try > > class BlockPeriod { > Block; > Period; > } > @Entity class Observation { > @Variable BlockPeriod; > } > > Hmm. I like alternative C! I thought of option B myself aswell, a valid solution (since multiple Observations should be using the same block) but couldnt get it working. >From what I understand it should be used like this: @ValueRange(type = ValueRangeType.FROM_PLANNING_ENTITY_PROPERTY) But the only time I have seen the above used was in a version 5.5 or lower (I'm using 6.0.1.Final) and my optaplanner-core dependency can't find @ValueRange annotation. I however did notice use of something similiar in the 6.0.1 documentation (http://docs.jboss.org/drools/release/6.0.1.Final/optaplanner-docs/html_single/index.html#d0e2678) look for "4.3.5.2.2. ValueRangeProvider on a planning entity". But can't seem to find the code for this in the 6.0.1.Final code example. So basically my question comes down to how do i use "ValueRange from planning entity" I tried searching for it but couldn't find it anywehere except on version 5.5 or below as describer above. -- View this message in context: http://drools.46999.n3.nabble.com/rules-users-Drools-Planner-what-if-possible-values-of-a-PlanningVariable-are-dependent-of-another-on-tp4021175p4029492.html Sent from the Drools: User forum mailing list archive at Nabble.com. From bijkerkrick at hotmail.com Fri May 9 05:39:43 2014 From: bijkerkrick at hotmail.com (dBijkoo) Date: Fri, 9 May 2014 02:39:43 -0700 (PDT) Subject: [rules-users] Drools Planner: what if possible values of a PlanningVariable are dependent of another one? In-Reply-To: <1399627252831-4029492.post@n3.nabble.com> References: <50C7A4D3.7050900@van.asperen.org> <50C8B0A4.5090407@gmail.com> <1399536518225-4029480.post@n3.nabble.com> <1399552716058-4029484.post@n3.nabble.com> <1399627252831-4029492.post@n3.nabble.com> Message-ID: <1399628383507-4029493.post@n3.nabble.com> ignore post above misread your statement about option B Option B will not work if a block contains multiple observations as you stated, which is the case in my problem. -- View this message in context: http://drools.46999.n3.nabble.com/rules-users-Drools-Planner-what-if-possible-values-of-a-PlanningVariable-are-dependent-of-another-on-tp4021175p4029493.html Sent from the Drools: User forum mailing list archive at Nabble.com. From jlprat at gmail.com Fri May 9 05:51:27 2014 From: jlprat at gmail.com (jlprat) Date: Fri, 9 May 2014 02:51:27 -0700 (PDT) Subject: [rules-users] Rules don't execute using MVEL syntax in RHS - Possible Bug Message-ID: <1399629087446-4029494.post@n3.nabble.com> Hi all, I'm developing an application with Drools 6.0.1.Final and I'm encountering a really strange problem I can't understand, and which I think it's due to a bug in MVEL. I'm running some rules using fireUntilHalt and if I use the MVEL syntax withing the RHS to access some bean properties, some rules don't get executed when they should. However if I replace the bean property syntax sugar for the real getter method, everything works as it should. I've created a little gist to illustrate this problem, it contains 2 drools versions (one using MVEL another without) and a test to check the behavior. You can check it Rule is not fired Does anybody have an idea why this is happening? Thank you in advance. Josep Prat -- View this message in context: http://drools.46999.n3.nabble.com/Rules-don-t-execute-using-MVEL-syntax-in-RHS-Possible-Bug-tp4029494.html Sent from the Drools: User forum mailing list archive at Nabble.com. From wolfgang.laun at gmail.com Fri May 9 06:46:04 2014 From: wolfgang.laun at gmail.com (Wolfgang Laun) Date: Fri, 9 May 2014 12:46:04 +0200 Subject: [rules-users] Rules don't execute using MVEL syntax in RHS - Possible Bug In-Reply-To: <1399629087446-4029494.post@n3.nabble.com> References: <1399629087446-4029494.post@n3.nabble.com> Message-ID: MVEL has nothing to do with the possibility of using abcXyz in a constraint instead of the more cumbersome getAbcXyz(). Actually, abcXyz is the "native" way of accessing a fact's attribute from within DRL patterns. So, if getAbcXyz() works, but abcXyz does not, I suspect that something else is amiss, perhaps in the code of AnEvent.java, which hasn't been posted. -W On 09/05/2014, jlprat wrote: > Hi all, > > I'm developing an application with Drools 6.0.1.Final and I'm encountering > a > really strange problem I can't understand, and which I think it's due to a > bug in MVEL. > > I'm running some rules using fireUntilHalt and if I use the MVEL syntax > withing the RHS to access some bean properties, some rules don't get > executed when they should. However if I replace the bean property syntax > sugar for the real getter method, everything works as it should. > > I've created a little gist to illustrate this problem, it contains 2 drools > versions (one using MVEL another without) and a test to check the behavior. > You can check it Rule is not fired > > > Does anybody have an idea why this is happening? > > > Thank you in advance. > Josep Prat > > > > -- > View this message in context: > http://drools.46999.n3.nabble.com/Rules-don-t-execute-using-MVEL-syntax-in-RHS-Possible-Bug-tp4029494.html > Sent from the Drools: User forum mailing list archive at Nabble.com. > _______________________________________________ > rules-users mailing list > rules-users at lists.jboss.org > https://lists.jboss.org/mailman/listinfo/rules-users > From jlprat at gmail.com Fri May 9 07:00:27 2014 From: jlprat at gmail.com (jlprat) Date: Fri, 9 May 2014 04:00:27 -0700 (PDT) Subject: [rules-users] Rules don't execute using MVEL syntax in RHS - Possible Bug In-Reply-To: References: <1399629087446-4029494.post@n3.nabble.com> Message-ID: <1399633227201-4029496.post@n3.nabble.com> Hi, I added the AnEvent class in the gist. You can check it out now: https://gist.github.com/jlprat/f20e6dbe976cff163d2c Best, Josep -- View this message in context: http://drools.46999.n3.nabble.com/Rules-don-t-execute-using-MVEL-syntax-in-LHS-Possible-Bug-tp4029494p4029496.html Sent from the Drools: User forum mailing list archive at Nabble.com. From wolfgang.laun at gmail.com Fri May 9 12:42:16 2014 From: wolfgang.laun at gmail.com (Wolfgang Laun) Date: Fri, 9 May 2014 18:42:16 +0200 Subject: [rules-users] Rules don't execute using MVEL syntax in RHS - Possible Bug In-Reply-To: <1399633227201-4029496.post@n3.nabble.com> References: <1399629087446-4029494.post@n3.nabble.com> <1399633227201-4029496.post@n3.nabble.com> Message-ID: You are using a class called KnowledgeBuilder. With Drools 6, it is KieBuilder. Here is some simple code, good for testing (as I used it), although more sophisticated build procedures are recommended using maven and what not. - Both DRL versions (getAbxDef and abcDef) appear to work with 6.0.0 Final. KieServices kieServices = KieServices.Factory.get(); KieFileSystem kfs = kieServices.newKieFileSystem(); FileInputStream fis = new FileInputStream( "lostrule/lostrule.drl" ); kfs.write( "src/main/resources/lostrule.drl", kieServices.getResources().newInputStreamResource( fis ) ); KieBuilder kieBuilder = kieServices.newKieBuilder( kfs ).buildAll(); Results results = kieBuilder.getResults(); if( results.hasMessages( Message.Level.ERROR ) ){ System.out.println( results.getMessages() ); throw new IllegalStateException( "### errors ###" ); } KieContainer kieContainer = kieServices.newKieContainer( kieServices.getRepository().getDefaultReleaseId() ); KieBaseConfiguration config = kieServices.newKieBaseConfiguration(); config.setOption(EventProcessingOption.STREAM); KieBase kieBase = kieContainer.newKieBase( config ); kieSession = kieContainer.newKieSession(); On 09/05/2014, jlprat wrote: > Hi, > I added the AnEvent class in the gist. You can check it out now: > https://gist.github.com/jlprat/f20e6dbe976cff163d2c > > Best, > Josep > > > > -- > View this message in context: > http://drools.46999.n3.nabble.com/Rules-don-t-execute-using-MVEL-syntax-in-LHS-Possible-Bug-tp4029494p4029496.html > Sent from the Drools: User forum mailing list archive at Nabble.com. > _______________________________________________ > rules-users mailing list > rules-users at lists.jboss.org > https://lists.jboss.org/mailman/listinfo/rules-users > From mproctor at codehaus.org Fri May 9 13:38:11 2014 From: mproctor at codehaus.org (Mark Proctor) Date: Fri, 9 May 2014 18:38:11 +0100 Subject: [rules-users] Not able to use in Kie Spring In-Reply-To: References: Message-ID: It would well be missed out. Could you write a unit test, so we can catch regressions and submit as a pull request please? When prove the problem with a test, open a jira and put the jira ID in the comment, as per the ?getting involved? docs Example unit tests for kie-spring: https://github.com/vinodkiran/droolsjbpm-integration/tree/kmodule-spring/kie-spring/src/test/java/org/kie/spring/tests Gettig involved, how to do pull requests etc: https://docs.jboss.org/drools/release/6.1.0.Beta3/drools-docs/html/Welcome.html#gettingstarted Mark On 9 May 2014, at 01:06, Ashish Nayyar wrote: > Hi, > > I am trying to include a another kbase in KIE Spring project. This is the configuration > > knowledge-services.xml > > > > > > > > > > > kmodule.xml > > > > > > > > My KIE modules are discovered and I can see following in the logs > > 09:59:36,642 DEBUG [org.drools.compiler.kie.builder.impl.ClasspathKieProject] (ServerService Thread Pool -- 91) Found and used pom.properties META-INF/maven/au.org.nps.dsaas/rules-repository/pom.properties > 09:59:36,645 DEBUG [org.drools.compiler.kie.builder.impl.ClasspathKieProject] (ServerService Thread Pool -- 91) Discovered classpath module au.org.nps.dsaas:rules-repository:0.0.1-SNAPSHOT > > But Spring context fails to load and I get the following errors: > > 09:59:39,547 ERROR [org.drools.compiler.kie.builder.impl.AbstractKieModule] (ServerService Thread Pool -- 91) Unable to build KieBase, could not find include: rules1Package > > As per the official documentation (http://docs.jboss.org/drools/release/6.0.1.Final/drools-docs/html/ch.kie.spring.html) , I can use the includes property of KBASE tag provided in Spring KIE. I am using kie spring 6.1.0 Beta > > Any suggestions? > > Thanks > Ashish > > _______________________________________________ > rules-users mailing list > rules-users at lists.jboss.org > https://lists.jboss.org/mailman/listinfo/rules-users -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.jboss.org/pipermail/rules-users/attachments/20140509/75e0bfb4/attachment.html From mproctor at codehaus.org Fri May 9 18:14:50 2014 From: mproctor at codehaus.org (Mark Proctor) Date: Fri, 9 May 2014 23:14:50 +0100 Subject: [rules-users] Multiple threads for KieBuilder In-Reply-To: <1399539886095-4029481.post@n3.nabble.com> References: <1399539886095-4029481.post@n3.nabble.com> Message-ID: This is not possible in the public api now, but it seems like this approach would be a valid thing to add to the internal core of Drools. So that we do parallel compilation, seamlessly, for all our users. I?m not sure when we?ll have time to do it, although maybe someone from the community can work with us to do this? Mark On 8 May 2014, at 10:04, RichardAmbridge wrote: > Hi, > > We have over 20000 rules in our drools implementation. In drools 5 we > could build multiple packages in different threads and then create a > Knowledge base joining all those packages together. > e.g. > Thread: > knowledgeB = KnowledgeBuilderFactory.newKnowledgeBuilder(); > knowledgeB.add(ResourceFactory.newReaderResource(new > StringReader(sb.toString())), ResourceType.DRL); > > Then in the main compiler, once all threads have finished > KnowledgeBase knowledgeBase = > KnowledgeBaseFactory.newKnowledgeBase(conf); > for each thread: > > knowledgeBase.addKnowledgePackages(thrds[t].getKnowledgeB().getKnowledgePackages()); > > > I can't seem to find anyway to do that with the new KIE implementation. > > What I would like to do is something like: > > Thread: > Create sb to have lots of rules > KieServices kieServices = KieServices.Factory.get(); > > KieFileSystem kfs = kieServices.newKieFileSystem(); > kfs.write("src/main/resources/rules.drl", sb.toString()); > > KieBuilder kieBuilder = kieServices.newKieBuilder(kfs); > kieBuilder.buildAll(); > ..check errors > KieContainer kieContainer = > kieServices.newKieContainer(kieBuilder.getKieModule().getReleaseId()); > KieBase kieBase = kieContainer.newKieBase(kieBaseConfiguration); > > In main compiling, create multiple threads, each with its own rule set. > > Then when all threads completed, take all the kieBase objects and merge into > one base. > then KieSession ksession=mergedKieBase.newKieSession(); > > We compile our rules offline and then load into our running servers. The > compile server is a multicore server, but buildAll is single threaded. > > Is this possible? > > Many thanks for the support, > Ric > > > > > > > -- > View this message in context: http://drools.46999.n3.nabble.com/Multiple-threads-for-KieBuilder-tp4029481.html > Sent from the Drools: User forum mailing list archive at Nabble.com. > _______________________________________________ > rules-users mailing list > rules-users at lists.jboss.org > https://lists.jboss.org/mailman/listinfo/rules-users From ephemeris.lappis at gmail.com Sat May 10 05:36:13 2014 From: ephemeris.lappis at gmail.com (Ephemeris Lappis) Date: Sat, 10 May 2014 02:36:13 -0700 (PDT) Subject: [rules-users] Any form of "groub by" or "distinct" in accumulate/collect ? Message-ID: <1399714573306-4029501.post@n3.nabble.com> Hello. Perhaps that my question has few sense or none... I've an object graph with say A, B and C. A has one or many B, that has one or many C. I can navigate through the relations between my objects in both direction. For example, I can do fo any instance of C : c.b.a (or c.getB().getA())... My initial input facts or only C objects, and I'd like to identify all the distinct A instances, and insert them into my working memory, as they participate to global rules. I've been looking for some forms of accumulate or collect, but I've not found a correct way to do it. Some help ? Thanks Regards. -- View this message in context: http://drools.46999.n3.nabble.com/Any-form-of-groub-by-or-distinct-in-accumulate-collect-tp4029501.html Sent from the Drools: User forum mailing list archive at Nabble.com. From newohybat at gmail.com Sat May 10 13:06:31 2014 From: newohybat at gmail.com (=?UTF-8?B?SmFuIMWgxaVhc3Ruw70=?=) Date: Sat, 10 May 2014 19:06:31 +0200 Subject: [rules-users] Any form of "groub by" or "distinct" in accumulate/collect ? In-Reply-To: <1399714573306-4029501.post@n3.nabble.com> References: <1399714573306-4029501.post@n3.nabble.com> Message-ID: <536E5C97.2010705@gmail.com> Hi, maybe I misunderstood you, but what about a set collection. Just implementd equals method of A properly and use accumulate function collectList when accumulate( C( $a:b.a ) , $uniqueASet:collectSet($a) ) then do whatever you want Hope that helped. Jan Dne 10.5.2014 11:36, Ephemeris Lappis napsal(a): > Hello. > > Perhaps that my question has few sense or none... > > I've an object graph with say A, B and C. > A has one or many B, that has one or many C. > > I can navigate through the relations between my objects in both direction. > For example, I can do fo any instance of C : c.b.a (or c.getB().getA())... > > My initial input facts or only C objects, and I'd like to identify all the > distinct A instances, and insert them into my working memory, as they > participate to global rules. > > I've been looking for some forms of accumulate or collect, but I've not > found a correct way to do it. > > Some help ? > > Thanks > > Regards. > > > > -- > View this message in context: http://drools.46999.n3.nabble.com/Any-form-of-groub-by-or-distinct-in-accumulate-collect-tp4029501.html > Sent from the Drools: User forum mailing list archive at Nabble.com. > _______________________________________________ > rules-users mailing list > rules-users at lists.jboss.org > https://lists.jboss.org/mailman/listinfo/rules-users From Jeremy.D.Branham at sprint.com Sun May 11 00:35:32 2014 From: Jeremy.D.Branham at sprint.com (Branham, Jeremy [HR]) Date: Sun, 11 May 2014 04:35:32 +0000 Subject: [rules-users] Development lifecycle Message-ID: I am planning a new Drools architecture, and looking for the best way to migrate Drools rules through a series of environments. Our typical SDLC involves an initial DEV environment, then migrating to one of several TEST environments, then to an ORT environment, then finally to a PROD environment. The question has been asked a couple times, looking through the mail archives, but I'm curious if there have been any recent changes that could improve the development lifecycle. I've read we could just use the import/export function, or the following two options - Mentions Jackrabbit http://article.gmane.org/gmane.comp.java.drools.user/25097/match=production+migration Using the Rest interface https://community.jboss.org/wiki/PublishDroolsartifactsfromaproductionenvironment Anything else, or any best practice for this? Thanks! Jeremy D. Branham Technology Architect Sprint University Performance Support Fort Worth, TX | Tel: **DOTNET Office: +1 (972) 405-2970| Mobile: +1 (817) 791-1627 ________________________________ This e-mail may contain Sprint proprietary information intended for the sole use of the recipient(s). Any use by others is prohibited. If you are not the intended recipient, please contact the sender and delete all copies of the message. -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.jboss.org/pipermail/rules-users/attachments/20140511/da363537/attachment.html From ephemeris.lappis at gmail.com Sun May 11 03:27:35 2014 From: ephemeris.lappis at gmail.com (Ephemeris Lappis) Date: Sun, 11 May 2014 09:27:35 +0200 Subject: [rules-users] Any form of "groub by" or "distinct" in accumulate/collect ? In-Reply-To: <536E5C97.2010705@gmail.com> References: <1399714573306-4029501.post@n3.nabble.com> <536E5C97.2010705@gmail.com> Message-ID: <536F2667.2090700@gmail.com> Hello. It seems a quite good idea. On the way of "accumulate " or "collect", I've been thinking before such a solution... Injection of the collected elements remains to be done. I will try it with a concrete data set and verify that the collection time is acceptable. I'll let you know about the results. Thanks. Regards. Ephemeris Lappis Le 10/05/2014 19:06, Jan ??astn? a ?crit : > Hi, > maybe I misunderstood you, but what about a set collection. Just > implementd equals method of A properly and use accumulate function > collectList > when > accumulate( > C( > $a:b.a > ) > , $uniqueASet:collectSet($a) > ) > then > do whatever you want > > Hope that helped. > Jan > > Dne 10.5.2014 11:36, Ephemeris Lappis napsal(a): >> Hello. >> >> Perhaps that my question has few sense or none... >> >> I've an object graph with say A, B and C. >> A has one or many B, that has one or many C. >> >> I can navigate through the relations between my objects in both direction. >> For example, I can do fo any instance of C : c.b.a (or c.getB().getA())... >> >> My initial input facts or only C objects, and I'd like to identify all the >> distinct A instances, and insert them into my working memory, as they >> participate to global rules. >> >> I've been looking for some forms of accumulate or collect, but I've not >> found a correct way to do it. >> >> Some help ? >> >> Thanks >> >> Regards. >> >> >> >> -- >> View this message in context: http://drools.46999.n3.nabble.com/Any-form-of-groub-by-or-distinct-in-accumulate-collect-tp4029501.html >> Sent from the Drools: User forum mailing list archive at Nabble.com. >> _______________________________________________ >> rules-users mailing list >> rules-users at lists.jboss.org >> https://lists.jboss.org/mailman/listinfo/rules-users > _______________________________________________ > rules-users mailing list > rules-users at lists.jboss.org > https://lists.jboss.org/mailman/listinfo/rules-users > From mproctor at codehaus.org Sun May 11 12:02:50 2014 From: mproctor at codehaus.org (Mark Proctor) Date: Sun, 11 May 2014 17:02:50 +0100 Subject: [rules-users] Development lifecycle In-Reply-To: References: Message-ID: If it?s a new Drools architecture, I?d recommend you use 6.1 beta3. We use GIT for source and Maven for artefacts. You an setup different maven repo?s for dev, stage and prod and create a copy routine to move the jars between the environments (or use a tool like sonatype). Mark On 11 May 2014, at 05:35, Branham, Jeremy [HR] wrote: > I am planning a new Drools architecture, and looking for the best way to migrate Drools rules through a series of environments. > Our typical SDLC involves an initial DEV environment, then migrating to one of several TEST environments, then to an ORT environment, then finally to a PROD environment. > > The question has been asked a couple times, looking through the mail archives, but I?m curious if there have been any recent changes that could improve the development lifecycle. > I?ve read we could just use the import/export function, or the following two options - > > Mentions Jackrabbit > http://article.gmane.org/gmane.comp.java.drools.user/25097/match=production+migration > > Using the Rest interface > https://community.jboss.org/wiki/PublishDroolsartifactsfromaproductionenvironment > > Anything else, or any best practice for this? > > Thanks! > > > Jeremy D. Branham > Technology Architect > Sprint University Performance Support > Fort Worth, TX | Tel: **DOTNET > Office: +1 (972) 405-2970| Mobile: +1 (817) 791-1627 > > > > > This e-mail may contain Sprint proprietary information intended for the sole use of the recipient(s). Any use by others is prohibited. If you are not the intended recipient, please contact the sender and delete all copies of the message. > _______________________________________________ > rules-users mailing list > rules-users at lists.jboss.org > https://lists.jboss.org/mailman/listinfo/rules-users -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.jboss.org/pipermail/rules-users/attachments/20140511/d640d114/attachment.html From mproctor at codehaus.org Sun May 11 19:00:42 2014 From: mproctor at codehaus.org (Mark Proctor) Date: Mon, 12 May 2014 00:00:42 +0100 Subject: [rules-users] Anyone want to help on our new Rule Algorithm? Message-ID: <08CAFEF8-E230-4FE5-96CE-1B25B0525FE2@codehaus.org> If anyone is interested in helping out on our next generation rule algorithm, we?ll offer personal mentoring to get you started on your way. Just ping my email directly, to discuss: http://blog.athico.com/2013/11/rip-rete-time-to-get-phreaky.html Mark From mproctor at codehaus.org Sun May 11 23:24:52 2014 From: mproctor at codehaus.org (Mark Proctor) Date: Mon, 12 May 2014 04:24:52 +0100 Subject: [rules-users] Anyone want to help on our new Rule Algorithm? In-Reply-To: <08CAFEF8-E230-4FE5-96CE-1B25B0525FE2@codehaus.org> References: <08CAFEF8-E230-4FE5-96CE-1B25B0525FE2@codehaus.org> Message-ID: <3FDAC646-A55A-47FE-B4A5-A81E40B1D2C0@codehaus.org> A first good topic, now that we build and propagate tuple sets, is can we parallelism our joins? Look at the insert loop, on line 94. So it iterates and builds a resulting tuple set, which is eventually propagated. Can that set be built in parallel? https://github.com/droolsjbpm/drools/blob/master/drools-core/src/main/java/org/drools/core/phreak/PhreakJoinNode.java The key aspect is the iterator right memory. While that memory may or may not be indexed, it always returns a list. In the case of indexing, the list will sublist for that overall memory. Ideally those lists will be adaptive, only turning on parallel iteration when appropriate (enough joins), while trying to avoid any additional cost when parallel iteration is not used. Note currently all lists, are liked lists - we do not use arrays. Once that works, the other methods, right insert, update and delete can all be parallelized. Mark On 12 May 2014, at 00:00, Mark Proctor wrote: > If anyone is interested in helping out on our next generation rule algorithm, we?ll offer personal mentoring to get you started on your way. Just ping my email directly, to discuss: > http://blog.athico.com/2013/11/rip-rete-time-to-get-phreaky.html > > Mark From dushman at gmail.com Mon May 12 00:51:36 2014 From: dushman at gmail.com (dushman at gmail.com) Date: Sun, 11 May 2014 21:51:36 -0700 (PDT) Subject: [rules-users] Drools 6.0.1.Final compatibility Message-ID: <1399870296528-4029512.post@n3.nabble.com> hello,I use drools 5.6.0.Final with drools-spring (5.6.0.Final). Due to this bug i'm trying to upgrade to 6.0.1. But having trouble with drools-spring. what is the compatible drools-spring version for drools 6.0.1 ?Thanks,Dushman -- View this message in context: http://drools.46999.n3.nabble.com/Drools-6-0-1-Final-compatibility-tp4029512.html Sent from the Drools: User forum mailing list archive at Nabble.com. -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.jboss.org/pipermail/rules-users/attachments/20140511/67abe63b/attachment.html From bharadwaj2012 at gmail.com Mon May 12 01:05:53 2014 From: bharadwaj2012 at gmail.com (Bharadwaj N) Date: Mon, 12 May 2014 10:35:53 +0530 Subject: [rules-users] part time intern @ Red Hat In-Reply-To: <2DC4FBD3-499D-4250-BDE5-ECC560C6B595@codehaus.org> References: <58EEEA36-C53A-4007-847D-F9FB4D62DDE8@codehaus.org> <2DC4FBD3-499D-4250-BDE5-ECC560C6B595@codehaus.org> Message-ID: Hi, Any update on this? On Tue, Apr 1, 2014 at 6:35 PM, Mark Proctor wrote: > No, there will be one potential position. I will contact individuals who > showed interest shortly. > > Mark > > On 1 Apr 2014, at 13:13, Bharadwaj N wrote: > > So you are preparing a team? > > > On Tue, Apr 1, 2014 at 5:26 PM, Mark Proctor wrote: > >> Just confirming your email, I?m still waiting for all responses, before >> contacting people further. >> Mark >> >> On 21 Mar 2014, at 08:52, Bharadwaj N wrote: >> >> I am interested. please let me know the full details. >> >> >> >> >> >> Thanks, >> >> Bharadwaj nakka. >> Techlead at techmahindra. >> >> >> On Thu, Mar 20, 2014 at 9:28 PM, Mark Proctor wrote: >> >>> I have a small budget for a part time intern for one year, 12K USD. The >>> work can be 100% remote, from almost any country. This will mostly be UI >>> work, improving our workbench. >>> >>> If this interests you, email me off list. >>> >>> Mark >>> _______________________________________________ >>> rules-users mailing list >>> rules-users at lists.jboss.org >>> https://lists.jboss.org/mailman/listinfo/rules-users >>> >> >> _______________________________________________ >> rules-users mailing list >> rules-users at lists.jboss.org >> https://lists.jboss.org/mailman/listinfo/rules-users >> >> >> >> _______________________________________________ >> rules-users mailing list >> rules-users at lists.jboss.org >> https://lists.jboss.org/mailman/listinfo/rules-users >> > > _______________________________________________ > rules-users mailing list > rules-users at lists.jboss.org > https://lists.jboss.org/mailman/listinfo/rules-users > > > > _______________________________________________ > rules-users mailing list > rules-users at lists.jboss.org > https://lists.jboss.org/mailman/listinfo/rules-users > -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.jboss.org/pipermail/rules-users/attachments/20140512/ad69f39c/attachment.html From hagai.shatz at gmail.com Mon May 12 03:27:33 2014 From: hagai.shatz at gmail.com (Hagai) Date: Mon, 12 May 2014 00:27:33 -0700 (PDT) Subject: [rules-users] NullPointerException when calling ScoreDirector.beforeEntityAdded with new Vehicle In-Reply-To: <536926B7.6000706@gmail.com> References: <1399385879348-4029434.post@n3.nabble.com> <536926B7.6000706@gmail.com> Message-ID: <1399879653737-4029514.post@n3.nabble.com> Link to the opened JIRA: https://issues.jboss.org/browse/PLANNER-238 -- View this message in context: http://drools.46999.n3.nabble.com/NullPointerException-when-calling-ScoreDirector-beforeEntityAdded-with-new-Vehicle-tp4029434p4029514.html Sent from the Drools: User forum mailing list archive at Nabble.com. From hagai.shatz at gmail.com Mon May 12 04:16:37 2014 From: hagai.shatz at gmail.com (Hagai) Date: Mon, 12 May 2014 01:16:37 -0700 (PDT) Subject: [rules-users] How to implement immovable planning entities for vehicle routing problem? In-Reply-To: References: <1399479753704-4029467.post@n3.nabble.com> Message-ID: <1399882597570-4029515.post@n3.nabble.com> JIRA link: https://issues.jboss.org/browse/PLANNER-239 -- View this message in context: http://drools.46999.n3.nabble.com/How-to-implement-immovable-planning-entities-for-vehicle-routing-problem-tp4029467p4029515.html Sent from the Drools: User forum mailing list archive at Nabble.com. From ge0ffrey.spam at gmail.com Mon May 12 04:28:31 2014 From: ge0ffrey.spam at gmail.com (Geoffrey De Smet) Date: Mon, 12 May 2014 10:28:31 +0200 Subject: [rules-users] NullPointerException when calling ScoreDirector.beforeEntityAdded with new Vehicle In-Reply-To: <1399879653737-4029514.post@n3.nabble.com> References: <1399385879348-4029434.post@n3.nabble.com> <536926B7.6000706@gmail.com> <1399879653737-4029514.post@n3.nabble.com> Message-ID: <5370862F.8050201@gmail.com> Thanks for reporting (for both jira's) On 12-05-14 09:27, Hagai wrote: > Link to the opened JIRA: https://issues.jboss.org/browse/PLANNER-238 > > > > > -- > View this message in context: http://drools.46999.n3.nabble.com/NullPointerException-when-calling-ScoreDirector-beforeEntityAdded-with-new-Vehicle-tp4029434p4029514.html > Sent from the Drools: User forum mailing list archive at Nabble.com. > _______________________________________________ > rules-users mailing list > rules-users at lists.jboss.org > https://lists.jboss.org/mailman/listinfo/rules-users > From jlprat at gmail.com Mon May 12 06:28:44 2014 From: jlprat at gmail.com (jlprat) Date: Mon, 12 May 2014 03:28:44 -0700 (PDT) Subject: [rules-users] Rules don't execute using MVEL syntax in RHS - Possible Bug In-Reply-To: References: <1399629087446-4029494.post@n3.nabble.com> <1399633227201-4029496.post@n3.nabble.com> Message-ID: <1399890524929-4029517.post@n3.nabble.com> Hi, I updated my test code to use your way of creating the Knowledge Base (using KieBase) and I have the exact same results. Does anyone have an idea why this is still failing? Furthermore, I think the way I was initializing my rules is also supported by Drools 6, because it's almost copied line by line from the Official Drools API page: https://docs.jboss.org/drools/release/6.0.1.Final/kie-api-javadoc/ / A Typical example to load a rule resource. KnowledgeBuilder kbuilder = KnowledgeBuilderFactory.newKnowledgeBuilder(); kbuilder.add( ResourceFactory.newUrlResource( url ), ResourceType.DRL ); if ( kbuilder.hasErrors() ) { System.err.println( builder.getErrors().toString() ); } KnowledgeBase kbase = KnowledgeBaseFactory.newKnowledgeBase(); kbase.addKnowledgePackages( builder.getKnowledgePackages() ); StatefulKnowledgeSession ksession = knowledgeBase.newStatefulKnowledgeSession(); ksession.insert( new Fibonacci( 10 ) ); ksession.fireAllRules(); ksession.dispose();/ Best, Josep -- View this message in context: http://drools.46999.n3.nabble.com/Rules-don-t-execute-using-MVEL-syntax-in-LHS-Possible-Bug-tp4029494p4029517.html Sent from the Drools: User forum mailing list archive at Nabble.com. From wolfgang.laun at gmail.com Mon May 12 07:21:30 2014 From: wolfgang.laun at gmail.com (Wolfgang Laun) Date: Mon, 12 May 2014 13:21:30 +0200 Subject: [rules-users] Rules don't execute using MVEL syntax in RHS - Possible Bug In-Reply-To: <1399890524929-4029517.post@n3.nabble.com> References: <1399629087446-4029494.post@n3.nabble.com> <1399633227201-4029496.post@n3.nabble.com> <1399890524929-4029517.post@n3.nabble.com> Message-ID: Repeated executions show varying results: sometimes it's OK, sometimes it isn't. I don't think it's a race condition in your code (although proper syncing on the map would be the "clean" way to go). I think that salience doesn't work properly )(6.0.0, OP used 6.0.1.), if a fact is matched unconditionally by a high salience rule and the same fact is matched using constraints in rules with lesser priority. (Wasn't this recognized before as a bug in 6.0.x?) -W On 12/05/2014, jlprat wrote: > Hi, > I updated my test code to use your way of creating the Knowledge Base > (using > KieBase) and I have the exact same results. Does anyone have an idea why > this is still failing? > > Furthermore, I think the way I was initializing my rules is also supported > by Drools 6, because it's almost copied line by line from the Official > Drools API page: > https://docs.jboss.org/drools/release/6.0.1.Final/kie-api-javadoc/ > > / > A Typical example to load a rule resource. > > KnowledgeBuilder kbuilder = KnowledgeBuilderFactory.newKnowledgeBuilder(); > kbuilder.add( ResourceFactory.newUrlResource( url ), > ResourceType.DRL ); > if ( kbuilder.hasErrors() ) { > System.err.println( builder.getErrors().toString() ); > } > > KnowledgeBase kbase = KnowledgeBaseFactory.newKnowledgeBase(); > kbase.addKnowledgePackages( builder.getKnowledgePackages() ); > > StatefulKnowledgeSession ksession = > knowledgeBase.newStatefulKnowledgeSession(); > ksession.insert( new Fibonacci( 10 ) ); > ksession.fireAllRules(); > > ksession.dispose();/ > > Best, > Josep > > > > -- > View this message in context: > http://drools.46999.n3.nabble.com/Rules-don-t-execute-using-MVEL-syntax-in-LHS-Possible-Bug-tp4029494p4029517.html > Sent from the Drools: User forum mailing list archive at Nabble.com. > _______________________________________________ > rules-users mailing list > rules-users at lists.jboss.org > https://lists.jboss.org/mailman/listinfo/rules-users > From drpatrick.cosmo at gmail.com Mon May 12 07:27:02 2014 From: drpatrick.cosmo at gmail.com (crosbis2) Date: Mon, 12 May 2014 04:27:02 -0700 (PDT) Subject: [rules-users] Excel Syntax in Decision Tables Message-ID: <1399894022361-4029520.post@n3.nabble.com> Hi, I have a rule i created in Guvnor which works fine (see below) But i can not create and import the same rule from a decision table. I can not get the syntax to match when i upload the xls and view source. Everything below "when" i have as a Condition Everything below "then" is an Action Line 7: will not import. How do you create empty brackets in excel? Line 9: how do i write this using the pattern / constraint approach in excel? same with Line 11 and 12? Any help would be greatly appreciated. 1. | rule "DecisionA_OptionsAndFutures" 2. | salience 0 3. | dialect "mvel" 4. | when 5. | SCOProduct( productBookingPointId == 1 , productTypeId in ( 4, 5, 20 ) ) 6. | RuleSet( ruleSetName == "SCODecisionPointA" ) 7. | taskTemplates : TaskTemplates( ) 8. | then 9. | TaskTemplate TaskTemplate1 = new TaskTemplate(); 10. | TaskTemplate1.setId( 12038 ); 11. | insert( TaskTemplate1 ); 12. | taskTemplates.addTaskTemplateIfNew( TaskTemplate1 ); 13. | end -- View this message in context: http://drools.46999.n3.nabble.com/Excel-Syntax-in-Decision-Tables-tp4029520.html Sent from the Drools: User forum mailing list archive at Nabble.com. From jlprat at gmail.com Mon May 12 07:30:43 2014 From: jlprat at gmail.com (jlprat) Date: Mon, 12 May 2014 04:30:43 -0700 (PDT) Subject: [rules-users] Rules don't execute using MVEL syntax in RHS - Possible Bug In-Reply-To: References: <1399629087446-4029494.post@n3.nabble.com> <1399633227201-4029496.post@n3.nabble.com> <1399890524929-4029517.post@n3.nabble.com> Message-ID: <1399894243043-4029521.post@n3.nabble.com> Hi, I also thing there is something buggy with salience and the planner. However, what puzzles me is that this behavior is changed when using the getter instead of the direct access to the property. Do you know if there is already a reported bug like this? If there is none, I will create one. BTW, when you say, "/proper syncing on the map/", what do you mean exactly? I don't have any map. Best, Josep -- View this message in context: http://drools.46999.n3.nabble.com/Rules-don-t-execute-using-MVEL-syntax-in-LHS-Possible-Bug-tp4029494p4029521.html Sent from the Drools: User forum mailing list archive at Nabble.com. From mario.fusco at gmail.com Mon May 12 08:15:21 2014 From: mario.fusco at gmail.com (Mario Fusco) Date: Mon, 12 May 2014 05:15:21 -0700 (PDT) Subject: [rules-users] Rules don't execute using MVEL syntax in RHS - Possible Bug In-Reply-To: <1399894243043-4029521.post@n3.nabble.com> References: <1399629087446-4029494.post@n3.nabble.com> <1399633227201-4029496.post@n3.nabble.com> <1399890524929-4029517.post@n3.nabble.com> <1399894243043-4029521.post@n3.nabble.com> Message-ID: <1399896921851-4029523.post@n3.nabble.com> Hi Josep, probably there are 2 different issues here, but I am not sure because I haven't run your test case yet. I'll do it asap. The first issue could be something similar to what has been already reported here https://issues.jboss.org/browse/DROOLS-311 As for the different behaviour you found in using the property name vs. accessing it with the getter the only thing I can say at the moment is that Wolfgang is right when he wrote that it doesn't depend on mvel. At the moment I think that you're just experiencing a weird side effect of the problem reported in DROOLS-311, but again I cannot be sure until I haven't given a run to your test case. I'll keep you updated on my findings. Thanks for having reported this, Mario -- View this message in context: http://drools.46999.n3.nabble.com/Rules-don-t-execute-using-MVEL-syntax-in-LHS-Possible-Bug-tp4029494p4029523.html Sent from the Drools: User forum mailing list archive at Nabble.com. From jlprat at gmail.com Mon May 12 08:19:49 2014 From: jlprat at gmail.com (jlprat) Date: Mon, 12 May 2014 05:19:49 -0700 (PDT) Subject: [rules-users] Rules don't execute using MVEL syntax in RHS - Possible Bug In-Reply-To: <1399896921851-4029523.post@n3.nabble.com> References: <1399629087446-4029494.post@n3.nabble.com> <1399633227201-4029496.post@n3.nabble.com> <1399890524929-4029517.post@n3.nabble.com> <1399894243043-4029521.post@n3.nabble.com> <1399896921851-4029523.post@n3.nabble.com> Message-ID: <1399897189817-4029524.post@n3.nabble.com> Anytime! I'll keep an eye on this :) Thanks for time! Josep -- View this message in context: http://drools.46999.n3.nabble.com/Rules-don-t-execute-using-MVEL-syntax-in-LHS-Possible-Bug-tp4029494p4029524.html Sent from the Drools: User forum mailing list archive at Nabble.com. From wolfgang.laun at gmail.com Mon May 12 09:09:57 2014 From: wolfgang.laun at gmail.com (Wolfgang Laun) Date: Mon, 12 May 2014 15:09:57 +0200 Subject: [rules-users] Rules don't execute using MVEL syntax in RHS - Possible Bug In-Reply-To: <1399894243043-4029521.post@n3.nabble.com> References: <1399629087446-4029494.post@n3.nabble.com> <1399633227201-4029496.post@n3.nabble.com> <1399890524929-4029517.post@n3.nabble.com> <1399894243043-4029521.post@n3.nabble.com> Message-ID: On 12/05/2014, jlprat wrote: > Hi, > I also thing there is something buggy with salience and the planner. > However, what puzzles me is that this behavior is changed when using the > getter instead of the direct access to the property. > > Do you know if there is already a reported bug like this? If there is none, > I will create one. > > BTW, when you say, "/proper syncing on the map/", what do you mean exactly? > I don't have any map. You have Map ruleCalls, which is updated from the event handler from the thread running fireUntilHalt() and checked in the thread inserting the events. The sleeps should be long enough, but it's not comme-il-faut. -W > > Best, > Josep > > > > -- > View this message in context: > http://drools.46999.n3.nabble.com/Rules-don-t-execute-using-MVEL-syntax-in-LHS-Possible-Bug-tp4029494p4029521.html > Sent from the Drools: User forum mailing list archive at Nabble.com. > _______________________________________________ > rules-users mailing list > rules-users at lists.jboss.org > https://lists.jboss.org/mailman/listinfo/rules-users > From jlprat at gmail.com Mon May 12 09:21:01 2014 From: jlprat at gmail.com (jlprat) Date: Mon, 12 May 2014 06:21:01 -0700 (PDT) Subject: [rules-users] Rules don't execute using MVEL syntax in RHS - Possible Bug In-Reply-To: References: <1399629087446-4029494.post@n3.nabble.com> <1399633227201-4029496.post@n3.nabble.com> <1399890524929-4029517.post@n3.nabble.com> <1399894243043-4029521.post@n3.nabble.com> Message-ID: <1399900861257-4029527.post@n3.nabble.com> Ah yeah, sorry I forgot about this Map. If you remove it and you just print in the standard output, you have the same behavior. I just used a map to have something to assert against, this test code it's not the best code I ever wrote Josep -- View this message in context: http://drools.46999.n3.nabble.com/Rules-don-t-execute-using-MVEL-syntax-in-LHS-Possible-Bug-tp4029494p4029527.html Sent from the Drools: User forum mailing list archive at Nabble.com. From wolfgang.laun at gmail.com Mon May 12 09:23:41 2014 From: wolfgang.laun at gmail.com (Wolfgang Laun) Date: Mon, 12 May 2014 15:23:41 +0200 Subject: [rules-users] Excel Syntax in Decision Tables In-Reply-To: <1399894022361-4029520.post@n3.nabble.com> References: <1399894022361-4029520.post@n3.nabble.com> Message-ID: Concerning line 7: You can prefix the empty pattern to another pattern: taskTemplates : TaskTemplates( ) RuleSet( r... ) Lines 9, 10, 11: You can't write this using the "pattern/constraint approach", it's Java statements. See the documentation. -W On 12/05/2014, crosbis2 wrote: > Hi, > > I have a rule i created in Guvnor which works fine (see below) > But i can not create and import the same rule from a decision table. I can > not get the syntax to match when i upload the xls and view source. > Everything below "when" i have as a Condition > Everything below "then" is an Action > > Line 7: will not import. How do you create empty brackets in excel? > Line 9: how do i write this using the pattern / constraint approach in > excel? same with > Line 11 and 12? > > Any help would be greatly appreciated. > > 1. | rule "DecisionA_OptionsAndFutures" > 2. | salience 0 > 3. | dialect "mvel" > 4. | when > 5. | SCOProduct( productBookingPointId == 1 , productTypeId in ( 4, > 5, 20 ) ) > 6. | RuleSet( ruleSetName == "SCODecisionPointA" ) > 7. | taskTemplates : TaskTemplates( ) > 8. | then > 9. | TaskTemplate TaskTemplate1 = new TaskTemplate(); > 10. | TaskTemplate1.setId( 12038 ); > 11. | insert( TaskTemplate1 ); > 12. | taskTemplates.addTaskTemplateIfNew( TaskTemplate1 ); > 13. | end > > > > > > > -- > View this message in context: > http://drools.46999.n3.nabble.com/Excel-Syntax-in-Decision-Tables-tp4029520.html > Sent from the Drools: User forum mailing list archive at Nabble.com. > _______________________________________________ > rules-users mailing list > rules-users at lists.jboss.org > https://lists.jboss.org/mailman/listinfo/rules-users > From drpatrick.cosmo at gmail.com Mon May 12 10:20:33 2014 From: drpatrick.cosmo at gmail.com (crosbis2) Date: Mon, 12 May 2014 07:20:33 -0700 (PDT) Subject: [rules-users] Excel Syntax in Decision Tables In-Reply-To: References: <1399894022361-4029520.post@n3.nabble.com> Message-ID: <1399904433528-4029529.post@n3.nabble.com> i'm still quite new to this i'm afriad. I've been able to get every line except 7 and 9 to import and look the exact same in "view source". I don't understand "prefix the empty pattern to another pattern:"? Say i only have one ruleset? So it looks like if i don't enter a value in the "variable" cells the condition doesn't appear after import. if i write TaskTemplates : TaskTemplates in the constraint cell and say 0 is the variable cell it imports correctly except for the unwanted 0. i.e.: TaskTemplates : TaskTemplates(0) if i don't enter a value in the "variable" cells the condition doesn't appear after import. TaskTemplates : TaskTemplates() same story applies with: TaskTemplate TaskTemplate1 = new TaskTemplate(); -- View this message in context: http://drools.46999.n3.nabble.com/Excel-Syntax-in-Decision-Tables-tp4029520p4029529.html Sent from the Drools: User forum mailing list archive at Nabble.com. From wolfgang.laun at gmail.com Mon May 12 10:37:38 2014 From: wolfgang.laun at gmail.com (Wolfgang Laun) Date: Mon, 12 May 2014 16:37:38 +0200 Subject: [rules-users] Excel Syntax in Decision Tables In-Reply-To: <1399904433528-4029529.post@n3.nabble.com> References: <1399894022361-4029520.post@n3.nabble.com> <1399904433528-4029529.post@n3.nabble.com> Message-ID: On 12/05/2014, crosbis2 wrote: > > > i'm still quite new to this i'm afriad. > I've been able to get every line except 7 and 9 to import and look the > exact same in "view source". > > I don't understand "prefix the empty pattern to another pattern:"? Say i > only have one ruleset? In this case you can use a more elaborate workaround TaskTemplates(/*$param*/) and use an 'X' in all the rows ;-) But are you sure you need a decision table for a table without a decision? > So it looks like if i don't enter a value in the "variable" cells the > condition doesn't appear after import. That's the whole point. - Are you sure you are using the right rule authoring mehtod? > if i write TaskTemplates : TaskTemplates in the constraint cell and say 0 > is > the variable cell it imports correctly except for the unwanted 0. i.e.: > > TaskTemplates : TaskTemplates(0) > > if i don't enter a value in the "variable" cells the condition doesn't > appear after import. > > TaskTemplates : TaskTemplates() > > same story applies with: > TaskTemplate TaskTemplate1 = new TaskTemplate(); Note that you can combine several Java statements into a single cell. Typically, there should be at least one value to be inserted into this code snippet and so you have something to put into the cells below. -W > > > > > > -- > View this message in context: > http://drools.46999.n3.nabble.com/Excel-Syntax-in-Decision-Tables-tp4029520p4029529.html > Sent from the Drools: User forum mailing list archive at Nabble.com. > _______________________________________________ > rules-users mailing list > rules-users at lists.jboss.org > https://lists.jboss.org/mailman/listinfo/rules-users > From AVarghese at verisk.com Mon May 12 11:05:38 2014 From: AVarghese at verisk.com (alanvarghese) Date: Mon, 12 May 2014 08:05:38 -0700 (PDT) Subject: [rules-users] Rules not picked when packaged inside the JAR In-Reply-To: References: <1398750710805-4029378.post@n3.nabble.com> <12175C44-DBE9-4E36-B6E9-DA6E4D786B78@codehaus.org> Message-ID: <1399907138229-4029531.post@n3.nabble.com> Hi, I have tried this without using spring. It does not work if the drl files are packaged inside a jar. I have to copy the drl files into my web application and also copy the kmodule.xml into my web application. I am using websphere and the drools 6.0.0.Final Thanks, Alan -- View this message in context: http://drools.46999.n3.nabble.com/Rules-not-picked-when-packaged-inside-the-JAR-tp4029378p4029531.html Sent from the Drools: User forum mailing list archive at Nabble.com. From drpatrick.cosmo at gmail.com Mon May 12 11:55:29 2014 From: drpatrick.cosmo at gmail.com (crosbis2) Date: Mon, 12 May 2014 08:55:29 -0700 (PDT) Subject: [rules-users] Excel Syntax in Decision Tables In-Reply-To: References: <1399894022361-4029520.post@n3.nabble.com> <1399904433528-4029529.post@n3.nabble.com> Message-ID: <1399910129756-4029532.post@n3.nabble.com> Thanks for the quick replies!! So am i naive in thinking if i get the source code of my imported decision table to match that of a predefined rule that the excel based rule will work? Thats what i have now: Example 1 is a validated working rule. Example 2 is a rule i imported into drools, they are the exact same in my eyes except separate statements are on the same line. the Validation image below is the error i received, how can this not validate if they are the same code? -- View this message in context: http://drools.46999.n3.nabble.com/Excel-Syntax-in-Decision-Tables-tp4029520p4029532.html Sent from the Drools: User forum mailing list archive at Nabble.com. From drpatrick.cosmo at gmail.com Mon May 12 11:58:13 2014 From: drpatrick.cosmo at gmail.com (crosbis2) Date: Mon, 12 May 2014 08:58:13 -0700 (PDT) Subject: [rules-users] Excel Syntax in Decision Tables In-Reply-To: <1399910129756-4029532.post@n3.nabble.com> References: <1399894022361-4029520.post@n3.nabble.com> <1399904433528-4029529.post@n3.nabble.com> <1399910129756-4029532.post@n3.nabble.com> Message-ID: <1399910293479-4029533.post@n3.nabble.com> The way it uploaded example 2 is the first image! example 1 corrosponds to decision A -- View this message in context: http://drools.46999.n3.nabble.com/Excel-Syntax-in-Decision-Tables-tp4029520p4029533.html Sent from the Drools: User forum mailing list archive at Nabble.com. From wolfgang.laun at gmail.com Mon May 12 12:23:07 2014 From: wolfgang.laun at gmail.com (Wolfgang Laun) Date: Mon, 12 May 2014 18:23:07 +0200 Subject: [rules-users] Excel Syntax in Decision Tables In-Reply-To: <1399910129756-4029532.post@n3.nabble.com> References: <1399894022361-4029520.post@n3.nabble.com> <1399904433528-4029529.post@n3.nabble.com> <1399910129756-4029532.post@n3.nabble.com> Message-ID: On 12/05/2014, crosbis2 wrote: > Thanks for the quick replies!! > > So am i naive in thinking if i get the source code of my imported decision > table to match that of a predefined rule that the excel based rule will > work? > > Thats what i have now: > Example 1 is a validated working rule. > Example 2 is a rule i imported into drools, they are the exact same in my > eyes except separate statements are on the same line. > > the Validation image below is the error i received, how can this not > validate if they are the same code? Nice try, but they are not the same code. An 's' is not equal to '1'. -W > > > > > > > > > > > -- > View this message in context: > http://drools.46999.n3.nabble.com/Excel-Syntax-in-Decision-Tables-tp4029520p4029532.html > Sent from the Drools: User forum mailing list archive at Nabble.com. > _______________________________________________ > rules-users mailing list > rules-users at lists.jboss.org > https://lists.jboss.org/mailman/listinfo/rules-users > From Cwen at regenstrief.org Mon May 12 15:17:43 2014 From: Cwen at regenstrief.org (Cwen) Date: Mon, 12 May 2014 12:17:43 -0700 (PDT) Subject: [rules-users] Wildcard or list directory in changeset? Message-ID: <1399922263704-4029536.post@n3.nabble.com> We set up a webdav to host all the pkg(s). We would like to dynamically adding pkg(s) into the directory. Is there a way to set up change-set.xml use wildcard to include all *.pkg under certain directory? We are on 5.5.0.Final. -- View this message in context: http://drools.46999.n3.nabble.com/Wildcard-or-list-directory-in-changeset-tp4029536.html Sent from the Drools: User forum mailing list archive at Nabble.com. From ronak.patel at hp.com Mon May 12 20:01:24 2014 From: ronak.patel at hp.com (Patel, Ronak (Autonomy)) Date: Tue, 13 May 2014 00:01:24 +0000 Subject: [rules-users] HTTP 401 Unauthorized when using KIE API on Workbench M2 repository Message-ID: <1B84B80A3500194EA7DFFE0EFF9C2CA647578D0F@G4W3206.americas.hpqcorp.net> I'm having trouble authenticating to access the Workbench Maven repository through the KIE API (kie-ci). My code is the following and fails on the second line with an exception that says something like module not found. I see the more specific 401 error in the local Maven repository in the resolver-status.properties file. KieServices ks = KieServices.Factory.get(); KieContainer kContainer = ks.newKieContainer(ks.newReleaseId("com.hp.pa.sample", "realestate", "LATEST")); I've tried putting in my settings.xml file both suggestions in https://bugzilla.redhat.com/show_bug.cgi?id=1059584#c4 (also saw the preemptive one in https://bugzilla.redhat.com/show_bug.cgi?id=1037556 and other threads/forums and bug reports), but I continue to get the same error. I did some further investigation using Fiddler and I see that the credentials are not being included in the HTTP request the code sends for resources in the Workbench Maven repository. I was expecting the basic authentication header to be in here. The HTTP request always looks like this (server name changed for security reasons): GET http://kiewbserver:8080/kie-drools-wb/maven2/com/hp/pa/sample/realestate/maven-metadata.xml HTTP/1.1 Host: kiewbserver:8080 Pragma: no-cache Cache-Control: no-cache, no-store Accept-Encoding: gzip Connection: keep-alive Connection: keep-alive Accept: */* User-Agent: Aether And the response is a typical HTTP/1.1 401 Unauthorized with the standard JBoss error page as the body. Using the composer feature in Fiddler, if I issue this same request with the basic authentication header included, it works, returning an HTTP 200 response with the requested file. If I remove the authentication requirement from the Maven repository using the workaround described in bug 1059584 (referenced above), all my code works fine. I followed the procedure to create a user for the Workbench on JBoss AS that is demonstrated in the start of this video: http://www.youtube.com/watch?v=vj3MNmiUnvY. That's the user whose credentials I've tried putting in my settings.xml. Is there anything else that needs to be done on the server side? Any other ideas on what I may have missed or how to debug this further? Thank you, Ronak Patel Software Designer HP Autonomy -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.jboss.org/pipermail/rules-users/attachments/20140513/6f980311/attachment-0001.html From zahid.ahmed at emirates.com Tue May 13 02:56:39 2014 From: zahid.ahmed at emirates.com (Zahid Ahmed) Date: Tue, 13 May 2014 06:56:39 +0000 Subject: [rules-users] Workbench and GIT Repo High Availability Message-ID: Hi, We are in a process of setting up a centralized drools6 Workbench in our organization. This way we can keep our assets and artefacts in a central location. We will make this central Workbench clustered for high availability. I have a few queries in regard to clustering the Workbench. Problem Statement As workbench is using GIT, this means we need to have an enterprise level GIT repository where all the assets get stored for Workbench. As GIT is file-system based , it in turn, calls for a clustered GIT server within the organization. Our organization will prefer to have a private GIT repository hosted within office network which is highly available and wants to avoid any cost for GIT repository setup. 1. I want to know how to make Workbench highly available , with GIT also Highly available. Is chapter# 18 VFS CLUSTERING is the answer to high available GIT and WORKBENCH both ? or is there any other way to make GIT repository highly available. 2. Will ZooKeeper and Helix be enough to make the clustered environment for both Workbench with its GIT repo ? Regards, Zahid Ahmed -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.jboss.org/pipermail/rules-users/attachments/20140513/94c4c6a8/attachment.html From ephemeris.lappis at gmail.com Tue May 13 03:35:02 2014 From: ephemeris.lappis at gmail.com (Ephemeris Lappis) Date: Tue, 13 May 2014 00:35:02 -0700 (PDT) Subject: [rules-users] Deploy Rules in a separater OSGi bundle Message-ID: <1399966502187-4029539.post@n3.nabble.com> Hello. I'd like to separate cleanly my Drools system into 2 OSGi bundles : 1) the java code that uses the Kie API (6.0.1) and exposes service interfaces to the business part of the applications. Its code relies on someting like : KieServices kieServices = KieServices.Factory.get(); kieContainer = kieServices.getKieClasspathContainer(); KieSession kieSession = kieContainer.newKieSession(name); 2) the rules themselves, just including the kmodule.xml that manages the ksessions and the drl files in their own packages. Let say the first module is S and second is R, while the applcation is A. This build model works nice in my eclipse with correct maven dependancies set from A to both S and R. Classes in the application A calls the service from the S. The kieContainer has resolved as expected the kmodule and associated the rules files for the given packages, and the application can get the ksession for a given name. I'm afraid that the same code won't run as nice as it does when deployed on my Karaf (Service MIX) OSGi environment. I suspect that the KieContainer may encounter some troubles to detect the kmodule.xml in the META-INF and the DRL files out of another jar. Is there anyone with such experiences ? Any advice to do it ? Thanks in advance. Regards. -- View this message in context: http://drools.46999.n3.nabble.com/Deploy-Rules-in-a-separater-OSGi-bundle-tp4029539.html Sent from the Drools: User forum mailing list archive at Nabble.com. From ephemeris.lappis at gmail.com Tue May 13 03:36:11 2014 From: ephemeris.lappis at gmail.com (Ephemeris Lappis) Date: Tue, 13 May 2014 00:36:11 -0700 (PDT) Subject: [rules-users] Deploy Rules in a separate OSGi bundles Message-ID: <1399966571198-4029540.post@n3.nabble.com> Hello. I'd like to separate cleanly my Drools system into 2 OSGi bundles : 1) the java code that uses the Kie API (6.0.1) and exposes service interfaces to the business part of the applications. Its code relies on someting like : KieServices kieServices = KieServices.Factory.get(); kieContainer = kieServices.getKieClasspathContainer(); KieSession kieSession = kieContainer.newKieSession(name); 2) the rules themselves, just including the kmodule.xml that manages the ksessions and the drl files in their own packages. Let say the first module is S and second is R, while the applcation is A. This build model works nice in my eclipse with correct maven dependancies set from A to both S and R. Classes in the application A calls the service from the S. The kieContainer has resolved as expected the kmodule and associated the rules files for the given packages, and the application can get the ksession for a given name. I'm afraid that the same code won't run as nice as it does when deployed on my Karaf (Service MIX) OSGi environment. I suspect that the KieContainer may encounter some troubles to detect the kmodule.xml in the META-INF and the DRL files out of another jar. Is there anyone with such experiences ? Any advice to do it ? Thanks in advance. Regards. -- View this message in context: http://drools.46999.n3.nabble.com/Deploy-Rules-in-a-separate-OSGi-bundles-tp4029540.html Sent from the Drools: User forum mailing list archive at Nabble.com. From ephemeris.lappis at gmail.com Tue May 13 03:39:23 2014 From: ephemeris.lappis at gmail.com (Ephemeris Lappis) Date: Tue, 13 May 2014 00:39:23 -0700 (PDT) Subject: [rules-users] Deploy Rules in separate OSGi bundles Message-ID: <1399966763404-4029541.post@n3.nabble.com> Hello. I'd like to separate cleanly my Drools system into 2 OSGi bundles : 1) the java code that uses the Kie API (6.0.1) and exposes service interfaces to the business part of the applications. Its code relies on someting like : KieServices kieServices = KieServices.Factory.get(); kieContainer = kieServices.getKieClasspathContainer(); KieSession kieSession = kieContainer.newKieSession(name); 2) the rules themselves, just including the kmodule.xml that manages the ksessions and the drl files in their own packages. Let say the first module is S and second is R, while the applcation is A. This build model works nice in my eclipse with correct maven dependancies set from A to both S and R. Classes in the application A calls the service from the S. The kieContainer has resolved as expected the kmodule and associated the rules files for the given packages, and the application can get the ksession for a given name. I'm afraid that the same code won't run as nice as it does when deployed on my Karaf (Service MIX) OSGi environment. I suspect that the KieContainer may encounter some troubles to detect the kmodule.xml in the META-INF and the DRL files out of another jar. Is there anyone with such experiences ? Any advice to do it ? Thanks in advance. Regards. -- View this message in context: http://drools.46999.n3.nabble.com/Deploy-Rules-in-separate-OSGi-bundles-tp4029541.html Sent from the Drools: User forum mailing list archive at Nabble.com. From wolfgang.laun at gmail.com Tue May 13 04:53:17 2014 From: wolfgang.laun at gmail.com (Wolfgang Laun) Date: Tue, 13 May 2014 10:53:17 +0200 Subject: [rules-users] Wildcard or list directory in changeset? In-Reply-To: <1399922263704-4029536.post@n3.nabble.com> References: <1399922263704-4029536.post@n3.nabble.com> Message-ID: Expert manual, search for "change-set", there you'd find: "It is also possible to specify a directory, to add the contents of that directory. It is expected that all the files are of the specified type, since type is not yet inferred from the file name extensions." ...and even an example! -W On 12/05/2014, Cwen wrote: > We set up a webdav to host all the pkg(s). We would like to dynamically > adding pkg(s) into the directory. Is there a way to set up change-set.xml > use wildcard to include all *.pkg under certain directory? > We are on 5.5.0.Final. > > > > -- > View this message in context: > http://drools.46999.n3.nabble.com/Wildcard-or-list-directory-in-changeset-tp4029536.html > Sent from the Drools: User forum mailing list archive at Nabble.com. > _______________________________________________ > rules-users mailing list > rules-users at lists.jboss.org > https://lists.jboss.org/mailman/listinfo/rules-users > From zhamdi at gmail.com Tue May 13 05:46:41 2014 From: zhamdi at gmail.com (Zied Hamdi) Date: Tue, 13 May 2014 10:46:41 +0100 Subject: [rules-users] Fwd: Does drools work well on google app engine? In-Reply-To: References: Message-ID: For those who integrated drools on GAE, can you please give some feedback on - the memory consumption (does it work with a F1 instance)? - startup time (initialization of KnowledgeBase) - do you serialize your KnowledgeBase objects to datastore? - do they fit in 1MB blobs? And more generally, I'd like to know if it's a good idea to use drools on gae also asked on http://stackoverflow.com/questions/23626451/does-drools-work-well-on-google-app-engine?noredirect=1#comment36276948_23626451 Best Regards, Zied Hamdi -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.jboss.org/pipermail/rules-users/attachments/20140513/afa1d42e/attachment-0001.html From zhamdi at gmail.com Tue May 13 05:48:28 2014 From: zhamdi at gmail.com (zhamdi) Date: Tue, 13 May 2014 02:48:28 -0700 (PDT) Subject: [rules-users] For those who integrated drools on GAE, can you please give some feedback on the memory consumption (does it work with a F1 instance)? startup time (initialization of KnowledgeBase) do you serialize your KnowledgeBase objects to datastore? do they fit in 1MB blobs? And more generally, I'd like to know if it's a good idea to use drools on gae also asked on http://stackoverflow.com/questions/23626451/does-drools-work-well-on-google-app-engine?noredirect=1#comment36276948_23626451 Best Regards, Zied Hamdi Message-ID: <1399974508792-4029545.post@n3.nabble.com> For those who integrated drools on GAE, can you please give some feedback on the memory consumption (does it work with a F1 instance)? startup time (initialization of KnowledgeBase) do you serialize your KnowledgeBase objects to datastore? do they fit in 1MB blobs? And more generally, I'd like to know if it's a good idea to use drools on gae also asked on http://stackoverflow.com/questions/23626451/does-drools-work-well-on-google-app-engine?noredirect=1#comment36276948_23626451 Best Regards, Zied Hamdi -- View this message in context: http://drools.46999.n3.nabble.com/For-those-who-integrated-drools-on-GAE-can-you-please-give-some-feedback-on-the-memory-consumption-di-tp4029545.html Sent from the Drools: User forum mailing list archive at Nabble.com. From ganeshneelekani at gmail.com Tue May 13 06:08:28 2014 From: ganeshneelekani at gmail.com (ganeshneelekani) Date: Tue, 13 May 2014 03:08:28 -0700 (PDT) Subject: [rules-users] Requesting for sample spring+drools code In-Reply-To: References: <1399388228850-4029438.post@n3.nabble.com> Message-ID: <1399975708307-4029546.post@n3.nabble.com> Hi Mark, Thanks for the response, I am using drools version 5.4 and I used url of changeset.xml to call the the drools-guvnor from my java code. Now I am upgrading to drools 6.0 workbench version, How can I call the drools workbench from my java code. Thanks Ganesh Neelekani -- View this message in context: http://drools.46999.n3.nabble.com/Requesting-for-sample-spring-drools-code-tp4029438p4029546.html Sent from the Drools: User forum mailing list archive at Nabble.com. From ganeshneelekani at gmail.com Tue May 13 06:12:35 2014 From: ganeshneelekani at gmail.com (ganeshneelekani) Date: Tue, 13 May 2014 03:12:35 -0700 (PDT) Subject: [rules-users] upgrading drools 5.4 to 6.0 Message-ID: <1399975955143-4029547.post@n3.nabble.com> Hi All, I am using drools version 5.4 and I used url of changeset.xml to call the the drools-guvnor from my java code. Now I am upgrading to drools 6.0 workbench version(Let me know if camel version is used), How can I call the drools workbench from my java code. Thanks Ganesh Neelekani -- View this message in context: http://drools.46999.n3.nabble.com/upgrading-drools-5-4-to-6-0-tp4029547.html Sent from the Drools: User forum mailing list archive at Nabble.com. From ganeshneelekani at gmail.com Tue May 13 06:21:59 2014 From: ganeshneelekani at gmail.com (ganeshneelekani) Date: Tue, 13 May 2014 03:21:59 -0700 (PDT) Subject: [rules-users] Drools 6.0 Kie API vs Drools 5.x Knowledge API In-Reply-To: References: <1385958665712-4027032.post@n3.nabble.com> Message-ID: <1399976519498-4029548.post@n3.nabble.com> Hi , I am using drools version 5.4 and I used url of changeset.xml to call the the drools-guvnor from my java code. Now I am upgrading to drools 6.0 workbench version(Let me know if camel version is used), How can I call the drools workbench from my java code. or what else can do to call drools 6 and its process Thanks Ganesh Neelekani -- View this message in context: http://drools.46999.n3.nabble.com/Drools-6-0-Kie-API-vs-Drools-5-x-Knowledge-API-tp4027032p4029548.html Sent from the Drools: User forum mailing list archive at Nabble.com. From ganeshneelekani at gmail.com Tue May 13 06:57:27 2014 From: ganeshneelekani at gmail.com (ganeshneelekani) Date: Tue, 13 May 2014 03:57:27 -0700 (PDT) Subject: [rules-users] Drools 6 support for changeset In-Reply-To: <1387008971085-4027295.post@n3.nabble.com> References: <74902C81-F522-47ED-B3FB-DA201C1EE355@codehaus.org> <1386801111365-4027231.post@n3.nabble.com> <798B7F28-27EC-4BA4-9157-3F415C987DCE@codehaus.org> <1386911512297-4027271.post@n3.nabble.com> <1A4ACBD1-DE44-4007-BBCF-3A86AC0169B9@codehaus.org> <1386942678320-4027279.post@n3.nabble.com> <35F0717C-E781-4D1A-A9B0-5CB6467C2840@codehaus.org> <1386977961813-4027289.post@n3.nabble.com> <1387008971085-4027295.post@n3.nabble.com> Message-ID: <1399978647251-4029549.post@n3.nabble.com> Hi All, I am using drools version 5.4 and I used url of changeset.xml to call the the drools-guvnor from my java code. Now I am upgrading to drools 6.0 workbench version(Let me know if camel version is used), How can I call the drools workbench from my java code. Thanks Ganesh Neelekani -- View this message in context: http://drools.46999.n3.nabble.com/Drools-6-support-for-changeset-tp4027138p4029549.html Sent from the Drools: User forum mailing list archive at Nabble.com. From Cwen at regenstrief.org Tue May 13 08:36:43 2014 From: Cwen at regenstrief.org (Cwen) Date: Tue, 13 May 2014 05:36:43 -0700 (PDT) Subject: [rules-users] Wildcard or list directory in changeset? In-Reply-To: References: <1399922263704-4029536.post@n3.nabble.com> Message-ID: <1399984603512-4029551.post@n3.nabble.com> Thanks for your reply. Do you know it works for webdav? The example is for local drive too. -- View this message in context: http://drools.46999.n3.nabble.com/Wildcard-or-list-directory-in-changeset-tp4029536p4029551.html Sent from the Drools: User forum mailing list archive at Nabble.com. From ch007m at gmail.com Tue May 13 09:46:22 2014 From: ch007m at gmail.com (Charles Moulliard) Date: Tue, 13 May 2014 15:46:22 +0200 Subject: [rules-users] Deploy Rules in separate OSGi bundles In-Reply-To: <1399966763404-4029541.post@n3.nabble.com> References: <1399966763404-4029541.post@n3.nabble.com> Message-ID: Can you share your code as I have created such kind of project (bundle A = KieContainer and bundle B = rules) which is working on Karaf ? https://github.com/cmoulliard/droolsjbpm-osgi-examples (bundle with Kie = kie-project-bundle and bundle with bundle with rules = simple-kie-bundle ) On Tue, May 13, 2014 at 9:39 AM, Ephemeris Lappis < ephemeris.lappis at gmail.com> wrote: > Hello. > > I'd like to separate cleanly my Drools system into 2 OSGi bundles : > > 1) the java code that uses the Kie API (6.0.1) and exposes service > interfaces to the business part of the applications. Its code relies on > someting like : > > KieServices kieServices = KieServices.Factory.get(); > kieContainer = kieServices.getKieClasspathContainer(); > KieSession kieSession = kieContainer.newKieSession(name); > > 2) the rules themselves, just including the kmodule.xml that manages the > ksessions and the drl files in their own packages. > > Let say the first module is S and second is R, while the applcation is A. > > This build model works nice in my eclipse with correct maven dependancies > set from A to both S and R. Classes in the application A calls the service > from the S. The kieContainer has resolved as expected the kmodule and > associated the rules files for the given packages, and the application can > get the ksession for a given name. > > I'm afraid that the same code won't run as nice as it does when deployed on > my Karaf (Service MIX) OSGi environment. I suspect that the KieContainer > may > encounter some troubles to detect the kmodule.xml in the META-INF and the > DRL files out of another jar. > > Is there anyone with such experiences ? > Any advice to do it ? > > Thanks in advance. > Regards. > > > > -- > View this message in context: > http://drools.46999.n3.nabble.com/Deploy-Rules-in-separate-OSGi-bundles-tp4029541.html > Sent from the Drools: User forum mailing list archive at Nabble.com. > _______________________________________________ > rules-users mailing list > rules-users at lists.jboss.org > https://lists.jboss.org/mailman/listinfo/rules-users > -- Charles Moulliard Apache Committer / Architect @RedHat Twitter : @cmoulliard | Blog : http://cmoulliard.github.io -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.jboss.org/pipermail/rules-users/attachments/20140513/c77d4022/attachment.html From mproctor at codehaus.org Tue May 13 10:28:55 2014 From: mproctor at codehaus.org (Mark Proctor) Date: Tue, 13 May 2014 15:28:55 +0100 Subject: [rules-users] Drools 6 support for changeset In-Reply-To: <1399978647251-4029549.post@n3.nabble.com> References: <74902C81-F522-47ED-B3FB-DA201C1EE355@codehaus.org> <1386801111365-4027231.post@n3.nabble.com> <798B7F28-27EC-4BA4-9157-3F415C987DCE@codehaus.org> <1386911512297-4027271.post@n3.nabble.com> <1A4ACBD1-DE44-4007-BBCF-3A86AC0169B9@codehaus.org> <1386942678320-4027279.post@n3.nabble.com> <35F0717C-E781-4D1A-A9B0-5CB6467C2840@codehaus.org> <1386977961813-4027289.post@n3.nabble.com> <1387008971085-4027295.post@n3.nabble.com> <1399978647251-4029549.post@n3.nabble.com> Message-ID: <586D10B9-E848-48C9-A711-56811B0760C3@codehaus.org> On 13 May 2014, at 11:57, ganeshneelekani wrote: > Hi All, > > I am using drools version 5.4 and I used url of changeset.xml to call the > the drools-guvnor from my java code. > > Now I am upgrading to drools 6.0 workbench version(Let me know if camel > version is used), How can I call the drools workbench from my java code. read the docs for kie-ci jar, kiescanner class, and settings.xml. It also has some architecture diagrams and a cheat sheet diagram. http://docs.jboss.org/drools/release/6.0.1.Final/drools-docs/html_single/#d0e791 Mark > > > > Thanks > Ganesh Neelekani > > > > -- > View this message in context: http://drools.46999.n3.nabble.com/Drools-6-support-for-changeset-tp4027138p4029549.html > Sent from the Drools: User forum mailing list archive at Nabble.com. > _______________________________________________ > rules-users mailing list > rules-users at lists.jboss.org > https://lists.jboss.org/mailman/listinfo/rules-users From newohybat at gmail.com Tue May 13 10:47:07 2014 From: newohybat at gmail.com (=?ISO-8859-2?Q?Jan_=A9=BBastn=FD?=) Date: Tue, 13 May 2014 16:47:07 +0200 Subject: [rules-users] Drools 6 problem with events when using "after" Message-ID: <5372306B.5040804@gmail.com> Hi, I use rules together with processes. One global process signals the TurnEvent to other processes in the working memory. declare TurnEvent @role(event) end Then, when started a process, which waits for TurnEvent another event is signaled - the ProcessWaitsForTurnEvent declare ProcessWaitsForTurnEvent @role(event) processId:Long end signalled in rule rule "Build Unit Process Waits For Turn" salience 50 when WorkflowProcessInstance( getProcessId()=="cz.muni.fi.civ.newohybat.bpmn.buildUnit" ,$processId:id ) not ProcessWaitsForTurnEvent(processId==$processId) then insert(new ProcessWaitsForTurnEvent($processId)); end Then there is the last rule which signals each TurnEvent for which there is ProcessWaitsForTurnEvent for a Process: rule "Signal New Turn" dialect "mvel" when $pi:ProcessWaitsForTurnEvent( $processId:processId ) TurnEvent(this after $pi) from entry-point "GameControlStream" then kcontext.getKnowledgeRuntime().signalEvent("turn-new",null,$processId); end On my machine, everything works fine. I tried that also on another, less powerful 32-bit machine and tests fails on following issue. When I run my test case, where I create the process the "Build Unit Process Waits For Turn" fires, ProcessWaitsForTurnEvent is inserted, but then I insert TurnEvent, "Signal New Turn" is not fired. I am quite desperate, cause I have even tried to set @expires attribute for ProcessWaitsForTurnEvent to prevent earlier expiration, with no succes. Any suggestion appreciated. Thanks. Jan -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.jboss.org/pipermail/rules-users/attachments/20140513/110f9b5e/attachment-0001.html From drpatrick.cosmo at gmail.com Tue May 13 12:34:25 2014 From: drpatrick.cosmo at gmail.com (crosbis2) Date: Tue, 13 May 2014 09:34:25 -0700 (PDT) Subject: [rules-users] Excel Syntax in Decision Tables In-Reply-To: <1399910293479-4029533.post@n3.nabble.com> References: <1399894022361-4029520.post@n3.nabble.com> <1399904433528-4029529.post@n3.nabble.com> <1399910129756-4029532.post@n3.nabble.com> <1399910293479-4029533.post@n3.nabble.com> Message-ID: <1399998865087-4029558.post@n3.nabble.com> Hey, Not over the finish line yet, I tried to build the package, after the rule validated correctly, but got the below error relating to the setId method. Have i defined the variable correctly i tried $1 and $param. The view source code generated here looks the same as that of a previous rule i generated in guvnor that works. Any Ideas? -- View this message in context: http://drools.46999.n3.nabble.com/Excel-Syntax-in-Decision-Tables-tp4029520p4029558.html Sent from the Drools: User forum mailing list archive at Nabble.com. From wolfgang.laun at gmail.com Tue May 13 13:44:06 2014 From: wolfgang.laun at gmail.com (Wolfgang Laun) Date: Tue, 13 May 2014 19:44:06 +0200 Subject: [rules-users] Excel Syntax in Decision Tables In-Reply-To: <1399998865087-4029558.post@n3.nabble.com> References: <1399894022361-4029520.post@n3.nabble.com> <1399904433528-4029529.post@n3.nabble.com> <1399910129756-4029532.post@n3.nabble.com> <1399910293479-4029533.post@n3.nabble.com> <1399998865087-4029558.post@n3.nabble.com> Message-ID: That's weird, and it looks like a bug in the build process to me: Java literals are the same for byte, short and int. (CC-ing dev for possible follow-up: You may be asked to furnish a minimal test case.) As a workaround, use this in the Action column: ...; TaskTemplate1.setId( (short)$param );... (Note 1: Using "short" is pretty pointless unless you need to store a large number in an array. Note 2: Follow Java conventions for names for class fields and variables.) -W On 13/05/2014, crosbis2 wrote: > Hey, > > Not over the finish line yet, > > I tried to build the package, after the rule validated correctly, but got > the below error relating to the setId method. Have i defined the variable > correctly i tried $1 and $param. > > The view source code generated here looks the same as that of a previous > rule i generated in guvnor that works. > > Any Ideas? > > > > > > > > > > > > > -- > View this message in context: > http://drools.46999.n3.nabble.com/Excel-Syntax-in-Decision-Tables-tp4029520p4029558.html > Sent from the Drools: User forum mailing list archive at Nabble.com. > _______________________________________________ > rules-users mailing list > rules-users at lists.jboss.org > https://lists.jboss.org/mailman/listinfo/rules-users > From ephemeris.lappis at gmail.com Tue May 13 14:24:14 2014 From: ephemeris.lappis at gmail.com (Ephemeris Lappis) Date: Tue, 13 May 2014 20:24:14 +0200 Subject: [rules-users] Deploy Rules in separate OSGi bundles In-Reply-To: References: <1399966763404-4029541.post@n3.nabble.com> Message-ID: <5372634E.5010506@gmail.com> Hello. I'll send you a project as described when our first tests work with a single bundle, which is not the case today. Indeed, we're experiencing problems, like many seem to have experienced before, to package and install drools on ServiceMix. We're testing first a simple bundle owning its local kmodule.xml and its drl files, but this doesn't work. I have had a look to you example projects, and some of them indeed seem to do what we need, using the osgi integration. The project itself only depends on two libraries (Kie API and Drools compiler), but when we've tried to install them, we've discovered all the transitive dependancies that we must take into account to add the OSGi integration module that is supposed to handle classloader troubles. We are trying to build a Karaf Feature of the 6.0.1 Final version for our Karaf environment, producing a KAR file with maven, but many dependant JAR's manifests mention Import-Package entries that do not appear in the maven graph and we've spent 2 days looking one by one to resolve deployment failures and/or conflicts. Have you any advice about building a (minimalist) Karaf feature for Drools 6.0.1 ? I've seen an available feature for a more recent version of Karaf, but our ServiceMix 4.5.3 doesn't expose the needed dependancies. I've also see posts about a new KieClasspathContainer constuction method passing a classloader, but this method, if I'm not wrong only appears on version 6.1.0 Beta3. Is there any reason to use this beta instead of the last final version ? Thanks for you help. Regards. Ephemeris Lappis Le 13/05/2014 15:46, Charles Moulliard a ?crit : > Can you share your code as I have created such kind of project (bundle > A = KieContainer and bundle B = rules) which is working on Karaf ? > > https://github.com/cmoulliard/droolsjbpm-osgi-examples (bundle with > Kie = kie-project-bundle > and > bundle with bundle with rules = simple-kie-bundle > ) > > > > On Tue, May 13, 2014 at 9:39 AM, Ephemeris Lappis > > wrote: > > Hello. > > I'd like to separate cleanly my Drools system into 2 OSGi bundles : > > 1) the java code that uses the Kie API (6.0.1) and exposes service > interfaces to the business part of the applications. Its code > relies on > someting like : > > KieServices kieServices = KieServices.Factory.get(); > kieContainer = kieServices.getKieClasspathContainer(); > KieSession kieSession = kieContainer.newKieSession(name); > > 2) the rules themselves, just including the kmodule.xml that > manages the > ksessions and the drl files in their own packages. > > Let say the first module is S and second is R, while the > applcation is A. > > This build model works nice in my eclipse with correct maven > dependancies > set from A to both S and R. Classes in the application A calls the > service > from the S. The kieContainer has resolved as expected the kmodule and > associated the rules files for the given packages, and the > application can > get the ksession for a given name. > > I'm afraid that the same code won't run as nice as it does when > deployed on > my Karaf (Service MIX) OSGi environment. I suspect that the > KieContainer may > encounter some troubles to detect the kmodule.xml in the META-INF > and the > DRL files out of another jar. > > Is there anyone with such experiences ? > Any advice to do it ? > > Thanks in advance. > Regards. > > > > -- > View this message in context: > http://drools.46999.n3.nabble.com/Deploy-Rules-in-separate-OSGi-bundles-tp4029541.html > Sent from the Drools: User forum mailing list archive at Nabble.com. > _______________________________________________ > rules-users mailing list > rules-users at lists.jboss.org > https://lists.jboss.org/mailman/listinfo/rules-users > > > > > -- > Charles Moulliard > Apache Committer / Architect @RedHat > Twitter : @cmoulliard | Blog : http://cmoulliard.github.io > > > > > _______________________________________________ > rules-users mailing list > rules-users at lists.jboss.org > https://lists.jboss.org/mailman/listinfo/rules-users -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.jboss.org/pipermail/rules-users/attachments/20140513/c142f549/attachment.html From ch007m at gmail.com Wed May 14 01:28:02 2014 From: ch007m at gmail.com (Charles Moulliard) Date: Wed, 14 May 2014 07:28:02 +0200 Subject: [rules-users] Deploy Rules in separate OSGi bundles In-Reply-To: <5372634E.5010506@gmail.com> References: <1399966763404-4029541.post@n3.nabble.com> <5372634E.5010506@gmail.com> Message-ID: I would recommend that you use the karaf features 6.1.0.Beta3 file http://repo1.maven.org/maven2/org/drools/drools-karaf-features/6.1.0.Beta3/drools-karaf-features-6.1.0.Beta3-features.xmlto deploy your project on Karaf or ServiceMix On Tue, May 13, 2014 at 8:24 PM, Ephemeris Lappis < ephemeris.lappis at gmail.com> wrote: > Hello. > > I'll send you a project as described when our first tests work with a > single bundle, which is not the case today. Indeed, we're experiencing > problems, like many seem to have experienced before, to package and install > drools on ServiceMix. > > We're testing first a simple bundle owning its local kmodule.xml and its > drl files, but this doesn't work. I have had a look to you example > projects, and some of them indeed seem to do what we need, using the osgi > integration. > > The project itself only depends on two libraries (Kie API and Drools > compiler), but when we've tried to install them, we've discovered all the > transitive dependancies that we must take into account to add the OSGi > integration module that is supposed to handle classloader troubles. > > We are trying to build a Karaf Feature of the 6.0.1 Final version for our > Karaf environment, producing a KAR file with maven, but many dependant > JAR's manifests mention Import-Package entries that do not appear in the > maven graph and we've spent 2 days looking one by one to resolve deployment > failures and/or conflicts. > > Have you any advice about building a (minimalist) Karaf feature for Drools > 6.0.1 ? > I've seen an available feature for a more recent version of Karaf, but our > ServiceMix 4.5.3 doesn't expose the needed dependancies. > > I've also see posts about a new KieClasspathContainer constuction method > passing a classloader, but this method, if I'm not wrong only appears on > version 6.1.0 Beta3. > > Is there any reason to use this beta instead of the last final version ? > > Thanks for you help. > > Regards. > > Ephemeris Lappis > > Le 13/05/2014 15:46, Charles Moulliard a ?crit : > > Can you share your code as I have created such kind of project (bundle A > = KieContainer and bundle B = rules) which is working on Karaf ? > > https://github.com/cmoulliard/droolsjbpm-osgi-examples (bundle with Kie > = kie-project-bundle and > bundle with bundle with rules = simple-kie-bundle > ) > > > On Tue, May 13, 2014 at 9:39 AM, Ephemeris Lappis < > ephemeris.lappis at gmail.com> wrote: > >> Hello. >> >> I'd like to separate cleanly my Drools system into 2 OSGi bundles : >> >> 1) the java code that uses the Kie API (6.0.1) and exposes service >> interfaces to the business part of the applications. Its code relies on >> someting like : >> >> KieServices kieServices = KieServices.Factory.get(); >> kieContainer = kieServices.getKieClasspathContainer(); >> KieSession kieSession = kieContainer.newKieSession(name); >> >> 2) the rules themselves, just including the kmodule.xml that manages the >> ksessions and the drl files in their own packages. >> >> Let say the first module is S and second is R, while the applcation is A. >> >> This build model works nice in my eclipse with correct maven dependancies >> set from A to both S and R. Classes in the application A calls the service >> from the S. The kieContainer has resolved as expected the kmodule and >> associated the rules files for the given packages, and the application can >> get the ksession for a given name. >> >> I'm afraid that the same code won't run as nice as it does when deployed >> on >> my Karaf (Service MIX) OSGi environment. I suspect that the KieContainer >> may >> encounter some troubles to detect the kmodule.xml in the META-INF and the >> DRL files out of another jar. >> >> Is there anyone with such experiences ? >> Any advice to do it ? >> >> Thanks in advance. >> Regards. >> >> >> >> -- >> View this message in context: >> http://drools.46999.n3.nabble.com/Deploy-Rules-in-separate-OSGi-bundles-tp4029541.html >> Sent from the Drools: User forum mailing list archive at Nabble.com. >> _______________________________________________ >> rules-users mailing list >> rules-users at lists.jboss.org >> https://lists.jboss.org/mailman/listinfo/rules-users >> > > > > -- > Charles Moulliard > Apache Committer / Architect @RedHat > Twitter : @cmoulliard | Blog : http://cmoulliard.github.io > > > > _______________________________________________ > rules-users mailing listrules-users at lists.jboss.orghttps://lists.jboss.org/mailman/listinfo/rules-users > > > > _______________________________________________ > rules-users mailing list > rules-users at lists.jboss.org > https://lists.jboss.org/mailman/listinfo/rules-users > -- Charles Moulliard Apache Committer / Architect @RedHat Twitter : @cmoulliard | Blog : http://cmoulliard.github.io -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.jboss.org/pipermail/rules-users/attachments/20140514/d4f0c737/attachment-0001.html From ephemeris.lappis at gmail.com Wed May 14 02:59:36 2014 From: ephemeris.lappis at gmail.com (Ephemeris Lappis) Date: Wed, 14 May 2014 08:59:36 +0200 Subject: [rules-users] Deploy Rules in separate OSGi bundles In-Reply-To: References: <1399966763404-4029541.post@n3.nabble.com> <5372634E.5010506@gmail.com> Message-ID: Hello. This feature seems to use many features with versions that are not available on our ServiceMix 4.5.3. For example, the JPA feature is required with versions [1.0.1,2.0), while the current feature is 0.3. This is also the case for other dependencies. This makes the Drools feature deployment fails. This is the reason why we are trying to build our own Drools feature targeting our current Karaf/ServiceMix version. But all the hidden dependencies I mentioned before (Import-Package in OSGi manifests without Maven dependencies), which most are not needed in our case, make the operation quite difficult. What should be the simplest way to deploy a minimalist package to let our simple application work ? I will try anyway the last 6.1.0 beta to check for possible regression in case we switch to this version. Thanks a lot for your help. Regards. 2014-05-14 7:28 GMT+02:00 Charles Moulliard : > I would recommend that you use the karaf features 6.1.0.Beta3 file > http://repo1.maven.org/maven2/org/drools/drools-karaf-features/6.1.0.Beta3/drools-karaf-features-6.1.0.Beta3-features.xmlto deploy your project on Karaf or ServiceMix > > > On Tue, May 13, 2014 at 8:24 PM, Ephemeris Lappis < > ephemeris.lappis at gmail.com> wrote: > >> Hello. >> >> I'll send you a project as described when our first tests work with a >> single bundle, which is not the case today. Indeed, we're experiencing >> problems, like many seem to have experienced before, to package and install >> drools on ServiceMix. >> >> We're testing first a simple bundle owning its local kmodule.xml and its >> drl files, but this doesn't work. I have had a look to you example >> projects, and some of them indeed seem to do what we need, using the osgi >> integration. >> >> The project itself only depends on two libraries (Kie API and Drools >> compiler), but when we've tried to install them, we've discovered all the >> transitive dependancies that we must take into account to add the OSGi >> integration module that is supposed to handle classloader troubles. >> >> We are trying to build a Karaf Feature of the 6.0.1 Final version for our >> Karaf environment, producing a KAR file with maven, but many dependant >> JAR's manifests mention Import-Package entries that do not appear in the >> maven graph and we've spent 2 days looking one by one to resolve deployment >> failures and/or conflicts. >> >> Have you any advice about building a (minimalist) Karaf feature for >> Drools 6.0.1 ? >> I've seen an available feature for a more recent version of Karaf, but >> our ServiceMix 4.5.3 doesn't expose the needed dependancies. >> >> I've also see posts about a new KieClasspathContainer constuction method >> passing a classloader, but this method, if I'm not wrong only appears on >> version 6.1.0 Beta3. >> >> Is there any reason to use this beta instead of the last final version ? >> >> Thanks for you help. >> >> Regards. >> >> Ephemeris Lappis >> >> Le 13/05/2014 15:46, Charles Moulliard a ?crit : >> >> Can you share your code as I have created such kind of project (bundle A >> = KieContainer and bundle B = rules) which is working on Karaf ? >> >> https://github.com/cmoulliard/droolsjbpm-osgi-examples (bundle with Kie >> = kie-project-bundle and >> bundle with bundle with rules = simple-kie-bundle >> ) >> >> >> On Tue, May 13, 2014 at 9:39 AM, Ephemeris Lappis < >> ephemeris.lappis at gmail.com> wrote: >> >>> Hello. >>> >>> I'd like to separate cleanly my Drools system into 2 OSGi bundles : >>> >>> 1) the java code that uses the Kie API (6.0.1) and exposes service >>> interfaces to the business part of the applications. Its code relies on >>> someting like : >>> >>> KieServices kieServices = KieServices.Factory.get(); >>> kieContainer = kieServices.getKieClasspathContainer(); >>> KieSession kieSession = kieContainer.newKieSession(name); >>> >>> 2) the rules themselves, just including the kmodule.xml that manages the >>> ksessions and the drl files in their own packages. >>> >>> Let say the first module is S and second is R, while the applcation is A. >>> >>> This build model works nice in my eclipse with correct maven dependancies >>> set from A to both S and R. Classes in the application A calls the >>> service >>> from the S. The kieContainer has resolved as expected the kmodule and >>> associated the rules files for the given packages, and the application >>> can >>> get the ksession for a given name. >>> >>> I'm afraid that the same code won't run as nice as it does when deployed >>> on >>> my Karaf (Service MIX) OSGi environment. I suspect that the KieContainer >>> may >>> encounter some troubles to detect the kmodule.xml in the META-INF and the >>> DRL files out of another jar. >>> >>> Is there anyone with such experiences ? >>> Any advice to do it ? >>> >>> Thanks in advance. >>> Regards. >>> >>> >>> >>> -- >>> View this message in context: >>> http://drools.46999.n3.nabble.com/Deploy-Rules-in-separate-OSGi-bundles-tp4029541.html >>> Sent from the Drools: User forum mailing list archive at Nabble.com. >>> _______________________________________________ >>> rules-users mailing list >>> rules-users at lists.jboss.org >>> https://lists.jboss.org/mailman/listinfo/rules-users >>> >> >> >> >> -- >> Charles Moulliard >> Apache Committer / Architect @RedHat >> Twitter : @cmoulliard | Blog : http://cmoulliard.github.io >> >> >> >> _______________________________________________ >> rules-users mailing listrules-users at lists.jboss.orghttps://lists.jboss.org/mailman/listinfo/rules-users >> >> >> >> _______________________________________________ >> rules-users mailing list >> rules-users at lists.jboss.org >> https://lists.jboss.org/mailman/listinfo/rules-users >> > > > > -- > Charles Moulliard > Apache Committer / Architect @RedHat > Twitter : @cmoulliard | Blog : http://cmoulliard.github.io > > > _______________________________________________ > rules-users mailing list > rules-users at lists.jboss.org > https://lists.jboss.org/mailman/listinfo/rules-users > -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.jboss.org/pipermail/rules-users/attachments/20140514/5976cace/attachment.html From vin.schiano.eng at gmail.com Wed May 14 05:28:50 2014 From: vin.schiano.eng at gmail.com (Enx) Date: Wed, 14 May 2014 02:28:50 -0700 (PDT) Subject: [rules-users] kie workbench unable to authenticate In-Reply-To: References: <534D25A5.8040002@ll.mit.edu> <534D3AC1.4060409@ll.mit.edu> <53628E24.2010905@redhat.com> <5363A2C2.6020102@redhat.com> <5363B9D5.50901@redhat.com> Message-ID: <1400059730142-4029570.post@n3.nabble.com> Hi to ever one, I am trying to install KIE-WB on Tomcat, as you already tried to do. In order to reduce possible errors, misunderstandings and be useful to the development, I have firstly tried to deploy the 6.0.1 version, and next the last version of 6.1. In both cases I have tried to follow the README located inside the war, but in either cases I have the same type of error. Maybe I do not understand the exact sequences. Well this is what I have done under Linux: 1 Downloaded apache-tomcat-7.0.53.tar 2. applied the requested modifications, which I have zipped here in this file on dropbox: https://www.dropbox.com/s/ajshfwjmeldtlmg/modFiles.zip you simply copy the folder in tomact directory. 3. Deployed kie-wb-distribution-wars-6.1.0-20140511.124239-177-tomcat7 This is the important part of the log: Informazioni: reading resources configuration from /usr/local/apache-tomcat 7.0.53/conf/resources.properties mag 14, 2014 10:53:36 AM bitronix.tm.recovery.Recoverer run Informazioni: recovery committed 0 dangling transaction(s) and rolled back 0 aborted transaction(s) on 1 resource(s) [jdbc/jbpm] (restricted to serverId 'tomcat-btm-node0') mag 14, 2014 10:53:49 AM org.apache.catalina.startup.TaglibUriRule body Informazioni: TLD skipped. URI: http://jakarta.apache.org/taglibs/i18n-1.0 is already defined SLF4J: Class path contains multiple SLF4J bindings. SLF4J: Found binding in [jar:file:/usr/local/apache-tomcat-7.0.53/lib/slf4j-jdk14-1.7.2.jar!/org/slf4j/impl/StaticLoggerBinder.class] SLF4J: Found binding in [jar:file:/usr/local/apache-tomcat-7.0.53/webapps/kie-wb-distribution-wars-6.1.0-20140511.124239-177-tomcat7/WEB-INF/lib/logback-classic-1.0.9.jar!/org/slf4j/impl/StaticLoggerBinder.class] SLF4J: See http://www.slf4j.org/codes.html#multiple_bindings for an explanation. SLF4J: Actual binding is of type [ch.qos.logback.classic.util.ContextSelectorStaticBinder] mag 14, 2014 10:54:15 AM org.apache.catalina.core.StandardContext startInternal Grave: Error listenerStart mag 14, 2014 10:54:15 AM org.apache.catalina.core.StandardContext startInternal Grave: Context [/kie-wb-distribution-wars-6.1.0-20140511.124239-177-tomcat7] startup failed due to previous errors mag 14, 2014 10:54:15 AM org.apache.catalina.loader.WebappClassLoader clearReferencesThreads Grave: The web application [/kie-wb-distribution-wars-6.1.0-20140511.124239-177-tomcat7] appears to have started a thread named [pool-4-thread-1] but has failed to stop it. This is very likely to create a memory leak. mag 14, 2014 10:54:15 AM org.apache.catalina.loader.WebappClassLoader checkThreadLocalMapForLeaks Grave: The web application [/kie-wb-distribution-wars-6.1.0-20140511.124239-177-tomcat7] created a ThreadLocal with key of type [org.jboss.errai.config.util.ClassScanner$1] (value [org.jboss.errai.config.util.ClassScanner$1 at 672c3df2]) and a value of type [java.lang.Boolean] (value [true]) but failed to remove it when the web application was stopped. Threads are going to be renewed over time to try and avoid a probable memory leak. mag 14, 2014 10:54:15 AM org.apache.catalina.loader.WebappClassLoader checkThreadLocalMapForLeaks Grave: The web application [/kie-wb-distribution-wars-6.1.0-20140511.124239-177-tomcat7] created a ThreadLocal with key of type [org.jboss.solder.servlet.beanManager.ServletContextAttributeProvider$1] (value [org.jboss.solder.servlet.beanManager.ServletContextAttributeProvider$1 at 9970fc9]) and a value of type [org.apache.catalina.core.ApplicationContextFacade] (value [org.apache.catalina.core.ApplicationContextFacade at 1c8d5a0a]) but failed to remove it when the web application was stopped. Threads are going to be renewed over time to try and avoid a probable memory leak. mag 14, 2014 10:54:15 AM bitronix.tm.integration.tomcat55.BTMLifecycleListener lifecycleEvent Informazioni: Shutting down Bitronix Transaction Manager mag 14, 2014 10:54:15 AM bitronix.tm.BitronixTransactionManager shutdown Informazioni: shutting down Bitronix Transaction Manager This is about the 6.1 version, but the log is the same for 6.0.1, but doing previously more modifications. Thank you for your precious time. Let me know how to solve this. -- View this message in context: http://drools.46999.n3.nabble.com/rules-users-Problems-deploying-war-tp4029202p4029570.html Sent from the Drools: User forum mailing list archive at Nabble.com. From andrea.pacifico.85 at gmail.com Wed May 14 09:28:48 2014 From: andrea.pacifico.85 at gmail.com (braveheart85) Date: Wed, 14 May 2014 06:28:48 -0700 (PDT) Subject: [rules-users] forall with nested collections Message-ID: <1400074128284-4029572.post@n3.nabble.com> Hello, I'm pretty new to Drools hence i apologize if my question is newbie but i'm getting crazy. I'm trying to write a functioning query since yesterday without fortune. I have data about vehicles owned by person organized for year. My structure is: VechicleData |___VehicleYearData |____Vehicle I have inserted in Drools only the root of the hierarchy (VehicleData) because insert all objects has been problematic for me. Now i need to check if a person has all vehicle of the same make. I have tried this: $result: PersonData( $id: identifierCode ) forall ( ($o: VehicleData( ownerIdentifierCode == $result.identifierCode )) && ($y: VehicleYearData( ) from $o.data) && ($v: VehicleEntity( ) from $y.vehicleEntity) ) VehicleEntity( this == $v, make == "BMW" ) ) and this: PersonData( $id: identifierCode ) $list: List( ) from accumulate ( (and $o: VehicleData( ownerIdentifierCode == $id ) $y: VehicleYearData( ) from $o.data $e: VehicleEntity( ) from $y.vehicleEntity ), collectList( $e ) ) forall ( $v: VehicleEntity( ) from $list VehicleEntity( this == $v, make == "BMW" ) ) and many other... Someone can help me?? Thank you. Andrea -- View this message in context: http://drools.46999.n3.nabble.com/forall-with-nested-collections-tp4029572.html Sent from the Drools: User forum mailing list archive at Nabble.com. From newohybat at gmail.com Wed May 14 09:49:03 2014 From: newohybat at gmail.com (=?UTF-8?B?SmFuIMWgxaVhc3Ruw70=?=) Date: Wed, 14 May 2014 15:49:03 +0200 Subject: [rules-users] forall with nested collections In-Reply-To: <1400074128284-4029572.post@n3.nabble.com> References: <1400074128284-4029572.post@n3.nabble.com> Message-ID: <5373744F.7000009@gmail.com> Hi, I am not sure, what you try to achieve. You have a person and you want find out, whether all of his vehicles are of only one make? rule "Do Stuff If Person Has Vehicles Of Only One Make" when PersonData( $id:identifierCode) accumulate( VehicleData( ownerIdentifierCode == $id ,$y:VehicleYearData() ) and $v: VehicleEntity() from $y ,$vehicles:collectSet($v.make) ,$vehicles.size==1 ) then // has of the same make, do action end Didn't test it, but it should work. I used similar solution once. If make field is String it is fine, if anything else, you have to overload the equals and hashCode methods. Hope that helps Jan Dne 14.5.2014 15:28, braveheart85 napsal(a): > Hello, > > I'm pretty new to Drools hence i apologize if my question is newbie but i'm > getting crazy. > I'm trying to write a functioning query since yesterday without fortune. > I have data about vehicles owned by person organized for year. My structure > is: > > VechicleData > |___VehicleYearData > |____Vehicle > > I have inserted in Drools only the root of the hierarchy (VehicleData) > because insert all objects has been problematic for me. Now i need to check > if a person has all vehicle of the same make. > I have tried this: > > $result: PersonData( $id: identifierCode ) > forall > ( > ($o: VehicleData( ownerIdentifierCode == $result.identifierCode )) && > ($y: VehicleYearData( ) from $o.data) && > ($v: VehicleEntity( ) from $y.vehicleEntity) > ) > VehicleEntity( this == $v, make == "BMW" ) > ) > > and this: > > PersonData( $id: identifierCode ) > $list: List( ) from accumulate ( > (and > $o: VehicleData( ownerIdentifierCode == $id ) > $y: VehicleYearData( ) from $o.data > $e: VehicleEntity( ) from $y.vehicleEntity > ), > collectList( $e ) > ) > forall ( > $v: VehicleEntity( ) from $list > VehicleEntity( this == $v, make == "BMW" ) > ) > > and many other... > Someone can help me?? > > Thank you. > Andrea > > > > -- > View this message in context: http://drools.46999.n3.nabble.com/forall-with-nested-collections-tp4029572.html > Sent from the Drools: User forum mailing list archive at Nabble.com. > _______________________________________________ > rules-users mailing list > rules-users at lists.jboss.org > https://lists.jboss.org/mailman/listinfo/rules-users From wolfgang.laun at gmail.com Wed May 14 10:09:58 2014 From: wolfgang.laun at gmail.com (Wolfgang Laun) Date: Wed, 14 May 2014 16:09:58 +0200 Subject: [rules-users] forall with nested collections In-Reply-To: <1400074128284-4029572.post@n3.nabble.com> References: <1400074128284-4029572.post@n3.nabble.com> Message-ID: The hierarchical data model is rather unwieldy. A relational model would have the following entities: Person( personId,... ) Vehicle( vehicleId, make,... ) Ownership( personId, vehicleId, year ) and it would be quite easy to handle such questions: Person( $pid: persondId) Ownership( personId == $pid, $vid1: vehicleId ) Vechicle( vehicleId == $vid1. $make1: make ) not ( Ownership( personId == $pid, $vid2: vehicleId != $vid1 ) and Vehicle( vehicleId == $vid2, make != $make1 ) ) That said, here's some code to do it in Drools: $result: PersonData( $id: identifierCode ) Set( count == 1 ) from accumulate( $vd: VehicleData( ownerIdentifierCode == $result.identifierCode ) init( Set ms = new HashSet() ), action( forall( VehicleYearData vyd: $vd.getData() ){ forall( VehicleEntity ve: vyd.getVehicleEntity() ){ ms.add( ve.getMake() ); } } ), result( ms ) ) The rule should fire if that person owns cars of just one make; use >1 for the opposite condition. Untested! -W On 14/05/2014, braveheart85 wrote: > Hello, > > I'm pretty new to Drools hence i apologize if my question is newbie but i'm > getting crazy. > I'm trying to write a functioning query since yesterday without fortune. > I have data about vehicles owned by person organized for year. My structure > is: > > VechicleData > |___VehicleYearData > |____Vehicle > > I have inserted in Drools only the root of the hierarchy (VehicleData) > because insert all objects has been problematic for me. Now i need to check > if a person has all vehicle of the same make. > I have tried this: > > $result: PersonData( $id: identifierCode ) > forall > ( > ($o: VehicleData( ownerIdentifierCode == $result.identifierCode )) && > ($y: VehicleYearData( ) from $o.data) && > ($v: VehicleEntity( ) from $y.vehicleEntity) > ) > VehicleEntity( this == $v, make == "BMW" ) > ) > > and this: > > PersonData( $id: identifierCode ) > $list: List( ) from accumulate ( > (and > $o: VehicleData( ownerIdentifierCode == $id ) > $y: VehicleYearData( ) from $o.data > $e: VehicleEntity( ) from $y.vehicleEntity > ), > collectList( $e ) > ) > forall ( > $v: VehicleEntity( ) from $list > VehicleEntity( this == $v, make == "BMW" ) > ) > > and many other... > Someone can help me?? > > Thank you. > Andrea > > > > -- > View this message in context: > http://drools.46999.n3.nabble.com/forall-with-nested-collections-tp4029572.html > Sent from the Drools: User forum mailing list archive at Nabble.com. > _______________________________________________ > rules-users mailing list > rules-users at lists.jboss.org > https://lists.jboss.org/mailman/listinfo/rules-users > From andrea.pacifico.85 at gmail.com Wed May 14 10:55:40 2014 From: andrea.pacifico.85 at gmail.com (braveheart85) Date: Wed, 14 May 2014 07:55:40 -0700 (PDT) Subject: [rules-users] forall with nested collections In-Reply-To: <1400074128284-4029572.post@n3.nabble.com> References: <1400074128284-4029572.post@n3.nabble.com> Message-ID: <1400079340152-4029575.post@n3.nabble.com> Thank you for the fast response. Laun you are right obviously, but i'm developing an addon module and i have not partecipated in the design of the data structures. I could implement an adaptation layer, but i haven't much time. Thank you again, you are very helpful! I'm going to try the solutions. Andrea -- View this message in context: http://drools.46999.n3.nabble.com/forall-with-nested-collections-tp4029572p4029575.html Sent from the Drools: User forum mailing list archive at Nabble.com. From mproctor at codehaus.org Wed May 14 11:21:02 2014 From: mproctor at codehaus.org (Mark Proctor) Date: Wed, 14 May 2014 16:21:02 +0100 Subject: [rules-users] upgrading drools 5.4 to 6.0 In-Reply-To: <1399975955143-4029547.post@n3.nabble.com> References: <1399975955143-4029547.post@n3.nabble.com> Message-ID: <51BE1C4D-3EAA-43E9-B529-D1EA65556B5C@codehaus.org> please don?t post multiple times. You asked this question 3 times within the hour. Mark On 13 May 2014, at 11:12, ganeshneelekani wrote: > Hi All, > > I am using drools version 5.4 and I used url of changeset.xml to call the > the drools-guvnor from my java code. > > Now I am upgrading to drools 6.0 workbench version(Let me know if camel > version is used), How can I call the drools workbench from my java code. > > > > Thanks > Ganesh Neelekani > > > > -- > View this message in context: http://drools.46999.n3.nabble.com/upgrading-drools-5-4-to-6-0-tp4029547.html > Sent from the Drools: User forum mailing list archive at Nabble.com. > _______________________________________________ > rules-users mailing list > rules-users at lists.jboss.org > https://lists.jboss.org/mailman/listinfo/rules-users From mario.fusco at gmail.com Wed May 14 12:02:57 2014 From: mario.fusco at gmail.com (Mario Fusco) Date: Wed, 14 May 2014 09:02:57 -0700 (PDT) Subject: [rules-users] Drools 6 problem with events when using "after" In-Reply-To: <5372306B.5040804@gmail.com> References: <5372306B.5040804@gmail.com> Message-ID: <1400083377773-4029577.post@n3.nabble.com> Hi Jan, what you did looks correct and at the moment I have no idea of why you're experiencing 2 different behaviours when running your code on 2 different machines. Which version are you using exactly? Can you reproduce this difference consistently, the 100% of times? Also, since you think the problem is related with the "after" operator, did you try to reproduce your problem purely with Drools without also using jBPM? To better figure out what's going on I'd need to reproduce your issue. Could you maybe open a ticket on our jira ( https://issues.jboss.org/browse/DROOLS ) and attach a reproducer there? Thanks, Mario -- View this message in context: http://drools.46999.n3.nabble.com/rules-users-Drools-6-problem-with-events-when-using-after-tp4029555p4029577.html Sent from the Drools: User forum mailing list archive at Nabble.com. From mario.fusco at gmail.com Wed May 14 12:13:05 2014 From: mario.fusco at gmail.com (Mario Fusco) Date: Wed, 14 May 2014 09:13:05 -0700 (PDT) Subject: [rules-users] Rules not picked when packaged inside the JAR In-Reply-To: <1399907138229-4029531.post@n3.nabble.com> References: <1398750710805-4029378.post@n3.nabble.com> <12175C44-DBE9-4E36-B6E9-DA6E4D786B78@codehaus.org> <1399907138229-4029531.post@n3.nabble.com> Message-ID: <1400083985229-4029578.post@n3.nabble.com> Hi, probably there's a misunderstanding here. It is not enough that the drls are packaged inside a jar. They are not discovered anywhere in the classpath. The jar has to be a kjar (i.e. contains a kmodule.xml). If this is your case and you're still having problem, please open a ticket on our jira ( https://issues.jboss.org/browse/DROOLS ) with a small reproducer demonstrating this issue and I'll give a look asap. Thanks, Mario -- View this message in context: http://drools.46999.n3.nabble.com/Rules-not-picked-when-packaged-inside-the-JAR-tp4029378p4029578.html Sent from the Drools: User forum mailing list archive at Nabble.com. From newohybat at gmail.com Wed May 14 12:33:28 2014 From: newohybat at gmail.com (=?UTF-8?B?SmFuIMWgxaVhc3Ruw70=?=) Date: Wed, 14 May 2014 18:33:28 +0200 Subject: [rules-users] Drools 6 problem with events when using "after" In-Reply-To: <1400083377773-4029577.post@n3.nabble.com> References: <5372306B.5040804@gmail.com> <1400083377773-4029577.post@n3.nabble.com> Message-ID: <53739AD8.1030204@gmail.com> Hi Mario, thanks for your response. I use Drools 6.0.0.Final and jBPM 6.0.0.Final. The problem is that the outcomes of tests that check firing the specified rules differ every time. Mostly everything fails, but sometimes a test or two pass. I haven't tried removing jBPM related stuff, right now I don't have time for that. As for the reproducer, I'll try remove all the definitions unrelated to this functionality and try with the rest, the I'll post an update and if the problem persists, I'll open a ticket. But it won't be until next week. Jan Dne 14.5.2014 18:02, Mario Fusco napsal(a): > Hi Jan, > > what you did looks correct and at the moment I have no idea of why you're > experiencing 2 different behaviours when running your code on 2 different > machines. Which version are you using exactly? Can you reproduce this > difference consistently, the 100% of times? Also, since you think the > problem is related with the "after" operator, did you try to reproduce your > problem purely with Drools without also using jBPM? > > To better figure out what's going on I'd need to reproduce your issue. Could > you maybe open a ticket on our jira ( https://issues.jboss.org/browse/DROOLS > ) and attach a reproducer there? > > Thanks, > Mario > > > > -- > View this message in context: http://drools.46999.n3.nabble.com/rules-users-Drools-6-problem-with-events-when-using-after-tp4029555p4029577.html > Sent from the Drools: User forum mailing list archive at Nabble.com. > _______________________________________________ > rules-users mailing list > rules-users at lists.jboss.org > https://lists.jboss.org/mailman/listinfo/rules-users From ronak.patel at hp.com Wed May 14 14:59:53 2014 From: ronak.patel at hp.com (Patel, Ronak (Autonomy)) Date: Wed, 14 May 2014 18:59:53 +0000 Subject: [rules-users] HTTP 401 Unauthorized when using KIE API on Workbench M2 repository Message-ID: <1B84B80A3500194EA7DFFE0EFF9C2CA647579120@G4W3206.americas.hpqcorp.net> Anyone have any ideas on this? I have some new information: just to check if my preemptive authentication configuration in settings.xml worked at all, I set my KIE module as a dependency on a project and used command line Maven 3.2.1 to compile. It successfully authenticated with the Workbench Maven repository and downloaded the module into my local Maven repository. I had Fiddler log the HTTP requests and saw that the requests to the Workbench repo had the basic authentication request header, as I expected. So any ideas on why the request generated by the API (Aether?) wouldn't have this header? It seems like it's not picking up the preemptive authentication settings. Thanks, Ronak From: Patel, Ronak (Autonomy) Sent: Monday, May 12, 2014 5:01 PM To: rules-users at lists.jboss.org Subject: HTTP 401 Unauthorized when using KIE API on Workbench M2 repository I'm having trouble authenticating to access the Workbench Maven repository through the KIE API (kie-ci). My code is the following and fails on the second line with an exception that says something like module not found. I see the more specific 401 error in the local Maven repository in the resolver-status.properties file. KieServices ks = KieServices.Factory.get(); KieContainer kContainer = ks.newKieContainer(ks.newReleaseId("com.hp.pa.sample", "realestate", "LATEST")); I've tried putting in my settings.xml file both suggestions in https://bugzilla.redhat.com/show_bug.cgi?id=1059584#c4 (also saw the preemptive one in https://bugzilla.redhat.com/show_bug.cgi?id=1037556 and other threads/forums and bug reports), but I continue to get the same error. I did some further investigation using Fiddler and I see that the credentials are not being included in the HTTP request the code sends for resources in the Workbench Maven repository. I was expecting the basic authentication header to be in here. The HTTP request always looks like this (server name changed for security reasons): GET http://kiewbserver:8080/kie-drools-wb/maven2/com/hp/pa/sample/realestate/maven-metadata.xml HTTP/1.1 Host: kiewbserver:8080 Pragma: no-cache Cache-Control: no-cache, no-store Accept-Encoding: gzip Connection: keep-alive Connection: keep-alive Accept: */* User-Agent: Aether And the response is a typical HTTP/1.1 401 Unauthorized with the standard JBoss error page as the body. Using the composer feature in Fiddler, if I issue this same request with the basic authentication header included, it works, returning an HTTP 200 response with the requested file. If I remove the authentication requirement from the Maven repository using the workaround described in bug 1059584 (referenced above), all my code works fine. I followed the procedure to create a user for the Workbench on JBoss AS that is demonstrated in the start of this video: http://www.youtube.com/watch?v=vj3MNmiUnvY. That's the user whose credentials I've tried putting in my settings.xml. Is there anything else that needs to be done on the server side? Any other ideas on what I may have missed or how to debug this further? Thank you, Ronak Patel Software Designer HP Autonomy -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.jboss.org/pipermail/rules-users/attachments/20140514/117cd1ee/attachment-0001.html From jlprat at gmail.com Thu May 15 05:18:08 2014 From: jlprat at gmail.com (jlprat) Date: Thu, 15 May 2014 02:18:08 -0700 (PDT) Subject: [rules-users] Rules don't execute using MVEL syntax in RHS - Possible Bug In-Reply-To: <1399896921851-4029523.post@n3.nabble.com> References: <1399629087446-4029494.post@n3.nabble.com> <1399633227201-4029496.post@n3.nabble.com> <1399890524929-4029517.post@n3.nabble.com> <1399894243043-4029521.post@n3.nabble.com> <1399896921851-4029523.post@n3.nabble.com> Message-ID: <1400145488864-4029581.post@n3.nabble.com> Hi Mario, is there any progress? Could you find anything? Best, Josep -- View this message in context: http://drools.46999.n3.nabble.com/Rules-don-t-execute-using-MVEL-syntax-in-LHS-Possible-Bug-tp4029494p4029581.html Sent from the Drools: User forum mailing list archive at Nabble.com. From porcelli at redhat.com Thu May 15 10:52:49 2014 From: porcelli at redhat.com (Alexandre Porcelli) Date: Thu, 15 May 2014 11:52:49 -0300 Subject: [rules-users] Workbench and GIT Repo High Availability In-Reply-To: References: Message-ID: Hello Zahid, Comments inline... On May 13, 2014, at 3:56 AM, Zahid Ahmed wrote: > Hi, > > We are in a process of setting up a centralized drools6 Workbench in our organization. This way we can keep our assets and artefacts in a central location. We will make this central Workbench clustered for high availability. I have a few queries in regard to clustering the Workbench. > > Problem Statement > As workbench is using GIT, this means we need to have an enterprise level GIT repository where all the assets get stored for Workbench. As GIT is file-system based , it in turn, calls for a clustered GIT server within the organization. Our organization will prefer to have a private GIT repository hosted within office network which is highly available and wants to avoid any cost for GIT repository setup. Workbench doesn't force you to have any extra cost with GIT, as it comes with it and you don't need an external (outside your network) provider as Workbench has it's own GIT infra. > > 1. I want to know how to make Workbench highly available , with GIT also Highly available. Is chapter# 18 VFS CLUSTERING is the answer to high available GIT and WORKBENCH both ? or is there any other way to make GIT repository highly available. The Workbench cluster is a Highly Available type of cluster, all you need is follow the instructions and you'll have what you need. To be even more clear: as GIT is embedded in Workbench solution, once you setup a Workbench cluster you get for free a GIT HA setup. But if you're looking for a proxy based solution (Workbench accessing your own external GIT cluster using whatever solution you have) - this we don't support, Workbench will always have it's own GIT infra embedded. > 2. Will ZooKeeper and Helix be enough to make the clustered environment for both Workbench with its GIT repo ? Yes... ZK and Helix does the job! Be aware that you'd need to have a proper ZK setup (another cluster) in order to obtain a real HA cluster. Your final solution will be probably end up with 3 ZKs in a cluster + the Workbench cluster (both clusters can be setup in the same nodes if you want). Regards, --- Alexandre Porcelli Principal Software Engineer Red Hat Business Systems and Intelligence Group > > Regards, > Zahid Ahmed > > > > _______________________________________________ > rules-users mailing list > rules-users at lists.jboss.org > https://lists.jboss.org/mailman/listinfo/rules-users From dominik.sandjaja at it-motive.de Thu May 15 11:27:32 2014 From: dominik.sandjaja at it-motive.de (Sandjaja, Dominik) Date: Thu, 15 May 2014 17:27:32 +0200 Subject: [rules-users] Startup KIE Workbench without network connection Message-ID: Hello, I try to setup KIE Workbench (6.1.0.BetaX) on Tomcat 7 on a Windows 2012 Server without connection to the internet. When starting up, the KIE-WB does not start up. I get the following errors in localhost.log (cut for better readability): Mai 15, 2014 5:08:18 PM org.apache.catalina.core.StandardContext listenerStart Schwerwiegend: Exception sending context initialized event to listener instance of class org.jboss.weld.environment.servlet.Listener org.jboss.weld.exceptions.DeploymentException: Exception List with 1 exceptions: [...] Caused by: java.lang.RuntimeException: https://github.com/guvnorngtestuser1/guvnorng-playground.git: cannot open git-upload-pack [...] Caused by: java.net.ConnectException: Connection time out: github.com This happens because the initial demo repository is downloaded - I do not want and need those repositories! I could work around this by copying the TOMCAT_HOME/bin/.niogit directory to that server and have it start up then. BUT: IMHO it is an inconvenience, maybe even a bug, that an internet connection is needed to set up the Drools KIE Workbench. How are we supposed to tell our infrastructure team that we need an open connection to "some website with code" to setup an editing system for internal knowledge ... Should I file a bug for that? Is there a way to deactivate the downloading of the initial demo repository? Could it somehow be delivered with the KIE-WB package? Thanks Dominik ........................................................................... mit freundlichen Gr??en / kind regards Dominik Sandjaja Fon: +49 (0) 203 60878 183 Fax: +49 (0) 203 60878 222 e-mail: dominik.sandjaja at it-motive.de it-motive AG Zum Walkm?ller 6 47269 Duisburg info at it-motive.de http://www.it-motive.de .............................................................................. Vorsitzender des Aufsichtsrats: Dr.-Ing. J?rgen Sturm Vorstand: Horst-Dieter Deelmann (Vors.), Matthias Heming, Christoph Tim Klose HRB 9207, Amtsgericht Duisburg -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.jboss.org/pipermail/rules-users/attachments/20140515/96a10637/attachment.html From io.christod at gmail.com Thu May 15 11:39:57 2014 From: io.christod at gmail.com (Ioannis Christodoulou) Date: Thu, 15 May 2014 18:39:57 +0300 Subject: [rules-users] Startup KIE Workbench without network connection In-Reply-To: References: Message-ID: Hello, you probably need to set: -Dorg.kie.demo=false and -Dorg.kie.example=false in your startup variables. For example, using jboss, I have in standalone.conf file (used during jboss startup) JAVA_OPTS="$JAVA_OPTS -Dorg.kie.demo=false -Dorg.kie.example=false This will disable the demo and the example sources from the workbench. ????????? ????, ??????? ???????????? On Thu, May 15, 2014 at 6:27 PM, Sandjaja, Dominik < dominik.sandjaja at it-motive.de> wrote: > Hello, > > > > I try to setup KIE Workbench (6.1.0.BetaX) on Tomcat 7 on a Windows 2012 > Server without connection to the internet. > > > > When starting up, the KIE-WB does not start up. I get the following errors > in localhost.log (cut for better readability): > > > > Mai 15, 2014 5:08:18 PM org.apache.catalina.core.StandardContext > listenerStart > > Schwerwiegend: Exception sending context initialized event to listener > instance of class org.jboss.weld.environment.servlet.Listener > > org.jboss.weld.exceptions.DeploymentException: Exception List with 1 > exceptions: > > [?] > > Caused by: java.lang.RuntimeException: > https://github.com/guvnorngtestuser1/guvnorng-playground.git: cannot open > git-upload-pack > > [?] > > Caused by: java.net.ConnectException: Connection time out: github.com > > > > This happens because the initial demo repository is downloaded ? I do not > want and need those repositories! > > > > I could work around this by copying the TOMCAT_HOME/bin/.niogit directory > to that server and have it start up then. > > > > BUT: IMHO it is an inconvenience, maybe even a bug, that an internet > connection is needed to set up the Drools KIE Workbench. How are we > supposed to tell our infrastructure team that we need an open connection to > ?some website with code? to setup an editing system for internal knowledge ? > > Should I file a bug for that? Is there a way to deactivate the downloading > of the initial demo repository? Could it somehow be delivered with the > KIE-WB package? > > > > Thanks > > Dominik > > ????????????????????????? > mit freundlichen Gr??en / kind regards > Dominik Sandjaja > Fon: +49 (0) 203 60878 183 > Fax: +49 (0) 203 60878 222 > e-mail: dominik.sandjaja at it-motive.de > > it-motive AG > Zum Walkm?ller 6 > 47269 Duisburg > info at it-motive.de > http://www.it-motive.de > ?????????????????????????? > Vorsitzender des Aufsichtsrats: Dr.-Ing. J?rgen Sturm > Vorstand: Horst-Dieter Deelmann (Vors.), Matthias Heming, Christoph Tim > Klose > HRB 9207, Amtsgericht Duisburg > > _______________________________________________ > rules-users mailing list > rules-users at lists.jboss.org > https://lists.jboss.org/mailman/listinfo/rules-users > -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.jboss.org/pipermail/rules-users/attachments/20140515/b74c3a01/attachment.html From michael.anstis at gmail.com Thu May 15 11:41:31 2014 From: michael.anstis at gmail.com (Michael Anstis) Date: Thu, 15 May 2014 16:41:31 +0100 Subject: [rules-users] Startup KIE Workbench without network connection In-Reply-To: References: Message-ID: When the workbench starts it tries to download an example repository. The documentation lists various system properties you can use to disable this automatic download. On 15 May 2014 16:27, Sandjaja, Dominik wrote: > Hello, > > > > I try to setup KIE Workbench (6.1.0.BetaX) on Tomcat 7 on a Windows 2012 > Server without connection to the internet. > > > > When starting up, the KIE-WB does not start up. I get the following errors > in localhost.log (cut for better readability): > > > > Mai 15, 2014 5:08:18 PM org.apache.catalina.core.StandardContext > listenerStart > > Schwerwiegend: Exception sending context initialized event to listener > instance of class org.jboss.weld.environment.servlet.Listener > > org.jboss.weld.exceptions.DeploymentException: Exception List with 1 > exceptions: > > [?] > > Caused by: java.lang.RuntimeException: > https://github.com/guvnorngtestuser1/guvnorng-playground.git: cannot open > git-upload-pack > > [?] > > Caused by: java.net.ConnectException: Connection time out: github.com > > > > This happens because the initial demo repository is downloaded ? I do not > want and need those repositories! > > > > I could work around this by copying the TOMCAT_HOME/bin/.niogit directory > to that server and have it start up then. > > > > BUT: IMHO it is an inconvenience, maybe even a bug, that an internet > connection is needed to set up the Drools KIE Workbench. How are we > supposed to tell our infrastructure team that we need an open connection to > ?some website with code? to setup an editing system for internal knowledge ? > > Should I file a bug for that? Is there a way to deactivate the downloading > of the initial demo repository? Could it somehow be delivered with the > KIE-WB package? > > > > Thanks > > Dominik > > ????????????????????????? > mit freundlichen Gr??en / kind regards > Dominik Sandjaja > Fon: +49 (0) 203 60878 183 > Fax: +49 (0) 203 60878 222 > e-mail: dominik.sandjaja at it-motive.de > > it-motive AG > Zum Walkm?ller 6 > 47269 Duisburg > info at it-motive.de > http://www.it-motive.de > ?????????????????????????? > Vorsitzender des Aufsichtsrats: Dr.-Ing. J?rgen Sturm > Vorstand: Horst-Dieter Deelmann (Vors.), Matthias Heming, Christoph Tim > Klose > HRB 9207, Amtsgericht Duisburg > > _______________________________________________ > rules-users mailing list > rules-users at lists.jboss.org > https://lists.jboss.org/mailman/listinfo/rules-users > -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.jboss.org/pipermail/rules-users/attachments/20140515/251e1a26/attachment-0001.html From dominik.sandjaja at it-motive.de Thu May 15 11:58:23 2014 From: dominik.sandjaja at it-motive.de (Sandjaja, Dominik) Date: Thu, 15 May 2014 17:58:23 +0200 Subject: [rules-users] Startup KIE Workbench without network connection In-Reply-To: References: Message-ID: Hello, many thanks for that information! I somehow never got that far down in the properties-page to notice. Nevertheless I think that the startup should not fail completely, if the sample repositories cannot be downloaded. Shouldn?t a warning suffice? Thank you! Dominik Von: rules-users-bounces at lists.jboss.org [mailto:rules-users-bounces at lists.jboss.org] Im Auftrag von Ioannis Christodoulou Gesendet: Donnerstag, 15. Mai 2014 17:40 An: Rules Users List Betreff: Re: [rules-users] Startup KIE Workbench without network connection Hello, you probably need to set: -Dorg.kie.demo=false and -Dorg.kie.example=false in your startup variables. For example, using jboss, I have in standalone.conf file (used during jboss startup) JAVA_OPTS="$JAVA_OPTS -Dorg.kie.demo=false -Dorg.kie.example=false This will disable the demo and the example sources from the workbench. ????????? ????, ??????? ???????????? On Thu, May 15, 2014 at 6:27 PM, Sandjaja, Dominik > wrote: Hello, I try to setup KIE Workbench (6.1.0.BetaX) on Tomcat 7 on a Windows 2012 Server without connection to the internet. When starting up, the KIE-WB does not start up. I get the following errors in localhost.log (cut for better readability): Mai 15, 2014 5:08:18 PM org.apache.catalina.core.StandardContext listenerStart Schwerwiegend: Exception sending context initialized event to listener instance of class org.jboss.weld.environment.servlet.Listener org.jboss.weld.exceptions.DeploymentException: Exception List with 1 exceptions: [?] Caused by: java.lang.RuntimeException: https://github.com/guvnorngtestuser1/guvnorng-playground.git: cannot open git-upload-pack [?] Caused by: java.net.ConnectException: Connection time out: github.com This happens because the initial demo repository is downloaded ? I do not want and need those repositories! I could work around this by copying the TOMCAT_HOME/bin/.niogit directory to that server and have it start up then. BUT: IMHO it is an inconvenience, maybe even a bug, that an internet connection is needed to set up the Drools KIE Workbench. How are we supposed to tell our infrastructure team that we need an open connection to ?some website with code? to setup an editing system for internal knowledge ? Should I file a bug for that? Is there a way to deactivate the downloading of the initial demo repository? Could it somehow be delivered with the KIE-WB package? Thanks Dominik ????????????????????????? mit freundlichen Gr??en / kind regards Dominik Sandjaja Fon: +49 (0) 203 60878 183 Fax: +49 (0) 203 60878 222 e-mail: dominik.sandjaja at it-motive.de it-motive AG Zum Walkm?ller 6 47269 Duisburg info at it-motive.de http://www.it-motive.de ?????????????????????????? Vorsitzender des Aufsichtsrats: Dr.-Ing. J?rgen Sturm Vorstand: Horst-Dieter Deelmann (Vors.), Matthias Heming, Christoph Tim Klose HRB 9207, Amtsgericht Duisburg _______________________________________________ rules-users mailing list rules-users at lists.jboss.org https://lists.jboss.org/mailman/listinfo/rules-users ????????????????????????? mit freundlichen Gr??en / kind regards Dominik Sandjaja Fon: +49 (0) 203 60878 183 Fax: +49 (0) 203 60878 222 e-mail: dominik.sandjaja at it-motive.de it-motive AG Zum Walkm?ller 6 47269 Duisburg info at it-motive.de http://www.it-motive.de ?????????????????????????? Vorsitzender des Aufsichtsrats: Dr.-Ing. J?rgen Sturm Vorstand: Horst-Dieter Deelmann (Vors.), Matthias Heming, Christoph Tim Klose HRB 9207, Amtsgericht Duisburg -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.jboss.org/pipermail/rules-users/attachments/20140515/aaa6eb08/attachment.html From mario.fusco at gmail.com Thu May 15 13:25:13 2014 From: mario.fusco at gmail.com (Mario Fusco) Date: Thu, 15 May 2014 10:25:13 -0700 (PDT) Subject: [rules-users] Rules don't execute using MVEL syntax in RHS - Possible Bug In-Reply-To: <1400145488864-4029581.post@n3.nabble.com> References: <1399629087446-4029494.post@n3.nabble.com> <1399633227201-4029496.post@n3.nabble.com> <1399890524929-4029517.post@n3.nabble.com> <1399894243043-4029521.post@n3.nabble.com> <1399896921851-4029523.post@n3.nabble.com> <1400145488864-4029581.post@n3.nabble.com> Message-ID: <1400174713960-4029587.post@n3.nabble.com> Hi Josep, as I anticipated the propName vs. getPropName() issue was only a red herring and totally unrelated with the actual bug. Investigating in more detail your test case I found that the problem is that in some circumstances, when using fireUntilHalt, a single working memory action (insert/update/delete) is not processed atomically as it should. This causes that it can make to fire a rule even before than the consequences of such action have been completely propagated to all the nodes of the rete network. Yesterday evening I finished developing a fix for this issue that also makes your test case to pass. However I only pushed it on a branch of my personal guthub repo ( https://github.com/mariofusco/drools/commit/6d7a849f0920e95c22aa913f0cc5b741b1ddb92b ) because there are still some outstanding details that I am discussing with the other members of the team. I'll let you know when we decide that the fix is ok and merge it to the master. Cheers, Mario -- View this message in context: http://drools.46999.n3.nabble.com/Rules-don-t-execute-using-MVEL-syntax-in-LHS-Possible-Bug-tp4029494p4029587.html Sent from the Drools: User forum mailing list archive at Nabble.com. From ephemeris.lappis at gmail.com Thu May 15 13:40:12 2014 From: ephemeris.lappis at gmail.com (Ephemeris Lappis) Date: Thu, 15 May 2014 10:40:12 -0700 (PDT) Subject: [rules-users] Drools 5.5 and Java 7 syntax Message-ID: <1400175612047-4029588.post@n3.nabble.com> Hello.It seems that Drools 5.5 experiences problems translating RHS code with Java 7 syntax, while it's running with JDK 1.7.For example, literal numbers with thousand separator of form "*10_000*" are detected as errors, and generics forms like *List l = new ArrayList<>()*; is also refused because of the <> that must be removed.Is it a natural behavior or is there a way to majke it use a Java 7 aware parser ?Thanks for your help.Regards. -- View this message in context: http://drools.46999.n3.nabble.com/Drools-5-5-and-Java-7-syntax-tp4029588.html Sent from the Drools: User forum mailing list archive at Nabble.com. -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.jboss.org/pipermail/rules-users/attachments/20140515/6aa86bd9/attachment-0001.html From stevearoonie at gmail.com Thu May 15 22:55:12 2014 From: stevearoonie at gmail.com (Steven Williams) Date: Fri, 16 May 2014 12:55:12 +1000 Subject: [rules-users] CompositiveClassLoader$CachingLoader$load method intermittently hangs In-Reply-To: <1395149512813-4028780.post@n3.nabble.com> References: <1395149512813-4028780.post@n3.nabble.com> Message-ID: We are also experiencing the same problems using 5.x and it is causing us big problems. I haven't had time to try it yet but do any developers know whether we would be safe to change the HashMap the CompositiveClassLoader is using to a ConcurrentHashMap? thanks Steve ------------------------------------------------------------------- Steven Williams On Wed, Mar 19, 2014 at 12:31 AM, mikerod wrote: > I cannot easily reproduce an issue that I'm seeing. This is an > intermittent > issue that happens probably 3% of the time or less. > > This is observed behavior in > * Drools v5.6.0.Final, using > * Janino compiler v2.5.16 && transitively Drools brings > * mvel2 v2.1.8.Final > > We have an environment that loads around 10 different KnowledgeBases into a > list. > Then one-by-one a single StatefulKnowledgeSession is created for a single > KnowledgeBase, facts are inserted, and then fireAllRules is called. > > Every so often, we noticed that we were getting what seemed to be ininite > looping behavior for during either insertion time or fireAllRules time. > When we subsequently re-run the *same* session with the *same* > KnowledgeBase > and the *same* facts inserted, it was successful and finished in > milliseconds (the average for our successful runs). We have repeatedly > seen > this behavior of 1 failure, followed by a re-run that is successful. > > We were able to attach a profiler to several of these hung sessions to > determine what was happening. It turns out that in both the scenario where > we saw a hang up on fact insertion and on fireAllRules call, the thread > dump > was the same. > > The stack looks like: > ``` > "main" - Thread t at 1 > java.lang.Thread.State: RUNNABLE > at java.util.HashMap.getEntry(HashMap.java:347) > at java.util.HashMap.containsKey(HashMap.java:335) > at > > org.drools.util.CompositeClassLoader$CachingLoader.load(CompositeClassLoader.java:244) > at > > org.drools.util.CompositeClassLoader$CachingLoader.load(CompositeClassLoader.java:237) > at > > org.drools.util.CompositeClassLoader.loadClass(CompositeClassLoader.java:88) > at java.lang.ClassLoader.loadClass(ClassLoader.java:247) > at java.lang.Class.forName0(Native Method) > at java.lang.Class.forName(Class.java:247) > at > > org.mvel2.ParserConfiguration.checkForDynamicImport(ParserConfiguration.java:163) > at > org.mvel2.ParserConfiguration.hasImport(ParserConfiguration.java:191) > at org.mvel2.ParserContext.hasImport(ParserContext.java:360) > at org.mvel2.ParserContext.isVariableVisible(ParserContext.java:715) > at > org.mvel2.compiler.ExpressionCompiler.verify(ExpressionCompiler.java:394) > at > org.mvel2.compiler.ExpressionCompiler._compile(ExpressionCompiler.java:250) > at > org.mvel2.compiler.ExpressionCompiler.compile(ExpressionCompiler.java:62) > at org.mvel2.MVEL.compileExpression(MVEL.java:810) > at > > org.drools.base.mvel.MVELCompilationUnit.compile(MVELCompilationUnit.java:417) > at > > org.drools.base.mvel.MVELCompilationUnit.getCompiledExpression(MVELCompilationUnit.java:238) > at > > org.drools.rule.constraint.MvelConstraint.createMvelConditionEvaluator(MvelConstraint.java:224) > at > org.drools.rule.constraint.MvelConstraint.evaluate(MvelConstraint.java:208) > at > > org.drools.rule.constraint.MvelConstraint.isAllowed(MvelConstraint.java:175) > at org.drools.reteoo.AlphaNode.assertObject(AlphaNode.java:133) > at > > org.drools.reteoo.CompositeObjectSinkAdapter.doPropagateAssertObject(CompositeObjectSinkAdapter.java:497) > at > > org.drools.reteoo.CompositeObjectSinkAdapter.propagateAssertObject(CompositeObjectSinkAdapter.java:382) > at > org.drools.reteoo.ObjectTypeNode.assertObject(ObjectTypeNode.java:302) > at > org.drools.reteoo.EntryPointNode.assertObject(EntryPointNode.java:254) > at org.drools.common.NamedEntryPoint.insert(NamedEntryPoint.java:366) > at > org.drools.common.SimpleBeliefSystem.insert(SimpleBeliefSystem.java:38) > at > > org.drools.common.TruthMaintenanceSystem.addLogicalDependency(TruthMaintenanceSystem.java:207) > at > > org.drools.common.TruthMaintenanceSystem.addLogicalDependency(TruthMaintenanceSystem.java:179) > at org.drools.common.NamedEntryPoint.insert(NamedEntryPoint.java:247) > at > > org.drools.common.AbstractWorkingMemory.insert(AbstractWorkingMemory.java:950) > at > > org.drools.base.DefaultKnowledgeHelper.insertLogical(DefaultKnowledgeHelper.java:263) > at > > org.drools.base.DefaultKnowledgeHelper.insertLogical(DefaultKnowledgeHelper.java:228) > at > > org.drools.base.DefaultKnowledgeHelper.insertLogical(DefaultKnowledgeHelper.java:223) > > at some.drools.generated.rule.package.Rule_ > at some.drools.generated.rule.package.Rule_ > at > org.drools.common.DefaultAgenda.fireActivation(DefaultAgenda.java:1282) > - locked <656dd9a0> (a org.drools.common.DefaultAgenda) > at > org.drools.common.DefaultAgenda.fireNextItem(DefaultAgenda.java:1216) > - locked <656dd9a0> (a org.drools.common.DefaultAgenda) > at > org.drools.common.DefaultAgenda.fireAllRules(DefaultAgenda.java:1451) > at > > org.drools.common.AbstractWorkingMemory.fireAllRules(AbstractWorkingMemory.java:756) > at > > org.drools.common.AbstractWorkingMemory.fireAllRules(AbstractWorkingMemory.java:718) > at > > org.drools.impl.StatefulKnowledgeSessionImpl.fireAllRules(StatefulKnowledgeSessionImpl.java:230) > > ``` > > We were able to get the same hung thread dump prior to fireAllRules. I > think the related entry point is during one of the #assertObject calls > midway through the stack. > The CompositiveClassLoader$CachingLoader definitely seems to be the issue. > > When we found this behavior consistently occurring (although rare), I found > the option of turning off the use of the caching loader by setting the > "drools.classLoaderCacheEnabled"="false" option referenced in the > ClassLoaderCacheOption class. > With this setting, we have done extensive retries to find this behavior and > it has vanished. > > This CompositiveClassLoader$CachingLoader uses an internal j.u.HashMap that > is not safe for concurrent access. I have listed below several related > posts on the topic. I'm fairly sure if this used a > j.u.c.ConcurrentHashMap, > this hanging thread scenario would not happen. > > However, most of the posts I've seen on this subject are from use-cases > where the application is explicitly doing some sort of multithreaded access > to the Drools > KnowledgeBase and/or StatefulKnowledgeSession. > > In my case, I do not know of *any* multithreaded actions taking place > within > my application around the Drools KnowledgeBase or StatefulKnowledgeSession. > I am not seeing ConcurrentModificationException though. Instead I'm seeing > a, seemingly infinite, loop in the j.u.HashMap#getEntry. > > Hanging in a "get" method of the j.u.HashMap would suggest to me that there > is a race condition where sometimes the j.u.HashMap#put on > the `classLoaderResultMap` field in the > CompositiveClassLoader$CachingLoader#load method is being executed at the > same time as another thread is doing the > j.u.HashMap#getEntry. If the j.u.HashMap were to resize at this point, it > could cause an infinite looping behavior. > > Does Drools internally use multithreading? Is there somewhere in the MVEL > lib or the Janino compiler where it may be concurrently accessing the > CompositiveClassLoader$CachingLoader$load method? > I have been digging around a lot and I cannot find what could be the root > cause of this behavior. > > > I think this relates directly to these: > > * http://lists.jboss.org/pipermail/rules-users/2013-July/032446.html > * http://lists.jboss.org/pipermail/rules-users/2013-July/032446.html > > However, I do not see a real resolution to the problem. > > I also see several related issues: > > * http://lists.jboss.org/pipermail/rules-users/2013-July/032446.html > * https://issues.jboss.org/browse/JBRULES-3552 > > > > > -- > View this message in context: > http://drools.46999.n3.nabble.com/CompositiveClassLoader-CachingLoader-load-method-intermittently-hangs-tp4028780.html > Sent from the Drools: User forum mailing list archive at Nabble.com. > _______________________________________________ > rules-users mailing list > rules-users at lists.jboss.org > https://lists.jboss.org/mailman/listinfo/rules-users > -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.jboss.org/pipermail/rules-users/attachments/20140516/d07074e3/attachment.html From plindenbaum at yahoo.fr Fri May 16 10:16:41 2014 From: plindenbaum at yahoo.fr (lindenb) Date: Fri, 16 May 2014 07:16:41 -0700 (PDT) Subject: [rules-users] Newbie: is my data model suitable for drools ? Message-ID: <1400249801179-4029590.post@n3.nabble.com> Hi all, I'm working in the field of bioinformatics where I study more a large number of variations (N> 10E6) along the human genome among individuals affected by a genetic disease. ( * ) my data looks like this (much simplified !) #CHROMOSOME POSITION GENE PROPERTIES SAMPLE1 SAMPLE2 SAMPLE3 chr1 987 GENE1,GENE3 score=1 null A/A A/G chr1 988 GENE3 score=4;id=989 A/G null A/A chr1 1988 null score=4;id=989 C/G null C/A People in my lab have to filter those variation using different strategy, they then extract the overlapping genes and then filter those genes to find one or more gene that could explain the disease. Currently they use knime.org to run those filters. (http://www.myexperiment.org/workflows/2320.html ) But I've got the feeling that drools could be used to filter those variations. Users would 'just' have to write some rules, run the engine and get the result. Rules would be removed/switched to get the result for another strategy. Question: 1) is drools a good choice here ? 2) how should I model my data ? If I use this java model: class Gene { List getVariations(); } class Variation { String getChromosome(); int getPosition(); List getGenes(); List getGenotypes(); } class Genotype{ Variation getVariation(); Sample getSample(); String getDNA(); } it will create a large graph, can drools support it ? 3) Where in the documentation can I find how to easily set the state my objects in order to filter them. E.g: variations ->[filters1]-> [filter2]----------------->[fiilter5] -> result `>[filter3]->[filter4]--/ Thank you, Pierre (*) http://www.1000genomes.org/wiki/Analysis/Variant%20Call%20Format/vcf-variant-call-format-version-41 -- View this message in context: http://drools.46999.n3.nabble.com/Newbie-is-my-data-model-suitable-for-drools-tp4029590.html Sent from the Drools: User forum mailing list archive at Nabble.com. From raojinghai at gmail.com Fri May 16 20:46:25 2014 From: raojinghai at gmail.com (rjh) Date: Fri, 16 May 2014 17:46:25 -0700 (PDT) Subject: [rules-users] Map and modify() can't be together Message-ID: <1400287585777-4029591.post@n3.nabble.com> Hi, I got a weird problem. A Java List/Map with generics can be used together with modify() in the same rule. For example, a simple rule like the following: package com.sample import java.util.Map; import java.util.HashMap; declare TestFact @propertyReactive data : String end rule "init" when not TestFact() then insert (new TestFact()); end rule "Test Rule" when $fact : TestFact() then System.out.println( "Hello" ); Map a = new HashMap(); modify ($fact) {setData("0")} end I got the following error message: java.lang.RuntimeException: Error while creating KieBase[Message [id=1, level=ERROR, path=rules/Sample.drl, line=18, column=0 text=Unable to resolve type Map: Unable to find class 'Map']] at org.drools.compiler.kie.builder.impl.KieContainerImpl.getKieBase(KieContainerImpl.java:260) at org.drools.compiler.kie.builder.impl.KieContainerImpl.newKieSession(KieContainerImpl.java:400) at org.drools.compiler.kie.builder.impl.KieContainerImpl.newKieSession(KieContainerImpl.java:375) at com.sample.DroolsTest.main(DroolsTest.java:17) However, if I remove "" from "Map", or remove the "modify" line, the code is correct then. Thank you! Jinghai -- View this message in context: http://drools.46999.n3.nabble.com/Map-String-String-and-modify-can-t-be-together-tp4029591.html Sent from the Drools: User forum mailing list archive at Nabble.com. From ephemeris.lappis at gmail.com Sat May 17 02:50:06 2014 From: ephemeris.lappis at gmail.com (Ephemeris Lappis) Date: Fri, 16 May 2014 23:50:06 -0700 (PDT) Subject: [rules-users] Deploy Rules in separate OSGi bundles In-Reply-To: References: <1399966763404-4029541.post@n3.nabble.com> <5372634E.5010506@gmail.com> Message-ID: <1400309406613-4029592.post@n3.nabble.com> Hello.According to your advices I've done some tests with the Drools 6.1.0 fetaures, and it seems to work but with some problems.I've installed the feature as follow to start what seems to be the minimal needed package to make my application code work :features:addurl mvn:org.drools/drools-karaf-features/6.1.0.Beta3/xml/featuresfeatures:install drools-commonfeatures:install drools-modulefeatures:install kieMy code is very simple, it uses the KIE AI with no special classloader mentions for example, and my rules files (kmodule.xml and drl files) are found as expected in the jar that loads them (in a first time I've not tried to separate rules from code).I've found a problem when updating my bundle that contains the rules, with the following exception.Some idea about that ? I interpret that rules are managed by Drools in a repository that rebembers the origin classloader, and that doesn't refresh itsef when the rules source bundles are updated. Is it a bug ?I found that stopping all the feature bundles abnd restarting them seem to reload the rules, but sometimes with a large flow of errors in the console (I have no copy of that)...Could you please confirm I'm on the right way ?Another question is about the best way to deploy the Drools features when the production system has no internet access, which is our case. Is there any prepackaged feature that can be deployed on the local system to avoid external maven acesses ?Thanks a lot.Regards. -- View this message in context: http://drools.46999.n3.nabble.com/Deploy-Rules-in-separate-OSGi-bundles-tp4029541p4029592.html Sent from the Drools: User forum mailing list archive at Nabble.com. -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.jboss.org/pipermail/rules-users/attachments/20140516/3eeb8f62/attachment-0001.html From wolfgang.laun at gmail.com Sat May 17 02:58:23 2014 From: wolfgang.laun at gmail.com (Wolfgang Laun) Date: Sat, 17 May 2014 08:58:23 +0200 Subject: [rules-users] Map and modify() can't be together In-Reply-To: <1400287585777-4029591.post@n3.nabble.com> References: <1400287585777-4029591.post@n3.nabble.com> Message-ID: This also works: Map a = new HashMap<>(); More ways to run into an error Map a; a = new HashMap(); etc. Using 6.0.0-Final -W On 17/05/2014, rjh wrote: > Hi, > > I got a weird problem. A Java List/Map with generics can be used together > with modify() in the same rule. For example, a simple rule like the > following: > > package com.sample > > import java.util.Map; > import java.util.HashMap; > > declare TestFact > @propertyReactive > data : String > end > > rule "init" > when > not TestFact() > then > insert (new TestFact()); > end > > rule "Test Rule" > when > $fact : TestFact() > then > System.out.println( "Hello" ); > Map a = new HashMap(); > modify ($fact) {setData("0")} > end > > I got the following error message: > > java.lang.RuntimeException: Error while creating KieBase[Message [id=1, > level=ERROR, path=rules/Sample.drl, line=18, column=0 > text=Unable to resolve type Map: > Unable to find class 'Map']] > at > org.drools.compiler.kie.builder.impl.KieContainerImpl.getKieBase(KieContainerImpl.java:260) > at > org.drools.compiler.kie.builder.impl.KieContainerImpl.newKieSession(KieContainerImpl.java:400) > at > org.drools.compiler.kie.builder.impl.KieContainerImpl.newKieSession(KieContainerImpl.java:375) > at com.sample.DroolsTest.main(DroolsTest.java:17) > > However, if I remove "" from "Map", or remove > the "modify" line, the code is correct then. > > Thank you! > > Jinghai > > > > > -- > View this message in context: > http://drools.46999.n3.nabble.com/Map-String-String-and-modify-can-t-be-together-tp4029591.html > Sent from the Drools: User forum mailing list archive at Nabble.com. > _______________________________________________ > rules-users mailing list > rules-users at lists.jboss.org > https://lists.jboss.org/mailman/listinfo/rules-users > From wolfgang.laun at gmail.com Sat May 17 10:52:28 2014 From: wolfgang.laun at gmail.com (Wolfgang Laun) Date: Sat, 17 May 2014 16:52:28 +0200 Subject: [rules-users] Newbie: is my data model suitable for drools ? In-Reply-To: <1400249801179-4029590.post@n3.nabble.com> References: <1400249801179-4029590.post@n3.nabble.com> Message-ID: In order to judge the quality of a data model for Drools you should have a fairly conclusive idea about the rules you are going to write. (This isn't different from other applications: Storing the data in some organisation may work fine, but fitness for access is a different matter.) The Lists may stand investigation. Is the order in the List important? Is the List just a hidden set? Is an m:n relationship better expressed by an entity of its own? The relational data model of DBs is a good approach for being prepared for a variety of requests and, therefore, rules. -W On 16/05/2014, lindenb wrote: > Hi all, > > I'm working in the field of bioinformatics where I study more a large > number > of variations (N> 10E6) along the human genome among individuals affected > by a genetic disease. ( * ) > > my data looks like this (much simplified !) > > #CHROMOSOME POSITION GENE PROPERTIES SAMPLE1 SAMPLE2 > SAMPLE3 > chr1 987 GENE1,GENE3 score=1 null A/A A/G > chr1 988 GENE3 score=4;id=989 A/G null A/A > chr1 1988 null score=4;id=989 C/G null C/A > > > People in my lab have to filter those variation using different strategy, > they then extract the overlapping genes and then filter those genes to find > one or more gene that could explain the disease. > > Currently they use knime.org to run those filters. > (http://www.myexperiment.org/workflows/2320.html ) > > But I've got the feeling that drools could be used to filter those > variations. > Users would 'just' have to write some rules, run the engine and get the > result. > Rules would be removed/switched to get the result for another strategy. > > Question: > 1) is drools a good choice here ? > 2) how should I model my data ? > > If I use this java model: > > class Gene { > List getVariations(); > } > > class Variation { > String getChromosome(); > int getPosition(); > List getGenes(); > List getGenotypes(); > } > > class Genotype{ > Variation getVariation(); > Sample getSample(); > String getDNA(); > } > > it will create a large graph, can drools support it ? > > 3) Where in the documentation can I find how to easily set the state my > objects in order to filter them. E.g: > > variations ->[filters1]-> [filter2]----------------->[fiilter5] -> result > `>[filter3]->[filter4]--/ > > Thank you, > > Pierre > > (*) > http://www.1000genomes.org/wiki/Analysis/Variant%20Call%20Format/vcf-variant-call-format-version-41 > > > > -- > View this message in context: > http://drools.46999.n3.nabble.com/Newbie-is-my-data-model-suitable-for-drools-tp4029590.html > Sent from the Drools: User forum mailing list archive at Nabble.com. > _______________________________________________ > rules-users mailing list > rules-users at lists.jboss.org > https://lists.jboss.org/mailman/listinfo/rules-users > From raojinghai at gmail.com Sat May 17 22:27:11 2014 From: raojinghai at gmail.com (raojinghai at gmail.com) Date: Sat, 17 May 2014 19:27:11 -0700 Subject: [rules-users] Map and modify() can't be together In-Reply-To: References: <1400287585777-4029591.post@n3.nabble.com> Message-ID: Hi Wolfgang, You are right. It only happens for variable declaration. It has no problem on the right side. For example Map a = new HashMap() has no problem. I am using 6.0.1-Final. Thanks. Jinghai On Fri, May 16, 2014 at 11:58 PM, Wolfgang Laun wrote: > This also works: > Map a = new HashMap<>(); > > More ways to run into an error > Map a; > a = new HashMap(); > etc. > > Using 6.0.0-Final > -W > > On 17/05/2014, rjh wrote: > > Hi, > > > > I got a weird problem. A Java List/Map with generics can be used together > > with modify() in the same rule. For example, a simple rule like the > > following: > > > > package com.sample > > > > import java.util.Map; > > import java.util.HashMap; > > > > declare TestFact > > @propertyReactive > > data : String > > end > > > > rule "init" > > when > > not TestFact() > > then > > insert (new TestFact()); > > end > > > > rule "Test Rule" > > when > > $fact : TestFact() > > then > > System.out.println( "Hello" ); > > Map a = new HashMap(); > > modify ($fact) {setData("0")} > > end > > > > I got the following error message: > > > > java.lang.RuntimeException: Error while creating KieBase[Message [id=1, > > level=ERROR, path=rules/Sample.drl, line=18, column=0 > > text=Unable to resolve type Map: > > Unable to find class 'Map']] > > at > > > org.drools.compiler.kie.builder.impl.KieContainerImpl.getKieBase(KieContainerImpl.java:260) > > at > > > org.drools.compiler.kie.builder.impl.KieContainerImpl.newKieSession(KieContainerImpl.java:400) > > at > > > org.drools.compiler.kie.builder.impl.KieContainerImpl.newKieSession(KieContainerImpl.java:375) > > at com.sample.DroolsTest.main(DroolsTest.java:17) > > > > However, if I remove "" from "Map", or > remove > > the "modify" line, the code is correct then. > > > > Thank you! > > > > Jinghai > > > > > > > > > > -- > > View this message in context: > > > http://drools.46999.n3.nabble.com/Map-String-String-and-modify-can-t-be-together-tp4029591.html > > Sent from the Drools: User forum mailing list archive at Nabble.com. > > _______________________________________________ > > rules-users mailing list > > rules-users at lists.jboss.org > > https://lists.jboss.org/mailman/listinfo/rules-users > > > _______________________________________________ > rules-users mailing list > rules-users at lists.jboss.org > https://lists.jboss.org/mailman/listinfo/rules-users > -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.jboss.org/pipermail/rules-users/attachments/20140517/813f3cc4/attachment.html From mjr4184 at gmail.com Sun May 18 22:21:18 2014 From: mjr4184 at gmail.com (mikerod) Date: Sun, 18 May 2014 19:21:18 -0700 (PDT) Subject: [rules-users] CompositiveClassLoader$CachingLoader$load method intermittently hangs In-Reply-To: References: <1395149512813-4028780.post@n3.nabble.com> Message-ID: <1400466078313-4029597.post@n3.nabble.com> I was finally able to take some time and find out where multiple threads could be showing up in the environment where my application was not doing any multithreaded work with the Drools knowledge base or session. One example I have can be seen by looking at the `org.drools.rule.constraint.MvelConstraint` class. This method `#jitEvaluator(Object, InternalWorkingMemory, LeftTuple)` has a line: `ExecutorHolder.executor.execute(new ConditionJitter(this, object, workingMemory, leftTuple));` This is roughly around this line in 5.5.0.Final, for example. https://github.com/droolsjbpm/drools/blob/5.5.0.Final/drools-core/src/main/java/org/drools/rule/constraint/MvelConstraint.java#L232 My understanding of this method functionality is that a `java.util.concurrent.Executor` is used to execute a Runnable. The Executor returned is configurable via the `org.drools.util.ServiceRegistry`. There is a related Drools RuleBaseConfiguration option called "executorService" that allows the user to configure the details of how this Runnable is executed. e.g. a custom application thread pool, a simple thread, no new thread at all - synchronously. Drools has a default for this executorService, which is @ https://github.com/droolsjbpm/drools/blob/5.5.0.Final/drools-core/src/main/java/org/drools/concurrent/ExecutorProviderImpl.java#L11 This implementation runs the Runnable in a new thread, this is where a concurrency issue is able to come into the picture. So in the MvelConstraint#jitEvaluator example I mention above, uses this executor to perform some of the Jit compilation on MVEL constraints in a new thread, to not "burden" the current thread with this work. The issue is that the Runnable work that is done on another thread by the ConditionJitter, ultimately works with the same `org.drools.util.CompositeClassLoader$CachingLoader` as the main/other thread(s). This CachingLoader is not safe for concurrent access to its `classLoaderResultMap` field, since it is implemented as a `j.u.HashMap`. e.g. if one thread is reading from the cache at the same time as another thread is doing a #put into the cache and the cache resizes, this can lead to the reading going into a non-terminating loop. So, in summary, my application has no multithreading being done with regard to the main thread working with the Drools knowledge base and session. However, when some of the knowledge base is being compiled/Jitted there are multiple threads doing work, and on some occasions they we run into a concurrent access to the CachingLoader cache problem resulting in a non-terminating loop. I believe this would fall into the category of a "race condition" in that I've only observed the issue happening about 1-5% of the time of the same knowledge base being built. I'll am being general on saying "built" here, as I am not sure this is the correct terminology to describe the time that MvelConstraint's are being/attempted to be Jitted and this is happening. I'll note that "turning off" jitting didn't fix the problem. There is a chance that I did not effectively stop all jitting though. I attempted to turn it off, by what is explained @ http://mvel.codehaus.org/Disabling+the+JIT+Compiler. I cannot remember if I've tried to turn it off via "drools.permgenThreshold" in my experiments with this issue though. (That one is described @ http://drools.46999.n3.nabble.com/rules-users-Out-of-Mem-and-thousand-threads-Disabling-JIT-td4026694.html) I noticed that with jitting "turned off" this method was still being called when a MvelConstraint was found to be "dynamic" via the `isDynamic` boolean flag of the MvelConstraint class. I'm not clear on what causes a constraint to be considered dynamic or not. The workaround that *did* work for me was to just disable the CacheLoader via the configuration property "drools.classLoaderCacheEnabled". I do not believe I've seen significant performance degradation with this in my use-case. Another alternative to fixing this issue (I'd imagine) could be by configuring the executorService to not use multiple-threads. However, I'd assume that this is higher impact and more complicated than disabling the CacheLoader. I believe that using the `java.util.concurrent.ConcurrentHashMap` may solve this particular issue. However, I haven't done any further evaluation/analysis of the CacheLoader class to ensure that it is truly safe for use by multiple threads concurrently performaing reads and writes. I would say that the CacheLoader feature seems a bit broken right now in its default use, due to the problem of Drools using multiple threads internally when building the knowledge base. I'm not sure how any of this relates to the Drools v6.x family. -- View this message in context: http://drools.46999.n3.nabble.com/CompositiveClassLoader-CachingLoader-load-method-intermittently-hangs-tp4028780p4029597.html Sent from the Drools: User forum mailing list archive at Nabble.com. From mproctor at codehaus.org Mon May 19 02:16:50 2014 From: mproctor at codehaus.org (Mark Proctor) Date: Mon, 19 May 2014 07:16:50 +0100 Subject: [rules-users] CompositiveClassLoader$CachingLoader$load method intermittently hangs In-Reply-To: <1400466078313-4029597.post@n3.nabble.com> References: <1395149512813-4028780.post@n3.nabble.com> <1400466078313-4029597.post@n3.nabble.com> Message-ID: On 19 May 2014, at 03:21, mikerod wrote: > > I'm not sure how any of this relates to the Drools v6.x family. CompositeClassLoader is all gone, so I don?t think this issue will exist in 6.x. Would be good if you could verify with beta3: http://downloads.jboss.org/drools/release/6.1.0.Beta3/ We?ll look into 5.x too at some point in the next few weeks. Mark -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.jboss.org/pipermail/rules-users/attachments/20140519/13cd9b93/attachment.html From michael.anstis at gmail.com Mon May 19 03:58:36 2014 From: michael.anstis at gmail.com (Michael Anstis) Date: Mon, 19 May 2014 08:58:36 +0100 Subject: [rules-users] Startup KIE Workbench without network connection In-Reply-To: References: Message-ID: This is true. It looks like we don't handle errors thrown when attempting to set-upthe default repositories. Could you please raise a JIRA to prevent this issue from being lost (or submit a Pull Request with a fix). Thanks, Mike On 15 May 2014 16:58, Sandjaja, Dominik wrote: > Hello, > > > > many thanks for that information! I somehow never got that far down in the > properties-page to notice. > > > > Nevertheless I think that the startup should not fail completely, if the > sample repositories cannot be downloaded. Shouldn?t a warning suffice? > > > > Thank you! > > > > Dominik > > > > *Von:* rules-users-bounces at lists.jboss.org [mailto: > rules-users-bounces at lists.jboss.org] *Im Auftrag von *Ioannis > Christodoulou > *Ge**sendet:* Donnerstag, 15. Mai 2014 17:40 > *An:* Rules Users List > *Betreff:* Re: [rules-users] Startup KIE Workbench without network > connection > > > > Hello, > > you probably need to set: > > -Dorg.kie.demo=false and -Dorg.kie.example=false in your startup variables. > > > > For example, using jboss, I have in standalone.conf file (used during > jboss startup) > > JAVA_OPTS="$JAVA_OPTS -Dorg.kie.demo=false -Dorg.kie.example=false > > This will disable the demo and the example sources from the workbench. > > > > > ????????? ????, > ??????? ???????????? > > > > On Thu, May 15, 2014 at 6:27 PM, Sandjaja, Dominik < > dominik.sandjaja at it-motive.de> wrote: > > Hello, > > > > I try to setup KIE Workbench (6.1.0.BetaX) on Tomcat 7 on a Windows 2012 > Server without connection to the internet. > > > > When starting up, the KIE-WB does not start up. I get the following errors > in localhost.log (cut for better readability): > > > > Mai 15, 2014 5:08:18 PM org.apache.catalina.core.StandardContext > listenerStart > > Schwerwiegend: Exception sending context initialized event to listener > instance of class org.jboss.weld.environment.servlet.Listener > > org.jboss.weld.exceptions.DeploymentException: Exception List with 1 > exceptions: > > [?] > > Caused by: java.lang.RuntimeException: > https://github.com/guvnorngtestuser1/guvnorng-playground.git: cannot open > git-upload-pack > > [?] > > Caused by: java.net.ConnectException: Connection time out: github.com > > > > This happens because the initial demo repository is downloaded ? I do not > want and need those repositories! > > > > I could work around this by copying the TOMCAT_HOME/bin/.niogit directory > to that server and have it start up then. > > > > BUT: IMHO it is an inconvenience, maybe even a bug, that an internet > connection is needed to set up the Drools KIE Workbench. How are we > supposed to tell our infrastructure team that we need an open connection to > ?some website with code? to setup an editing system for internal knowledge ? > > Should I file a bug for that? Is there a way to deactivate the downloading > of the initial demo repository? Could it somehow be delivered with the > KIE-WB package? > > > > Thanks > > Dominik > > > ????????????????????????? > mit freundlichen Gr??en / kind regards > Dominik Sandjaja > Fon: +49 (0) 203 60878 183 > Fax: +49 (0) 203 60878 222 > e-mail: dominik.sandjaja at it-motive.de > > it-motive AG > Zum Walkm?ller 6 > 47269 Duisburg > info at it-motive.de > http://www.it-motive.de > ?????????????????????????? > Vorsitzender des Aufsichtsrats: Dr.-Ing. J?rgen Sturm > Vorstand: Horst-Dieter Deelmann (Vors.), Matthias Heming, Christoph Tim > Klose > HRB 9207, Amtsgericht Duisburg > > > _______________________________________________ > rules-users mailing list > rules-users at lists.jboss.org > https://lists.jboss.org/mailman/listinfo/rules-users > > > > ????????????????????????? > mit freundlichen Gr??en / kind regards > Dominik Sandjaja > Fon: +49 (0) 203 60878 183 > Fax: +49 (0) 203 60878 222 > e-mail: dominik.sandjaja at it-motive.de > > it-motive AG > Zum Walkm?ller 6 > 47269 Duisburg > info at it-motive.de > http://www.it-motive.de > ?????????????????????????? > Vorsitzender des Aufsichtsrats: Dr.-Ing. J?rgen Sturm > Vorstand: Horst-Dieter Deelmann (Vors.), Matthias Heming, Christoph Tim > Klose > HRB 9207, Amtsgericht Duisburg > > _______________________________________________ > rules-users mailing list > rules-users at lists.jboss.org > https://lists.jboss.org/mailman/listinfo/rules-users > -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.jboss.org/pipermail/rules-users/attachments/20140519/761b561e/attachment-0001.html From ganeshneelekani at gmail.com Mon May 19 04:40:21 2014 From: ganeshneelekani at gmail.com (ganeshneelekani) Date: Mon, 19 May 2014 01:40:21 -0700 (PDT) Subject: [rules-users] drools 6.0 update site Message-ID: <1400488821314-4029600.post@n3.nabble.com> Hi Team, Whenever i try to update drools 6.0 to eclipse . It gives error details such as Some sites could not be found. See the error log for more detail. No repository found at file:/C:/java/. No repository found at http://anonsvn.labs.jboss.com/labs/jbossrules/updates/drools-ide-update/. No repository found at http://testng.org/doc/download.html. No repository found at jar:file:/D:/jboss/jboss-6.0.0.Final/bin/run.jar!/. No repository found at http://marketplace.eclipse.org/repo/. Unable to read repository at jar:file:/D:/jboss/jboss-6.0.0.Final/bin/run.jar/content.xml. Exception creating URL for {0} No repository found at http://beust.com/eclipse%2522. Is there any update site for 6 release Regards Ganesh Neelekani -- View this message in context: http://drools.46999.n3.nabble.com/drools-6-0-update-site-tp4029600.html Sent from the Drools: User forum mailing list archive at Nabble.com. From ephemeris.lappis at gmail.com Mon May 19 10:00:40 2014 From: ephemeris.lappis at gmail.com (Ephemeris Lappis) Date: Mon, 19 May 2014 07:00:40 -0700 (PDT) Subject: [rules-users] Rules compilation error with OSGi integration (6.1.0.Beta3) Message-ID: <1400508040790-4029601.post@n3.nabble.com> Hello. We have a very simple rules file that works as expected when running as a JUnit test in Eclipse with Maven dependencies, but fails when it is executing in ServiceMix with OSGi integration. The code is just like : raw> Map dialog = new LinkedHashMap<>(); KieSession kieSession = kieContainer.newKieSession("MyKSession"); kieSession.setGlobal("dialog", dialog); kieSession.insert(problem); kieSession.fireAllRules(); kieSession.dispose(); The rules file : And the kmodule.xml : The compilation error is about Java 7 syntax elements (as generics or thousand separators in number literals for example), and seems to indicate that in this case the compiler is not the same, and it expects another Java syntax. No error is reported when the KieContainer is created from the KModule.xml, but the following error occurs when using it for KSession creation. This occurs both with the prepackaged feature (http://repo1.maven.org/maven2/org/drools/drools-karaf-features/6.1.0.Beta3/drools-karaf-features-6.1.0.Beta3-features.xml), or with an adapted one. For example, the Maven dependancies classpath in eclipse mentions newer versions of the Eclipse's ECJ. But changing the version of bundles has no effect... What is missing in the feature to activate the correct rules compiler ? Thanks for your help ? Regards. -- View this message in context: http://drools.46999.n3.nabble.com/Rules-compilation-error-with-OSGi-integration-6-1-0-Beta3-tp4029601.html Sent from the Drools: User forum mailing list archive at Nabble.com. From dominik.sandjaja at it-motive.de Mon May 19 11:10:34 2014 From: dominik.sandjaja at it-motive.de (Sandjaja, Dominik) Date: Mon, 19 May 2014 17:10:34 +0200 Subject: [rules-users] Efficiency questions about DSL In-Reply-To: References: <1395134414926-4028774.post@n3.nabble.com> Message-ID: Hello, any progress or new on this issue? I am currently facing the situation that I'd like to create a "basic DSL" for different projects, placing it in a separate artifact which only gets included. It would be great if the KIE Workbench (and, obviously, the underlying engine) supported that. Thank you Dominik Von: rules-users-bounces at lists.jboss.org [mailto:rules-users-bounces at lists.jboss.org] Im Auftrag von Michael Anstis Gesendet: Freitag, 21. M?rz 2014 15:19 An: Rules Users List Betreff: Re: [rules-users] Efficiency questions about DSL It's a deliberate decision in the workbench; as it follows what is supported by the core engine. I've asked the core engine developers to comment on whether the underlying Drools engine supports (does support, should support or will support) cross-JAR DSLs. With kind regards, Mike On 21 March 2014 08:52, mfalaize > wrote: Is it a deliberate choice to not include DSL files in the "same package" ? If we are limited to the same folder (or same package), what do you think about supporting inheritance in DSL files ? With this feature we could provide to the community generic translation DSL files for many languages. Sorry for the new questions ! :D I'd like to help to develop but I don't want to make useless contributions... 2014-03-20 20:19 GMT+01:00 manstis [via Drools] <[hidden email]>: So many questions.... I can comment on the workbench related aspects. The workbench only includes DSL files for authoring DSLR (or RDSLR) files that are in the same "folder" as the rule. I use the term "folder" as we don't support "same package" (which would imply if the same package existed in different JARs we'd include all DSL files - we do not). The "expander" keyword is, AFAIK, deprecated. DSL/DSLR expansion depends upon the files being in the same "folder". @Mario, @Mark, @Edson. Can you comment on whether KIE does handle DSL expansion across different JARs? Sent on the move On 18 Mar 2014 09:20, "mfalaize" <[hidden email]> wrote: Hi, I was wondering how to use efficiently DSL with my rules and I have several questions about it : - First, I have the impression that we can use DSL files only in the same package of the DSLR file. When I tried to load DSL files by the kmodule.xml (specifying the different packages in the packages attribute of kbase) it does not work. Do I have to load each DSL files programmatically or is there a way to load it automatically by the kmodule.xml (and if it is the case, how can we handle the parsing order of these files ?) ? - An underlying question is is this a good practice to divide DSL files ? I would like to translate all my rules in french and to put the generic translations in a unique DSL file to reuse it in all of my different DSLR files. - I noted that we can use more than one DSL file for one DSLR file (it works at the runtime) but when it is the case the DRL viewer of the DSL rule editor does not work and I don't have autocompletion. I tried to put several expander instructions but it fails. Is there a way to make it work ? I think DSL stuff is underestimate at this moment by the community and for my last question I would like to know what is the future plans about this feature ? Maybe I could help to develop it. Regards -- View this message in context: http://drools.46999.n3.nabble.com/Efficiency-questions-about-DSL-tp4028774.html Sent from the Drools: User forum mailing list archive at Nabble.com. _______________________________________________ rules-users mailing list [hidden email] https://lists.jboss.org/mailman/listinfo/rules-users _______________________________________________ rules-users mailing list [hidden email] https://lists.jboss.org/mailman/listinfo/rules-users ________________________________ If you reply to this email, your message will be added to the discussion below: http://drools.46999.n3.nabble.com/Efficiency-questions-about-DSL-tp4028774p4028841.html To unsubscribe from Efficiency questions about DSL, click here. NAML -- Maxime FALAIZE ________________________________ View this message in context: Re: [rules-users] Efficiency questions about DSL Sent from the Drools: User forum mailing list archive at Nabble.com. _______________________________________________ rules-users mailing list rules-users at lists.jboss.org https://lists.jboss.org/mailman/listinfo/rules-users ........................................................................... mit freundlichen Gr??en / kind regards Dominik Sandjaja Fon: +49 (0) 203 60878 183 Fax: +49 (0) 203 60878 222 e-mail: dominik.sandjaja at it-motive.de it-motive AG Zum Walkm?ller 6 47269 Duisburg info at it-motive.de http://www.it-motive.de .............................................................................. Vorsitzender des Aufsichtsrats: Dr.-Ing. J?rgen Sturm Vorstand: Horst-Dieter Deelmann (Vors.), Matthias Heming, Christoph Tim Klose HRB 9207, Amtsgericht Duisburg -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.jboss.org/pipermail/rules-users/attachments/20140519/6602358a/attachment.html From kenneth.mcarthur at nielsen.com Mon May 19 11:13:19 2014 From: kenneth.mcarthur at nielsen.com (kenatnielsen) Date: Mon, 19 May 2014 08:13:19 -0700 (PDT) Subject: [rules-users] newbie question about KnowledgeBuilder Message-ID: <1400512399188-4029604.post@n3.nabble.com> Hi, I'm inheriting Drools 6.0 application where all rules are in one huge drl file. Would behavior be different if I broke rules into multiple files and loaded with multiple calls to KnowledgeBuilder.add()? Also, KnowledgeBuilder is being created with each session: KnowledgeBuilder.newKnowledgeBuilder() and then knowledgeBuilder.add(). Since rules don't change, any reason why can't create KnowledgeBuilder at startup and share it? Is it thread safe and can it be re-used? Thanks, Ken -- View this message in context: http://drools.46999.n3.nabble.com/newbie-question-about-KnowledgeBuilder-tp4029604.html Sent from the Drools: User forum mailing list archive at Nabble.com. From kurrent93 at gmail.com Mon May 19 13:16:19 2014 From: kurrent93 at gmail.com (Anton Hughes) Date: Mon, 19 May 2014 19:16:19 +0200 Subject: [rules-users] Drools and GPU Message-ID: Hi all We have finding drools to be very resource hungry - and we are looking at having to have very many servers just to satisfy our drools requirements. So I am wondering, has anyone experimented with running drools on a GPU server? Thanks and regards Anton -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.jboss.org/pipermail/rules-users/attachments/20140519/fb1a1550/attachment-0001.html From wolfgang.laun at gmail.com Mon May 19 13:31:18 2014 From: wolfgang.laun at gmail.com (Wolfgang Laun) Date: Mon, 19 May 2014 19:31:18 +0200 Subject: [rules-users] Drools and GPU In-Reply-To: References: Message-ID: Graphics Processing Unit??? Gosudarstvennoe Politicheskoe Upravlenie?????? So as not to appear too derogative, let me ask how this "resource hunger" exhibits itself. Very frequently, some misconception w.r.t. rule structure and/or data model results in an inadequate resource consumptation that might easily have avoided. -W On 19/05/2014, Anton Hughes wrote: > Hi all > > We have finding drools to be very resource hungry - and we are looking at > having to have very many servers just to satisfy our drools requirements. > So I am wondering, has anyone experimented with running drools on a GPU > server? > > Thanks and regards > Anton > From mkw_vmoreira at brisa.pt Mon May 19 13:45:11 2014 From: mkw_vmoreira at brisa.pt (=?ISO-8859-1?Q?V=EDtor_Rui_Moreira?=) Date: Mon, 19 May 2014 18:45:11 +0100 Subject: [rules-users] Drools and GPU In-Reply-To: References: Message-ID: <537A4327.3070800@brisa.pt> ?I agree with Wolfgang... My first version of the rules regarding expiration of events in a length sliding windows took 120s in my benchmark. After thinking a little bit, the second version took 2s. Changed dramatically the behavior of the application, now can process several thousands of events in no time! If I were you, my first try was to optimize the rules, doing some benchmark/profiling, to know where the bottleneck is. Just my 2c, V?tor Rui Moreira On 19/05/2014, 18:31, Wolfgang Laun wrote: > Graphics Processing Unit??? > Gosudarstvennoe Politicheskoe Upravlenie?????? > > So as not to appear too derogative, let me ask how this "resource > hunger" exhibits itself. Very frequently, some misconception w.r.t. > rule structure and/or > data model results in an inadequate resource consumptation that might > easily have avoided. > > -W > > On 19/05/2014, Anton Hughes wrote: >> Hi all >> >> We have finding drools to be very resource hungry - and we are looking at >> having to have very many servers just to satisfy our drools requirements. >> So I am wondering, has anyone experimented with running drools on a GPU >> server? >> >> Thanks and regards >> Anton >> > -------------------------------------------------------------------------------- Declara??o: A informa??o contida nesta mensagem, e os ficheiros anexos, ? privilegiada e confidencial, destinando-se exclusivamente ao(s) destinat?rio(s).Se n?o ? o destinat?rio (ou o respons?vel pela sua entrega ao destinat?rio) e recebeu a mesma por engano, fica notificado que ? estritamente proibido reproduzir, guardar ou distribuir toda ou qualquer parte desta mensagem e ficheiros anexos. Por favor reencaminhe a mensagem para o respons?vel pelo seu envio ou contacte-nos por telefone e elimine a mensagem e ficheiros anexos do seu computador, sem os reproduzir. Disclaimer: The information contained in this message, and any files attached, is privileged and confidential, and intended exclusively for the included addresses. If you are not the intended recipient (or the person responsible for delivering to the intended recipient) and received this message by mistake, be aware that copy, storage, distribution or any other use of all or part of this message and the files attached is strictly prohibited. Please notify the sender by reply e-mail or contact us by telephone and delete this message and the files attached, without retaining a copy. -------------------------------------------------------------------------------- _______________________________________________ > rules-users mailing list > rules-users at lists.jboss.org > https://lists.jboss.org/mailman/listinfo/rules-users > > From mproctor at codehaus.org Mon May 19 14:05:50 2014 From: mproctor at codehaus.org (Mark Proctor) Date: Mon, 19 May 2014 19:05:50 +0100 Subject: [rules-users] Drools and GPU In-Reply-To: References: Message-ID: GPUs do not allow state/reference sharing. So it?s not as ideal as you think. Mark On 19 May 2014, at 18:16, Anton Hughes wrote: > Hi all > > We have finding drools to be very resource hungry - and we are looking at having to have very many servers just to satisfy our drools requirements. So I am wondering, has anyone experimented with running drools on a GPU server? > > Thanks and regards > Anton > _______________________________________________ > rules-users mailing list > rules-users at lists.jboss.org > https://lists.jboss.org/mailman/listinfo/rules-users From jmercier at genoscope.cns.fr Mon May 19 14:17:04 2014 From: jmercier at genoscope.cns.fr (jonathan MERCIER) Date: Mon, 19 May 2014 20:17:04 +0200 Subject: [rules-users] Drools and GPU In-Reply-To: References: Message-ID: <1400523424.2513.8.camel@yoda> About rule structure and / or, i thought that builded graph was in conjunctive normal form to avoid this problem!? Should we use conjunctive normal form as is recommended into tho old CLIPS ? Le lundi 19 mai 2014 ? 19:31 +0200, Wolfgang Laun a ?crit : > Graphics Processing Unit??? > Gosudarstvennoe Politicheskoe Upravlenie?????? > > So as not to appear too derogative, let me ask how this "resource > hunger" exhibits itself. Very frequently, some misconception w.r.t. > rule structure and/or > data model results in an inadequate resource consumptation that might > easily have avoided. > > -W > > On 19/05/2014, Anton Hughes wrote: > > Hi all > > > > We have finding drools to be very resource hungry - and we are looking at > > having to have very many servers just to satisfy our drools requirements. > > So I am wondering, has anyone experimented with running drools on a GPU > > server? > > > > Thanks and regards > > Anton > > > _______________________________________________ > rules-users mailing list > rules-users at lists.jboss.org > https://lists.jboss.org/mailman/listinfo/rules-users From wolfgang.laun at gmail.com Mon May 19 14:24:40 2014 From: wolfgang.laun at gmail.com (Wolfgang Laun) Date: Mon, 19 May 2014 20:24:40 +0200 Subject: [rules-users] Drools and GPU In-Reply-To: <1400523424.2513.8.camel@yoda> References: <1400523424.2513.8.camel@yoda> Message-ID: There is neither a "golden rule" nor a "silver bullet". Understanding what a rule does on the assembly of your facts is crucial. You may get by, happily, with an occasional deviation from some normal form, and you may be bitten, severely, by constantly neglecting it. -W On 19/05/2014, jonathan MERCIER wrote: > About rule structure and / or, i thought that builded graph was in > conjunctive normal form to avoid this problem!? > Should we use conjunctive normal form as is recommended into tho old > CLIPS ? > > > > Le lundi 19 mai 2014 ? 19:31 +0200, Wolfgang Laun a ?crit : >> Graphics Processing Unit??? >> Gosudarstvennoe Politicheskoe Upravlenie?????? >> >> So as not to appear too derogative, let me ask how this "resource >> hunger" exhibits itself. Very frequently, some misconception w.r.t. >> rule structure and/or >> data model results in an inadequate resource consumptation that might >> easily have avoided. >> >> -W >> >> On 19/05/2014, Anton Hughes wrote: >> > Hi all >> > >> > We have finding drools to be very resource hungry - and we are looking >> > at >> > having to have very many servers just to satisfy our drools >> > requirements. >> > So I am wondering, has anyone experimented with running drools on a GPU >> > server? >> > >> > Thanks and regards >> > Anton >> > >> _______________________________________________ >> rules-users mailing list >> rules-users at lists.jboss.org >> https://lists.jboss.org/mailman/listinfo/rules-users > > > _______________________________________________ > rules-users mailing list > rules-users at lists.jboss.org > https://lists.jboss.org/mailman/listinfo/rules-users From gshrestha at tmghealth.com Mon May 19 14:35:49 2014 From: gshrestha at tmghealth.com (Gopu Shrestha) Date: Mon, 19 May 2014 18:35:49 +0000 Subject: [rules-users] setup Drools Message-ID: <777C617D1E76654192F0E67513AB3762039BB8D6@EXCHANGEMBW1.tmghealth.com> I want to try Guvnor and try to install following this link http://www.integratingstuff.com/2011/01/28/setting-up-drools-guvnor/ But confused to download, it says " After you get Guvnor from http://www.jboss.org/drools, you rename the drools-5.1.1-guvnor.war to drools-guvnor.war. Which one should I download? [cid:image001.png at 01CF736F.A080BF70] Best Regards Gopu -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.jboss.org/pipermail/rules-users/attachments/20140519/3d230266/attachment-0001.html -------------- next part -------------- A non-text attachment was scrubbed... Name: image001.png Type: image/png Size: 41488 bytes Desc: image001.png Url : http://lists.jboss.org/pipermail/rules-users/attachments/20140519/3d230266/attachment-0001.png From mproctor at codehaus.org Mon May 19 14:38:48 2014 From: mproctor at codehaus.org (Mark Proctor) Date: Mon, 19 May 2014 19:38:48 +0100 Subject: [rules-users] setup Drools In-Reply-To: <777C617D1E76654192F0E67513AB3762039BB8D6@EXCHANGEMBW1.tmghealth.com> References: <777C617D1E76654192F0E67513AB3762039BB8D6@EXCHANGEMBW1.tmghealth.com> Message-ID: That article is over 3 years old, and not relevant for 6.0. Please try the documentation here: http://docs.jboss.org/drools/release/6.0.1.Final/drools-docs/html/index.html Mark On 19 May 2014, at 19:35, Gopu Shrestha wrote: > I want to try Guvnor and try to install following this linkhttp://www.integratingstuff.com/2011/01/28/setting-up-drools-guvnor/ > But confused to download, it says ? After you get Guvnor from http://www.jboss.org/drools, you rename the drools-5.1.1-guvnor.war to drools-guvnor.war. > > Which one should I download? > > > Best Regards > Gopu > > _______________________________________________ > rules-users mailing list > rules-users at lists.jboss.org > https://lists.jboss.org/mailman/listinfo/rules-users -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.jboss.org/pipermail/rules-users/attachments/20140519/75aec3cd/attachment.html From kurrent93 at gmail.com Mon May 19 15:17:05 2014 From: kurrent93 at gmail.com (kurrent93) Date: Mon, 19 May 2014 12:17:05 -0700 (PDT) Subject: [rules-users] Drools and GPU In-Reply-To: References: <1400523424.2513.8.camel@yoda> Message-ID: <1400527025948-4029615.post@n3.nabble.com> Yes, we have done some benchmarking and profiling. And we have found some improvements. We are processing a lot of data. We receive price changes from foreign exchange markets, and have customers who have automated trading strategies using this data as facts in individual drools sessions. Ok, we will keep looking to optimize, however I am doubtful that we will see much improvement. -- View this message in context: http://drools.46999.n3.nabble.com/rules-users-Drools-and-GPU-tp4029607p4029615.html Sent from the Drools: User forum mailing list archive at Nabble.com. From mjr4184 at gmail.com Mon May 19 21:37:29 2014 From: mjr4184 at gmail.com (mikerod) Date: Mon, 19 May 2014 18:37:29 -0700 (PDT) Subject: [rules-users] Upgrade to protobuf 2.5 - Prevents Upgrading to Drools 6.x In-Reply-To: References: <1394549422603-4028636.post@n3.nabble.com> Message-ID: <1400549849280-4029616.post@n3.nabble.com> Upgrading Hadoop is not possible for sometime still. It requires a fairly large coordinated effort. I don't suppose there is any chance that there will be a workaround for this in Drools 6? Perhaps a configuration options or something? -- View this message in context: http://drools.46999.n3.nabble.com/Upgrade-to-protobuf-2-5-Prevents-Upgrading-to-Drools-6-x-tp4028636p4029616.html Sent from the Drools: User forum mailing list archive at Nabble.com. From mjr4184 at gmail.com Mon May 19 21:44:01 2014 From: mjr4184 at gmail.com (mikerod) Date: Mon, 19 May 2014 18:44:01 -0700 (PDT) Subject: [rules-users] CompositiveClassLoader$CachingLoader$load method intermittently hangs In-Reply-To: References: <1395149512813-4028780.post@n3.nabble.com> <1400466078313-4029597.post@n3.nabble.com> Message-ID: <1400550241352-4029617.post@n3.nabble.com> Thanks for the response. I thought I had read that the CompositeClassLoader was not being used in v6.x. I'd like to be able to experiment with the current version of Drools v6.x, but I'm still trying to work past the issue I have with the non-passive changes of protobuf v.2.5.0 that Drools v6.x has been upgraded to. I explained @ http://drools.46999.n3.nabble.com/Upgrade-to-protobuf-2-5-Prevents-Upgrading-to-Drools-6-x-tp4028636.html If I can come up with something and try out Drools v6.x, I'll update this post with any issues seen regarding this issue. -- View this message in context: http://drools.46999.n3.nabble.com/CompositiveClassLoader-CachingLoader-load-method-intermittently-hangs-tp4028780p4029617.html Sent from the Drools: User forum mailing list archive at Nabble.com. From ch007m at gmail.com Tue May 20 06:05:00 2014 From: ch007m at gmail.com (Charles Moulliard) Date: Tue, 20 May 2014 12:05:00 +0200 Subject: [rules-users] Rules compilation error with OSGi integration (6.1.0.Beta3) In-Reply-To: <1400508040790-4029601.post@n3.nabble.com> References: <1400508040790-4029601.post@n3.nabble.com> Message-ID: Can you provide us the compilation error reported (gist link) and a test case to allow us to reproduce your issue ? On Mon, May 19, 2014 at 4:00 PM, Ephemeris Lappis < ephemeris.lappis at gmail.com> wrote: > Hello. > > We have a very simple rules file that works as expected when running as a > JUnit test in Eclipse with Maven dependencies, but fails when it is > executing in ServiceMix with OSGi integration. > > The code is just like : > > raw> > Map dialog = new LinkedHashMap<>(); > KieSession kieSession = kieContainer.newKieSession("MyKSession"); > kieSession.setGlobal("dialog", dialog); > kieSession.insert(problem); > kieSession.fireAllRules(); > kieSession.dispose(); > > > The rules file : > > > > And the kmodule.xml : > > > > The compilation error is about Java 7 syntax elements (as generics or > thousand separators in number literals for example), and seems to indicate > that in this case the compiler is not the same, and it expects another Java > syntax. No error is reported when the KieContainer is created from the > KModule.xml, but the following error occurs when using it for KSession > creation. > > > > This occurs both with the prepackaged feature > ( > http://repo1.maven.org/maven2/org/drools/drools-karaf-features/6.1.0.Beta3/drools-karaf-features-6.1.0.Beta3-features.xml > ), > or with an adapted one. For example, the Maven dependancies classpath in > eclipse mentions newer versions of the Eclipse's ECJ. But changing the > version of bundles has no effect... > > What is missing in the feature to activate the correct rules compiler ? > > Thanks for your help ? > > Regards. > > > > > -- > View this message in context: > http://drools.46999.n3.nabble.com/Rules-compilation-error-with-OSGi-integration-6-1-0-Beta3-tp4029601.html > Sent from the Drools: User forum mailing list archive at Nabble.com. > _______________________________________________ > rules-users mailing list > rules-users at lists.jboss.org > https://lists.jboss.org/mailman/listinfo/rules-users > -- Charles Moulliard Apache Committer / Architect @RedHat Twitter : @cmoulliard | Blog : http://cmoulliard.github.io -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.jboss.org/pipermail/rules-users/attachments/20140520/5a0963cf/attachment.html From ephemeris.lappis at gmail.com Tue May 20 07:03:02 2014 From: ephemeris.lappis at gmail.com (Ephemeris Lappis) Date: Tue, 20 May 2014 04:03:02 -0700 (PDT) Subject: [rules-users] Rules compilation error with OSGi integration (6.1.0.Beta3) In-Reply-To: References: <1400508040790-4029601.post@n3.nabble.com> Message-ID: <1400583782768-4029622.post@n3.nabble.com> Hello. Here is the first lines of the error message : 14:58:57,457 | ERROR | tp1946301910-151 | AbstractKieModule | 239 - org.drools.compiler - 6.1.0.20140429-1643 | Unable to build KieBaseModel:MyKBase Rule Compilation error : [Rule name='Main Rule'] my/tests/drools/osgi/expert/rules/Rule_Main_Rule1409557233.java (8:649) : Incorrect number of arguments for type HashMap; it cannot be parameterized with arguments my/tests/drools/osgi/expert/rules/Rule_Main_Rule1409557233.java (8:666) : Syntax error on token "<", ? expected after this token I have found the explanation and a workaround : put it all with a strict "1.5" syntax in the RHS ! In this current case, do not use <> to infere the generic type, but use the expected declared types instead. After a rather touchy remote debug of the ServiceMix runtime to inspect what is different from the Junit tests, I think that the problem comes from the classloader that is associated with the Kie container. Before compilation the language source and target level is set with version 1.7 as expected, but in the nameEnvironment that is passed to the JavaCompiler (indeed, ecj compiler), the droolsClassloader is of type "org/apache/felix/framework/ModuleImpl$ModuleClassLoaderJava5". As its name seems to incidate, I'm afraid that the Karaf/Felix loader is originally built in 1.5. I've read some posts about the eclipse compiler that perhaps takes into account the caller compliance to adapt its compilation language level. Class loaders seem to be a serious problem when using Drools in complex environment such as a OSGi one... Please, could you confirm my analysis, and, if you have one, propose any better solution ? I don't know, for example, if it's possible to influence Karaf to use different levels of bundle class loaders... Thanks a lot. Regards. -- View this message in context: http://drools.46999.n3.nabble.com/Rules-compilation-error-with-OSGi-integration-6-1-0-Beta3-tp4029601p4029622.html Sent from the Drools: User forum mailing list archive at Nabble.com. From mproctor at codehaus.org Tue May 20 08:16:32 2014 From: mproctor at codehaus.org (Mark Proctor) Date: Tue, 20 May 2014 13:16:32 +0100 Subject: [rules-users] Upgrade to protobuf 2.5 - Prevents Upgrading to Drools 6.x In-Reply-To: <1400549849280-4029616.post@n3.nabble.com> References: <1394549422603-4028636.post@n3.nabble.com> <1400549849280-4029616.post@n3.nabble.com> Message-ID: <857A4D03-4BDF-4118-B86C-BC001822F1C2@codehaus.org> On 20 May 2014, at 02:37, mikerod wrote: > Upgrading Hadoop is not possible for sometime still. It requires a fairly > large coordinated effort. > > I don't suppose there is any chance that there will be a workaround for this > in Drools 6? > Perhaps a configuration options or something? If some one submits a pull request for this, we can consider it. But we don?t have the time to do this ourselves right now. http://docs.jboss.org/drools/release/5.5.0.Final/droolsjbpm-introduction-docs/html/gettingstarted.html Mark > > > > -- > View this message in context: http://drools.46999.n3.nabble.com/Upgrade-to-protobuf-2-5-Prevents-Upgrading-to-Drools-6-x-tp4028636p4029616.html > Sent from the Drools: User forum mailing list archive at Nabble.com. > _______________________________________________ > rules-users mailing list > rules-users at lists.jboss.org > https://lists.jboss.org/mailman/listinfo/rules-users From ch007m at gmail.com Tue May 20 09:41:05 2014 From: ch007m at gmail.com (Charles Moulliard) Date: Tue, 20 May 2014 15:41:05 +0200 Subject: [rules-users] Rules compilation error with OSGi integration (6.1.0.Beta3) In-Reply-To: <1400583782768-4029622.post@n3.nabble.com> References: <1400508040790-4029601.post@n3.nabble.com> <1400583782768-4029622.post@n3.nabble.com> Message-ID: A test case will be required to reproduce your problem. Do you have a pax-exam test ? On Tue, May 20, 2014 at 1:03 PM, Ephemeris Lappis < ephemeris.lappis at gmail.com> wrote: > Hello. > > Here is the first lines of the error message : > > > 14:58:57,457 | ERROR | tp1946301910-151 | AbstractKieModule > | > 239 - org.drools.compiler - 6.1.0.20140429-1643 | Unable to build > KieBaseModel:MyKBase > Rule Compilation error : [Rule name='Main Rule'] > my/tests/drools/osgi/expert/rules/Rule_Main_Rule1409557233.java > (8:649) : > Incorrect number of arguments for type HashMap; it cannot be > parameterized with arguments > my/tests/drools/osgi/expert/rules/Rule_Main_Rule1409557233.java > (8:666) : > Syntax error on token "<", ? expected after this token > > > I have found the explanation and a workaround : put it all with a strict > "1.5" syntax in the RHS ! In this current case, do not use <> to infere the > generic type, but use the expected declared types instead. > > After a rather touchy remote debug of the ServiceMix runtime to inspect > what > is different from the Junit tests, I think that the problem comes from the > classloader that is associated with the Kie container. Before compilation > the language source and target level is set with version 1.7 as expected, > but in the nameEnvironment that is passed to the JavaCompiler (indeed, ecj > compiler), the droolsClassloader is of type > "org/apache/felix/framework/ModuleImpl$ModuleClassLoaderJava5". As its name > seems to incidate, I'm afraid that the Karaf/Felix loader is originally > built in 1.5. > > I've read some posts about the eclipse compiler that perhaps takes into > account the caller compliance to adapt its compilation language level. > > Class loaders seem to be a serious problem when using Drools in complex > environment such as a OSGi one... > > Please, could you confirm my analysis, and, if you have one, propose any > better solution ? I don't know, for example, if it's possible to influence > Karaf to use different levels of bundle class loaders... > > Thanks a lot. > > Regards. > > > > -- > View this message in context: > http://drools.46999.n3.nabble.com/Rules-compilation-error-with-OSGi-integration-6-1-0-Beta3-tp4029601p4029622.html > Sent from the Drools: User forum mailing list archive at Nabble.com. > _______________________________________________ > rules-users mailing list > rules-users at lists.jboss.org > https://lists.jboss.org/mailman/listinfo/rules-users > -- Charles Moulliard Apache Committer / Architect @RedHat Twitter : @cmoulliard | Blog : http://cmoulliard.github.io -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.jboss.org/pipermail/rules-users/attachments/20140520/dda39e13/attachment-0001.html From ganeshneelekani at gmail.com Tue May 20 09:44:29 2014 From: ganeshneelekani at gmail.com (ganeshneelekani) Date: Tue, 20 May 2014 06:44:29 -0700 (PDT) Subject: [rules-users] drools 6.0 update site In-Reply-To: <1400488821314-4029600.post@n3.nabble.com> References: <1400488821314-4029600.post@n3.nabble.com> Message-ID: <1400593469108-4029625.post@n3.nabble.com> Hi Team, I solved this one, Actually its due to the older version of eclipse I was using, Download latest version of eclipse and you can use the drools 6.0 plug-in Thanks, Ganesh Neelekani -- View this message in context: http://drools.46999.n3.nabble.com/drools-6-0-update-site-tp4029600p4029625.html Sent from the Drools: User forum mailing list archive at Nabble.com. From ephemeris.lappis at gmail.com Tue May 20 10:40:00 2014 From: ephemeris.lappis at gmail.com (Ephemeris Lappis) Date: Tue, 20 May 2014 16:40:00 +0200 Subject: [rules-users] Rules compilation error with OSGi integration (6.1.0.Beta3) In-Reply-To: References: <1400508040790-4029601.post@n3.nabble.com> <1400583782768-4029622.post@n3.nabble.com> Message-ID: Hello. I have no such kind test with Pax Exam. Should you send me a simple maven project example using a Karaf container ? Back to the problem, a very simple rule with something like that in the RHS always fails when deployed in a bundle whose class loader is the felix one : List l = new ArrayList<>(); that must be fixed with : List l = new ArrayList(); or int n = 1_000; that fails instead of : int n = 1000; FYI, I use ServiceMix 4.5.3. Thanks again. Regards. 2014-05-20 15:41 GMT+02:00 Charles Moulliard : > A test case will be required to reproduce your problem. Do you have a > pax-exam test ? > > > On Tue, May 20, 2014 at 1:03 PM, Ephemeris Lappis < > ephemeris.lappis at gmail.com> wrote: > >> Hello. >> >> Here is the first lines of the error message : >> >> >> 14:58:57,457 | ERROR | tp1946301910-151 | AbstractKieModule >> | >> 239 - org.drools.compiler - 6.1.0.20140429-1643 | Unable to build >> KieBaseModel:MyKBase >> Rule Compilation error : [Rule name='Main Rule'] >> my/tests/drools/osgi/expert/rules/Rule_Main_Rule1409557233.java >> (8:649) : >> Incorrect number of arguments for type HashMap; it cannot be >> parameterized with arguments >> my/tests/drools/osgi/expert/rules/Rule_Main_Rule1409557233.java >> (8:666) : >> Syntax error on token "<", ? expected after this token >> >> >> I have found the explanation and a workaround : put it all with a strict >> "1.5" syntax in the RHS ! In this current case, do not use <> to infere >> the >> generic type, but use the expected declared types instead. >> >> After a rather touchy remote debug of the ServiceMix runtime to inspect >> what >> is different from the Junit tests, I think that the problem comes from the >> classloader that is associated with the Kie container. Before compilation >> the language source and target level is set with version 1.7 as expected, >> but in the nameEnvironment that is passed to the JavaCompiler (indeed, ecj >> compiler), the droolsClassloader is of type >> "org/apache/felix/framework/ModuleImpl$ModuleClassLoaderJava5". As its >> name >> seems to incidate, I'm afraid that the Karaf/Felix loader is originally >> built in 1.5. >> >> I've read some posts about the eclipse compiler that perhaps takes into >> account the caller compliance to adapt its compilation language level. >> >> Class loaders seem to be a serious problem when using Drools in complex >> environment such as a OSGi one... >> >> Please, could you confirm my analysis, and, if you have one, propose any >> better solution ? I don't know, for example, if it's possible to influence >> Karaf to use different levels of bundle class loaders... >> >> Thanks a lot. >> >> Regards. >> >> >> >> -- >> View this message in context: >> http://drools.46999.n3.nabble.com/Rules-compilation-error-with-OSGi-integration-6-1-0-Beta3-tp4029601p4029622.html >> Sent from the Drools: User forum mailing list archive at Nabble.com. >> _______________________________________________ >> rules-users mailing list >> rules-users at lists.jboss.org >> https://lists.jboss.org/mailman/listinfo/rules-users >> > > > > -- > Charles Moulliard > Apache Committer / Architect @RedHat > Twitter : @cmoulliard | Blog : http://cmoulliard.github.io > > > _______________________________________________ > rules-users mailing list > rules-users at lists.jboss.org > https://lists.jboss.org/mailman/listinfo/rules-users > -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.jboss.org/pipermail/rules-users/attachments/20140520/729fc202/attachment.html From ch007m at gmail.com Tue May 20 10:54:38 2014 From: ch007m at gmail.com (Charles Moulliard) Date: Tue, 20 May 2014 16:54:38 +0200 Subject: [rules-users] Rules compilation error with OSGi integration (6.1.0.Beta3) In-Reply-To: References: <1400508040790-4029601.post@n3.nabble.com> <1400583782768-4029622.post@n3.nabble.com> Message-ID: Is it a list that you would like to use as global param ? If this is the case, maybe change your rule & code like that //GET A KSESSION StatefulKnowledgeSession ksession = kbase.newStatefulKnowledgeSession(); //now create some test data ksession.insert( new Cheese( "stilton", 42 ) ); ksession.insert( new Person( "michael", "stilton", 42 ) ); final List list = new ArrayList(); ksession.setGlobal( "list", list ); ksession.fireAllRules(); System.out.println(list); ksession.dispose(); Rule template header age type log package org.drools.examples.templates; global java.util.List list; template "cheesefans" rule "Cheese fans_@{row.rowNumber}" when Person(age == @{age}) Cheese(type == "@{type}") then list.add("@{log}"); end end template On Tue, May 20, 2014 at 4:40 PM, Ephemeris Lappis < ephemeris.lappis at gmail.com> wrote: > Hello. > > I have no such kind test with Pax Exam. Should you send me a simple maven > project example using a Karaf container ? > > Back to the problem, a very simple rule with something like that in the > RHS always fails when deployed in a bundle whose class loader is the felix > one : > > List l = new ArrayList<>(); > that must be fixed with : > List l = new ArrayList(); > > or > > int n = 1_000; > that fails instead of : > int n = 1000; > > FYI, I use ServiceMix 4.5.3. > > Thanks again. > Regards. > > > > 2014-05-20 15:41 GMT+02:00 Charles Moulliard : > > A test case will be required to reproduce your problem. Do you have a >> pax-exam test ? >> >> >> On Tue, May 20, 2014 at 1:03 PM, Ephemeris Lappis < >> ephemeris.lappis at gmail.com> wrote: >> >>> Hello. >>> >>> Here is the first lines of the error message : >>> >>> >>> 14:58:57,457 | ERROR | tp1946301910-151 | AbstractKieModule >>> | >>> 239 - org.drools.compiler - 6.1.0.20140429-1643 | Unable to build >>> KieBaseModel:MyKBase >>> Rule Compilation error : [Rule name='Main Rule'] >>> my/tests/drools/osgi/expert/rules/Rule_Main_Rule1409557233.java >>> (8:649) : >>> Incorrect number of arguments for type HashMap; it cannot be >>> parameterized with arguments >>> my/tests/drools/osgi/expert/rules/Rule_Main_Rule1409557233.java >>> (8:666) : >>> Syntax error on token "<", ? expected after this token >>> >>> >>> I have found the explanation and a workaround : put it all with a strict >>> "1.5" syntax in the RHS ! In this current case, do not use <> to infere >>> the >>> generic type, but use the expected declared types instead. >>> >>> After a rather touchy remote debug of the ServiceMix runtime to inspect >>> what >>> is different from the Junit tests, I think that the problem comes from >>> the >>> classloader that is associated with the Kie container. Before compilation >>> the language source and target level is set with version 1.7 as >>> expected, >>> but in the nameEnvironment that is passed to the JavaCompiler (indeed, >>> ecj >>> compiler), the droolsClassloader is of type >>> "org/apache/felix/framework/ModuleImpl$ModuleClassLoaderJava5". As its >>> name >>> seems to incidate, I'm afraid that the Karaf/Felix loader is originally >>> built in 1.5. >>> >>> I've read some posts about the eclipse compiler that perhaps takes into >>> account the caller compliance to adapt its compilation language level. >>> >>> Class loaders seem to be a serious problem when using Drools in complex >>> environment such as a OSGi one... >>> >>> Please, could you confirm my analysis, and, if you have one, propose any >>> better solution ? I don't know, for example, if it's possible to >>> influence >>> Karaf to use different levels of bundle class loaders... >>> >>> Thanks a lot. >>> >>> Regards. >>> >>> >>> >>> -- >>> View this message in context: >>> http://drools.46999.n3.nabble.com/Rules-compilation-error-with-OSGi-integration-6-1-0-Beta3-tp4029601p4029622.html >>> Sent from the Drools: User forum mailing list archive at Nabble.com. >>> _______________________________________________ >>> rules-users mailing list >>> rules-users at lists.jboss.org >>> https://lists.jboss.org/mailman/listinfo/rules-users >>> >> >> >> >> -- >> Charles Moulliard >> Apache Committer / Architect @RedHat >> Twitter : @cmoulliard | Blog : http://cmoulliard.github.io >> >> >> _______________________________________________ >> rules-users mailing list >> rules-users at lists.jboss.org >> https://lists.jboss.org/mailman/listinfo/rules-users >> > > > _______________________________________________ > rules-users mailing list > rules-users at lists.jboss.org > https://lists.jboss.org/mailman/listinfo/rules-users > -- Charles Moulliard Apache Committer / Architect @RedHat Twitter : @cmoulliard | Blog : http://cmoulliard.github.io -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.jboss.org/pipermail/rules-users/attachments/20140520/96d473cd/attachment.html From ephemeris.lappis at gmail.com Tue May 20 11:10:47 2014 From: ephemeris.lappis at gmail.com (Ephemeris Lappis) Date: Tue, 20 May 2014 08:10:47 -0700 (PDT) Subject: [rules-users] Rules compilation error with OSGi integration (6.1.0.Beta3) In-Reply-To: References: <1400508040790-4029601.post@n3.nabble.com> <1400583782768-4029622.post@n3.nabble.com> Message-ID: In this case it's not a global, but a temporary variable in the rule consequence. Indeed, the problem is not only about generics, but impacts all the syntax elements that may have changed since Java 1.5, and make the rules Java compiler fails when running in ServiceMix. As I said before, the workaround is quite easy, changing all the Java code to be compliant with the compilation level. The question is just about a confirmation of the Felix's class loader (org/apache/felix/framework/ ModuleImpl$ModuleClassLoaderJava5) in the compiler's behavior, and a better solution to be able to write RHS with a 'modern' syntax. Thanks. 2014-05-20 16:56 GMT+02:00 Charles Moulliard [via Drools] < ml-node+s46999n4029628h78 at n3.nabble.com>: > Is it a list that you would like to use as global param ? If this is the > case, maybe change your rule & code like that > > //GET A KSESSION > StatefulKnowledgeSession ksession = > kbase.newStatefulKnowledgeSession(); > > //now create some test data > ksession.insert( new Cheese( "stilton", > 42 ) ); > ksession.insert( new Person( "michael", > "stilton", > 42 ) ); > final List list = new ArrayList(); > ksession.setGlobal( "list", > list ); > > ksession.fireAllRules(); > > System.out.println(list); > > ksession.dispose(); > > Rule > > template header > age > type > log > > package org.drools.examples.templates; > > global java.util.List list; > > template "cheesefans" > > rule "Cheese fans_@{row.rowNumber}" > when > Person(age == @{age}) > Cheese(type == "@{type}") > then > list.add("@{log}"); > end > end template > > > > On Tue, May 20, 2014 at 4:40 PM, Ephemeris Lappis <[hidden email] > > wrote: > >> Hello. >> >> I have no such kind test with Pax Exam. Should you send me a simple maven >> project example using a Karaf container ? >> >> Back to the problem, a very simple rule with something like that in the >> RHS always fails when deployed in a bundle whose class loader is the felix >> one : >> >> List l = new ArrayList<>(); >> that must be fixed with : >> List l = new ArrayList(); >> >> or >> >> int n = 1_000; >> that fails instead of : >> int n = 1000; >> >> FYI, I use ServiceMix 4.5.3. >> >> Thanks again. >> Regards. >> >> >> >> 2014-05-20 15:41 GMT+02:00 Charles Moulliard <[hidden email] >> >: >> >> A test case will be required to reproduce your problem. Do you have a >>> pax-exam test ? >>> >>> >>> On Tue, May 20, 2014 at 1:03 PM, Ephemeris Lappis <[hidden email] >>> > wrote: >>> >>>> Hello. >>>> >>>> Here is the first lines of the error message : >>>> >>>> >>>> 14:58:57,457 | ERROR | tp1946301910-151 | AbstractKieModule >>>> | >>>> 239 - org.drools.compiler - 6.1.0.20140429-1643 | Unable to build >>>> KieBaseModel:MyKBase >>>> Rule Compilation error : [Rule name='Main Rule'] >>>> my/tests/drools/osgi/expert/rules/Rule_Main_Rule1409557233.java >>>> (8:649) : >>>> Incorrect number of arguments for type HashMap; it cannot be >>>> parameterized with arguments >>>> my/tests/drools/osgi/expert/rules/Rule_Main_Rule1409557233.java >>>> (8:666) : >>>> Syntax error on token "<", ? expected after this token >>>> >>>> >>>> I have found the explanation and a workaround : put it all with a strict >>>> "1.5" syntax in the RHS ! In this current case, do not use <> to infere >>>> the >>>> generic type, but use the expected declared types instead. >>>> >>>> After a rather touchy remote debug of the ServiceMix runtime to inspect >>>> what >>>> is different from the Junit tests, I think that the problem comes from >>>> the >>>> classloader that is associated with the Kie container. Before >>>> compilation >>>> the language source and target level is set with version 1.7 as >>>> expected, >>>> but in the nameEnvironment that is passed to the JavaCompiler (indeed, >>>> ecj >>>> compiler), the droolsClassloader is of type >>>> "org/apache/felix/framework/ModuleImpl$ModuleClassLoaderJava5". As its >>>> name >>>> seems to incidate, I'm afraid that the Karaf/Felix loader is originally >>>> built in 1.5. >>>> >>>> I've read some posts about the eclipse compiler that perhaps takes into >>>> account the caller compliance to adapt its compilation language level. >>>> >>>> Class loaders seem to be a serious problem when using Drools in complex >>>> environment such as a OSGi one... >>>> >>>> Please, could you confirm my analysis, and, if you have one, propose any >>>> better solution ? I don't know, for example, if it's possible to >>>> influence >>>> Karaf to use different levels of bundle class loaders... >>>> >>>> Thanks a lot. >>>> >>>> Regards. >>>> >>>> >>>> >>>> -- >>>> View this message in context: >>>> http://drools.46999.n3.nabble.com/Rules-compilation-error-with-OSGi-integration-6-1-0-Beta3-tp4029601p4029622.html >>>> Sent from the Drools: User forum mailing list archive at Nabble.com. >>>> _______________________________________________ >>>> rules-users mailing list >>>> [hidden email] >>>> https://lists.jboss.org/mailman/listinfo/rules-users >>>> >>> >>> >>> >>> -- >>> Charles Moulliard >>> Apache Committer / Architect @RedHat >>> Twitter : @cmoulliard | Blog : http://cmoulliard.github.io >>> >>> >>> _______________________________________________ >>> rules-users mailing list >>> [hidden email] >>> https://lists.jboss.org/mailman/listinfo/rules-users >>> >> >> >> _______________________________________________ >> rules-users mailing list >> [hidden email] >> https://lists.jboss.org/mailman/listinfo/rules-users >> > > > > -- > Charles Moulliard > Apache Committer / Architect @RedHat > Twitter : @cmoulliard | Blog : http://cmoulliard.github.io > > > _______________________________________________ > rules-users mailing list > [hidden email] > https://lists.jboss.org/mailman/listinfo/rules-users > > ------------------------------ > If you reply to this email, your message will be added to the discussion > below: > > http://drools.46999.n3.nabble.com/Rules-compilation-error-with-OSGi-integration-6-1-0-Beta3-tp4029601p4029628.html > To unsubscribe from Rules compilation error with OSGi integration > (6.1.0.Beta3), click here > . > NAML > -- View this message in context: http://drools.46999.n3.nabble.com/Rules-compilation-error-with-OSGi-integration-6-1-0-Beta3-tp4029601p4029629.html Sent from the Drools: User forum mailing list archive at Nabble.com. -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.jboss.org/pipermail/rules-users/attachments/20140520/6babed99/attachment-0001.html From ch007m at gmail.com Tue May 20 11:44:25 2014 From: ch007m at gmail.com (Charles Moulliard) Date: Tue, 20 May 2014 17:44:25 +0200 Subject: [rules-users] Rules compilation error with OSGi integration (6.1.0.Beta3) In-Reply-To: References: <1400508040790-4029601.post@n3.nabble.com> <1400583782768-4029622.post@n3.nabble.com> Message-ID: Have you tried this option for your bundle ? Bundle-RequiredExecutionEnvironment: J2SE-1.7 On Tue, May 20, 2014 at 5:10 PM, Ephemeris Lappis < ephemeris.lappis at gmail.com> wrote: > In this case it's not a global, but a temporary variable in the rule > consequence. Indeed, the problem is not only about generics, but impacts > all the syntax elements that may have changed since Java 1.5, and make the > rules Java compiler fails when running in ServiceMix. > > As I said before, the workaround is quite easy, changing all the Java code > to be compliant with the compilation level. The question is just about a > confirmation of the Felix's class loader (org/apache/felix/framework/ > ModuleImpl$ModuleClassLoaderJava5) in the compiler's behavior, and a > better solution to be able to write RHS with a 'modern' syntax. > > Thanks. > > > 2014-05-20 16:56 GMT+02:00 Charles Moulliard [via Drools] <[hidden email] > >: > >> Is it a list that you would like to use as global param ? If this is the >> case, maybe change your rule & code like that >> >> //GET A KSESSION >> StatefulKnowledgeSession ksession = >> kbase.newStatefulKnowledgeSession(); >> >> //now create some test data >> ksession.insert( new Cheese( "stilton", >> 42 ) ); >> ksession.insert( new Person( "michael", >> "stilton", >> 42 ) ); >> final List list = new ArrayList(); >> ksession.setGlobal( "list", >> list ); >> >> ksession.fireAllRules(); >> >> System.out.println(list); >> >> ksession.dispose(); >> >> Rule >> >> template header >> age >> type >> log >> >> package org.drools.examples.templates; >> >> global java.util.List list; >> >> template "cheesefans" >> >> rule "Cheese fans_@{row.rowNumber}" >> when >> Person(age == @{age}) >> Cheese(type == "@{type}") >> then >> list.add("@{log}"); >> end >> end template >> >> >> >> On Tue, May 20, 2014 at 4:40 PM, Ephemeris Lappis <[hidden email] >> > wrote: >> >>> Hello. >>> >>> I have no such kind test with Pax Exam. Should you send me a simple >>> maven project example using a Karaf container ? >>> >>> Back to the problem, a very simple rule with something like that in the >>> RHS always fails when deployed in a bundle whose class loader is the felix >>> one : >>> >>> List l = new ArrayList<>(); >>> that must be fixed with : >>> List l = new ArrayList(); >>> >>> or >>> >>> int n = 1_000; >>> that fails instead of : >>> int n = 1000; >>> >>> FYI, I use ServiceMix 4.5.3. >>> >>> Thanks again. >>> Regards. >>> >>> >>> >>> 2014-05-20 15:41 GMT+02:00 Charles Moulliard <[hidden email] >>> >: >>> >>> A test case will be required to reproduce your problem. Do you have a >>>> pax-exam test ? >>>> >>>> >>>> On Tue, May 20, 2014 at 1:03 PM, Ephemeris Lappis <[hidden email] >>>> > wrote: >>>> >>>>> Hello. >>>>> >>>>> Here is the first lines of the error message : >>>>> >>>>> >>>>> 14:58:57,457 | ERROR | tp1946301910-151 | AbstractKieModule >>>>> | >>>>> 239 - org.drools.compiler - 6.1.0.20140429-1643 | Unable to build >>>>> KieBaseModel:MyKBase >>>>> Rule Compilation error : [Rule name='Main Rule'] >>>>> >>>>> my/tests/drools/osgi/expert/rules/Rule_Main_Rule1409557233.java (8:649) : >>>>> Incorrect number of arguments for type HashMap; it cannot be >>>>> parameterized with arguments >>>>> >>>>> my/tests/drools/osgi/expert/rules/Rule_Main_Rule1409557233.java (8:666) : >>>>> Syntax error on token "<", ? expected after this token >>>>> >>>>> >>>>> I have found the explanation and a workaround : put it all with a >>>>> strict >>>>> "1.5" syntax in the RHS ! In this current case, do not use <> to >>>>> infere the >>>>> generic type, but use the expected declared types instead. >>>>> >>>>> After a rather touchy remote debug of the ServiceMix runtime to >>>>> inspect what >>>>> is different from the Junit tests, I think that the problem comes from >>>>> the >>>>> classloader that is associated with the Kie container. Before >>>>> compilation >>>>> the language source and target level is set with version 1.7 as >>>>> expected, >>>>> but in the nameEnvironment that is passed to the JavaCompiler (indeed, >>>>> ecj >>>>> compiler), the droolsClassloader is of type >>>>> "org/apache/felix/framework/ModuleImpl$ModuleClassLoaderJava5". As its >>>>> name >>>>> seems to incidate, I'm afraid that the Karaf/Felix loader is originally >>>>> built in 1.5. >>>>> >>>>> I've read some posts about the eclipse compiler that perhaps takes into >>>>> account the caller compliance to adapt its compilation language level. >>>>> >>>>> Class loaders seem to be a serious problem when using Drools in complex >>>>> environment such as a OSGi one... >>>>> >>>>> Please, could you confirm my analysis, and, if you have one, propose >>>>> any >>>>> better solution ? I don't know, for example, if it's possible to >>>>> influence >>>>> Karaf to use different levels of bundle class loaders... >>>>> >>>>> Thanks a lot. >>>>> >>>>> Regards. >>>>> >>>>> >>>>> >>>>> -- >>>>> View this message in context: >>>>> http://drools.46999.n3.nabble.com/Rules-compilation-error-with-OSGi-integration-6-1-0-Beta3-tp4029601p4029622.html >>>>> Sent from the Drools: User forum mailing list archive at Nabble.com. >>>>> _______________________________________________ >>>>> rules-users mailing list >>>>> [hidden email] >>>>> https://lists.jboss.org/mailman/listinfo/rules-users >>>>> >>>> >>>> >>>> >>>> -- >>>> Charles Moulliard >>>> Apache Committer / Architect @RedHat >>>> Twitter : @cmoulliard | Blog : http://cmoulliard.github.io >>>> >>>> >>>> _______________________________________________ >>>> rules-users mailing list >>>> [hidden email] >>>> https://lists.jboss.org/mailman/listinfo/rules-users >>>> >>> >>> >>> _______________________________________________ >>> rules-users mailing list >>> [hidden email] >>> https://lists.jboss.org/mailman/listinfo/rules-users >>> >> >> >> >> -- >> Charles Moulliard >> Apache Committer / Architect @RedHat >> Twitter : @cmoulliard | Blog : http://cmoulliard.github.io >> >> >> _______________________________________________ >> rules-users mailing list >> [hidden email] >> https://lists.jboss.org/mailman/listinfo/rules-users >> >> ------------------------------ >> If you reply to this email, your message will be added to the >> discussion below: >> >> http://drools.46999.n3.nabble.com/Rules-compilation-error-with-OSGi-integration-6-1-0-Beta3-tp4029601p4029628.html >> To unsubscribe from Rules compilation error with OSGi integration >> (6.1.0.Beta3), click here. >> NAML >> > > > ------------------------------ > View this message in context: Re: [rules-users] Rules compilation error > with OSGi integration (6.1.0.Beta3) > > Sent from the Drools: User forum mailing list archiveat Nabble.com. > > _______________________________________________ > rules-users mailing list > rules-users at lists.jboss.org > https://lists.jboss.org/mailman/listinfo/rules-users > -- Charles Moulliard Apache Committer / Architect @RedHat Twitter : @cmoulliard | Blog : http://cmoulliard.github.io -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.jboss.org/pipermail/rules-users/attachments/20140520/6b463dcd/attachment.html From ch007m at gmail.com Tue May 20 11:49:10 2014 From: ch007m at gmail.com (Charles Moulliard) Date: Tue, 20 May 2014 17:49:10 +0200 Subject: [rules-users] Rules compilation error with OSGi integration (6.1.0.Beta3) In-Reply-To: References: <1400508040790-4029601.post@n3.nabble.com> <1400583782768-4029622.post@n3.nabble.com> Message-ID: Which version of karaf / felix do you use ? I'm using this version of Felix/karaf Karaf version 2.3.0.redhat-610379 OSGi Framework org.apache.felix.framework - 4.0.3.redhat-610379 Java Virtual Machine Java HotSpot(TM) 64-Bit Server VM version 24.51-b03 Version 1.7.0_51 I have made a test with this rule packaged with this maven module ( https://github.com/cmoulliard/droolsjbpm-osgi-examples#simple-rule-example) and that works in both cases package org.drools.example.drink; import org.drools.example.model.Person import java.util.List import java.util.ArrayList; rule "CanDrink" when p : Person( age >= 21 ) then p.setCanDrink(true); List l = new ArrayList<>(); end OR package org.drools.example.drink; import org.drools.example.model.Person import java.util.List import java.util.ArrayList; rule "CanDrink" when p : Person( age >= 21 ) then p.setCanDrink(true); List l = new ArrayList(); end On Tue, May 20, 2014 at 5:10 PM, Ephemeris Lappis < ephemeris.lappis at gmail.com> wrote: > In this case it's not a global, but a temporary variable in the rule > consequence. Indeed, the problem is not only about generics, but impacts > all the syntax elements that may have changed since Java 1.5, and make the > rules Java compiler fails when running in ServiceMix. > > As I said before, the workaround is quite easy, changing all the Java code > to be compliant with the compilation level. The question is just about a > confirmation of the Felix's class loader (org/apache/felix/framework/ > ModuleImpl$ModuleClassLoaderJava5) in the compiler's behavior, and a > better solution to be able to write RHS with a 'modern' syntax. > > Thanks. > > > 2014-05-20 16:56 GMT+02:00 Charles Moulliard [via Drools] <[hidden email] > >: > >> Is it a list that you would like to use as global param ? If this is the >> case, maybe change your rule & code like that >> >> //GET A KSESSION >> StatefulKnowledgeSession ksession = >> kbase.newStatefulKnowledgeSession(); >> >> //now create some test data >> ksession.insert( new Cheese( "stilton", >> 42 ) ); >> ksession.insert( new Person( "michael", >> "stilton", >> 42 ) ); >> final List list = new ArrayList(); >> ksession.setGlobal( "list", >> list ); >> >> ksession.fireAllRules(); >> >> System.out.println(list); >> >> ksession.dispose(); >> >> Rule >> >> template header >> age >> type >> log >> >> package org.drools.examples.templates; >> >> global java.util.List list; >> >> template "cheesefans" >> >> rule "Cheese fans_@{row.rowNumber}" >> when >> Person(age == @{age}) >> Cheese(type == "@{type}") >> then >> list.add("@{log}"); >> end >> end template >> >> >> >> On Tue, May 20, 2014 at 4:40 PM, Ephemeris Lappis <[hidden email] >> > wrote: >> >>> Hello. >>> >>> I have no such kind test with Pax Exam. Should you send me a simple >>> maven project example using a Karaf container ? >>> >>> Back to the problem, a very simple rule with something like that in the >>> RHS always fails when deployed in a bundle whose class loader is the felix >>> one : >>> >>> List l = new ArrayList<>(); >>> that must be fixed with : >>> List l = new ArrayList(); >>> >>> or >>> >>> int n = 1_000; >>> that fails instead of : >>> int n = 1000; >>> >>> FYI, I use ServiceMix 4.5.3. >>> >>> Thanks again. >>> Regards. >>> >>> >>> >>> 2014-05-20 15:41 GMT+02:00 Charles Moulliard <[hidden email] >>> >: >>> >>> A test case will be required to reproduce your problem. Do you have a >>>> pax-exam test ? >>>> >>>> >>>> On Tue, May 20, 2014 at 1:03 PM, Ephemeris Lappis <[hidden email] >>>> > wrote: >>>> >>>>> Hello. >>>>> >>>>> Here is the first lines of the error message : >>>>> >>>>> >>>>> 14:58:57,457 | ERROR | tp1946301910-151 | AbstractKieModule >>>>> | >>>>> 239 - org.drools.compiler - 6.1.0.20140429-1643 | Unable to build >>>>> KieBaseModel:MyKBase >>>>> Rule Compilation error : [Rule name='Main Rule'] >>>>> >>>>> my/tests/drools/osgi/expert/rules/Rule_Main_Rule1409557233.java (8:649) : >>>>> Incorrect number of arguments for type HashMap; it cannot be >>>>> parameterized with arguments >>>>> >>>>> my/tests/drools/osgi/expert/rules/Rule_Main_Rule1409557233.java (8:666) : >>>>> Syntax error on token "<", ? expected after this token >>>>> >>>>> >>>>> I have found the explanation and a workaround : put it all with a >>>>> strict >>>>> "1.5" syntax in the RHS ! In this current case, do not use <> to >>>>> infere the >>>>> generic type, but use the expected declared types instead. >>>>> >>>>> After a rather touchy remote debug of the ServiceMix runtime to >>>>> inspect what >>>>> is different from the Junit tests, I think that the problem comes from >>>>> the >>>>> classloader that is associated with the Kie container. Before >>>>> compilation >>>>> the language source and target level is set with version 1.7 as >>>>> expected, >>>>> but in the nameEnvironment that is passed to the JavaCompiler (indeed, >>>>> ecj >>>>> compiler), the droolsClassloader is of type >>>>> "org/apache/felix/framework/ModuleImpl$ModuleClassLoaderJava5". As its >>>>> name >>>>> seems to incidate, I'm afraid that the Karaf/Felix loader is originally >>>>> built in 1.5. >>>>> >>>>> I've read some posts about the eclipse compiler that perhaps takes into >>>>> account the caller compliance to adapt its compilation language level. >>>>> >>>>> Class loaders seem to be a serious problem when using Drools in complex >>>>> environment such as a OSGi one... >>>>> >>>>> Please, could you confirm my analysis, and, if you have one, propose >>>>> any >>>>> better solution ? I don't know, for example, if it's possible to >>>>> influence >>>>> Karaf to use different levels of bundle class loaders... >>>>> >>>>> Thanks a lot. >>>>> >>>>> Regards. >>>>> >>>>> >>>>> >>>>> -- >>>>> View this message in context: >>>>> http://drools.46999.n3.nabble.com/Rules-compilation-error-with-OSGi-integration-6-1-0-Beta3-tp4029601p4029622.html >>>>> Sent from the Drools: User forum mailing list archive at Nabble.com. >>>>> _______________________________________________ >>>>> rules-users mailing list >>>>> [hidden email] >>>>> https://lists.jboss.org/mailman/listinfo/rules-users >>>>> >>>> >>>> >>>> >>>> -- >>>> Charles Moulliard >>>> Apache Committer / Architect @RedHat >>>> Twitter : @cmoulliard | Blog : http://cmoulliard.github.io >>>> >>>> >>>> _______________________________________________ >>>> rules-users mailing list >>>> [hidden email] >>>> https://lists.jboss.org/mailman/listinfo/rules-users >>>> >>> >>> >>> _______________________________________________ >>> rules-users mailing list >>> [hidden email] >>> https://lists.jboss.org/mailman/listinfo/rules-users >>> >> >> >> >> -- >> Charles Moulliard >> Apache Committer / Architect @RedHat >> Twitter : @cmoulliard | Blog : http://cmoulliard.github.io >> >> >> _______________________________________________ >> rules-users mailing list >> [hidden email] >> https://lists.jboss.org/mailman/listinfo/rules-users >> >> ------------------------------ >> If you reply to this email, your message will be added to the >> discussion below: >> >> http://drools.46999.n3.nabble.com/Rules-compilation-error-with-OSGi-integration-6-1-0-Beta3-tp4029601p4029628.html >> To unsubscribe from Rules compilation error with OSGi integration >> (6.1.0.Beta3), click here. >> NAML >> > > > ------------------------------ > View this message in context: Re: [rules-users] Rules compilation error > with OSGi integration (6.1.0.Beta3) > > Sent from the Drools: User forum mailing list archiveat Nabble.com. > > _______________________________________________ > rules-users mailing list > rules-users at lists.jboss.org > https://lists.jboss.org/mailman/listinfo/rules-users > -- Charles Moulliard Apache Committer / Architect @RedHat Twitter : @cmoulliard | Blog : http://cmoulliard.github.io -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.jboss.org/pipermail/rules-users/attachments/20140520/e9a2d3a5/attachment-0001.html From ephemeris.lappis at gmail.com Tue May 20 13:01:29 2014 From: ephemeris.lappis at gmail.com (Ephemeris Lappis) Date: Tue, 20 May 2014 19:01:29 +0200 Subject: [rules-users] Rules compilation error with OSGi integration (6.1.0.Beta3) In-Reply-To: References: <1400508040790-4029601.post@n3.nabble.com> <1400583782768-4029622.post@n3.nabble.com> Message-ID: Hello. Here the shell:info of my ServiceMix : Karaf Karaf version 2.2.11 OSGi Framework org.apache.felix.framework - 3.2.2 JVM Java Virtual Machine Java HotSpot(TM) 64-Bit Server VM version 24.51-b03 Version 1.7.0_51 Vendor Oracle Corporation I attach also a test project with the different modules that "mimic" the real project's structure. I have 2 drl files. The "rules.drl" is compiled and executed. The "rules-bad.drl" uses 2 Java 1.7 syntax elements (generic type inference and thousand separator), and fails on ServiceMix. I hope this can help you. Another problem we've had with these tests is about the OSGi classloader. I had a look at your example on github, and saw that the bundle project manifest contains many Import-Package to let Drools use the module classloader that is passed to create the KieContainer. But the imports depends on the rules generated code. For example, in our code an accumulate function is translated in a class that seems to require more import. I've tried to add some packages, but the compilation has always failed on indirect dependencies that are hard to discover. I've tried with a dynamic import (that is a bad thing I think) and it works. Many things are still "vague" in the question of the class loaders. I understand that the classloader that is passed on the KieContainer is used by Drools to resolve the rules module et files. In my case this classloader is the Felix's one that seems to restrict Java level to 1.5 in the problem discussed above... But I don't understand why the Drools OSGi integration that seems to act in the "machinery" doesn't supplement this classloader with all the needed Drools/Kie libraries and transitive dependencies. Ultimately, the application bundle that provides the rules and and set up their container must obviously have a reference on the API, but can't be aware of all the implementation packages. At this time, we're going further with the dynamic import, but I suppose we'll try to find a better solution. Any idea ? Thanks again. Regards. 2014-05-20 17:49 GMT+02:00 Charles Moulliard : > Which version of karaf / felix do you use ? > > I'm using this version of Felix/karaf > > Karaf version 2.3.0.redhat-610379 > OSGi Framework org.apache.felix.framework - > 4.0.3.redhat-610379 > Java Virtual Machine Java HotSpot(TM) 64-Bit Server VM version > 24.51-b03 > Version 1.7.0_51 > > I have made a test with this rule packaged with this maven module ( > https://github.com/cmoulliard/droolsjbpm-osgi-examples#simple-rule-example) > and that works in both cases > > package org.drools.example.drink; > > import org.drools.example.model.Person > import java.util.List > import java.util.ArrayList; > > rule "CanDrink" > when > p : Person( age >= 21 ) > then > p.setCanDrink(true); > List l = new ArrayList<>(); > end > > OR > > package org.drools.example.drink; > > import org.drools.example.model.Person > import java.util.List > import java.util.ArrayList; > > rule "CanDrink" > when > p : Person( age >= 21 ) > then > p.setCanDrink(true); > List l = new ArrayList(); > end > > > > On Tue, May 20, 2014 at 5:10 PM, Ephemeris Lappis < > ephemeris.lappis at gmail.com> wrote: > >> In this case it's not a global, but a temporary variable in the rule >> consequence. Indeed, the problem is not only about generics, but impacts >> all the syntax elements that may have changed since Java 1.5, and make the >> rules Java compiler fails when running in ServiceMix. >> >> As I said before, the workaround is quite easy, changing all the Java >> code to be compliant with the compilation level. The question is just about >> a confirmation of the Felix's class loader (org/apache/felix/framework/ >> ModuleImpl$ModuleClassLoaderJava5) in the compiler's behavior, and a >> better solution to be able to write RHS with a 'modern' syntax. >> >> Thanks. >> >> >> 2014-05-20 16:56 GMT+02:00 Charles Moulliard [via Drools] <[hidden email] >> >: >> >>> Is it a list that you would like to use as global param ? If this is the >>> case, maybe change your rule & code like that >>> >>> //GET A KSESSION >>> StatefulKnowledgeSession ksession = >>> kbase.newStatefulKnowledgeSession(); >>> >>> //now create some test data >>> ksession.insert( new Cheese( "stilton", >>> 42 ) ); >>> ksession.insert( new Person( "michael", >>> "stilton", >>> 42 ) ); >>> final List list = new ArrayList(); >>> ksession.setGlobal( "list", >>> list ); >>> >>> ksession.fireAllRules(); >>> >>> System.out.println(list); >>> >>> ksession.dispose(); >>> >>> Rule >>> >>> template header >>> age >>> type >>> log >>> >>> package org.drools.examples.templates; >>> >>> global java.util.List list; >>> >>> template "cheesefans" >>> >>> rule "Cheese fans_@{row.rowNumber}" >>> when >>> Person(age == @{age}) >>> Cheese(type == "@{type}") >>> then >>> list.add("@{log}"); >>> end >>> end template >>> >>> >>> >>> On Tue, May 20, 2014 at 4:40 PM, Ephemeris Lappis <[hidden email] >>> > wrote: >>> >>>> Hello. >>>> >>>> I have no such kind test with Pax Exam. Should you send me a simple >>>> maven project example using a Karaf container ? >>>> >>>> Back to the problem, a very simple rule with something like that in the >>>> RHS always fails when deployed in a bundle whose class loader is the felix >>>> one : >>>> >>>> List l = new ArrayList<>(); >>>> that must be fixed with : >>>> List l = new ArrayList(); >>>> >>>> or >>>> >>>> int n = 1_000; >>>> that fails instead of : >>>> int n = 1000; >>>> >>>> FYI, I use ServiceMix 4.5.3. >>>> >>>> Thanks again. >>>> Regards. >>>> >>>> >>>> >>>> 2014-05-20 15:41 GMT+02:00 Charles Moulliard <[hidden email] >>>> >: >>>> >>>> A test case will be required to reproduce your problem. Do you have a >>>>> pax-exam test ? >>>>> >>>>> >>>>> On Tue, May 20, 2014 at 1:03 PM, Ephemeris Lappis <[hidden email] >>>>> > wrote: >>>>> >>>>>> Hello. >>>>>> >>>>>> Here is the first lines of the error message : >>>>>> >>>>>> >>>>>> 14:58:57,457 | ERROR | tp1946301910-151 | AbstractKieModule >>>>>> | >>>>>> 239 - org.drools.compiler - 6.1.0.20140429-1643 | Unable to build >>>>>> KieBaseModel:MyKBase >>>>>> Rule Compilation error : [Rule name='Main Rule'] >>>>>> >>>>>> my/tests/drools/osgi/expert/rules/Rule_Main_Rule1409557233.java (8:649) : >>>>>> Incorrect number of arguments for type HashMap; it cannot be >>>>>> parameterized with arguments >>>>>> >>>>>> my/tests/drools/osgi/expert/rules/Rule_Main_Rule1409557233.java (8:666) : >>>>>> Syntax error on token "<", ? expected after this token >>>>>> >>>>>> >>>>>> I have found the explanation and a workaround : put it all with a >>>>>> strict >>>>>> "1.5" syntax in the RHS ! In this current case, do not use <> to >>>>>> infere the >>>>>> generic type, but use the expected declared types instead. >>>>>> >>>>>> After a rather touchy remote debug of the ServiceMix runtime to >>>>>> inspect what >>>>>> is different from the Junit tests, I think that the problem comes >>>>>> from the >>>>>> classloader that is associated with the Kie container. Before >>>>>> compilation >>>>>> the language source and target level is set with version 1.7 as >>>>>> expected, >>>>>> but in the nameEnvironment that is passed to the JavaCompiler >>>>>> (indeed, ecj >>>>>> compiler), the droolsClassloader is of type >>>>>> "org/apache/felix/framework/ModuleImpl$ModuleClassLoaderJava5". As >>>>>> its name >>>>>> seems to incidate, I'm afraid that the Karaf/Felix loader is >>>>>> originally >>>>>> built in 1.5. >>>>>> >>>>>> I've read some posts about the eclipse compiler that perhaps takes >>>>>> into >>>>>> account the caller compliance to adapt its compilation language level. >>>>>> >>>>>> Class loaders seem to be a serious problem when using Drools in >>>>>> complex >>>>>> environment such as a OSGi one... >>>>>> >>>>>> Please, could you confirm my analysis, and, if you have one, propose >>>>>> any >>>>>> better solution ? I don't know, for example, if it's possible to >>>>>> influence >>>>>> Karaf to use different levels of bundle class loaders... >>>>>> >>>>>> Thanks a lot. >>>>>> >>>>>> Regards. >>>>>> >>>>>> >>>>>> >>>>>> -- >>>>>> View this message in context: >>>>>> http://drools.46999.n3.nabble.com/Rules-compilation-error-with-OSGi-integration-6-1-0-Beta3-tp4029601p4029622.html >>>>>> Sent from the Drools: User forum mailing list archive at Nabble.com. >>>>>> _______________________________________________ >>>>>> rules-users mailing list >>>>>> [hidden email] >>>>>> https://lists.jboss.org/mailman/listinfo/rules-users >>>>>> >>>>> >>>>> >>>>> >>>>> -- >>>>> Charles Moulliard >>>>> Apache Committer / Architect @RedHat >>>>> Twitter : @cmoulliard | Blog : http://cmoulliard.github.io >>>>> >>>>> >>>>> _______________________________________________ >>>>> rules-users mailing list >>>>> [hidden email] >>>>> https://lists.jboss.org/mailman/listinfo/rules-users >>>>> >>>> >>>> >>>> _______________________________________________ >>>> rules-users mailing list >>>> [hidden email] >>>> https://lists.jboss.org/mailman/listinfo/rules-users >>>> >>> >>> >>> >>> -- >>> Charles Moulliard >>> Apache Committer / Architect @RedHat >>> Twitter : @cmoulliard | Blog : http://cmoulliard.github.io >>> >>> >>> _______________________________________________ >>> rules-users mailing list >>> [hidden email] >>> https://lists.jboss.org/mailman/listinfo/rules-users >>> >>> ------------------------------ >>> If you reply to this email, your message will be added to the >>> discussion below: >>> >>> http://drools.46999.n3.nabble.com/Rules-compilation-error-with-OSGi-integration-6-1-0-Beta3-tp4029601p4029628.html >>> To unsubscribe from Rules compilation error with OSGi integration >>> (6.1.0.Beta3), click here. >>> NAML >>> >> >> >> ------------------------------ >> View this message in context: Re: [rules-users] Rules compilation error >> with OSGi integration (6.1.0.Beta3) >> >> Sent from the Drools: User forum mailing list archiveat Nabble.com. >> >> _______________________________________________ >> rules-users mailing list >> rules-users at lists.jboss.org >> https://lists.jboss.org/mailman/listinfo/rules-users >> > > > > -- > Charles Moulliard > Apache Committer / Architect @RedHat > Twitter : @cmoulliard | Blog : http://cmoulliard.github.io > > > _______________________________________________ > rules-users mailing list > rules-users at lists.jboss.org > https://lists.jboss.org/mailman/listinfo/rules-users > -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.jboss.org/pipermail/rules-users/attachments/20140520/4fc2e52d/attachment-0001.html -------------- next part -------------- A non-text attachment was scrubbed... Name: test-drools-osgi.zip Type: application/zip Size: 28043 bytes Desc: not available Url : http://lists.jboss.org/pipermail/rules-users/attachments/20140520/4fc2e52d/attachment-0001.zip From ravishankarhassain at gmail.com Wed May 21 01:38:15 2014 From: ravishankarhassain at gmail.com (RavishankarHassain) Date: Tue, 20 May 2014 22:38:15 -0700 (PDT) Subject: [rules-users] Is @PropertySpecific supported in Drools 5.6.0 Message-ID: <1400650695047-4029633.post@n3.nabble.com> I was looking fro some examples and document which explains on how to use the @Modifies annotations inside Facts(Java class) and it happened for me to see this doc http://docs.jboss.org/drools/release/5.4.0.Beta2/droolsjbpm-introduction-docs/html/releaseNotesBeta2.html I tired to implement @PropertySpecific and @Modifies according to the session 3.1.2.1. Fine Grained Property Change Listeners (Property Specific) which is briefly described in the above mentioned link But, when I tried to use @PropertySpecific annotation in my Facts(java class) Eclipse IDE is not able to identify or resolve the package for @PropertySpecific annotation. I am using Drools 5.6.0. Is this @PropertySpecific annotation still supported in Drools, if yes then where is it ? in which package and in which jar ? -- View this message in context: http://drools.46999.n3.nabble.com/Is-PropertySpecific-supported-in-Drools-5-6-0-tp4029633.html Sent from the Drools: User forum mailing list archive at Nabble.com. From ganeshneelekani at gmail.com Wed May 21 01:45:45 2014 From: ganeshneelekani at gmail.com (ganeshneelekani) Date: Tue, 20 May 2014 22:45:45 -0700 (PDT) Subject: [rules-users] drools 6.0 update site In-Reply-To: <1400488821314-4029600.post@n3.nabble.com> References: <1400488821314-4029600.post@n3.nabble.com> Message-ID: <1400651145737-4029634.post@n3.nabble.com> Hi Team, I solved this issue, Its due to old eclipse version I am using, Try with new version and you can update drools 6 in eclipse. Thanks Ganesh Neelekani -- View this message in context: http://drools.46999.n3.nabble.com/drools-6-0-update-site-tp4029600p4029634.html Sent from the Drools: User forum mailing list archive at Nabble.com. From ephemeris.lappis at gmail.com Wed May 21 03:03:13 2014 From: ephemeris.lappis at gmail.com (Ephemeris Lappis) Date: Wed, 21 May 2014 00:03:13 -0700 (PDT) Subject: [rules-users] Rules compilation error with OSGi integration (6.1.0.Beta3) In-Reply-To: References: <1400508040790-4029601.post@n3.nabble.com> <1400583782768-4029622.post@n3.nabble.com> Message-ID: <1400655793433-4029635.post@n3.nabble.com> Hello. Although without much conviction, I've tried the "Bundle-RequiredExecutionEnvironment: J2SE-1.7", but it doesn't change the compilation level of the rules... As I said in a previous answer, I don't know exactly how to do it, but I think the solution may be in the way that Drools takes the classloader passed by the application to have access to specific classes like the usually imported beans used in the rules. Indeed, perhaps that instead of using directly this classloader, for its tasks, among of them the rules compilation, it should be possible to use some kind of enriched classloader that carries all the Drools needed packages, and delegates application classes resolution to the application's one. What do you think of that ? Regards. -- View this message in context: http://drools.46999.n3.nabble.com/Rules-compilation-error-with-OSGi-integration-6-1-0-Beta3-tp4029601p4029635.html Sent from the Drools: User forum mailing list archive at Nabble.com. From ch007m at gmail.com Wed May 21 05:48:12 2014 From: ch007m at gmail.com (Charles Moulliard) Date: Wed, 21 May 2014 11:48:12 +0200 Subject: [rules-users] Rules compilation error with OSGi integration (6.1.0.Beta3) In-Reply-To: <1400655793433-4029635.post@n3.nabble.com> References: <1400508040790-4029601.post@n3.nabble.com> <1400583782768-4029622.post@n3.nabble.com> <1400655793433-4029635.post@n3.nabble.com> Message-ID: If you look to my example posted previously there are no issues. Can you make a test using just Apache Karaf 2.3.x with Drools 6.1.0.Beta3 and tell me what happen. Which JDK do you sue ? On Wed, May 21, 2014 at 9:03 AM, Ephemeris Lappis < ephemeris.lappis at gmail.com> wrote: > Hello. > > Although without much conviction, I've tried the > "Bundle-RequiredExecutionEnvironment: J2SE-1.7", but it doesn't change the > compilation level of the rules... > > As I said in a previous answer, I don't know exactly how to do it, but I > think the solution may be in the way that Drools takes the classloader > passed by the application to have access to specific classes like the > usually imported beans used in the rules. Indeed, perhaps that instead of > using directly this classloader, for its tasks, among of them the rules > compilation, it should be possible to use some kind of enriched classloader > that carries all the Drools needed packages, and delegates application > classes resolution to the application's one. > > What do you think of that ? > > Regards. > > > > -- > View this message in context: > http://drools.46999.n3.nabble.com/Rules-compilation-error-with-OSGi-integration-6-1-0-Beta3-tp4029601p4029635.html > Sent from the Drools: User forum mailing list archive at Nabble.com. > _______________________________________________ > rules-users mailing list > rules-users at lists.jboss.org > https://lists.jboss.org/mailman/listinfo/rules-users > -- Charles Moulliard Apache Committer / Architect @RedHat Twitter : @cmoulliard | Blog : http://cmoulliard.github.io -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.jboss.org/pipermail/rules-users/attachments/20140521/46cb6804/attachment.html From ephemeris.lappis at gmail.com Wed May 21 06:55:44 2014 From: ephemeris.lappis at gmail.com (Ephemeris Lappis) Date: Wed, 21 May 2014 12:55:44 +0200 Subject: [rules-users] Rules compilation error with OSGi integration (6.1.0.Beta3) In-Reply-To: References: <1400508040790-4029601.post@n3.nabble.com> <1400583782768-4029622.post@n3.nabble.com> <1400655793433-4029635.post@n3.nabble.com> Message-ID: Hello. I could try to test on ServiceMix 5 that embeds Karaf 2.3.4, but for my concrete project, the customer current platform uses a ServiceMix 4.5.3 which is not really possible to change today while many other modules are already deployed. Did you try in your environment the test project that I attached yesterday ? There is a rule in the project with an "accumulate" that generates java code that is not compiled because of missing indirect dependancy despite of the Import-Package that I've copied from your examples. Hence my idea of a "proxy" classloader between Drools and its compiler and the classloader provided by the application bundle, and avoid the dynamic import that breaks the good practices... 2014-05-21 11:48 GMT+02:00 Charles Moulliard : > If you look to my example posted previously there are no issues. Can you > make a test using just Apache Karaf 2.3.x with Drools 6.1.0.Beta3 and tell > me what happen. Which JDK do you sue ? > > > On Wed, May 21, 2014 at 9:03 AM, Ephemeris Lappis < > ephemeris.lappis at gmail.com> wrote: > >> Hello. >> >> Although without much conviction, I've tried the >> "Bundle-RequiredExecutionEnvironment: J2SE-1.7", but it doesn't change the >> compilation level of the rules... >> >> As I said in a previous answer, I don't know exactly how to do it, but I >> think the solution may be in the way that Drools takes the classloader >> passed by the application to have access to specific classes like the >> usually imported beans used in the rules. Indeed, perhaps that instead of >> using directly this classloader, for its tasks, among of them the rules >> compilation, it should be possible to use some kind of enriched >> classloader >> that carries all the Drools needed packages, and delegates application >> classes resolution to the application's one. >> >> What do you think of that ? >> >> Regards. >> >> >> >> -- >> View this message in context: >> http://drools.46999.n3.nabble.com/Rules-compilation-error-with-OSGi-integration-6-1-0-Beta3-tp4029601p4029635.html >> Sent from the Drools: User forum mailing list archive at Nabble.com. >> _______________________________________________ >> rules-users mailing list >> rules-users at lists.jboss.org >> https://lists.jboss.org/mailman/listinfo/rules-users >> > > > > -- > Charles Moulliard > Apache Committer / Architect @RedHat > Twitter : @cmoulliard | Blog : http://cmoulliard.github.io > > > _______________________________________________ > rules-users mailing list > rules-users at lists.jboss.org > https://lists.jboss.org/mailman/listinfo/rules-users > -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.jboss.org/pipermail/rules-users/attachments/20140521/53d11007/attachment.html From ganeshneelekani at gmail.com Wed May 21 06:59:45 2014 From: ganeshneelekani at gmail.com (ganeshneelekani) Date: Wed, 21 May 2014 03:59:45 -0700 (PDT) Subject: [rules-users] Using KieScanner in drools6 Message-ID: <1400669985357-4029638.post@n3.nabble.com> Hi Team, I go through with the release doc http://docs.jboss.org/drools/release/6.0.0.Final/drools-docs/html_single/ and found that 2.1.6. KieScanner The KieScanner is a maven-oriented replacement of the KnowledgeAgent present in Drools 5. using knowledgwAgent I have linked through changeset.xml by below code in drools 5.4 KnowledgeAgent kagent = KnowledgeAgentFactory.newKnowledgeAgent("MyAgent1",kbase, kconf); ResourceFactory.getResourceChangeNotifierService().start(); ResourceFactory.getResourceChangeScannerService().start(); kagent.applyChangeSet(ResourceFactory.newUrlResource("http://localhost:8380/drools-guvnor/ChangeSet.xml")); kbase = kagent.getKnowledgeBase(); How I can achieve this using drools 6 to interact with my java code to drools workbench. or which drools 6 need to download to interact with java code. Please suggest me, Thanks Ganesh Neelekani -- View this message in context: http://drools.46999.n3.nabble.com/Using-KieScanner-in-drools6-tp4029638.html Sent from the Drools: User forum mailing list archive at Nabble.com. From ch007m at gmail.com Wed May 21 07:36:23 2014 From: ch007m at gmail.com (Charles Moulliard) Date: Wed, 21 May 2014 13:36:23 +0200 Subject: [rules-users] Rules compilation error with OSGi integration (6.1.0.Beta3) In-Reply-To: References: <1400508040790-4029601.post@n3.nabble.com> <1400583782768-4029622.post@n3.nabble.com> <1400655793433-4029635.post@n3.nabble.com> Message-ID: I can reproduce your error when I deploy the project (compiled with 1.7) and running with JDK 1.7 on Karaf 2.2.1/Felix 3.2.2 (= SMX 4.5.3) 2014-05-21 13:30:25,020 | INFO | l Console Thread | ClasspathKieProject | 211 - org.drools.compiler - 6.0.3.redhat-1 | Found kmodule: bundle://214.4:1/META-INF/kmodule.xml 2014-05-21 13:30:25,024 | DEBUG | l Console Thread | ClasspathKieProject | 211 - org.drools.compiler - 6.0.3.redhat-1 | Discovered classpath module org.drools.example:simple:1.0.0-SNAPSHOT 2014-05-21 13:30:25,024 | INFO | l Console Thread | KieRepositoryImpl | 211 - org.drools.compiler - 6.0.3.redhat-1 | KieModule was added:org.drools.osgi.compiler.OsgiKieModule at 501d0b5a 2014-05-21 13:30:25,044 | ERROR | l Console Thread | AbstractKieModule | 211 - org.drools.compiler - 6.0.3.redhat-1 | Unable to build KieBaseModel:sampleKBase Rule Compilation error : [Rule name='CanDrink'] org/drools/example/drink/Rule_CanDrink1955060708.java (8:541) : ArrayList cannot be resolved to a type org/drools/example/drink/Rule_CanDrink1955060708.java (8:550) : Syntax error on token "<", ? expected after this token BTW you have a workaround which is to define your code like this List l = new ArrayList(); Is it because the server runs with JDK 5 in production that you cannot change the code of the rules ? As ServiceMix is just a packaging of Karaf + Camel + Cxf + ActiveMQ, why don't you use directly Karaf and a more recent version of Felix (4.x) ? On Wed, May 21, 2014 at 12:55 PM, Ephemeris Lappis < ephemeris.lappis at gmail.com> wrote: > Hello. > > I could try to test on ServiceMix 5 that embeds Karaf 2.3.4, but for my > concrete project, the customer current platform uses a ServiceMix 4.5.3 > which is not really possible to change today while many other modules are > already deployed. > > Did you try in your environment the test project that I attached yesterday > ? There is a rule in the project with an "accumulate" that generates java > code that is not compiled because of missing indirect dependancy despite of > the Import-Package that I've copied from your examples. Hence my idea of a > "proxy" classloader between Drools and its compiler and the classloader > provided by the application bundle, and avoid the dynamic import that > breaks the good practices... > > > 2014-05-21 11:48 GMT+02:00 Charles Moulliard : > > If you look to my example posted previously there are no issues. Can you >> make a test using just Apache Karaf 2.3.x with Drools 6.1.0.Beta3 and tell >> me what happen. Which JDK do you sue ? >> >> >> On Wed, May 21, 2014 at 9:03 AM, Ephemeris Lappis < >> ephemeris.lappis at gmail.com> wrote: >> >>> Hello. >>> >>> Although without much conviction, I've tried the >>> "Bundle-RequiredExecutionEnvironment: J2SE-1.7", but it doesn't change >>> the >>> compilation level of the rules... >>> >>> As I said in a previous answer, I don't know exactly how to do it, but I >>> think the solution may be in the way that Drools takes the classloader >>> passed by the application to have access to specific classes like the >>> usually imported beans used in the rules. Indeed, perhaps that instead of >>> using directly this classloader, for its tasks, among of them the rules >>> compilation, it should be possible to use some kind of enriched >>> classloader >>> that carries all the Drools needed packages, and delegates application >>> classes resolution to the application's one. >>> >>> What do you think of that ? >>> >>> Regards. >>> >>> >>> >>> -- >>> View this message in context: >>> http://drools.46999.n3.nabble.com/Rules-compilation-error-with-OSGi-integration-6-1-0-Beta3-tp4029601p4029635.html >>> Sent from the Drools: User forum mailing list archive at Nabble.com. >>> _______________________________________________ >>> rules-users mailing list >>> rules-users at lists.jboss.org >>> https://lists.jboss.org/mailman/listinfo/rules-users >>> >> >> >> >> -- >> Charles Moulliard >> Apache Committer / Architect @RedHat >> Twitter : @cmoulliard | Blog : http://cmoulliard.github.io >> >> >> _______________________________________________ >> rules-users mailing list >> rules-users at lists.jboss.org >> https://lists.jboss.org/mailman/listinfo/rules-users >> > > > _______________________________________________ > rules-users mailing list > rules-users at lists.jboss.org > https://lists.jboss.org/mailman/listinfo/rules-users > -- Charles Moulliard Apache Committer / Architect @RedHat Twitter : @cmoulliard | Blog : http://cmoulliard.github.io -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.jboss.org/pipermail/rules-users/attachments/20140521/cbdf389c/attachment-0001.html From mproctor at codehaus.org Wed May 21 07:56:06 2014 From: mproctor at codehaus.org (Mark Proctor) Date: Wed, 21 May 2014 12:56:06 +0100 Subject: [rules-users] Using KieScanner in drools6 In-Reply-To: <1400669985357-4029638.post@n3.nabble.com> References: <1400669985357-4029638.post@n3.nabble.com> Message-ID: See http://docs.jboss.org/drools/release/6.1.0.Beta3/drools-docs/html/KIEChapter.html 4.2.3.5. Settings.xml and Remote Repository Setup 4.2.3.3. KieScanner 4.2.5. Installation and Deployment Cheat Sheets Mark On 21 May 2014, at 11:59, ganeshneelekani wrote: > Hi Team, > > I go through with the release doc > http://docs.jboss.org/drools/release/6.0.0.Final/drools-docs/html_single/ > and found that > > > 2.1.6. KieScanner > > The KieScanner is a maven-oriented replacement of the KnowledgeAgent present > in Drools 5. > > using knowledgwAgent I have linked through changeset.xml by below code in > drools 5.4 > > KnowledgeAgent kagent = > KnowledgeAgentFactory.newKnowledgeAgent("MyAgent1",kbase, kconf); > ResourceFactory.getResourceChangeNotifierService().start(); > ResourceFactory.getResourceChangeScannerService().start(); > kagent.applyChangeSet(ResourceFactory.newUrlResource("http://localhost:8380/drools-guvnor/ChangeSet.xml")); > kbase = kagent.getKnowledgeBase(); > > How I can achieve this using drools 6 to interact with my java code to > drools workbench. > > or which drools 6 need to download to interact with java code. > > Please suggest me, > > > Thanks > Ganesh Neelekani > > > > > -- > View this message in context: http://drools.46999.n3.nabble.com/Using-KieScanner-in-drools6-tp4029638.html > Sent from the Drools: User forum mailing list archive at Nabble.com. > _______________________________________________ > rules-users mailing list > rules-users at lists.jboss.org > https://lists.jboss.org/mailman/listinfo/rules-users -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.jboss.org/pipermail/rules-users/attachments/20140521/1f87f05b/attachment.html From ganeshneelekani at gmail.com Wed May 21 08:53:02 2014 From: ganeshneelekani at gmail.com (ganeshneelekani) Date: Wed, 21 May 2014 05:53:02 -0700 (PDT) Subject: [rules-users] Using KieScanner in drools6 In-Reply-To: References: <1400669985357-4029638.post@n3.nabble.com> Message-ID: <1400676782771-4029641.post@n3.nabble.com> Hi Mark, Thanks for suggestions.I will go through with above link I go through with document it uses maven, I do not have any knowledge on maven, Do I need to learn maven to develop project in drools 6 ? I developed using changeset.xml to link java and drools, And drools-guvnor.war, and designer.war in drools 5.4 version. If I develop maven project how to link maven and workbench - I felt confusing in this, Does following code helps KieServices kieServices = KieServices.Factory.get(); ReleaseId releaseId = kieServices.newReleaseId( "*org.acme", "myartifact", "1.0-SNAPSHOT*" ); KieContainer kContainer = kieServices.newKieContainer( releaseId ); KieScanner kScanner = kieServices.newKieScanner( kContainer ); // Start the KieScanner polling the Maven repository every 10 seconds kScanner.start( 10000L ) 2. I practiced some workbench tutorial.. and its almost different from drools 5.4, Is there any possible of integrating drools workbench and java code, or else I need to use any other drools war to develop application thanks for your patience . Regards Ganesh N -- View this message in context: http://drools.46999.n3.nabble.com/Using-KieScanner-in-drools6-tp4029638p4029641.html Sent from the Drools: User forum mailing list archive at Nabble.com. From dsotty at gmail.com Wed May 21 09:42:19 2014 From: dsotty at gmail.com (Davide Sottara) Date: Wed, 21 May 2014 08:42:19 -0500 Subject: [rules-users] Is @PropertySpecific supported in Drools 5.6.0 In-Reply-To: <1400650695047-4029633.post@n3.nabble.com> References: <1400650695047-4029633.post@n3.nabble.com> Message-ID: <537CAD3B.9060409@gmail.com> In the end it was actually named @PropertyReactive On 05/21/2014 12:38 AM, RavishankarHassain wrote: > I was looking fro some examples and document which explains on how to use the > @Modifies annotations inside Facts(Java class) and it happened for me to see > this doc > > http://docs.jboss.org/drools/release/5.4.0.Beta2/droolsjbpm-introduction-docs/html/releaseNotesBeta2.html > > I tired to implement @PropertySpecific and @Modifies according to the > session 3.1.2.1. Fine Grained Property Change Listeners (Property Specific) > which is briefly described in the above mentioned link > > But, when I tried to use @PropertySpecific annotation in my Facts(java > class) Eclipse IDE is not able to identify or resolve the package for > @PropertySpecific annotation. I am using Drools 5.6.0. Is this > @PropertySpecific annotation still supported in Drools, if yes then where is > it ? in which package and in which jar ? > > > > -- > View this message in context: http://drools.46999.n3.nabble.com/Is-PropertySpecific-supported-in-Drools-5-6-0-tp4029633.html > Sent from the Drools: User forum mailing list archive at Nabble.com. > _______________________________________________ > rules-users mailing list > rules-users at lists.jboss.org > https://lists.jboss.org/mailman/listinfo/rules-users > From ravishankarhassain at gmail.com Wed May 21 10:34:02 2014 From: ravishankarhassain at gmail.com (RavishankarHassain) Date: Wed, 21 May 2014 07:34:02 -0700 (PDT) Subject: [rules-users] Is @PropertySpecific supported in Drools 5.6.0 In-Reply-To: <537CAD3B.9060409@gmail.com> References: <1400650695047-4029633.post@n3.nabble.com> <537CAD3B.9060409@gmail.com> Message-ID: <1400682842518-4029643.post@n3.nabble.com> Thanks for the info -- View this message in context: http://drools.46999.n3.nabble.com/Is-PropertySpecific-supported-in-Drools-5-6-0-tp4029633p4029643.html Sent from the Drools: User forum mailing list archive at Nabble.com. From higherarch08 at gmail.com Wed May 21 10:40:24 2014 From: higherarch08 at gmail.com (Kysis) Date: Wed, 21 May 2014 07:40:24 -0700 (PDT) Subject: [rules-users] XML and the Guided Decision Tables Message-ID: <1400683224205-4029644.post@n3.nabble.com> Hello my team and I are trying to write a script in order to convert and condense a decision table to import it into the workbench as a Guided Decision Table. Is there documentation for the XML file that represents a GDT? Thanks, Michael. -- View this message in context: http://drools.46999.n3.nabble.com/XML-and-the-Guided-Decision-Tables-tp4029644.html Sent from the Drools: User forum mailing list archive at Nabble.com. From michael.anstis at gmail.com Wed May 21 15:31:09 2014 From: michael.anstis at gmail.com (Michael Anstis) Date: Wed, 21 May 2014 20:31:09 +0100 Subject: [rules-users] XML and the Guided Decision Tables In-Reply-To: <1400683224205-4029644.post@n3.nabble.com> References: <1400683224205-4029644.post@n3.nabble.com> Message-ID: There is no schema for a GDST; it's simply an XStream dump of the POJO model behind the editor. We support conversion of XLS decision tables to GDST as from 5.4 (I think; it's definitely in 5.5 and 6.0). If either (a) you're not using XLS decision tables or (b) you want them converted outside of the workbench you could always have a look at the code that handles conversion and write something yourself (droolsjbpm/drools-wb/drools-wb-screens/guided-dtable or a path to that effect). Cheers, Mike Sent on the move On 21 May 2014 15:41, "Kysis" wrote: > Hello my team and I are trying to write a script in order to convert and > condense a decision table to import it into the workbench as a Guided > Decision Table. Is there documentation for the XML file that represents a > GDT? > > Thanks, Michael. > > > > -- > View this message in context: > http://drools.46999.n3.nabble.com/XML-and-the-Guided-Decision-Tables-tp4029644.html > Sent from the Drools: User forum mailing list archive at Nabble.com. > _______________________________________________ > rules-users mailing list > rules-users at lists.jboss.org > https://lists.jboss.org/mailman/listinfo/rules-users > -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.jboss.org/pipermail/rules-users/attachments/20140521/953a44d2/attachment.html From roni.frantchi at gmail.com Thu May 22 06:35:42 2014 From: roni.frantchi at gmail.com (dec) Date: Thu, 22 May 2014 03:35:42 -0700 (PDT) Subject: [rules-users] Suspicious behaviour when using a bound variable as a constraint in a pattern bound to the same var Message-ID: <1400754942149-4029647.post@n3.nabble.com> Due to a bug we came up with the following rule: /* Rule "intriguing" when $foo: Foo( $foo.getBar() == null ) then ... */ Our original intention was to actually generate the rule like so: /* Rule "intended" when $foo: Foo( bar == null ) then ... */ In most cases the "intriguing" rule actually seem to behave much like the "intended". We are unsure way. Moreover, we suspect that sometime we get wrong, or rather unexpected results when firing up this rule. -- View this message in context: http://drools.46999.n3.nabble.com/Suspicious-behaviour-when-using-a-bound-variable-as-a-constraint-in-a-pattern-bound-to-the-same-var-tp4029647.html Sent from the Drools: User forum mailing list archive at Nabble.com. From mproctor at codehaus.org Thu May 22 07:15:52 2014 From: mproctor at codehaus.org (Mark Proctor) Date: Thu, 22 May 2014 12:15:52 +0100 Subject: [rules-users] London (May 26th) Drools & jBPM community contributor meeting Message-ID: London, Chiswick, May 26th to May 30th During next week a large percentage of the Drools team, some of the jBPM team and some community members will be meeting in London (Chiswick). There won?t be any presentations, we?ll just be in a room hacking, designing, exchanging ideas and planing. This is open to community members who wish to contribute towards Drools or jBPM, and want help with those contributions. This also includes people working on open source or academic projects that utilise Drools or jBPM. Email me if you want to attend, our locations may very (but within chiswick) each day. We will not be able to make the day time available to people looking for general Drools or jBPM guidance (unless you want to buy us all lunch). But we will be organising evenings things (like bowling) and could make wed or thu evening open to people wanting general chats and advice. Email me if you?re interested, and after discussing with the team, I?ll let you know. Those currently attending: Mark Proctor (mon-fri) Group architect Edson Tirelli (mon-fri) Drools backend, and project lead Mario Fusco (mon-fri) Drools backend Davide Sottara (wed-fri) Drools backend Alex Porcelli (mon-fri) Drools UI Michael Anstis (thu-fri) Drools UI Kris Verlaenen (wed-thu) jBPM backend, and project lead Mauricio Salatino (mon-fri) jBPM tasks and general UI From dsotty at gmail.com Thu May 22 09:38:15 2014 From: dsotty at gmail.com (Davide Sottara) Date: Thu, 22 May 2014 08:38:15 -0500 Subject: [rules-users] Suspicious behaviour when using a bound variable as a constraint in a pattern bound to the same var In-Reply-To: <1400754942149-4029647.post@n3.nabble.com> References: <1400754942149-4029647.post@n3.nabble.com> Message-ID: <537DFDC7.2010801@gmail.com> Could you please elaborate on what you mean by "suspect that sometime we get wrong, unexpected results"? We'd need to know at least the inputs to reproduce the possible issue Thanks Davide On 05/22/2014 05:35 AM, dec wrote: > Due to a bug we came up with the following rule: > > /* > Rule "intriguing" > when > $foo: Foo( $foo.getBar() == null ) > then > ... > */ > > Our original intention was to actually generate the rule like so: > > /* > Rule "intended" > when > $foo: Foo( bar == null ) > then > ... > */ > > In most cases the "intriguing" rule actually seem to behave much like the > "intended". > We are unsure way. > Moreover, we suspect that sometime we get wrong, or rather unexpected > results when firing up this rule. > > > > -- > View this message in context: http://drools.46999.n3.nabble.com/Suspicious-behaviour-when-using-a-bound-variable-as-a-constraint-in-a-pattern-bound-to-the-same-var-tp4029647.html > Sent from the Drools: User forum mailing list archive at Nabble.com. > _______________________________________________ > rules-users mailing list > rules-users at lists.jboss.org > https://lists.jboss.org/mailman/listinfo/rules-users > From wolfgang.laun at gmail.com Thu May 22 09:54:14 2014 From: wolfgang.laun at gmail.com (Wolfgang Laun) Date: Thu, 22 May 2014 15:54:14 +0200 Subject: [rules-users] Suspicious behaviour when using a bound variable as a constraint in a pattern bound to the same var In-Reply-To: <1400754942149-4029647.post@n3.nabble.com> References: <1400754942149-4029647.post@n3.nabble.com> Message-ID: Please don't write any more posts like this. You aren't asking a question, as far as I can see - so why do you post? You write, darkly, about suspicions of wrong or unexpected results (which, to be sure, isn't the same thing). This is a big help. -W On 22/05/2014, dec wrote: > Due to a bug we came up with the following rule: > > /* > Rule "intriguing" > when > $foo: Foo( $foo.getBar() == null ) > then > ... > */ > > Our original intention was to actually generate the rule like so: > > /* > Rule "intended" > when > $foo: Foo( bar == null ) > then > ... > */ > > In most cases the "intriguing" rule actually seem to behave much like the > "intended". > We are unsure way. > Moreover, we suspect that sometime we get wrong, or rather unexpected > results when firing up this rule. > > > > -- > View this message in context: > http://drools.46999.n3.nabble.com/Suspicious-behaviour-when-using-a-bound-variable-as-a-constraint-in-a-pattern-bound-to-the-same-var-tp4029647.html > Sent from the Drools: User forum mailing list archive at Nabble.com. > _______________________________________________ > rules-users mailing list > rules-users at lists.jboss.org > https://lists.jboss.org/mailman/listinfo/rules-users > From roni.frantchi at gmail.com Thu May 22 11:07:25 2014 From: roni.frantchi at gmail.com (dec) Date: Thu, 22 May 2014 08:07:25 -0700 (PDT) Subject: [rules-users] Suspicious behaviour when using a bound variable as a constraint in a pattern bound to the same var In-Reply-To: References: <1400754942149-4029647.post@n3.nabble.com> Message-ID: <1400771245738-4029654.post@n3.nabble.com> Apologies, I had wanted to know: 1. Is it expected that this two rules would behave the same given the same input? Not sure I understand how would it even compile and how would the var be conditioned upon before being assigned . 2. The input was just some random string. 3. The results are unexpected as we are getting a hit on this row even though the field is populated with some string. BUT what is suspicious is that it would seem we very rarely get this sort of behaviour. We also suspect if it has something to do with concurrency or multiple sessions concurrently executing. Most importantly, I would like to understand 1) - how is this even possible to come up with such a pattern and is it expected to behave like the intended rule -- View this message in context: http://drools.46999.n3.nabble.com/Suspicious-behaviour-when-using-a-bound-variable-as-a-constraint-in-a-pattern-bound-to-the-same-var-tp4029647p4029654.html Sent from the Drools: User forum mailing list archive at Nabble.com. From jpsteinmetz at theworkshop.us.com Thu May 22 14:00:18 2014 From: jpsteinmetz at theworkshop.us.com (Steinmetz, Jean-Philippe) Date: Thu, 22 May 2014 11:00:18 -0700 Subject: [rules-users] Persistence in Drools 6 Message-ID: Hello All, I am trying to set up persistence for a standalone Drools (6.0.1.Final) application that uses JPA, Hibernate (4.3.5.Final) and Bitronix (2.1.4) via Spring (4.0.3.RELEASE). On the persistence side everything appears to be set up correctly. For my Drools session I use a KieContainer to create a new stateful session using an environment set up with the EntityManagerFactory and TransactionManager set. The problem that I am experiencing however is that nothing is getting persisted to the database. I have poured over the docs at least two dozen times and searched the net for anything related. Here is what my Spring context file looks like when creating the Drools session... Since the application is standalone I execute fireAllRules on the session at a regular interval (I use this instead of fireUntilHalt as it dramatically reduces the CPU load on the machine). With each call I wrap it in a transaction. Thus, the code looks as follows: while (!Thread.currentThread().isInterrupted()) { // Start a new transaction UserTransaction utx = utx = (UserTransaction)new InitialContext().lookup("java:comp/UserTransaction"); utx.begin(); // Tick the session kSession.fireAllRules(); // Close the transaction utx.commit(); // Sleep so that other applications can use the CPU try { Thread.sleep(1); } catch (InterruptedException e) { // When our sleep is interrupted it's because the executor wants us to shut down. Thread.currentThread().interrupt(); } } When I inspect kSession in the debugger I can see the environment is properly set. I have tried digging down into the execute a bit but can't find any point at which the TransactionManager or EntityManagerFactory are used. As I said above I know Hibernate is set up correctly as well as Bitronix. I can see them working just fine in the logs and they definitely are hitting the database (and create tables for sessioninfo and workingmemory as they should). I just get nothing actually in the database stored, ever. Any help here is appreciated. It seems like it should work but it just doesn't. Thanks in advance, Jean-Philippe Steinmetz -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.jboss.org/pipermail/rules-users/attachments/20140522/d9be8033/attachment.html From roger at precipicetech.com Thu May 22 14:43:49 2014 From: roger at precipicetech.com (rogerL) Date: Thu, 22 May 2014 11:43:49 -0700 (PDT) Subject: [rules-users] Cannot issue fireUntilHalt when using persisted session Message-ID: <1400784229559-4029656.post@n3.nabble.com> Due to an issue with reloading persisted sessions that contained a cron timer rule, I upgraded to 6.1.0.Beta3. Now I'm encountering a problem with a threaded fireUntilHalt command (cannot be issued on a persisted session). Exception in thread "SimpleAsyncTaskExecutor-1" java.lang.UnsupportedOperationException: Command session.fireUntilHalt(); cannot be issued on a persisted session at org.drools.persistence.SingleSessionCommandService$TransactionInterceptor.execute(SingleSessionCommandService.java:474) at org.drools.persistence.SingleSessionCommandService.execute(SingleSessionCommandService.java:353) at org.drools.core.command.impl.CommandBasedStatefulKnowledgeSession.fireUntilHalt(CommandBasedStatefulKnowledgeSession.java:272)... It worked without issue in 6.0.1.Final. Though I suspect not, is this expected behaviour? Alternately, are there configuration/other changes that must be implemented. Libs spring 4.0.1 kie, drools, jbpm 6.1.0.Beta3 hibernate 4.3.4 -- View this message in context: http://drools.46999.n3.nabble.com/Cannot-issue-fireUntilHalt-when-using-persisted-session-tp4029656.html Sent from the Drools: User forum mailing list archive at Nabble.com. From wtang at kana.com Thu May 22 15:49:54 2014 From: wtang at kana.com (wtang) Date: Thu, 22 May 2014 12:49:54 -0700 (PDT) Subject: [rules-users] @propertyReactive not work when condition are coded in java Message-ID: <1400788194588-4029657.post@n3.nabble.com> I have rule1 and rule2 and rule1 is modifying an object whose property is checked in the when part of rule2 and rule2 should fire. The problem is rule2 is not firing. When I took out the @PropertyReactive annotation, then rule2 will fire. After further investigation, I find the cause is because in the when part I am calling java function to do the comparison as suppose to using native operators like "==". Property Reactive seems to be not working when in the WHEN part of the rules we are calling java function to do the comparison as suppose to using native operators like ==, <, >, etc. Please advice. -- View this message in context: http://drools.46999.n3.nabble.com/propertyReactive-not-work-when-condition-are-coded-in-java-tp4029657.html Sent from the Drools: User forum mailing list archive at Nabble.com. From jpsteinmetz at theworkshop.us.com Thu May 22 17:28:36 2014 From: jpsteinmetz at theworkshop.us.com (Steinmetz, Jean-Philippe) Date: Thu, 22 May 2014 14:28:36 -0700 Subject: [rules-users] Using git-p4 with workbench Message-ID: Hi, Has anyone tried using a VCS bridge for git with the Drools 6 workbench? Specifically I am interested in git-p4 so that I can access an existing maven project that is currently stored in Perforce. Is this use case supported? Thanks in advance, Jean-Philippe -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.jboss.org/pipermail/rules-users/attachments/20140522/55ba1521/attachment.html From roger at precipicetech.com Thu May 22 17:40:55 2014 From: roger at precipicetech.com (rogerL) Date: Thu, 22 May 2014 14:40:55 -0700 (PDT) Subject: [rules-users] Rule for "only one of the below exists", help please? In-Reply-To: <1400793665146-4029658.post@n3.nabble.com> References: <1400793665146-4029658.post@n3.nabble.com> Message-ID: <1400794855807-4029660.post@n3.nabble.com> Have a look at the collect command. Something like: ArrayList( size == 1 ) from collect( LineItem (materialID == 'a' || == 'b' || == 'c' ) ) -- View this message in context: http://drools.46999.n3.nabble.com/Rule-for-only-one-of-the-below-exists-help-please-tp4029658p4029660.html Sent from the Drools: User forum mailing list archive at Nabble.com. From mproctor at codehaus.org Thu May 22 18:45:20 2014 From: mproctor at codehaus.org (Mark Proctor) Date: Thu, 22 May 2014 23:45:20 +0100 Subject: [rules-users] Using git-p4 with workbench In-Reply-To: References: Message-ID: We use JGit and I don?t believe (but could be wrong) it has direct p4 support, like this git extension offers. http://git-scm.com/docs/git-p4 However Git is distributed, so just clone and sync a p4 repo with this Git command line tool and use it as an intermediary. Then merge/mirror this intermediary with our JGit repo. Mark On 22 May 2014, at 22:28, Steinmetz, Jean-Philippe wrote: > Hi, > > Has anyone tried using a VCS bridge for git with the Drools 6 workbench? Specifically I am interested in git-p4 so that I can access an existing maven project that is currently stored in Perforce. Is this use case supported? > > Thanks in advance, > > Jean-Philippe > _______________________________________________ > rules-users mailing list > rules-users at lists.jboss.org > https://lists.jboss.org/mailman/listinfo/rules-users From droolsforum at taische.com Thu May 22 19:02:34 2014 From: droolsforum at taische.com (Paul Strohn) Date: Thu, 22 May 2014 16:02:34 -0700 (PDT) Subject: [rules-users] OptaPlanner VRPTW Benchmark? Message-ID: <1400799754584-4029663.post@n3.nabble.com> Might anyone on the list have come across Gehring & Homberger VRPTW benchmark figures for Planner? Given that record performance in the benchmark is something to brag about in some circles when pitching an optimizer to business customers, it would be great to see how OptaPlanner stacks up! -- View this message in context: http://drools.46999.n3.nabble.com/OptaPlanner-VRPTW-Benchmark-tp4029663.html Sent from the Drools: User forum mailing list archive at Nabble.com. -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.jboss.org/pipermail/rules-users/attachments/20140522/ec81d903/attachment.html From wolfgang.laun at gmail.com Fri May 23 01:32:08 2014 From: wolfgang.laun at gmail.com (Wolfgang Laun) Date: Fri, 23 May 2014 07:32:08 +0200 Subject: [rules-users] Suspicious behaviour when using a bound variable as a constraint in a pattern bound to the same var In-Reply-To: <1400771245738-4029654.post@n3.nabble.com> References: <1400754942149-4029647.post@n3.nabble.com> <1400771245738-4029654.post@n3.nabble.com> Message-ID: 1. The constraints are equivalent. $foo is bound to the Foo object, and the getter does what the getter is supposed to do, and it's (probably) visible - so why shouldn't it compile. Version 5.3 or maybe even 5.2 has introduced general boolean expressions - are you using an older version? I don't know what you mean by "being conditioned upon" - do you understand the concept of "binding"? 2. Randomness should not matter. 3. Not seeing code that reproduces the issue, discussion is rather fruitless. -W On 22 May 2014 17:07, dec wrote: > Apologies, > I had wanted to know: > 1. Is it expected that this two rules would behave the same given the same > input? > Not sure I understand how would it even compile and how would the var be > conditioned upon before being assigned . > > 2. The input was just some random string. > > 3. The results are unexpected as we are getting a hit on this row even > though the field is populated with some string. BUT what is suspicious is > that it would seem we very rarely get this sort of behaviour. We also > suspect if it has something to do with concurrency or multiple sessions > concurrently executing. > > Most importantly, I would like to understand 1) - how is this even possible > to come up with such a pattern and is it expected to behave like the > intended rule > > > > -- > View this message in context: http://drools.46999.n3.nabble.com/Suspicious-behaviour-when-using-a-bound-variable-as-a-constraint-in-a-pattern-bound-to-the-same-var-tp4029647p4029654.html > Sent from the Drools: User forum mailing list archive at Nabble.com. > _______________________________________________ > rules-users mailing list > rules-users at lists.jboss.org > https://lists.jboss.org/mailman/listinfo/rules-users From ch007m at gmail.com Fri May 23 02:23:41 2014 From: ch007m at gmail.com (Charles Moulliard) Date: Fri, 23 May 2014 08:23:41 +0200 Subject: [rules-users] Persistence in Drools 6 In-Reply-To: References: Message-ID: Hi Jean Philippe, I have recently created a project to persist bpmn process using Spring & JPA / Hibernate. This config is working using kie-spring https://github.com/cmoulliard/droolsjbpm-osgi-examples/blob/master/spring-jbpm-persistence/src/main/resources/META-INF/spring/context.xml Regards, Charles On Thu, May 22, 2014 at 8:00 PM, Steinmetz, Jean-Philippe < jpsteinmetz at theworkshop.us.com> wrote: > Hello All, > > I am trying to set up persistence for a standalone Drools (6.0.1.Final) > application that uses JPA, Hibernate (4.3.5.Final) and Bitronix (2.1.4) via > Spring (4.0.3.RELEASE). > > On the persistence side everything appears to be set up correctly. For my > Drools session I use a KieContainer to create a new stateful session using > an environment set up with the EntityManagerFactory and TransactionManager > set. The problem that I am experiencing however is that nothing is getting > persisted to the database. I have poured over the docs at least two dozen > times and searched the net for anything related. > > Here is what my Spring context file looks like when creating the Drools > session... > > factory-method="newReleaseId"> > > > > > factory-method="newKieContainer"> > > > factory-method="newEnvironment"> > > > > static-field="org.kie.api.runtime.EnvironmentName.ENTITY_MANAGER_FACTORY"/> > > > > static-field="org.kie.api.runtime.EnvironmentName.TRANSACTION_MANAGER"/> > > > > > > factory-method="newKieSession"> > > > > Since the application is standalone I execute fireAllRules on the session > at a regular interval (I use this instead of fireUntilHalt as it > dramatically reduces the CPU load on the machine). With each call I wrap it > in a transaction. Thus, the code looks as follows: > > while (!Thread.currentThread().isInterrupted()) { > // Start a new transaction > UserTransaction utx = utx = (UserTransaction)new > InitialContext().lookup("java:comp/UserTransaction"); > utx.begin(); > > // Tick the session > kSession.fireAllRules(); > > // Close the transaction > utx.commit(); > > // Sleep so that other applications can use the CPU > try { > Thread.sleep(1); > } catch (InterruptedException e) { > // When our sleep is interrupted it's because the executor > wants us to shut down. > Thread.currentThread().interrupt(); > } > } > > When I inspect kSession in the debugger I can see the environment is > properly set. I have tried digging down into the execute a bit but can't > find any point at which the TransactionManager or EntityManagerFactory are > used. As I said above I know Hibernate is set up correctly as well as > Bitronix. I can see them working just fine in the logs and they definitely > are hitting the database (and create tables for sessioninfo and > workingmemory as they should). I just get nothing actually in the database > stored, ever. > > Any help here is appreciated. It seems like it should work but it just > doesn't. > > Thanks in advance, > > Jean-Philippe Steinmetz > > > _______________________________________________ > rules-users mailing list > rules-users at lists.jboss.org > https://lists.jboss.org/mailman/listinfo/rules-users > -- Charles Moulliard Apache Committer / Architect @RedHat Twitter : @cmoulliard | Blog : http://cmoulliard.github.io -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.jboss.org/pipermail/rules-users/attachments/20140523/f32c2ab7/attachment.html From ganeshneelekani at gmail.com Fri May 23 06:41:56 2014 From: ganeshneelekani at gmail.com (ganeshneelekani) Date: Fri, 23 May 2014 03:41:56 -0700 (PDT) Subject: [rules-users] Drools 6.0 workbench user interface Message-ID: <1400841716720-4029666.post@n3.nabble.com> Hi Team, I have started to read drools 6.1 documentation and As per as i understanding, i aware of drools 5.4 Below version < 6.0 we use drools guvnor is a interface for building drools rule and jbpm file.No need of maven used changeset.xml to interact with drools-guvnor version> 6.0 uses drools workbench and whole code is built using workbench and no need of java code to connect to drools workbench Please correct me if I am wrong. Thanks, Ganesh Neelekani -- View this message in context: http://drools.46999.n3.nabble.com/Drools-6-0-workbench-user-interface-tp4029666.html Sent from the Drools: User forum mailing list archive at Nabble.com. From michael.anstis at gmail.com Fri May 23 09:41:05 2014 From: michael.anstis at gmail.com (Michael Anstis) Date: Fri, 23 May 2014 14:41:05 +0100 Subject: [rules-users] Drools 6.0 workbench user interface In-Reply-To: <1400841716720-4029666.post@n3.nabble.com> References: <1400841716720-4029666.post@n3.nabble.com> Message-ID: Almost 100% correct. You can include a "KJAR" (Drools 6.x unit of deployment == JAR + META-INF/kmodule.xml) as a Maven dependency in a project needing the rules/processes etc. If you need to monitor and update rules/processes etc in your KieBase as new SNAPSHOTS of the KJAR are published you need to look at using KieScanner (which replaces the use of change-sets). The only aspect that was incorrect was stating you needed to use change-sets with Drools/Guvnor < 6.x (this wasn't strictly required; but I won't go into detail here as it's not really relevant now). On 23 May 2014 11:41, ganeshneelekani wrote: > Hi Team, > > > I have started to read drools 6.1 documentation and As per as i > understanding, i aware of drools 5.4 > > Below version < 6.0 we use drools guvnor is a interface for building drools > rule and jbpm file.No need of maven > used changeset.xml to interact with drools-guvnor > > version> 6.0 uses drools workbench and whole code is built using workbench > and no need of java code to connect to drools workbench > > Please correct me if I am wrong. > > Thanks, > Ganesh Neelekani > > > > -- > View this message in context: > http://drools.46999.n3.nabble.com/Drools-6-0-workbench-user-interface-tp4029666.html > Sent from the Drools: User forum mailing list archive at Nabble.com. > _______________________________________________ > rules-users mailing list > rules-users at lists.jboss.org > https://lists.jboss.org/mailman/listinfo/rules-users > -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.jboss.org/pipermail/rules-users/attachments/20140523/f0118f04/attachment.html From chenshengda at qq.com Sun May 25 04:04:12 2014 From: chenshengda at qq.com (=?gb18030?B?RG9ubmllRGFya28=?=) Date: Sun, 25 May 2014 16:04:12 +0800 Subject: [rules-users] About the Quest Of : How to push changes to cloned repo onKie-Workbench In-Reply-To: <1401003416079-4029670.post@n3.nabble.com> References: <1386891277333-4027264.post@n3.nabble.com> <1401003416079-4029670.post@n3.nabble.com> Message-ID: Hi: The ori question is here: http://drools.46999.n3.nabble.com/How-to-push-changes-to-cloned-repo-on-Kie-Workbench-tp4027264p4029670.html It send me this email after I reply it derectly; But this question confuse me fo a week, So i answer the email for looking more help quickly,forgive me After reading the origin prob, I think the question is We can clone the project from wb's git server, like git clone git://10.101.81.72:9418/uf-playground Take attention: 1.we use the git protocol to clone the git project 2.it do work well 3.we use git bash to clone the project(whatever u use other tools: git gui, eclipse egit plugin, svn git merger) 4.we can add files,we can commit local modified, we can create branches, but we cannot push the modifies to server/master?we cannot merge branches to master 5.i donot think the kie-config-cli is a good enough tool a.i use the jboss-eap-6 as my appserver,there is a exception about "address is already used" when i run the kie-config-cli.sh after i deploy Guvnor in the same machine b.i meet the same problem about: lllpcsd at lllpcsd-VirtualBox:~/drools_git_ws/uf-playground$ git push fatal: Could not read from remote repository. Please make sure you have the correct access rights and the repository exists. so 1.this is about how to config Git security cer in Guvnor workbench 2.we just want to develop projects with git tool, just want to push/merge codes!!! 3.i don't get more information from the drools's document it say: org.uberfire.nio.git.ssh.cert.dir: Location of the directory .security where local certtificates will be stored. Default: working directory and then? and then? and then? we know the .security directory is located $work_dir/.security, we cannot get enough information about how to config things about Git's SSH key or security trust :< we know the github.com platform will advance us to set the SSH key to do developing works, but the Guvnor has no UI function to set this. May be I do the wrong thing about clone, May be I should clone the code with SSH, how to config ssh is always a problem May be these are all wrong action about how to use Guvnor correctly The drools's document is so powerful and so poor :< Help If you reply to this email, your message will be added to the discussion below: http://drools.46999.n3.nabble.com/How-to-push-changes-to-cloned-repo-on-Kie-Workbench-tp4027264p4029670.html To unsubscribe from How to push changes to cloned repo on Kie-Workbench, click here. NAML -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.jboss.org/pipermail/rules-users/attachments/20140525/4fc384b5/attachment-0001.html From chenshengda at qq.com Sun May 25 04:07:41 2014 From: chenshengda at qq.com (llpcsd) Date: Sun, 25 May 2014 01:07:41 -0700 (PDT) Subject: [rules-users] Drools 6.0.1: Pushing changes back to Workbench GIT using SSH In-Reply-To: <4667D6A1-9AA3-4AE2-8963-E0BDB5B3F065@gmail.com> References: <1390365162098-4027800.post@n3.nabble.com> <8C9EBA44-42A6-4916-BF3E-0564CBB2648E@redhat.com> <4667D6A1-9AA3-4AE2-8963-E0BDB5B3F065@gmail.com> Message-ID: <1401005261482-4029672.post@n3.nabble.com> Hi: do u get the problem resolved? I met the same problem:< the git cer infomation from the drools's doc is so poor, Help thank u -- View this message in context: http://drools.46999.n3.nabble.com/Drools-6-0-1-Pushing-changes-back-to-Workbench-GIT-using-SSH-tp4027800p4029672.html Sent from the Drools: User forum mailing list archive at Nabble.com. From natalia.iglesias at casadearriba.net Sun May 25 10:04:43 2014 From: natalia.iglesias at casadearriba.net (Natalia Iglesias de Amunategui) Date: Sun, 25 May 2014 16:04:43 +0200 Subject: [rules-users] Drools 601 kmodule problem when running the drools project in eclipse kepler ide Message-ID: <009c01cf7822$48346c10$d89d4430$@iglesias@casadearriba.net> Hello, I am currently working on a Drools project using eclipse kepler and the drools plug-in from drools 601. I have a main java class that contains POJO classes representing facts and the initialization of the kie container and session. When executing the command System.out.println(kContainer.verify().getMessages().toString()); I get the following messages:(note the warning ?No files found for KieBase InfectionRules, searching folder ?) [main] INFO org.drools.compiler.kie.builder.impl.ClasspathKieProject - Found kmodule: file:/C:/TFM/Infections/Workspace/InfectionRules/VAP/target/META-INF/kmodule ..xml [main] INFO org.drools.compiler.kie.builder.impl.KieRepositoryImpl - KieModule was added:FileKieModule[ ReleaseId=${project.groupId}:${project.artifactId}:${project.version}file=\T FM\Infections\Workspace\InfectionRules\VAP\target] [main] INFO org.drools.compiler.kie.builder.impl.ClasspathKieProject - Found kmodule: file:/C:/TFM/Infections/Workspace/InfectionRules/VAP/target/META-INF/kmodule ..xml [main] INFO org.drools.compiler.kie.builder.impl.KieRepositoryImpl - KieModule was added:FileKieModule[ ReleaseId=${project.groupId}:${project.artifactId}:${project.version}file=\T FM\Infections\Workspace\InfectionRules\VAP\target] [main] WARN org.drools.compiler.kie.builder.impl.AbstractKieModule - No files found for KieBase InfectionRules, searching folder \TFM\Infections\Workspace\InfectionRules\VAP\target [] java.lang.NullPointerException at InfectionRules.VAPDroolsTest.main(VAPDroolsTest.java:62) The kie initialization module has the following code: package InfectionRules; import java.util.*; import java.util.concurrent.TimeUnit; import java.text.DateFormat; import java.text.SimpleDateFormat; import org.drools.core.time.*; import org.kie.internal.*; import org.kie.api.conf.EventProcessingOption; import org.kie.api.runtime.KieRuntime; import org.kie.api.KieBaseConfiguration; import org.kie.api.KieServices; import org.kie.api.runtime.KieContainer; import org.kie.api.runtime.KieSession; import org.kie.api.runtime.KieSessionConfiguration; import org.kie.api.runtime.conf.ClockTypeOption; import org.kie.api.runtime.rule.EntryPoint; import org.kie.api.runtime.rule.FactHandle; import org.kie.api.time.SessionClock; public static void main(final String[] args) { try { // load up the knowledge base KieServices ks = KieServices.Factory.get(); KieContainer kContainer = ks.getKieClasspathContainer(); System.out.println(kContainer.verify().getMessages().toString()); KieSession kSession = kContainer.newKieSession("VAPSession"); // set clock to pseudo clock to be able to advance it manually KieSessionConfiguration ksconf = KieServices.Factory.get().newKieSessionConfiguration(); ksconf.setOption(ClockTypeOption.get("pseudo")); SessionPseudoClock clock = kSession.getSessionClock(); // set stream mode as opposite to cloud mode KieBaseConfiguration config = KieServices.Factory.get().newKieBaseConfiguration(); config.setOption(EventProcessingOption.STREAM ); // Insert test patients and related classes // mr Jones has no VAP, so the cpi score is less than 6 final Patient p1 = new Patient( "MrJones", 45, 1, false,false,true,37.0, 5000,"None","No Infiltrate","None","No Growth","S.Aureus",235,true, false, 0, true,new SimpleDateFormat("yyyy-MM-dd").parse("2014-05-17"),"", new SimpleDateFormat("yyyy-MM-dd").parse("2014-05-17"),false,false,false,false); kSession.insert( p1 ); // get a reference to the entry point and insert events EntryPoint nursingStream = kSession.getEntryPoint( "NursingStream" ); final CPIScore cpiScore1 = new CPIScore( p1,"initial",7); nursingStream.insert( cpiScore1 ); clock.advanceTime( 75, TimeUnit.HOURS ); final CPIScore cpiScore2 = new CPIScore( p1,"3days",7 ); nursingStream.insert( cpiScore2 ); I am running this class directly from the Eclipse Run menu option. I have installed maven but I?m not using it (yet) The kmodule.xml file has the following format: (I have tried to change the packages field of kmodule to *, but it does not work either.) And the directory structure where both the java and drl code reside is: C:\TFM\Infections\Workspace\InfectionRules\VAP\src\main Subdirectory java contains the java classes and resources the drl file. The target directory is located under ..\VAP\target\ with the following structure: >From Eclipse IDE this is the project structure Any idea as to what I?m doing wrong? I don?t know why the kmodule does not locate the kbase in the directory \TFM\Infections\Workspace\InfectionRules\VAP\target as this directory contains the drl file vap.drl in the rules subdirectory. Although I get later a null pointer exception, I guess that it has to do with this warning, as if there is no kbase located no session can be used. Thanks in advance! Best regards Natalia --- Este mensaje no contiene virus ni malware porque la protecci?n de avast! Antivirus est? activa. http://www.avast.com -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.jboss.org/pipermail/rules-users/attachments/20140525/309c2dd5/attachment-0001.html -------------- next part -------------- A non-text attachment was scrubbed... Name: not available Type: image/png Size: 10458 bytes Desc: not available Url : http://lists.jboss.org/pipermail/rules-users/attachments/20140525/309c2dd5/attachment-0002.png -------------- next part -------------- A non-text attachment was scrubbed... Name: not available Type: image/png Size: 1833 bytes Desc: not available Url : http://lists.jboss.org/pipermail/rules-users/attachments/20140525/309c2dd5/attachment-0003.png From salaboy at gmail.com Sun May 25 10:18:04 2014 From: salaboy at gmail.com (Mauricio Salatino) Date: Sun, 25 May 2014 15:18:04 +0100 Subject: [rules-users] Drools 601 kmodule problem when running the drools project in eclipse kepler ide In-Reply-To: <5381f911.8839e00a.6809.ffffc2eeSMTPIN_ADDED_BROKEN@mx.google.com> References: <5381f911.8839e00a.6809.ffffc2eeSMTPIN_ADDED_BROKEN@mx.google.com> Message-ID: Try creating a directory called: *InfectionRules inside the src/main/resources/* *and then put the rules inside there.* On Sun, May 25, 2014 at 3:04 PM, Natalia Iglesias de Amunategui < natalia.iglesias at casadearriba.net> wrote: > Hello, > > > > I am currently working on a Drools project using eclipse kepler and the > drools plug-in from drools 601. > > > > I have a main java class that contains POJO classes representing facts and > the initialization of the kie container and session. When executing the > command System.*out* > .println(kContainer.verify().getMessages().toString()); I get the > following messages:(note the warning ?No files found for KieBase > InfectionRules, searching folder??) > > > > [main] INFO org.drools.compiler.kie.builder.impl.ClasspathKieProject - > Found kmodule: > file:/C:/TFM/Infections/Workspace/InfectionRules/VAP/target/META-INF/kmodule.xml > > > > [main] INFO org.drools.compiler.kie.builder.impl.KieRepositoryImpl - > KieModule was added:FileKieModule[ > ReleaseId=${project.groupId}:${project.artifactId}:${project.version}file=\TFM\Infections\Workspace\InfectionRules\VAP\target] > > > > [main] INFO org.drools.compiler.kie.builder.impl.ClasspathKieProject - > Found kmodule: > file:/C:/TFM/Infections/Workspace/InfectionRules/VAP/target/META-INF/kmodule.xml > > > > [main] INFO org.drools.compiler.kie.builder.impl.KieRepositoryImpl - > KieModule was added:FileKieModule[ > ReleaseId=${project.groupId}:${project.artifactId}:${project.version}file=\TFM\Infections\Workspace\InfectionRules\VAP\target] > > > > [main] WARN org.drools.compiler.kie.builder.impl.AbstractKieModule - *No > files found for KieBase InfectionRules, searching folder > \TFM\Infections\Workspace\InfectionRules\VAP\target* > > [] > > *java.lang.NullPointerException* > > at InfectionRules.VAPDroolsTest.main(*VAPDroolsTest.java:62*) > > > > The kie initialization module has the following code: > > > > *package* InfectionRules; > > > > *import* java.util.*; > > *import* java.util.concurrent.TimeUnit; > > *import* java.text.DateFormat; > > *import* java.text.SimpleDateFormat; > > > > *import* org.drools.core.time.*; > > *import* *org.kie.internal*.*; > > > > > > *import* org.kie.api.conf.EventProcessingOption; > > *import* *org.kie.api.runtime.KieRuntime*; > > *import* org.kie.api.KieBaseConfiguration; > > *import* org.kie.api.KieServices; > > *import* org.kie.api.runtime.KieContainer; > > *import* org.kie.api.runtime.KieSession; > > *import* org.kie.api.runtime.KieSessionConfiguration; > > *import* org.kie.api.runtime.conf.ClockTypeOption; > > *import* org.kie.api.runtime.rule.EntryPoint; > > *import* org.kie.api.runtime.rule.FactHandle; > > *import* *org.kie.api.time.SessionClock*; > > > > > > *public* *static* *void* main(*final* String[] args) { > > *try* { > > > > > > // load up the knowledge base > > KieServices ks = KieServices.Factory.*get*(); > > KieContainer kContainer = ks.getKieClasspathContainer(); > > System.*out* > .println(kContainer.verify().getMessages().toString()); > > KieSession kSession = kContainer.newKieSession("VAPSession"); > > > > // set clock to pseudo clock to be able to advance it > manually > > KieSessionConfiguration ksconf = KieServices.Factory.*get* > ().newKieSessionConfiguration(); > > ksconf.setOption(ClockTypeOption.*get*("pseudo")); > > > > *SessionPseudoClock* clock = kSession.getSessionClock(); > > > > // set stream mode as opposite to cloud mode > > KieBaseConfiguration config = KieServices.Factory.*get* > ().newKieBaseConfiguration(); > > config.setOption(EventProcessingOption.*STREAM* ); > > > > // Insert test patients and related classes > > // *mr* *Jones* has no VAP, so the *cpi* score is less than 6 > > *final* Patient p1 = *new* Patient( "MrJones", 45, 1, *false* > ,*false*,*true*,37.0, > > 5000,"None","No Infiltrate","None","No Growth","S.Aureus" > ,235,*true*, *false*, 0, > > *true*,*new* SimpleDateFormat("yyyy-MM-dd").parse( > "2014-05-17"),"", > > *new* SimpleDateFormat("yyyy-MM-dd").parse("2014-05-17"), > *false*,*false*,*false*,*false*); > > > > kSession.insert( p1 ); > > > > // get a reference to the entry point and insert events > > EntryPoint nursingStream = kSession.getEntryPoint( > "NursingStream" ); > > > > * final* CPIScore cpiScore1 = *new* CPIScore( p1,"initial",7); > > nursingStream.insert( cpiScore1 ); > > > > *clock.advanceTime( 75, TimeUnit.**HOURS** )*; > > *final* CPIScore cpiScore2 = *new* CPIScore( p1,"3days",7 ); > > nursingStream..insert( cpiScore2 ); > > > > I am running this class directly from the Eclipse Run menu option. I have > installed maven but I?m not using it (yet) > > > > The kmodule.xml file has the following format: > > > > > > "* > > xmlns=*"http://jboss.org/kie/6.0.0/kmodule > "*> > > packages=*"InfectionRules"*> > > *"pseudo"* /> > > > > > > > > (I have tried to change the packages field of kmodule to *, but it does > not work either.) > > > > And the directory structure where both the java and drl code reside is: > > > > C:\TFM\Infections\Workspace\InfectionRules\VAP\src\main > > Subdirectory java contains the java classes and resources the drl file. > > The target directory is located under ..\VAP\target\ with the following > structure: > > > > > > From Eclipse IDE this is the project structure > > > > > > Any idea as to what I?m doing wrong? I don?t know why the kmodule does not > locate the kbase in the directory *\TFM\Infections\Workspace\InfectionRules\VAP\target > *as this directory contains the drl file vap.drl in the rules > subdirectory. Although I get later a null pointer exception, I guess that > it has to do with this warning, as if there is no kbase located no session > can be used. > > > > Thanks in advance! > > > > Best regards > > Natalia > > > > > > > > > ------------------------------ > > > Este mensaje no contiene virus ni malware porque la protecci?n de avast! > Antivirus est? activa. > > > _______________________________________________ > rules-users mailing list > rules-users at lists.jboss.org > https://lists.jboss.org/mailman/listinfo/rules-users > -- - MyJourney @ http://salaboy.com - Co-Founder @ http://www.jugargentina.org - Co-Founder @ http://www.jbug.com.ar - Salatino "Salaboy" Mauricio - -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.jboss.org/pipermail/rules-users/attachments/20140525/6f8b6b38/attachment-0001.html -------------- next part -------------- A non-text attachment was scrubbed... Name: image002.png Type: image/png Size: 1833 bytes Desc: not available Url : http://lists.jboss.org/pipermail/rules-users/attachments/20140525/6f8b6b38/attachment-0002.png -------------- next part -------------- A non-text attachment was scrubbed... Name: image001.png Type: image/png Size: 10458 bytes Desc: not available Url : http://lists.jboss.org/pipermail/rules-users/attachments/20140525/6f8b6b38/attachment-0003.png From srivastavamohit91 at gmail.com Sun May 25 10:29:47 2014 From: srivastavamohit91 at gmail.com (Mohit Srivastava) Date: Sun, 25 May 2014 19:59:47 +0530 Subject: [rules-users] Drools 601 kmodule problem when running the drools project in eclipse kepler ide In-Reply-To: References: <5381f911.8839e00a.6809.ffffc2eeSMTPIN_ADDED_BROKEN@mx.google.com> Message-ID: Also make sure you update the package in kmodule.xml for a kbase On Sun, May 25, 2014 at 7:48 PM, Mauricio Salatino wrote: > Try creating a directory called: *InfectionRules inside the > src/main/resources/* > *and then put the rules inside there.* > > > On Sun, May 25, 2014 at 3:04 PM, Natalia Iglesias de Amunategui < > natalia.iglesias at casadearriba.net> wrote: > >> Hello, >> >> >> >> I am currently working on a Drools project using eclipse kepler and the >> drools plug-in from drools 601. >> >> >> >> I have a main java class that contains POJO classes representing facts >> and the initialization of the kie container and session. When executing the >> command System.*out* >> .println(kContainer.verify().getMessages().toString()); I get the >> following messages:(note the warning ?No files found for KieBase >> InfectionRules, searching folder??) >> >> >> >> [main] INFO org.drools.compiler.kie.builder.impl.ClasspathKieProject - >> Found kmodule: >> file:/C:/TFM/Infections/Workspace/InfectionRules/VAP/target/META-INF/kmodule.xml >> >> >> >> [main] INFO org.drools.compiler.kie.builder.impl.KieRepositoryImpl - >> KieModule was added:FileKieModule[ >> ReleaseId=${project.groupId}:${project.artifactId}:${project.version}file=\TFM\Infections\Workspace\InfectionRules\VAP\target] >> >> >> >> [main] INFO org.drools.compiler.kie.builder.impl.ClasspathKieProject - >> Found kmodule: >> file:/C:/TFM/Infections/Workspace/InfectionRules/VAP/target/META-INF/kmodule.xml >> >> >> >> [main] INFO org.drools.compiler.kie.builder.impl.KieRepositoryImpl - >> KieModule was added:FileKieModule[ >> ReleaseId=${project.groupId}:${project.artifactId}:${project.version}file=\TFM\Infections\Workspace\InfectionRules\VAP\target] >> >> >> >> [main] WARN org.drools.compiler.kie.builder.impl.AbstractKieModule - *No >> files found for KieBase InfectionRules, searching folder >> \TFM\Infections\Workspace\InfectionRules\VAP\target* >> >> [] >> >> *java.lang.NullPointerException* >> >> at InfectionRules.VAPDroolsTest.main(*VAPDroolsTest.java:62*) >> >> >> >> The kie initialization module has the following code: >> >> >> >> *package* InfectionRules; >> >> >> >> *import* java.util.*; >> >> *import* java.util.concurrent.TimeUnit; >> >> *import* java.text.DateFormat; >> >> *import* java.text.SimpleDateFormat; >> >> >> >> *import* org.drools.core.time.*; >> >> *import* *org.kie.internal*.*; >> >> >> >> >> >> *import* org.kie.api.conf.EventProcessingOption; >> >> *import* *org.kie.api.runtime.KieRuntime*; >> >> *import* org.kie.api.KieBaseConfiguration; >> >> *import* org.kie.api.KieServices; >> >> *import* org.kie.api.runtime.KieContainer; >> >> *import* org.kie.api.runtime.KieSession; >> >> *import* org.kie.api.runtime.KieSessionConfiguration; >> >> *import* org.kie.api.runtime.conf.ClockTypeOption; >> >> *import* org.kie.api.runtime.rule.EntryPoint; >> >> *import* org.kie.api.runtime.rule.FactHandle; >> >> *import* *org.kie.api.time.SessionClock*; >> >> >> >> >> >> *public* *static* *void* main(*final* String[] args) { >> >> *try* { >> >> >> >> >> >> // load up the knowledge base >> >> KieServices ks = KieServices.Factory.*get*(); >> >> KieContainer kContainer = ks.getKieClasspathContainer(); >> >> System.*out* >> .println(kContainer.verify().getMessages().toString()); >> >> KieSession kSession = kContainer.newKieSession("VAPSession" >> ); >> >> >> >> // set clock to pseudo clock to be able to advance it >> manually >> >> KieSessionConfiguration ksconf = KieServices.Factory.*get* >> ().newKieSessionConfiguration(); >> >> ksconf.setOption(ClockTypeOption.*get*("pseudo")); >> >> >> >> *SessionPseudoClock* clock = kSession.getSessionClock(); >> >> >> >> // set stream mode as opposite to cloud mode >> >> KieBaseConfiguration config = KieServices.Factory.*get* >> ().newKieBaseConfiguration(); >> >> config.setOption(EventProcessingOption.*STREAM* ); >> >> >> >> // Insert test patients and related classes >> >> // *mr* *Jones* has no VAP, so the *cpi* score is less than >> 6 >> >> *final* Patient p1 = *new* Patient( "MrJones", 45, 1, >> *false*,*false*,*true*,37.0, >> >> 5000,"None","No Infiltrate","None","No Growth","S.Aureus" >> ,235,*true*, *false*, 0, >> >> *true*,*new* SimpleDateFormat("yyyy-MM-dd").parse( >> "2014-05-17"),"", >> >> *new* SimpleDateFormat("yyyy-MM-dd").parse("2014-05-17"), >> *false*,*false*,*false*,*false*); >> >> >> >> kSession.insert( p1 ); >> >> >> >> // get a reference to the entry point and insert events >> >> EntryPoint nursingStream = kSession.getEntryPoint( >> "NursingStream" ); >> >> >> >> * final* CPIScore cpiScore1 = *new* CPIScore( p1,"initial" >> ,7); >> >> nursingStream.insert( cpiScore1 ); >> >> >> >> *clock.advanceTime( 75, TimeUnit.**HOURS** )*; >> >> *final* CPIScore cpiScore2 = *new* CPIScore( p1,"3days",7 ); >> >> nursingStream..insert( cpiScore2 ); >> >> >> >> I am running this class directly from the Eclipse Run menu option. I have >> installed maven but I?m not using it (yet) >> >> >> >> The kmodule.xml file has the following format: >> >> >> >> >> >> > "* >> >> xmlns=*"http://jboss.org/kie/6.0.0/kmodule >> "*> >> >> > packages=*"InfectionRules"*> >> >> > *"pseudo"* /> >> >> >> >> >> >> >> >> (I have tried to change the packages field of kmodule to *, but it does >> not work either.) >> >> >> >> And the directory structure where both the java and drl code reside is: >> >> >> >> C:\TFM\Infections\Workspace\InfectionRules\VAP\src\main >> >> Subdirectory java contains the java classes and resources the drl file. >> >> The target directory is located under ..\VAP\target\ with the following >> structure: >> >> >> >> >> >> From Eclipse IDE this is the project structure >> >> >> >> >> >> Any idea as to what I?m doing wrong? I don?t know why the kmodule does >> not locate the kbase in the directory *\TFM\Infections\Workspace\InfectionRules\VAP\target >> *as this directory contains the drl file vap.drl in the rules >> subdirectory. Although I get later a null pointer exception, I guess that >> it has to do with this warning, as if there is no kbase located no session >> can be used. >> >> >> >> Thanks in advance! >> >> >> >> Best regards >> >> Natalia >> >> >> >> >> >> >> >> >> ------------------------------ >> >> >> Este mensaje no contiene virus ni malware porque la protecci?n de avast! >> Antivirus est? activa. >> >> >> _______________________________________________ >> rules-users mailing list >> rules-users at lists.jboss.org >> https://lists.jboss.org/mailman/listinfo/rules-users >> > > > > -- > - MyJourney @ http://salaboy.com > - Co-Founder @ http://www.jugargentina.org > - Co-Founder @ http://www.jbug.com.ar > > - Salatino "Salaboy" Mauricio - > > _______________________________________________ > rules-users mailing list > rules-users at lists.jboss.org > https://lists.jboss.org/mailman/listinfo/rules-users > -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.jboss.org/pipermail/rules-users/attachments/20140525/0dff844e/attachment-0001.html -------------- next part -------------- A non-text attachment was scrubbed... Name: image001.png Type: image/png Size: 10458 bytes Desc: not available Url : http://lists.jboss.org/pipermail/rules-users/attachments/20140525/0dff844e/attachment-0002.png -------------- next part -------------- A non-text attachment was scrubbed... Name: image002.png Type: image/png Size: 1833 bytes Desc: not available Url : http://lists.jboss.org/pipermail/rules-users/attachments/20140525/0dff844e/attachment-0003.png From natalia.iglesias at casadearriba.net Sun May 25 10:29:23 2014 From: natalia.iglesias at casadearriba.net (Natalia Iglesias de Amunategui) Date: Sun, 25 May 2014 16:29:23 +0200 Subject: [rules-users] Drools 601 kmodule problem when running the drools project in eclipse kepler ide In-Reply-To: References: <5381f911.8839e00a.6809.ffffc2eeSMTPIN_ADDED_BROKEN@mx.google.com> Message-ID: <00b801cf7825$ba10cce0$2e3266a0$@iglesias@casadearriba.net> Hello, I had already tried something like that by changing the packages field in the kmodule file into packages=?rules? as this is the directory where the VAP.drl file resides. But I still get a null pointer exception when executing the container verify, although I do not see a warning anymore: The error comes from the line 36 (container verify): System.out.println(kContainer.verify().getMessages().toString()); I am running out of ideas, I also thought that it maybe has something to do with maven as I have read that drools 601 expects a maven structure, so I definitely needs a pom.properties. I have a pom.properties but is has no content, only this: version=${project.version} groupId=${project.groupId} artifactId=${project.artifactId} Thanks! De: rules-users-bounces at lists.jboss.org [mailto:rules-users-bounces at lists.jboss.org] En nombre de Mauricio Salatino Enviado el: domingo, 25 de mayo de 2014 16:18 Para: Rules Users List Asunto: Re: [rules-users] Drools 601 kmodule problem when running the drools project in eclipse kepler ide Try creating a directory called: InfectionRules inside the src/main/resources/ and then put the rules inside there. On Sun, May 25, 2014 at 3:04 PM, Natalia Iglesias de Amunategui wrote: Hello, I am currently working on a Drools project using eclipse kepler and the drools plug-in from drools 601. I have a main java class that contains POJO classes representing facts and the initialization of the kie container and session. When executing the command System.out.println(kContainer.verify().getMessages().toString()); I get the following messages:(note the warning ?No files found for KieBase InfectionRules, searching folder ?) [main] INFO org.drools.compiler.kie.builder.impl.ClasspathKieProject - Found kmodule: file:/C:/TFM/Infections/Workspace/InfectionRules/VAP/target/META-INF/kmodule ..xml [main] INFO org.drools.compiler.kie.builder.impl.KieRepositoryImpl - KieModule was added:FileKieModule[ ReleaseId=${project.groupId}:${project.artifactId}:${project.version}file=\T FM\Infections\Workspace\InfectionRules\VAP\target] [main] INFO org.drools.compiler.kie.builder.impl.ClasspathKieProject - Found kmodule: file:/C:/TFM/Infections/Workspace/InfectionRules/VAP/target/META-INF/kmodule ..xml [main] INFO org.drools.compiler.kie.builder.impl.KieRepositoryImpl - KieModule was added:FileKieModule[ ReleaseId=${project.groupId}:${project.artifactId}:${project.version}file=\T FM\Infections\Workspace\InfectionRules\VAP\target] [main] WARN org.drools.compiler.kie.builder.impl.AbstractKieModule - No files found for KieBase InfectionRules, searching folder \TFM\Infections\Workspace\InfectionRules\VAP\target [] java.lang.NullPointerException at InfectionRules.VAPDroolsTest.main(VAPDroolsTest.java:62) The kie initialization module has the following code: package InfectionRules; import java.util.*; import java.util.concurrent.TimeUnit; import java.text.DateFormat; import java.text.SimpleDateFormat; import org.drools.core.time.*; import org.kie.internal.*; import org.kie.api.conf.EventProcessingOption; import org.kie.api.runtime.KieRuntime; import org.kie.api.KieBaseConfiguration; import org.kie.api.KieServices; import org.kie.api.runtime.KieContainer; import org.kie.api.runtime.KieSession; import org.kie.api.runtime.KieSessionConfiguration; import org.kie.api.runtime.conf.ClockTypeOption; import org.kie.api.runtime.rule.EntryPoint; import org.kie.api.runtime.rule.FactHandle; import org.kie.api.time.SessionClock; public static void main(final String[] args) { try { // load up the knowledge base KieServices ks = KieServices.Factory.get(); KieContainer kContainer = ks.getKieClasspathContainer(); System.out.println(kContainer.verify().getMessages().toString()); KieSession kSession = kContainer.newKieSession("VAPSession"); // set clock to pseudo clock to be able to advance it manually KieSessionConfiguration ksconf = KieServices.Factory.get().newKieSessionConfiguration(); ksconf.setOption(ClockTypeOption.get("pseudo")); SessionPseudoClock clock = kSession.getSessionClock(); // set stream mode as opposite to cloud mode KieBaseConfiguration config = KieServices.Factory.get().newKieBaseConfiguration(); config.setOption(EventProcessingOption.STREAM ); // Insert test patients and related classes // mr Jones has no VAP, so the cpi score is less than 6 final Patient p1 = new Patient( "MrJones", 45, 1, false,false,true,37.0, 5000,"None","No Infiltrate","None","No Growth","S.Aureus",235,true, false, 0, true,new SimpleDateFormat("yyyy-MM-dd").parse("2014-05-17"),"", new SimpleDateFormat("yyyy-MM-dd").parse("2014-05-17"),false,false,false,false); kSession.insert( p1 ); // get a reference to the entry point and insert events EntryPoint nursingStream = kSession.getEntryPoint( "NursingStream" ); final CPIScore cpiScore1 = new CPIScore( p1,"initial",7); nursingStream.insert( cpiScore1 ); clock.advanceTime( 75, TimeUnit.HOURS ); final CPIScore cpiScore2 = new CPIScore( p1,"3days",7 ); nursingStream..insert( cpiScore2 ); I am running this class directly from the Eclipse Run menu option. I have installed maven but I?m not using it (yet) The kmodule.xml file has the following format: (I have tried to change the packages field of kmodule to *, but it does not work either.) And the directory structure where both the java and drl code reside is: C:\TFM\Infections\Workspace\InfectionRules\VAP\src\main Subdirectory java contains the java classes and resources the drl file. The target directory is located under ..\VAP\target\ with the following structure: >From Eclipse IDE this is the project structure Any idea as to what I?m doing wrong? I don?t know why the kmodule does not locate the kbase in the directory \TFM\Infections\Workspace\InfectionRules\VAP\target as this directory contains the drl file vap.drl in the rules subdirectory. Although I get later a null pointer exception, I guess that it has to do with this warning, as if there is no kbase located no session can be used. Thanks in advance! Best regards Natalia _____ Este mensaje no contiene virus ni malware porque la protecci?n de avast! Antivirus est? activa. _______________________________________________ rules-users mailing list rules-users at lists.jboss.org https://lists.jboss.org/mailman/listinfo/rules-users -- - MyJourney @ http://salaboy.com - Co-Founder @ http://www.jugargentina.org - Co-Founder @ http://www.jbug.com.ar - Salatino "Salaboy" Mauricio - --- Este mensaje no contiene virus ni malware porque la protecci?n de avast! Antivirus est? activa. http://www.avast.com -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.jboss.org/pipermail/rules-users/attachments/20140525/46b4c8ab/attachment-0001.html -------------- next part -------------- A non-text attachment was scrubbed... Name: not available Type: image/jpeg Size: 56322 bytes Desc: not available Url : http://lists.jboss.org/pipermail/rules-users/attachments/20140525/46b4c8ab/attachment-0001.jpe -------------- next part -------------- A non-text attachment was scrubbed... Name: not available Type: image/png Size: 1833 bytes Desc: not available Url : http://lists.jboss.org/pipermail/rules-users/attachments/20140525/46b4c8ab/attachment-0002.png -------------- next part -------------- A non-text attachment was scrubbed... Name: not available Type: image/png Size: 10458 bytes Desc: not available Url : http://lists.jboss.org/pipermail/rules-users/attachments/20140525/46b4c8ab/attachment-0003.png From salaboy at gmail.com Sun May 25 10:40:10 2014 From: salaboy at gmail.com (Mauricio Salatino) Date: Sun, 25 May 2014 15:40:10 +0100 Subject: [rules-users] Drools 601 kmodule problem when running the drools project in eclipse kepler ide In-Reply-To: <5381fea0.94108c0a.2ff4.5da2SMTPIN_ADDED_BROKEN@mx.google.com> References: <5381f911.8839e00a.6809.ffffc2eeSMTPIN_ADDED_BROKEN@mx.google.com> <5381fea0.94108c0a.2ff4.5da2SMTPIN_ADDED_BROKEN@mx.google.com> Message-ID: Check the example here: https://github.com/droolsjbpm/drools/tree/master/drools-examples-cdi/cdi-example Follow that structure On Sun, May 25, 2014 at 3:29 PM, Natalia Iglesias de Amunategui < natalia.iglesias at casadearriba.net> wrote: > Hello, > > I had already tried something like that by changing the packages field > in the kmodule file into *packages=?rules?* as this is the directory > where the VAP.drl file resides. But I still get a *null pointer exception*when executing the *container > verify*, although I do not see a warning anymore: > > > > > > The error comes from the line 36 (container verify): > > > > System.*out*.println(kContainer.verify().getMessages().toString()); > > > > > > I am running out of ideas, I also thought that it maybe has something to > do with maven as I have read that drools 601 expects a maven structure, so > I definitely needs a pom.properties. I have a pom.properties but is has no > content, only this: > > > > version=${project.version} > > groupId=${project.groupId} > > artifactId=${project.artifactId} > > > > Thanks! > > > > *De:* rules-users-bounces at lists.jboss.org [mailto: > rules-users-bounces at lists.jboss.org] *En nombre de *Mauricio Salatino > *Enviado el:* domingo, 25 de mayo de 2014 16:18 > *Para:* Rules Users List > *Asunto:* Re: [rules-users] Drools 601 kmodule problem when running the > drools project in eclipse kepler ide > > > > Try creating a directory called: *InfectionRules inside the > src/main/resources/* > > *and then put the rules inside there.* > > > > On Sun, May 25, 2014 at 3:04 PM, Natalia Iglesias de Amunategui < > natalia.iglesias at casadearriba.net> wrote: > > Hello, > > > > I am currently working on a Drools project using eclipse kepler and the > drools plug-in from drools 601. > > > > I have a main java class that contains POJO classes representing facts and > the initialization of the kie container and session. When executing the > command System.*out* > .println(kContainer.verify().getMessages().toString()); I get the > following messages:(note the warning ?No files found for KieBase > InfectionRules, searching folder??) > > > > [main] INFO org.drools.compiler.kie.builder.impl.ClasspathKieProject - > Found kmodule: > file:/C:/TFM/Infections/Workspace/InfectionRules/VAP/target/META-INF/kmodule.xml > > > > [main] INFO org.drools.compiler.kie.builder.impl.KieRepositoryImpl - > KieModule was added:FileKieModule[ > ReleaseId=${project.groupId}:${project.artifactId}:${project.version}file=\TFM\Infections\Workspace\InfectionRules\VAP\target] > > > > [main] INFO org.drools.compiler.kie.builder.impl.ClasspathKieProject - > Found kmodule: > file:/C:/TFM/Infections/Workspace/InfectionRules/VAP/target/META-INF/kmodule.xml > > > > [main] INFO org.drools.compiler.kie.builder.impl.KieRepositoryImpl - > KieModule was added:FileKieModule[ > ReleaseId=${project.groupId}:${project.artifactId}:${project.version}file=\TFM\Infections\Workspace\InfectionRules\VAP\target] > > > > [main] WARN org.drools.compiler.kie.builder.impl.AbstractKieModule - *No > files found for KieBase InfectionRules, searching folder > \TFM\Infections\Workspace\InfectionRules\VAP\target* > > [] > > *java.lang.NullPointerException* > > at InfectionRules.VAPDroolsTest.main(*VAPDroolsTest.java:62*) > > > > The kie initialization module has the following code: > > > > *package* InfectionRules; > > > > *import* java.util.*; > > *import* java.util.concurrent.TimeUnit; > > *import* java.text.DateFormat; > > *import* java.text.SimpleDateFormat; > > > > *import* org.drools.core.time.*; > > *import* *org.kie.internal*.*; > > > > > > *import* org.kie.api.conf.EventProcessingOption; > > *import* *org.kie.api.runtime.KieRuntime*; > > *import* org.kie.api.KieBaseConfiguration; > > *import* org.kie.api.KieServices; > > *import* org.kie.api.runtime.KieContainer; > > *import* org.kie.api.runtime.KieSession; > > *import* org.kie.api.runtime.KieSessionConfiguration; > > *import* org.kie.api.runtime.conf.ClockTypeOption; > > *import* org.kie.api.runtime.rule.EntryPoint; > > *import* org.kie.api.runtime.rule.FactHandle; > > *import* *org.kie.api.time.SessionClock*; > > > > > > *public* *static* *void* main(*final* String[] args) { > > *try* { > > > > > > // load up the knowledge base > > KieServices ks = KieServices.Factory.*get*(); > > KieContainer kContainer = ks.getKieClasspathContainer(); > > System.*out* > .println(kContainer.verify().getMessages().toString()); > > KieSession kSession = kContainer.newKieSession("VAPSession"); > > > > // set clock to pseudo clock to be able to advance it > manually > > KieSessionConfiguration ksconf = KieServices.Factory.*get* > ().newKieSessionConfiguration(); > > ksconf.setOption(ClockTypeOption.*get*("pseudo")); > > > > *SessionPseudoClock* clock = kSession.getSessionClock(); > > > > // set stream mode as opposite to cloud mode > > KieBaseConfiguration config = KieServices.Factory.*get* > ().newKieBaseConfiguration(); > > config.setOption(EventProcessingOption.*STREAM* ); > > > > // Insert test patients and related classes > > // *mr* *Jones* has no VAP, so the *cpi* score is less than 6 > > *final* Patient p1 = *new* Patient( "MrJones", 45, 1, *false* > ,*false*,*true*,37.0, > > 5000,"None","No Infiltrate","None","No Growth","S.Aureus" > ,235,*true*, *false*, 0, > > *true*,*new* SimpleDateFormat("yyyy-MM-dd").parse( > "2014-05-17"),"", > > *new* SimpleDateFormat("yyyy-MM-dd").parse("2014-05-17"), > *false*,*false*,*false*,*false*); > > > > kSession.insert( p1 ); > > > > // get a reference to the entry point and insert events > > EntryPoint nursingStream = kSession.getEntryPoint( > "NursingStream" ); > > > > * final* CPIScore cpiScore1 = *new* CPIScore( p1,"initial",7); > > nursingStream.insert( cpiScore1 ); > > > > *clock..advanceTime( 75, TimeUnit.**HOURS** )*; > > *final* CPIScore cpiScore2 = *new* CPIScore( p1,"3days",7 ); > > nursingStream...insert( cpiScore2 ); > > > > I am running this class directly from the Eclipse Run menu option. I have > installed maven but I?m not using it (yet) > > > > The kmodule.xml file has the following format: > > > > > > "* > > xmlns=*"http://jboss.org/kie/6.0.0/kmodule > "*> > > packages=*"InfectionRules"*> > > *"pseudo"* /> > > > > > > > > (I have tried to change the packages field of kmodule to *, but it does > not work either.) > > > > And the directory structure where both the java and drl code reside is: > > > > C:\TFM\Infections\Workspace\InfectionRules\VAP\src\main > > Subdirectory java contains the java classes and resources the drl file. > > The target directory is located under ..\VAP\target\ with the following > structure: > > > > > > From Eclipse IDE this is the project structure > > > > > > Any idea as to what I?m doing wrong? I don?t know why the kmodule does not > locate the kbase in the directory *\TFM\Infections\Workspace\InfectionRules\VAP\target > *as this directory contains the drl file vap.drl in the rules > subdirectory. Although I get later a null pointer exception, I guess that > it has to do with this warning, as if there is no kbase located no session > can be used. > > > > Thanks in advance! > > > > Best regards > > Natalia > > > > > > > > > ------------------------------ > > > > Este mensaje no contiene virus ni malware porque la protecci?n de avast! > Antivirus est? activa. > > > > > _______________________________________________ > rules-users mailing list > rules-users at lists.jboss.org > https://lists.jboss.org/mailman/listinfo/rules-users > > > > > > -- > > - MyJourney @ http://salaboy.com > > - Co-Founder @ http://www.jugargentina.org > - Co-Founder @ http://www.jbug.com.ar > > - Salatino "Salaboy" Mauricio - > > > ------------------------------ > > > Este mensaje no contiene virus ni malware porque la protecci?n de avast! > Antivirus est? activa. > > > _______________________________________________ > rules-users mailing list > rules-users at lists.jboss.org > https://lists.jboss.org/mailman/listinfo/rules-users > -- - MyJourney @ http://salaboy.com - Co-Founder @ http://www.jugargentina.org - Co-Founder @ http://www.jbug.com.ar - Salatino "Salaboy" Mauricio - -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.jboss.org/pipermail/rules-users/attachments/20140525/249c8601/attachment-0001.html -------------- next part -------------- A non-text attachment was scrubbed... Name: image005.png Type: image/png Size: 10458 bytes Desc: not available Url : http://lists.jboss.org/pipermail/rules-users/attachments/20140525/249c8601/attachment-0002.png -------------- next part -------------- A non-text attachment was scrubbed... Name: image003.jpg Type: image/jpeg Size: 56322 bytes Desc: not available Url : http://lists.jboss.org/pipermail/rules-users/attachments/20140525/249c8601/attachment-0001.jpg -------------- next part -------------- A non-text attachment was scrubbed... Name: image004.png Type: image/png Size: 1833 bytes Desc: not available Url : http://lists.jboss.org/pipermail/rules-users/attachments/20140525/249c8601/attachment-0003.png From sunnycal99 at gmail.com Mon May 26 04:03:12 2014 From: sunnycal99 at gmail.com (Chris B) Date: Mon, 26 May 2014 01:03:12 -0700 (PDT) Subject: [rules-users] Nested Collect probably Message-ID: <1401091392897-4029681.post@n3.nabble.com> I have a class Employee (name) Certificates (course, year, employee) If the employees have CCNA & CCNP from the ?same? year and then if they took ?CCIE or J5SE in 2000? or ?J4WS in 2001 or 2002, or 2003? The Action should be taken if there are more than 5 such employees. The connection between Employee and Certificates is through Certificates.employee, but I can change it to a list of certificates in Employee also if needed. I start with $e: Employee() Certificate (employee == $e, course == ?CCNA?, $ccnaYear : year) Certificate (employee == $e, course == ?CCNP?, $ccnpYear : year) //this will get the years for one employee.. //now we need to get all other employees from same year.. //but we still need to make sure all certificates are from the same employee. ArrayList( size >= 2 ) from collect(Certificate ( ((course == ?CCNA?, year == $ccnaYear, $e_this:employee) && (course == ?CCNP?, year == $ccnpYear, employee == $e_this)) && ( ((course == ?CCIE?, year == 2000, employee == $e_this) || (course == J5SE?, year == 2000, employee == $e_this)) || ((course == ?J4WS?, year == 2001, employee == $e_this) || (course == ?J4WS?, year == 2002, employee == $e_this) || (course == ?J4WS?, year == 2003, employee == $e_this)) ) ) This is going crazy at this stage. First problem, - I start with one employee, and try to get his years of CCNA and CCNP Next I am collecting Certificates instead of Employees which I should be collecting and checking the length of the employees. I think something like this will help me http://blog.athico.com/2007/06/chained-from-accumulate-collect.html But I am unable to convert it into my usecase. Please help. Thanks -- View this message in context: http://drools.46999.n3.nabble.com/Nested-Collect-probably-tp4029681.html Sent from the Drools: User forum mailing list archive at Nabble.com. From ganeshneelekani at gmail.com Mon May 26 05:01:08 2014 From: ganeshneelekani at gmail.com (ganeshneelekani) Date: Mon, 26 May 2014 02:01:08 -0700 (PDT) Subject: [rules-users] "Cannot find KieModule" with kieServices.newKieContainer() with LATEST or RELEASE instead of explicit version number (eg: 0.0.1) In-Reply-To: References: Message-ID: <1401094868343-4029682.post@n3.nabble.com> Hi tari, Did this issue get solved. i am facing the same issue with drools and maven, Let me know your suggestions. Thanks, Ganesh Neelelkani -- View this message in context: http://drools.46999.n3.nabble.com/rules-users-Cannot-find-KieModule-with-kieServices-newKieContainer-with-LATEST-or-RELEASE-instead-of-tp4027941p4029682.html Sent from the Drools: User forum mailing list archive at Nabble.com. From wolfgang.laun at gmail.com Mon May 26 05:07:35 2014 From: wolfgang.laun at gmail.com (Wolfgang Laun) Date: Mon, 26 May 2014 11:07:35 +0200 Subject: [rules-users] Nested Collect probably In-Reply-To: <1401091392897-4029681.post@n3.nabble.com> References: <1401091392897-4029681.post@n3.nabble.com> Message-ID: Due to imprecise wording, this may or may not be what you want. The rule fires, if there are 5 or more Employees, each of them with the property that - the employee has visited CCNA in year X - the employee has visited CCNP in year X - the employee has visited CCIE or J5SE in 2000 OR has visited J4WS in 2001 or 2002 or 2003 (OR both) (There is no relation between the years X of different employees.) rule findCombi when accumulate( Certificate( course == "CCNA", $e: employee, $y: year ) and Certificate( course == "CCNP", employee == $e, year == $y ) and Certificate( employee == $e, ((course == "CCIE" || == "J5SE" ) && year == 2000 ) || course == "J4WS" && year == 2001 || == 2002 || == 2003 ); $es: collectSet( $e ); $es.size() >= 5 ) then System.out.println( "more than 5" ); end On 26/05/2014, Chris B wrote: > I have a class > > Employee > (name) > > Certificates > (course, year, employee) > > If the employees have CCNA & CCNP from the "same" year and then if they took > "CCIE or J5SE in 2000" or "J4WS in 2001 or 2002, or 2003" > The Action should be taken if there are more than 5 such employees. > > The connection between Employee and Certificates is through > Certificates.employee, but I can change it to a list of certificates in > Employee also if needed. > > I start with > $e: Employee() > Certificate (employee == $e, course == "CCNA", $ccnaYear : year) > Certificate (employee == $e, course == "CCNP", $ccnpYear : year) > //this will get the years for one employee.. > //now we need to get all other employees from same year.. > //but we still need to make sure all certificates are from the same > employee. > ArrayList( size >= 2 ) from collect(Certificate ( > ((course == "CCNA", year == $ccnaYear, $e_this:employee) && (course == > "CCNP", year == $ccnpYear, employee == $e_this)) > && > ( > ((course == "CCIE", year == 2000, employee == $e_this) || (course == J5SE", > year == 2000, employee == $e_this)) > || > ((course == "J4WS", year == 2001, employee == $e_this) || (course == "J4WS", > year == 2002, employee == $e_this) || (course == "J4WS", year == 2003, > employee == $e_this)) > ) > ) > > This is going crazy at this stage. > First problem, - I start with one employee, and try to get his years of CCNA > and CCNP > Next I am collecting Certificates instead of Employees which I should be > collecting and checking the length of the employees. > > I think something like this will help me > http://blog.athico.com/2007/06/chained-from-accumulate-collect.html > But I am unable to convert it into my usecase. > > Please help. > Thanks > > > > > -- > View this message in context: > http://drools.46999.n3.nabble.com/Nested-Collect-probably-tp4029681.html > Sent from the Drools: User forum mailing list archive at Nabble.com. > > _______________________________________________ > rules-users mailing list > rules-users at lists.jboss.org > https://lists.jboss.org/mailman/listinfo/rules-users From h.peter at mailbox.hu Mon May 26 06:10:05 2014 From: h.peter at mailbox.hu (=?UTF-8?B?UMOpdGVyIEdlcmdlbHksIEhvcnbDoXRo?=) Date: Mon, 26 May 2014 12:10:05 +0200 Subject: [rules-users] Abstraction between rules and data model? Message-ID: Hi All, We are evaluating Drools 6 for our use case, and face challenges where we would need some ideas from more experienced users of Drools. We have an application with a massive code base and a large number of model (entity) classes. We are in the process of moving away from inherited legacy technologies and refactoring the old code base. As a part of this work we would like extract some of the hard-coded business logic to external rules, that is why we are looking at Drools as a potential solution. What we would like to have is some kind of abstraction or mapping between actual entities and rules the business users can define so that they do not have to know the _exact_ details of the data model (field names, precise relations etc). This would be important for us so that we can refactor the old model classes without affecting business rules; also it would make life easier for the business users. While IDE support might make refactoring easier, we definitely want to have a separation between rules and entities. Given our situation, writing and maintaining "stable" wrapper/adapter classes for the sole purpose of rule processing is out of question. I have checked the documentation of Drools DSL support and for me it seems to be overkill for our use case: we do not really need a custom language, but simply an abstraction between rules and the data model classes. What I could imagine is a piece of code, (a custom property resolver? - no sure how it is called) which maps property expressions to actual properties based on a custom annotation on the entity class or something like that, so that a rule containing "Foo.bars" expression does not have to change even if we decide to rename "Foo.bars" to "Foo.barList" in the model classes. (This was just a simple example of a potential use cases) Could you please share your thoughts on this topic and point me into the right direction? Thanks, Peter -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.jboss.org/pipermail/rules-users/attachments/20140526/0411a5bc/attachment.html From drpatrick.cosmo at gmail.com Mon May 26 07:00:22 2014 From: drpatrick.cosmo at gmail.com (crosbis2) Date: Mon, 26 May 2014 04:00:22 -0700 (PDT) Subject: [rules-users] Excel Syntax in Decision Tables In-Reply-To: References: <1399894022361-4029520.post@n3.nabble.com> <1399904433528-4029529.post@n3.nabble.com> <1399910129756-4029532.post@n3.nabble.com> <1399910293479-4029533.post@n3.nabble.com> <1399998865087-4029558.post@n3.nabble.com> Message-ID: <1401102022229-4029686.post@n3.nabble.com> Hi, I'm sorry to disturb the forum with this one. I want to replicate this code in a decision table. There is a parse exception when i try to convert a table due to the code fatca : FATCA() i.e. There is Fatca [Fatca] even though the rule validates ok. I know it is a pattern with no condition attached. so i tried putting it with the actual condition and also making it standalone with condition null. neither will convert to a decision table even though the syntax looks correct from the view source? Anyone any ideas on what i need to do for this problem? -- View this message in context: http://drools.46999.n3.nabble.com/Excel-Syntax-in-Decision-Tables-tp4029520p4029686.html Sent from the Drools: User forum mailing list archive at Nabble.com. From wolfgang.laun at gmail.com Mon May 26 07:47:24 2014 From: wolfgang.laun at gmail.com (Wolfgang Laun) Date: Mon, 26 May 2014 13:47:24 +0200 Subject: [rules-users] Excel Syntax in Decision Tables In-Reply-To: <1401102022229-4029686.post@n3.nabble.com> References: <1399894022361-4029520.post@n3.nabble.com> <1399904433528-4029529.post@n3.nabble.com> <1399910129756-4029532.post@n3.nabble.com> <1399910293479-4029533.post@n3.nabble.com> <1399998865087-4029558.post@n3.nabble.com> <1401102022229-4029686.post@n3.nabble.com> Message-ID: As the documentation tries to explain, there are four rows in the heading of acondition column. 1 The first contains CONDITION (or condition). 2 The second defines the class for a Pattern. 3 The third one contains a constraint. 4 The fourth is for a comment. So, use fatca: FATCA(); Classification() for the second one and type == $param for the fourth one. -W On 26/05/2014, crosbis2 wrote: > Hi, > > I'm sorry to disturb the forum with this one. > > > > I want to replicate this code in a decision table. There is a parse > exception when i try to convert a table due to the code fatca : FATCA() > i.e. There is Fatca [Fatca] even though the rule validates ok. > > I know it is a pattern with no condition attached. so i tried putting it > with the actual condition and also making it standalone with condition > null. > neither will convert to a decision table even though the syntax looks > correct from the view source? > > > > > Anyone any ideas on what i need to do for this problem? > > > > -- > View this message in context: > http://drools.46999.n3.nabble.com/Excel-Syntax-in-Decision-Tables-tp4029520p4029686.html > Sent from the Drools: User forum mailing list archive at Nabble.com. > _______________________________________________ > rules-users mailing list > rules-users at lists.jboss.org > https://lists.jboss.org/mailman/listinfo/rules-users > From wolfgang.laun at gmail.com Mon May 26 07:57:48 2014 From: wolfgang.laun at gmail.com (Wolfgang Laun) Date: Mon, 26 May 2014 13:57:48 +0200 Subject: [rules-users] Abstraction between rules and data model? In-Reply-To: References: Message-ID: What you describe can be done with /bin/sed. Notice that the DSL processor doesn't require you to translate entire patterns; there is a mechanism for translating "keywords", which is just arbitrary tokens to whatever replacement text. If a "bar" must be translated to a "barList" in the context of a class "Foo" but not in any other context, a more sophisticated translation is required in any case (with /bin/sed still being sufficient if patterns aren't split across lines). Some say that good design makes use of Interfaces, which leaves room for actual implementations being changed as long as the interfaces are implemented. Here, note that rules can be written against interface types. -W On 26/05/2014, P?ter Gergely, Horv?th wrote: > Hi All, > > We are evaluating Drools 6 for our use case, and face challenges where we > would need some ideas from more experienced users of Drools. > > We have an application with a massive code base and a large number of model > (entity) classes. We are in the process of moving away from inherited > legacy technologies and refactoring the old code base. As a part of this > work we would like extract some of the hard-coded business logic to > external rules, that is why we are looking at Drools as a potential > solution. > > What we would like to have is some kind of abstraction or mapping between > actual entities and rules the business users can define so that they do not > have to know the _exact_ details of the data model (field names, precise > relations etc). This would be important for us so that we can refactor the > old model classes without affecting business rules; also it would make life > easier for the business users. While IDE support might make refactoring > easier, we definitely want to have a separation between rules and entities. > > Given our situation, writing and maintaining "stable" wrapper/adapter > classes for the sole purpose of rule processing is out of question. I have > checked the documentation of Drools DSL support and for me it seems to be > overkill for our use case: we do not really need a custom language, but > simply an abstraction between rules and the data model classes. > > What I could imagine is a piece of code, (a custom property resolver? - no > sure how it is called) which maps property expressions to actual properties > based on a custom annotation on the entity class or something like that, so > that a rule containing "Foo.bars" expression does not have to change even > if we decide to rename "Foo.bars" to "Foo.barList" in the model classes. > (This was just a simple example of a potential use cases) > > Could you please share your thoughts on this topic and point me into the > right direction? > > Thanks, > Peter > From h.peter at mailbox.hu Mon May 26 09:20:25 2014 From: h.peter at mailbox.hu (=?UTF-8?B?UMOpdGVyIEdlcmdlbHksIEhvcnbDoXRo?=) Date: Mon, 26 May 2014 15:20:25 +0200 Subject: [rules-users] Abstraction between rules and data model? In-Reply-To: References: Message-ID: Hi Wolfgang, Thank you for your input. You are right that some of the cases could simply be covered by regexp-replace, but I'm afraid, not all of them. Interfaces could also help, but we have a requirement that the business rules should not be tightly coupled to the underlying persistence model. (I understand that some might say this is not ideal, but that is our current situation) I am wondering whether it is possible to hook into Drools engine and intercept field value reference expression evaluations in run time (e.g if "foo.bars" is used in an expression, we could return "foo.barList") ? By injecting some custom code, we could make the necessary decisions and extract the proper value from an object. Unfortunately these parts of Drools are pretty much undocumented. Regards, Peter 2014-05-26 13:57 GMT+02:00 Wolfgang Laun : > What you describe can be done with /bin/sed. > > Notice that the DSL processor doesn't require you to translate entire > patterns; there is a mechanism for translating "keywords", which is > just arbitrary tokens to whatever replacement text. > > If a "bar" must be translated to a "barList" in the context of a class > "Foo" but not in any other context, a more sophisticated translation > is required in any case (with /bin/sed still being sufficient if > patterns aren't split across lines). > > Some say that good design makes use of Interfaces, which leaves room > for actual implementations being changed as long as the interfaces are > implemented. Here, note that rules can be written against interface > types. > > -W > > > On 26/05/2014, P?ter Gergely, Horv?th wrote: > > Hi All, > > > > We are evaluating Drools 6 for our use case, and face challenges where we > > would need some ideas from more experienced users of Drools. > > > > We have an application with a massive code base and a large number of > model > > (entity) classes. We are in the process of moving away from inherited > > legacy technologies and refactoring the old code base. As a part of this > > work we would like extract some of the hard-coded business logic to > > external rules, that is why we are looking at Drools as a potential > > solution. > > > > What we would like to have is some kind of abstraction or mapping between > > actual entities and rules the business users can define so that they do > not > > have to know the _exact_ details of the data model (field names, precise > > relations etc). This would be important for us so that we can refactor > the > > old model classes without affecting business rules; also it would make > life > > easier for the business users. While IDE support might make refactoring > > easier, we definitely want to have a separation between rules and > entities. > > > > Given our situation, writing and maintaining "stable" wrapper/adapter > > classes for the sole purpose of rule processing is out of question. I > have > > checked the documentation of Drools DSL support and for me it seems to be > > overkill for our use case: we do not really need a custom language, but > > simply an abstraction between rules and the data model classes. > > > > What I could imagine is a piece of code, (a custom property resolver? - > no > > sure how it is called) which maps property expressions to actual > properties > > based on a custom annotation on the entity class or something like that, > so > > that a rule containing "Foo.bars" expression does not have to change even > > if we decide to rename "Foo.bars" to "Foo.barList" in the model classes. > > (This was just a simple example of a potential use cases) > > > > Could you please share your thoughts on this topic and point me into the > > right direction? > > > > Thanks, > > Peter > > > > _______________________________________________ > rules-users mailing list > rules-users at lists.jboss.org > https://lists.jboss.org/mailman/listinfo/rules-users > -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.jboss.org/pipermail/rules-users/attachments/20140526/ffebc53a/attachment-0001.html From drpatrick.cosmo at gmail.com Mon May 26 09:28:48 2014 From: drpatrick.cosmo at gmail.com (crosbis2) Date: Mon, 26 May 2014 06:28:48 -0700 (PDT) Subject: [rules-users] Excel Syntax in Decision Tables In-Reply-To: References: <1399894022361-4029520.post@n3.nabble.com> <1399904433528-4029529.post@n3.nabble.com> <1399910129756-4029532.post@n3.nabble.com> <1399910293479-4029533.post@n3.nabble.com> <1399998865087-4029558.post@n3.nabble.com> <1401102022229-4029686.post@n3.nabble.com> Message-ID: <1401110928078-4029690.post@n3.nabble.com> Hi Laune, I tried what you prescribed but get the following in the source code when i upload it. fatca: FATCA(Type == 3); Classification() ? -- View this message in context: http://drools.46999.n3.nabble.com/Excel-Syntax-in-Decision-Tables-tp4029520p4029690.html Sent from the Drools: User forum mailing list archive at Nabble.com. From wolfgang.laun at gmail.com Mon May 26 10:55:34 2014 From: wolfgang.laun at gmail.com (Wolfgang Laun) Date: Mon, 26 May 2014 16:55:34 +0200 Subject: [rules-users] Abstraction between rules and data model? In-Reply-To: References: Message-ID: Even a relatively sophisticated transformation would be easier to implement and most certainly safer from changes in the unstable Drools API than some hook-and-intercept mechanism built into Drools. Notice that violent structural departure of the model the BUs see from what you call "persistence model" might make it impossible for the BUs to come up with rules that can be transformed to match the other model at all; if it is possible, rules might still incur a heavy performance penalty. It is (IMHO) a myth that "Rules" is a foolproof way of establishing business logic independent from the data model and application environment with which this logic should be able to cooperate. As long as everything is kept in the abstract (i.e., formulated in terms of mathematics) it will look good, but any implementation may throw a spanner in the works, or worse. -W On 26/05/2014, P?ter Gergely, Horv?th wrote: > Hi Wolfgang, > > Thank you for your input. You are right that some of the cases could simply > be covered by regexp-replace, but I'm afraid, not all of them. Interfaces > could also help, but we have a requirement that the business rules should > not be tightly coupled to the underlying persistence model. (I understand > that some might say this is not ideal, but that is our current situation) > > I am wondering whether it is possible to hook into Drools engine and > intercept field value reference expression evaluations in run time (e.g if > "foo.bars" is used in an expression, we could return "foo.barList") ? By > injecting some custom code, we could make the necessary decisions and > extract the proper value from an object. Unfortunately these parts of > Drools are pretty much undocumented. > > Regards, > Peter > > > > 2014-05-26 13:57 GMT+02:00 Wolfgang Laun : > >> What you describe can be done with /bin/sed. >> >> Notice that the DSL processor doesn't require you to translate entire >> patterns; there is a mechanism for translating "keywords", which is >> just arbitrary tokens to whatever replacement text. >> >> If a "bar" must be translated to a "barList" in the context of a class >> "Foo" but not in any other context, a more sophisticated translation >> is required in any case (with /bin/sed still being sufficient if >> patterns aren't split across lines). >> >> Some say that good design makes use of Interfaces, which leaves room >> for actual implementations being changed as long as the interfaces are >> implemented. Here, note that rules can be written against interface >> types. >> >> -W >> >> >> On 26/05/2014, P?ter Gergely, Horv?th wrote: >> > Hi All, >> > >> > We are evaluating Drools 6 for our use case, and face challenges where >> > we >> > would need some ideas from more experienced users of Drools. >> > >> > We have an application with a massive code base and a large number of >> model >> > (entity) classes. We are in the process of moving away from inherited >> > legacy technologies and refactoring the old code base. As a part of >> > this >> > work we would like extract some of the hard-coded business logic to >> > external rules, that is why we are looking at Drools as a potential >> > solution. >> > >> > What we would like to have is some kind of abstraction or mapping >> > between >> > actual entities and rules the business users can define so that they do >> not >> > have to know the _exact_ details of the data model (field names, >> > precise >> > relations etc). This would be important for us so that we can refactor >> the >> > old model classes without affecting business rules; also it would make >> life >> > easier for the business users. While IDE support might make refactoring >> > easier, we definitely want to have a separation between rules and >> entities. >> > >> > Given our situation, writing and maintaining "stable" wrapper/adapter >> > classes for the sole purpose of rule processing is out of question. I >> have >> > checked the documentation of Drools DSL support and for me it seems to >> > be >> > overkill for our use case: we do not really need a custom language, but >> > simply an abstraction between rules and the data model classes. >> > >> > What I could imagine is a piece of code, (a custom property resolver? - >> no >> > sure how it is called) which maps property expressions to actual >> properties >> > based on a custom annotation on the entity class or something like >> > that, >> so >> > that a rule containing "Foo.bars" expression does not have to change >> > even >> > if we decide to rename "Foo.bars" to "Foo.barList" in the model >> > classes. >> > (This was just a simple example of a potential use cases) >> > >> > Could you please share your thoughts on this topic and point me into >> > the >> > right direction? >> > >> > Thanks, >> > Peter >> > >> >> _______________________________________________ >> rules-users mailing list >> rules-users at lists.jboss.org >> https://lists.jboss.org/mailman/listinfo/rules-users >> > From wolfgang.laun at gmail.com Mon May 26 11:00:09 2014 From: wolfgang.laun at gmail.com (Wolfgang Laun) Date: Mon, 26 May 2014 17:00:09 +0200 Subject: [rules-users] Excel Syntax in Decision Tables In-Reply-To: <1401110928078-4029690.post@n3.nabble.com> References: <1399894022361-4029520.post@n3.nabble.com> <1399904433528-4029529.post@n3.nabble.com> <1399910129756-4029532.post@n3.nabble.com> <1399910293479-4029533.post@n3.nabble.com> <1399998865087-4029558.post@n3.nabble.com> <1401102022229-4029686.post@n3.nabble.com> <1401110928078-4029690.post@n3.nabble.com> Message-ID: Which Drools version are you using? The upper case 'T' in "Type == 3" is *very* unlikely. And did you copy this exactly as I posted? Especially the final "()" is essential in the second row. -W On 26/05/2014, crosbis2 wrote: > Hi Laune, > > I tried what you prescribed but get the following in the source code when i > upload it. > > fatca: FATCA(Type == 3); Classification() > > > ? > > > > -- > View this message in context: > http://drools.46999.n3.nabble.com/Excel-Syntax-in-Decision-Tables-tp4029520p4029690.html > Sent from the Drools: User forum mailing list archive at Nabble.com. > _______________________________________________ > rules-users mailing list > rules-users at lists.jboss.org > https://lists.jboss.org/mailman/listinfo/rules-users > From drpatrick.cosmo at gmail.com Mon May 26 11:06:53 2014 From: drpatrick.cosmo at gmail.com (crosbis2) Date: Mon, 26 May 2014 08:06:53 -0700 (PDT) Subject: [rules-users] Excel Syntax in Decision Tables In-Reply-To: References: <1399904433528-4029529.post@n3.nabble.com> <1399910129756-4029532.post@n3.nabble.com> <1399910293479-4029533.post@n3.nabble.com> <1399998865087-4029558.post@n3.nabble.com> <1401102022229-4029686.post@n3.nabble.com> <1401110928078-4029690.post@n3.nabble.com> Message-ID: <1401116813050-4029693.post@n3.nabble.com> It's guvnor-5.5.0.Final-jboss-as-7.0 Yes i copied your syntax and got this -- View this message in context: http://drools.46999.n3.nabble.com/Excel-Syntax-in-Decision-Tables-tp4029520p4029693.html Sent from the Drools: User forum mailing list archive at Nabble.com. From ivonivonne at gmail.com Mon May 26 11:10:28 2014 From: ivonivonne at gmail.com (ivonne) Date: Mon, 26 May 2014 08:10:28 -0700 (PDT) Subject: [rules-users] java.lang.VerifyError org/drools/reteoo/ReteooRuleBase, method: setupRete signature: ()V Message-ID: <1401117028814-4029694.post@n3.nabble.com> Hi I am using jboss 4.2 and drools core 5.4.0.Final. The application was working fine but without any change it started to throw an error when spring bean for kbase is created. This is the error: org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'kbase': Invocation of init method failed; nested exception is java.lang.VerifyError: (class: org/drools/reteoo/ReteooRuleBase, method: setupRete signature: ()V) Incompatible argument to function If I run the application using jetty it works fine. I've been looking about the error with any sucess. Thanks -- View this message in context: http://drools.46999.n3.nabble.com/java-lang-VerifyError-org-drools-reteoo-ReteooRuleBase-method-setupRete-signature-V-tp4029694.html Sent from the Drools: User forum mailing list archive at Nabble.com. From ganeshneelekani at gmail.com Mon May 26 11:26:31 2014 From: ganeshneelekani at gmail.com (ganeshneelekani) Date: Mon, 26 May 2014 08:26:31 -0700 (PDT) Subject: [rules-users] java.lang.RuntimeException: Cannot find KieModule: org.acme:myartifact:1.0-SNAPSHOT Message-ID: <1401117991782-4029696.post@n3.nabble.com> Hi Team, I am facing issue in drools 6.0 ,I have added kie-ci.jar in class path,Drools is not able to found maven release snapshot.I have gone with many post and not got the answer, Please let me know any one faced the issues and they succeed to solve this Stacktrace is below. java.lang.RuntimeException: Cannot find KieModule: org.acme:myartifact:1.0-SNAPSHOT 20:47:34,646 ERROR [stderr] (http-localhost-127.0.0.1-8080-7) at org.drools.compiler.kie.builder.impl.KieServicesImpl.newKieContainer(KieServicesImpl.java:86) 20:47:34,649 ERROR [stderr] (http-localhost-127.0.0.1-8080-7) at com.sample.ProcessTest.callJavaclass(ProcessTest.java:36) 20:47:34,651 ERROR [stderr] (http-localhost-127.0.0.1-8080-7) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) 20:47:34,652 ERROR [stderr] (http-localhost-127.0.0.1-8080-7) at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source) -- View this message in context: http://drools.46999.n3.nabble.com/java-lang-RuntimeException-Cannot-find-KieModule-org-acme-myartifact-1-0-SNAPSHOT-tp4029696.html Sent from the Drools: User forum mailing list archive at Nabble.com. From dsotty at gmail.com Mon May 26 11:58:09 2014 From: dsotty at gmail.com (Davide Sottara) Date: Mon, 26 May 2014 10:58:09 -0500 Subject: [rules-users] Abstraction between rules and data model? In-Reply-To: References: Message-ID: <53836491.5070202@gmail.com> We are working on the trait framework for cases like this. Essentially, it allows to use interfaces when writing rules AND to inject the interfaces dynamically at runtime, at the instance level. It relies on transparent proxies which wrap the data classes and implement the required interfaces. A simple field aliasing mechanism is provided (work in progress). For more complex transformations, "virtual" fields can be added. See section 7.7.8 of the manual for more details and let me know if it can help with your use case. Best, Davide On 05/26/2014 09:55 AM, Wolfgang Laun wrote: > Even a relatively sophisticated transformation would be easier to implement > and most certainly safer from changes in the unstable Drools API than some > hook-and-intercept mechanism built into Drools. > > Notice that violent structural departure of the model the BUs see from what > you call "persistence model" might make it impossible for the BUs to come > up with rules that can be transformed to match the other model at all; > if it is possible, rules might still incur a heavy performance penalty. > > It is (IMHO) a myth that "Rules" is a foolproof way of establishing > business logic > independent from the data model and application environment with which > this logic should be able to cooperate. As long as everything is kept in the > abstract (i.e., formulated in terms of mathematics) it will look good, but > any implementation may throw a spanner in the works, or worse. > > -W > > On 26/05/2014, P?ter Gergely, Horv?th wrote: >> Hi Wolfgang, >> >> Thank you for your input. You are right that some of the cases could simply >> be covered by regexp-replace, but I'm afraid, not all of them. Interfaces >> could also help, but we have a requirement that the business rules should >> not be tightly coupled to the underlying persistence model. (I understand >> that some might say this is not ideal, but that is our current situation) >> >> I am wondering whether it is possible to hook into Drools engine and >> intercept field value reference expression evaluations in run time (e.g if >> "foo.bars" is used in an expression, we could return "foo.barList") ? By >> injecting some custom code, we could make the necessary decisions and >> extract the proper value from an object. Unfortunately these parts of >> Drools are pretty much undocumented. >> >> Regards, >> Peter >> >> >> >> 2014-05-26 13:57 GMT+02:00 Wolfgang Laun : >> >>> What you describe can be done with /bin/sed. >>> >>> Notice that the DSL processor doesn't require you to translate entire >>> patterns; there is a mechanism for translating "keywords", which is >>> just arbitrary tokens to whatever replacement text. >>> >>> If a "bar" must be translated to a "barList" in the context of a class >>> "Foo" but not in any other context, a more sophisticated translation >>> is required in any case (with /bin/sed still being sufficient if >>> patterns aren't split across lines). >>> >>> Some say that good design makes use of Interfaces, which leaves room >>> for actual implementations being changed as long as the interfaces are >>> implemented. Here, note that rules can be written against interface >>> types. >>> >>> -W >>> >>> >>> On 26/05/2014, P?ter Gergely, Horv?th wrote: >>>> Hi All, >>>> >>>> We are evaluating Drools 6 for our use case, and face challenges where >>>> we >>>> would need some ideas from more experienced users of Drools. >>>> >>>> We have an application with a massive code base and a large number of >>> model >>>> (entity) classes. We are in the process of moving away from inherited >>>> legacy technologies and refactoring the old code base. As a part of >>>> this >>>> work we would like extract some of the hard-coded business logic to >>>> external rules, that is why we are looking at Drools as a potential >>>> solution. >>>> >>>> What we would like to have is some kind of abstraction or mapping >>>> between >>>> actual entities and rules the business users can define so that they do >>> not >>>> have to know the _exact_ details of the data model (field names, >>>> precise >>>> relations etc). This would be important for us so that we can refactor >>> the >>>> old model classes without affecting business rules; also it would make >>> life >>>> easier for the business users. While IDE support might make refactoring >>>> easier, we definitely want to have a separation between rules and >>> entities. >>>> Given our situation, writing and maintaining "stable" wrapper/adapter >>>> classes for the sole purpose of rule processing is out of question. I >>> have >>>> checked the documentation of Drools DSL support and for me it seems to >>>> be >>>> overkill for our use case: we do not really need a custom language, but >>>> simply an abstraction between rules and the data model classes. >>>> >>>> What I could imagine is a piece of code, (a custom property resolver? - >>> no >>>> sure how it is called) which maps property expressions to actual >>> properties >>>> based on a custom annotation on the entity class or something like >>>> that, >>> so >>>> that a rule containing "Foo.bars" expression does not have to change >>>> even >>>> if we decide to rename "Foo.bars" to "Foo.barList" in the model >>>> classes. >>>> (This was just a simple example of a potential use cases) >>>> >>>> Could you please share your thoughts on this topic and point me into >>>> the >>>> right direction? >>>> >>>> Thanks, >>>> Peter >>>> >>> _______________________________________________ >>> rules-users mailing list >>> rules-users at lists.jboss.org >>> https://lists.jboss.org/mailman/listinfo/rules-users >>> > _______________________________________________ > rules-users mailing list > rules-users at lists.jboss.org > https://lists.jboss.org/mailman/listinfo/rules-users > From dsotty at gmail.com Mon May 26 12:01:21 2014 From: dsotty at gmail.com (Davide Sottara) Date: Mon, 26 May 2014 11:01:21 -0500 Subject: [rules-users] java.lang.VerifyError org/drools/reteoo/ReteooRuleBase, method: setupRete signature: ()V In-Reply-To: <1401117028814-4029694.post@n3.nabble.com> References: <1401117028814-4029694.post@n3.nabble.com> Message-ID: <53836551.3050809@gmail.com> You mean that it used to work with your combination (jboss 4.2 + drools 5.4.0) and then it suddenly started throwing the exception? It seems strange.. do you have other applications deployed on the same instance of jboss? Maybe it's picking up a different version of the jars from somewhere else Davide On 05/26/2014 10:10 AM, ivonne wrote: > Hi > > I am using jboss 4.2 and drools core 5.4.0.Final. The application was > working fine but without any change it started to throw an error when spring > bean for kbase is created. This is the error: > org.springframework.beans.factory.BeanCreationException: Error creating bean > with name 'kbase': Invocation of init method failed; nested exception is > java.lang.VerifyError: (class: org/drools/reteoo/ReteooRuleBase, method: > setupRete signature: ()V) Incompatible argument to function > > If I run the application using jetty it works fine. > > I've been looking about the error with any sucess. > > Thanks > > > > > -- > View this message in context: http://drools.46999.n3.nabble.com/java-lang-VerifyError-org-drools-reteoo-ReteooRuleBase-method-setupRete-signature-V-tp4029694.html > Sent from the Drools: User forum mailing list archive at Nabble.com. > _______________________________________________ > rules-users mailing list > rules-users at lists.jboss.org > https://lists.jboss.org/mailman/listinfo/rules-users > From ivonivonne at gmail.com Mon May 26 12:45:38 2014 From: ivonivonne at gmail.com (Ivo Escamilla) Date: Mon, 26 May 2014 11:45:38 -0500 Subject: [rules-users] java.lang.VerifyError org/drools/reteoo/ReteooRuleBase, method: setupRete signature: ()V In-Reply-To: <53836551.3050809@gmail.com> References: <1401117028814-4029694.post@n3.nabble.com> <53836551.3050809@gmail.com> Message-ID: Thanks for your answer. It is the unique application in the server. The server is on my local. Right, it was working fine and then started throwing the exception. In the pom I had drools-core, drools-spring and drools-all-jdk5 version 5.4.0.Final. I deleted all and use only drools- spring 5.4.0.Final and I solve the issue. I don't know why it works. I tried many things like new versions, deleted from my local and installed them again, with any success. It works using jetty but not with jboss. But using only that dependency fixed the issue. Do you know why? El may 26, 2014 11:02 AM, "Davide Sottara" escribi?: > You mean that it used to work with your combination (jboss 4.2 + drools > 5.4.0) > and then it suddenly started throwing the exception? > It seems strange.. do you have other applications deployed on the same > instance > of jboss? Maybe it's picking up a different version of the jars from > somewhere else > Davide > > On 05/26/2014 10:10 AM, ivonne wrote: > > > Hi > > > > I am using jboss 4.2 and drools core 5.4.0.Final. The application was > > working fine but without any change it started to throw an error when > spring > > bean for kbase is created. This is the error: > > org.springframework.beans.factory.BeanCreationException: Error creating > bean > > with name 'kbase': Invocation of init method failed; nested exception is > > java.lang.VerifyError: (class: org/drools/reteoo/ReteooRuleBase, method: > > setupRete signature: ()V) Incompatible argument to function > > > > If I run the application using jetty it works fine. > > > > I've been looking about the error with any sucess. > > > > Thanks > > > > > > > > > > -- > > View this message in context: > http://drools.46999.n3.nabble.com/java-lang-VerifyError-org-drools-reteoo-ReteooRuleBase-method-setupRete-signature-V-tp4029694.html > > Sent from the Drools: User forum mailing list archive at Nabble.com. > > _______________________________________________ > > rules-users mailing list > > [hidden email] > > https://lists.jboss.org/mailman/listinfo/rules-users > > > > _______________________________________________ > rules-users mailing list > [hidden email] > https://lists.jboss.org/mailman/listinfo/rules-users > > > ------------------------------ > If you reply to this email, your message will be added to the discussion > below: > > http://drools.46999.n3.nabble.com/java-lang-VerifyError-org-drools-reteoo-ReteooRuleBase-method-setupRete-signature-V-tp4029694p4029698.html > To unsubscribe from java.lang.VerifyError > org/drools/reteoo/ReteooRuleBase, method: setupRete signature: ()V, click > here > . > NAML > -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.jboss.org/pipermail/rules-users/attachments/20140526/10d18567/attachment.html From dsotty at gmail.com Mon May 26 12:50:22 2014 From: dsotty at gmail.com (Davide Sottara) Date: Mon, 26 May 2014 11:50:22 -0500 Subject: [rules-users] Cannot issue fireUntilHalt when using persisted session In-Reply-To: <1400784229559-4029656.post@n3.nabble.com> References: <1400784229559-4029656.post@n3.nabble.com> Message-ID: <538370CE.7020208@gmail.com> Could you please show the code where you persist, reload and invoke fireUntilHalt() on the session? Ideally, could you open a jira ticket and post the code there? We'll take a look then. Thanks Davide On 05/22/2014 01:43 PM, rogerL wrote: > Due to an issue with reloading persisted sessions that contained a cron timer > rule, I upgraded to 6.1.0.Beta3. Now I'm encountering a problem with a > threaded fireUntilHalt command (cannot be issued on a persisted session). > > Exception in thread "SimpleAsyncTaskExecutor-1" > java.lang.UnsupportedOperationException: Command session.fireUntilHalt(); > cannot be issued on a persisted session > at > org.drools.persistence.SingleSessionCommandService$TransactionInterceptor.execute(SingleSessionCommandService.java:474) > at > org.drools.persistence.SingleSessionCommandService.execute(SingleSessionCommandService.java:353) > at > org.drools.core.command.impl.CommandBasedStatefulKnowledgeSession.fireUntilHalt(CommandBasedStatefulKnowledgeSession.java:272)... > > It worked without issue in 6.0.1.Final. Though I suspect not, is this > expected behaviour? Alternately, are there configuration/other changes that > must be implemented. > > Libs > spring 4.0.1 > kie, drools, jbpm 6.1.0.Beta3 > hibernate 4.3.4 > > > > > > > > -- > View this message in context: http://drools.46999.n3.nabble.com/Cannot-issue-fireUntilHalt-when-using-persisted-session-tp4029656.html > Sent from the Drools: User forum mailing list archive at Nabble.com. > _______________________________________________ > rules-users mailing list > rules-users at lists.jboss.org > https://lists.jboss.org/mailman/listinfo/rules-users > From dsotty at gmail.com Mon May 26 12:54:26 2014 From: dsotty at gmail.com (Davide Sottara) Date: Mon, 26 May 2014 11:54:26 -0500 Subject: [rules-users] java.lang.VerifyError org/drools/reteoo/ReteooRuleBase, method: setupRete signature: ()V In-Reply-To: References: <1401117028814-4029694.post@n3.nabble.com> <53836551.3050809@gmail.com> Message-ID: <538371C2.2080203@gmail.com> I can't tell for sure... 5.4.0 is relatively old, and there is not much that can be done with the released jars. I suspect that you had some duplicate, incompatible classes on the classpath (having BOTH drools-all and the others seems suspicious), and the classloader was 'almost always' picking up the one that made it work. Out of pure luck. Davide On 05/26/2014 11:45 AM, Ivo Escamilla wrote: > > Thanks for your answer. It is the unique application in the server. > The server is on my local. Right, it was working fine and then started > throwing the exception. > > In the pom I had drools-core, drools-spring and drools-all-jdk5 > version 5.4.0.Final. I deleted all and use only drools- spring > 5.4.0.Final and I solve the issue. I don't know why it works. I tried > many things like new versions, deleted from my local and installed > them again, with any success. It works using jetty but not with jboss. > But using only that dependency fixed the issue. Do you know why? > > El may 26, 2014 11:02 AM, "Davide Sottara" > escribi?: > > You mean that it used to work with your combination (jboss 4.2 + > drools > 5.4.0) > and then it suddenly started throwing the exception? > It seems strange.. do you have other applications deployed on the > same > instance > of jboss? Maybe it's picking up a different version of the jars from > somewhere else > Davide > > On 05/26/2014 10:10 AM, ivonne wrote: > > > Hi > > > > I am using jboss 4.2 and drools core 5.4.0.Final. The > application was > > working fine but without any change it started to throw an error > when spring > > bean for kbase is created. This is the error: > > org.springframework.beans.factory.BeanCreationException: Error > creating bean > > with name 'kbase': Invocation of init method failed; nested > exception is > > java.lang.VerifyError: (class: org/drools/reteoo/ReteooRuleBase, > method: > > setupRete signature: ()V) Incompatible argument to function > > > > If I run the application using jetty it works fine. > > > > I've been looking about the error with any sucess. > > > > Thanks > > > > > > > > > > -- > > View this message in context: > http://drools.46999.n3.nabble.com/java-lang-VerifyError-org-drools-reteoo-ReteooRuleBase-method-setupRete-signature-V-tp4029694.html > > Sent from the Drools: User forum mailing list archive at > Nabble.com. > > _______________________________________________ > > rules-users mailing list > > [hidden email] > > > https://lists.jboss.org/mailman/listinfo/rules-users > > > > _______________________________________________ > rules-users mailing list > [hidden email] > https://lists.jboss.org/mailman/listinfo/rules-users > > > ------------------------------------------------------------------------ > If you reply to this email, your message will be added to the > discussion below: > http://drools.46999.n3.nabble.com/java-lang-VerifyError-org-drools-reteoo-ReteooRuleBase-method-setupRete-signature-V-tp4029694p4029698.html > > To unsubscribe from java.lang.VerifyError > org/drools/reteoo/ReteooRuleBase, method: setupRete signature: > ()V, click here > . > NAML > > > > > > _______________________________________________ > rules-users mailing list > rules-users at lists.jboss.org > https://lists.jboss.org/mailman/listinfo/rules-users -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.jboss.org/pipermail/rules-users/attachments/20140526/a0676181/attachment.html From dsotty at gmail.com Mon May 26 13:05:52 2014 From: dsotty at gmail.com (Davide Sottara) Date: Mon, 26 May 2014 12:05:52 -0500 Subject: [rules-users] @propertyReactive not work when condition are coded in java In-Reply-To: <1400788194588-4029657.post@n3.nabble.com> References: <1400788194588-4029657.post@n3.nabble.com> Message-ID: <53837470.4060906@gmail.com> The engine analyzes the constraints to see which property a pattern is "watching": So, it expects something like: Person( name == "alice" ) If you invoke your custom logic: Person( myEqualComparator( ..., name, ... ) ) it's unlikely that the engine will recognize that a field is involved and, even then, that it should react to. The simplest solution is to force the pattern to react to the field, doing either: Person( myEqual(...), $n : name ) or, in alternative: Person( myEqual(...) ) @watch( name ) Please let us know if it works for you. Thanks Davide On 05/22/2014 02:49 PM, wtang wrote: > I have rule1 and rule2 and rule1 is modifying an object whose property is > checked in the when part of rule2 and rule2 should fire. > > The problem is rule2 is not firing. When I took out the @PropertyReactive > annotation, then rule2 will fire. > > After further investigation, I find the cause is because in the when part I > am calling java function to do the comparison as suppose to using native > operators like "==". > > Property Reactive seems to be not working when in the WHEN part of the rules > we are calling java function to do the comparison as suppose to using native > operators like ==, <, >, etc. > > Please advice. > > > > -- > View this message in context: http://drools.46999.n3.nabble.com/propertyReactive-not-work-when-condition-are-coded-in-java-tp4029657.html > Sent from the Drools: User forum mailing list archive at Nabble.com. > _______________________________________________ > rules-users mailing list > rules-users at lists.jboss.org > https://lists.jboss.org/mailman/listinfo/rules-users > From sunnycal99 at gmail.com Mon May 26 14:40:42 2014 From: sunnycal99 at gmail.com (Chris B) Date: Mon, 26 May 2014 11:40:42 -0700 (PDT) Subject: [rules-users] Nested Collect probably In-Reply-To: <1401091392897-4029681.post@n3.nabble.com> References: <1401091392897-4029681.post@n3.nabble.com> Message-ID: <1401129642748-4029703.post@n3.nabble.com> Actually it is a event from an application usecaseThanks for your reply and I think I am very close with your help.This rule is giving error Line 99:5 mismatched input 'or' in rule "usecase-test"]rule "usecase-test" when $e0 : Event () ParsedValue(event == $e0, ruleId == "0", varName == "V0_1", $e0_V0_1_varStringValue : varStringValue) ParsedValue(event == $e0, ruleId == "0", varName == "V0_2", $e0_V0_2_varStringValue : varStringValue) accumulate( ParsedValue( ruleId == "0", varName == "V0_1", varStringValue == $e0_V0_1_varStringValue, $e : event ) and ParsedValue( event == $e, ruleId == "0", varName == "V0_2", varStringValue == $e0_V0_2_varStringValue ) and ( ( ParsedValue( event == $e, ruleId == "1", varName == "V1_1", varStringValue == "X1_1") and ParsedValue( event == $e, ruleId == "1", varName == "V1_2", varStringValue == "X1_2") ) or *[< ( ParsedValue( event == $e, ruleId == "2", varName == "V2_1", varStringValue == "X2_1") and ParsedValue( event == $e, ruleId == "2", varName == "V2_2", varStringValue == "X2_2") ) ); $es: collectSet( $e ); $es.size() >= 5 ) then System.out.println( "usecase-test" + $es.size());endThe Event comes from application and is parsed for values.The event from same application will have the same values for ruleId=0, varName-V0_1 and V0_2So any event with same values for V0_1 and V0_2 is coming from same application.The rule says if from same applicationyou have values which has this combinationruleId == "1", varName == "V1_1", varStringValue == "X1_1"ruleId == "1", varName == "V1_2", varStringValue == "X1_2"or this combinationruleId == "2", varName == "V2_1", varStringValue == "X2_1"ruleId == "2", varName == "V2_2", varStringValue == "X2_2"or this combination sayruleId == "3", varName == "V3_1", varStringValue == "X3_1"ruleId == "3", varName == "V3_2", varStringValue == "X3_2"ruleId == "3", varName == "V3_3", varStringValue == "X3_3"In pure english it isFirst I have to identify if I am dealing with events from same applicationThis is by comparing (2) parsed values V0_1 and V0_2. If they are same across events .. then it having same source.Next lets check for other conditions..From Rule 1.. I want to check values of V1_1 and V1_2, if there is a issueFrom Rule 2.. I want to check values of V2_1 and V2_2, if there is a issueNow I do not want to raise exception as soon as condition is met.. since the problem can occur and can be ignored. But if it happens more than 5 times from the same source, then I want to raise an alert. -- View this message in context: http://drools.46999.n3.nabble.com/Nested-Collect-probably-tp4029681p4029703.html Sent from the Drools: User forum mailing list archive at Nabble.com. -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.jboss.org/pipermail/rules-users/attachments/20140526/6c12cbc1/attachment.html From sunnycal99 at gmail.com Mon May 26 18:48:08 2014 From: sunnycal99 at gmail.com (Chris B) Date: Mon, 26 May 2014 15:48:08 -0700 (PDT) Subject: [rules-users] Nested Collect probably In-Reply-To: <1401129642748-4029703.post@n3.nabble.com> References: <1401091392897-4029681.post@n3.nabble.com> <1401129642748-4029703.post@n3.nabble.com> Message-ID: <1401144488761-4029704.post@n3.nabble.com> I tried a simpler version rule "usecase2-test2" when $e0 : Event () ParsedValue(event == $e0, ruleId == "0", varName == "V0_1", $e0_V0_1_varStringValue : varStringValue) ParsedValue(event == $e0, ruleId == "0", varName == "V0_2", $e0_V0_2_varStringValue : varStringValue) accumulate( ParsedValue( ruleId == "0", varName == "V0_1", varStringValue == $e0_V0_1_varStringValue, $e:event ) and ParsedValue( event == $e, ruleId == "0", varName == "V0_2", varStringValue == $e0_V0_2_varStringValue ) and ParsedValue( event == $e, ruleId == "1", varName == "V1_1", varStringValue == "X1_1") and ParsedValue( event == $e, ruleId == "1", varName == "V1_2", varStringValue == "X1_2"); $es: collectSet( $e ); $es.size() >= 2 ) then System.out.println( "usecase2" + $es.size()); end but when I insert 2 events with same source (meaning same values with (ruleId == "0", varName == "V0_1") and (ruleId == "0", varName == "V0_2") and right values for rule1 variables then also it works with one single event and never satisfies this condition. -- View this message in context: http://drools.46999.n3.nabble.com/Nested-Collect-probably-tp4029681p4029704.html Sent from the Drools: User forum mailing list archive at Nabble.com. From wolfgang.laun at gmail.com Tue May 27 00:42:51 2014 From: wolfgang.laun at gmail.com (Wolfgang Laun) Date: Tue, 27 May 2014 06:42:51 +0200 Subject: [rules-users] Nested Collect probably In-Reply-To: <1401129642748-4029703.post@n3.nabble.com> References: <1401091392897-4029681.post@n3.nabble.com> <1401129642748-4029703.post@n3.nabble.com> Message-ID: It's not possible to use the conditional element "or" inside an accumulate. (Reading up on the "or" CE should give you an idea why.) And that's why I used a boolean expression as a constraint within the third pattern. -W On 26/05/2014, Chris B wrote: > Actually it is a event from an application usecaseThanks for your reply and > I > think I am very close with your help.This rule is giving error Line 99:5 > mismatched input 'or' in rule "usecase-test"]rule "usecase-test" when > $e0 : Event () ParsedValue(event == $e0, ruleId == "0", varName == > "V0_1", $e0_V0_1_varStringValue : varStringValue) ParsedValue(event == > $e0, ruleId == "0", varName == "V0_2", $e0_V0_2_varStringValue : > varStringValue) accumulate( ParsedValue( ruleId == "0", varName == > "V0_1", varStringValue == $e0_V0_1_varStringValue, $e : event ) and > > ParsedValue( event == $e, ruleId == "0", varName == "V0_2", varStringValue > == $e0_V0_2_varStringValue ) and ( ( ParsedValue( event == > $e, ruleId == "1", varName == "V1_1", varStringValue == "X1_1") and > > ParsedValue( event == $e, ruleId == "1", varName == "V1_2", varStringValue > == "X1_2") ) or *[< ( ParsedValue( event == $e, ruleId == > "2", varName == "V2_1", varStringValue == "X2_1") and > ParsedValue( > event == $e, ruleId == "2", varName == "V2_2", varStringValue == "X2_2") > > ) ); $es: collectSet( $e ); $es.size() >= 5 ) then > System.out.println( "usecase-test" + $es.size());endThe Event comes from > application and is parsed for values.The event from same application will > have the same values for ruleId=0, varName-V0_1 and V0_2So any event with > same values for V0_1 and V0_2 is coming from same application.The rule says > if from same applicationyou have values which has this combinationruleId == > "1", varName == "V1_1", varStringValue == "X1_1"ruleId == "1", varName == > "V1_2", varStringValue == "X1_2"or this combinationruleId == "2", varName > == > "V2_1", varStringValue == "X2_1"ruleId == "2", varName == "V2_2", > varStringValue == "X2_2"or this combination sayruleId == "3", varName == > "V3_1", varStringValue == "X3_1"ruleId == "3", varName == "V3_2", > varStringValue == "X3_2"ruleId == "3", varName == "V3_3", varStringValue == > "X3_3"In pure english it isFirst I have to identify if I am dealing with > events from same applicationThis is by comparing (2) parsed values V0_1 and > V0_2. If they are same across events .. then it having same source.Next > lets > check for other conditions..From Rule 1.. I want to check values of V1_1 > and > V1_2, if there is a issueFrom Rule 2.. I want to check values of V2_1 and > V2_2, if there is a issueNow I do not want to raise exception as soon as > condition is met.. since the problem can occur and can be ignored. But if > it > happens more than 5 times from the same source, then I want to raise an > alert. > > > > -- > View this message in context: > http://drools.46999.n3.nabble.com/Nested-Collect-probably-tp4029681p4029703.html > Sent from the Drools: User forum mailing list archive at Nabble.com. From soumya.bose at plavaga.in Tue May 27 01:09:31 2014 From: soumya.bose at plavaga.in (Soumya.plavaga) Date: Mon, 26 May 2014 22:09:31 -0700 (PDT) Subject: [rules-users] Slf4j Log4j logger not working with Drools drl while using as a global variable. Message-ID: <1401167371055-4029707.post@n3.nabble.com> I am using global slf4j log4j logger as a global variable within our drl and inserting that global logger value at runtime into kiesession. While we are trying to do logger.info with multiple arguments then it's giving the following exception stack trace - Exception executing consequence for rule "Test Logger 2" in test.rules.system: java.lang.RuntimeException: cannot invoke method: info at org.drools.core.runtime.rule.impl.DefaultConsequenceExceptionHandler.handleException(DefaultConsequenceExceptionHandler.java:39) at org.drools.core.common.DefaultAgenda.fireActivation(DefaultAgenda.java:1027) at org.drools.core.phreak.RuleExecutor.fire(RuleExecutor.java:129) at org.drools.core.phreak.RuleExecutor.evaluateNetworkAndFire(RuleExecutor.java:71) at org.drools.core.common.DefaultAgenda.fireNextItem(DefaultAgenda.java:935) at org.drools.core.common.DefaultAgenda.fireAllRules(DefaultAgenda.java:1200) at org.drools.core.common.AbstractWorkingMemory.fireAllRules(AbstractWorkingMemory.java:952) at org.drools.core.common.AbstractWorkingMemory.fireAllRules(AbstractWorkingMemory.java:926) at org.drools.core.impl.StatefulKnowledgeSessionImpl.fireAllRules(StatefulKnowledgeSessionImpl.java:232) at test.platform.rules.executor.service.impl.RuleExecutorServiceImplTest.testExecuteRule(RuleExecutorServiceImplTest.java:230) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) at java.lang.reflect.Method.invoke(Method.java:606) at org.junit.runners.model.FrameworkMethod$1.runReflectiveCall(FrameworkMethod.java:47) at org.junit.internal.runners.model.ReflectiveCallable.run(ReflectiveCallable.java:12) at org.junit.runners.model.FrameworkMethod.invokeExplosively(FrameworkMethod.java:44) at org.junit.internal.runners.statements.InvokeMethod.evaluate(InvokeMethod.java:17) at org.springframework.test.context.junit4.statements.RunBeforeTestMethodCallbacks.evaluate(RunBeforeTestMethodCallbacks.java:74) at org.springframework.test.context.junit4.statements.RunAfterTestMethodCallbacks.evaluate(RunAfterTestMethodCallbacks.java:83) at org.springframework.test.context.junit4.statements.SpringRepeat.evaluate(SpringRepeat.java:72) at org.springframework.test.context.junit4.SpringJUnit4ClassRunner.runChild(SpringJUnit4ClassRunner.java:232) at org.springframework.test.context.junit4.SpringJUnit4ClassRunner.runChild(SpringJUnit4ClassRunner.java:89) at org.junit.runners.ParentRunner$3.run(ParentRunner.java:238) at org.junit.runners.ParentRunner$1.schedule(ParentRunner.java:63) at org.junit.runners.ParentRunner.runChildren(ParentRunner.java:236) at org.junit.runners.ParentRunner.access$000(ParentRunner.java:53) at org.junit.runners.ParentRunner$2.evaluate(ParentRunner.java:229) at org.springframework.test.context.junit4.statements.RunBeforeTestClassCallbacks.evaluate(RunBeforeTestClassCallbacks.java:61) at org.springframework.test.context.junit4.statements.RunAfterTestClassCallbacks.evaluate(RunAfterTestClassCallbacks.java:71) at org.junit.runners.ParentRunner.run(ParentRunner.java:309) at org.springframework.test.context.junit4.SpringJUnit4ClassRunner.run(SpringJUnit4ClassRunner.java:175) at org.eclipse.jdt.internal.junit4.runner.JUnit4TestReference.run(JUnit4TestReference.java:50) at org.eclipse.jdt.internal.junit.runner.TestExecution.run(TestExecution.java:38) at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:467) at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:683) at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.run(RemoteTestRunner.java:390) at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.main(RemoteTestRunner.java:197) Caused by: java.lang.RuntimeException: cannot invoke method: info at org.mvel2.optimizers.impl.refl.nodes.MethodAccessor.getValue(MethodAccessor.java:63) at org.mvel2.optimizers.impl.refl.nodes.VariableAccessor.getValue(VariableAccessor.java:37) at org.mvel2.ast.ASTNode.getReducedValueAccelerated(ASTNode.java:108) at org.mvel2.MVELRuntime.execute(MVELRuntime.java:86) at org.mvel2.compiler.CompiledExpression.getDirectValue(CompiledExpression.java:123) at org.mvel2.compiler.CompiledExpression.getValue(CompiledExpression.java:119) at org.mvel2.MVEL.executeExpression(MVEL.java:930) at org.drools.core.base.mvel.MVELConsequence.evaluate(MVELConsequence.java:107) at org.drools.core.common.DefaultAgenda.fireActivation(DefaultAgenda.java:1016) ... 36 more Caused by: java.lang.ArrayIndexOutOfBoundsException: 1 at org.mvel2.optimizers.impl.refl.nodes.MethodAccessor.executeAll(MethodAccessor.java:140) at org.mvel2.optimizers.impl.refl.nodes.MethodAccessor.getValue(MethodAccessor.java:48) ... 44 more Example: My drl file looks like this - package test.system.rule; import test.platform.model.*; import org.slf4j.Logger; global Logger logger; rule "Test Logger 1" when then logger.info("within test logger 1"); end rule "Test Logger 2" when then logger.info("within test logger 2. Rule fired {}", drools.getRule().getName()); end While rules are firing then the first logger is getting printed into console but second one is not getting printed and giving the above exception to me. -- View this message in context: http://drools.46999.n3.nabble.com/Slf4j-Log4j-logger-not-working-with-Drools-drl-while-using-as-a-global-variable-tp4029707.html Sent from the Drools: User forum mailing list archive at Nabble.com. From wolfgang.laun at gmail.com Tue May 27 02:16:14 2014 From: wolfgang.laun at gmail.com (Wolfgang Laun) Date: Tue, 27 May 2014 08:16:14 +0200 Subject: [rules-users] Excel Syntax in Decision Tables In-Reply-To: <1401116813050-4029693.post@n3.nabble.com> References: <1399904433528-4029529.post@n3.nabble.com> <1399910129756-4029532.post@n3.nabble.com> <1399910293479-4029533.post@n3.nabble.com> <1399998865087-4029558.post@n3.nabble.com> <1401102022229-4029686.post@n3.nabble.com> <1401110928078-4029690.post@n3.nabble.com> <1401116813050-4029693.post@n3.nabble.com> Message-ID: Oops, sorry: The constraint goes into the leftmost pair of parentheses. Simply exchance to order of the patterns: Classification(); $f: FATCA(); -W On 26/05/2014, crosbis2 wrote: > It's guvnor-5.5.0.Final-jboss-as-7.0 > > Yes i copied your syntax > > > > and got this > > > > > > > -- > View this message in context: > http://drools.46999.n3.nabble.com/Excel-Syntax-in-Decision-Tables-tp4029520p4029693.html > Sent from the Drools: User forum mailing list archive at Nabble.com. > _______________________________________________ > rules-users mailing list > rules-users at lists.jboss.org > https://lists.jboss.org/mailman/listinfo/rules-users > From ge0ffrey.spam at gmail.com Tue May 27 03:08:50 2014 From: ge0ffrey.spam at gmail.com (Geoffrey De Smet) Date: Tue, 27 May 2014 09:08:50 +0200 Subject: [rules-users] Slf4j Log4j logger not working with Drools drl while using as a global variable. In-Reply-To: <1401167371055-4029707.post@n3.nabble.com> References: <1401167371055-4029707.post@n3.nabble.com> Message-ID: Check if the logger isn't null (by adding a System.out in the then part of the rule). If that's the case, then that error message is pretty poor (or even incorrect): java.lang.RuntimeException: cannot invoke method: info It should clearly talk about a NullPointer instead. So, if that's the case, create a jira issue. https://issues.jboss.org/browse/DROOLS On 27-05-14 07:09, Soumya.plavaga wrote: > I am using global slf4j log4j logger as a global variable within our drl and > inserting that global logger value at runtime into kiesession. While we are > trying to do logger.info with multiple arguments then it's giving the > following exception stack trace - > > Exception executing consequence for rule "Test Logger 2" in > test.rules.system: java.lang.RuntimeException: cannot invoke method: info > at > org.drools.core.runtime.rule.impl.DefaultConsequenceExceptionHandler.handleException(DefaultConsequenceExceptionHandler.java:39) > at > org.drools.core.common.DefaultAgenda.fireActivation(DefaultAgenda.java:1027) > at org.drools.core.phreak.RuleExecutor.fire(RuleExecutor.java:129) > at > org.drools.core.phreak.RuleExecutor.evaluateNetworkAndFire(RuleExecutor.java:71) > at > org.drools.core.common.DefaultAgenda.fireNextItem(DefaultAgenda.java:935) > at > org.drools.core.common.DefaultAgenda.fireAllRules(DefaultAgenda.java:1200) > at > org.drools.core.common.AbstractWorkingMemory.fireAllRules(AbstractWorkingMemory.java:952) > at > org.drools.core.common.AbstractWorkingMemory.fireAllRules(AbstractWorkingMemory.java:926) > at > org.drools.core.impl.StatefulKnowledgeSessionImpl.fireAllRules(StatefulKnowledgeSessionImpl.java:232) > at > test.platform.rules.executor.service.impl.RuleExecutorServiceImplTest.testExecuteRule(RuleExecutorServiceImplTest.java:230) > at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) > at > sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57) > at > sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) > at java.lang.reflect.Method.invoke(Method.java:606) > at > org.junit.runners.model.FrameworkMethod$1.runReflectiveCall(FrameworkMethod.java:47) > at > org.junit.internal.runners.model.ReflectiveCallable.run(ReflectiveCallable.java:12) > at > org.junit.runners.model.FrameworkMethod.invokeExplosively(FrameworkMethod.java:44) > at > org.junit.internal.runners.statements.InvokeMethod.evaluate(InvokeMethod.java:17) > at > org.springframework.test.context.junit4.statements.RunBeforeTestMethodCallbacks.evaluate(RunBeforeTestMethodCallbacks.java:74) > at > org.springframework.test.context.junit4.statements.RunAfterTestMethodCallbacks.evaluate(RunAfterTestMethodCallbacks.java:83) > at > org.springframework.test.context.junit4.statements.SpringRepeat.evaluate(SpringRepeat.java:72) > at > org.springframework.test.context.junit4.SpringJUnit4ClassRunner.runChild(SpringJUnit4ClassRunner.java:232) > at > org.springframework.test.context.junit4.SpringJUnit4ClassRunner.runChild(SpringJUnit4ClassRunner.java:89) > at org.junit.runners.ParentRunner$3.run(ParentRunner.java:238) > at org.junit.runners.ParentRunner$1.schedule(ParentRunner.java:63) > at org.junit.runners.ParentRunner.runChildren(ParentRunner.java:236) > at org.junit.runners.ParentRunner.access$000(ParentRunner.java:53) > at org.junit.runners.ParentRunner$2.evaluate(ParentRunner.java:229) > at > org.springframework.test.context.junit4.statements.RunBeforeTestClassCallbacks.evaluate(RunBeforeTestClassCallbacks.java:61) > at > org.springframework.test.context.junit4.statements.RunAfterTestClassCallbacks.evaluate(RunAfterTestClassCallbacks.java:71) > at org.junit.runners.ParentRunner.run(ParentRunner.java:309) > at > org.springframework.test.context.junit4.SpringJUnit4ClassRunner.run(SpringJUnit4ClassRunner.java:175) > at > org.eclipse.jdt.internal.junit4.runner.JUnit4TestReference.run(JUnit4TestReference.java:50) > at > org.eclipse.jdt.internal.junit.runner.TestExecution.run(TestExecution.java:38) > at > org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:467) > at > org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:683) > at > org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.run(RemoteTestRunner.java:390) > at > org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.main(RemoteTestRunner.java:197) > Caused by: java.lang.RuntimeException: cannot invoke method: info > at > org.mvel2.optimizers.impl.refl.nodes.MethodAccessor.getValue(MethodAccessor.java:63) > at > org.mvel2.optimizers.impl.refl.nodes.VariableAccessor.getValue(VariableAccessor.java:37) > at org.mvel2.ast.ASTNode.getReducedValueAccelerated(ASTNode.java:108) > at org.mvel2.MVELRuntime.execute(MVELRuntime.java:86) > at > org.mvel2.compiler.CompiledExpression.getDirectValue(CompiledExpression.java:123) > at > org.mvel2.compiler.CompiledExpression.getValue(CompiledExpression.java:119) > at org.mvel2.MVEL.executeExpression(MVEL.java:930) > at > org.drools.core.base.mvel.MVELConsequence.evaluate(MVELConsequence.java:107) > at > org.drools.core.common.DefaultAgenda.fireActivation(DefaultAgenda.java:1016) > ... 36 more > Caused by: java.lang.ArrayIndexOutOfBoundsException: 1 > at > org.mvel2.optimizers.impl.refl.nodes.MethodAccessor.executeAll(MethodAccessor.java:140) > at > org.mvel2.optimizers.impl.refl.nodes.MethodAccessor.getValue(MethodAccessor.java:48) > ... 44 more > > > Example: My drl file looks like this - > > package test.system.rule; > > import test.platform.model.*; > import org.slf4j.Logger; > > global Logger logger; > > rule "Test Logger 1" > > when > > then > > logger.info("within test logger 1"); > > end > > rule "Test Logger 2" > > when > > then > > logger.info("within test logger 2. Rule fired {}", > drools.getRule().getName()); > > end > > > While rules are firing then the first logger is getting printed into console > but second one is not getting printed and giving the above exception to me. > > > > -- > View this message in context: http://drools.46999.n3.nabble.com/Slf4j-Log4j-logger-not-working-with-Drools-drl-while-using-as-a-global-variable-tp4029707.html > Sent from the Drools: User forum mailing list archive at Nabble.com. > _______________________________________________ > rules-users mailing list > rules-users at lists.jboss.org > https://lists.jboss.org/mailman/listinfo/rules-users > From wolfgang.laun at gmail.com Tue May 27 04:08:24 2014 From: wolfgang.laun at gmail.com (Wolfgang Laun) Date: Tue, 27 May 2014 10:08:24 +0200 Subject: [rules-users] Slf4j Log4j logger not working with Drools drl while using as a global variable. In-Reply-To: References: <1401167371055-4029707.post@n3.nabble.com> Message-ID: @Geoffrey: did you see the java.lang.ArrayIndexOutOfBoundsException? Doesn't look like a null pointer causing an exception. The upstairs exception might add the basic exceptions's message to its message. @Soumya: Which Drools version are you using? Basically, this situation is handled correctly by 5.4 and 5.5. -W On 27/05/2014, Geoffrey De Smet wrote: > Check if the logger isn't null (by adding a System.out in the then part > of the rule). > > If that's the case, then that error message is pretty poor (or even > incorrect): > java.lang.RuntimeException: cannot invoke method: info > It should clearly talk about a NullPointer instead. > So, if that's the case, create a jira issue. > https://issues.jboss.org/browse/DROOLS > > > On 27-05-14 07:09, Soumya.plavaga wrote: >> I am using global slf4j log4j logger as a global variable within our drl >> and >> inserting that global logger value at runtime into kiesession. While we >> are >> trying to do logger.info with multiple arguments then it's giving the >> following exception stack trace - >> >> Exception executing consequence for rule "Test Logger 2" in >> test.rules.system: java.lang.RuntimeException: cannot invoke method: info >> at >> org.drools.core.runtime.rule.impl.DefaultConsequenceExceptionHandler.handleException(DefaultConsequenceExceptionHandler.java:39) >> at >> org.drools.core.common.DefaultAgenda.fireActivation(DefaultAgenda.java:1027) >> at org.drools.core.phreak.RuleExecutor.fire(RuleExecutor.java:129) >> at >> org.drools.core.phreak.RuleExecutor.evaluateNetworkAndFire(RuleExecutor.java:71) >> at >> org.drools.core.common.DefaultAgenda.fireNextItem(DefaultAgenda.java:935) >> at >> org.drools.core.common.DefaultAgenda.fireAllRules(DefaultAgenda.java:1200) >> at >> org.drools.core.common.AbstractWorkingMemory.fireAllRules(AbstractWorkingMemory.java:952) >> at >> org.drools.core.common.AbstractWorkingMemory.fireAllRules(AbstractWorkingMemory.java:926) >> at >> org.drools.core.impl.StatefulKnowledgeSessionImpl.fireAllRules(StatefulKnowledgeSessionImpl.java:232) >> at >> test.platform.rules.executor.service.impl.RuleExecutorServiceImplTest.testExecuteRule(RuleExecutorServiceImplTest.java:230) >> at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) >> at >> sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57) >> at >> sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) >> at java.lang.reflect.Method.invoke(Method.java:606) >> at >> org.junit.runners.model.FrameworkMethod$1.runReflectiveCall(FrameworkMethod.java:47) >> at >> org.junit.internal.runners.model.ReflectiveCallable.run(ReflectiveCallable.java:12) >> at >> org.junit.runners.model.FrameworkMethod.invokeExplosively(FrameworkMethod.java:44) >> at >> org.junit.internal.runners.statements.InvokeMethod.evaluate(InvokeMethod.java:17) >> at >> org.springframework.test.context.junit4.statements.RunBeforeTestMethodCallbacks.evaluate(RunBeforeTestMethodCallbacks.java:74) >> at >> org.springframework.test.context.junit4.statements.RunAfterTestMethodCallbacks.evaluate(RunAfterTestMethodCallbacks.java:83) >> at >> org.springframework.test.context.junit4.statements.SpringRepeat.evaluate(SpringRepeat.java:72) >> at >> org.springframework.test.context.junit4.SpringJUnit4ClassRunner.runChild(SpringJUnit4ClassRunner.java:232) >> at >> org.springframework.test.context.junit4.SpringJUnit4ClassRunner.runChild(SpringJUnit4ClassRunner.java:89) >> at org.junit.runners.ParentRunner$3.run(ParentRunner.java:238) >> at org.junit.runners.ParentRunner$1.schedule(ParentRunner.java:63) >> at org.junit.runners.ParentRunner.runChildren(ParentRunner.java:236) >> at org.junit.runners.ParentRunner.access$000(ParentRunner.java:53) >> at org.junit.runners.ParentRunner$2.evaluate(ParentRunner.java:229) >> at >> org.springframework.test.context.junit4.statements.RunBeforeTestClassCallbacks.evaluate(RunBeforeTestClassCallbacks.java:61) >> at >> org.springframework.test.context.junit4.statements.RunAfterTestClassCallbacks.evaluate(RunAfterTestClassCallbacks.java:71) >> at org.junit.runners.ParentRunner.run(ParentRunner.java:309) >> at >> org.springframework.test.context.junit4.SpringJUnit4ClassRunner.run(SpringJUnit4ClassRunner.java:175) >> at >> org.eclipse.jdt.internal.junit4.runner.JUnit4TestReference.run(JUnit4TestReference.java:50) >> at >> org.eclipse.jdt.internal.junit.runner.TestExecution.run(TestExecution.java:38) >> at >> org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:467) >> at >> org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:683) >> at >> org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.run(RemoteTestRunner.java:390) >> at >> org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.main(RemoteTestRunner.java:197) >> Caused by: java.lang.RuntimeException: cannot invoke method: info >> at >> org.mvel2.optimizers.impl.refl.nodes.MethodAccessor.getValue(MethodAccessor.java:63) >> at >> org.mvel2.optimizers.impl.refl.nodes.VariableAccessor.getValue(VariableAccessor.java:37) >> at org.mvel2.ast.ASTNode.getReducedValueAccelerated(ASTNode.java:108) >> at org.mvel2.MVELRuntime.execute(MVELRuntime.java:86) >> at >> org.mvel2.compiler.CompiledExpression.getDirectValue(CompiledExpression.java:123) >> at >> org.mvel2.compiler.CompiledExpression.getValue(CompiledExpression.java:119) >> at org.mvel2.MVEL.executeExpression(MVEL.java:930) >> at >> org.drools.core.base.mvel.MVELConsequence.evaluate(MVELConsequence.java:107) >> at >> org.drools.core.common.DefaultAgenda.fireActivation(DefaultAgenda.java:1016) >> ... 36 more >> Caused by: java.lang.ArrayIndexOutOfBoundsException: 1 >> at >> org.mvel2.optimizers.impl.refl.nodes.MethodAccessor.executeAll(MethodAccessor.java:140) >> at >> org.mvel2.optimizers.impl.refl.nodes.MethodAccessor.getValue(MethodAccessor.java:48) >> ... 44 more >> >> >> Example: My drl file looks like this - >> >> package test.system.rule; >> >> import test.platform.model.*; >> import org.slf4j.Logger; >> >> global Logger logger; >> >> rule "Test Logger 1" >> >> when >> >> then >> >> logger.info("within test logger 1"); >> >> end >> >> rule "Test Logger 2" >> >> when >> >> then >> >> logger.info("within test logger 2. Rule fired {}", >> drools.getRule().getName()); >> >> end >> >> >> While rules are firing then the first logger is getting printed into >> console >> but second one is not getting printed and giving the above exception to >> me. >> >> >> >> -- >> View this message in context: >> http://drools.46999.n3.nabble.com/Slf4j-Log4j-logger-not-working-with-Drools-drl-while-using-as-a-global-variable-tp4029707.html >> Sent from the Drools: User forum mailing list archive at Nabble.com. >> _______________________________________________ >> rules-users mailing list >> rules-users at lists.jboss.org >> https://lists.jboss.org/mailman/listinfo/rules-users >> > > > _______________________________________________ > rules-users mailing list > rules-users at lists.jboss.org > https://lists.jboss.org/mailman/listinfo/rules-users > From drpatrick.cosmo at gmail.com Tue May 27 05:42:59 2014 From: drpatrick.cosmo at gmail.com (crosbis2) Date: Tue, 27 May 2014 02:42:59 -0700 (PDT) Subject: [rules-users] Excel Syntax in Decision Tables In-Reply-To: References: <1399910129756-4029532.post@n3.nabble.com> <1399910293479-4029533.post@n3.nabble.com> <1399998865087-4029558.post@n3.nabble.com> <1401102022229-4029686.post@n3.nabble.com> <1401110928078-4029690.post@n3.nabble.com> <1401116813050-4029693.post@n3.nabble.com> Message-ID: <1401183779062-4029711.post@n3.nabble.com> Hi, i tried Classification(); $f: FATCA() type == $param $f is not recognized. and regular rearranging Classification(); fatca: FATCA() type == $param this doesn't give any errors but the rule doesn't work. I think fatca: FATCA() needs to be before Classification(type == 3); Is there any other tricks to make this happen? -- View this message in context: http://drools.46999.n3.nabble.com/Excel-Syntax-in-Decision-Tables-tp4029520p4029711.html Sent from the Drools: User forum mailing list archive at Nabble.com. From soumya.bose at plavaga.in Tue May 27 05:44:16 2014 From: soumya.bose at plavaga.in (Soumya.plavaga) Date: Tue, 27 May 2014 02:44:16 -0700 (PDT) Subject: [rules-users] Slf4j Log4j logger not working with Drools drl while using as a global variable. In-Reply-To: References: <1401167371055-4029707.post@n3.nabble.com> Message-ID: <1401183856171-4029712.post@n3.nabble.com> > Check if the logger isn't null (by adding a System.out in the then part > of the rule). We checked, logger is not null here. -- View this message in context: http://drools.46999.n3.nabble.com/Slf4j-Log4j-logger-not-working-with-Drools-6-1-0-Beta2-drl-while-using-as-a-global-variable-tp4029707p4029712.html Sent from the Drools: User forum mailing list archive at Nabble.com. From soumya.bose at plavaga.in Tue May 27 05:45:16 2014 From: soumya.bose at plavaga.in (Soumya.plavaga) Date: Tue, 27 May 2014 02:45:16 -0700 (PDT) Subject: [rules-users] Slf4j Log4j logger not working with Drools drl while using as a global variable. In-Reply-To: References: <1401167371055-4029707.post@n3.nabble.com> Message-ID: <1401183916581-4029713.post@n3.nabble.com> > @Soumya: Which Drools version are you using? Basically, this situation > is handled correctly by 5.4 and 5.5. We are using Drools version 6.1.0.Beta2. -- View this message in context: http://drools.46999.n3.nabble.com/Slf4j-Log4j-logger-not-working-with-Drools-6-1-0-Beta2-drl-while-using-as-a-global-variable-tp4029707p4029713.html Sent from the Drools: User forum mailing list archive at Nabble.com. From h.peter at mailbox.hu Tue May 27 05:48:16 2014 From: h.peter at mailbox.hu (=?UTF-8?B?UMOpdGVyIEdlcmdlbHksIEhvcnbDoXRo?=) Date: Tue, 27 May 2014 11:48:16 +0200 Subject: [rules-users] Drools 6 Eclipse debugger does not work? Message-ID: Hi All, I am evaluating Drools 6 for one of our projects but found a strange issue with Eclipse integration; debug functionality does not seem to work at all. Only Rules view displays the rules (which is I believe independent from the debugger) but all of the other views (Agenda, Audit, Global Data, Process Instance, Process Instances, Working Memory) are always empty. I have confirmed that Drools nature is enabled on the project (it is actually the example project generated by the Eclipse plugin) and I start my class as a Drools application in Debug mode. (It is the com.sample.DroolsTest from the plugin-generated sample project) My Eclipse environment is the following: Drools plugin installed: JBoss Drools Core 6.0.0.Final JBoss Drools Guvnor 6.0.0.Final JBoss jBPM Core 6.0.0.Final Eclipse release information: Spring Tool Suite Version: 3.5.1.RELEASE Build Id: 201405030657 Platform: Eclipse Juno SR2 (3.8.2) Version of Drools Runtime is 6.0.1 Final Does anyone have any idea what could be wrong? For me one of the most powerful features of Drools seemed to be its Eclipse-based rule debugging capability. Could someone please help fixing my Eclipse Drools setup? Thanks, Peter -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.jboss.org/pipermail/rules-users/attachments/20140527/ca86f4a3/attachment.html From h.peter at mailbox.hu Tue May 27 08:57:20 2014 From: h.peter at mailbox.hu (=?UTF-8?Q?Horv=C3=A1th_P=C3=A9ter_Gergely?=) Date: Tue, 27 May 2014 14:57:20 +0200 Subject: [rules-users] Abstraction between rules and data model? In-Reply-To: <53836491.5070202@gmail.com> References: <53836491.5070202@gmail.com> Message-ID: Hi Davide, Drools trait functionality is one of the powerful concepts which makes Drools a good candidate for the project. So keep up the good work! :) However I'm not sure if its current level of flexibility would be sufficient for our use case. I've checked the documentation, but haven't really found the term virtual field -- could you please elaborate on this? Do you think we could somehow hook into the evaluation of the aliases or the "fields" Map? Sometimes you would need slightly more than merely aliasing fields to something else; e.g. calculating values for the purpose of rule processing or extracting a value from a more complex object tree etc. Citing the example -- GoldenCustomer( fields[ "age" ] > 18 ) -- being able to get a reference to the target object and the field map expression "age" would be quite close to what I imagined. Our custom code could then perform the appropriate translation and return the requested value, hiding the fact whether "age" is an actual field in the Customer object itself/retrieved from an encapsulated complex object e.g. replacing expression "customer.personalInformation.birthData.age"/calculated on the flight. What do you think? Cheers, Peter 2014-05-26 17:58 GMT+02:00 Davide Sottara : > We are working on the trait framework for cases like this. Essentially, > it allows to use > interfaces when writing rules AND to inject the interfaces dynamically > at runtime, > at the instance level. It relies on transparent proxies which wrap the > data classes > and implement the required interfaces. A simple field aliasing mechanism > is provided > (work in progress). For more complex transformations, "virtual" fields > can be added. > See section 7.7.8 of the manual for more details and let me know if it > can help > with your use case. > Best, > Davide > > On 05/26/2014 09:55 AM, Wolfgang Laun wrote: > > Even a relatively sophisticated transformation would be easier to > implement > > and most certainly safer from changes in the unstable Drools API than > some > > hook-and-intercept mechanism built into Drools. > > > > Notice that violent structural departure of the model the BUs see from > what > > you call "persistence model" might make it impossible for the BUs to come > > up with rules that can be transformed to match the other model at all; > > if it is possible, rules might still incur a heavy performance penalty. > > > > It is (IMHO) a myth that "Rules" is a foolproof way of establishing > > business logic > > independent from the data model and application environment with which > > this logic should be able to cooperate. As long as everything is kept in > the > > abstract (i.e., formulated in terms of mathematics) it will look good, > but > > any implementation may throw a spanner in the works, or worse. > > > > -W > > > > On 26/05/2014, P?ter Gergely, Horv?th wrote: > >> Hi Wolfgang, > >> > >> Thank you for your input. You are right that some of the cases could > simply > >> be covered by regexp-replace, but I'm afraid, not all of them. > Interfaces > >> could also help, but we have a requirement that the business rules > should > >> not be tightly coupled to the underlying persistence model. (I > understand > >> that some might say this is not ideal, but that is our current > situation) > >> > >> I am wondering whether it is possible to hook into Drools engine and > >> intercept field value reference expression evaluations in run time (e.g > if > >> "foo.bars" is used in an expression, we could return "foo.barList") ? By > >> injecting some custom code, we could make the necessary decisions and > >> extract the proper value from an object. Unfortunately these parts of > >> Drools are pretty much undocumented. > >> > >> Regards, > >> Peter > >> > >> > >> > >> 2014-05-26 13:57 GMT+02:00 Wolfgang Laun : > >> > >>> What you describe can be done with /bin/sed. > >>> > >>> Notice that the DSL processor doesn't require you to translate entire > >>> patterns; there is a mechanism for translating "keywords", which is > >>> just arbitrary tokens to whatever replacement text. > >>> > >>> If a "bar" must be translated to a "barList" in the context of a class > >>> "Foo" but not in any other context, a more sophisticated translation > >>> is required in any case (with /bin/sed still being sufficient if > >>> patterns aren't split across lines). > >>> > >>> Some say that good design makes use of Interfaces, which leaves room > >>> for actual implementations being changed as long as the interfaces are > >>> implemented. Here, note that rules can be written against interface > >>> types. > >>> > >>> -W > >>> > >>> > >>> On 26/05/2014, P?ter Gergely, Horv?th wrote: > >>>> Hi All, > >>>> > >>>> We are evaluating Drools 6 for our use case, and face challenges where > >>>> we > >>>> would need some ideas from more experienced users of Drools. > >>>> > >>>> We have an application with a massive code base and a large number of > >>> model > >>>> (entity) classes. We are in the process of moving away from inherited > >>>> legacy technologies and refactoring the old code base. As a part of > >>>> this > >>>> work we would like extract some of the hard-coded business logic to > >>>> external rules, that is why we are looking at Drools as a potential > >>>> solution. > >>>> > >>>> What we would like to have is some kind of abstraction or mapping > >>>> between > >>>> actual entities and rules the business users can define so that they > do > >>> not > >>>> have to know the _exact_ details of the data model (field names, > >>>> precise > >>>> relations etc). This would be important for us so that we can refactor > >>> the > >>>> old model classes without affecting business rules; also it would make > >>> life > >>>> easier for the business users. While IDE support might make > refactoring > >>>> easier, we definitely want to have a separation between rules and > >>> entities. > >>>> Given our situation, writing and maintaining "stable" wrapper/adapter > >>>> classes for the sole purpose of rule processing is out of question. I > >>> have > >>>> checked the documentation of Drools DSL support and for me it seems to > >>>> be > >>>> overkill for our use case: we do not really need a custom language, > but > >>>> simply an abstraction between rules and the data model classes. > >>>> > >>>> What I could imagine is a piece of code, (a custom property resolver? > - > >>> no > >>>> sure how it is called) which maps property expressions to actual > >>> properties > >>>> based on a custom annotation on the entity class or something like > >>>> that, > >>> so > >>>> that a rule containing "Foo.bars" expression does not have to change > >>>> even > >>>> if we decide to rename "Foo.bars" to "Foo.barList" in the model > >>>> classes. > >>>> (This was just a simple example of a potential use cases) > >>>> > >>>> Could you please share your thoughts on this topic and point me into > >>>> the > >>>> right direction? > >>>> > >>>> Thanks, > >>>> Peter > >>>> > >>> _______________________________________________ > >>> rules-users mailing list > >>> rules-users at lists.jboss.org > >>> https://lists.jboss.org/mailman/listinfo/rules-users > >>> > > _______________________________________________ > > rules-users mailing list > > rules-users at lists.jboss.org > > https://lists.jboss.org/mailman/listinfo/rules-users > > > > _______________________________________________ > rules-users mailing list > rules-users at lists.jboss.org > https://lists.jboss.org/mailman/listinfo/rules-users > -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.jboss.org/pipermail/rules-users/attachments/20140527/b8365be6/attachment-0001.html From jpsteinmetz at theworkshop.us.com Tue May 27 13:38:18 2014 From: jpsteinmetz at theworkshop.us.com (Steinmetz, Jean-Philippe) Date: Tue, 27 May 2014 10:38:18 -0700 Subject: [rules-users] Persistence in Drools 6 In-Reply-To: References: Message-ID: Hi Charles, Thanks for your reference. I had tried using kie-spring but was unable to use it as it currently does not support creating sessions from a release id and container. I did this in order to be able to pick up on updates to the kjar from maven while the application is running the same way it used to work in Drools 5. Has anyone else with similar needs to mine gotten persistence working? Jean-Philippe On Thu, May 22, 2014 at 11:23 PM, Charles Moulliard wrote: > Hi Jean Philippe, > > I have recently created a project to persist bpmn process using Spring & > JPA / Hibernate. This config is working using kie-spring > > > https://github.com/cmoulliard/droolsjbpm-osgi-examples/blob/master/spring-jbpm-persistence/src/main/resources/META-INF/spring/context.xml > > Regards, > > Charles > > > On Thu, May 22, 2014 at 8:00 PM, Steinmetz, Jean-Philippe < > jpsteinmetz at theworkshop.us.com> wrote: > >> Hello All, >> >> I am trying to set up persistence for a standalone Drools (6.0.1.Final) >> application that uses JPA, Hibernate (4.3.5.Final) and Bitronix (2.1.4) via >> Spring (4.0.3.RELEASE). >> >> On the persistence side everything appears to be set up correctly. For my >> Drools session I use a KieContainer to create a new stateful session using >> an environment set up with the EntityManagerFactory and TransactionManager >> set. The problem that I am experiencing however is that nothing is getting >> persisted to the database. I have poured over the docs at least two dozen >> times and searched the net for anything related. >> >> Here is what my Spring context file looks like when creating the Drools >> session... >> >> > factory-method="newReleaseId"> >> >> >> >> >> > factory-method="newKieContainer"> >> >> >> > factory-method="newEnvironment"> >> >> >> >> > static-field="org.kie.api.runtime.EnvironmentName.ENTITY_MANAGER_FACTORY"/> >> >> >> >> > static-field="org.kie.api.runtime.EnvironmentName.TRANSACTION_MANAGER"/> >> >> >> >> >> >> > factory-method="newKieSession"> >> >> >> >> Since the application is standalone I execute fireAllRules on the session >> at a regular interval (I use this instead of fireUntilHalt as it >> dramatically reduces the CPU load on the machine). With each call I wrap it >> in a transaction. Thus, the code looks as follows: >> >> while (!Thread.currentThread().isInterrupted()) { >> // Start a new transaction >> UserTransaction utx = utx = (UserTransaction)new >> InitialContext().lookup("java:comp/UserTransaction"); >> utx.begin(); >> >> // Tick the session >> kSession.fireAllRules(); >> >> // Close the transaction >> utx.commit(); >> >> // Sleep so that other applications can use the CPU >> try { >> Thread.sleep(1); >> } catch (InterruptedException e) { >> // When our sleep is interrupted it's because the >> executor wants us to shut down. >> Thread.currentThread().interrupt(); >> } >> } >> >> When I inspect kSession in the debugger I can see the environment is >> properly set. I have tried digging down into the execute a bit but can't >> find any point at which the TransactionManager or EntityManagerFactory are >> used. As I said above I know Hibernate is set up correctly as well as >> Bitronix. I can see them working just fine in the logs and they definitely >> are hitting the database (and create tables for sessioninfo and >> workingmemory as they should). I just get nothing actually in the database >> stored, ever. >> >> Any help here is appreciated. It seems like it should work but it just >> doesn't. >> >> Thanks in advance, >> >> Jean-Philippe Steinmetz >> >> >> _______________________________________________ >> rules-users mailing list >> rules-users at lists.jboss.org >> https://lists.jboss.org/mailman/listinfo/rules-users >> > > > > -- > Charles Moulliard > Apache Committer / Architect @RedHat > Twitter : @cmoulliard | Blog : http://cmoulliard.github.io > > > _______________________________________________ > rules-users mailing list > rules-users at lists.jboss.org > https://lists.jboss.org/mailman/listinfo/rules-users > -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.jboss.org/pipermail/rules-users/attachments/20140527/7b6261d8/attachment.html From dsotty at gmail.com Tue May 27 13:42:21 2014 From: dsotty at gmail.com (Davide Sottara) Date: Tue, 27 May 2014 12:42:21 -0500 Subject: [rules-users] Abstraction between rules and data model? In-Reply-To: References: <53836491.5070202@gmail.com> Message-ID: <5384CE7D.6070901@gmail.com> Consider that a trait is an interface applied to some class. In the context of the pair: A "hard" field is a property (get/set) exposed by the interface AND the underlying class A "soft" (or "virtual") field is a property exposed by the interface BUT NOT by the underlying class A "hidden" field is a field of the underlying class NOT exposed by the interface Hard and Soft fields can be accessed using the interface, hidden fields are accessible using the map-like construct fields[ "fieldName" ]. This said, the mapping is by default done using the property name and (then) the property type. However, this mapping can be decoupled using the annotation @Alias() on either the class OR the trait. E.g. declare Core name : String @Alias( "any-Id-or-even-an-IRI-here" ) end declare trait SomeTrait label : String @Alias( "..." ) // if two "aliases" match, this will be considered a hard field end The "accessor", i.e. the ability to bind a trait property to a (possibly deeply) nested path is what I'm working on these days, I have the same requirement from another urgent use case For the time being, you can probably create a "shortcut" accessor pair in your implementation class, to execute the complex expression, and @Alias it to the trait field. Please let me know if you find any issue/bugs and any feature request you may have! Best Davide On 05/27/2014 07:57 AM, Horv?th P?ter Gergely wrote: > Hi Davide, > > Drools trait functionality is one of the powerful concepts which makes > Drools a good candidate for the project. So keep up the good work! :) > However I'm not sure if its current level of flexibility would be > sufficient for our use case. I've checked the documentation, but > haven't really found the term virtual field -- could you please > elaborate on this? > > Do you think we could somehow hook into the evaluation of the aliases > or the "fields" Map? Sometimes you would need slightly more than > merely aliasing fields to something else; e.g. calculating values for > the purpose of rule processing or extracting a value from a more > complex object tree etc. Citing the example -- GoldenCustomer( fields[ > "age" ] > 18 ) -- being able to get a reference to the target object > and the field map expression "age" would be quite close to what I > imagined. Our custom code could then perform the appropriate > translation and return the requested value, hiding the fact whether > "age" is an actual field in the Customer object itself/retrieved from > an encapsulated complex object e.g. replacing expression > "customer.personalInformation.birthData.age"/calculated on the flight. > > > What do you think? > > Cheers, > Peter > > > > 2014-05-26 17:58 GMT+02:00 Davide Sottara >: > > We are working on the trait framework for cases like this. > Essentially, > it allows to use > interfaces when writing rules AND to inject the interfaces dynamically > at runtime, > at the instance level. It relies on transparent proxies which wrap the > data classes > and implement the required interfaces. A simple field aliasing > mechanism > is provided > (work in progress). For more complex transformations, "virtual" fields > can be added. > See section 7.7.8 of the manual for more details and let me know if it > can help > with your use case. > Best, > Davide > > On 05/26/2014 09:55 AM, Wolfgang Laun wrote: > > Even a relatively sophisticated transformation would be easier > to implement > > and most certainly safer from changes in the unstable Drools API > than some > > hook-and-intercept mechanism built into Drools. > > > > Notice that violent structural departure of the model the BUs > see from what > > you call "persistence model" might make it impossible for the > BUs to come > > up with rules that can be transformed to match the other model > at all; > > if it is possible, rules might still incur a heavy performance > penalty. > > > > It is (IMHO) a myth that "Rules" is a foolproof way of establishing > > business logic > > independent from the data model and application environment with > which > > this logic should be able to cooperate. As long as everything is > kept in the > > abstract (i.e., formulated in terms of mathematics) it will look > good, but > > any implementation may throw a spanner in the works, or worse. > > > > -W > > > > On 26/05/2014, P?ter Gergely, Horv?th > wrote: > >> Hi Wolfgang, > >> > >> Thank you for your input. You are right that some of the cases > could simply > >> be covered by regexp-replace, but I'm afraid, not all of them. > Interfaces > >> could also help, but we have a requirement that the business > rules should > >> not be tightly coupled to the underlying persistence model. (I > understand > >> that some might say this is not ideal, but that is our current > situation) > >> > >> I am wondering whether it is possible to hook into Drools > engine and > >> intercept field value reference expression evaluations in run > time (e.g if > >> "foo.bars" is used in an expression, we could return > "foo.barList") ? By > >> injecting some custom code, we could make the necessary > decisions and > >> extract the proper value from an object. Unfortunately these > parts of > >> Drools are pretty much undocumented. > >> > >> Regards, > >> Peter > >> > >> > >> > >> 2014-05-26 13:57 GMT+02:00 Wolfgang Laun > >: > >> > >>> What you describe can be done with /bin/sed. > >>> > >>> Notice that the DSL processor doesn't require you to translate > entire > >>> patterns; there is a mechanism for translating "keywords", > which is > >>> just arbitrary tokens to whatever replacement text. > >>> > >>> If a "bar" must be translated to a "barList" in the context of > a class > >>> "Foo" but not in any other context, a more sophisticated > translation > >>> is required in any case (with /bin/sed still being sufficient if > >>> patterns aren't split across lines). > >>> > >>> Some say that good design makes use of Interfaces, which > leaves room > >>> for actual implementations being changed as long as the > interfaces are > >>> implemented. Here, note that rules can be written against > interface > >>> types. > >>> > >>> -W > >>> > >>> > >>> On 26/05/2014, P?ter Gergely, Horv?th > wrote: > >>>> Hi All, > >>>> > >>>> We are evaluating Drools 6 for our use case, and face > challenges where > >>>> we > >>>> would need some ideas from more experienced users of Drools. > >>>> > >>>> We have an application with a massive code base and a large > number of > >>> model > >>>> (entity) classes. We are in the process of moving away from > inherited > >>>> legacy technologies and refactoring the old code base. As a > part of > >>>> this > >>>> work we would like extract some of the hard-coded business > logic to > >>>> external rules, that is why we are looking at Drools as a > potential > >>>> solution. > >>>> > >>>> What we would like to have is some kind of abstraction or mapping > >>>> between > >>>> actual entities and rules the business users can define so > that they do > >>> not > >>>> have to know the _exact_ details of the data model (field names, > >>>> precise > >>>> relations etc). This would be important for us so that we can > refactor > >>> the > >>>> old model classes without affecting business rules; also it > would make > >>> life > >>>> easier for the business users. While IDE support might make > refactoring > >>>> easier, we definitely want to have a separation between rules and > >>> entities. > >>>> Given our situation, writing and maintaining "stable" > wrapper/adapter > >>>> classes for the sole purpose of rule processing is out of > question. I > >>> have > >>>> checked the documentation of Drools DSL support and for me it > seems to > >>>> be > >>>> overkill for our use case: we do not really need a custom > language, but > >>>> simply an abstraction between rules and the data model classes. > >>>> > >>>> What I could imagine is a piece of code, (a custom property > resolver? - > >>> no > >>>> sure how it is called) which maps property expressions to actual > >>> properties > >>>> based on a custom annotation on the entity class or something > like > >>>> that, > >>> so > >>>> that a rule containing "Foo.bars" expression does not have to > change > >>>> even > >>>> if we decide to rename "Foo.bars" to "Foo.barList" in the model > >>>> classes. > >>>> (This was just a simple example of a potential use cases) > >>>> > >>>> Could you please share your thoughts on this topic and point > me into > >>>> the > >>>> right direction? > >>>> > >>>> Thanks, > >>>> Peter > >>>> > >>> _______________________________________________ > >>> rules-users mailing list > >>> rules-users at lists.jboss.org > >>> https://lists.jboss.org/mailman/listinfo/rules-users > >>> > > _______________________________________________ > > rules-users mailing list > > rules-users at lists.jboss.org > > https://lists.jboss.org/mailman/listinfo/rules-users > > > > _______________________________________________ > rules-users mailing list > rules-users at lists.jboss.org > https://lists.jboss.org/mailman/listinfo/rules-users > > > > > _______________________________________________ > rules-users mailing list > rules-users at lists.jboss.org > https://lists.jboss.org/mailman/listinfo/rules-users -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.jboss.org/pipermail/rules-users/attachments/20140527/40beb3c4/attachment-0001.html From christopher.johnston at netboss.com Tue May 27 16:37:01 2014 From: christopher.johnston at netboss.com (cjohns13) Date: Tue, 27 May 2014 13:37:01 -0700 (PDT) Subject: [rules-users] how to create kbases with useful names for JMX Message-ID: <1401223021912-4029719.post@n3.nabble.com> How can I create new container / knowledgebases so that the names as shown in JMX are not random UUID() strings? Something like this currently: KieContainer container = KieServices.Factory.get().newKieContainer(releaseId); container.newKieSession("myName"); When you enable mbeans via Kie.mbeans.enabled=true Yields, in JMX: objectName: org.drools.kbases:type=2d4ffdab-2aca-4d5d-8c44-a5031c4d4094 but, would rather have it be org.drools.kbases:type=myName How can I create the container/kbase/session so it gets a good name, as it stands now? I can see in KnowledgeBaseFactoryServiceImpl.java that there is a way to set this kbaseId, but can't figure out a way to actually set this at the high level. -- View this message in context: http://drools.46999.n3.nabble.com/how-to-create-kbases-with-useful-names-for-JMX-tp4029719.html Sent from the Drools: User forum mailing list archive at Nabble.com. From jpsteinmetz at theworkshop.us.com Tue May 27 17:29:15 2014 From: jpsteinmetz at theworkshop.us.com (Steinmetz, Jean-Philippe) Date: Tue, 27 May 2014 14:29:15 -0700 Subject: [rules-users] Using git-p4 with workbench In-Reply-To: References: Message-ID: Hi Mark, Thanks for the reply. I have tried creating a new repo in the workbench and then using git-p4 on the command line sync'd perforce to it in the appropriate .niogit directory (per the git-p4 docs this use case is how you add p4 to an existing git repo). However, I am not seeing the working files anywhere. Where does the workbench store the work tree? Jean-Philippe On Thu, May 22, 2014 at 3:45 PM, Mark Proctor wrote: > We use JGit and I don?t believe (but could be wrong) it has direct p4 > support, like this git extension offers. > http://git-scm.com/docs/git-p4 > > However Git is distributed, so just clone and sync a p4 repo with this Git > command line tool and use it as an intermediary. Then merge/mirror this > intermediary with our JGit repo. > > Mark > > On 22 May 2014, at 22:28, Steinmetz, Jean-Philippe < > jpsteinmetz at theworkshop.us.com> wrote: > > > Hi, > > > > Has anyone tried using a VCS bridge for git with the Drools 6 workbench? > Specifically I am interested in git-p4 so that I can access an existing > maven project that is currently stored in Perforce. Is this use case > supported? > > > > Thanks in advance, > > > > Jean-Philippe > > _______________________________________________ > > rules-users mailing list > > rules-users at lists.jboss.org > > https://lists.jboss.org/mailman/listinfo/rules-users > > > _______________________________________________ > rules-users mailing list > rules-users at lists.jboss.org > https://lists.jboss.org/mailman/listinfo/rules-users > -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.jboss.org/pipermail/rules-users/attachments/20140527/ee27ff96/attachment.html From mproctor at codehaus.org Tue May 27 18:27:58 2014 From: mproctor at codehaus.org (Mark Proctor) Date: Tue, 27 May 2014 23:27:58 +0100 Subject: [rules-users] Using git-p4 with workbench In-Reply-To: References: Message-ID: <0350DC55-5F73-4E24-A039-0030CE9DBD42@codehaus.org> don?t touch the .niogit folder. You have your git-p4 repo, that you cloned. Now push it to the ssh connection of the Guvnor server. Mark On 27 May 2014, at 22:29, Steinmetz, Jean-Philippe wrote: > Hi Mark, > > Thanks for the reply. I have tried creating a new repo in the workbench and then using git-p4 on the command line sync'd perforce to it in the appropriate .niogit directory (per the git-p4 docs this use case is how you add p4 to an existing git repo). However, I am not seeing the working files anywhere. Where does the workbench store the work tree? > > Jean-Philippe > > > On Thu, May 22, 2014 at 3:45 PM, Mark Proctor wrote: > We use JGit and I don?t believe (but could be wrong) it has direct p4 support, like this git extension offers. > http://git-scm.com/docs/git-p4 > > However Git is distributed, so just clone and sync a p4 repo with this Git command line tool and use it as an intermediary. Then merge/mirror this intermediary with our JGit repo. > > Mark > > On 22 May 2014, at 22:28, Steinmetz, Jean-Philippe wrote: > > > Hi, > > > > Has anyone tried using a VCS bridge for git with the Drools 6 workbench? Specifically I am interested in git-p4 so that I can access an existing maven project that is currently stored in Perforce. Is this use case supported? > > > > Thanks in advance, > > > > Jean-Philippe > > _______________________________________________ > > rules-users mailing list > > rules-users at lists.jboss.org > > https://lists.jboss.org/mailman/listinfo/rules-users > > > _______________________________________________ > rules-users mailing list > rules-users at lists.jboss.org > https://lists.jboss.org/mailman/listinfo/rules-users > > _______________________________________________ > rules-users mailing list > rules-users at lists.jboss.org > https://lists.jboss.org/mailman/listinfo/rules-users -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.jboss.org/pipermail/rules-users/attachments/20140527/f1988d69/attachment.html From jpsteinmetz at theworkshop.us.com Tue May 27 20:11:13 2014 From: jpsteinmetz at theworkshop.us.com (Steinmetz, Jean-Philippe) Date: Tue, 27 May 2014 17:11:13 -0700 Subject: [rules-users] Using git-p4 with workbench In-Reply-To: <0350DC55-5F73-4E24-A039-0030CE9DBD42@codehaus.org> References: <0350DC55-5F73-4E24-A039-0030CE9DBD42@codehaus.org> Message-ID: Hrm okay. Pushing from the git-p4 clone to the workbench doesn't really help either though. The bridge needs to be bi-directional. Meaning, the latest changes in perforce should be sync'd into the workbench regularly and any commits to the workbench need to be pushed back to perforce. Perhaps instead I need to set up the git-p4 clone as git server itself that the workbench can clone. If I do that will it push back to that server? or does the workbench not play nice that way? Also, does the workbench perform regular fetches on a cloned repo? On Tue, May 27, 2014 at 3:27 PM, Mark Proctor wrote: > don?t touch the .niogit folder. You have your git-p4 repo, that you > cloned. Now push it to the ssh connection of the Guvnor server. > > Mark > > On 27 May 2014, at 22:29, Steinmetz, Jean-Philippe < > jpsteinmetz at theworkshop.us.com> wrote: > > Hi Mark, > > Thanks for the reply. I have tried creating a new repo in the workbench > and then using git-p4 on the command line sync'd perforce to it in the > appropriate .niogit directory (per the git-p4 docs this use case is how you > add p4 to an existing git repo). However, I am not seeing the working files > anywhere. Where does the workbench store the work tree? > > Jean-Philippe > > > On Thu, May 22, 2014 at 3:45 PM, Mark Proctor wrote: > >> We use JGit and I don?t believe (but could be wrong) it has direct p4 >> support, like this git extension offers. >> http://git-scm.com/docs/git-p4 >> >> However Git is distributed, so just clone and sync a p4 repo with this >> Git command line tool and use it as an intermediary. Then merge/mirror this >> intermediary with our JGit repo. >> >> Mark >> >> On 22 May 2014, at 22:28, Steinmetz, Jean-Philippe < >> jpsteinmetz at theworkshop.us.com> wrote: >> >> > Hi, >> > >> > Has anyone tried using a VCS bridge for git with the Drools 6 >> workbench? Specifically I am interested in git-p4 so that I can access an >> existing maven project that is currently stored in Perforce. Is this use >> case supported? >> > >> > Thanks in advance, >> > >> > Jean-Philippe >> > _______________________________________________ >> > rules-users mailing list >> > rules-users at lists.jboss.org >> > https://lists.jboss.org/mailman/listinfo/rules-users >> >> >> _______________________________________________ >> rules-users mailing list >> rules-users at lists.jboss.org >> https://lists.jboss.org/mailman/listinfo/rules-users >> > > _______________________________________________ > rules-users mailing list > rules-users at lists.jboss.org > https://lists.jboss.org/mailman/listinfo/rules-users > > > > _______________________________________________ > rules-users mailing list > rules-users at lists.jboss.org > https://lists.jboss.org/mailman/listinfo/rules-users > -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.jboss.org/pipermail/rules-users/attachments/20140527/b77e6eb6/attachment.html From mproctor at codehaus.org Tue May 27 20:20:58 2014 From: mproctor at codehaus.org (Mark Proctor) Date: Wed, 28 May 2014 01:20:58 +0100 Subject: [rules-users] Using git-p4 with workbench In-Reply-To: References: <0350DC55-5F73-4E24-A039-0030CE9DBD42@codehaus.org> Message-ID: You can bi-drection sync git, if you know what you are doing. But these are more GIT Qs, and better asked on the GIT mailing list. Lot?s of stack exchange entries too for two way git sync http://stackoverflow.com/questions/15056327/how-do-i-synchronise-two-remote-git-repositories Mark On 28 May 2014, at 01:11, Steinmetz, Jean-Philippe wrote: > Hrm okay. Pushing from the git-p4 clone to the workbench doesn't really help either though. The bridge needs to be bi-directional. Meaning, the latest changes in perforce should be sync'd into the workbench regularly and any commits to the workbench need to be pushed back to perforce. Perhaps instead I need to set up the git-p4 clone as git server itself that the workbench can clone. If I do that will it push back to that server? or does the workbench not play nice that way? Also, does the workbench perform regular fetches on a cloned repo? > > > On Tue, May 27, 2014 at 3:27 PM, Mark Proctor wrote: > don?t touch the .niogit folder. You have your git-p4 repo, that you cloned. Now push it to the ssh connection of the Guvnor server. > Mark > > On 27 May 2014, at 22:29, Steinmetz, Jean-Philippe wrote: > >> Hi Mark, >> >> Thanks for the reply. I have tried creating a new repo in the workbench and then using git-p4 on the command line sync'd perforce to it in the appropriate .niogit directory (per the git-p4 docs this use case is how you add p4 to an existing git repo). However, I am not seeing the working files anywhere. Where does the workbench store the work tree? >> >> Jean-Philippe >> >> >> On Thu, May 22, 2014 at 3:45 PM, Mark Proctor wrote: >> We use JGit and I don?t believe (but could be wrong) it has direct p4 support, like this git extension offers. >> http://git-scm.com/docs/git-p4 >> >> However Git is distributed, so just clone and sync a p4 repo with this Git command line tool and use it as an intermediary. Then merge/mirror this intermediary with our JGit repo. >> >> Mark >> >> On 22 May 2014, at 22:28, Steinmetz, Jean-Philippe wrote: >> >> > Hi, >> > >> > Has anyone tried using a VCS bridge for git with the Drools 6 workbench? Specifically I am interested in git-p4 so that I can access an existing maven project that is currently stored in Perforce. Is this use case supported? >> > >> > Thanks in advance, >> > >> > Jean-Philippe >> > _______________________________________________ >> > rules-users mailing list >> > rules-users at lists.jboss.org >> > https://lists.jboss.org/mailman/listinfo/rules-users >> >> >> _______________________________________________ >> rules-users mailing list >> rules-users at lists.jboss.org >> https://lists.jboss.org/mailman/listinfo/rules-users >> >> _______________________________________________ >> rules-users mailing list >> rules-users at lists.jboss.org >> https://lists.jboss.org/mailman/listinfo/rules-users > > > _______________________________________________ > rules-users mailing list > rules-users at lists.jboss.org > https://lists.jboss.org/mailman/listinfo/rules-users > > _______________________________________________ > rules-users mailing list > rules-users at lists.jboss.org > https://lists.jboss.org/mailman/listinfo/rules-users -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.jboss.org/pipermail/rules-users/attachments/20140528/d454fd07/attachment-0001.html From mproctor at codehaus.org Tue May 27 22:07:47 2014 From: mproctor at codehaus.org (Mark Proctor) Date: Wed, 28 May 2014 03:07:47 +0100 Subject: [rules-users] Drools 6 Eclipse debugger does not work? In-Reply-To: References: Message-ID: Our Eclipse tooling hasn?t received much love over the years, and no one from community has ever stepped up :( We might have some one internal to RHT that might be able to help in the near future, but that will take a few weeks before I hear anything. We in the Drools team tend to stick with plain text editors and logging :) Mark On 27 May 2014, at 10:48, P?ter Gergely, Horv?th wrote: > Hi All, > > I am evaluating Drools 6 for one of our projects but found a strange issue with Eclipse integration; debug functionality does not seem to work at all. Only Rules view displays the rules (which is I believe independent from the debugger) but all of the other views (Agenda, Audit, Global Data, Process Instance, Process Instances, Working Memory) are always empty. > > I have confirmed that Drools nature is enabled on the project (it is actually the example project generated by the Eclipse plugin) and I start my class as a Drools application in Debug mode. (It is the com.sample.DroolsTest from the plugin-generated sample project) > > My Eclipse environment is the following: > > Drools plugin installed: > JBoss Drools Core 6.0.0.Final > JBoss Drools Guvnor 6.0.0.Final > JBoss jBPM Core 6.0.0.Final > > Eclipse release information: > Spring Tool Suite > Version: 3.5.1.RELEASE > Build Id: 201405030657 > Platform: Eclipse Juno SR2 (3.8.2) > > Version of Drools Runtime is 6.0.1 Final > > > Does anyone have any idea what could be wrong? For me one of the most powerful features of Drools seemed to be its Eclipse-based rule debugging capability. Could someone please help fixing my Eclipse Drools setup? > > Thanks, > Peter > > > _______________________________________________ > rules-users mailing list > rules-users at lists.jboss.org > https://lists.jboss.org/mailman/listinfo/rules-users From code4dc at gmail.com Tue May 27 22:11:26 2014 From: code4dc at gmail.com (code4dc) Date: Tue, 27 May 2014 21:11:26 -0500 Subject: [rules-users] Drools 6 Eclipse debugger does not work? In-Reply-To: References: Message-ID: Try switching the rule dialect to ?mvel? ?and setting a debug point in the consequences section. ?? Eugene Shvartsman code4dc On May 27, 2014 at 4:48:49 AM, P?ter Gergely, Horv?th (h.peter at mailbox.hu) wrote: I am evaluating Drools 6 for one of our projects but found a strange issue with Eclipse integration; debug functionality does not seem to work at all. Only Rules view displays the rules (which is I believe independent from the debugger) but all of the other views (Agenda, Audit, Global Data, Process Instance, Process Instances, Working Memory) are always empty.? -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.jboss.org/pipermail/rules-users/attachments/20140527/82768eaa/attachment.html From ch007m at gmail.com Wed May 28 02:42:13 2014 From: ch007m at gmail.com (Charles Moulliard) Date: Wed, 28 May 2014 08:42:13 +0200 Subject: [rules-users] Persistence in Drools 6 In-Reply-To: References: Message-ID: Hi Jean-Philippe, To pickup new updates, then you should use KieScanner (part of kie-ci project) which allows you to do incremental build if a new kjar has been published/released. Here is an example : https://github.com/droolsjbpm/drools/blob/master/kie-ci/src/test/java/org/kie/scanner/KieScannerIncrementalCompilationTest.java Regards, On Tue, May 27, 2014 at 7:38 PM, Steinmetz, Jean-Philippe < jpsteinmetz at theworkshop.us.com> wrote: > Hi Charles, > > Thanks for your reference. I had tried using kie-spring but was unable to > use it as it currently does not support creating sessions from a release id > and container. I did this in order to be able to pick up on updates to the > kjar from maven while the application is running the same way it used to > work in Drools 5. Has anyone else with similar needs to mine gotten > persistence working? > > Jean-Philippe > > > On Thu, May 22, 2014 at 11:23 PM, Charles Moulliard wrote: > >> Hi Jean Philippe, >> >> I have recently created a project to persist bpmn process using Spring & >> JPA / Hibernate. This config is working using kie-spring >> >> >> https://github.com/cmoulliard/droolsjbpm-osgi-examples/blob/master/spring-jbpm-persistence/src/main/resources/META-INF/spring/context.xml >> >> Regards, >> >> Charles >> >> >> On Thu, May 22, 2014 at 8:00 PM, Steinmetz, Jean-Philippe < >> jpsteinmetz at theworkshop.us.com> wrote: >> >>> Hello All, >>> >>> I am trying to set up persistence for a standalone Drools (6.0.1.Final) >>> application that uses JPA, Hibernate (4.3.5.Final) and Bitronix (2.1.4) via >>> Spring (4.0.3.RELEASE). >>> >>> On the persistence side everything appears to be set up correctly. For >>> my Drools session I use a KieContainer to create a new stateful session >>> using an environment set up with the EntityManagerFactory and >>> TransactionManager set. The problem that I am experiencing however is that >>> nothing is getting persisted to the database. I have poured over the docs >>> at least two dozen times and searched the net for anything related. >>> >>> Here is what my Spring context file looks like when creating the Drools >>> session... >>> >>> >> factory-method="newReleaseId"> >>> >>> >>> >>> >>> >> factory-method="newKieContainer"> >>> >>> >>> >> factory-method="newEnvironment"> >>> >>> >>> >>> >> static-field="org.kie.api.runtime.EnvironmentName.ENTITY_MANAGER_FACTORY"/> >>> >>> >>> >>> >> static-field="org.kie.api.runtime.EnvironmentName.TRANSACTION_MANAGER"/> >>> >>> >>> >>> >>> >>> >> factory-method="newKieSession"> >>> >>> >>> >>> Since the application is standalone I execute fireAllRules on the >>> session at a regular interval (I use this instead of fireUntilHalt as it >>> dramatically reduces the CPU load on the machine). With each call I wrap it >>> in a transaction. Thus, the code looks as follows: >>> >>> while (!Thread.currentThread().isInterrupted()) { >>> // Start a new transaction >>> UserTransaction utx = utx = (UserTransaction)new >>> InitialContext().lookup("java:comp/UserTransaction"); >>> utx.begin(); >>> >>> // Tick the session >>> kSession.fireAllRules(); >>> >>> // Close the transaction >>> utx.commit(); >>> >>> // Sleep so that other applications can use the CPU >>> try { >>> Thread.sleep(1); >>> } catch (InterruptedException e) { >>> // When our sleep is interrupted it's because the >>> executor wants us to shut down. >>> Thread.currentThread().interrupt(); >>> } >>> } >>> >>> When I inspect kSession in the debugger I can see the environment is >>> properly set. I have tried digging down into the execute a bit but can't >>> find any point at which the TransactionManager or EntityManagerFactory are >>> used. As I said above I know Hibernate is set up correctly as well as >>> Bitronix. I can see them working just fine in the logs and they definitely >>> are hitting the database (and create tables for sessioninfo and >>> workingmemory as they should). I just get nothing actually in the database >>> stored, ever. >>> >>> Any help here is appreciated. It seems like it should work but it just >>> doesn't. >>> >>> Thanks in advance, >>> >>> Jean-Philippe Steinmetz >>> >>> >>> _______________________________________________ >>> rules-users mailing list >>> rules-users at lists.jboss.org >>> https://lists.jboss.org/mailman/listinfo/rules-users >>> >> >> >> >> -- >> Charles Moulliard >> Apache Committer / Architect @RedHat >> Twitter : @cmoulliard | Blog : http://cmoulliard.github.io >> >> >> _______________________________________________ >> rules-users mailing list >> rules-users at lists.jboss.org >> https://lists.jboss.org/mailman/listinfo/rules-users >> > > > _______________________________________________ > rules-users mailing list > rules-users at lists.jboss.org > https://lists.jboss.org/mailman/listinfo/rules-users > -- Charles Moulliard Apache Committer / Architect @RedHat Twitter : @cmoulliard | Blog : http://cmoulliard.github.io -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.jboss.org/pipermail/rules-users/attachments/20140528/c627ca81/attachment.html From h.peter at mailbox.hu Wed May 28 05:08:25 2014 From: h.peter at mailbox.hu (=?UTF-8?B?UMOpdGVyIEdlcmdlbHksIEhvcnbDoXRo?=) Date: Wed, 28 May 2014 11:08:25 +0200 Subject: [rules-users] Abstraction between rules and data model? In-Reply-To: <5384CE7D.6070901@gmail.com> References: <53836491.5070202@gmail.com> <5384CE7D.6070901@gmail.com> Message-ID: Thanks for the explanation, I was a bit confused because of the terminology; "virtual" is not mentioned in the docs. ;) Is there any plan for the public release of Trait property binding to a nested path? We would definitely need something like that in our environment. Or do you see any way we could hook into the property look-up mechanism? Based on what I know, I don't see any official extension point for that. My only idea would be using some Java proxy voodoo-magic to wrap objects before they are inserted to the session, but my gut feeling is that it would be a way to debug hell... What do you think? Cheers, Peter 2014-05-27 19:42 GMT+02:00 Davide Sottara : > Consider that a trait is an interface applied to some class. In the > context of the pair: > A "hard" field is a property (get/set) exposed by the interface AND the > underlying class > A "soft" (or "virtual") field is a property exposed by the interface BUT > NOT by the underlying class > A "hidden" field is a field of the underlying class NOT exposed by the > interface > > Hard and Soft fields can be accessed using the interface, hidden fields > are accessible using the map-like > construct fields[ "fieldName" ]. > > This said, > the mapping is by default done using the property name and (then) the > property type. > However, this mapping can be decoupled using the annotation @Alias() on > either the class OR the trait. > E.g. > declare Core > name : String @Alias( "any-Id-or-even-an-IRI-here" ) > end > > declare trait SomeTrait > label : String @Alias( "..." ) // if two "aliases" match, this will > be considered a hard field > end > > The "accessor", i.e. the ability to bind a trait property to a (possibly > deeply) nested path is what I'm working > on these days, I have the same requirement from another urgent use case > > For the time being, you can probably create a "shortcut" accessor pair in > your implementation class, > to execute the complex expression, and @Alias it to the trait field. > > Please let me know if you find any issue/bugs and any feature request you > may have! > Best > Davide > > > > On 05/27/2014 07:57 AM, Horv?th P?ter Gergely wrote: > > Hi Davide, > > Drools trait functionality is one of the powerful concepts which makes > Drools a good candidate for the project. So keep up the good work! :) > However I'm not sure if its current level of flexibility would be > sufficient for our use case. I've checked the documentation, but haven't > really found the term virtual field -- could you please elaborate on this? > > Do you think we could somehow hook into the evaluation of the aliases or > the "fields" Map? Sometimes you would need slightly more than merely > aliasing fields to something else; e.g. calculating values for the purpose > of rule processing or extracting a value from a more complex object tree > etc. Citing the example -- GoldenCustomer( fields[ "age" ] > 18 ) -- being > able to get a reference to the target object and the field map expression > "age" would be quite close to what I imagined. Our custom code could then > perform the appropriate translation and return the requested value, hiding > the fact whether "age" is an actual field in the Customer object > itself/retrieved from an encapsulated complex object e.g. replacing > expression "customer.personalInformation.birthData.age"/calculated on the > flight. > > What do you think? > > Cheers, > Peter > > > > 2014-05-26 17:58 GMT+02:00 Davide Sottara : > >> We are working on the trait framework for cases like this. Essentially, >> it allows to use >> interfaces when writing rules AND to inject the interfaces dynamically >> at runtime, >> at the instance level. It relies on transparent proxies which wrap the >> data classes >> and implement the required interfaces. A simple field aliasing mechanism >> is provided >> (work in progress). For more complex transformations, "virtual" fields >> can be added. >> See section 7.7.8 of the manual for more details and let me know if it >> can help >> with your use case. >> Best, >> Davide >> >> On 05/26/2014 09:55 AM, Wolfgang Laun wrote: >> > Even a relatively sophisticated transformation would be easier to >> implement >> > and most certainly safer from changes in the unstable Drools API than >> some >> > hook-and-intercept mechanism built into Drools. >> > >> > Notice that violent structural departure of the model the BUs see from >> what >> > you call "persistence model" might make it impossible for the BUs to >> come >> > up with rules that can be transformed to match the other model at all; >> > if it is possible, rules might still incur a heavy performance penalty. >> > >> > It is (IMHO) a myth that "Rules" is a foolproof way of establishing >> > business logic >> > independent from the data model and application environment with which >> > this logic should be able to cooperate. As long as everything is kept >> in the >> > abstract (i.e., formulated in terms of mathematics) it will look good, >> but >> > any implementation may throw a spanner in the works, or worse. >> > >> > -W >> > >> > On 26/05/2014, P?ter Gergely, Horv?th wrote: >> >> Hi Wolfgang, >> >> >> >> Thank you for your input. You are right that some of the cases could >> simply >> >> be covered by regexp-replace, but I'm afraid, not all of them. >> Interfaces >> >> could also help, but we have a requirement that the business rules >> should >> >> not be tightly coupled to the underlying persistence model. (I >> understand >> >> that some might say this is not ideal, but that is our current >> situation) >> >> >> >> I am wondering whether it is possible to hook into Drools engine and >> >> intercept field value reference expression evaluations in run time >> (e.g if >> >> "foo.bars" is used in an expression, we could return "foo.barList") ? >> By >> >> injecting some custom code, we could make the necessary decisions and >> >> extract the proper value from an object. Unfortunately these parts of >> >> Drools are pretty much undocumented. >> >> >> >> Regards, >> >> Peter >> >> >> >> >> >> >> >> 2014-05-26 13:57 GMT+02:00 Wolfgang Laun : >> >> >> >>> What you describe can be done with /bin/sed. >> >>> >> >>> Notice that the DSL processor doesn't require you to translate entire >> >>> patterns; there is a mechanism for translating "keywords", which is >> >>> just arbitrary tokens to whatever replacement text. >> >>> >> >>> If a "bar" must be translated to a "barList" in the context of a class >> >>> "Foo" but not in any other context, a more sophisticated translation >> >>> is required in any case (with /bin/sed still being sufficient if >> >>> patterns aren't split across lines). >> >>> >> >>> Some say that good design makes use of Interfaces, which leaves room >> >>> for actual implementations being changed as long as the interfaces are >> >>> implemented. Here, note that rules can be written against interface >> >>> types. >> >>> >> >>> -W >> >>> >> >>> >> >>> On 26/05/2014, P?ter Gergely, Horv?th wrote: >> >>>> Hi All, >> >>>> >> >>>> We are evaluating Drools 6 for our use case, and face challenges >> where >> >>>> we >> >>>> would need some ideas from more experienced users of Drools. >> >>>> >> >>>> We have an application with a massive code base and a large number of >> >>> model >> >>>> (entity) classes. We are in the process of moving away from inherited >> >>>> legacy technologies and refactoring the old code base. As a part of >> >>>> this >> >>>> work we would like extract some of the hard-coded business logic to >> >>>> external rules, that is why we are looking at Drools as a potential >> >>>> solution. >> >>>> >> >>>> What we would like to have is some kind of abstraction or mapping >> >>>> between >> >>>> actual entities and rules the business users can define so that they >> do >> >>> not >> >>>> have to know the _exact_ details of the data model (field names, >> >>>> precise >> >>>> relations etc). This would be important for us so that we can >> refactor >> >>> the >> >>>> old model classes without affecting business rules; also it would >> make >> >>> life >> >>>> easier for the business users. While IDE support might make >> refactoring >> >>>> easier, we definitely want to have a separation between rules and >> >>> entities. >> >>>> Given our situation, writing and maintaining "stable" wrapper/adapter >> >>>> classes for the sole purpose of rule processing is out of question. I >> >>> have >> >>>> checked the documentation of Drools DSL support and for me it seems >> to >> >>>> be >> >>>> overkill for our use case: we do not really need a custom language, >> but >> >>>> simply an abstraction between rules and the data model classes. >> >>>> >> >>>> What I could imagine is a piece of code, (a custom property >> resolver? - >> >>> no >> >>>> sure how it is called) which maps property expressions to actual >> >>> properties >> >>>> based on a custom annotation on the entity class or something like >> >>>> that, >> >>> so >> >>>> that a rule containing "Foo.bars" expression does not have to change >> >>>> even >> >>>> if we decide to rename "Foo.bars" to "Foo.barList" in the model >> >>>> classes. >> >>>> (This was just a simple example of a potential use cases) >> >>>> >> >>>> Could you please share your thoughts on this topic and point me into >> >>>> the >> >>>> right direction? >> >>>> >> >>>> Thanks, >> >>>> Peter >> >>>> >> >>> _______________________________________________ >> >>> rules-users mailing list >> >>> rules-users at lists.jboss.org >> >>> https://lists.jboss.org/mailman/listinfo/rules-users >> >>> >> > _______________________________________________ >> > rules-users mailing list >> > rules-users at lists.jboss.org >> > https://lists.jboss.org/mailman/listinfo/rules-users >> > >> >> _______________________________________________ >> rules-users mailing list >> rules-users at lists.jboss.org >> https://lists.jboss.org/mailman/listinfo/rules-users >> > > > > _______________________________________________ > rules-users mailing listrules-users at lists.jboss.orghttps://lists.jboss.org/mailman/listinfo/rules-users > > > > _______________________________________________ > rules-users mailing list > rules-users at lists.jboss.org > https://lists.jboss.org/mailman/listinfo/rules-users > -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.jboss.org/pipermail/rules-users/attachments/20140528/6a2ab6d8/attachment-0001.html From ed.tirelli at gmail.com Wed May 28 05:31:50 2014 From: ed.tirelli at gmail.com (Edson Tirelli) Date: Wed, 28 May 2014 05:31:50 -0400 Subject: [rules-users] how to create kbases with useful names for JMX In-Reply-To: <1401223021912-4029719.post@n3.nabble.com> References: <1401223021912-4029719.post@n3.nabble.com> Message-ID: Christopher, Thanks for reporting this. The public API does not currently allows users to set the ID of the KieBase unfortunately. I will fix this for 6.1. With 6.0, it is only possible to do it using the internal APIs. Edson On Tue, May 27, 2014 at 4:37 PM, cjohns13 wrote: > How can I create new container / knowledgebases so that the names as shown in > JMX are not random UUID() strings? > > Something like this currently: > KieContainer container = > KieServices.Factory.get().newKieContainer(releaseId); > container.newKieSession("myName"); > > When you enable mbeans via Kie.mbeans.enabled=true > > Yields, in JMX: > > objectName: org.drools.kbases:type=2d4ffdab-2aca-4d5d-8c44-a5031c4d4094 > > but, would rather have it be > org.drools.kbases:type=myName > > How can I create the container/kbase/session so it gets a good name, as it > stands now? I can see in KnowledgeBaseFactoryServiceImpl.java that there is > a way to set this kbaseId, but can't figure out a way to actually set this > at the high level. > > > > > -- > View this message in context: http://drools.46999.n3.nabble.com/how-to-create-kbases-with-useful-names-for-JMX-tp4029719.html > Sent from the Drools: User forum mailing list archive at Nabble.com. > _______________________________________________ > rules-users mailing list > rules-users at lists.jboss.org > https://lists.jboss.org/mailman/listinfo/rules-users -- Edson Tirelli Principal Software Engineer Red Hat Business Systems and Intelligence Group From drpatrick.cosmo at gmail.com Wed May 28 05:47:36 2014 From: drpatrick.cosmo at gmail.com (crosbis2) Date: Wed, 28 May 2014 02:47:36 -0700 (PDT) Subject: [rules-users] Excel Syntax in Decision Tables In-Reply-To: <1401183779062-4029711.post@n3.nabble.com> References: <1399910293479-4029533.post@n3.nabble.com> <1399998865087-4029558.post@n3.nabble.com> <1401102022229-4029686.post@n3.nabble.com> <1401110928078-4029690.post@n3.nabble.com> <1401116813050-4029693.post@n3.nabble.com> <1401183779062-4029711.post@n3.nabble.com> Message-ID: <1401270456529-4029735.post@n3.nabble.com> Thanks Wolfgang!! -- View this message in context: http://drools.46999.n3.nabble.com/Excel-Syntax-in-Decision-Tables-tp4029520p4029735.html Sent from the Drools: User forum mailing list archive at Nabble.com. From jean-marc.terrettaz at sbb.ch Wed May 28 09:51:29 2014 From: jean-marc.terrettaz at sbb.ch (jmterrettaz) Date: Wed, 28 May 2014 06:51:29 -0700 (PDT) Subject: [rules-users] mvn deploy to workbench fails: Return code is: 405, ReasonPhrase:Method Not Allowed. Message-ID: <1401285089801-4029737.post@n3.nabble.com> Hi I have installed the Drools Workbench kie-drools-wb-distribution-wars-6.0.1.Final-jboss-as7.0.war on JBoss EAP 6.2. When I try to do a mvn deploy to the workbench it fails with "Return code is: 405, ReasonPhrase:Method Not Allowed." Here the distributionManagement section of the POM: guvnor-m2-repo http://localhost:8080/kie-drools-wb/maven2/ I also defined the server as follow in my settings.xml : guvnor-m2-repo Authorization Basic xxxoffuscatedxxxxx = If I give a wrong Authorization value there I get a 401 non authorized, so I think the server is correctly configured. In wireshark I see that an HTTP PUT call is made and the answer is: HTTP/1.1 405 Method Not Allowed Server: Apache-Coyote/1.1 Pragma: No-cache Cache-Control: no-cache Expires: Thu, 01 Jan 1970 01:00:00 CET Content-Type: text/html;charset=utf-8 Content-Length: 1176 Date: Wed, 28 May 2014 12:00:44 GMT JBoss Web/7.2.2.Final-redhat-1 - JBWEB000064: Error report JBWEB000065: HTTP Status 405 - HTTP method PUT is not supported by this URL

*JBWEB000309: type* JBWEB000067: Status report

*JBWEB000068: message* HTTP method PUT is not supported by this URL

*JBWEB000069: description* JBWEB000125: The specified HTTP method is not allowed for the requested resource.


JBoss Web/7.2.2.Final-redhat-1 in a more readable format: JBWEB000065: HTTP Status 405 - HTTP method PUT is not supported by this URL JBWEB000309: type JBWEB000067: Status report JBWEB000068: message HTTP method PUT is not supported by this URL JBWEB000069: description JBWEB000125: The specified HTTP method is not allowed for the requested resource. JBoss Web/7.2.2.Final-redhat-1 Can someone help? Thanks. -- View this message in context: http://drools.46999.n3.nabble.com/mvn-deploy-to-workbench-fails-Return-code-is-405-ReasonPhrase-Method-Not-Allowed-tp4029737.html Sent from the Drools: User forum mailing list archive at Nabble.com. From roger at precipicetech.com Wed May 28 10:22:50 2014 From: roger at precipicetech.com (rogerL) Date: Wed, 28 May 2014 07:22:50 -0700 (PDT) Subject: [rules-users] Cannot issue fireUntilHalt when using persisted session In-Reply-To: <538370CE.7020208@gmail.com> References: <1400784229559-4029656.post@n3.nabble.com> <538370CE.7020208@gmail.com> Message-ID: <1401286970426-4029738.post@n3.nabble.com> Open ticket https://issues.jboss.org/browse/DROOLS-507. I didn't provide any persist and reload code as the system hasn't ever reached the point of saving a session. I tried working around the issue by using fireAllRules and an interval rule. I was able to persist; however, the reload is failed with an exception that I believe may be related to https://issues.jboss.org/browse/DROOLS-422. As such, I added a comment therein with the stack trace. -- View this message in context: http://drools.46999.n3.nabble.com/Cannot-issue-fireUntilHalt-when-using-persisted-session-tp4029656p4029738.html Sent from the Drools: User forum mailing list archive at Nabble.com. From chiddu at gmail.com Wed May 28 10:24:21 2014 From: chiddu at gmail.com (Chidambaran Subramanian) Date: Wed, 28 May 2014 19:54:21 +0530 Subject: [rules-users] Syntax Question on an or condition Message-ID: rule "Test" dialect "mvel" when ( Customer( age == 50 ) or Deal( amount == 30 ) ) then Customer.setAge( "40" ); update( Customer ); Customer.setPlace( "Test" ); update( Customer ); end How to do I tag both Customer and Deal on the 1st condition , to enable me to -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.jboss.org/pipermail/rules-users/attachments/20140528/8e7f5772/attachment.html From chiddu at gmail.com Wed May 28 10:39:26 2014 From: chiddu at gmail.com (Chidambaran Subramanian) Date: Wed, 28 May 2014 20:09:26 +0530 Subject: [rules-users] How do I access objects in a top level or condition? Message-ID: rule "Test" dialect "mvel" when ( Customer( age == 50 ) or Deal( amount == 30 ) ) then Customer.setAge( "40" ); update( Customer ); Customer.setPlace( "Test" ); update( Customer ); end Appreciate any help in this regard. Regards Chiddu -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.jboss.org/pipermail/rules-users/attachments/20140528/4f6b7a34/attachment.html From salaboy at gmail.com Wed May 28 10:45:19 2014 From: salaboy at gmail.com (Mauricio Salatino) Date: Wed, 28 May 2014 15:45:19 +0100 Subject: [rules-users] How do I access objects in a top level or condition? In-Reply-To: References: Message-ID: Hi, you can't because you don't know which is true. You can create two rules one for each condition and then you can access by binding the Conditaional Element to a variable: Like for example: when $c: Customer( age == 50 ) then $c.setAge( "40" ); On Wed, May 28, 2014 at 3:39 PM, Chidambaran Subramanian wrote: > rule "Test" > dialect "mvel" > when > ( Customer( age == 50 ) or Deal( amount == 30 ) ) > then > Customer.setAge( "40" ); > update( Customer ); > Customer.setPlace( "Test" ); > update( Customer ); > end > > > > Appreciate any help in this regard. > > Regards > Chiddu > > _______________________________________________ > rules-users mailing list > rules-users at lists.jboss.org > https://lists.jboss.org/mailman/listinfo/rules-users > -- - MyJourney @ http://salaboy.com - Co-Founder @ http://www.jugargentina.org - Co-Founder @ http://www.jbug.com.ar - Salatino "Salaboy" Mauricio - -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.jboss.org/pipermail/rules-users/attachments/20140528/3df7953a/attachment.html From wolfgang.laun at gmail.com Wed May 28 11:05:10 2014 From: wolfgang.laun at gmail.com (Wolfgang Laun) Date: Wed, 28 May 2014 17:05:10 +0200 Subject: [rules-users] Syntax Question on an or condition In-Reply-To: References: Message-ID: On 28/05/2014, Chidambaran Subramanian wrote: > rule "Test" > dialect "mvel" > when > ( Customer( age == 50 ) or Deal( amount == 30 ) ) > then > Customer.setAge( "40" ); > update( Customer ); > Customer.setPlace( "Test" ); > update( Customer ); > > end The rule uses invalid syntax: Customer is a class name, and you cannot update a class. Check the Expert manual on how to write rules. Besides, the logic doesn't make sense, because you'd not even need a Customer for the condition to be true, and then you can't do anything with a Customer object. > > > How to do I tag both Customer and Deal on the 1st condition , to enable me > to > What? -W From jpsteinmetz at theworkshop.us.com Wed May 28 16:51:11 2014 From: jpsteinmetz at theworkshop.us.com (Steinmetz, Jean-Philippe) Date: Wed, 28 May 2014 13:51:11 -0700 Subject: [rules-users] Workbench: Error after cloning repository Message-ID: Hello, I have successfully cloned an existing repository containing a maven kmodule project. Unfortunately when I attempt to open any of the DRL files in the workbench (6.0.1.Final) I get the following error: Unable to complete your request. The following exception occurred: java.lang.ClassNotFoundException:org.openxmlformats.schemas.officeDocument.x2006.docPropsVTypes.CTArray from [Module "deployment.kie-drools-wb.war:main" from Service Module Loader]. This error does not happen if I load any of the files in the demo project. The DRL files range from complex to very simple. They all use the mvel dialect and import the following globals. /** The Camel context used when handling input/output. */ global CamelContext camelContext; /** The application configuration. */ global Config config; /** A reference to the current knowledge base. */ global KieBase kBase; /** A reference to the current session. */ global KieSession kSession; /** The common logging utility. */ global org.slf4j.Logger logger; Outside of this there is nothing special to them. Has anyone seen this? Thanks, Jean-Philippe -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.jboss.org/pipermail/rules-users/attachments/20140528/d524eb44/attachment-0001.html From jpsteinmetz at theworkshop.us.com Wed May 28 20:22:35 2014 From: jpsteinmetz at theworkshop.us.com (Steinmetz, Jean-Philippe) Date: Wed, 28 May 2014 17:22:35 -0700 Subject: [rules-users] Persistence in Drools 6 In-Reply-To: References: Message-ID: Hi Charles, Yes I am using a KieScanner to look for updates. Since I am using Spring I had to wrap it so that it could be properly initialized and started as a bean. I didn't include that bit in my original post as it didn't seem relevant to the problem at hand. The other reason why I decided to use the bean notation instead of the kie namespace is so that I could reference the created session as a bean that could be injected as a property to another bean (the thread class that sets up the session for my application and actually calls fireAllRules). Perhaps I was not doing it right but Spring wasn't recognizing anything in the tags as a bean I could reference. In any case, my approach should be identical to setting up the session in Java directly as follows. KieServices kieServices = KieServices.Factory.get(); ReleaseId releaseId = kieServices.newReleaseId("mygroup", "myartifact", "version"); KieContainer kContainer = kieServices.newKieContainer(releaseId); Environment env = kieServices.newEnvironment(); env.set(ENTITY_MANAGER_FACTORY, entityManagerFactory); env.set(TRANSACTION_MANAGER, transactionManager); KieSession kSession = kContainer.newKieSession(env); This as far as I've read is exactly how the documentation recommends it be done. It just doesn't actually work for some reason or another. Jean-Philippe On Tue, May 27, 2014 at 11:42 PM, Charles Moulliard wrote: > Hi Jean-Philippe, > > To pickup new updates, then you should use KieScanner (part of kie-ci > project) which allows you to do incremental build if a new kjar has been > published/released. Here is an example : > https://github.com/droolsjbpm/drools/blob/master/kie-ci/src/test/java/org/kie/scanner/KieScannerIncrementalCompilationTest.java > > Regards, > > > > On Tue, May 27, 2014 at 7:38 PM, Steinmetz, Jean-Philippe < > jpsteinmetz at theworkshop.us.com> wrote: > >> Hi Charles, >> >> Thanks for your reference. I had tried using kie-spring but was unable to >> use it as it currently does not support creating sessions from a release id >> and container. I did this in order to be able to pick up on updates to the >> kjar from maven while the application is running the same way it used to >> work in Drools 5. Has anyone else with similar needs to mine gotten >> persistence working? >> >> Jean-Philippe >> >> >> On Thu, May 22, 2014 at 11:23 PM, Charles Moulliard wrote: >> >>> Hi Jean Philippe, >>> >>> I have recently created a project to persist bpmn process using Spring & >>> JPA / Hibernate. This config is working using kie-spring >>> >>> >>> https://github.com/cmoulliard/droolsjbpm-osgi-examples/blob/master/spring-jbpm-persistence/src/main/resources/META-INF/spring/context.xml >>> >>> Regards, >>> >>> Charles >>> >>> >>> On Thu, May 22, 2014 at 8:00 PM, Steinmetz, Jean-Philippe < >>> jpsteinmetz at theworkshop.us.com> wrote: >>> >>>> Hello All, >>>> >>>> I am trying to set up persistence for a standalone Drools (6.0.1.Final) >>>> application that uses JPA, Hibernate (4.3.5.Final) and Bitronix (2.1.4) via >>>> Spring (4.0.3.RELEASE). >>>> >>>> On the persistence side everything appears to be set up correctly. For >>>> my Drools session I use a KieContainer to create a new stateful session >>>> using an environment set up with the EntityManagerFactory and >>>> TransactionManager set. The problem that I am experiencing however is that >>>> nothing is getting persisted to the database. I have poured over the docs >>>> at least two dozen times and searched the net for anything related. >>>> >>>> Here is what my Spring context file looks like when creating the Drools >>>> session... >>>> >>>> >>> factory-method="newReleaseId"> >>>> >>>> >>>> >>>> >>>> >>> factory-method="newKieContainer"> >>>> >>>> >>>> >>> factory-method="newEnvironment"> >>>> >>>> >>>> >>>> >>> static-field="org.kie.api.runtime.EnvironmentName.ENTITY_MANAGER_FACTORY"/> >>>> >>>> >>>> >>>> >>> static-field="org.kie.api.runtime.EnvironmentName.TRANSACTION_MANAGER"/> >>>> >>>> >>>> >>>> >>>> >>>> >>> factory-method="newKieSession"> >>>> >>>> >>>> >>>> Since the application is standalone I execute fireAllRules on the >>>> session at a regular interval (I use this instead of fireUntilHalt as it >>>> dramatically reduces the CPU load on the machine). With each call I wrap it >>>> in a transaction. Thus, the code looks as follows: >>>> >>>> while (!Thread.currentThread().isInterrupted()) { >>>> // Start a new transaction >>>> UserTransaction utx = utx = (UserTransaction)new >>>> InitialContext().lookup("java:comp/UserTransaction"); >>>> utx.begin(); >>>> >>>> // Tick the session >>>> kSession.fireAllRules(); >>>> >>>> // Close the transaction >>>> utx.commit(); >>>> >>>> // Sleep so that other applications can use the CPU >>>> try { >>>> Thread.sleep(1); >>>> } catch (InterruptedException e) { >>>> // When our sleep is interrupted it's because the >>>> executor wants us to shut down. >>>> Thread.currentThread().interrupt(); >>>> } >>>> } >>>> >>>> When I inspect kSession in the debugger I can see the environment is >>>> properly set. I have tried digging down into the execute a bit but can't >>>> find any point at which the TransactionManager or EntityManagerFactory are >>>> used. As I said above I know Hibernate is set up correctly as well as >>>> Bitronix. I can see them working just fine in the logs and they definitely >>>> are hitting the database (and create tables for sessioninfo and >>>> workingmemory as they should). I just get nothing actually in the database >>>> stored, ever. >>>> >>>> Any help here is appreciated. It seems like it should work but it just >>>> doesn't. >>>> >>>> Thanks in advance, >>>> >>>> Jean-Philippe Steinmetz >>>> >>>> >>>> _______________________________________________ >>>> rules-users mailing list >>>> rules-users at lists.jboss.org >>>> https://lists.jboss.org/mailman/listinfo/rules-users >>>> >>> >>> >>> >>> -- >>> Charles Moulliard >>> Apache Committer / Architect @RedHat >>> Twitter : @cmoulliard | Blog : http://cmoulliard.github.io >>> >>> >>> _______________________________________________ >>> rules-users mailing list >>> rules-users at lists.jboss.org >>> https://lists.jboss.org/mailman/listinfo/rules-users >>> >> >> >> _______________________________________________ >> rules-users mailing list >> rules-users at lists.jboss.org >> https://lists.jboss.org/mailman/listinfo/rules-users >> > > > > -- > Charles Moulliard > Apache Committer / Architect @RedHat > Twitter : @cmoulliard | Blog : http://cmoulliard.github.io > > > _______________________________________________ > rules-users mailing list > rules-users at lists.jboss.org > https://lists.jboss.org/mailman/listinfo/rules-users > -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.jboss.org/pipermail/rules-users/attachments/20140528/14ca72fa/attachment.html From michael.anstis at gmail.com Thu May 29 03:22:05 2014 From: michael.anstis at gmail.com (Michael Anstis) Date: Thu, 29 May 2014 08:22:05 +0100 Subject: [rules-users] Workbench: Error after cloning repository In-Reply-To: References: Message-ID: Sounds like the pom for the project in the repository you have cloned has a "provided" scope dependency on an open office JAR? Is the CNFE in the server log or does it interfer with runtime operation of the workbench? (I.e do you get an error pop up) Sent on the move On 28 May 2014 21:51, "Steinmetz, Jean-Philippe" < jpsteinmetz at theworkshop.us.com> wrote: > Hello, > > I have successfully cloned an existing repository containing a maven > kmodule project. Unfortunately when I attempt to open any of the DRL files > in the workbench (6.0.1.Final) I get the following error: > > Unable to complete your request. The following exception occurred: > java.lang.ClassNotFoundException:org.openxmlformats.schemas.officeDocument.x2006.docPropsVTypes.CTArray > from [Module "deployment.kie-drools-wb.war:main" from Service Module > Loader]. > > This error does not happen if I load any of the files in the demo project. > The DRL files range from complex to very simple. They all use the mvel > dialect and import the following globals. > > > /** The Camel context used when handling input/output. */ > global CamelContext camelContext; > /** The application configuration. */ > global Config config; > /** A reference to the current knowledge base. */ > global KieBase kBase; > /** A reference to the current session. */ > global KieSession kSession; > /** The common logging utility. */ > global org.slf4j.Logger logger; > > Outside of this there is nothing special to them. Has anyone seen this? > > Thanks, > > Jean-Philippe > > _______________________________________________ > rules-users mailing list > rules-users at lists.jboss.org > https://lists.jboss.org/mailman/listinfo/rules-users > -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.jboss.org/pipermail/rules-users/attachments/20140529/3a20423a/attachment.html From ufos at comcast.net Thu May 29 09:48:05 2014 From: ufos at comcast.net (J Rose) Date: Thu, 29 May 2014 06:48:05 -0700 (PDT) Subject: [rules-users] Compilation errors in Drools examples In-Reply-To: <1392094756726-4028055.post@n3.nabble.com> References: <1389382886927-4027650.post@n3.nabble.com> <1392094756726-4028055.post@n3.nabble.com> Message-ID: <1401371285004-4029754.post@n3.nabble.com> Any solution to this item? I am having the same errors. -- View this message in context: http://drools.46999.n3.nabble.com/Compilation-errors-in-Drools-examples-tp4027650p4029754.html Sent from the Drools: User forum mailing list archive at Nabble.com. From jpsteinmetz at theworkshop.us.com Thu May 29 12:50:28 2014 From: jpsteinmetz at theworkshop.us.com (Steinmetz, Jean-Philippe) Date: Thu, 29 May 2014 09:50:28 -0700 Subject: [rules-users] Workbench: Error after cloning repository In-Reply-To: References: Message-ID: It looks like the class belongs to an ooxml-schemas jar. My project pom does not specify any such dependency. However, I do see poi-ooxml-schemas as an inherited dependency from drools-decisiontables which is currently marked with a compile scope which should be properly including it at runtime if it's necessary. Perhaps it is conflicting with the workbench? The error is a popup. I have seen this error before when I was installing the workbench. I was using a clean install of Jboss AS 7 and I dropped the war into the deployments folder instead of going through the admin console. When I did that I got the same error popup (and a host of others) when I would try to access any of the demo files. On Thu, May 29, 2014 at 12:22 AM, Michael Anstis wrote: > Sounds like the pom for the project in the repository you have cloned has > a "provided" scope dependency on an open office JAR? > > Is the CNFE in the server log or does it interfer with runtime operation > of the workbench? (I.e do you get an error pop up) > > Sent on the move > On 28 May 2014 21:51, "Steinmetz, Jean-Philippe" < > jpsteinmetz at theworkshop.us.com> wrote: > >> Hello, >> >> I have successfully cloned an existing repository containing a maven >> kmodule project. Unfortunately when I attempt to open any of the DRL files >> in the workbench (6.0.1.Final) I get the following error: >> >> Unable to complete your request. The following exception occurred: >> java.lang.ClassNotFoundException:org.openxmlformats.schemas.officeDocument.x2006.docPropsVTypes.CTArray >> from [Module "deployment.kie-drools-wb.war:main" from Service Module >> Loader]. >> >> This error does not happen if I load any of the files in the demo >> project. The DRL files range from complex to very simple. They all use the >> mvel dialect and import the following globals. >> >> >> /** The Camel context used when handling input/output. */ >> global CamelContext camelContext; >> /** The application configuration. */ >> global Config config; >> /** A reference to the current knowledge base. */ >> global KieBase kBase; >> /** A reference to the current session. */ >> global KieSession kSession; >> /** The common logging utility. */ >> global org.slf4j.Logger logger; >> >> Outside of this there is nothing special to them. Has anyone seen this? >> >> Thanks, >> >> Jean-Philippe >> >> _______________________________________________ >> rules-users mailing list >> rules-users at lists.jboss.org >> https://lists.jboss.org/mailman/listinfo/rules-users >> > > _______________________________________________ > rules-users mailing list > rules-users at lists.jboss.org > https://lists.jboss.org/mailman/listinfo/rules-users > -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.jboss.org/pipermail/rules-users/attachments/20140529/e11aa282/attachment.html From gboro54 at gmail.com Thu May 29 13:13:42 2014 From: gboro54 at gmail.com (gboro54) Date: Thu, 29 May 2014 10:13:42 -0700 (PDT) Subject: [rules-users] @Modifies Inheritance Message-ID: <1401383622008-4029757.post@n3.nabble.com> Curiosity question: Why does the @Modifies not have the @Inherited annotation, allowing subclasses to inherit a method which may modify something in the parent? Perhaps I have a misunderstanding of annotations in this case but still am just wondering. -- View this message in context: http://drools.46999.n3.nabble.com/Modifies-Inheritance-tp4029757.html Sent from the Drools: User forum mailing list archive at Nabble.com. From jpsteinmetz at theworkshop.us.com Thu May 29 14:03:02 2014 From: jpsteinmetz at theworkshop.us.com (Steinmetz, Jean-Philippe) Date: Thu, 29 May 2014 11:03:02 -0700 Subject: [rules-users] Using git-p4 with workbench In-Reply-To: References: <0350DC55-5F73-4E24-A039-0030CE9DBD42@codehaus.org> Message-ID: I think some of my questions are still relevant here. For example, normally if I need to get the latest changes from a master I would do 'git pull'. However, the workbench doesn't seem to have any UI for that. For repositories that are cloned from a remote repo, is the workbench performing an automatic pull? If not, how do I invoke it? Or is it that the workbench is always considered master and I should be instead pushing to it? On Tue, May 27, 2014 at 5:20 PM, Mark Proctor wrote: > You can bi-drection sync git, if you know what you are doing. But these > are more GIT Qs, and better asked on the GIT mailing list. Lot?s of stack > exchange entries too for two way git sync > > http://stackoverflow.com/questions/15056327/how-do-i-synchronise-two-remote-git-repositories > > Mark > > > > On 28 May 2014, at 01:11, Steinmetz, Jean-Philippe < > jpsteinmetz at theworkshop.us.com> wrote: > > Hrm okay. Pushing from the git-p4 clone to the workbench doesn't really > help either though. The bridge needs to be bi-directional. Meaning, the > latest changes in perforce should be sync'd into the workbench regularly > and any commits to the workbench need to be pushed back to perforce. > Perhaps instead I need to set up the git-p4 clone as git server itself that > the workbench can clone. If I do that will it push back to that server? or > does the workbench not play nice that way? Also, does the workbench perform > regular fetches on a cloned repo? > > > On Tue, May 27, 2014 at 3:27 PM, Mark Proctor wrote: > >> don?t touch the .niogit folder. You have your git-p4 repo, that you >> cloned. Now push it to the ssh connection of the Guvnor server. >> Mark >> >> On 27 May 2014, at 22:29, Steinmetz, Jean-Philippe < >> jpsteinmetz at theworkshop.us.com> wrote: >> >> Hi Mark, >> >> Thanks for the reply. I have tried creating a new repo in the workbench >> and then using git-p4 on the command line sync'd perforce to it in the >> appropriate .niogit directory (per the git-p4 docs this use case is how you >> add p4 to an existing git repo). However, I am not seeing the working files >> anywhere. Where does the workbench store the work tree? >> >> Jean-Philippe >> >> >> On Thu, May 22, 2014 at 3:45 PM, Mark Proctor wrote: >> >>> We use JGit and I don?t believe (but could be wrong) it has direct p4 >>> support, like this git extension offers. >>> http://git-scm.com/docs/git-p4 >>> >>> However Git is distributed, so just clone and sync a p4 repo with this >>> Git command line tool and use it as an intermediary. Then merge/mirror this >>> intermediary with our JGit repo. >>> >>> Mark >>> >>> On 22 May 2014, at 22:28, Steinmetz, Jean-Philippe < >>> jpsteinmetz at theworkshop.us.com> wrote: >>> >>> > Hi, >>> > >>> > Has anyone tried using a VCS bridge for git with the Drools 6 >>> workbench? Specifically I am interested in git-p4 so that I can access an >>> existing maven project that is currently stored in Perforce. Is this use >>> case supported? >>> > >>> > Thanks in advance, >>> > >>> > Jean-Philippe >>> > _______________________________________________ >>> > rules-users mailing list >>> > rules-users at lists.jboss.org >>> > https://lists.jboss.org/mailman/listinfo/rules-users >>> >>> >>> _______________________________________________ >>> rules-users mailing list >>> rules-users at lists.jboss.org >>> https://lists.jboss.org/mailman/listinfo/rules-users >>> >> >> _______________________________________________ >> rules-users mailing list >> rules-users at lists.jboss.org >> https://lists.jboss.org/mailman/listinfo/rules-users >> >> >> >> _______________________________________________ >> rules-users mailing list >> rules-users at lists.jboss.org >> https://lists.jboss.org/mailman/listinfo/rules-users >> > > _______________________________________________ > rules-users mailing list > rules-users at lists.jboss.org > https://lists.jboss.org/mailman/listinfo/rules-users > > > > _______________________________________________ > rules-users mailing list > rules-users at lists.jboss.org > https://lists.jboss.org/mailman/listinfo/rules-users > -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.jboss.org/pipermail/rules-users/attachments/20140529/7ac4329a/attachment.html From jpsteinmetz at theworkshop.us.com Thu May 29 14:46:46 2014 From: jpsteinmetz at theworkshop.us.com (Steinmetz, Jean-Philippe) Date: Thu, 29 May 2014 11:46:46 -0700 Subject: [rules-users] Workbench: Error after cloning repository In-Reply-To: References: Message-ID: I'm wondering if this error is a red herring. In the Jboss log I am getting the following errors on startup when it scans my project. [Error: unable to resolve method using strict-mode: org.drools.core.spi.KnowledgeHelper.MyClassUtils()] [Near : {... MyClass obj = MyClassUtils.getObject("com.u ....}] This is referring to a static method of a utility class I have that is imported at the top of the DRL file. The same project compiles and runs just fine via maven and a standalone application running Drools sessions so I am not sure what makes the workbench different. I have found several references to this error where it is suggested to disable strict-mode for MVEL. How would I go about disabling this in the workbench to test it? On Thu, May 29, 2014 at 9:50 AM, Steinmetz, Jean-Philippe < jpsteinmetz at theworkshop.us.com> wrote: > It looks like the class belongs to an ooxml-schemas jar. My project pom > does not specify any such dependency. However, I do see poi-ooxml-schemas > as an inherited dependency from drools-decisiontables which is currently > marked with a compile scope which should be properly including it at > runtime if it's necessary. Perhaps it is conflicting with the workbench? > > The error is a popup. I have seen this error before when I was installing > the workbench. I was using a clean install of Jboss AS 7 and I dropped the > war into the deployments folder instead of going through the admin console. > When I did that I got the same error popup (and a host of others) when I > would try to access any of the demo files. > > > On Thu, May 29, 2014 at 12:22 AM, Michael Anstis > wrote: > >> Sounds like the pom for the project in the repository you have cloned has >> a "provided" scope dependency on an open office JAR? >> >> Is the CNFE in the server log or does it interfer with runtime operation >> of the workbench? (I.e do you get an error pop up) >> >> Sent on the move >> On 28 May 2014 21:51, "Steinmetz, Jean-Philippe" < >> jpsteinmetz at theworkshop.us.com> wrote: >> >>> Hello, >>> >>> I have successfully cloned an existing repository containing a maven >>> kmodule project. Unfortunately when I attempt to open any of the DRL files >>> in the workbench (6.0.1.Final) I get the following error: >>> >>> Unable to complete your request. The following exception occurred: >>> java.lang.ClassNotFoundException:org.openxmlformats.schemas.officeDocument.x2006.docPropsVTypes.CTArray >>> from [Module "deployment.kie-drools-wb.war:main" from Service Module >>> Loader]. >>> >>> This error does not happen if I load any of the files in the demo >>> project. The DRL files range from complex to very simple. They all use the >>> mvel dialect and import the following globals. >>> >>> >>> /** The Camel context used when handling input/output. */ >>> global CamelContext camelContext; >>> /** The application configuration. */ >>> global Config config; >>> /** A reference to the current knowledge base. */ >>> global KieBase kBase; >>> /** A reference to the current session. */ >>> global KieSession kSession; >>> /** The common logging utility. */ >>> global org.slf4j.Logger logger; >>> >>> Outside of this there is nothing special to them. Has anyone seen this? >>> >>> Thanks, >>> >>> Jean-Philippe >>> >>> _______________________________________________ >>> rules-users mailing list >>> rules-users at lists.jboss.org >>> https://lists.jboss.org/mailman/listinfo/rules-users >>> >> >> _______________________________________________ >> rules-users mailing list >> rules-users at lists.jboss.org >> https://lists.jboss.org/mailman/listinfo/rules-users >> > > -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.jboss.org/pipermail/rules-users/attachments/20140529/9b5ceb31/attachment-0001.html From raojinghai at gmail.com Thu May 29 15:01:56 2014 From: raojinghai at gmail.com (rjh) Date: Thu, 29 May 2014 12:01:56 -0700 (PDT) Subject: [rules-users] Compilation errors in Drools examples In-Reply-To: <1389382886927-4027650.post@n3.nabble.com> References: <1389382886927-4027650.post@n3.nabble.com> Message-ID: <1401390116681-4029760.post@n3.nabble.com> I have the same problem. It seems like the drool eclipse plugin can't recognize third party classes (any jar files besides those within JRE runtime and Drools runtime). Despite of the error messages, you can execute the java application correctly. However, I have asked around in this forum, in jira, and writing personal email to Kris Verlaenen and Mario Fusco, but no response at all!! Below are my posts regarding this problem: http://drools.46999.n3.nabble.com/rules-users-Drools-eclipse-plugin-problem-td4029476.html https://issues.jboss.org/browse/DROOLS-472 -- View this message in context: http://drools.46999.n3.nabble.com/Compilation-errors-in-Drools-examples-tp4027650p4029760.html Sent from the Drools: User forum mailing list archive at Nabble.com. From roger at precipicetech.com Thu May 29 16:33:15 2014 From: roger at precipicetech.com (rogerL) Date: Thu, 29 May 2014 13:33:15 -0700 (PDT) Subject: [rules-users] Not and forall operator behaviour Message-ID: <1401395595103-4029761.post@n3.nabble.com> Are the two following statements not equivalent? forall($msg:Message() Message(this==$msg, sent==true, status!=State._INITIALIZED) ) not( Message(sent==false, status==State._INITIALIZED) ) My understanding is that they both ensure that there are no Message objects in WM with property 'sent' set to false and property 'status' set to State._INITIALIZED. In my situation, the 'forall' approach is working as expected, the 'not' approach fires once (when there are no Message objects in WM) and never again. Appreciate if anyone could shed light on this. -- View this message in context: http://drools.46999.n3.nabble.com/Not-and-forall-operator-behaviour-tp4029761.html Sent from the Drools: User forum mailing list archive at Nabble.com. From dsotty at gmail.com Thu May 29 16:46:07 2014 From: dsotty at gmail.com (Davide Sottara) Date: Thu, 29 May 2014 21:46:07 +0100 Subject: [rules-users] Not and forall operator behaviour In-Reply-To: <1401395595103-4029761.post@n3.nabble.com> References: <1401395595103-4029761.post@n3.nabble.com> Message-ID: <53879C8F.5060302@gmail.com> Both should fire when there is no message. This said, the two are not equivalent. The negation of Message( sent == true, status != INITIALIZED ) is: Message( sent == false *||* status == INITIALIZED ) That is, by deMorgan's laws, you need to negate the operators AND flip the and/or connectives. In case something still seems weird, could you please specify the drools version you're using, as well as which facts you are inserting exactly? Thanks Davide On 05/29/2014 09:33 PM, rogerL wrote: > Are the two following statements not equivalent? > > forall($msg:Message() > Message(this==$msg, sent==true, status!=State._INITIALIZED) > ) > > > not( Message(sent==false, status==State._INITIALIZED) ) > > My understanding is that they both ensure that there are no Message objects > in WM with property 'sent' set to false and property 'status' set to > State._INITIALIZED. > > In my situation, the 'forall' approach is working as expected, the 'not' > approach fires once (when there are no Message objects in WM) and never > again. > > Appreciate if anyone could shed light on this. > > > > -- > View this message in context: http://drools.46999.n3.nabble.com/Not-and-forall-operator-behaviour-tp4029761.html > Sent from the Drools: User forum mailing list archive at Nabble.com. > _______________________________________________ > rules-users mailing list > rules-users at lists.jboss.org > https://lists.jboss.org/mailman/listinfo/rules-users > -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.jboss.org/pipermail/rules-users/attachments/20140529/4b837578/attachment.html From mario.fusco at gmail.com Thu May 29 16:53:22 2014 From: mario.fusco at gmail.com (Mario Fusco) Date: Thu, 29 May 2014 13:53:22 -0700 (PDT) Subject: [rules-users] Compilation errors in Drools examples In-Reply-To: <1401390116681-4029760.post@n3.nabble.com> References: <1389382886927-4027650.post@n3.nabble.com> <1401390116681-4029760.post@n3.nabble.com> Message-ID: <1401396802847-4029763.post@n3.nabble.com> Hi, I didn't receive any personal email on this issue or at least I cannot find it at the moment. Anyway sending personal emails complaining for a certain defect or missing feature isn't of course a good idea. I'll try to fix this issue asap. Thanks for having reported it, Mario -- View this message in context: http://drools.46999.n3.nabble.com/Compilation-errors-in-Drools-examples-tp4027650p4029763.html Sent from the Drools: User forum mailing list archive at Nabble.com. From roger at precipicetech.com Thu May 29 17:30:27 2014 From: roger at precipicetech.com (rogerL) Date: Thu, 29 May 2014 14:30:27 -0700 (PDT) Subject: [rules-users] Not and forall operator behaviour In-Reply-To: <53879C8F.5060302@gmail.com> References: <1401395595103-4029761.post@n3.nabble.com> <53879C8F.5060302@gmail.com> Message-ID: <1401399027630-4029764.post@n3.nabble.com> Davide, Thank you for the clarification. My error was to interpret the "not" operator as an existential function (ie: "there is no such object that exists") and viewing the object as a unit, rather than, as you pointed out, logically manipulable. In light of that, the logical OR in place of the comma makes sense. Roger -- View this message in context: http://drools.46999.n3.nabble.com/Not-and-forall-operator-behaviour-tp4029761p4029764.html Sent from the Drools: User forum mailing list archive at Nabble.com. From raojinghai at gmail.com Thu May 29 17:53:39 2014 From: raojinghai at gmail.com (rjh) Date: Thu, 29 May 2014 14:53:39 -0700 (PDT) Subject: [rules-users] Compilation errors in Drools examples In-Reply-To: <1401396802847-4029763.post@n3.nabble.com> References: <1389382886927-4027650.post@n3.nabble.com> <1401390116681-4029760.post@n3.nabble.com> <1401396802847-4029763.post@n3.nabble.com> Message-ID: <1401400419622-4029765.post@n3.nabble.com> Hi Mario, Thank you so much for taking care of this problem. I was pretty frustrated by this problem and I got no answer after asking around. I thought it could relate to another problem you solved earlier (http://drools.46999.n3.nabble.com/rules-users-Drool-6-0-0-Final-2-question-re-kie-maven-plugin-please-td4027117.html). So I sent an email to the email address you are using for this mailing list. I am sorry to bother you with this. Thanks. Jinghai -- View this message in context: http://drools.46999.n3.nabble.com/Compilation-errors-in-Drools-examples-tp4027650p4029765.html Sent from the Drools: User forum mailing list archive at Nabble.com. From p.thomson.es at gmail.com Thu May 29 21:05:11 2014 From: p.thomson.es at gmail.com (Neb) Date: Thu, 29 May 2014 18:05:11 -0700 (PDT) Subject: [rules-users] Drools Planner: Vehicle routing problems In-Reply-To: References: <1330096144248-3772797.post@n3.nabble.com> <1330097169263-3772841.post@n3.nabble.com> <1330336003845-3780139.post@n3.nabble.com> <1330340855910-3780331.post@n3.nabble.com> Message-ID: <1401411911695-4029766.post@n3.nabble.com> Hi ge0ffrey In the optoplanner example of the vehicle routing is there a way to change the scale of the map? as it is set to world and if locations are added within the same town or city they are too close on the map. also how would this example be altered to show the travel time around the route? Regards, Neb -- View this message in context: http://drools.46999.n3.nabble.com/Drools-Planner-Vehicle-routing-problems-tp3772797p4029766.html Sent from the Drools: User forum mailing list archive at Nabble.com. From ge0ffrey.spam at gmail.com Fri May 30 04:26:05 2014 From: ge0ffrey.spam at gmail.com (Geoffrey De Smet) Date: Fri, 30 May 2014 10:26:05 +0200 Subject: [rules-users] Drools Planner: Vehicle routing problems In-Reply-To: <1401411911695-4029766.post@n3.nabble.com> References: <1330096144248-3772797.post@n3.nabble.com> <1330097169263-3772841.post@n3.nabble.com> <1330336003845-3780139.post@n3.nabble.com> <1330340855910-3780331.post@n3.nabble.com> <1401411911695-4029766.post@n3.nabble.com> Message-ID: I guess it's a matter of adjusting these 2 files to your needs: https://github.com/droolsjbpm/optaplanner/blob/master/optaplanner-examples/src/main/java/org/optaplanner/examples/vehiclerouting/swingui/VehicleRoutingWorldPanel.java https://github.com/droolsjbpm/optaplanner/blob/master/optaplanner-examples/src/main/java/org/optaplanner/examples/vehiclerouting/swingui/VehicleRoutingSchedulePainter.java Maybe someone else in the community has done similar changes and is willing to share the implementation? On 30-05-14 03:05, Neb wrote: > Hi ge0ffrey > > In the optoplanner example of the vehicle routing is there a way to change > the scale of the map? > > as it is set to world and if locations are added within the same town or > city they are too close on the map. > > also how would this example be altered to show the travel time around the > route? > > Regards, Neb > > > > -- > View this message in context: http://drools.46999.n3.nabble.com/Drools-Planner-Vehicle-routing-problems-tp3772797p4029766.html > Sent from the Drools: User forum mailing list archive at Nabble.com. > _______________________________________________ > rules-users mailing list > rules-users at lists.jboss.org > https://lists.jboss.org/mailman/listinfo/rules-users > From porcelli at redhat.com Fri May 30 04:50:51 2014 From: porcelli at redhat.com (Alexandre Porcelli) Date: Fri, 30 May 2014 09:50:51 +0100 Subject: [rules-users] Using git-p4 with workbench In-Reply-To: References: <0350DC55-5F73-4E24-A039-0030CE9DBD42@codehaus.org> Message-ID: Today from UI perspectives you can't... but you can do it from external... you can clone from cli, add an upstream repo, pull and merge changes and push content back. Regards, --- Alexandre Porcelli Principal Software Engineer Red Hat Business Systems and Intelligence Group On May 29, 2014, at 7:03 PM, Steinmetz, Jean-Philippe wrote: > I think some of my questions are still relevant here. For example, normally if I need to get the latest changes from a master I would do 'git pull'. However, the workbench doesn't seem to have any UI for that. For repositories that are cloned from a remote repo, is the workbench performing an automatic pull? If not, how do I invoke it? Or is it that the workbench is always considered master and I should be instead pushing to it? From vinodkiran at usa.net Fri May 30 09:45:38 2014 From: vinodkiran at usa.net (vinodkiran) Date: Fri, 30 May 2014 06:45:38 -0700 (PDT) Subject: [rules-users] Using dynamic package names with Drools 6.0 Spring integration. In-Reply-To: References: Message-ID: <1401457538306-4029783.post@n3.nabble.com> I have added this functionality and will be submitting a PR. All attributes of kbase are now capable of understanding SpEL expressions. --Thanks, Vinod -- View this message in context: http://drools.46999.n3.nabble.com/rules-users-Using-dynamic-package-names-with-Drools-6-0-Spring-integration-tp4029415p4029783.html Sent from the Drools: User forum mailing list archive at Nabble.com. From jpsteinmetz at theworkshop.us.com Fri May 30 13:51:29 2014 From: jpsteinmetz at theworkshop.us.com (Steinmetz, Jean-Philippe) Date: Fri, 30 May 2014 10:51:29 -0700 Subject: [rules-users] Workbench: Error after cloning repository In-Reply-To: References: Message-ID: Okay I was able to disable strict-mode using by defining the system-property in JBoss. With that and fixing up some of the imports I was able to reduce the compilation errors shown in the workbench to just a couple. The errors I get now are: Error importing : 'com.mycompany.MyClassUtils' Error importing : 'org.apache.commons.lang3.time.DateUtils' [ function isEventOnSameDay (line:18): Only a type can be imported. com.mycompany.MyClassUtils resolves to a package isEventOnSameDay (line:24): Only a type can be imported. org.apache.commons.lang3.time.DateUtils resolves to a package isEventOnSameDay (line:36): DateUtils cannot be resolved isEventOnSameDay (line:37): DateUtils cannot be resolved ] The MyClassUtils is a class defined in the same project as the DRL files. Therefore, assuming the workbench is also compiling/loading the java files in the classloader it should resolve without issue. The DateUtils class is a maven dependency and I assume should be loaded by the workbench as well? Why would the compiler see these classes as packages? -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.jboss.org/pipermail/rules-users/attachments/20140530/09b5766f/attachment-0001.html From federico.bertola88 at gmail.com Fri May 30 21:33:44 2014 From: federico.bertola88 at gmail.com (Federico Bertola) Date: Sat, 31 May 2014 03:33:44 +0200 Subject: [rules-users] Possible bug with incremental compilation Message-ID: <53893178.9070607@gmail.com> Hi all, executing the test in "drools/drools-compiler/src/test/java/org/drools/compiler/integrationtests/" all goes well except if i write a kmodule xml inside the KieFileSystem. Is this supposed to happen? I cannot add or remove a KieBase during incremental compilation, or I'm doing something dumb? I'm on Ubuntu 12.04 64bit java 1.7.0_55 Heres a simple test case: ######################################### @Test public void shouldRecompileWithNewBases() { String drl1 = "global java.util.List list\n" + "rule R1 when\n" + " $s : String() " + "then\n" + " list.add( \"a\" + $s );" + "end\n"; String drl2 = "global java.util.List list\n" + "rule R2 when\n" + " $s : String() " + "then\n" + " list.add( \"b\" + $s );" + "end\n"; ReleaseId releaseId1 = KieServices.Factory.get().newReleaseId( "it.mine", "test", "1.1"); ReleaseId releaseId2 = KieServices.Factory.get().newReleaseId( "it.mine", "test", "1.2"); KieServices ks = KieServices.Factory.get(); KieModuleModel kproj = ks.newKieModuleModel(); KieBaseModel kieBaseModel1 = kproj.newKieBaseModel("KBase1") .addPackage("it.mine.test"); kieBaseModel1.newKieSessionModel("KSession1").setDefault(true); KieFileSystem kfs = ks.newKieFileSystem(); KieBuilder kieBuilder = ks.newKieBuilder(kfs); kfs.generateAndWritePomXML(releaseId1); kfs.write("src/main/resources/it/mine/test/rule.drl", drl1); // FIXME: without this line all goes well. kfs.writeKModuleXML(kproj.toXML()); kieBuilder.buildAll(); assertEquals(0, kieBuilder.getResults().getMessages().size()); KieModule kieModule = kieBuilder.getKieModule(); assertEquals(releaseId1, kieModule.getReleaseId()); KieContainer kc = ks.newKieContainer(releaseId1); KieSession ksession = kc.newKieSession(); List list = new ArrayList(); ksession.setGlobal("list", list); ksession.insert("Foo"); ksession.fireAllRules(); list.clear(); kfs.generateAndWritePomXML(releaseId2); kfs.write("src/main/resources/it/mine/test2/rule.drl", drl2); IncrementalResults results = ((InternalKieBuilder) kieBuilder) .incrementalBuild(); assertEquals(0, results.getAddedMessages().size()); kieModule = kieBuilder.getKieModule(); assertEquals(releaseId2, kieModule.getReleaseId()); Results updateResults = kc.updateToVersion(releaseId2); assertEquals(0, updateResults.getMessages().size()); } ######################################### Heres the stack trace: ######################################### java.lang.NullPointerException at org.drools.compiler.kie.util.ChangeSetBuilder.build(ChangeSetBuilder.java:51) at org.drools.compiler.kie.builder.impl.KieContainerImpl.update(KieContainerImpl.java:126) at org.drools.compiler.kie.builder.impl.KieContainerImpl.updateToVersion(KieContainerImpl.java:105) at it.mine.IncrementalCompilationTest.shouldRecompileWithNewBases(IncrementalCompilationTest.java:165) ######################################### Thanks for the help! Cheers, Federico. From natalia.iglesias at casadearriba.net Sat May 31 15:35:32 2014 From: natalia.iglesias at casadearriba.net (Natalia Iglesias de Amunategui) Date: Sat, 31 May 2014 21:35:32 +0200 Subject: [rules-users] Question about Fusion pseudoclock Message-ID: <023701cf7d07$7d8cb450$78a61cf0$@iglesias@casadearriba.net> Hello, I am implementing temporal rules using drools fusi?n 6.0.1 and the new KIE services api. I insert facts into the kie session that include some DATE fields which I later use in the rules. I also insert events using the pseudoclock, so I guess that means that the timestamp is kept in long format. The consequence is that my temporal rules do not fire at all! I have no @timestamp annotation in the declare of the event, so Drools internal clock should be used as timestamp. I have displayed the value of the pseudoclock getCurrentTime method, and the output shows a date of 1970: I need to understand why the clock.getTime returns dates of 1970, maybe when this is solved the rules will fire with the internal event timestamp. (After that I have tried every possible combination: creating a date or long field in the event fact representing the timestamp, converting long to date and viceversa, but nothing seems to work..). I enclose here the initialization that I do of the kieContainer and session: public static void main(final String[] args) { try { // load up the knowledge base KieServices ks = KieServices.Factory.get(); KieContainer kContainer = ks.getKieClasspathContainer(); System.out.println(kContainer.verify().getMessages().toString()); // set stream mode as opposite to cloud mode KieBaseConfiguration kbconf = KieServices.Factory.get().newKieBaseConfiguration(); kbconf.setOption(EventProcessingOption.STREAM ); // set clock to pseudo clock to be able to advance it manually KieSessionConfiguration ksconf = KieServices.Factory.get().newKieSessionConfiguration(); ksconf.setOption(ClockTypeOption.get("pseudo")); // returns ksession from kiecontainer as defined in the kmodule.xml file KieSession kSession = kContainer.newKieSession("VAPSession", ksconf); // Insert test patients and related classes, dates are in long format to match pseudoclock final Patient p1 = new Patient( "MrJones", 45, 1, true,false,false,35.0, 5000,"None","Localized Infiltrates","Yes","None","S.Aureus",245,false, false, 0, true,new SimpleDateFormat("yyyy-MM-dd").parse("2014-05-31").getTime(),"", new SimpleDateFormat("yyyy-MM-dd").parse("2014-05-31").getTime(),false,false,fal se,false); kSession.insert( p1 ); // Insert test patients and related classes, dates are long format final Patient p2 = new Patient( "MissDaisy", 90, 1, true,false,true,37.0, 5000,"Purulent","Diffuse or Patchy Infiltrates","None","Heavy","S.Aureus",235,false, false, 0, true,new SimpleDateFormat("yyyy-MM-dd").parse("2014-05-31").getTime(),"", new SimpleDateFormat("yyyy-MM-dd").parse("2014-05-31").getTime(),false,false,tru e,false); kSession.insert( p2 ); // define and get a reference to the entry point EntryPoint nursingStream = kSession.getEntryPoint( "NursingStream" ); // define session clock SessionPseudoClock clock = kSession.getSessionClock(); // insert events // then, while inserting events, advance the clock as necessary: clock.advanceTime(24, TimeUnit.HOURS); CPIScore cpiScore1 = new CPIScore( p1,"diagnosis",7,ToDate(clock.getCurrentTime()) ); nursingStream.insert( cpiScore1 ); System.out.println(cpiScore1.getcpiScoreDate()); // day 2 clock.advanceTime( 24, TimeUnit.HOURS ); cpiScore1 = new CPIScore( p1,"follow-up",5,ToDate(clock.getCurrentTime()) ); nursingStream.insert( cpiScore1 ); System.out.println(cpiScore1.getcpiScoreDate()); // day 3 clock.advanceTime( 24, TimeUnit.HOURS ); cpiScore1 = new CPIScore( p1,"follow-up",5,ToDate(clock.getCurrentTime()) ); nursingStream.insert( cpiScore1 ); System.out.println(cpiScore1.getcpiScoreDate()); The fact classes have now long fields to represent Dates (I changed to see if that made a difference, it didn?t). The event class has such a long field that can be defined as @timestamp but I rather prefer to use the internal event timestamp managed by Drools. So in my .DRL file I?d like to have: declare CPIScore @role(event) end In my rules I compare the patient hospitalization date (defined as Date and later as Long in the fact class) with a stream of events , and I expect drools to extract the correct timestamp from the event. This can?t happen if 1970 is the pseudoclock date. Please advice as about how to proceed, I?m a bit lost at this point. Thanks in advance Natalia --- Este mensaje no contiene virus ni malware porque la protecci?n de avast! Antivirus est? activa. http://www.avast.com -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.jboss.org/pipermail/rules-users/attachments/20140531/64bd87e5/attachment-0001.html -------------- next part -------------- A non-text attachment was scrubbed... Name: not available Type: image/png Size: 3217 bytes Desc: not available Url : http://lists.jboss.org/pipermail/rules-users/attachments/20140531/64bd87e5/attachment-0001.png From arcadyt at gmail.com Sat May 31 16:03:37 2014 From: arcadyt at gmail.com (arcadyt at gmail.com) Date: Sat, 31 May 2014 23:03:37 +0300 Subject: [rules-users] Problem in Drools Persistence: The sessioninfo is persisted, but all of my POJOs that still remain in the session aren't (table is created, but nothing is written into them) Message-ID: Hi everybody! For demo purposes, there's a class Book that goes as follows: @Entity @Table(name="book") public class Book implements Serializable { @Id private String id; private String title; private String description; private Float unitcost; private String isbn; private Integer nbofpages; //Default ctor... getters & setters... toString... } I created a basic rule that checks if Book's title contains "Java" it's left in the session, otherwise it's retracted: dialect "mvel" import com.arcady.*; rule "not a java book" when b:Book(title.contains("Java")==false) then System.out.println("Yet another boring book... Retracting: " + b.toString()); retract(b); end So far, so good. Problem now is when trying to persist all the Drools + Book's instances that still remained in the session into MySQL database (I usedhttp://packtlib.packtpub.com/library/9781849511964/ch02lvl1sec17 as reference). After inserting 4 books as listed below into the session and firing all rules: Book javaBook1 = new Book("Java EE 7"); Book javaBook2 = new Book("Java Persistence API 2.1"); Book javaBook3 = new Book("Java SE 8"); Book csharpBook1 = new Book("C# 5.0"); I get in the output: Hibernate: insert into SessionInfo (lastModificationDate, rulesByteArray, startDate, OPTLOCK) values (?, ?, ?, ?) Hibernate: update SessionInfo set lastModificationDate=?, rulesByteArray=?, startDate=?, OPTLOCK=? where id=? and OPTLOCK=? Hibernate: update SessionInfo set lastModificationDate=?, rulesByteArray=?, startDate=?, OPTLOCK=? where id=? and OPTLOCK=? Hibernate: update SessionInfo set lastModificationDate=?, rulesByteArray=?, startDate=?, OPTLOCK=? where id=? and OPTLOCK=? Yet another boring book... Retracting: Book{id=304e76fd-3d9a-479b-b22d-a774d721df65, title='C# 5.0', description='Blabla', unitcost=0.0, isbn='ABC123', nbofpages=12345} Hibernate: update SessionInfo set lastModificationDate=?, rulesByteArray=?, startDate=?, OPTLOCK=? where id=? and OPTLOCK=? Thus the session was persisted 4 times, and indeed that's what also shows in the database in the sessioninfo table. Problem is Book's table is created with all the correct columns automatically but remains empty... What do you think causes this? Thanks a lot! -- Regards, Arcady Trembovler -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.jboss.org/pipermail/rules-users/attachments/20140531/c55e148e/attachment.html