From ray.hooker at me.com Wed Jan 1 22:54:05 2014 From: ray.hooker at me.com (Ray Hooker) Date: Wed, 01 Jan 2014 22:54:05 -0500 Subject: [rules-users] Facts - One to Many Message-ID: I am trying to figure out how to work with an existing model. The data is in MongoDB with embedded documents. It is about patients would have sub-documents. For example. An individual patient may have multiple allergies. Also a patient has multiple medications. So it is as follows: - Patient.medications ---> multiple Medication objects So I see where you have a simple one to one. Typically perhaps you might have the medication record know that it is associated with the patient, but that is not how it is currently organized. So the question is can I write rules when patients.medications returns a set/ collection of medications associated with the patient. I want to write a rule such as "if a patient is taking medication=xxx...." Thanks for your help. Ray Hooker -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.jboss.org/pipermail/rules-users/attachments/20140101/63216023/attachment-0001.html From dwipin.c at tcs.com Thu Jan 2 02:00:58 2014 From: dwipin.c at tcs.com (dwipin) Date: Wed, 1 Jan 2014 23:00:58 -0800 (PST) Subject: [rules-users] DRL file not getting picked In-Reply-To: <1388546850555-4027486.post@n3.nabble.com> References: <1388483401904-4027476.post@n3.nabble.com> <1388546850555-4027486.post@n3.nabble.com> Message-ID: <1388646058934-4027492.post@n3.nabble.com> This is a maven project. I tried to test using a junit test class and did not see any console output in eclipse. I have tag within the tag. -- View this message in context: http://drools.46999.n3.nabble.com/DRL-file-not-getting-picked-tp4027476p4027492.html Sent from the Drools: User forum mailing list archive at Nabble.com. From wolfgang.laun at gmail.com Thu Jan 2 02:01:49 2014 From: wolfgang.laun at gmail.com (Wolfgang Laun) Date: Thu, 2 Jan 2014 08:01:49 +0100 Subject: [rules-users] Facts - One to Many In-Reply-To: References: Message-ID: Ideally, a relation is represented by separate objects. Then you might have a rule $p: Patient() $p: Takes( patient == $p, $m: medication ) Medication( this == $m ) and this rule will fire for each medication of the patient. Answering such questions without details about the actual data model is impossible. -W On 02/01/2014, Ray Hooker wrote: > I am trying to figure out how to work with an existing model. The data is > in > MongoDB with embedded documents. It is about patients would have > sub-documents. For example. An individual patient may have multiple > allergies. Also a patient has multiple medications. So it is as follows: > > - Patient.medications ---> multiple Medication objects > > So I see where you have a simple one to one. Typically perhaps you might > have the medication record know that it is associated with the patient, but > that is not how it is currently organized. So the question is can I write > rules when patients.medications returns a set/ collection of medications > associated with the patient. I want to write a rule such as "if a patient > is > taking medication=xxx...." > > Thanks for your help. > > Ray Hooker From swapnilaute at gmail.com Thu Jan 2 04:24:09 2014 From: swapnilaute at gmail.com (neal) Date: Thu, 2 Jan 2014 01:24:09 -0800 (PST) Subject: [rules-users] Is there any API in drools 6.0, which creates drl file? In-Reply-To: <1388469218291-4027471.post@n3.nabble.com> References: <1388469218291-4027471.post@n3.nabble.com> Message-ID: <1388654649582-4027494.post@n3.nabble.com> Can some please let me know about other API to create drl file? -- View this message in context: http://drools.46999.n3.nabble.com/Is-there-any-API-in-drools-6-0-which-creates-drl-file-tp4027471p4027494.html Sent from the Drools: User forum mailing list archive at Nabble.com. From wolfgang.laun at gmail.com Thu Jan 2 08:29:11 2014 From: wolfgang.laun at gmail.com (Wolfgang Laun) Date: Thu, 2 Jan 2014 14:29:11 +0100 Subject: [rules-users] Is there any API in drools 6.0, which creates drl file? In-Reply-To: <1388654649582-4027494.post@n3.nabble.com> References: <1388469218291-4027471.post@n3.nabble.com> <1388654649582-4027494.post@n3.nabble.com> Message-ID: Reading that old nabble thread should have shown you that there are several options for generating what people call "DRL file" without saying precisely what they mean. What do you expect when you ask for an "API to create a java file"? -W On 02/01/2014, neal wrote: > Can some please let me know about other API to create drl file? > > > > -- > View this message in context: > http://drools.46999.n3.nabble.com/Is-there-any-API-in-drools-6-0-which-creates-drl-file-tp4027471p4027494.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 swapnilaute at gmail.com Thu Jan 2 09:38:35 2014 From: swapnilaute at gmail.com (Swapnil Aute) Date: Thu, 2 Jan 2014 20:08:35 +0530 Subject: [rules-users] Is there any API in drools 6.0, which creates drl file? In-Reply-To: References: <1388469218291-4027471.post@n3.nabble.com> <1388654649582-4027494.post@n3.nabble.com> Message-ID: <00339A91-739E-4CC0-BCAC-1C7C93BFB07A@gmail.com> I want to use drool engine to run the drl files for decision making. This drl file,we want to create using our own editor. We will br giving certain conditions and actions,with this info we want to create drl file. I wanted to implement the versioning also.If anyone have any idea,please share it. Regards, Neal > On 02-Jan-2014, at 6:59 pm, Wolfgang Laun wrote: > > Reading that old nabble thread should have shown you that there are > several options for generating what people call "DRL file" without > saying precisely what they mean. What do you expect when you > ask for an "API to create a java file"? > > -W > >> On 02/01/2014, neal wrote: >> Can some please let me know about other API to create drl file? >> >> >> >> -- >> View this message in context: >> http://drools.46999.n3.nabble.com/Is-there-any-API-in-drools-6-0-which-creates-drl-file-tp4027471p4027494.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 ray.hooker at me.com Thu Jan 2 11:16:51 2014 From: ray.hooker at me.com (Ray Hooker) Date: Thu, 02 Jan 2014 11:16:51 -0500 Subject: [rules-users] Facts - One to Many In-Reply-To: References: Message-ID: Wolfgang, So in your case you were envisioning the possibility of a Takes object that matched between a particular medication and the patient. Actually we are fairly close in the case of medications. As you probably know MongoDB allows for documents. In this case, the patient?s document contains subdocuments. In the case of medications, this semantically means ?as of the date of this patient document, the patient is taking the following medicine listed by the applicable code and text description?. When read from the DB, you actually have a Java object Patient (or ?Record?) that has a method ?medications? that returns a set of ?Medication? objects. The parent knows about the medication through the set ?medications?. I certainly could assert each patient/ record and for each of those assert each subdocument, inserting a key back to the parent. So the rule would need to identify, for example, any case where a particular had a medication object where the drug code matched a particular code or set of codes. Any suggestions are appreciated. Also in the example below, is ?Takes? a function and what does ?this? refer to? Thanks, Ray On Jan 2, 2014, at 2:01 AM, Wolfgang Laun wrote: > Ideally, a relation is represented by separate objects. Then you might have > a rule > > $p: Patient() > $p: Takes( patient == $p, $m: medication ) > Medication( this == $m ) > > and this rule will fire for each medication of the patient. > > Answering such questions without details about the actual data model > is impossible. > > -W > > On 02/01/2014, Ray Hooker wrote: >> I am trying to figure out how to work with an existing model. The data is >> in >> MongoDB with embedded documents. It is about patients would have >> sub-documents. For example. An individual patient may have multiple >> allergies. Also a patient has multiple medications. So it is as follows: >> >> - Patient.medications ---> multiple Medication objects >> >> So I see where you have a simple one to one. Typically perhaps you might >> have the medication record know that it is associated with the patient, but >> that is not how it is currently organized. So the question is can I write >> rules when patients.medications returns a set/ collection of medications >> associated with the patient. I want to write a rule such as "if a patient >> is >> taking medication=xxx...." >> >> Thanks for your help. >> >> Ray Hooker > _______________________________________________ > 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 Jan 2 12:36:06 2014 From: wolfgang.laun at gmail.com (Wolfgang Laun) Date: Thu, 2 Jan 2014 18:36:06 +0100 Subject: [rules-users] Facts - One to Many In-Reply-To: References: Message-ID: As you describe it, here's the way to refer to a particular medication: Patient( $meds: medications ) Medication( drugCode == "55749-003-01" ) from $meds This rule determines whether the patient has this particular medication. There are other operators that might be useful: Medication( drugCode str[startsWith] "55749-003" ) from $meds Inserting the Medication objects with a backlink to the Patient can simplify rule evaluation, which may depend on the number and complexity of the rules. Compare: Patient( $meds: medications ) Medication( drugCode == "55749-003-01" ) from $meds Medication( drugCode == "55799-565-01" ) from $meds with $p: Patient() Medication( drugCode == "55749-003-01", patient == $p ) Medication( drugCode == "55799-565-01", patient == $p ) Much depends on the number of facts you'll need to process. To answer your question, "Takes" was a class name I invented to refer to the relation as an object, and "this" is Java's "this", referring to the matching object. -W On 02/01/2014, Ray Hooker wrote: > Wolfgang, So in your case you were envisioning the possibility of a Takes > object that matched between a particular medication and the patient. > Actually we are fairly close in the case of medications. > > As you probably know MongoDB allows for documents. In this case, the > patient?s document contains subdocuments. In the case of medications, this > semantically means ?as of the date of this patient document, the patient is > taking the following medicine listed by the applicable code and text > description?. > > When read from the DB, you actually have a Java object Patient (or ?Record?) > that has a method ?medications? that returns a set of ?Medication? objects. > The parent knows about the medication through the set ?medications?. I > certainly could assert each patient/ record and for each of those assert > each subdocument, inserting a key back to the parent. > > So the rule would need to identify, for example, any case where a particular > had a medication object where the drug code matched a particular code or set > of codes. > > Any suggestions are appreciated. Also in the example below, is ?Takes? a > function and what does ?this? refer to? > > Thanks, > > Ray > On Jan 2, 2014, at 2:01 AM, Wolfgang Laun wrote: > >> Ideally, a relation is represented by separate objects. Then you might >> have >> a rule >> >> $p: Patient() >> $p: Takes( patient == $p, $m: medication ) >> Medication( this == $m ) >> >> and this rule will fire for each medication of the patient. >> >> Answering such questions without details about the actual data model >> is impossible. >> >> -W >> >> On 02/01/2014, Ray Hooker wrote: >>> I am trying to figure out how to work with an existing model. The data >>> is >>> in >>> MongoDB with embedded documents. It is about patients would have >>> sub-documents. For example. An individual patient may have multiple >>> allergies. Also a patient has multiple medications. So it is as >>> follows: >>> >>> - Patient.medications ---> multiple Medication objects >>> >>> So I see where you have a simple one to one. Typically perhaps you >>> might >>> have the medication record know that it is associated with the patient, >>> but >>> that is not how it is currently organized. So the question is can I >>> write >>> rules when patients.medications returns a set/ collection of medications >>> associated with the patient. I want to write a rule such as "if a >>> patient >>> is >>> taking medication=xxx...." >>> >>> Thanks for your help. >>> >>> Ray Hooker >> _______________________________________________ >> 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 Thu Jan 2 13:26:49 2014 From: mproctor at codehaus.org (Mark Proctor) Date: Thu, 2 Jan 2014 18:26:49 +0000 Subject: [rules-users] Is there any API in drools 6.0, which creates drl file? In-Reply-To: <00339A91-739E-4CC0-BCAC-1C7C93BFB07A@gmail.com> References: <1388469218291-4027471.post@n3.nabble.com> <1388654649582-4027494.post@n3.nabble.com> <00339A91-739E-4CC0-BCAC-1C7C93BFB07A@gmail.com> Message-ID: <90F6F4F1-3A13-4F0D-B371-A05F397E2F97@codehaus.org> The simplest and best way is to create a model to hold all your data, then use a recursive MVEL template to generate the rule from it. http://mvel.codehaus.org/MVEL+2.0+Templating+Guide Mark On 2 Jan 2014, at 14:38, Swapnil Aute wrote: > I want to use drool engine to run the drl files for decision making. This drl file,we want to create using our own editor. We will br giving certain conditions and actions,with this info we want to create drl file. > I wanted to implement the versioning also.If anyone have any idea,please share it. > > Regards, > Neal > > >> On 02-Jan-2014, at 6:59 pm, Wolfgang Laun wrote: >> >> Reading that old nabble thread should have shown you that there are >> several options for generating what people call "DRL file" without >> saying precisely what they mean. What do you expect when you >> ask for an "API to create a java file"? >> >> -W >> >>> On 02/01/2014, neal wrote: >>> Can some please let me know about other API to create drl file? >>> >>> >>> >>> -- >>> View this message in context: >>> http://drools.46999.n3.nabble.com/Is-there-any-API-in-drools-6-0-which-creates-drl-file-tp4027471p4027494.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 swapnilaute at gmail.com Fri Jan 3 02:29:55 2014 From: swapnilaute at gmail.com (Swapnil Aute) Date: Fri, 3 Jan 2014 12:59:55 +0530 Subject: [rules-users] Is there any API in drools 6.0, which creates drl file? In-Reply-To: <90F6F4F1-3A13-4F0D-B371-A05F397E2F97@codehaus.org> References: <1388469218291-4027471.post@n3.nabble.com> <1388654649582-4027494.post@n3.nabble.com> <00339A91-739E-4CC0-BCAC-1C7C93BFB07A@gmail.com> <90F6F4F1-3A13-4F0D-B371-A05F397E2F97@codehaus.org> Message-ID: <12899311-88EE-41A7-840A-D075023094D7@gmail.com> Thank you Mark for valuable helping answer. Can you please give a simple example of the mentioned approach?It will help me alot to go ahead implement the approch which you mentioned.Thanks!! Regards, Swapnil Aute PH:+919652538632 > On 02-Jan-2014, at 11:56 pm, Mark Proctor wrote: > > The simplest and best way is to create a model to hold all your data, then use a recursive MVEL template to generate the rule from it. > http://mvel.codehaus.org/MVEL+2.0+Templating+Guide > > Mark > > >> On 2 Jan 2014, at 14:38, Swapnil Aute wrote: >> >> I want to use drool engine to run the drl files for decision making. This drl file,we want to create using our own editor. We will br giving certain conditions and actions,with this info we want to create drl file. >> I wanted to implement the versioning also.If anyone have any idea,please share it. >> >> Regards, >> Neal >> >> >>> On 02-Jan-2014, at 6:59 pm, Wolfgang Laun wrote: >>> >>> Reading that old nabble thread should have shown you that there are >>> several options for generating what people call "DRL file" without >>> saying precisely what they mean. What do you expect when you >>> ask for an "API to create a java file"? >>> >>> -W >>> >>>> On 02/01/2014, neal wrote: >>>> Can some please let me know about other API to create drl file? >>>> >>>> >>>> >>>> -- >>>> View this message in context: >>>> http://drools.46999.n3.nabble.com/Is-there-any-API-in-drools-6-0-which-creates-drl-file-tp4027471p4027494.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 > > > _______________________________________________ > rules-users mailing list > rules-users at lists.jboss.org > https://lists.jboss.org/mailman/listinfo/rules-users From abhijeet.b.patil at jpmorgan.com Fri Jan 3 02:41:35 2014 From: abhijeet.b.patil at jpmorgan.com (Avin) Date: Thu, 2 Jan 2014 23:41:35 -0800 (PST) Subject: [rules-users] iterating through list of object and checking if object is present in Hashmap Message-ID: <1388734895302-4027505.post@n3.nabble.com> Hi Guys, I am new to drools and i have done some PoC of small things. Now i want to implement a business functionality and it seems very complex to me. I didnt get much time to go through docs but i went through it as much as can do. but still no luck My issue is I have list of employee objects it has methods say empId, empPhone and empFName. this employee class has overridden hashcode and equals method. It uses empId and empPhone to check if user is right user. I have hashMap of emp objects this map contains all employees of all depts and locations. I want to check if objects present in list are present in hashmap. if they are present then i want to add them to different list and return corresponding java code is as below List empList = new ArrayList(); Map map = new HashMap(); for(Emp emp : empList){ if(map.contains(emp)){ // do something } } I need to convert above code in drools format in drl file. can I iterate list and use contains in when clause ? so that i can put my actions in then. through java i am providing drl with employeelist and hashmap Please help i am in real trouble now I tried doing rule "rule for emp" when //$o : MyClass( id == "1", name == "name" ) empDetails : TempStorage($object : empDetails) empTable: TempStorage($mapObject : empTableData) $mapObject.contains($object) and Emp(empId == $object.empId , empPhone == $object.empPhone) from $object then System.out.println("hiiiii"); end but no luck i get exception as *Unable to resolve ObjectType '$mapObject.contains' : [Rule name='calculation for 10%']* -- View this message in context: http://drools.46999.n3.nabble.com/iterating-through-list-of-object-and-checking-if-object-is-present-in-Hashmap-tp4027505.html Sent from the Drools: User forum mailing list archive at Nabble.com. From neosniperkiller at gmail.com Fri Jan 3 17:00:12 2014 From: neosniperkiller at gmail.com (Tom DC) Date: Fri, 3 Jan 2014 14:00:12 -0800 (PST) Subject: [rules-users] Drools 6.0.1 micro benchmark Miss Manners troubles Message-ID: <1388786411729-4027510.post@n3.nabble.com> Hello, For my master thesis I'm benchmarking different rule engines by making use of the micro benchmarks Miss Manners, Waltz and Waltzdb. In the previous version of Drools Expert (5.5.0) the results were surprisingly fast! So when I saw the release of the latest Drools Expert version, 6, I was wondering if there would be a difference in execution time as well. So I started making a new project, using Netbeans, and added the old benchmark code and modified the imports according to the example projects (there is a benchmark project included in the latest release of Drools). I also checked for possible differences between the old code and the new, but didn't find any. When I now run the benchmark for Miss Manners, it seems that Drools is unable to even solve the easiest problem with 16 visitors. It keeps on executing the same rule over and over without going to the next one when it becomes available. To see if this was a problem in my custom edition of the ruleset, I also ran the example benchmark, but also noticed that this one could not run the Miss Manners benchmark anymore. Did somebody already figure out what is wrong with this benchmark? Thx Tom DC -- View this message in context: http://drools.46999.n3.nabble.com/Drools-6-0-1-micro-benchmark-Miss-Manners-troubles-tp4027510.html Sent from the Drools: User forum mailing list archive at Nabble.com. From mproctor at codehaus.org Fri Jan 3 17:48:39 2014 From: mproctor at codehaus.org (Mark Proctor) Date: Fri, 3 Jan 2014 22:48:39 +0000 Subject: [rules-users] Drools 6.0.1 micro benchmark Miss Manners troubles In-Reply-To: <1388786411729-4027510.post@n3.nabble.com> References: <1388786411729-4027510.post@n3.nabble.com> Message-ID: Those ?benchmarks? were develop in the mid 80s, they don?t have any relevancy to judging the performance of something like Drools 6.0. For instance it would not benefit in anyway from the lazy algorithm provided in 6.0, as it uses a ?context? root object, which is no longer needed. If those ?benchmarks? aren?t running right now, it?s because they rely on a very specific ordering of the matches for a given rule - which is based on the OPS5 conflict resolution strategy. We don?t support this strategy, as it?s too complex for general use. What you have to ask is, even if they do run - what does that tell you? What are you learning about that engine and where it performs well and where it doesn?t? We don?t learn anything of specific details, from those. Imho you should probably look into develop a set of micro benchmark?s, that look to stress specific parts of the engine. So that from each benchmark, we learn specific details about the engines behaviour for that configuration. For 6.0 I?d be very interested to try and prove how, when and how much the lazy algo can help, it?s not something we?ve had time ourselves to figure out yet. Mark On 3 Jan 2014, at 22:00, Tom DC wrote: > Hello, > > For my master thesis I'm benchmarking different rule engines by making use > of the micro benchmarks Miss Manners, Waltz and Waltzdb. > > In the previous version of Drools Expert (5.5.0) the results were > surprisingly fast! > So when I saw the release of the latest Drools Expert version, 6, I was > wondering if there would be a difference in execution time as well. > > So I started making a new project, using Netbeans, and added the old > benchmark code and modified the imports according to the example projects > (there is a benchmark project included in the latest release of Drools). I > also checked for possible differences between the old code and the new, but > didn't find any. > > When I now run the benchmark for Miss Manners, it seems that Drools is > unable to even solve the easiest problem with 16 visitors. It keeps on > executing the same rule over and over without going to the next one when it > becomes available. > > To see if this was a problem in my custom edition of the ruleset, I also ran > the example benchmark, but also noticed that this one could not run the Miss > Manners benchmark anymore. > > Did somebody already figure out what is wrong with this benchmark? > > > Thx > > Tom DC > > > > -- > View this message in context: http://drools.46999.n3.nabble.com/Drools-6-0-1-micro-benchmark-Miss-Manners-troubles-tp4027510.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 joseph.white at mitchell.com Fri Jan 3 18:29:24 2014 From: joseph.white at mitchell.com (sdjoe) Date: Fri, 3 Jan 2014 15:29:24 -0800 (PST) Subject: [rules-users] java.lang.RuntimeException: Cannot find a default KieSession Message-ID: <1388791764449-4027512.post@n3.nabble.com> I am using Drools 6.0.0.FINAL on JBOSS EAP 5.1.2. My code: KieServices ks = KieServices.Factory.get(); KieContainer kContainer = ks.getKieClasspathContainer(); KieSession kSession = kContainer.newKieSession(); kSession.insert(mdxObj); kSession.fireAllRules(); Works fine outside of the JBOSS container. I am deploying this code within a JAR file that is the main part of my EAR file. I feel as though I have tried every possible answer I have found on the web for the past two days and this is my last resort. Does anyone have any ideas on what could be the problem? Thanks, -- View this message in context: http://drools.46999.n3.nabble.com/java-lang-RuntimeException-Cannot-find-a-default-KieSession-tp4027512.html Sent from the Drools: User forum mailing list archive at Nabble.com. From mproctor at codehaus.org Fri Jan 3 19:09:30 2014 From: mproctor at codehaus.org (Mark Proctor) Date: Sat, 4 Jan 2014 00:09:30 +0000 Subject: [rules-users] java.lang.RuntimeException: Cannot find a default KieSession In-Reply-To: <1388791764449-4027512.post@n3.nabble.com> References: <1388791764449-4027512.post@n3.nabble.com> Message-ID: <114A01FA-A3F4-4A38-BA0C-377C64D60520@codehaus.org> We?ve only been developing this on EAP6. I expect EAP5 has a different mechanism for it?s virtual file system, and discovery will not work. It?s unlikely we?ll get time to investigate this right now, as EAP5 is a low priority for us. Although patches (with tests) are always welcome. Mark On 3 Jan 2014, at 23:29, sdjoe wrote: > I am using Drools 6.0.0.FINAL on JBOSS EAP 5.1.2. My code: > KieServices ks = KieServices.Factory.get(); > KieContainer kContainer = ks.getKieClasspathContainer(); > KieSession kSession = kContainer.newKieSession(); > kSession.insert(mdxObj); > kSession.fireAllRules(); > > Works fine outside of the JBOSS container. I am deploying this code within a > JAR file that is the main part of my EAR file. I feel as though I have tried > every possible answer I have found on the web for the past two days and this > is my last resort. > > Does anyone have any ideas on what could be the problem? > > Thanks, > > > > > > -- > View this message in context: http://drools.46999.n3.nabble.com/java-lang-RuntimeException-Cannot-find-a-default-KieSession-tp4027512.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 m1e1r1r1y at 163.com Fri Jan 3 23:43:06 2014 From: m1e1r1r1y at 163.com (merry0900) Date: Fri, 3 Jan 2014 20:43:06 -0800 (PST) Subject: [rules-users] write a rule file, longest matching? Message-ID: <1388810586928-4027514.post@n3.nabble.com> hello?here is my java code main(){ MyPojo myPojo=new MyPojo(); myPojo.setA("aaa") myPojo.setB("bbb")... . . . List myPojos=getAllFromDb()// get all object by mybatis form database ,and each one is different from another. ksession.setGlobal("myPojos", myPojos); ksession.insert(myPojo); } class MyPojo { private Long id; private String a; private String b; private String c; private String d; //getters; //setters; } i want to write a drl file whitch can find a List myPojoSub that Each MyPojo From myPojoSub is come from myPojos and limited by some rules? for example? myPojos={{id:1,a:"kkk",b:"iii",c:"ppp"},{id:2,a:"kkk",b:"iii"},{id:3,a:"kkk"},{id:4,a:"kkk",b:"iii",c:"ooo"},{id:5,a:"mmm",b:"fff",c:"ttt"}} and if there is a myPojo{a:kkk,b:"iii",c:"ppp"} then {id:1,a:"kkk",b:"iii",c:"ppp"} from myPojos is a member of myPojoSub if there is a myPojo{a:kkk,b:"iii",c:"ttt"} then {id:2,a:"kkk",b:"iii",}from myPojos is a member of myPojoSub if there is a myPojo{a:kkk,b:"fff",c:"ttt"} then {id:3,a:"kkk"}from myPojos is a member of myPojoSub if there is a myPojo{a:"lll",b:"fff",c:"ttt"} then {id:5,a:"mmm",b:"fff",c:"ttt"}from myPojos is a member of myPojoSub if there is a myPojo{a:"ppp",b:"jjj",c:"zzz"} then no any MyPojo from myPojos is a member of myPojoSub how do i write my drl rules? any one can help me or give some suggestions? thank you here is a rule file templet? package com.test.tules; import com.test.MyPojo; import java.util.List; globle List myPojos; rule "aaaaa" salience 65523 when then -- View this message in context: http://drools.46999.n3.nabble.com/write-a-rule-file-longest-matching-tp4027514.html Sent from the Drools: User forum mailing list archive at Nabble.com. From wolfgang.laun at gmail.com Sat Jan 4 02:25:55 2014 From: wolfgang.laun at gmail.com (Wolfgang Laun) Date: Sat, 4 Jan 2014 08:25:55 +0100 Subject: [rules-users] write a rule file, longest matching? In-Reply-To: <1388810586928-4027514.post@n3.nabble.com> References: <1388810586928-4027514.post@n3.nabble.com> Message-ID: Rather than examples, you might have posted the requirement itself, i.e., whatever was in your mind when you composed the example and the data. Is the number of matching attributes a, b, c, d the deciding factor? What happens if the inserted fact matches a and b of list#1 and c and d of list#2? And so on. This *seems* to be a variation of what I call "classification problem", see http://www.redhat.com/rhecm/rest-rhecm/jcr/repository/collaboration/sites%20content/live/redhat/web-cabinet/home/resourcelibrary/whitepapers/brms-design-patterns/rh:pdfFile.pdf but it's hard to tell from the example. -W On 04/01/2014, merry0900 wrote: > hello?here is my java code > > main(){ > MyPojo myPojo=new MyPojo(); > myPojo.setA("aaa") > myPojo.setB("bbb")... > . > . > . > List myPojos=getAllFromDb()// get all object by mybatis form > database ,and each one is different from another. > > ksession.setGlobal("myPojos", myPojos); > ksession.insert(myPojo); > } > > > class MyPojo { > private Long id; > private String a; > private String b; > private String c; > private String d; > //getters; > //setters; > } > > > i want to write a drl file whitch can find a List myPojoSub that > Each MyPojo From myPojoSub is come from myPojos and limited by some rules? > for example? > > > myPojos={{id:1,a:"kkk",b:"iii",c:"ppp"},{id:2,a:"kkk",b:"iii"},{id:3,a:"kkk"},{id:4,a:"kkk",b:"iii",c:"ooo"},{id:5,a:"mmm",b:"fff",c:"ttt"}} > > and if there is a myPojo{a:kkk,b:"iii",c:"ppp"} then > {id:1,a:"kkk",b:"iii",c:"ppp"} from myPojos is a member of myPojoSub > > if there is a myPojo{a:kkk,b:"iii",c:"ttt"} then > {id:2,a:"kkk",b:"iii",}from myPojos is a member of myPojoSub > > if there is a myPojo{a:kkk,b:"fff",c:"ttt"} then {id:3,a:"kkk"}from myPojos > is a member of myPojoSub > if there is a myPojo{a:"lll",b:"fff",c:"ttt"} then > {id:5,a:"mmm",b:"fff",c:"ttt"}from myPojos is a member of myPojoSub > > if there is a myPojo{a:"ppp",b:"jjj",c:"zzz"} then no any MyPojo from > myPojos is a member of myPojoSub > > > how do i write my drl rules? any one can help me or give some > suggestions? thank you > > here is a rule file templet? > > package com.test.tules; > > import com.test.MyPojo; > import java.util.List; > > globle List myPojos; > rule "aaaaa" > salience 65523 > > when > > then > > > > > > > > -- > View this message in context: > http://drools.46999.n3.nabble.com/write-a-rule-file-longest-matching-tp4027514.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 dwipin.c at tcs.com Sun Jan 5 23:00:11 2014 From: dwipin.c at tcs.com (dwipin) Date: Sun, 5 Jan 2014 20:00:11 -0800 (PST) Subject: [rules-users] DRL file not getting picked In-Reply-To: <1388646058934-4027492.post@n3.nabble.com> References: <1388483401904-4027476.post@n3.nabble.com> <1388546850555-4027486.post@n3.nabble.com> <1388646058934-4027492.post@n3.nabble.com> Message-ID: <1388980811119-4027521.post@n3.nabble.com> anyone there who could give some pointers ? Thanks and Regards, Dwipin Chandran. -- View this message in context: http://drools.46999.n3.nabble.com/DRL-file-not-getting-picked-tp4027476p4027521.html Sent from the Drools: User forum mailing list archive at Nabble.com. From igrachev at abv.bg Mon Jan 6 04:51:28 2014 From: igrachev at abv.bg (milen igrachev) Date: Mon, 6 Jan 2014 11:51:28 +0200 (EET) Subject: [rules-users] Is rule introspection available from the Drools API? Message-ID: <2025282268.15018.1389001888999.JavaMail.apache@nm1.abv.bg> Hello, is there a way to introspect a Drools file from within java code? What I need is to be able to identify the facts and the fact attributes that are used in a given DRL file. For example if I have a rule stored in a customer.drl DRL file within my project, containing the following definition: package myRulePackage import org.rules.model.Customer import org.rules.model.Mambership rule "is eligible customer" when $c:Customer(status == "active") Membership(customer == $c, type == "premium") then $c.setEligibilityStatus(true); end What i need is a way to understand that this ruleset customer.drl is using two fact types - Customer and Membership and three of their attributes - Customer.status, Membership.customer and Membership.type. I found some information on the internet that such functionality is not supported, however the information was a bit too old, so I decided to ask again. Big thanks for the support! Milen -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.jboss.org/pipermail/rules-users/attachments/20140106/06cf3905/attachment-0001.html From abhijeet.b.patil at jpmorgan.com Mon Jan 6 05:06:06 2014 From: abhijeet.b.patil at jpmorgan.com (Avin) Date: Mon, 6 Jan 2014 02:06:06 -0800 (PST) Subject: [rules-users] iterating through list of object and checking if object is present in Hashmap In-Reply-To: <1388734895302-4027505.post@n3.nabble.com> References: <1388734895302-4027505.post@n3.nabble.com> Message-ID: <1389002766529-4027523.post@n3.nabble.com> Have done witrh it HURRAYYYYYYYYYYYYYYYYYYYYY -- View this message in context: http://drools.46999.n3.nabble.com/iterating-through-list-of-object-and-checking-if-object-is-present-in-Hashmap-tp4027505p4027523.html Sent from the Drools: User forum mailing list archive at Nabble.com. From abhijeet.b.patil at jpmorgan.com Mon Jan 6 05:14:12 2014 From: abhijeet.b.patil at jpmorgan.com (Avin) Date: Mon, 6 Jan 2014 02:14:12 -0800 (PST) Subject: [rules-users] getting object from hashMap in when clause and using it across the rule Message-ID: <1389003252519-4027524.post@n3.nabble.com> Hi, I have an list of objects (objectList) and an hashmap (referenceMap) with similiar kind of objects. I have to check which objects in list matches with hashMap. i can iterate list and check it with hashMap but i am not able to get value from from the hashmap which itself is an custom object and i need to check its value below code i am using to iterate list and check it from hashMap when TempStorage($object : concentrationDataTable ) TempStorage($mapObject : concPercentRefObjects) $dataObject : ConcentrationDataTable($keyObject : concPercentRefkey) from $object eval( $mapObject.get($keyObject) != null) I want to add variable to get this value *$mapObject.get($keyObject)* and also check if its property getMax returns me other than 10 -- View this message in context: http://drools.46999.n3.nabble.com/getting-object-from-hashMap-in-when-clause-and-using-it-across-the-rule-tp4027524.html Sent from the Drools: User forum mailing list archive at Nabble.com. From robert.el-hussein at gmx.de Mon Jan 6 06:29:20 2014 From: robert.el-hussein at gmx.de (rob_87) Date: Mon, 6 Jan 2014 03:29:20 -0800 (PST) Subject: [rules-users] "OR"-constraint doesn't work Message-ID: <1389007760539-4027525.post@n3.nabble.com> Hey guys, I'm trying to build a simple score-calculator with optaplanner. Method "A_at_Index2_or_Index3" should force "A" to be at index 2 or index 3. Method "no_A_at_Index2" forces "A" not to be at Index 2. So, "A" only can be at index 3 ... but it doesn't. Optaplanner says the score is -1, but the score has to be 0. Method "no_A_at_Index2" works well. "A_at_Index2_or_Index3" seems to be wrong. Does anyone know what I am doing wrong? Do u have any examples for building complex constraints like XOR, AND, ...)? @Override public SimpleScore calculateScore(NCells nCells) { int score = 0; if (!(this.A_at_Index2_or_Index3(nCells))){ score--; } if (!(this.no_A_at_Index2(nCells))){ score--; } return SimpleScore.valueOf(score); } public boolean A_at_Index2_or_Index3(NCells nCells){ List cellList = nCells.getCellList(); ChomskyRule rule1 = cellList.get(2).getRule(); ChomskyRule rule2 = cellList.get(3).getRule(); int a_counter = 0; if ( rule1 != null && rule1.getLeftSide().equals("A")){ a_counter++; } if ( rule2 != null && rule2.getLeftSide().equals("A")){ a_counter++; } if (a_counter==0 && rule1!=null && rule2!=null){ return false; } return true; } public boolean no_A_at_Index2(NCells nCells){ List cellList = nCells.getCellList(); ChomskyRule rule = cellList.get(2).getRule(); if(rule!=null && rule.getLeftSide().equals("A")){return false;} return true; } -- View this message in context: http://drools.46999.n3.nabble.com/OR-constraint-doesn-t-work-tp4027525.html Sent from the Drools: User forum mailing list archive at Nabble.com. From vinodkiran at usa.net Mon Jan 6 06:50:49 2014 From: vinodkiran at usa.net (vinodkiran) Date: Mon, 6 Jan 2014 03:50:49 -0800 (PST) Subject: [rules-users] DRL file not getting picked In-Reply-To: <1388980811119-4027521.post@n3.nabble.com> References: <1388483401904-4027476.post@n3.nabble.com> <1388546850555-4027486.post@n3.nabble.com> <1388646058934-4027492.post@n3.nabble.com> <1388980811119-4027521.post@n3.nabble.com> Message-ID: <1389009049986-4027526.post@n3.nabble.com> Dwipin, It is difficult to diagnose given the limited information. Can you take a sample (test) and try running it locally ? https://github.com/droolsjbpm/droolsjbpm-integration/blob/master/kie-spring/src/test/java/org/kie/spring/tests/KieSpringBasicsTest2.java - Vinod -- View this message in context: http://drools.46999.n3.nabble.com/DRL-file-not-getting-picked-tp4027476p4027526.html Sent from the Drools: User forum mailing list archive at Nabble.com. From brachi.w at sapiens.com Mon Jan 6 08:13:13 2014 From: brachi.w at sapiens.com (brachi) Date: Mon, 6 Jan 2014 05:13:13 -0800 (PST) Subject: [rules-users] how can I resolve java.lang.RuntimeException: Unknown accessor type Message-ID: <1389013993546-4027529.post@n3.nabble.com> I'm using drools 5.5.0.Final. I noticed that I got the bellow exception in my logs, but my process is finished. I mean that this exception wasn't break the process, only logged out. what is the meaning of this exception and how can I resolve it. I tried to upgrade mvel2 to the latest final version (2.1.8.Final) but it wasn't solve the exception. java.lang.RuntimeException: Unknown accessor type: org.mvel2.optimizers.impl.refl.collection.ArrayCreator at 5b8452eb at org.drools.rule.constraint.ConditionAnalyzer.analyzeAccessor(ConditionAnalyzer.java:264) at org.drools.rule.constraint.ConditionAnalyzer.analyzeNode(ConditionAnalyzer.java:250) at org.drools.rule.constraint.ConditionAnalyzer.statementToExpression(ConditionAnalyzer.java:467) at org.drools.rule.constraint.ConditionAnalyzer.readInvocationParams(ConditionAnalyzer.java:450) at org.drools.rule.constraint.ConditionAnalyzer.analyzeAccessor(ConditionAnalyzer.java:345) at org.drools.rule.constraint.ConditionAnalyzer.analyzeExpressionNode(ConditionAnalyzer.java:326) at org.drools.rule.constraint.ConditionAnalyzer.analyzeAccessor(ConditionAnalyzer.java:286) at org.drools.rule.constraint.ConditionAnalyzer.analyzeNode(ConditionAnalyzer.java:250) at org.drools.rule.constraint.ConditionAnalyzer.analyzeSingleCondition(ConditionAnalyzer.java:133) at org.drools.rule.constraint.ConditionAnalyzer.analyzeCondition(ConditionAnalyzer.java:99) at org.drools.rule.constraint.ConditionAnalyzer.analyzeCondition(ConditionAnalyzer.java:70) at org.drools.rule.constraint.MvelConditionEvaluator.getAnalyzedCondition(MvelConditionEvaluator.java:83) at org.drools.rule.constraint.MvelConstraint.executeJitting(MvelConstraint.java:270) at org.drools.rule.constraint.MvelConstraint.access$200(MvelConstraint.java:51) at org.drools.rule.constraint.MvelConstraint$ConditionJitter.run(MvelConstraint.java:250) at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:886) at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908) at java.lang.Thread.run(Thread.java:662) -- View this message in context: http://drools.46999.n3.nabble.com/how-can-I-resolve-java-lang-RuntimeException-Unknown-accessor-type-tp4027529.html Sent from the Drools: User forum mailing list archive at Nabble.com. From brachi.w at sapiens.com Mon Jan 6 08:36:05 2014 From: brachi.w at sapiens.com (brachi) Date: Mon, 6 Jan 2014 05:36:05 -0800 (PST) Subject: [rules-users] permgen leak In-Reply-To: <52AF5639.5060507@gmail.com> References: <0DC511DF-68A3-4250-8E90-AACDB0F6B6AB@gmail.com> <1386072297227-4027064.post@n3.nabble.com> <1386075023882-4027065.post@n3.nabble.com> <1386075072321-4027066.post@n3.nabble.com> <1386258456435-4027111.post@n3.nabble.com> <1386259095814-4027115.post@n3.nabble.com> <52AD529D.8040504@gmail.com> <1387189626968-4027321.post@n3.nabble.com> <52AF5639.5060507@gmail.com> Message-ID: <1389015365148-4027530.post@n3.nabble.com> 1. when will you estimate that 5.6.0.Final will published out? 2. why did you add this dispose methods on the implementation and not on the interface, I don't want to cust the builder and kbase in order to dispose, can it be? 3. It occurs also on 6.0. -- View this message in context: http://drools.46999.n3.nabble.com/permgen-leak-tp4027038p4027530.html Sent from the Drools: User forum mailing list archive at Nabble.com. From mproctor at codehaus.org Mon Jan 6 09:05:33 2014 From: mproctor at codehaus.org (Mark Proctor) Date: Mon, 6 Jan 2014 14:05:33 +0000 Subject: [rules-users] Is rule introspection available from the Drools API? In-Reply-To: <2025282268.15018.1389001888999.JavaMail.apache@nm1.abv.bg> References: <2025282268.15018.1389001888999.JavaMail.apache@nm1.abv.bg> Message-ID: <85171732-7E6D-4A88-A6EF-E15BB904FBDC@codehaus.org> The code is there, but it?s not public and not documented, and the code can be a little hard to understand - as it?s grown organically over the years. You?ll need to cast and unwrap and look at member vars. Start on the Rule and the lhs variable. You can always pop onto irc, with live questions,and we?ll try and respond quickly. http://www.jboss.org/drools/irc Mark On 6 Jan 2014, at 09:51, milen igrachev wrote: > Hello, > is there a way to introspect a Drools file from within java code? > What I need is to be able to identify the facts and the fact attributes that are used in a given DRL file. > > For example if I have a rule stored in a customer.drl DRL file within my project, containing the following definition: > package myRulePackage > > import org.rules.model.Customer > import org.rules.model.Mambership > > rule "is eligible customer" > when > $c:Customer(status == "active") > Membership(customer == $c, type == "premium") > then > $c.setEligibilityStatus(true); > end > > What i need is a way to understand that this ruleset customer.drl is using two fact types - Customer and Membership and three of their attributes - Customer.status, Membership.customer and Membership.type. > > > I found some information on the internet that such functionality is not supported, however the information was a bit too old, so I decided to ask again. > > > Big thanks for the support! > Milen > _______________________________________________ > rules-users mailing list > rules-users at lists.jboss.org > https://lists.jboss.org/mailman/listinfo/rules-users From mproctor at codehaus.org Mon Jan 6 09:08:44 2014 From: mproctor at codehaus.org (Mark Proctor) Date: Mon, 6 Jan 2014 14:08:44 +0000 Subject: [rules-users] permgen leak In-Reply-To: <1389015365148-4027530.post@n3.nabble.com> References: <0DC511DF-68A3-4250-8E90-AACDB0F6B6AB@gmail.com> <1386072297227-4027064.post@n3.nabble.com> <1386075023882-4027065.post@n3.nabble.com> <1386075072321-4027066.post@n3.nabble.com> <1386258456435-4027111.post@n3.nabble.com> <1386259095814-4027115.post@n3.nabble.com> <52AD529D.8040504@gmail.com> <1387189626968-4027321.post@n3.nabble.com> <52AF5639.5060507@gmail.com> <1389015365148-4027530.post@n3.nabble.com> Message-ID: On 6 Jan 2014, at 13:36, brachi wrote: > 1. when will you estimate that 5.6.0.Final will published out? 5.6.CR1 is out there, but we?ve not heard any reports of people using it. So we?ve no idea if it?s stable enough to push out, if we get enough people telling us it?s ok - we?ll push it. Core developers are focused on 6.0 right now, so 5.6 will rely on community to test and fix it. > 2. why did you add this dispose methods on the implementation and not on the > interface, I don't want to cust the builder and kbase in order to dispose, > can it be? This was something done by Davide, I?m not sure it?s the best way to fix the problem. I believe it?s fixing the symptom, not the cause. As such we don?t want to make the fix public, it?s a work around. This is one of the reasons why we are also holding up 5.6 final, because I?d rather we fixed the problem. > 3. It occurs also on 6.0. What does? The issue for the kbase.dispose() is not needed on 6.0, as the class loader is different and simpler. Mark > > > > -- > View this message in context: http://drools.46999.n3.nabble.com/permgen-leak-tp4027038p4027530.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 Mon Jan 6 09:10:02 2014 From: ge0ffrey.spam at gmail.com (Geoffrey De Smet) Date: Mon, 06 Jan 2014 15:10:02 +0100 Subject: [rules-users] "OR"-constraint doesn't work [planner] In-Reply-To: <1389007760539-4027525.post@n3.nabble.com> References: <1389007760539-4027525.post@n3.nabble.com> Message-ID: <52CAB93A.5000402@gmail.com> Duplicates http://stackoverflow.com/questions/20937673/or-constraint-with-simple-score-calculator-doesnt-work On 06-01-14 12:29, rob_87 wrote: > Hey guys, > > I'm trying to build a simple score-calculator with optaplanner. > Method "A_at_Index2_or_Index3" should force "A" to be at index 2 or index 3. > Method "no_A_at_Index2" forces "A" not to be at Index 2. So, "A" only can be > at index 3 ... but it doesn't. > Optaplanner says the score is -1, but the score has to be 0. Method > "no_A_at_Index2" works well. "A_at_Index2_or_Index3" seems to be wrong. > > Does anyone know what I am doing wrong? Do u have any examples for building > complex constraints like XOR, AND, ...)? > > @Override > public SimpleScore calculateScore(NCells nCells) { > > int score = 0; > if (!(this.A_at_Index2_or_Index3(nCells))){ > score--; > } > > if (!(this.no_A_at_Index2(nCells))){ > score--; > } > return SimpleScore.valueOf(score); > } > > > public boolean A_at_Index2_or_Index3(NCells nCells){ > > List cellList = nCells.getCellList(); > ChomskyRule rule1 = cellList.get(2).getRule(); > ChomskyRule rule2 = cellList.get(3).getRule(); > int a_counter = 0; > if ( rule1 != null && rule1.getLeftSide().equals("A")){ > a_counter++; > } > if ( rule2 != null && rule2.getLeftSide().equals("A")){ > a_counter++; > } > > if (a_counter==0 && rule1!=null && rule2!=null){ > return false; > } > return true; > } > > public boolean no_A_at_Index2(NCells nCells){ > > List cellList = nCells.getCellList(); > ChomskyRule rule = cellList.get(2).getRule(); > if(rule!=null && rule.getLeftSide().equals("A")){return false;} > return true; > } > > > > -- > View this message in context: http://drools.46999.n3.nabble.com/OR-constraint-doesn-t-work-tp4027525.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 brachi.w at sapiens.com Mon Jan 6 09:31:40 2014 From: brachi.w at sapiens.com (brachi) Date: Mon, 6 Jan 2014 06:31:40 -0800 (PST) Subject: [rules-users] permgen leak In-Reply-To: References: <1386075023882-4027065.post@n3.nabble.com> <1386075072321-4027066.post@n3.nabble.com> <1386258456435-4027111.post@n3.nabble.com> <1386259095814-4027115.post@n3.nabble.com> <52AD529D.8040504@gmail.com> <1387189626968-4027321.post@n3.nabble.com> <52AF5639.5060507@gmail.com> <1389015365148-4027530.post@n3.nabble.com> Message-ID: <1389018700389-4027534.post@n3.nabble.com> I have memory leak when using java dialect that doesn't happen with mvel dialect. when change to mvel some rules that hit with java doesn't hit now.and I got compilation errors. this memory leak occurs also at 6.0. -- View this message in context: http://drools.46999.n3.nabble.com/permgen-leak-tp4027038p4027534.html Sent from the Drools: User forum mailing list archive at Nabble.com. From brachi.w at sapiens.com Mon Jan 6 10:57:41 2014 From: brachi.w at sapiens.com (brachi) Date: Mon, 6 Jan 2014 07:57:41 -0800 (PST) Subject: [rules-users] stuck! Unknown accessor type: org.mvel2.optimizers.impl.refl.collection.ArrayCreator@690c2a7a In-Reply-To: <1354202737050-4021015.post@n3.nabble.com> References: <1353967076623-4020969.post@n3.nabble.com> <1354202737050-4021015.post@n3.nabble.com> Message-ID: <1389023861262-4027535.post@n3.nabble.com> also me. It happens only on the first executions. -- View this message in context: http://drools.46999.n3.nabble.com/stuck-Unknown-accessor-type-org-mvel2-optimizers-impl-refl-collection-ArrayCreator-690c2a7a-tp4020969p4027535.html Sent from the Drools: User forum mailing list archive at Nabble.com. From mproctor at codehaus.org Mon Jan 6 11:01:48 2014 From: mproctor at codehaus.org (Mark Proctor) Date: Mon, 6 Jan 2014 16:01:48 +0000 Subject: [rules-users] permgen leak In-Reply-To: <1389018700389-4027534.post@n3.nabble.com> References: <1386075023882-4027065.post@n3.nabble.com> <1386075072321-4027066.post@n3.nabble.com> <1386258456435-4027111.post@n3.nabble.com> <1386259095814-4027115.post@n3.nabble.com> <52AD529D.8040504@gmail.com> <1387189626968-4027321.post@n3.nabble.com> <52AF5639.5060507@gmail.com> <1389015365148-4027530.post@n3.nabble.com> <1389018700389-4027534.post@n3.nabble.com> Message-ID: <23E0006C-4B62-4000-BA2B-05E6314F9026@codehaus.org> Can you help with any self contained unit tests, to measure, test and prove this? Did you set CMSClassUnloadingEnabled http://stackoverflow.com/questions/3334911/what-does-jvm-flag-cmsclassunloadingenabled-actually-do Mark On 6 Jan 2014, at 14:31, brachi wrote: > I have memory leak when using java dialect that doesn't happen with mvel > dialect. > when change to mvel some rules that hit with java doesn't hit now.and I got > compilation errors. > this memory leak occurs also at 6.0. > > > > -- > View this message in context: http://drools.46999.n3.nabble.com/permgen-leak-tp4027038p4027534.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/20140106/3df50bcb/attachment.html From mproctor at codehaus.org Mon Jan 6 11:03:17 2014 From: mproctor at codehaus.org (Mark Proctor) Date: Mon, 6 Jan 2014 16:03:17 +0000 Subject: [rules-users] stuck! Unknown accessor type: org.mvel2.optimizers.impl.refl.collection.ArrayCreator@690c2a7a In-Reply-To: <1389023861262-4027535.post@n3.nabble.com> References: <1353967076623-4020969.post@n3.nabble.com> <1354202737050-4021015.post@n3.nabble.com> <1389023861262-4027535.post@n3.nabble.com> Message-ID: <83C4A2C0-10C2-4D0F-B827-4A7B6FB43A96@codehaus.org> which version of Drools? If it?s 5.x, then please try with 5.6.CR1. If it?s 6.x, pleas try the 6.0.1. We may also need some self contained unit test: http://docs.jboss.org/drools/release/5.5.0.Final/droolsjbpm-introduction-docs/html/gettingstarted.html Mark On 6 Jan 2014, at 15:57, brachi wrote: > also me. > It happens only on the first executions. > > > > -- > View this message in context: http://drools.46999.n3.nabble.com/stuck-Unknown-accessor-type-org-mvel2-optimizers-impl-refl-collection-ArrayCreator-690c2a7a-tp4020969p4027535.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 Joseph.White at mitchell.com Mon Jan 6 11:12:39 2014 From: Joseph.White at mitchell.com (Joseph White) Date: Mon, 6 Jan 2014 16:12:39 +0000 Subject: [rules-users] stuck! Unknown accessor type: org.mvel2.optimizers.impl.refl.collection.ArrayCreator@690c2a7a In-Reply-To: <83C4A2C0-10C2-4D0F-B827-4A7B6FB43A96@codehaus.org> References: <1353967076623-4020969.post@n3.nabble.com> <1354202737050-4021015.post@n3.nabble.com> <1389023861262-4027535.post@n3.nabble.com> <83C4A2C0-10C2-4D0F-B827-4A7B6FB43A96@codehaus.org> Message-ID: 6.0.0.Final I'll give 6.0.1 a try.. thank you. If that does not work, I'll give 5.x a shot. -----Original Message----- From: rules-users-bounces at lists.jboss.org [mailto:rules-users-bounces at lists.jboss.org] On Behalf Of Mark Proctor Sent: Monday, January 06, 2014 8:03 AM To: Rules Users List Subject: Re: [rules-users] stuck! Unknown accessor type: org.mvel2.optimizers.impl.refl.collection.ArrayCreator at 690c2a7a which version of Drools? If it's 5.x, then please try with 5.6.CR1. If it's 6.x, pleas try the 6.0.1. We may also need some self contained unit test: http://docs.jboss.org/drools/release/5.5.0.Final/droolsjbpm-introduction-docs/html/gettingstarted.html Mark On 6 Jan 2014, at 15:57, brachi wrote: > also me. > It happens only on the first executions. > > > > -- > View this message in context: > http://drools.46999.n3.nabble.com/stuck-Unknown-accessor-type-org-mvel > 2-optimizers-impl-refl-collection-ArrayCreator-690c2a7a-tp4020969p4027 > 535.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 brachi.w at sapiens.com Mon Jan 6 11:14:16 2014 From: brachi.w at sapiens.com (brachi) Date: Mon, 6 Jan 2014 08:14:16 -0800 (PST) Subject: [rules-users] permgen leak In-Reply-To: <23E0006C-4B62-4000-BA2B-05E6314F9026@codehaus.org> References: <1386258456435-4027111.post@n3.nabble.com> <1386259095814-4027115.post@n3.nabble.com> <52AD529D.8040504@gmail.com> <1387189626968-4027321.post@n3.nabble.com> <52AF5639.5060507@gmail.com> <1389015365148-4027530.post@n3.nabble.com> <1389018700389-4027534.post@n3.nabble.com> <23E0006C-4B62-4000-BA2B-05E6314F9026@codehaus.org> Message-ID: <1389024856614-4027539.post@n3.nabble.com> see previous messages, pmander attached a unit test -- View this message in context: http://drools.46999.n3.nabble.com/permgen-leak-tp4027038p4027539.html Sent from the Drools: User forum mailing list archive at Nabble.com. From joseph.white at mitchell.com Mon Jan 6 12:56:44 2014 From: joseph.white at mitchell.com (sdjoe) Date: Mon, 6 Jan 2014 09:56:44 -0800 (PST) Subject: [rules-users] Unable to get LastModified for ClasspathResource In-Reply-To: <1386330114902-4027127.post@n3.nabble.com> References: <1374134659616-4025031.post@n3.nabble.com> <1383760104323-4026668.post@n3.nabble.com> <1386330114902-4027127.post@n3.nabble.com> Message-ID: <1389031004185-4027540.post@n3.nabble.com> I was facing the same issue and found that my rules file was not making it into my JAR file. Because I am using Maven, I was able to include: src/main/resources/rules in my pom.xml file. This allowed my rules files to be included inside of my jar and everything worked fine afterwards. -- View this message in context: http://drools.46999.n3.nabble.com/Unable-to-get-LastModified-for-ClasspathResource-tp4025031p4027540.html Sent from the Drools: User forum mailing list archive at Nabble.com. From mproctor at codehaus.org Mon Jan 6 13:56:55 2014 From: mproctor at codehaus.org (Mark Proctor) Date: Mon, 6 Jan 2014 18:56:55 +0000 Subject: [rules-users] permgen leak In-Reply-To: <1389024856614-4027539.post@n3.nabble.com> References: <1386258456435-4027111.post@n3.nabble.com> <1386259095814-4027115.post@n3.nabble.com> <52AD529D.8040504@gmail.com> <1387189626968-4027321.post@n3.nabble.com> <52AF5639.5060507@gmail.com> <1389015365148-4027530.post@n3.nabble.com> <1389018700389-4027534.post@n3.nabble.com> <23E0006C-4B62-4000-BA2B-05E6314F9026@codehaus.org> <1389024856614-4027539.post@n3.nabble.com> Message-ID: <7E35D477-589F-49E3-B00A-E2D41D070200@codehaus.org> I?ve been told 5.6 will be released this week. This is because the JCR2GIT migration tool, in 5.6 is needed for our 6.0 product. Davide's current kbase.dispose() method, on the concrete class, should just be considered a work around for the problem. Unless this is fixed by someone in the community, I don?t think any core developers will have time to address this. At least not for 5.x; we?ll continue to look into it for 6.x. Mark On 6 Jan 2014, at 16:14, brachi wrote: > see previous messages, pmander attached a unit test > > > > -- > View this message in context: http://drools.46999.n3.nabble.com/permgen-leak-tp4027038p4027539.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 saumitra.srivastav7 at gmail.com Mon Jan 6 14:12:45 2014 From: saumitra.srivastav7 at gmail.com (Saumitra S) Date: Tue, 7 Jan 2014 00:42:45 +0530 Subject: [rules-users] Using drools with cassandra Message-ID: Hi guys, I am trying to figure out a way to use drools with Cassandra. I am new to drools. I will appreciate any links to get started with my research. -Saumitra -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.jboss.org/pipermail/rules-users/attachments/20140107/ca999db0/attachment.html From dsotty at gmail.com Mon Jan 6 14:17:20 2014 From: dsotty at gmail.com (Davide Sottara) Date: Mon, 06 Jan 2014 20:17:20 +0100 Subject: [rules-users] permgen leak In-Reply-To: <7E35D477-589F-49E3-B00A-E2D41D070200@codehaus.org> References: <1386258456435-4027111.post@n3.nabble.com> <1386259095814-4027115.post@n3.nabble.com> <52AD529D.8040504@gmail.com> <1387189626968-4027321.post@n3.nabble.com> <52AF5639.5060507@gmail.com> <1389015365148-4027530.post@n3.nabble.com> <1389018700389-4027534.post@n3.nabble.com> <23E0006C-4B62-4000-BA2B-05E6314F9026@codehaus.org> <1389024856614-4027539.post@n3.nabble.com> <7E35D477-589F-49E3-B00A-E2D41D070200@codehaus.org> Message-ID: <52CB0140.4090502@gmail.com> I have run pmander's tests, and reported in a previous email. The leak in 5.x is due to the nature of the composite classloader, and dispose() forces the memory to be released. I don't remember if that fix was in 5.6.CR1 (probably not), so you may have to try 5.6.0-SNAPSHOT or wait for the end of the week. 6.x does not suffer from the same problem, but has a different issue - no way to unload kie modules once they are cached - which Mario has been working on. In either case, pmander's test works fine in both 5.6.x and 6.x after these fixes Davide On 01/06/2014 07:56 PM, Mark Proctor wrote: > I?ve been told 5.6 will be released this week. This is because the JCR2GIT migration tool, in 5.6 is needed for our 6.0 product. > > Davide's current kbase.dispose() method, on the concrete class, should just be considered a work around for the problem. Unless this is fixed by someone in the community, I don?t think any core developers will have time to address this. At least not for 5.x; we?ll continue to look into it for 6.x. > > Mark > > > On 6 Jan 2014, at 16:14, brachi wrote: > >> see previous messages, pmander attached a unit test >> >> >> >> -- >> View this message in context: http://drools.46999.n3.nabble.com/permgen-leak-tp4027038p4027539.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 saumitra.srivastav7 at gmail.com Mon Jan 6 14:18:00 2014 From: saumitra.srivastav7 at gmail.com (Saumitra) Date: Mon, 6 Jan 2014 11:18:00 -0800 (PST) Subject: [rules-users] Using drools with cassandra Message-ID: <1389035880917-4027543.post@n3.nabble.com> Hi, I am trying to figure out a way to use drools with Cassandra. I am new to drools. I will appreciate any links to get started with my research. -Saumitra -- View this message in context: http://drools.46999.n3.nabble.com/Using-drools-with-cassandra-tp4027543.html Sent from the Drools: User forum mailing list archive at Nabble.com. From mproctor at codehaus.org Mon Jan 6 15:50:24 2014 From: mproctor at codehaus.org (Mark Proctor) Date: Mon, 6 Jan 2014 20:50:24 +0000 Subject: [rules-users] permgen leak In-Reply-To: <52CB0140.4090502@gmail.com> References: <1386258456435-4027111.post@n3.nabble.com> <1386259095814-4027115.post@n3.nabble.com> <52AD529D.8040504@gmail.com> <1387189626968-4027321.post@n3.nabble.com> <52AF5639.5060507@gmail.com> <1389015365148-4027530.post@n3.nabble.com> <1389018700389-4027534.post@n3.nabble.com> <23E0006C-4B62-4000-BA2B-05E6314F9026@codehaus.org> <1389024856614-4027539.post@n3.nabble.com> <7E35D477-589F-49E3-B00A-E2D41D070200@codehaus.org> <52CB0140.4090502@gmail.com> Message-ID: <63508E3F-3F1A-42E8-A893-6F2996A275BC@codehaus.org> The 5.6 approach should be considered a work around, not a fix. Somewhere a ref is being held, that shouldn?t be - we just haven?t found it yet. Mark On 6 Jan 2014, at 19:17, Davide Sottara wrote: > I have run pmander's tests, and reported in a previous email. > The leak in 5.x is due to the nature of the composite classloader, and > dispose() > forces the memory to be released. I don't remember if that fix was in > 5.6.CR1 > (probably not), so you may have to try 5.6.0-SNAPSHOT or wait for the > end of the week. > 6.x does not suffer from the same problem, but has a different issue - > no way > to unload kie modules once they are cached - which Mario has been > working on. > In either case, pmander's test works fine in both 5.6.x and 6.x after > these fixes > Davide > > On 01/06/2014 07:56 PM, Mark Proctor wrote: >> I?ve been told 5.6 will be released this week. This is because the JCR2GIT migration tool, in 5.6 is needed for our 6.0 product. >> >> Davide's current kbase.dispose() method, on the concrete class, should just be considered a work around for the problem. Unless this is fixed by someone in the community, I don?t think any core developers will have time to address this. At least not for 5.x; we?ll continue to look into it for 6.x. >> >> Mark >> >> >> On 6 Jan 2014, at 16:14, brachi wrote: >> >>> see previous messages, pmander attached a unit test >>> >>> >>> >>> -- >>> View this message in context: http://drools.46999.n3.nabble.com/permgen-leak-tp4027038p4027539.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 dunnlow at yahoo.com Mon Jan 6 19:05:51 2014 From: dunnlow at yahoo.com (dunnlow) Date: Mon, 6 Jan 2014 16:05:51 -0800 (PST) Subject: [rules-users] Best pattern for getting results OUT of Integration server? Message-ID: <1389053151667-4027546.post@n3.nabble.com> I have some confusion about running rules in the Integration Server (v5.5). I am sending POJOs to the server from a camel (v2.10) Spring client app. The client inserts a POJO (via batchexecutioncommand) and the rules change an attribute on the POJO to return the value to the client. I know, I know, changing attributes of facts is frowned upon (but when I started I didn't know any better... I swear). The problem I'm having (surprise) is that updating the fact (to return to the client app) is causing unwanted activations, no-loops, lock-on-actives etc etc. So, I'm looking into changing this and inserting two string objects into my command so that the rules only modify those string objects. My questions: 1) Is that the best (/a good) way to implement this? 2) My big question/misunderstanding: Does the integration server handle the batchexecutioncommands in series or is it inserting into the working memory in parallel (ie. are all executions from the first insert completed before the next batchexecutioninsert command is evaluated)? For example, If I have a loop that inserts one POJO (Fact.class) and two POJOs (S.class, a simple class with one string class variable) can I safely do something like below (is the engine able to keep Fact1 with its inserted S1 and S2 objects separate from the next S objects that might be inserted immediately after OR might all Facts and S objects get confused (due to multi-threading, parallel operation, etc): rule "evaluate a Fact POJO" when $fact1 : Fact (value > 100, card=="NONE") $s1 : S () $s2 : S (this != $s1) then $s1 = "OK" $s2 = "BLUECARD" end rule "remove inserted objects so memory doesn't fill up" salience -1000 when $completedFact : Fact () then retract ($completedFact) end rule "remove inserted objects so memory doesn't fill up" salience -1000 when $completedS : S () then retract($completedS) end My client will use the resulting s1 and s2 values so I obviously don't want the returned s1 and s2 values for fact1 to be confused with the s1 and s2 values for fact2. 3) Currently, I need to retract the pojos I insert once the processing is done(like above) -- kinda ugly. Is there a way to implement a "logical" insert for the integration server or a better way to handle this? Thanks for any thoughts! -J -- View this message in context: http://drools.46999.n3.nabble.com/Best-pattern-for-getting-results-OUT-of-Integration-server-tp4027546.html Sent from the Drools: User forum mailing list archive at Nabble.com. From ray.hooker at me.com Tue Jan 7 00:02:03 2014 From: ray.hooker at me.com (Ray Hooker) Date: Tue, 07 Jan 2014 00:02:03 -0500 Subject: [rules-users] Kie and Guvnor 6.0 In-Reply-To: References: Message-ID: <5C03BAFE-0504-42CA-B31D-3BF5EA6DA4CE@me.com> I have installed and worked with the new Guvnor interface. I am not sure how to interface with it. This may be a basic question, but I have not seen documentation of how Guvnor works exactly in version 6.0. I see that it uses a git repository and maven server, but I do not see where it actually resides or how I can access it? I need info like port, protocol, file location or something specific. I have tried to example the installation but am not sure the details. Certainly there is not a configuration panel that might indicate configured port for the maven repository, etc. A network diagram would be helpful. It is possible that I need to access the git repository or the Maven repository using Kie specific classes and functionality but then I would assume I need to give it the url/ web address of the Guvnor and way to configure that. Ray -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.jboss.org/pipermail/rules-users/attachments/20140107/af1b4043/attachment.html From wolfgang.laun at gmail.com Tue Jan 7 02:13:56 2014 From: wolfgang.laun at gmail.com (Wolfgang Laun) Date: Tue, 7 Jan 2014 08:13:56 +0100 Subject: [rules-users] Best pattern for getting results OUT of Integration server? In-Reply-To: <1389053151667-4027546.post@n3.nabble.com> References: <1389053151667-4027546.post@n3.nabble.com> Message-ID: On 07/01/2014, dunnlow wrote: > I have some confusion about running rules in the Integration Server (v5.5). > > I am sending POJOs to the server from a camel (v2.10) Spring client app. > The client inserts a POJO (via batchexecutioncommand) and the rules change > an attribute on the POJO to return the value to the client. > > I know, I know, changing attributes of facts is frowned upon (but when I > started I didn't know any better... I swear). Where did you get this notion, "changing...frowned upon"? It's a natural enough operation, and the Command lets you request that the fact object is returned to sender. > > The problem I'm having (surprise) is that updating the fact (to return to > the client app) is causing unwanted activations, no-loops, lock-on-actives > etc etc. Consider calling setX() without modify/update. The returned object should show the new values, but the Engine will be "blind" to the updates (which, apparently, is just what you want). > So, I'm looking into changing this and inserting two string > objects into my command so that the rules only modify those string objects. > > My questions: > 1) Is that the best (/a good) way to implement this? No, see below. > > 2) My big question/misunderstanding: Does the integration server handle > the > batchexecutioncommands in series or is it inserting into the working memory > in parallel (ie. are all executions from the first insert completed before > the next batchexecutioninsert command is evaluated)? A batch executions command is executed in a sequential way. > > For example, > > If I have a loop that inserts one POJO (Fact.class) and two POJOs (S.class, > a simple class with one string class variable) can I safely do something > like below (is the engine able to keep Fact1 with its inserted S1 and S2 > objects separate from the next S objects that might be inserted immediately > after OR might all Facts and S objects get confused (due to > multi-threading, > parallel operation, etc): > > rule "evaluate a Fact POJO" > when > $fact1 : Fact (value > 100, card=="NONE") > $s1 : S () > $s2 : S (this != $s1) > then > $s1 = "OK" > $s2 = "BLUECARD" This will most certainly NOT do what I think that you think it does, and it will even do twice, what it does, which doesn't make it any better. > end > > rule "remove inserted objects so memory doesn't fill up" > salience -1000 > when > $completedFact : Fact () > then > retract ($completedFact) > end > > rule "remove inserted objects so memory doesn't fill up" > salience -1000 > when > $completedS : S () > then > retract($completedS) > end > > My client will use the resulting s1 and s2 values so I obviously don't want > the returned s1 and s2 values for fact1 to be confused with the s1 and s2 > values for fact2. > > 3) Currently, I need to retract the pojos I insert once the processing is > done(like above) -- kinda ugly. That's the way it is - provided the session remains active and continues. Another technique that's recommended for returning results is by means of a global. (I think this is discussed in the Expert manual.) -W > Is there a way to implement a "logical" > insert for the integration server or a better way to handle this? > > Thanks for any thoughts! > -J > > > > -- > View this message in context: > http://drools.46999.n3.nabble.com/Best-pattern-for-getting-results-OUT-of-Integration-server-tp4027546.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 igrachev at abv.bg Tue Jan 7 03:26:09 2014 From: igrachev at abv.bg (milen igrachev) Date: Tue, 7 Jan 2014 10:26:09 +0200 (EET) Subject: [rules-users] Is rule introspection available from the Drools API? Message-ID: <2034803286.72108.1389083169842.JavaMail.apache@nm1.abv.bg> Hello thanks for the quick and precise answer! I believe that the time difference will be a bit of a problem for the IRC chat , but i will be online (channel: #drools user: igrachev) today and will try to check it often. However big thanks for the support and the willingness to help! You are saying that the code is there, but is not public and documented. Well being not public seems to be a problem, but do you think it is possible to give me an example with the official Drools "first rule" - Sample.drl. The one that comes with the first Drools project. So do you believe it will be possible to paste me some code on how to retrieve the information that this ruleset is using one fact of type Message and two of it's attributes - status and message. So just some code in a public static void main (String [] args) will be great :), or any kind of explanation :). Once again thank you. Have a nice day, Milen ----Original Letter---- From: Mark Proctor mproctor at codehaus.org About: Re: [rules-users] Is rule introspection available from the Drools API? To: Rules Users List Sent at: Monday, 2014, January 6 16:05:33 EET The code is there, but it?s not public and not documented, and the code can be a little hard to understand - as it?s grown organically over the years. You?ll need to cast and unwrap and look at member vars. Start on the Rule and the lhs variable. You can always pop onto irc, with live questions,and we?ll try and respond quickly. http://www.jboss.org/drools/irc Mark On 6 Jan 2014, at 09:51, milen igrachev igrachev at abv.bg > wrote: > Hello, > is there a way to introspect a Drools file from within java code? > What I need is to be able to identify the facts and the fact attributes that are used in a given DRL file. > > For example if I have a rule stored in a customer.drl DRL file within my project, containing the following definition: > package myRulePackage > > import org.rules.model.Customer > import org.rules.model.Mambership > > rule "is eligible customer" > when > $c:Customer(status == "active") > Membership(customer == $c, type == "premium") > then > $c.setEligibilityStatus(true); > end > > What i need is a way to understand that this ruleset customer.drl is using two fact types - Customer and Membership and three of their attributes - Customer.status, Membership.customer and Membership.type. > > > I found some information on the internet that such functionality is not supported, however the information was a bit too old, so I decided to ask again. > > > Big thanks for the support! > Milen > _______________________________________________ > 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/20140107/00ef9919/attachment.html From wolfgang.laun at gmail.com Tue Jan 7 03:56:15 2014 From: wolfgang.laun at gmail.com (Wolfgang Laun) Date: Tue, 7 Jan 2014 09:56:15 +0100 Subject: [rules-users] Is rule introspection available from the Drools API? In-Reply-To: <2034803286.72108.1389083169842.JavaMail.apache@nm1.abv.bg> References: <2034803286.72108.1389083169842.JavaMail.apache@nm1.abv.bg> Message-ID: Hi, while you continue this line of research you might consider possible ramifications and snags, and be prepared for them. The syntax for writing LHS conditions is quite complex - it's more complex than Java expressions, because the CE eval() alone will give you (almost) all of that. Rule authors may also use DRL functions, which could hide field access. If *you* author the rules, you may be able to avoid the worst, but it won't be a piece of cake. Cheers -W On 07/01/2014, milen igrachev wrote: > Hello thanks for the quick and precise answer! > I believe that the time difference will be a bit of a problem for the IRC > chat , but i will be online (channel: #drools user: igrachev) today and will > try to check it often. However big thanks for the support and the > willingness to help! > You are saying that the code is there, but is not public and documented. > Well being not public seems to be a problem, but do you think it is > possible to give me an example with the official Drools "first rule" - > Sample.drl. The one that comes with the first Drools project. So do you > believe it will be possible to paste me some code on how to retrieve the > information that this ruleset is using one fact of type Message and two of > it's attributes - status and message. So just some code in a public > static void main (String [] args) will be great :), or any kind of > explanation :). > Once again thank you. > Have a nice day, > Milen > > > > ----Original Letter---- > From: Mark Proctor mproctor at codehaus.org > > About: Re: [rules-users] Is rule introspection available from the Drools > API? > > To: Rules Users List > > Sent at: Monday, 2014, January 6 16:05:33 EET > > > The code is there, but it?s not public and not documented, and the code can > be a little hard to understand - as it?s grown organically over the years. > > > > You?ll need to cast and unwrap and look at member vars. Start on the Rule > and the lhs variable. You can always pop onto irc, with live questions,and > we?ll try and respond quickly. > > http://www.jboss.org/drools/irc > > > > Mark > > > > On 6 Jan 2014, at 09:51, milen igrachev igrachev at abv.bg > wrote: > > > >> Hello, > >> is there a way to introspect a Drools file from within java code? > >> What I need is to be able to identify the facts and the fact attributes >> that are used in a given DRL file. > >> > >> For example if I have a rule stored in a customer.drl DRL file within my >> project, containing the following definition: > >> package myRulePackage > >> > >> import org.rules.model.Customer > >> import org.rules.model.Mambership > >> > >> rule "is eligible customer" > >> when > >> $c:Customer(status == "active") > >> Membership(customer == $c, type == "premium") > >> then > >> $c.setEligibilityStatus(true); > >> end > >> > >> What i need is a way to understand that this ruleset customer.drl is using >> two fact types - Customer and Membership and three of their attributes - >> Customer.status, Membership.customer and Membership.type. > >> > >> > >> I found some information on the internet that such functionality is not >> supported, however the information was a bit too old, so I decided to ask >> again. > >> > >> > >> Big thanks for the support! > >> Milen > >> _______________________________________________ > >> 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 plz.write.to at gmail.com Tue Jan 7 04:44:29 2014 From: plz.write.to at gmail.com (Sonata) Date: Tue, 7 Jan 2014 01:44:29 -0800 (PST) Subject: [rules-users] forall is satisfied when there is nothing? Message-ID: <1389087869736-4027553.post@n3.nabble.com> Hi, I am using the "forall" keyword on the LHS and it seems the condition is satisfied when there is nothing to match. e.g. "forall (MyClass(value == "test"))" fires the rule when there is no MyClass() object in the working memory. My workaround is add "exists (MyClass())". Also, same for "not (exists (MyClass(value != "test")))", but I can understand this, as there is no MyClass() object, it doesn't exists and hence "not" gives true. But for "forall", it doesnt sound right to me. I wonder if "forall" is actually implemented as "not exists" in the engine. Please clarify if this is by design or a bug. Build is 5.5.0.Final Thank you -- View this message in context: http://drools.46999.n3.nabble.com/forall-is-satisfied-when-there-is-nothing-tp4027553.html Sent from the Drools: User forum mailing list archive at Nabble.com. From stephen.masters at me.com Tue Jan 7 05:08:39 2014 From: stephen.masters at me.com (Stephen Masters) Date: Tue, 07 Jan 2014 10:08:39 +0000 Subject: [rules-users] Is rule introspection available from the Drools API? In-Reply-To: References: <2034803286.72108.1389083169842.JavaMail.apache@nm1.abv.bg> Message-ID: It may also be worth explaining exactly what you aim to achieve through this and why. From what I have seen, most people who ask about introspecting the LHS of rules via the API, don?t actually need to do that. Steve On 7 Jan 2014, at 08:56, Wolfgang Laun wrote: > Hi, > > while you continue this line of research you might consider possible > ramifications and snags, and be prepared for them. > > The syntax for writing LHS conditions is quite complex - it's more > complex than Java expressions, because the CE eval() alone will give > you (almost) all of that. Rule authors may also use DRL functions, > which could hide field access. > > If *you* author the rules, you may be able to avoid the worst, but it > won't be a piece of cake. > > Cheers > -W > > > > On 07/01/2014, milen igrachev wrote: >> Hello thanks for the quick and precise answer! >> I believe that the time difference will be a bit of a problem for the IRC >> chat , but i will be online (channel: #drools user: igrachev) today and will >> try to check it often. However big thanks for the support and the >> willingness to help! >> You are saying that the code is there, but is not public and documented. >> Well being not public seems to be a problem, but do you think it is >> possible to give me an example with the official Drools "first rule" - >> Sample.drl. The one that comes with the first Drools project. So do you >> believe it will be possible to paste me some code on how to retrieve the >> information that this ruleset is using one fact of type Message and two of >> it's attributes - status and message. So just some code in a public >> static void main (String [] args) will be great :), or any kind of >> explanation :). >> Once again thank you. >> Have a nice day, >> Milen >> >> >> >> ----Original Letter---- >> From: Mark Proctor mproctor at codehaus.org >> >> About: Re: [rules-users] Is rule introspection available from the Drools >> API? >> >> To: Rules Users List >> >> Sent at: Monday, 2014, January 6 16:05:33 EET >> >> >> The code is there, but it?s not public and not documented, and the code can >> be a little hard to understand - as it?s grown organically over the years. >> >> >> >> You?ll need to cast and unwrap and look at member vars. Start on the Rule >> and the lhs variable. You can always pop onto irc, with live questions,and >> we?ll try and respond quickly. >> >> http://www.jboss.org/drools/irc >> >> >> >> Mark >> >> >> >> On 6 Jan 2014, at 09:51, milen igrachev igrachev at abv.bg > wrote: >> >> >> >>> Hello, >> >>> is there a way to introspect a Drools file from within java code? >> >>> What I need is to be able to identify the facts and the fact attributes >>> that are used in a given DRL file. >> >>> >> >>> For example if I have a rule stored in a customer.drl DRL file within my >>> project, containing the following definition: >> >>> package myRulePackage >> >>> >> >>> import org.rules.model.Customer >> >>> import org.rules.model.Mambership >> >>> >> >>> rule "is eligible customer" >> >>> when >> >>> $c:Customer(status == "active") >> >>> Membership(customer == $c, type == "premium") >> >>> then >> >>> $c.setEligibilityStatus(true); >> >>> end >> >>> >> >>> What i need is a way to understand that this ruleset customer.drl is using >>> two fact types - Customer and Membership and three of their attributes - >>> Customer.status, Membership.customer and Membership.type. >> >>> >> >>> >> >>> I found some information on the internet that such functionality is not >>> supported, however the information was a bit too old, so I decided to ask >>> again. >> >>> >> >>> >> >>> Big thanks for the support! >> >>> Milen >> >>> _______________________________________________ >> >>> 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/20140107/56ca024d/attachment.html From wolfgang.laun at gmail.com Tue Jan 7 05:11:12 2014 From: wolfgang.laun at gmail.com (Wolfgang Laun) Date: Tue, 7 Jan 2014 11:11:12 +0100 Subject: [rules-users] forall is satisfied when there is nothing? In-Reply-To: <1389087869736-4027553.post@n3.nabble.com> References: <1389087869736-4027553.post@n3.nabble.com> Message-ID: It is true that first-order logic usually assumes that the domain of a formula be a nonempty set. As so often, things aren't quite so simple when formulae are evaluated on a computer. What should be done in this case, forall with an empty domain? Throw an exception? Not very convenient, since there's no reasonable way of handling exceptions thrown on the LHS. Return false? That doesn't make sense, because you can't inspect what isn't there. Return true? If it isn't false - what else? If first-order logic does permit empty domains, it must be treated as a special case. -W On 07/01/2014, Sonata wrote: > Hi, I am using the "forall" keyword on the LHS and it seems the condition > is > satisfied when there is nothing to match. e.g. "forall (MyClass(value == > "test"))" fires the rule when there is no MyClass() object in the working > memory. My workaround is add "exists (MyClass())". > > Also, same for "not (exists (MyClass(value != "test")))", but I can > understand this, as there is no MyClass() object, it doesn't exists and > hence "not" gives true. > > But for "forall", it doesnt sound right to me. I wonder if "forall" is > actually implemented as "not exists" in the engine. > > Please clarify if this is by design or a bug. Build is 5.5.0.Final > > Thank you > > > > -- > View this message in context: > http://drools.46999.n3.nabble.com/forall-is-satisfied-when-there-is-nothing-tp4027553.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 Tue Jan 7 05:35:58 2014 From: dsotty at gmail.com (Davide Sottara) Date: Tue, 07 Jan 2014 11:35:58 +0100 Subject: [rules-users] forall is satisfied when there is nothing? In-Reply-To: References: <1389087869736-4027553.post@n3.nabble.com> Message-ID: <52CBD88E.5070703@gmail.com> First order logic does permit empty domains, and the universal quantifier evaluates to true in that case. Davide On 01/07/2014 11:11 AM, Wolfgang Laun wrote: > It is true that first-order logic usually assumes that the domain of a formula > be a nonempty set. As so often, things aren't quite so simple when formulae > are evaluated on a computer. What should be done in this case, forall > with an empty domain? Throw an exception? Not very convenient, since > there's no reasonable way of handling exceptions thrown on the LHS. > Return false? That doesn't make sense, because you can't inspect what > isn't there. Return true? If it isn't false - what else? > > If first-order logic does permit empty domains, it must be treated as > a special case. > > -W > > On 07/01/2014, Sonata wrote: >> Hi, I am using the "forall" keyword on the LHS and it seems the condition >> is >> satisfied when there is nothing to match. e.g. "forall (MyClass(value == >> "test"))" fires the rule when there is no MyClass() object in the working >> memory. My workaround is add "exists (MyClass())". >> >> Also, same for "not (exists (MyClass(value != "test")))", but I can >> understand this, as there is no MyClass() object, it doesn't exists and >> hence "not" gives true. >> >> But for "forall", it doesnt sound right to me. I wonder if "forall" is >> actually implemented as "not exists" in the engine. >> >> Please clarify if this is by design or a bug. Build is 5.5.0.Final >> >> Thank you >> >> >> >> -- >> View this message in context: >> http://drools.46999.n3.nabble.com/forall-is-satisfied-when-there-is-nothing-tp4027553.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 porcelli at redhat.com Tue Jan 7 05:42:51 2014 From: porcelli at redhat.com (Alexandre Porcelli) Date: Tue, 7 Jan 2014 08:42:51 -0200 Subject: [rules-users] Kie and Guvnor 6.0 In-Reply-To: <5C03BAFE-0504-42CA-B31D-3BF5EA6DA4CE@me.com> References: <5C03BAFE-0504-42CA-B31D-3BF5EA6DA4CE@me.com> Message-ID: Hi, Here are the docs available for new Workbench: http://docs.jboss.org/drools/release/6.0.1.Final/drools-docs/html/wb.Workbench.html Regards, --- Alexandre Porcelli Principal Software Engineer Red Hat Business Systems and Intelligence Group On Jan 7, 2014, at 3:02 AM, Ray Hooker wrote: > I have installed and worked with the new Guvnor interface. I am not sure how to interface with it. > > This may be a basic question, but I have not seen documentation of how Guvnor works exactly in version 6.0. I see that it uses a git repository and maven server, but I do not see where it actually resides or how I can access it? I need info like port, protocol, file location or something specific. I have tried to example the installation but am not sure the details. Certainly there is not a configuration panel that might indicate configured port for the maven repository, etc. A network diagram would be helpful. > > It is possible that I need to access the git repository or the Maven repository using Kie specific classes and functionality but then I would assume I need to give it the url/ web address of the Guvnor and way to configure that. > > > Ray > _______________________________________________ > 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 Jan 7 05:53:31 2014 From: wolfgang.laun at gmail.com (Wolfgang Laun) Date: Tue, 7 Jan 2014 11:53:31 +0100 Subject: [rules-users] forall is satisfied when there is nothing? In-Reply-To: <52CBD88E.5070703@gmail.com> References: <1389087869736-4027553.post@n3.nabble.com> <52CBD88E.5070703@gmail.com> Message-ID: Please comment on http://en.wikipedia.org/wiki/First-order_logic#Empty_domains -W On 07/01/2014, Davide Sottara wrote: > First order logic does permit empty domains, and the universal > quantifier evaluates to true in that case. > Davide > > On 01/07/2014 11:11 AM, Wolfgang Laun wrote: >> It is true that first-order logic usually assumes that the domain of a >> formula >> be a nonempty set. As so often, things aren't quite so simple when >> formulae >> are evaluated on a computer. What should be done in this case, forall >> with an empty domain? Throw an exception? Not very convenient, since >> there's no reasonable way of handling exceptions thrown on the LHS. >> Return false? That doesn't make sense, because you can't inspect what >> isn't there. Return true? If it isn't false - what else? >> >> If first-order logic does permit empty domains, it must be treated as >> a special case. >> >> -W >> >> On 07/01/2014, Sonata wrote: >>> Hi, I am using the "forall" keyword on the LHS and it seems the >>> condition >>> is >>> satisfied when there is nothing to match. e.g. "forall (MyClass(value == >>> "test"))" fires the rule when there is no MyClass() object in the >>> working >>> memory. My workaround is add "exists (MyClass())". >>> >>> Also, same for "not (exists (MyClass(value != "test")))", but I can >>> understand this, as there is no MyClass() object, it doesn't exists and >>> hence "not" gives true. >>> >>> But for "forall", it doesnt sound right to me. I wonder if "forall" is >>> actually implemented as "not exists" in the engine. >>> >>> Please clarify if this is by design or a bug. Build is 5.5.0.Final >>> >>> Thank you >>> >>> >>> >>> -- >>> View this message in context: >>> http://drools.46999.n3.nabble.com/forall-is-satisfied-when-there-is-nothing-tp4027553.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 igrachev at abv.bg Tue Jan 7 07:04:43 2014 From: igrachev at abv.bg (milen igrachev) Date: Tue, 7 Jan 2014 14:04:43 +0200 (EET) Subject: [rules-users] Is rule introspection available from the Drools API? Message-ID: <174020978.90940.1389096283171.JavaMail.apache@nm1.abv.bg> Hello, initially i didn't give more details to keep my question short and save time to the ppl that read it. I actually believed that such functionality might be covered and available and details would have just prolong my question. Here is some additional information on why I am looking for such functionality. In my project I want to use Drools as external rule engine. My project is not written in Java and the effort to transfer it is inconsiderable. What I want to start using Drools for is a simple blackbox of getting answers from a Stateless Drools Session, most likely without any need of reinference. Simply ask and get answered. During the runtime of my project there is a vast amount of information that can be considered as a fact . However in most of the cases what I need is to invoke a simple ruleset that actually need like 1% of the facts that I currently know at any particular moment. So what I want to do is ask Drools "Hey I want to invoke ruleset, can you please tell me what are the facts that it is using so I can pass all of them, that I currently have?". Then after receiving the answer I will filter the 1% from the big picture and will finally ask Drools to answer my question. What I want to avoid is passing hundreds of instance/facts with hundreds of fields that are actually never user. Of course I realise that the rule introspection that I am asking for is not my only option, I can create the .drl metadata during the ruleset definition. Some more ideas poped into my head, so far, but the best solution for me seems to be if we can just call Drools about that information and it return it as a straight answer. That is why I am trying to identify if it is possible to recive the rule metadata from Drools. At first I thought it could be available in a snap of a finger with some method calls, however now I am interested to see what is the effort to make it happen. Hope it helps. Thanks for the support. Best Regards, Milen -------- Original Letter -------- From: Stephen Masters stephen.masters at me.com About: Re: [rules-users] Is rule introspection available from the Drools API? To: Drools List Sent at: Tuesday, 2014, January 7 12:08:39 EET It may also be worth explaining exactly what you aim to achieve through this and why. From what I have seen, most people who ask about introspecting the LHS of rules via the API, don?t actually need to do that. Steve On 7 Jan 2014, at 08:56, Wolfgang Laun < wolfgang.laun at gmail.com > wrote: Hi, while you continue this line of research you might consider possible ramifications and snags, and be prepared for them. The syntax for writing LHS conditions is quite complex - it's more complex than Java expressions, because the CE eval() alone will give you (almost) all of that. Rule authors may also use DRL functions, which could hide field access. If *you* author the rules, you may be able to avoid the worst, but it won't be a piece of cake. Cheers -W On 07/01/2014, milen igrachev < igrachev at abv.bg > wrote: Hello thanks for the quick and precise answer! I believe that the time difference will be a bit of a problem for the IRC chat , but i will be online (channel: #drools user: igrachev) today and will try to check it often. However big thanks for the support and the willingness to help! You are saying that the code is there, but is not public and documented. Well being not public seems to be a problem, but do you think it is possible to give me an example with the official Drools "first rule" - Sample.drl. The one that comes with the first Drools project. So do you believe it will be possible to paste me some code on how to retrieve the information that this ruleset is using one fact of type Message and two of it's attributes - status and message. So just some code in a public static void main (String [] args) will be great :), or any kind of explanation :). Once again thank you. Have a nice day, Milen ----Original Letter---- From: Mark Proctor mproctor at codehaus.org About: Re: [rules-users] Is rule introspection available from the Drools API? To: Rules Users List Sent at: Monday, 2014, January 6 16:05:33 EET The code is there, but it?s not public and not documented, and the code can be a little hard to understand - as it?s grown organically over the years. You?ll need to cast and unwrap and look at member vars. Start on the Rule and the lhs variable. You can always pop onto irc, with live questions,and we?ll try and respond quickly. http://www.jboss.org/drools/irc Mark On 6 Jan 2014, at 09:51, milen igrachev igrachev at abv.bg > wrote: Hello, is there a way to introspect a Drools file from within java code? What I need is to be able to identify the facts and the fact attributes that are used in a given DRL file. For example if I have a rule stored in a customer.drl DRL file within my project, containing the following definition: package myRulePackage import org.rules.model.Customer import org.rules.model.Mambership rule "is eligible customer" when $c:Customer(status == "active") Membership(customer == $c, type == "premium") then $c.setEligibilityStatus(true); end What i need is a way to understand that this ruleset customer.drl is using two fact types - Customer and Membership and three of their attributes - Customer.status, Membership.customer and Membership.type. I found some information on the internet that such functionality is not supported, however the information was a bit too old, so I decided to ask again. Big thanks for the support! Milen _______________________________________________ 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/20140107/8081cb46/attachment-0001.html From brachi.w at sapiens.com Tue Jan 7 07:21:46 2014 From: brachi.w at sapiens.com (brachi) Date: Tue, 7 Jan 2014 04:21:46 -0800 (PST) Subject: [rules-users] stuck! Unknown accessor type: org.mvel2.optimizers.impl.refl.collection.ArrayCreator@690c2a7a In-Reply-To: References: <1353967076623-4020969.post@n3.nabble.com> <1354202737050-4021015.post@n3.nabble.com> <1389023861262-4027535.post@n3.nabble.com> <83C4A2C0-10C2-4D0F-B827-4A7B6FB43A96@codehaus.org> Message-ID: <1389097306048-4027560.post@n3.nabble.com> I'm working with 5.5.0, got this exception while running. i'll try check 5.6 cr1 -- View this message in context: http://drools.46999.n3.nabble.com/stuck-Unknown-accessor-type-org-mvel2-optimizers-impl-refl-collection-ArrayCreator-690c2a7a-tp4020969p4027560.html Sent from the Drools: User forum mailing list archive at Nabble.com. From wolfgang.laun at gmail.com Tue Jan 7 08:04:21 2014 From: wolfgang.laun at gmail.com (Wolfgang Laun) Date: Tue, 7 Jan 2014 14:04:21 +0100 Subject: [rules-users] Is rule introspection available from the Drools API? In-Reply-To: <174020978.90940.1389096283171.JavaMail.apache@nm1.abv.bg> References: <174020978.90940.1389096283171.JavaMail.apache@nm1.abv.bg> Message-ID: As you describe it, the fields of the fact objects shouldn't matter. On 07/01/2014, milen igrachev wrote: > Hello, initially i didn't give more details to keep my question short and > save time to the ppl that read it. I actually believed that such > functionality might be covered and available and details would have just > prolong my question. > Here is some additional information on why I am looking for such > functionality. In my project I want to use Drools as external rule engine. > My project is not written in Java and the effort to transfer it is > inconsiderable. I guess you mean "considerable". > What I want to start using Drools for is a simple blackbox > of getting answers from a Stateless Drools Session, most likely without any > need of reinference. Simply ask and get answered. During the runtime of my > project there is a vast amount of information that can be considered as a > fact . However in most of the cases what I need is to invoke a simple > ruleset that actually need like 1% of the facts that I currently know at > any particular moment. So what I want to do is ask Drools "Hey I want to > invoke ruleset, can you please tell me what are the facts that it is > using so I can pass all of them, that I currently have?". Then after > receiving the answer I will filter the 1% from the big picture and will > finally ask Drools to answer my question. If these "rule sets" are unrelated with each other, you might put them into separater DRL files. Then the import list will tell you which facts this rule set needs, and so all you need is simple text processing... -W > What I want to avoid is passing hundreds of instance/facts with hundreds > of fields that are actually never user. Of course I realise that the rule > introspection that I am asking for is not my only option, I can create the > .drl metadata during the ruleset definition. Some more ideas poped into my > head, so far, but the best solution for me seems to be if we can just call > Drools about that information and it return it as a straight answer. > > That is why I am trying to identify if it is possible to recive the rule > metadata from Drools. At first I thought it could be available in a snap of > a finger with some method calls, however now I am interested to see what is > the effort to make it happen. > Hope it helps. Thanks for the support. > Best Regards, Milen > > > > > > > -------- Original Letter -------- > > From: Stephen Masters stephen.masters at me.com > > About: Re: [rules-users] Is rule introspection available from the > Drools API? > > To: Drools List > > Sent at: Tuesday, 2014, January 7 12:08:39 EET > > > > > > > It may also be worth explaining exactly what you aim to achieve through > this and why. From what I have seen, most people who ask about introspecting > the LHS of rules via the API, don?t actually need to do that. > > > > > > > Steve > > > > > > > > > > On 7 Jan 2014, at 08:56, Wolfgang Laun < > wolfgang.laun at gmail.com > wrote: > > > > > Hi, > > > > while you continue this line of research you might consider possible > > ramifications and snags, and be prepared for them. > > > > The syntax for writing LHS conditions is quite complex - it's more > > complex than Java expressions, because the CE eval() alone will give > > you (almost) all of that. Rule authors may also use DRL functions, > > which could hide field access. > > > > If *you* author the rules, you may be able to avoid the worst, but it > > won't be a piece of cake. > > > > Cheers > > -W > > > > > > > > On 07/01/2014, milen igrachev < > igrachev at abv.bg > wrote: > > > > Hello thanks for the quick and precise answer! > > > I believe that the time difference will be a bit of a problem for the IRC > > chat , but i will be online (channel: #drools user: igrachev) today and > will > > try to check it often. > However big thanks for the support and the > > willingness to help! > > > You are saying that the code is there, but is not public and documented. > > Well being not public seems to be a problem, but do you > think it is > > possible to give me an example with the official Drools "first rule" - > > Sample.drl. The one that comes with the first Drools project. > So do you > > believe it will be possible to paste me some code on how to retrieve the > > information that this ruleset is using one fact of type Message > and two of > > it's attributes - > status > and > message. > So just some code in a public > > static void main (String [] args) will be great :), or any kind of > > explanation :). > > > Once again thank you. > > > Have a nice day, > > Milen > > > > > > > > ----Original Letter---- > > From: Mark Proctor > mproctor at codehaus.org > > > > About: Re: [rules-users] Is rule introspection available from the Drools > > > API? > > > > To: Rules Users List > > > > Sent at: Monday, 2014, January 6 16:05:33 EET > > > > > > The code is there, but it?s not public and not documented, and the code can > > be a little hard to understand - as it?s grown organically over the years. > > > > > > > > You?ll need to cast and unwrap and look at member vars. Start on the Rule > > and the lhs variable. You can always pop onto irc, with live questions,and > > we?ll try and respond quickly. > > > > > http://www.jboss.org/drools/irc > > > > > > > > Mark > > > > > > > > On 6 Jan 2014, at 09:51, milen igrachev > > igrachev at abv.bg > > > wrote: > > > > > > > > > > Hello, > > > > > > > is there a way to introspect a Drools file from within java code? > > > > > > > What I need is to be able to identify the facts and the fact > attributes > > that are used in a given DRL file. > > > > > > > > > > > > > For example if I have a rule stored in a customer.drl DRL file within > my > > project, containing the following definition: > > > > > > > package myRulePackage > > > > > > > > > > > > > import org.rules.model.Customer > > > > > > > import org.rules.model.Mambership > > > > > > > > > > > > > rule "is eligible customer" > > > > > > > when > > > > > > > > $c:Customer(status == "active") > > > > > > > > Membership(customer == $c, type == "premium") > > > > > > > then > > > > > > > > $c.setEligibilityStatus(true); > > > > > > > end > > > > > > > > > > > > > What i need is a way to understand that this ruleset customer.drl is > using > > two fact types - Customer and Membership and three of their attributes - > > Customer.status, Membership.customer and Membership.type. > > > > > > > > > > > > > > > > > > > I found some information on the internet that such functionality is > not > > supported, however the information was a bit too old, so I decided to ask > > again. > > > > > > > > > > > > > > > > > > > Big thanks for the support! > > > > > > > Milen > > > > > > > _______________________________________________ > > > > > > > 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 michal.kasprzyk at nobleprog.pl Tue Jan 7 08:05:50 2014 From: michal.kasprzyk at nobleprog.pl (=?ISO-8859-2?Q?Micha=B3_Kasprzyk?=) Date: Tue, 7 Jan 2014 14:05:50 +0100 Subject: [rules-users] Business Rules webinar - includes Drools - only $99! Message-ID: # website Hello, I'd like to invite you to apply to a webinar dedicated to business rules (which includes Drools and also DMN) Business Rules Applied - From Theory to Business This is a series of webinars on Business Rules Approach and concrete implementations. The webinar is for managers and professionals who want to deepen their understanding of business rules and concrete implementation of BRMS. date: 22-23th January 2014 duration: 8 hours (4 sessions for 2 hours each) language: English You can view more info and sign up here . Happy Holidays! *Micha? Kasprzyk | Event Coordinator* *NobleProg* * Mob* *+48 790 300 458 <%2B48%20790%20300%20458>* * Email michal.kasprzyk at nobleprog.pl | Web www.nobleprog.pl * *Oferta specjalna: http://www.nobleprog.pl/course+discounts * -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.jboss.org/pipermail/rules-users/attachments/20140107/7fc1b6e0/attachment.html From abhinay_agarwal at infosys.com Tue Jan 7 08:30:50 2014 From: abhinay_agarwal at infosys.com (abhinay_agarwal) Date: Tue, 7 Jan 2014 05:30:50 -0800 (PST) Subject: [rules-users] Using Advanced Enumeration Concepts in guvnor Message-ID: <1389101450752-4027563.post@n3.nabble.com> The following sentences are taking directly from the user guide: / 'Person.age' : (new com.yourco.DataHelper()).getListOfAges() This assumes you have a class called "DataHelper" which has a method "getListOfAges()" which returns a List of strings (and is on the classpath). You can of course mix these "dynamic" enumerations with fixed lists. You could for example load from a database using JDBC. The data enumerations are loaded the first time you use the guided editor in a session./ Now, I would like to know how guvnor would connect to the database ? Inside the getListOfAges(), I want to hit the database and get the list of ages, put it inside a Map>. The example that is shown in the user guide is again hard coding the values. >From the user guide : /public class SampleDataSource2 { public Map, List loadData() { Map data = new HashMap(); List d = new ArrayList(); d.add("value1"); d.add("value2"); data.put("Fact.field", d); return data; } }/ AFAIK, the jar of this class SampleDataSource2 will be uploaded to guvnor, so should I keep the connection details to database inside the same class ? If yes, 1. How will guvnor be able to directly connect to the database ? 2. Should I add the jars for database connectivity as well ? 3. Is keeping the connection details inside the jar, not a security threat ? I am not sure if I understand completely how this enumeration works, please feel free to guide me, if I am wrong somewhere. Regards, Abhinay -- View this message in context: http://drools.46999.n3.nabble.com/Using-Advanced-Enumeration-Concepts-in-guvnor-tp4027563.html Sent from the Drools: User forum mailing list archive at Nabble.com. From stephen.masters at me.com Tue Jan 7 08:35:21 2014 From: stephen.masters at me.com (Stephen Masters) Date: Tue, 07 Jan 2014 13:35:21 +0000 Subject: [rules-users] Is rule introspection available from the Drools API? In-Reply-To: References: <174020978.90940.1389096283171.JavaMail.apache@nm1.abv.bg> Message-ID: <19442EEC-2EA8-48EF-9AAD-B01D8947BC7B@me.com> Also, is there a particular reason for using a stateless session? Depending on your application, using a stateful session could enable you to insert facts up front, meaning that you might not need to re-insert anything other than your ?question' facts. Steve On 7 Jan 2014, at 13:04, Wolfgang Laun wrote: > As you describe it, the fields of the fact objects shouldn't matter. > > On 07/01/2014, milen igrachev wrote: >> Hello, initially i didn't give more details to keep my question short and >> save time to the ppl that read it. I actually believed that such >> functionality might be covered and available and details would have just >> prolong my question. >> Here is some additional information on why I am looking for such >> functionality. In my project I want to use Drools as external rule engine. >> My project is not written in Java and the effort to transfer it is >> inconsiderable. > > I guess you mean "considerable". > >> What I want to start using Drools for is a simple blackbox >> of getting answers from a Stateless Drools Session, most likely without any >> need of reinference. Simply ask and get answered. During the runtime of my >> project there is a vast amount of information that can be considered as a >> fact . However in most of the cases what I need is to invoke a simple >> ruleset that actually need like 1% of the facts that I currently know at >> any particular moment. So what I want to do is ask Drools "Hey I want to >> invoke ruleset, can you please tell me what are the facts that it is >> using so I can pass all of them, that I currently have?". Then after >> receiving the answer I will filter the 1% from the big picture and will >> finally ask Drools to answer my question. > > If these "rule sets" are unrelated with each other, you might put them into > separater DRL files. Then the import list will tell you which facts this > rule set needs, and so all you need is simple text processing... > > -W > >> What I want to avoid is passing hundreds of instance/facts with hundreds >> of fields that are actually never user. Of course I realise that the rule >> introspection that I am asking for is not my only option, I can create the >> .drl metadata during the ruleset definition. Some more ideas poped into my >> head, so far, but the best solution for me seems to be if we can just call >> Drools about that information and it return it as a straight answer. >> >> That is why I am trying to identify if it is possible to recive the rule >> metadata from Drools. At first I thought it could be available in a snap of >> a finger with some method calls, however now I am interested to see what is >> the effort to make it happen. >> Hope it helps. Thanks for the support. >> Best Regards, Milen >> >> >> >> >> >> >> -------- Original Letter -------- >> >> From: Stephen Masters stephen.masters at me.com >> >> About: Re: [rules-users] Is rule introspection available from the >> Drools API? >> >> To: Drools List >> >> Sent at: Tuesday, 2014, January 7 12:08:39 EET >> >> >> >> >> >> >> It may also be worth explaining exactly what you aim to achieve through >> this and why. From what I have seen, most people who ask about introspecting >> the LHS of rules via the API, don?t actually need to do that. >> >> >> >> >> >> >> Steve >> >> >> >> >> >> >> >> >> >> On 7 Jan 2014, at 08:56, Wolfgang Laun < >> wolfgang.laun at gmail.com > wrote: >> >> >> >> >> Hi, >> >> >> >> while you continue this line of research you might consider possible >> >> ramifications and snags, and be prepared for them. >> >> >> >> The syntax for writing LHS conditions is quite complex - it's more >> >> complex than Java expressions, because the CE eval() alone will give >> >> you (almost) all of that. Rule authors may also use DRL functions, >> >> which could hide field access. >> >> >> >> If *you* author the rules, you may be able to avoid the worst, but it >> >> won't be a piece of cake. >> >> >> >> Cheers >> >> -W >> >> >> >> >> >> >> >> On 07/01/2014, milen igrachev < >> igrachev at abv.bg > wrote: >> >> >> >> Hello thanks for the quick and precise answer! >> >> >> I believe that the time difference will be a bit of a problem for the IRC >> >> chat , but i will be online (channel: #drools user: igrachev) today and >> will >> >> try to check it often. >> However big thanks for the support and the >> >> willingness to help! >> >> >> You are saying that the code is there, but is not public and documented. >> >> Well being not public seems to be a problem, but do you >> think it is >> >> possible to give me an example with the official Drools "first rule" - >> >> Sample.drl. The one that comes with the first Drools project. >> So do you >> >> believe it will be possible to paste me some code on how to retrieve the >> >> information that this ruleset is using one fact of type Message >> and two of >> >> it's attributes - >> status >> and >> message. >> So just some code in a public >> >> static void main (String [] args) will be great :), or any kind of >> >> explanation :). >> >> >> Once again thank you. >> >> >> Have a nice day, >> >> Milen >> >> >> >> >> >> >> >> ----Original Letter---- >> >> From: Mark Proctor >> mproctor at codehaus.org >> >> >> >> About: Re: [rules-users] Is rule introspection available from the Drools >> >> >> API? >> >> >> >> To: Rules Users List >> >> >> >> Sent at: Monday, 2014, January 6 16:05:33 EET >> >> >> >> >> >> The code is there, but it?s not public and not documented, and the code can >> >> be a little hard to understand - as it?s grown organically over the years. >> >> >> >> >> >> >> >> You?ll need to cast and unwrap and look at member vars. Start on the Rule >> >> and the lhs variable. You can always pop onto irc, with live questions,and >> >> we?ll try and respond quickly. >> >> >> >> >> http://www.jboss.org/drools/irc >> >> >> >> >> >> >> >> Mark >> >> >> >> >> >> >> >> On 6 Jan 2014, at 09:51, milen igrachev >> >> igrachev at abv.bg >> >>> wrote: >> >> >> >> >> >> >> >> >> >> Hello, >> >> >> >> >> >> >> is there a way to introspect a Drools file from within java code? >> >> >> >> >> >> >> What I need is to be able to identify the facts and the fact >> attributes >> >> that are used in a given DRL file. >> >> >> >> >> >> >> >> >> >> >> >> >> For example if I have a rule stored in a customer.drl DRL file within >> my >> >> project, containing the following definition: >> >> >> >> >> >> >> package myRulePackage >> >> >> >> >> >> >> >> >> >> >> >> >> import org.rules.model.Customer >> >> >> >> >> >> >> import org.rules.model.Mambership >> >> >> >> >> >> >> >> >> >> >> >> >> rule "is eligible customer" >> >> >> >> >> >> >> when >> >> >> >> >> >> >> >> $c:Customer(status == "active") >> >> >> >> >> >> >> >> Membership(customer == $c, type == "premium") >> >> >> >> >> >> >> then >> >> >> >> >> >> >> >> $c.setEligibilityStatus(true); >> >> >> >> >> >> >> end >> >> >> >> >> >> >> >> >> >> >> >> >> What i need is a way to understand that this ruleset customer.drl is >> using >> >> two fact types - Customer and Membership and three of their attributes - >> >> Customer.status, Membership.customer and Membership.type. >> >> >> >> >> >> >> >> >> >> >> >> >> >> >> >> >> >> >> I found some information on the internet that such functionality is >> not >> >> supported, however the information was a bit too old, so I decided to ask >> >> again. >> >> >> >> >> >> >> >> >> >> >> >> >> >> >> >> >> >> >> Big thanks for the support! >> >> >> >> >> >> >> Milen >> >> >> >> >> >> >> _______________________________________________ >> >> >> >> >> >> >> 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 From stephen.masters at me.com Tue Jan 7 09:00:51 2014 From: stephen.masters at me.com (Stephen Masters) Date: Tue, 07 Jan 2014 14:00:51 +0000 Subject: [rules-users] Using Advanced Enumeration Concepts in guvnor In-Reply-To: <1389101450752-4027563.post@n3.nabble.com> References: <1389101450752-4027563.post@n3.nabble.com> Message-ID: <4E901C4F-BA87-4DDA-8915-DBE16A43EE9B@me.com> There may be better ways of doing it in newer versions of Guvnor, but the way I did it for for 5.3 made use of Spring. Unfortunately, this did not work in 5.5. Your code will need to do all of its database connectivity itself. Therefore it does need to include the DB connectivity jars. I ensured that this was as easy as possible by using the Maven Shade plugin to build a jar which contained all of my dependencies. If your connection details are in a properties file, then it?s easy enough to reference that outside the application Jar. The code below is extracted from an application I wrote to do this using Spring. Possibly if you are using Seam throughout your application then as long as you are using the same version that Guvnor is built upon, then it might be easier. public List isoCodes() { List values = new ArrayList(); for (Currency ccy : finder().findCurrencies()) { values.add(ccy.getISO()); } Collections.sort(values); return values; } private static CurrencyFinder finder() { return (CurrencyFinder) GuvnorEnumContext.getContext().getBean("currencyFinder"); } /** * Maintains a static reference to a Spring {@link ApplicationContext}, and a * static getContext() method, which will initialize the context if necessary. */ public class GuvnorEnumContext { private static ApplicationContext ctx = null; GuvnorEnumContext() { } GuvnorEnumContext(ApplicationContext applicationContext) { ctx = applicationContext; } public static ApplicationContext getContext() { if (ctx == null) { ctx = new AnnotationConfigApplicationContext(GuvnorEnumConfig.class); } return ctx; } } /** * This configuration class is used by the Guvnor enumeration services to set up * annotation-based injection of beans throughout the application. */ @EnableSpringConfigured @Configuration @ComponentScan("com.yourcompany") public class GuvnorEnumConfig { } On 7 Jan 2014, at 13:30, abhinay_agarwal wrote: > The following sentences are taking directly from the user guide: > > / 'Person.age' : (new com.yourco.DataHelper()).getListOfAges() > > This assumes you have a class called "DataHelper" which has a method > "getListOfAges()" which returns a List of strings (and is on the classpath). > You can of course mix these "dynamic" enumerations with fixed lists. You > could for example load from a database using JDBC. The data enumerations are > loaded the first time you use the guided editor in a session./ > > Now, I would like to know how guvnor would connect to the database ? > > Inside the getListOfAges(), I want to hit the database and get the list of > ages, put it inside a Map>. > > The example that is shown in the user guide is again hard coding the values. > >> From the user guide : > > /public class SampleDataSource2 { > public Map, List loadData() { > Map data = new HashMap(); > List d = new ArrayList(); > d.add("value1"); > d.add("value2"); > data.put("Fact.field", d); > return data; > } > }/ > > > AFAIK, the jar of this class SampleDataSource2 will be uploaded to guvnor, > so should I keep the connection details to database inside the same class ? > If yes, > > 1. How will guvnor be able to directly connect to the database ? > 2. Should I add the jars for database connectivity as well ? > 3. Is keeping the connection details inside the jar, not a security threat ? > > I am not sure if I understand completely how this enumeration works, please > feel free to guide me, if I am wrong somewhere. > > Regards, > Abhinay > > > > > -- > View this message in context: http://drools.46999.n3.nabble.com/Using-Advanced-Enumeration-Concepts-in-guvnor-tp4027563.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 igrachev at abv.bg Tue Jan 7 09:03:53 2014 From: igrachev at abv.bg (milen igrachev) Date: Tue, 7 Jan 2014 16:03:53 +0200 (EET) Subject: [rules-users] Is rule introspection available from the Drools API? Message-ID: <1743977764.101173.1389103434003.JavaMail.apache@nm1.abv.bg> Well the problem with the fields of the fact objects is just the same as the one with the fact types. Let me try to explain. The business objects representing the business abstractions in my project are overlaping with the Fact model. I believe that this is the standard case :). Actually we can ignore the technical particularity that we have a Java fact model and another business application model, because the two model will be mirrored. We can think that for each business class there is a fact class for Drools to use :). The business classes are complex and consist of many fields. For example the biggest contains ovet 450 fields. The most common ones to be used as facts consists of 373 and 314 fields. If I identify just the Fact Types then I will need to extract all the information that is available for that fact before pass it to Drools, then Instantiate a Java instance to represent the Fact and initialize the instance with the information. What I am trying to avoid here is the transfer of that many useless information once again. In the most common case I will need 1 to 10 fields per Fact Type. So passing the 300 seems redundant. Best Regards, Milen -------- Original Letter -------- From: Wolfgang Laun wolfgang.laun at gmail.com About: Re: [rules-users] Is rule introspection available from the Drools API? To: Rules Users List Sent at: Tuesday, 2014, January7 15:04:21 EET As you describe it, the fields of the fact objects shouldn't matter. On 07/01/2014, milen igrachev igrachev at abv.bg > wrote: > Hello, initially i didn't give more details to keep my question short and > save time to the ppl that read it. I actually believed that such > functionality might be covered and available and details would have just > prolong my question. > Here is some additional information on why I am looking for such > functionality. In my project I want to use Drools as external rule engine. > My project is not written in Java and the effort to transfer it is > inconsiderable. I guess you mean "considerable". > What I want to start using Drools for is a simple blackbox > of getting answers from a Stateless Drools Session, most likely without any > need of reinference. Simply ask and get answered. During the runtime of my > project there is a vast amount of information that can be considered as a > fact . However in most of the cases what I need is to invoke a simple > ruleset that actually need like 1% of the facts that I currently know at > any particular moment. So what I want to do is ask Drools "Hey I want to > invoke ruleset, can you please tell me what are the facts that it is > using so I can pass all of them, that I currently have?". Then after > receiving the answer I will filter the 1% from the big picture and will > finally ask Drools to answer my question. If these "rule sets" are unrelated with each other, you might put them into separater DRL files. Then the import list will tell you which facts this rule set needs, and so all you need is simple text processing... -W > What I want to avoid is passing hundreds of instance/facts with hundreds > of fields that are actually never user. Of course I realise that the rule > introspection that I am asking for is not my only option, I can create the > .drl metadata during the ruleset definition. Some more ideas poped into my > head, so far, but the best solution for me seems to be if we can just call > Drools about that information and it return it as a straight answer. > > That is why I am trying to identify if it is possible to recive the rule > metadata from Drools. At first I thought it could be available in a snap of > a finger with some method calls, however now I am interested to see what is > the effort to make it happen. > Hope it helps. Thanks for the support. > Best Regards, Milen > > > > > > > -------- Original Letter -------- > > From: Stephen Masters stephen.masters at me.com > > About: Re: [rules-users] Is rule introspection available from the > Drools API? > > To: Drools List > > Sent at: Tuesday, 2014, January 7 12:08:39 EET > > > > > > > It may also be worth explaining exactly what you aim to achieve through > this and why. From what I have seen, most people who ask about introspecting > the LHS of rules via the API, don?t actually need to do that. > > > > > > > Steve > > > > > > > > > > On 7 Jan 2014, at 08:56, Wolfgang Laun < > wolfgang.laun at gmail.com > wrote: > > > > > Hi, > > > > while you continue this line of research you might consider possible > > ramifications and snags, and be prepared for them. > > > > The syntax for writing LHS conditions is quite complex - it's more > > complex than Java expressions, because the CE eval() alone will give > > you (almost) all of that. Rule authors may also use DRL functions, > > which could hide field access. > > > > If *you* author the rules, you may be able to avoid the worst, but it > > won't be a piece of cake. > > > > Cheers > > -W > > > > > > > > On 07/01/2014, milen igrachev < > igrachev at abv.bg > wrote: > > > > Hello thanks for the quick and precise answer! > > > I believe that the time difference will be a bit of a problem for the IRC > > chat , but i will be online (channel: #drools user: igrachev) today and > will > > try to check it often. > However big thanks for the support and the > > willingness to help! > > > You are saying that the code is there, but is not public and documented. > > Well being not public seems to be a problem, but do you > think it is > > possible to give me an example with the official Drools "first rule" - > > Sample.drl. The one that comes with the first Drools project. > So do you > > believe it will be possible to paste me some code on how to retrieve the > > information that this ruleset is using one fact of type Message > and two of > > it's attributes - > status > and > message. > So just some code in a public > > static void main (String [] args) will be great :), or any kind of > > explanation :). > > > Once again thank you. > > > Have a nice day, > > Milen > > > > > > > > ----Original Letter---- > > From: Mark Proctor > mproctor at codehaus.org > > > > About: Re: [rules-users] Is rule introspection available from the Drools > > > API? > > > > To: Rules Users List > > > > Sent at: Monday, 2014, January 6 16:05:33 EET > > > > > > The code is there, but it?s not public and not documented, and the code can > > be a little hard to understand - as it?s grown organically over the years. > > > > > > > > You?ll need to cast and unwrap and look at member vars. Start on the Rule > > and the lhs variable. You can always pop onto irc, with live questions,and > > we?ll try and respond quickly. > > > > > http://www.jboss.org/drools/irc > > > > > > > > Mark > > > > > > > > On 6 Jan 2014, at 09:51, milen igrachev > > igrachev at abv.bg > > > wrote: > > > > > > > > > > Hello, > > > > > > > is there a way to introspect a Drools file from within java code? > > > > > > > What I need is to be able to identify the facts and the fact > attributes > > that are used in a given DRL file. > > > > > > > > > > > > > For example if I have a rule stored in a customer.drl DRL file within > my > > project, containing the following definition: > > > > > > > package myRulePackage > > > > > > > > > > > > > import org.rules.model.Customer > > > > > > > import org.rules.model.Mambership > > > > > > > > > > > > > rule "is eligible customer" > > > > > > > when > > > > > > > > $c:Customer(status == "active") > > > > > > > > Membership(customer == $c, type == "premium") > > > > > > > then > > > > > > > > $c.setEligibilityStatus(true); > > > > > > > end > > > > > > > > > > > > > What i need is a way to understand that this ruleset customer.drl is > using > > two fact types - Customer and Membership and three of their attributes - > > Customer.status, Membership.customer and Membership.type. > > > > > > > > > > > > > > > > > > > I found some information on the internet that such functionality is > not > > supported, however the information was a bit too old, so I decided to ask > > again. > > > > > > > > > > > > > > > > > > > Big thanks for the support! > > > > > > > Milen > > > > > > > _______________________________________________ > > > > > > > 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/20140107/20730a07/attachment-0001.html From abhinay_agarwal at infosys.com Tue Jan 7 09:12:00 2014 From: abhinay_agarwal at infosys.com (abhinay_agarwal) Date: Tue, 7 Jan 2014 06:12:00 -0800 (PST) Subject: [rules-users] Using Advanced Enumeration Concepts in guvnor In-Reply-To: <4E901C4F-BA87-4DDA-8915-DBE16A43EE9B@me.com> References: <1389101450752-4027563.post@n3.nabble.com> <4E901C4F-BA87-4DDA-8915-DBE16A43EE9B@me.com> Message-ID: <1389103920868-4027567.post@n3.nabble.com> Why doesn't this approach work in 5.5 ? -- View this message in context: http://drools.46999.n3.nabble.com/Using-Advanced-Enumeration-Concepts-in-guvnor-tp4027563p4027567.html Sent from the Drools: User forum mailing list archive at Nabble.com. From wolfgang.laun at gmail.com Tue Jan 7 10:47:49 2014 From: wolfgang.laun at gmail.com (Wolfgang Laun) Date: Tue, 7 Jan 2014 16:47:49 +0100 Subject: [rules-users] Is rule introspection available from the Drools API? In-Reply-To: <1743977764.101173.1389103434003.JavaMail.apache@nm1.abv.bg> References: <1743977764.101173.1389103434003.JavaMail.apache@nm1.abv.bg> Message-ID: When I - approximately ;-) - calculate how many possible subsets there are with a field set of about 350 fields my head begins to swim. When I think of all the tests you'll need to check that you do get the fields you need for a certain rule set (assuming you can indeed determine which ones are required) my head begins to reel... I don't know how expensive the extraction of those 300-odd fields is, in your application domain. But in scenarios like this, it frequently turns out that doing O(100) isn't much costlier than O(10) or even O(1), because the overhead for doing a transfer with minimum data drowns out the cost of a transfer with a lot of additional payload. (Depending on the way data is represented on the line between your app and Drools, chances are, you won't save much there.) -W On 07/01/2014, milen igrachev wrote: > Well the problem with the fields of the fact objects is just the same as the > one with the fact types. > Let me try to explain. > The business objects representing the business abstractions in my project > are overlaping with the Fact model. > I believe that this is the standard case :). Actually we can ignore the > technical particularity that we have a Java fact model and another business > application model, because the two model will be mirrored. We can think that > for each business class there is a fact class for Drools to use :). The > business classes are complex and consist of many fields. For example the > biggest contains ovet 450 fields. The most common ones to be used as facts > consists of 373 and 314 fields. If I identify just the Fact Types then I > will need to extract all the information that is available for that fact > before pass it to Drools, then Instantiate a Java instance to represent the > Fact and initialize the instance with the information. What I am trying to > avoid here is the transfer of that many useless information once again. In > the most common case I will need 1 to 10 fields per Fact Type. So passing > the 300 seems redundant. > Best Regards, Milen > > > > > > > -------- Original Letter -------- > > From: Wolfgang Laun wolfgang.laun at gmail.com > > About: Re: [rules-users] Is rule introspection available from the Drools > API? > > To: Rules Users List > > Sent at: Tuesday, 2014, January7 15:04:21 EET > > > As you describe it, the fields of the fact objects shouldn't matter. > > > > On 07/01/2014, milen igrachev igrachev at abv.bg > wrote: > >> Hello, initially i didn't give more details to keep my question short >> and > >> save time to the ppl that read it. I actually believed that such > >> functionality might be covered and available and details would have just > >> prolong my question. > >> Here is some additional information on why I am looking for such > >> functionality. In my project I want to use Drools as external rule >> engine. > >> My project is not written in Java and the effort to transfer it is > >> inconsiderable. > > > > I guess you mean "considerable". > > > >> What I want to start using Drools for is a simple blackbox > >> of getting answers from a Stateless Drools Session, most likely without >> any > >> need of reinference. Simply ask and get answered. During the runtime of >> my > >> project there is a vast amount of information that can be considered as a > >> fact . However in most of the cases what I need is to invoke a simple > >> ruleset that actually need like 1% of the facts that I currently know >> at > >> any particular moment. So what I want to do is ask Drools "Hey I want to > >> invoke ruleset, can you please tell me what are the facts that it is > >> using so I can pass all of them, that I currently have?". Then after > >> receiving the answer I will filter the 1% from the big picture and will > >> finally ask Drools to answer my question. > > > > If these "rule sets" are unrelated with each other, you might put them into > > separater DRL files. Then the import list will tell you which facts this > > rule set needs, and so all you need is simple text processing... > > > > -W > > > >> What I want to avoid is passing hundreds of instance/facts with >> hundreds > >> of fields that are actually never user. Of course I realise that the >> rule > >> introspection that I am asking for is not my only option, I can create >> the > >> .drl metadata during the ruleset definition. Some more ideas poped into >> my > >> head, so far, but the best solution for me seems to be if we can just >> call > >> Drools about that information and it return it as a straight answer. > >> > >> That is why I am trying to identify if it is possible to recive the rule > >> metadata from Drools. At first I thought it could be available in a snap >> of > >> a finger with some method calls, however now I am interested to see what >> is > >> the effort to make it happen. > >> Hope it helps. Thanks for the support. > >> Best Regards, Milen > >> > >> > >> > >> > >> > >> > >> -------- Original Letter -------- > >> > >> From: Stephen Masters stephen.masters at me.com > >> > >> About: Re: [rules-users] Is rule introspection available from the > >> Drools API? > >> > >> To: Drools List > >> > >> Sent at: Tuesday, 2014, January 7 12:08:39 EET > >> > >> > >> > >> > >> > >> > >> It may also be worth explaining exactly what you aim to achieve >> through > >> this and why. From what I have seen, most people who ask about >> introspecting > >> the LHS of rules via the API, don?t actually need to do that. > >> > >> > >> > >> > >> > >> > >> Steve > >> > >> > >> > >> > >> > >> > >> > >> > >> > >> On 7 Jan 2014, at 08:56, Wolfgang Laun < > >> wolfgang.laun at gmail.com > wrote: > >> > >> > >> > >> > >> Hi, > >> > >> > >> > >> while you continue this line of research you might consider possible > >> > >> ramifications and snags, and be prepared for them. > >> > >> > >> > >> The syntax for writing LHS conditions is quite complex - it's more > >> > >> complex than Java expressions, because the CE eval() alone will give > >> > >> you (almost) all of that. Rule authors may also use DRL functions, > >> > >> which could hide field access. > >> > >> > >> > >> If *you* author the rules, you may be able to avoid the worst, but it > >> > >> won't be a piece of cake. > >> > >> > >> > >> Cheers > >> > >> -W > >> > >> > >> > >> > >> > >> > >> > >> On 07/01/2014, milen igrachev < > >> igrachev at abv.bg > wrote: > >> > >> > >> > >> Hello thanks for the quick and precise answer! > >> > >> > >> I believe that the time difference will be a bit of a problem for the IRC > >> > >> chat , but i will be online (channel: #drools user: igrachev) today and > >> will > >> > >> try to check it often. > >> However big thanks for the support and the > >> > >> willingness to help! > >> > >> > >> You are saying that the code is there, but is not public and documented. > >> > >> Well being not public seems to be a problem, but do you > >> think it is > >> > >> possible to give me an example with the official Drools "first rule" - > >> > >> Sample.drl. The one that comes with the first Drools project. > >> So do you > >> > >> believe it will be possible to paste me some code on how to retrieve the > >> > >> information that this ruleset is using one fact of type Message > >> and two of > >> > >> it's attributes - > >> status > >> and > >> message. > >> So just some code in a public > >> > >> static void main (String [] args) will be great :), or any kind of > >> > >> explanation :). > >> > >> > >> Once again thank you. > >> > >> > >> Have a nice day, > >> > >> Milen > >> > >> > >> > >> > >> > >> > >> > >> ----Original Letter---- > >> > >> From: Mark Proctor > >> mproctor at codehaus.org > >> > >> > >> > >> About: Re: [rules-users] Is rule introspection available from the Drools > >> > >> > >> API? > >> > >> > >> > >> To: Rules Users List > >> > >> > >> > >> Sent at: Monday, 2014, January 6 16:05:33 EET > >> > >> > >> > >> > >> > >> The code is there, but it?s not public and not documented, and the code >> can > >> > >> be a little hard to understand - as it?s grown organically over the >> years. > >> > >> > >> > >> > >> > >> > >> > >> You?ll need to cast and unwrap and look at member vars. Start on the Rule > >> > >> and the lhs variable. You can always pop onto irc, with live >> questions,and > >> > >> we?ll try and respond quickly. > >> > >> > >> > >> > >> http://www.jboss.org/drools/irc > >> > >> > >> > >> > >> > >> > >> > >> Mark > >> > >> > >> > >> > >> > >> > >> > >> On 6 Jan 2014, at 09:51, milen igrachev > >> > >> igrachev at abv.bg > >> > >> > wrote: > >> > >> > >> > >> > >> > >> > >> > >> > >> > >> Hello, > >> > >> > >> > >> > >> > >> > >> is there a way to introspect a Drools file from within java code? > >> > >> > >> > >> > >> > >> > >> What I need is to be able to identify the facts and the fact > >> attributes > >> > >> that are used in a given DRL file. > >> > >> > >> > >> > >> > >> > >> > >> > >> > >> > >> > >> > >> For example if I have a rule stored in a customer.drl DRL file >> within > >> my > >> > >> project, containing the following definition: > >> > >> > >> > >> > >> > >> > >> package myRulePackage > >> > >> > >> > >> > >> > >> > >> > >> > >> > >> > >> > >> > >> import org.rules.model.Customer > >> > >> > >> > >> > >> > >> > >> import org.rules.model.Mambership > >> > >> > >> > >> > >> > >> > >> > >> > >> > >> > >> > >> > >> rule "is eligible customer" > >> > >> > >> > >> > >> > >> > >> when > >> > >> > >> > >> > >> > >> > >> > >> $c:Customer(status == "active") > >> > >> > >> > >> > >> > >> > >> > >> Membership(customer == $c, type == "premium") > >> > >> > >> > >> > >> > >> > >> then > >> > >> > >> > >> > >> > >> > >> > >> $c.setEligibilityStatus(true); > >> > >> > >> > >> > >> > >> > >> end > >> > >> > >> > >> > >> > >> > >> > >> > >> > >> > >> > >> > >> What i need is a way to understand that this ruleset customer.drl >> is > >> using > >> > >> two fact types - Customer and Membership and three of their attributes - > >> > >> Customer.status, Membership.customer and Membership.type. > >> > >> > >> > >> > >> > >> > >> > >> > >> > >> > >> > >> > >> > >> > >> > >> > >> > >> > >> I found some information on the internet that such functionality >> is > >> not > >> > >> supported, however the information was a bit too old, so I decided to ask > >> > >> again. > >> > >> > >> > >> > >> > >> > >> > >> > >> > >> > >> > >> > >> > >> > >> > >> > >> > >> > >> Big thanks for the support! > >> > >> > >> > >> > >> > >> > >> Milen > >> > >> > >> > >> > >> > >> > >> _______________________________________________ > >> > >> > >> > >> > >> > >> > >> 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 > > From glambe2 at hotmail.com Tue Jan 7 11:30:14 2014 From: glambe2 at hotmail.com (glambert27) Date: Tue, 7 Jan 2014 08:30:14 -0800 (PST) Subject: [rules-users] Duplicate Facts with overriden equals/hashcode Message-ID: <1389112214555-4027569.post@n3.nabble.com> Hi,I have an issue I'm trying to track down and won't to rule out the data being an issue. Running 5.5 ExpertI have a Fact; let's say "Person"Class Person {private String fName;private String lName;private String ssn;getters/setters at Overridepublic boolean equals(final Object obj) { if ( obj == null ) return false; if(obj instanceof Person){ final Person other = (Person) obj; return Objects.equal(ssn, other.ssn); } else{ return false; }} @Override public int hashCode(){ return Objects.hashCode(ssn); }}Now if I insert 2 person objects with the same ssn. Actually if my LHS is $list : ArrayList() collect( Person() ), do I expect 2, 1, or 0 for my arraylist. What is seeing is that the arraylist is 0 but that doesn't make sense to me and I think there is another underline issue. -- View this message in context: http://drools.46999.n3.nabble.com/Duplicate-Facts-with-overriden-equals-hashcode-tp4027569.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/20140107/d2bf27ef/attachment.html From stephen.masters at me.com Tue Jan 7 11:31:18 2014 From: stephen.masters at me.com (Stephen Masters) Date: Tue, 07 Jan 2014 16:31:18 +0000 Subject: [rules-users] Using Advanced Enumeration Concepts in guvnor In-Reply-To: <1389103920868-4027567.post@n3.nabble.com> References: <1389101450752-4027563.post@n3.nabble.com> <4E901C4F-BA87-4DDA-8915-DBE16A43EE9B@me.com> <1389103920868-4027567.post@n3.nabble.com> Message-ID: <78DED4E8-55C8-42FE-AA58-EC9FF2794E0A@me.com> Basically, none of my enumeration methods were being called. It appeared to be a bug, which I raised in Jira. Mike Anstis tested it in 5.6 quite a while back (maybe a year ago), and whatever was wrong seems to have been fixed. If you want to try it, I?d recommend creating a minimal enumeration class, with hard-coded values and no external dependencies first. As long as that gets called and you see the results in Guvnor, you should be able to add in the database connectivity. On 7 Jan 2014, at 14:12, abhinay_agarwal wrote: > Why doesn't this approach work in 5.5 ? > > > > -- > View this message in context: http://drools.46999.n3.nabble.com/Using-Advanced-Enumeration-Concepts-in-guvnor-tp4027563p4027567.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 michael.anstis at gmail.com Tue Jan 7 11:46:02 2014 From: michael.anstis at gmail.com (Michael Anstis) Date: Tue, 7 Jan 2014 16:46:02 +0000 Subject: [rules-users] Using Advanced Enumeration Concepts in guvnor In-Reply-To: <1389101450752-4027563.post@n3.nabble.com> References: <1389101450752-4027563.post@n3.nabble.com> Message-ID: All data access has to be "black boxed" inside your helper class. The example simply sets up some static data but could equally read the data from a database. The implementation would be entirely up to your own imvention. Sent on the move On 7 Jan 2014 13:31, "abhinay_agarwal" wrote: > The following sentences are taking directly from the user guide: > > / 'Person.age' : (new com.yourco.DataHelper()).getListOfAges() > > This assumes you have a class called "DataHelper" which has a method > "getListOfAges()" which returns a List of strings (and is on the > classpath). > You can of course mix these "dynamic" enumerations with fixed lists. You > could for example load from a database using JDBC. The data enumerations > are > loaded the first time you use the guided editor in a session./ > > Now, I would like to know how guvnor would connect to the database ? > > Inside the getListOfAges(), I want to hit the database and get the list of > ages, put it inside a Map>. > > The example that is shown in the user guide is again hard coding the > values. > > >From the user guide : > > /public class SampleDataSource2 { > public Map, List loadData() { > Map data = new HashMap(); > List d = new ArrayList(); > d.add("value1"); > d.add("value2"); > data.put("Fact.field", d); > return data; > } > }/ > > > AFAIK, the jar of this class SampleDataSource2 will be uploaded to guvnor, > so should I keep the connection details to database inside the same class ? > If yes, > > 1. How will guvnor be able to directly connect to the database ? > 2. Should I add the jars for database connectivity as well ? > 3. Is keeping the connection details inside the jar, not a security threat > ? > > I am not sure if I understand completely how this enumeration works, please > feel free to guide me, if I am wrong somewhere. > > Regards, > Abhinay > > > > > -- > View this message in context: > http://drools.46999.n3.nabble.com/Using-Advanced-Enumeration-Concepts-in-guvnor-tp4027563.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/20140107/def075be/attachment-0001.html From wolfgang.laun at gmail.com Tue Jan 7 12:09:05 2014 From: wolfgang.laun at gmail.com (Wolfgang Laun) Date: Tue, 7 Jan 2014 18:09:05 +0100 Subject: [rules-users] Duplicate Facts with overriden equals/hashcode In-Reply-To: <1389112214555-4027569.post@n3.nabble.com> References: <1389112214555-4027569.post@n3.nabble.com> Message-ID: If you have a rule rule "a Person" when $p: Person() then ... end does it fire? What about the list if you insert just one Person? -W PS: Try to format your posts like everybody else, please. On 07/01/2014, glambert27 wrote: > Hi,I have an issue I'm trying to track down and won't to rule out the data > being an issue. Running 5.5 ExpertI have a Fact; let's say "Person"Class > Person {private String fName;private String lName;private String > ssn;getters/setters at Overridepublic boolean equals(final Object obj) { > > if ( obj == null ) return false; if(obj instanceof Person){ > > final Person other = (Person) obj; return Objects.equal(ssn, > other.ssn); } else{ return false; }} > @Override public int hashCode(){ return Objects.hashCode(ssn); > }}Now if I insert 2 person objects with the same ssn. Actually if my LHS is > $list : ArrayList() collect( Person() ), do I expect 2, 1, or 0 for my > arraylist. What is seeing is that the arraylist is 0 but that doesn't make > sense to me and I think there is another underline issue. > > > > -- > View this message in context: > http://drools.46999.n3.nabble.com/Duplicate-Facts-with-overriden-equals-hashcode-tp4027569.html > Sent from the Drools: User forum mailing list archive at Nabble.com. From mproctor at codehaus.org Tue Jan 7 12:58:18 2014 From: mproctor at codehaus.org (Mark Proctor) Date: Tue, 7 Jan 2014 17:58:18 +0000 Subject: [rules-users] Is rule introspection available from the Drools API? In-Reply-To: <174020978.90940.1389096283171.JavaMail.apache@nm1.abv.bg> References: <174020978.90940.1389096283171.JavaMail.apache@nm1.abv.bg> Message-ID: <2854AC24-332E-4827-BA21-C9CAA805B0DE@codehaus.org> Take a look at drools-verifier. It only works for simple patterns, but demonstrates how to extract fact type and used properties. Mark On 7 Jan 2014, at 12:04, milen igrachev wrote: > Hello, > initially i didn't give more details to keep my question short and save time to the ppl that read it. > I actually believed that such functionality might be covered and available and details would have just prolong my question. > > Here is some additional information on why I am looking for such functionality. > In my project I want to use Drools as external rule engine. My project is not written in Java and the effort to transfer it is > inconsiderable. What I want to start using Drools for is a simple blackbox of getting answers from a Stateless Drools > Session, most likely without any need of reinference. Simply ask and get answered. > During the runtime of my project there is a vast amount of information that can be considered as a fact. However in > most of the cases what I need is to invoke a simple ruleset that actually need like 1% of the facts that I currently know > at any particular moment. So what I want to do is ask Drools "Hey I want to invoke ruleset, can you please tell > me what are the facts that it is using so I can pass all of them, that I currently have?". Then after receiving the answer I will > filter the 1% from the big picture and will finally ask Drools to answer my question. > What I want to avoid is passing hundreds of instance/facts with hundreds of fields that are actually never user. > Of course I realise that the rule introspection that I am asking for is not my only option, I can create the .drl metadata during > the ruleset definition. Some more ideas poped into my head, so far, but the best solution for me seems to be if we can just call > Drools about that information and it return it as a straight answer. > > That is why I am trying to identify if it is possible to recive the rule metadata from Drools. At first I thought it could be available in > a snap of a finger with some method calls, however now I am interested to see what is the effort to make it happen. > > Hope it helps. Thanks for the support. > > Best Regards, > Milen > > > -------- Original Letter -------- > From: Stephen Masters stephen.masters at me.com > About: Re: [rules-users] Is rule introspection available from the Drools API? > To: Drools List > Sent at: Tuesday, 2014, January 7 12:08:39 EET > > It may also be worth explaining exactly what you aim to achieve through this and why. From what I have seen, most people who ask about introspecting the LHS of rules via the API, don?t actually need to do that. > > Steve > > > On 7 Jan 2014, at 08:56, Wolfgang Laun < wolfgang.laun at gmail.com> wrote: > > Hi, > > while you continue this line of research you might consider possible > ramifications and snags, and be prepared for them. > > The syntax for writing LHS conditions is quite complex - it's more > complex than Java expressions, because the CE eval() alone will give > you (almost) all of that. Rule authors may also use DRL functions, > which could hide field access. > > If *you* author the rules, you may be able to avoid the worst, but it > won't be a piece of cake. > > Cheers > -W > > > > On 07/01/2014, milen igrachev < igrachev at abv.bg> wrote: > Hello thanks for the quick and precise answer! > I believe that the time difference will be a bit of a problem for the IRC > chat , but i will be online (channel: #drools user: igrachev) today and will > try to check it often. However big thanks for the support and the > willingness to help! > You are saying that the code is there, but is not public and documented. > Well being not public seems to be a problem, but do you think it is > possible to give me an example with the official Drools "first rule" - > Sample.drl. The one that comes with the first Drools project. So do you > believe it will be possible to paste me some code on how to retrieve the > information that this ruleset is using one fact of type Message and two of > it's attributes - status and message. So just some code in a public > static void main (String [] args) will be great :), or any kind of > explanation :). > Once again thank you. > Have a nice day, > Milen > > > > ----Original Letter---- > From: Mark Proctor mproctor at codehaus.org > > About: Re: [rules-users] Is rule introspection available from the Drools > API? > > To: Rules Users List > > Sent at: Monday, 2014, January 6 16:05:33 EET > > > The code is there, but it?s not public and not documented, and the code can > be a little hard to understand - as it?s grown organically over the years. > > > > You?ll need to cast and unwrap and look at member vars. Start on the Rule > and the lhs variable. You can always pop onto irc, with live questions,and > we?ll try and respond quickly. > > http://www.jboss.org/drools/irc > > > > Mark > > > > On 6 Jan 2014, at 09:51, milen igrachev igrachev at abv.bg > wrote: > > > > Hello, > > is there a way to introspect a Drools file from within java code? > > What I need is to be able to identify the facts and the fact attributes > that are used in a given DRL file. > > > > For example if I have a rule stored in a customer.drl DRL file within my > project, containing the following definition: > > package myRulePackage > > > > import org.rules.model.Customer > > import org.rules.model.Mambership > > > > rule "is eligible customer" > > when > > $c:Customer(status == "active") > > Membership(customer == $c, type == "premium") > > then > > $c.setEligibilityStatus(true); > > end > > > > What i need is a way to understand that this ruleset customer.drl is using > two fact types - Customer and Membership and three of their attributes - > Customer.status, Membership.customer and Membership.type. > > > > > > I found some information on the internet that such functionality is not > supported, however the information was a bit too old, so I decided to ask > again. > > > > > > Big thanks for the support! > > Milen > > _______________________________________________ > > 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/20140107/5f050864/attachment.html From glambe2 at hotmail.com Tue Jan 7 14:17:27 2014 From: glambe2 at hotmail.com (glambert27) Date: Tue, 7 Jan 2014 11:17:27 -0800 (PST) Subject: [rules-users] Duplicate Facts with overriden equals/hashcode In-Reply-To: References: <1389112214555-4027569.post@n3.nabble.com> Message-ID: <1389122247818-4027574.post@n3.nabble.com> actually the issue is another issue. the list only have 1 of the two. -- View this message in context: http://drools.46999.n3.nabble.com/Duplicate-Facts-with-overriden-equals-hashcode-tp4027569p4027574.html Sent from the Drools: User forum mailing list archive at Nabble.com. From mproctor at codehaus.org Tue Jan 7 19:53:36 2014 From: mproctor at codehaus.org (Mark Proctor) Date: Wed, 8 Jan 2014 00:53:36 +0000 Subject: [rules-users] permgen leak In-Reply-To: <63508E3F-3F1A-42E8-A893-6F2996A275BC@codehaus.org> References: <1386258456435-4027111.post@n3.nabble.com> <1386259095814-4027115.post@n3.nabble.com> <52AD529D.8040504@gmail.com> <1387189626968-4027321.post@n3.nabble.com> <52AF5639.5060507@gmail.com> <1389015365148-4027530.post@n3.nabble.com> <1389018700389-4027534.post@n3.nabble.com> <23E0006C-4B62-4000-BA2B-05E6314F9026@codehaus.org> <1389024856614-4027539.post@n3.nabble.com> <7E35D477-589F-49E3-B00A-E2D41D070200@codehaus.org> <52CB0140.4090502@gmail.com> <63508E3F-3F1A-42E8-A893-6F2996A275BC@codehaus.org> Message-ID: <2F11EE38-0C02-4C8A-8E12-98CA54AC3C31@codehaus.org> The root of the perm gen leak has now be solved, thanks to some heroic work by community developer Davide Sottara. This is just in time for the 5.6 release going out this week. You will not need to use the kbase.dispose() work around. Mark On 6 Jan 2014, at 20:50, Mark Proctor wrote: > The 5.6 approach should be considered a work around, not a fix. Somewhere a ref is being held, that shouldn?t be - we just haven?t found it yet. > > Mark > > On 6 Jan 2014, at 19:17, Davide Sottara wrote: > >> I have run pmander's tests, and reported in a previous email. >> The leak in 5.x is due to the nature of the composite classloader, and >> dispose() >> forces the memory to be released. I don't remember if that fix was in >> 5.6.CR1 >> (probably not), so you may have to try 5.6.0-SNAPSHOT or wait for the >> end of the week. >> 6.x does not suffer from the same problem, but has a different issue - >> no way >> to unload kie modules once they are cached - which Mario has been >> working on. >> In either case, pmander's test works fine in both 5.6.x and 6.x after >> these fixes >> Davide >> >> On 01/06/2014 07:56 PM, Mark Proctor wrote: >>> I?ve been told 5.6 will be released this week. This is because the JCR2GIT migration tool, in 5.6 is needed for our 6.0 product. >>> >>> Davide's current kbase.dispose() method, on the concrete class, should just be considered a work around for the problem. Unless this is fixed by someone in the community, I don?t think any core developers will have time to address this. At least not for 5.x; we?ll continue to look into it for 6.x. >>> >>> Mark >>> >>> >>> On 6 Jan 2014, at 16:14, brachi wrote: >>> >>>> see previous messages, pmander attached a unit test >>>> >>>> >>>> >>>> -- >>>> View this message in context: http://drools.46999.n3.nabble.com/permgen-leak-tp4027038p4027539.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 ray.hooker at me.com Tue Jan 7 20:32:40 2014 From: ray.hooker at me.com (Ray Hooker) Date: Tue, 07 Jan 2014 20:32:40 -0500 Subject: [rules-users] Kie and Guvnor 6.0 In-Reply-To: References: <5C03BAFE-0504-42CA-B31D-3BF5EA6DA4CE@me.com> Message-ID: <0EEDE22A-6162-46DF-80BA-74AA3FB4F75C@me.com> Thanks for the pointer on the docs. BTW have you seen a way to utilize more than primitive types in the Data modeler? I see where I can specify models I have already created but what about other classes such as ArrayList, etc? This is needed for one-to-many relationships between facts. For example, I have an existing model where patients have multiple medication records. I can write rules to deal with this manually (e.g., using the ?from? keyword), but can I use Guvnor to specify the model as it really exists?.. which is an ArrayList type Medication? Ray On Jan 7, 2014, at 5:42 AM, Alexandre Porcelli wrote: > Hi, > > Here are the docs available for new Workbench: http://docs.jboss.org/drools/release/6.0.1.Final/drools-docs/html/wb.Workbench.html > > Regards, > --- > Alexandre Porcelli > Principal Software Engineer > Red Hat Business Systems and Intelligence Group > > On Jan 7, 2014, at 3:02 AM, Ray Hooker wrote: > >> I have installed and worked with the new Guvnor interface. I am not sure how to interface with it. >> >> This may be a basic question, but I have not seen documentation of how Guvnor works exactly in version 6.0. I see that it uses a git repository and maven server, but I do not see where it actually resides or how I can access it? I need info like port, protocol, file location or something specific. I have tried to example the installation but am not sure the details. Certainly there is not a configuration panel that might indicate configured port for the maven repository, etc. A network diagram would be helpful. >> >> It is possible that I need to access the git repository or the Maven repository using Kie specific classes and functionality but then I would assume I need to give it the url/ web address of the Guvnor and way to configure that. >> >> >> Ray >> _______________________________________________ >> 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 Tue Jan 7 21:40:31 2014 From: mproctor at codehaus.org (Mark Proctor) Date: Wed, 8 Jan 2014 02:40:31 +0000 Subject: [rules-users] Kie and Guvnor 6.0 In-Reply-To: <0EEDE22A-6162-46DF-80BA-74AA3FB4F75C@me.com> References: <5C03BAFE-0504-42CA-B31D-3BF5EA6DA4CE@me.com> <0EEDE22A-6162-46DF-80BA-74AA3FB4F75C@me.com> Message-ID: If you configure the imports, for the project, then those types become available. Mark On 8 Jan 2014, at 01:32, Ray Hooker wrote: > Thanks for the pointer on the docs. BTW have you seen a way to utilize more than primitive types in the Data modeler? I see where I can specify models I have already created but what about other classes such as ArrayList, etc? This is needed for one-to-many relationships between facts. For example, I have an existing model where patients have multiple medication records. I can write rules to deal with this manually (e.g., using the ?from? keyword), but can I use Guvnor to specify the model as it really exists?.. which is an ArrayList type Medication? > > Ray > On Jan 7, 2014, at 5:42 AM, Alexandre Porcelli wrote: > >> Hi, >> >> Here are the docs available for new Workbench: http://docs.jboss.org/drools/release/6.0.1.Final/drools-docs/html/wb.Workbench.html >> >> Regards, >> --- >> Alexandre Porcelli >> Principal Software Engineer >> Red Hat Business Systems and Intelligence Group >> >> On Jan 7, 2014, at 3:02 AM, Ray Hooker wrote: >> >>> I have installed and worked with the new Guvnor interface. I am not sure how to interface with it. >>> >>> This may be a basic question, but I have not seen documentation of how Guvnor works exactly in version 6.0. I see that it uses a git repository and maven server, but I do not see where it actually resides or how I can access it? I need info like port, protocol, file location or something specific. I have tried to example the installation but am not sure the details. Certainly there is not a configuration panel that might indicate configured port for the maven repository, etc. A network diagram would be helpful. >>> >>> It is possible that I need to access the git repository or the Maven repository using Kie specific classes and functionality but then I would assume I need to give it the url/ web address of the Guvnor and way to configure that. >>> >>> >>> Ray >>> _______________________________________________ >>> 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 dsotty at gmail.com Tue Jan 7 22:27:45 2014 From: dsotty at gmail.com (Davide Sottara) Date: Wed, 08 Jan 2014 04:27:45 +0100 Subject: [rules-users] forall is satisfied when there is nothing? In-Reply-To: References: <1389087869736-4027553.post@n3.nabble.com> <52CBD88E.5070703@gmail.com> Message-ID: <52CCC5B1.70709@gmail.com> Indeed it is true by convention, see also http://en.wikipedia.org/wiki/Universal_quantification The only other alternative is to deprecate quantifiers altogether ;) Davide On 01/07/2014 11:53 AM, Wolfgang Laun wrote: > Please comment on http://en.wikipedia.org/wiki/First-order_logic#Empty_domains > -W > > On 07/01/2014, Davide Sottara wrote: >> First order logic does permit empty domains, and the universal >> quantifier evaluates to true in that case. >> Davide >> >> On 01/07/2014 11:11 AM, Wolfgang Laun wrote: >>> It is true that first-order logic usually assumes that the domain of a >>> formula >>> be a nonempty set. As so often, things aren't quite so simple when >>> formulae >>> are evaluated on a computer. What should be done in this case, forall >>> with an empty domain? Throw an exception? Not very convenient, since >>> there's no reasonable way of handling exceptions thrown on the LHS. >>> Return false? That doesn't make sense, because you can't inspect what >>> isn't there. Return true? If it isn't false - what else? >>> >>> If first-order logic does permit empty domains, it must be treated as >>> a special case. >>> >>> -W >>> >>> On 07/01/2014, Sonata wrote: >>>> Hi, I am using the "forall" keyword on the LHS and it seems the >>>> condition >>>> is >>>> satisfied when there is nothing to match. e.g. "forall (MyClass(value == >>>> "test"))" fires the rule when there is no MyClass() object in the >>>> working >>>> memory. My workaround is add "exists (MyClass())". >>>> >>>> Also, same for "not (exists (MyClass(value != "test")))", but I can >>>> understand this, as there is no MyClass() object, it doesn't exists and >>>> hence "not" gives true. >>>> >>>> But for "forall", it doesnt sound right to me. I wonder if "forall" is >>>> actually implemented as "not exists" in the engine. >>>> >>>> Please clarify if this is by design or a bug. Build is 5.5.0.Final >>>> >>>> Thank you >>>> >>>> >>>> >>>> -- >>>> View this message in context: >>>> http://drools.46999.n3.nabble.com/forall-is-satisfied-when-there-is-nothing-tp4027553.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 >> > _______________________________________________ > rules-users mailing list > rules-users at lists.jboss.org > https://lists.jboss.org/mailman/listinfo/rules-users > From mproctor at codehaus.org Tue Jan 7 23:45:36 2014 From: mproctor at codehaus.org (Mark Proctor) Date: Wed, 8 Jan 2014 04:45:36 +0000 Subject: [rules-users] permgen leak In-Reply-To: <2F11EE38-0C02-4C8A-8E12-98CA54AC3C31@codehaus.org> References: <1386258456435-4027111.post@n3.nabble.com> <1386259095814-4027115.post@n3.nabble.com> <52AD529D.8040504@gmail.com> <1387189626968-4027321.post@n3.nabble.com> <52AF5639.5060507@gmail.com> <1389015365148-4027530.post@n3.nabble.com> <1389018700389-4027534.post@n3.nabble.com> <23E0006C-4B62-4000-BA2B-05E6314F9026@codehaus.org> <1389024856614-4027539.post@n3.nabble.com> <7E35D477-589F-49E3-B00A-E2D41D070200@codehaus.org> <52CB0140.4090502@gmail.com> <63508E3F-3F1A-42E8-A893-6F2996A275BC@codehaus.org> <2F11EE38-0C02-4C8A-8E12-98CA54AC3C31@codehaus.org> Message-ID: For anyone interested. The commit involves addressing two needs. 1) Enforcing MVEL reflection mode throughout - MVEL ASM optimiser can NEVER be used for anything (it doesn?t add much value anyway). 2) Avoiding giving the template system the root class loader(which we use for dynamic stuff), as those templates are statically cached. https://github.com/sotty/drools/commit/1b75d4785861e72338cc5ea1280610a7937be017 Mark On 8 Jan 2014, at 00:53, Mark Proctor wrote: > The root of the perm gen leak has now be solved, thanks to some heroic work by community developer Davide Sottara. > > This is just in time for the 5.6 release going out this week. You will not need to use the kbase.dispose() work around. > > Mark > On 6 Jan 2014, at 20:50, Mark Proctor wrote: > >> The 5.6 approach should be considered a work around, not a fix. Somewhere a ref is being held, that shouldn?t be - we just haven?t found it yet. >> >> Mark >> >> On 6 Jan 2014, at 19:17, Davide Sottara wrote: >> >>> I have run pmander's tests, and reported in a previous email. >>> The leak in 5.x is due to the nature of the composite classloader, and >>> dispose() >>> forces the memory to be released. I don't remember if that fix was in >>> 5.6.CR1 >>> (probably not), so you may have to try 5.6.0-SNAPSHOT or wait for the >>> end of the week. >>> 6.x does not suffer from the same problem, but has a different issue - >>> no way >>> to unload kie modules once they are cached - which Mario has been >>> working on. >>> In either case, pmander's test works fine in both 5.6.x and 6.x after >>> these fixes >>> Davide >>> >>> On 01/06/2014 07:56 PM, Mark Proctor wrote: >>>> I?ve been told 5.6 will be released this week. This is because the JCR2GIT migration tool, in 5.6 is needed for our 6.0 product. >>>> >>>> Davide's current kbase.dispose() method, on the concrete class, should just be considered a work around for the problem. Unless this is fixed by someone in the community, I don?t think any core developers will have time to address this. At least not for 5.x; we?ll continue to look into it for 6.x. >>>> >>>> Mark >>>> >>>> >>>> On 6 Jan 2014, at 16:14, brachi wrote: >>>> >>>>> see previous messages, pmander attached a unit test >>>>> >>>>> >>>>> >>>>> -- >>>>> View this message in context: http://drools.46999.n3.nabble.com/permgen-leak-tp4027038p4027539.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 wtang at kana.com Wed Jan 8 02:07:49 2014 From: wtang at kana.com (wtang) Date: Tue, 7 Jan 2014 23:07:49 -0800 (PST) Subject: [rules-users] is the When part java? Message-ID: <1389164869521-4027582.post@n3.nabble.com> the dialect I have set to "java". Now, I know this make the Then part java. How about the When part? Is the When part ever java when I set the dialect to "java". My understanding is that When part is never Java. I have a map of string and need to support the following operators: equal does not equal contains does not contain starts with end with matches Reg Ex I know for equal and does not equal I can do $map: Map( this["Message.label"] == "iPhone" || this["Message.label"] == "iPhone" ) how about other? thanks! -- View this message in context: http://drools.46999.n3.nabble.com/is-the-When-part-java-tp4027582.html Sent from the Drools: User forum mailing list archive at Nabble.com. From wolfgang.laun at gmail.com Wed Jan 8 03:16:08 2014 From: wolfgang.laun at gmail.com (Wolfgang Laun) Date: Wed, 8 Jan 2014 09:16:08 +0100 Subject: [rules-users] is the When part java? In-Reply-To: <1389164869521-4027582.post@n3.nabble.com> References: <1389164869521-4027582.post@n3.nabble.com> Message-ID: Simply point your browser to the Drools Expert manual and Ctrl-f (find) for the strings you have posted. -W On 08/01/2014, wtang wrote: > the dialect I have set to "java". > > Now, I know this make the Then part java. How about the When part? Is the > When part ever java when I set the dialect to "java". My understanding is > that When part is never Java. > > I have a map of string and need to support the following operators: > > equal > does not equal > contains > does not contain > starts with > end with > matches Reg Ex > > I know for equal and does not equal I can do > > $map: Map( > this["Message.label"] == "iPhone" || this["Message.label"] == "iPhone" > ) > > how about other? > > thanks! > > > > > > > -- > View this message in context: > http://drools.46999.n3.nabble.com/is-the-When-part-java-tp4027582.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 Jan 8 03:28:20 2014 From: wolfgang.laun at gmail.com (Wolfgang Laun) Date: Wed, 8 Jan 2014 09:28:20 +0100 Subject: [rules-users] forall is satisfied when there is nothing? In-Reply-To: <52CCC5B1.70709@gmail.com> References: <1389087869736-4027553.post@n3.nabble.com> <52CBD88E.5070703@gmail.com> <52CCC5B1.70709@gmail.com> Message-ID: On 08/01/2014, Davide Sottara wrote: > Indeed it is true by convention, see also > http://en.wikipedia.org/wiki/Universal_quantification > > The only other alternative is to deprecate quantifiers altogether ;) > Ah, *by convention*, yes. One should exercise some care with "vacuous truths", however. Uttering statements such as "All the little green men in my room are from Mars" may not brand you as a liar, but you could be called "batty". ;-) -W > Davide > > On 01/07/2014 11:53 AM, Wolfgang Laun wrote: >> Please comment on >> http://en.wikipedia.org/wiki/First-order_logic#Empty_domains >> -W >> >> On 07/01/2014, Davide Sottara wrote: >>> First order logic does permit empty domains, and the universal >>> quantifier evaluates to true in that case. >>> Davide >>> >>> On 01/07/2014 11:11 AM, Wolfgang Laun wrote: >>>> It is true that first-order logic usually assumes that the domain of a >>>> formula >>>> be a nonempty set. As so often, things aren't quite so simple when >>>> formulae >>>> are evaluated on a computer. What should be done in this case, forall >>>> with an empty domain? Throw an exception? Not very convenient, since >>>> there's no reasonable way of handling exceptions thrown on the LHS. >>>> Return false? That doesn't make sense, because you can't inspect what >>>> isn't there. Return true? If it isn't false - what else? >>>> >>>> If first-order logic does permit empty domains, it must be treated as >>>> a special case. >>>> >>>> -W >>>> >>>> On 07/01/2014, Sonata wrote: >>>>> Hi, I am using the "forall" keyword on the LHS and it seems the >>>>> condition >>>>> is >>>>> satisfied when there is nothing to match. e.g. "forall (MyClass(value >>>>> == >>>>> "test"))" fires the rule when there is no MyClass() object in the >>>>> working >>>>> memory. My workaround is add "exists (MyClass())". >>>>> >>>>> Also, same for "not (exists (MyClass(value != "test")))", but I can >>>>> understand this, as there is no MyClass() object, it doesn't exists >>>>> and >>>>> hence "not" gives true. >>>>> >>>>> But for "forall", it doesnt sound right to me. I wonder if "forall" is >>>>> actually implemented as "not exists" in the engine. >>>>> >>>>> Please clarify if this is by design or a bug. Build is 5.5.0.Final >>>>> >>>>> Thank you >>>>> >>>>> >>>>> >>>>> -- >>>>> View this message in context: >>>>> http://drools.46999.n3.nabble.com/forall-is-satisfied-when-there-is-nothing-tp4027553.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 >>> >> _______________________________________________ >> 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 adarsh.chaini at hsbcib.com Wed Jan 8 06:10:32 2014 From: adarsh.chaini at hsbcib.com (adarsh.chaini at hsbcib.com) Date: Wed, 8 Jan 2014 11:10:32 +0000 Subject: [rules-users] Drools KB Object hierarchy Serilisation and Deserialisation thread safety issue In-Reply-To: <52B151C2.7030301@gmail.com> References: <52ACB776.1040503@gmail.com> <52B151C2.7030301@gmail.com> Message-ID: Hi , 1)Also remember that even 5.6, while a bit more robust from that perspective, is not guaranteed to be 100% thread safe. Is there any plan to make this 100% thread safe or are we saying that highly concurrent systems are better off drools?. 2)Ruleflows, however, have been informally deprecated in favor of proper bpmn business processes for a while, so not much was added there, but they should still be supported in 5.6. Is there any plan to completely remove the rule flow features in near future or later versions?.If so projects that are using rule flow features can't use new features of those later versions of the release unless they migrate to bpmn?. Thanks and regards, Adarsh CHAINI SENIOR LEAD DEVELOPMENT SPECIALIST | HSBC Bank Plc 8 Canada Square, London E14 5HQ, UK _______________________________________________ Phone Int: (0)79914720 Ext: +44 (0)20 79914720 Mobile +44(0)7595530105 Email adarsh.chaini at hsbcib.com _______________________________________________ Protect our environment - please only print this if you have to! From: Davide Sottara To: Rules Users List Date: 18/12/2013 07:42 Subject: Re: [rules-users] Drools KB Object hierarchy Serilisation and Deserialisation thread safety issue Sent by: rules-users-bounces at lists.jboss.org Adarsh, CR1 is "candidate release 1" and is available from the JBoss Maven Repositories. 5.6.0.Final will probably be released this week. There are quite a few internal differences between 5.3 and 5.6, but as far as I know the APIs have remained the same, so it should be possible to switch almost effortlessly. Others may be able to comment on their upgrade experience. Ruleflows, however, have been informally deprecated in favor of proper bpmn business processes for a while, so not much was added there, but they should still be supported in 5.6. Also remember that even 5.6, while a bit more robust from that perspective, is not guaranteed to be 100% thread safe. Davide On 12/17/2013 07:00 AM, adarsh.chaini at hsbcib.com wrote: Davide, Thanks for your reply on this.What does CR1 stands for in 5.6.0.CR1 and can someone point me to the release life cycle timelines?. Also the important aspect is are 5.6.0.CR1 and 5.5.0.Final versions backward compatible to 5.3.0.Final and fully regressed ? Is there any documentation that describes the major changes like this .We are mostly using the rule engine with the rule flow aspects of the product Thanks and regards, Adarsh CHAINI From: Davide Sottara To: rules-users at lists.jboss.org Date: 14/12/2013 19:56 Subject: Re: [rules-users] Drools KB Object hierarchy Serilisation and Deserialisation thread safety issue Sent by: rules-users-bounces at lists.jboss.org As far as I know, older versions of Drools were not guaranteed to be thread-safe, and the whole (de)serialization subsystem has been upgraded since 5.3.0.Final. Could you try a later version such as 5.5.0.Final or 5.6.0.CR1? Bugs and issues are usually reported using JIRA (community) or Bugzilla (product) You can find more information on how to report/contribute here: http://www.jboss.org/contribute or in the drools documentation, chapter 1.2 Davide On 12/13/2013 12:39 PM, adarsh.chaini at hsbcib.com wrote: Hi, We have found that some of the drools classes are not thread safe and hence causing the whole KB serialisation and deserialisation issues in a highly concurrent distributed cluster. The below is an example of one of the instances we have come across where the usage of a non thread safe collection as instance variables has caused the issue. Could someone look into this and advise: 1) If this has been reported /identified and logged somewhere as an issue already 2)If there has been any fix to problems like this in later versions of 5.3.0.Final ?. 3)If not fixed already what is the process to initiate a fix. Caused by: java.io.InvalidObjectException: Illegal mappings count: -1 at java.util.HashMap.readObject(HashMap.java:1130) at sun.reflect.GeneratedMethodAccessor4.invoke(Unknown Source) at sun.reflect.DelegatingMethodAccessorImpl.invoke( DelegatingMethodAccessorImpl.java:43) at java.lang.reflect.Method.invoke(Method.java:601) at java.io.ObjectStreamClass.invokeReadObject( ObjectStreamClass.java:1004) at java.io.ObjectInputStream.readSerialData( ObjectInputStream.java:1891) at java.io.ObjectInputStream.readOrdinaryObject( ObjectInputStream.java:1796) at java.io.ObjectInputStream.readObject0( ObjectInputStream.java:1348) at java.io.ObjectInputStream.readObject(ObjectInputStream.java:370) at org.jbpm.workflow.core.DroolsAction.readExternal( DroolsAction.java:61) at org.jbpm.workflow.core.impl.DroolsConsequenceAction.readExternal( DroolsConsequenceAction.java:49) at java.io.ObjectInputStream.readExternalData( ObjectInputStream.java:1835) at java.io.ObjectInputStream.readOrdinaryObject( ObjectInputStream.java:1794) at java.io.ObjectInputStream.readObject0( ObjectInputStream.java:1348) at java.io.ObjectInputStream.readObject(ObjectInputStream.java:370) at org.drools.rule.JavaDialectRuntimeData.readExternal( JavaDialectRuntimeData.java:182) at java.io.ObjectInputStream.readExternalData( ObjectInputStream.java:1835) at java.io.ObjectInputStream.readOrdinaryObject( ObjectInputStream.java:1794) at java.io.ObjectInputStream.readObject0( ObjectInputStream.java:1348) at java.io.ObjectInputStream.readObject(ObjectInputStream.java:370) at java.util.HashMap.readObject(HashMap.java:1155) at sun.reflect.GeneratedMethodAccessor4.invoke(Unknown Source) at sun.reflect.DelegatingMethodAccessorImpl.invoke( DelegatingMethodAccessorImpl.java:43) at java.lang.reflect.Method.invoke(Method.java:601) at java.io.ObjectStreamClass.invokeReadObject( ObjectStreamClass.java:1004) at java.io.ObjectInputStream.readSerialData( ObjectInputStream.java:1891) at java.io.ObjectInputStream.readOrdinaryObject( ObjectInputStream.java:1796) at java.io.ObjectInputStream.readObject0( ObjectInputStream.java:1348) at java.io.ObjectInputStream.readObject(ObjectInputStream.java:370) at org.drools.rule.DialectRuntimeRegistry.readExternal( DialectRuntimeRegistry.java:59) at java.io.ObjectInputStream.readExternalData( ObjectInputStream.java:1835) at java.io.ObjectInputStream.readOrdinaryObject( ObjectInputStream.java:1794) at java.io.ObjectInputStream.readObject0( ObjectInputStream.java:1348) at java.io.ObjectInputStream.readObject(ObjectInputStream.java:370) at org.drools.rule.Package.readExternal(Package.java:197) at java.io.ObjectInputStream.readExternalData( ObjectInputStream.java:1835) at java.io.ObjectInputStream.readOrdinaryObject( ObjectInputStream.java:1794) at java.io.ObjectInputStream.readObject0( ObjectInputStream.java:1348) at java.io.ObjectInputStream.readObject(ObjectInputStream.java:370) at java.util.HashMap.readObject(HashMap.java:1155) at sun.reflect.GeneratedMethodAccessor4.invoke(Unknown Source) at sun.reflect.DelegatingMethodAccessorImpl.invoke( DelegatingMethodAccessorImpl.java:43) at java.lang.reflect.Method.invoke(Method.java:601) at java.io.ObjectStreamClass.invokeReadObject( ObjectStreamClass.java:1004) at java.io.ObjectInputStream.readSerialData( ObjectInputStream.java:1891) at java.io.ObjectInputStream.readOrdinaryObject( ObjectInputStream.java:1796) at java.io.ObjectInputStream.readObject0( ObjectInputStream.java:1348) at java.io.ObjectInputStream.readObject(ObjectInputStream.java:370) at org.drools.common.AbstractRuleBase.readExternal( AbstractRuleBase.java:270) at org.drools.reteoo.ReteooRuleBase.readExternal( ReteooRuleBase.java:223) at org.drools.impl.KnowledgeBaseImpl.readExternal( KnowledgeBaseImpl.java:116) at java.io.ObjectInputStream.readExternalData( ObjectInputStream.java:1835) at java.io.ObjectInputStream.readOrdinaryObject( ObjectInputStream.java:1794) at java.io.ObjectInputStream.readObject0( ObjectInputStream.java:1348) at java.io.ObjectInputStream.readObject(ObjectInputStream.java:370) at com.hsbc.gbm.dsl.domain.DSLRuleSet$Serializer.createInstance( DSLRuleSet.java:328) at com.hsbc.gbm.dsl.domain.DSLRuleSet$Serializer.createInstance( DSLRuleSet.java:1) at com.hsbc.gbm.dsl.domain.AbstractSerializer.deserialize( AbstractSerializer.java:144) Thanks and regards, Adarsh CHAINI SENIOR LEAD DEVELOPMENT SPECIALIST | HSBC Bank Plc 8 Canada Square, London E14 5HQ, UK _______________________________________________ Phone Int: (0)79914720 Ext: +44 (0)20 79914720 Mobile +44(0)7595530105 Email adarsh.chaini at hsbcib.com _______________________________________________ Protect our environment - please only print this if you have to! ************************************************************ HSBC Bank plc may be solicited in the course of its placement efforts for a new issue, by investment clients of the firm for whom the Bank as a firm already provides other services. It may equally decide to allocate to its own proprietary book or with an associate of HSBC Group. This represents a potential conflict of interest. HSBC Bank plc has internal arrangements designed to ensure that the firm would give unbiased and full advice to the corporate finance client about the valuation and pricing of the offering as well as internal systems, controls and procedures to identify and manage conflicts of interest. HSBC Bank plc Registered Office: 8 Canada Square, London E14 5HQ, United Kingdom Registered in England - Number 14259 Authorised by the Prudential Regulation Authority and regulated by the Financial Conduct Authority and the Prudential Regulation Authority ************************************************************ ----------------------------------------- SAVE PAPER - THINK BEFORE YOU PRINT! This transmission has been issued by a member of the HSBC Group "HSBC" for the information of the addressee only and should not be reproduced and/or distributed to any other person. Each page attached hereto must be read in conjunction with any disclaimer which forms part of it. Unless otherwise stated, this transmission is neither an offer nor the solicitation of an offer to sell or purchase any investment. Its contents are based on information obtained from sources believed to be reliable but HSBC makes no representation and accepts no responsibility or liability as to its completeness or accuracy. _______________________________________________ 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 ************************************************************ HSBC Bank plc may be solicited in the course of its placement efforts for a new issue, by investment clients of the firm for whom the Bank as a firm already provides other services. It may equally decide to allocate to its own proprietary book or with an associate of HSBC Group. This represents a potential conflict of interest. HSBC Bank plc has internal arrangements designed to ensure that the firm would give unbiased and full advice to the corporate finance client about the valuation and pricing of the offering as well as internal systems, controls and procedures to identify and manage conflicts of interest. HSBC Bank plc Registered Office: 8 Canada Square, London E14 5HQ, United Kingdom Registered in England - Number 14259 Authorised by the Prudential Regulation Authority and regulated by the Financial Conduct Authority and the Prudential Regulation Authority ************************************************************ ----------------------------------------- SAVE PAPER - THINK BEFORE YOU PRINT! This transmission has been issued by a member of the HSBC Group "HSBC" for the information of the addressee only and should not be reproduced and/or distributed to any other person. Each page attached hereto must be read in conjunction with any disclaimer which forms part of it. Unless otherwise stated, this transmission is neither an offer nor the solicitation of an offer to sell or purchase any investment. Its contents are based on information obtained from sources believed to be reliable but HSBC makes no representation and accepts no responsibility or liability as to its completeness or accuracy. _______________________________________________ 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 ************************************************************ HSBC Bank plc may be solicited in the course of its placement efforts for a new issue, by investment clients of the firm for whom the Bank as a firm already provides other services. It may equally decide to allocate to its own proprietary book or with an associate of HSBC Group. This represents a potential conflict of interest. HSBC Bank plc has internal arrangements designed to ensure that the firm would give unbiased and full advice to the corporate finance client about the valuation and pricing of the offering as well as internal systems, controls and procedures to identify and manage conflicts of interest. HSBC Bank plc Registered Office: 8 Canada Square, London E14 5HQ, United Kingdom Registered in England - Number 14259 Authorised by the Prudential Regulation Authority and regulated by the Financial Conduct Authority and the Prudential Regulation Authority ************************************************************ -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.jboss.org/pipermail/rules-users/attachments/20140108/a9ead043/attachment-0001.html From plz.write.to at gmail.com Wed Jan 8 06:32:24 2014 From: plz.write.to at gmail.com (Sonata) Date: Wed, 8 Jan 2014 03:32:24 -0800 (PST) Subject: [rules-users] forall is satisfied when there is nothing? In-Reply-To: References: <1389087869736-4027553.post@n3.nabble.com> <52CBD88E.5070703@gmail.com> <52CCC5B1.70709@gmail.com> Message-ID: <1389180744685-4027593.post@n3.nabble.com> laune wrote > On 08/01/2014, Davide Sottara < > dsotty@ > > wrote: >> Indeed it is true by convention, see also >> http://en.wikipedia.org/wiki/Universal_quantification >> >> The only other alternative is to deprecate quantifiers altogether ;) >> > > Ah, *by convention*, yes. One should exercise some care with "vacuous > truths", however. Uttering statements such as "All the little green > men in my room are from Mars" may not brand you as a liar, but you > could be called "batty". ;-) > > -W > >> Davide >> Guys, I am not sure whats the arguing point here. But from a programmer's and a Drools engine user's perspective, I would find forall(void) to return false more convenient. Say for example: forall(Cloth(dried)) then collect() Programmingwise, I dont want to execute collect() when the Cloth() collection is empty and do extra null checkings. Performancewise, I also dont want to call collect() when there is actually nothing to perform. In terms of semantics, I purposely want to check for isDried is true, it is easy to realize from the LHS that I only want to collect clothes when all of them are dried, rather than I want to collect also empty air. On the contrary, if I really want to do the RHS even though the LHS has nothing, I would have written: not( exists( Customer() ) ) then takeanap() and I will not write forall( Customer(status == "gone") ) then takeanap() because the latter needs to do extra property visits and string comparisons and it is so indirect to express what I really want. I really dont care what the mathematical definition is unless you tell me Drools is a math. engine rather than a rule engine to express business requirements. That, I should update myself and take a step back to look at Drools again. Just my own opinion :P -- View this message in context: http://drools.46999.n3.nabble.com/forall-is-satisfied-when-there-is-nothing-tp4027553p4027593.html Sent from the Drools: User forum mailing list archive at Nabble.com. From dsotty at gmail.com Wed Jan 8 06:34:34 2014 From: dsotty at gmail.com (Davide Sottara) Date: Wed, 08 Jan 2014 12:34:34 +0100 Subject: [rules-users] forall is satisfied when there is nothing? In-Reply-To: References: <1389087869736-4027553.post@n3.nabble.com> <52CBD88E.5070703@gmail.com> <52CCC5B1.70709@gmail.com> Message-ID: <52CD37CA.3080700@gmail.com> Logic and common sense do not always fit well together, and that's why fallacies plague discussions and argumentations... When we say "forall..." we typically mean "forall... and exists..." and we take the latter for granted, which can't be implicitly assumed e.g. by the rule engine. Likewise, think of vacuous implications : "if donkeys could fly then (anything you want here)" these are trivially true, too.... Davide On 01/08/2014 09:28 AM, Wolfgang Laun wrote: > On 08/01/2014, Davide Sottara wrote: >> Indeed it is true by convention, see also >> http://en.wikipedia.org/wiki/Universal_quantification >> >> The only other alternative is to deprecate quantifiers altogether ;) >> > Ah, *by convention*, yes. One should exercise some care with "vacuous > truths", however. Uttering statements such as "All the little green > men in my room are from Mars" may not brand you as a liar, but you > could be called "batty". ;-) > > -W > >> Davide >> >> On 01/07/2014 11:53 AM, Wolfgang Laun wrote: >>> Please comment on >>> http://en.wikipedia.org/wiki/First-order_logic#Empty_domains >>> -W >>> >>> On 07/01/2014, Davide Sottara wrote: >>>> First order logic does permit empty domains, and the universal >>>> quantifier evaluates to true in that case. >>>> Davide >>>> >>>> On 01/07/2014 11:11 AM, Wolfgang Laun wrote: >>>>> It is true that first-order logic usually assumes that the domain of a >>>>> formula >>>>> be a nonempty set. As so often, things aren't quite so simple when >>>>> formulae >>>>> are evaluated on a computer. What should be done in this case, forall >>>>> with an empty domain? Throw an exception? Not very convenient, since >>>>> there's no reasonable way of handling exceptions thrown on the LHS. >>>>> Return false? That doesn't make sense, because you can't inspect what >>>>> isn't there. Return true? If it isn't false - what else? >>>>> >>>>> If first-order logic does permit empty domains, it must be treated as >>>>> a special case. >>>>> >>>>> -W >>>>> >>>>> On 07/01/2014, Sonata wrote: >>>>>> Hi, I am using the "forall" keyword on the LHS and it seems the >>>>>> condition >>>>>> is >>>>>> satisfied when there is nothing to match. e.g. "forall (MyClass(value >>>>>> == >>>>>> "test"))" fires the rule when there is no MyClass() object in the >>>>>> working >>>>>> memory. My workaround is add "exists (MyClass())". >>>>>> >>>>>> Also, same for "not (exists (MyClass(value != "test")))", but I can >>>>>> understand this, as there is no MyClass() object, it doesn't exists >>>>>> and >>>>>> hence "not" gives true. >>>>>> >>>>>> But for "forall", it doesnt sound right to me. I wonder if "forall" is >>>>>> actually implemented as "not exists" in the engine. >>>>>> >>>>>> Please clarify if this is by design or a bug. Build is 5.5.0.Final >>>>>> >>>>>> Thank you >>>>>> >>>>>> >>>>>> >>>>>> -- >>>>>> View this message in context: >>>>>> http://drools.46999.n3.nabble.com/forall-is-satisfied-when-there-is-nothing-tp4027553.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 >>>> >>> _______________________________________________ >>> 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 dsotty at gmail.com Wed Jan 8 06:51:53 2014 From: dsotty at gmail.com (Davide Sottara) Date: Wed, 08 Jan 2014 12:51:53 +0100 Subject: [rules-users] forall is satisfied when there is nothing? In-Reply-To: <1389180744685-4027593.post@n3.nabble.com> References: <1389087869736-4027553.post@n3.nabble.com> <52CBD88E.5070703@gmail.com> <52CCC5B1.70709@gmail.com> <1389180744685-4027593.post@n3.nabble.com> Message-ID: <52CD3BD9.6040604@gmail.com> The rule engine is still trying to approximate logic, even if not completely in a mathematical sense. One property quantifiers have to obey is DeMorgan's laws, so "forall ... " should be logically equivalent to "not exists .. such that not...", which in Drools becomes for example : forall Cloth( dry ) <-> not Cloth( ! dry ) if forall returned false on an empty set, the equivalence would no longer hold. Notice that there is a second negation inside the pattern. (btw, the "not" CE has the semantics of "not exists") This is actually the way it is implemented internally, and no, I don't think that it would be appropriate to change it. Davide On 01/08/2014 12:32 PM, Sonata wrote: > laune wrote >> On 08/01/2014, Davide Sottara < >> dsotty@ >> > wrote: >>> Indeed it is true by convention, see also >>> http://en.wikipedia.org/wiki/Universal_quantification >>> >>> The only other alternative is to deprecate quantifiers altogether ;) >>> >> Ah, *by convention*, yes. One should exercise some care with "vacuous >> truths", however. Uttering statements such as "All the little green >> men in my room are from Mars" may not brand you as a liar, but you >> could be called "batty". ;-) >> >> -W >> >>> Davide >>> > Guys, I am not sure whats the arguing point here. But from a programmer's > and a Drools engine user's perspective, I would find forall(void) to return > false more convenient. > > Say for example: > forall(Cloth(dried)) then collect() > Programmingwise, I dont want to execute collect() when the Cloth() > collection is empty and do extra null checkings. > Performancewise, I also dont want to call collect() when there is actually > nothing to perform. > In terms of semantics, I purposely want to check for isDried is true, it is > easy to realize from the LHS that I only want to collect clothes when all of > them are dried, rather than I want to collect also empty air. > > On the contrary, if I really want to do the RHS even though the LHS has > nothing, I would have written: > not( exists( Customer() ) ) then takeanap() > and I will not write > forall( Customer(status == "gone") ) then takeanap() > because the latter needs to do extra property visits and string comparisons > and it is so indirect to express what I really want. > > I really dont care what the mathematical definition is unless you tell me > Drools is a math. engine rather than a rule engine to express business > requirements. That, I should update myself and take a step back to look at > Drools again. Just my own opinion :P > > > > > -- > View this message in context: http://drools.46999.n3.nabble.com/forall-is-satisfied-when-there-is-nothing-tp4027553p4027593.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 plz.write.to at gmail.com Wed Jan 8 07:50:36 2014 From: plz.write.to at gmail.com (Sonata) Date: Wed, 8 Jan 2014 04:50:36 -0800 (PST) Subject: [rules-users] forall is satisfied when there is nothing? In-Reply-To: <52CD3BD9.6040604@gmail.com> References: <1389087869736-4027553.post@n3.nabble.com> <52CBD88E.5070703@gmail.com> <52CCC5B1.70709@gmail.com> <1389180744685-4027593.post@n3.nabble.com> <52CD3BD9.6040604@gmail.com> Message-ID: <1389185436000-4027598.post@n3.nabble.com> Davide Sottara wrote > This is actually the way it is implemented internally, and no, I don't > think that > it would be appropriate to change it. Yes I agree, so may be we users actually do not need forall, but *every*, which just means forall and exists Now, look at it again: when every Cloth( dried ) then collect() See how pretty it is, simple beauty, fully expressive, just like a sentence :) as oppose to when forall Cloth ( dried ) AND exists Cloth() then collect() X( Nah, I guess people can live with that :P -- View this message in context: http://drools.46999.n3.nabble.com/forall-is-satisfied-when-there-is-nothing-tp4027553p4027598.html Sent from the Drools: User forum mailing list archive at Nabble.com. From dsotty at gmail.com Wed Jan 8 08:17:12 2014 From: dsotty at gmail.com (Davide Sottara) Date: Wed, 08 Jan 2014 14:17:12 +0100 Subject: [rules-users] forall is satisfied when there is nothing? In-Reply-To: <1389185436000-4027598.post@n3.nabble.com> References: <1389087869736-4027553.post@n3.nabble.com> <52CBD88E.5070703@gmail.com> <52CCC5B1.70709@gmail.com> <1389180744685-4027593.post@n3.nabble.com> <52CD3BD9.6040604@gmail.com> <1389185436000-4027598.post@n3.nabble.com> Message-ID: <52CD4FD8.7000901@gmail.com> The "all and some" combination is actually quite popular and might be implemented at some point. By no means it is the only possibility to enhance the expressivity of the language: http://plato.stanford.edu/entries/generalized-quantifiers/ On 01/08/2014 01:50 PM, Sonata wrote: > Davide Sottara wrote >> This is actually the way it is implemented internally, and no, I don't >> think that >> it would be appropriate to change it. > Yes I agree, so may be we users actually do not need forall, but *every*, > which just means forall and exists > Now, look at it again: > when every Cloth( dried ) then collect() > See how pretty it is, simple beauty, fully expressive, just like a sentence > :) > as oppose to > when forall Cloth ( dried ) AND exists Cloth() then collect() X( > > Nah, I guess people can live with that :P > > > > -- > View this message in context: http://drools.46999.n3.nabble.com/forall-is-satisfied-when-there-is-nothing-tp4027553p4027598.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 Jan 8 08:40:12 2014 From: wolfgang.laun at gmail.com (Wolfgang Laun) Date: Wed, 8 Jan 2014 14:40:12 +0100 Subject: [rules-users] forall is satisfied when there is nothing? In-Reply-To: <52CD4FD8.7000901@gmail.com> References: <1389087869736-4027553.post@n3.nabble.com> <52CBD88E.5070703@gmail.com> <52CCC5B1.70709@gmail.com> <1389180744685-4027593.post@n3.nabble.com> <52CD3BD9.6040604@gmail.com> <1389185436000-4027598.post@n3.nabble.com> <52CD4FD8.7000901@gmail.com> Message-ID: If you really want to go out and collect the gladrags from the clothesline you'd have to get a grip on them, i.e., their references. And that's why, in the context presented by the OP, most applications that really mean business will write this anyway: $s: Set( size > 0 ) from collect( Cloth(dried) ) -W On 08/01/2014, Davide Sottara wrote: > The "all and some" combination is actually quite popular and might > be implemented at some point. By no means it is the only possibility > to enhance the expressivity of the language: > http://plato.stanford.edu/entries/generalized-quantifiers/ > > > On 01/08/2014 01:50 PM, Sonata wrote: >> Davide Sottara wrote >>> This is actually the way it is implemented internally, and no, I don't >>> think that >>> it would be appropriate to change it. >> Yes I agree, so may be we users actually do not need forall, but *every*, >> which just means forall and exists >> Now, look at it again: >> when every Cloth( dried ) then collect() >> See how pretty it is, simple beauty, fully expressive, just like a >> sentence >> :) >> as oppose to >> when forall Cloth ( dried ) AND exists Cloth() then collect() X( >> >> Nah, I guess people can live with that :P >> >> >> >> -- >> View this message in context: >> http://drools.46999.n3.nabble.com/forall-is-satisfied-when-there-is-nothing-tp4027553p4027598.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 abhinay_agarwal at infosys.com Wed Jan 8 09:28:55 2014 From: abhinay_agarwal at infosys.com (abhinay_agarwal) Date: Wed, 8 Jan 2014 06:28:55 -0800 (PST) Subject: [rules-users] Using Advanced Enumeration Concepts in guvnor In-Reply-To: <4E901C4F-BA87-4DDA-8915-DBE16A43EE9B@me.com> References: <1389101450752-4027563.post@n3.nabble.com> <4E901C4F-BA87-4DDA-8915-DBE16A43EE9B@me.com> Message-ID: <1389191335932-4027601.post@n3.nabble.com> Hi Stephen, One quick question, what is the best approach to add these java classes into guvnor. I am able to work it out by adding the class files into the WEB-INF/classes folder. Is there any other easy way out, because I will be adding a lot of files. The properties file, if used, should also be placed inside the war ? It that practically correct ? N.B. I have practically no idea how Maven Shade plugin works. Regards, Abhinay -- View this message in context: http://drools.46999.n3.nabble.com/Using-Advanced-Enumeration-Concepts-in-guvnor-tp4027563p4027601.html Sent from the Drools: User forum mailing list archive at Nabble.com. From mproctor at codehaus.org Wed Jan 8 09:49:10 2014 From: mproctor at codehaus.org (Mark Proctor) Date: Wed, 8 Jan 2014 14:49:10 +0000 Subject: [rules-users] forall is satisfied when there is nothing? In-Reply-To: <1389180744685-4027593.post@n3.nabble.com> References: <1389087869736-4027553.post@n3.nabble.com> <52CBD88E.5070703@gmail.com> <52CCC5B1.70709@gmail.com> <1389180744685-4027593.post@n3.nabble.com> Message-ID: forall is implemented as two notes, see the Clips documentation here. In reality it is just a bit of sugar for those two notes. You might be able to achieve what you want, with your own combination of nots. http://www.csie.ntu.edu.tw/~sylee/courses/clips/bpg/node5.4.7.html Mark On 8 Jan 2014, at 11:32, Sonata wrote: > laune wrote >> On 08/01/2014, Davide Sottara < > >> dsotty@ > >> > wrote: >>> Indeed it is true by convention, see also >>> http://en.wikipedia.org/wiki/Universal_quantification >>> >>> The only other alternative is to deprecate quantifiers altogether ;) >>> >> >> Ah, *by convention*, yes. One should exercise some care with "vacuous >> truths", however. Uttering statements such as "All the little green >> men in my room are from Mars" may not brand you as a liar, but you >> could be called "batty". ;-) >> >> -W >> >>> Davide >>> > > Guys, I am not sure whats the arguing point here. But from a programmer's > and a Drools engine user's perspective, I would find forall(void) to return > false more convenient. > > Say for example: > forall(Cloth(dried)) then collect() > Programmingwise, I dont want to execute collect() when the Cloth() > collection is empty and do extra null checkings. > Performancewise, I also dont want to call collect() when there is actually > nothing to perform. > In terms of semantics, I purposely want to check for isDried is true, it is > easy to realize from the LHS that I only want to collect clothes when all of > them are dried, rather than I want to collect also empty air. > > On the contrary, if I really want to do the RHS even though the LHS has > nothing, I would have written: > not( exists( Customer() ) ) then takeanap() > and I will not write > forall( Customer(status == "gone") ) then takeanap() > because the latter needs to do extra property visits and string comparisons > and it is so indirect to express what I really want. > > I really dont care what the mathematical definition is unless you tell me > Drools is a math. engine rather than a rule engine to express business > requirements. That, I should update myself and take a step back to look at > Drools again. Just my own opinion :P > > > > > -- > View this message in context: http://drools.46999.n3.nabble.com/forall-is-satisfied-when-there-is-nothing-tp4027553p4027593.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 abhijeet.b.patil at jpmorgan.com Wed Jan 8 10:14:55 2014 From: abhijeet.b.patil at jpmorgan.com (Avin) Date: Wed, 8 Jan 2014 07:14:55 -0800 (PST) Subject: [rules-users] Drools conddition fails if I use HashMap to check objects Message-ID: <1389194095264-4027603.post@n3.nabble.com> Hi, I have a rule written which compare objects with objects present in HashMap and if object is found then clause gets executed. I am able to wite the conditions for comparing with HashMap but if I add any assign any value from the fact object before comparison then my conditions fail to evaluate and my then clause runs for all the objects Below is the code rule "rule 1" when //$factData: ConcentrationDataTable() this line makes rule fail TempStorage($mapObject : concPercentRefObjects) ConcentrationDataTable($concPercentage : concPercentage) $referenceData : ConcentrationDataTable($keyObject : concPercentRefkey) eval( $mapObject.get($keyObject) != null ) and eval($concPercentage > (((ConcPercentRef)$mapObject.get($keyObject)).getPercent())) then System.out.println("Rule 222 executed "+ " condition "+$factData + " reference value "+$mapObject.get($keyObject) ); //filteredDataList.add($factData); I require this object(fact object) to be stored in list for further process end *Results * Rule 222 executed condition 1424975 1424975 key value value 1424975 Rule 222 executed condition 14249751 14249751 key value 1424975 -- failed result should not have got printed -- View this message in context: http://drools.46999.n3.nabble.com/Drools-conddition-fails-if-I-use-HashMap-to-check-objects-tp4027603.html Sent from the Drools: User forum mailing list archive at Nabble.com. From mproctor at codehaus.org Wed Jan 8 10:21:47 2014 From: mproctor at codehaus.org (Mark Proctor) Date: Wed, 8 Jan 2014 15:21:47 +0000 Subject: [rules-users] forall is satisfied when there is nothing? In-Reply-To: References: <1389087869736-4027553.post@n3.nabble.com> <52CBD88E.5070703@gmail.com> <52CCC5B1.70709@gmail.com> <1389180744685-4027593.post@n3.nabble.com> Message-ID: sorry auto correct issue - two not nodes. I incorrectly wrote ?two notes?. Mark On 8 Jan 2014, at 14:49, Mark Proctor wrote: > forall is implemented as two notes, see the Clips documentation here. In reality it is just a bit of sugar for those two notes. You might be able to achieve what you want, with your own combination of nots. > http://www.csie.ntu.edu.tw/~sylee/courses/clips/bpg/node5.4.7.html > > Mark > > On 8 Jan 2014, at 11:32, Sonata wrote: > >> laune wrote >>> On 08/01/2014, Davide Sottara < >> >>> dsotty@ >> >>> > wrote: >>>> Indeed it is true by convention, see also >>>> http://en.wikipedia.org/wiki/Universal_quantification >>>> >>>> The only other alternative is to deprecate quantifiers altogether ;) >>>> >>> >>> Ah, *by convention*, yes. One should exercise some care with "vacuous >>> truths", however. Uttering statements such as "All the little green >>> men in my room are from Mars" may not brand you as a liar, but you >>> could be called "batty". ;-) >>> >>> -W >>> >>>> Davide >>>> >> >> Guys, I am not sure whats the arguing point here. But from a programmer's >> and a Drools engine user's perspective, I would find forall(void) to return >> false more convenient. >> >> Say for example: >> forall(Cloth(dried)) then collect() >> Programmingwise, I dont want to execute collect() when the Cloth() >> collection is empty and do extra null checkings. >> Performancewise, I also dont want to call collect() when there is actually >> nothing to perform. >> In terms of semantics, I purposely want to check for isDried is true, it is >> easy to realize from the LHS that I only want to collect clothes when all of >> them are dried, rather than I want to collect also empty air. >> >> On the contrary, if I really want to do the RHS even though the LHS has >> nothing, I would have written: >> not( exists( Customer() ) ) then takeanap() >> and I will not write >> forall( Customer(status == "gone") ) then takeanap() >> because the latter needs to do extra property visits and string comparisons >> and it is so indirect to express what I really want. >> >> I really dont care what the mathematical definition is unless you tell me >> Drools is a math. engine rather than a rule engine to express business >> requirements. That, I should update myself and take a step back to look at >> Drools again. Just my own opinion :P >> >> >> >> >> -- >> View this message in context: http://drools.46999.n3.nabble.com/forall-is-satisfied-when-there-is-nothing-tp4027553p4027593.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 abhinay_agarwal at infosys.com Wed Jan 8 10:33:15 2014 From: abhinay_agarwal at infosys.com (abhinay_agarwal) Date: Wed, 8 Jan 2014 07:33:15 -0800 (PST) Subject: [rules-users] Using Advanced Enumeration Concepts in guvnor In-Reply-To: References: <1389101450752-4027563.post@n3.nabble.com> Message-ID: <1389195195603-4027605.post@n3.nabble.com> Hi Mantis, Can't I establish a database connection for enumerations and authentication in guvnor, without making any code change in the war ? Because, code change always makes the application less stable and is less preferred. So, it would be great if these functionality are provided before hand by drools. :) Regards, Abhinay -- View this message in context: http://drools.46999.n3.nabble.com/Using-Advanced-Enumeration-Concepts-in-guvnor-tp4027563p4027605.html Sent from the Drools: User forum mailing list archive at Nabble.com. From stephen.masters at me.com Wed Jan 8 10:52:27 2014 From: stephen.masters at me.com (Stephen Masters) Date: Wed, 08 Jan 2014 15:52:27 +0000 Subject: [rules-users] Using Advanced Enumeration Concepts in guvnor In-Reply-To: <1389191335932-4027601.post@n3.nabble.com> References: <1389101450752-4027563.post@n3.nabble.com> <4E901C4F-BA87-4DDA-8915-DBE16A43EE9B@me.com> <1389191335932-4027601.post@n3.nabble.com> Message-ID: <8BF08CB7-6256-48D4-83B4-F67DFD4B655B@me.com> The Maven Shade plugin is relatively simple to use. Below is the XML in my pom.xml. Basically, it finds all of the jars which are required by your project and bundles all of the classes (and other resources) from them into a single big fat jar. This means that keeping track of what you have added to the Guvnor class path is much simpler. You then put the shaded jar in the WEB-INF/lib folder inside the exploded Guvnor WAR and restart Guvnor. org.apache.maven.plugins maven-shade-plugin 1.4 package shade META-INF/spring.handlers META-INF/spring.schemas *:* META-INF/*.SF META-INF/*.DSA META-INF/*.RSA On 8 Jan 2014, at 14:28, abhinay_agarwal wrote: > Hi Stephen, > > One quick question, what is the best approach to add these java classes into > guvnor. I am able to work it out by adding the class files into the > WEB-INF/classes folder. Is there any other easy way out, because I will be > adding a lot of files. The properties file, if used, should also be placed > inside the war ? It that practically correct ? > > N.B. I have practically no idea how Maven Shade plugin works. > > Regards, > Abhinay > > > > -- > View this message in context: http://drools.46999.n3.nabble.com/Using-Advanced-Enumeration-Concepts-in-guvnor-tp4027563p4027601.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 roman.jesus at wanadoo.es Wed Jan 8 10:58:52 2014 From: roman.jesus at wanadoo.es (jroman) Date: Wed, 8 Jan 2014 07:58:52 -0800 (PST) Subject: [rules-users] Drools 6.0.1 xstream marshaling via camel config not working Message-ID: <1389196732604-4027607.post@n3.nabble.com> Hi all, I am not sure if I have met a bug in kie-camel-xstream marshalling (drools 6.0.1). The use case is: Java client: MiniRESTClient.java - Build a list of commands, group them under a BatchExecutionCommand and send them to a camel route. Camel route: camel-client.xml - Marshal the commad, send it to a drools server and unmarshal the result. The problem is that the marshalling part seams to fail with: It seams that the xstream marshaler is building a java.util.ArrayList instead of the expected org.apache.cxf.message.MessageContentsList The funny thing is that, if I explicitly do the marshaling in the java client with: And remove the from the policy definition no exception is thrown and the client-server communication works as expected. Besides, I have the reverse policy in the server side and there is no problem there. Am I doing something wrong? I think I have attached everything needed to test the case: my_tests.zip Thanks for reading down to here and for any help you could provide. ----- -- jroman -- View this message in context: http://drools.46999.n3.nabble.com/Drools-6-0-1-xstream-marshaling-via-camel-config-not-working-tp4027607.html Sent from the Drools: User forum mailing list archive at Nabble.com. From stephen.masters at me.com Wed Jan 8 10:58:51 2014 From: stephen.masters at me.com (Stephen Masters) Date: Wed, 08 Jan 2014 15:58:51 +0000 Subject: [rules-users] Using Advanced Enumeration Concepts in guvnor In-Reply-To: <8BF08CB7-6256-48D4-83B4-F67DFD4B655B@me.com> References: <1389101450752-4027563.post@n3.nabble.com> <4E901C4F-BA87-4DDA-8915-DBE16A43EE9B@me.com> <1389191335932-4027601.post@n3.nabble.com> <8BF08CB7-6256-48D4-83B4-F67DFD4B655B@me.com> Message-ID: <659A4380-7D78-4BBB-8120-BBA97CF8C2FB@me.com> btw - I keep properties files in a ?conf? folder at the root of my tomcat instance. my-tomcat-instance conf my-props.properties webapps guvnor This way, my properties stay the same between deployments of updated code. On 8 Jan 2014, at 15:52, Stephen Masters wrote: > The Maven Shade plugin is relatively simple to use. Below is the XML in my pom.xml. Basically, it finds all of the jars which are required by your project and bundles all of the classes (and other resources) from them into a single big fat jar. This means that keeping track of what you have added to the Guvnor class path is much simpler. > > You then put the shaded jar in the WEB-INF/lib folder inside the exploded Guvnor WAR and restart Guvnor. > > > org.apache.maven.plugins > maven-shade-plugin > 1.4 > > > package > > shade > > > > implementation="org.apache.maven.plugins.shade.resource.AppendingTransformer"> > META-INF/spring.handlers > > implementation="org.apache.maven.plugins.shade.resource.AppendingTransformer"> > META-INF/spring.schemas > > > > > *:* > > META-INF/*.SF > META-INF/*.DSA > META-INF/*.RSA > > > > > > > > > > > On 8 Jan 2014, at 14:28, abhinay_agarwal wrote: > >> Hi Stephen, >> >> One quick question, what is the best approach to add these java classes into >> guvnor. I am able to work it out by adding the class files into the >> WEB-INF/classes folder. Is there any other easy way out, because I will be >> adding a lot of files. The properties file, if used, should also be placed >> inside the war ? It that practically correct ? >> >> N.B. I have practically no idea how Maven Shade plugin works. >> >> Regards, >> Abhinay >> >> >> >> -- >> View this message in context: http://drools.46999.n3.nabble.com/Using-Advanced-Enumeration-Concepts-in-guvnor-tp4027563p4027601.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 ray.hooker at me.com Wed Jan 8 11:35:16 2014 From: ray.hooker at me.com (Ray Hooker) Date: Wed, 08 Jan 2014 11:35:16 -0500 Subject: [rules-users] Kie and Guvnor 6.0 In-Reply-To: References: <5C03BAFE-0504-42CA-B31D-3BF5EA6DA4CE@me.com> <0EEDE22A-6162-46DF-80BA-74AA3FB4F75C@me.com> Message-ID: <8926A145-C5C5-4CB1-A077-994D48FD7B56@me.com> Mark, That makes sense. I added java.util.ArrayList and even saved it. I had to shutdown and restart though to get it to pop up in the Data Modeler as an option for field type. Is there a better way to refresh the list? Ray On Jan 7, 2014, at 9:40 PM, Mark Proctor wrote: > If you configure the imports, for the project, then those types become available. > > Mark > On 8 Jan 2014, at 01:32, Ray Hooker wrote: > >> Thanks for the pointer on the docs. BTW have you seen a way to utilize more than primitive types in the Data modeler? I see where I can specify models I have already created but what about other classes such as ArrayList, etc? This is needed for one-to-many relationships between facts. For example, I have an existing model where patients have multiple medication records. I can write rules to deal with this manually (e.g., using the ?from? keyword), but can I use Guvnor to specify the model as it really exists?.. which is an ArrayList type Medication? >> >> Ray >> On Jan 7, 2014, at 5:42 AM, Alexandre Porcelli wrote: >> >>> Hi, >>> >>> Here are the docs available for new Workbench: http://docs.jboss.org/drools/release/6.0.1.Final/drools-docs/html/wb.Workbench.html >>> >>> Regards, >>> --- >>> Alexandre Porcelli >>> Principal Software Engineer >>> Red Hat Business Systems and Intelligence Group >>> >>> On Jan 7, 2014, at 3:02 AM, Ray Hooker wrote: >>> >>>> I have installed and worked with the new Guvnor interface. I am not sure how to interface with it. >>>> >>>> This may be a basic question, but I have not seen documentation of how Guvnor works exactly in version 6.0. I see that it uses a git repository and maven server, but I do not see where it actually resides or how I can access it? I need info like port, protocol, file location or something specific. I have tried to example the installation but am not sure the details. Certainly there is not a configuration panel that might indicate configured port for the maven repository, etc. A network diagram would be helpful. >>>> >>>> It is possible that I need to access the git repository or the Maven repository using Kie specific classes and functionality but then I would assume I need to give it the url/ web address of the Guvnor and way to configure that. >>>> >>>> >>>> Ray >>>> _______________________________________________ >>>> 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 From mproctor at codehaus.org Wed Jan 8 11:58:23 2014 From: mproctor at codehaus.org (Mark Proctor) Date: Wed, 8 Jan 2014 16:58:23 +0000 Subject: [rules-users] Kie and Guvnor 6.0 In-Reply-To: <8926A145-C5C5-4CB1-A077-994D48FD7B56@me.com> References: <5C03BAFE-0504-42CA-B31D-3BF5EA6DA4CE@me.com> <0EEDE22A-6162-46DF-80BA-74AA3FB4F75C@me.com> <8926A145-C5C5-4CB1-A077-994D48FD7B56@me.com> Message-ID: <5ADD88BD-0278-4243-B9DA-5EB463FA51F8@codehaus.org> On 8 Jan 2014, at 16:35, Ray Hooker wrote: > Mark, That makes sense. I added java.util.ArrayList and even saved it. I had to shutdown and restart though to get it to pop up in the Data Modeler as an option for field type. Is there a better way to refresh the list? That doesn?t sounds good. I?ve cc?d in the author, to get more details. Mark > > Ray > > > On Jan 7, 2014, at 9:40 PM, Mark Proctor wrote: > >> If you configure the imports, for the project, then those types become available. >> >> Mark >> On 8 Jan 2014, at 01:32, Ray Hooker wrote: >> >>> Thanks for the pointer on the docs. BTW have you seen a way to utilize more than primitive types in the Data modeler? I see where I can specify models I have already created but what about other classes such as ArrayList, etc? This is needed for one-to-many relationships between facts. For example, I have an existing model where patients have multiple medication records. I can write rules to deal with this manually (e.g., using the ?from? keyword), but can I use Guvnor to specify the model as it really exists?.. which is an ArrayList type Medication? >>> >>> Ray >>> On Jan 7, 2014, at 5:42 AM, Alexandre Porcelli wrote: >>> >>>> Hi, >>>> >>>> Here are the docs available for new Workbench: http://docs.jboss.org/drools/release/6.0.1.Final/drools-docs/html/wb.Workbench.html >>>> >>>> Regards, >>>> --- >>>> Alexandre Porcelli >>>> Principal Software Engineer >>>> Red Hat Business Systems and Intelligence Group >>>> >>>> On Jan 7, 2014, at 3:02 AM, Ray Hooker wrote: >>>> >>>>> I have installed and worked with the new Guvnor interface. I am not sure how to interface with it. >>>>> >>>>> This may be a basic question, but I have not seen documentation of how Guvnor works exactly in version 6.0. I see that it uses a git repository and maven server, but I do not see where it actually resides or how I can access it? I need info like port, protocol, file location or something specific. I have tried to example the installation but am not sure the details. Certainly there is not a configuration panel that might indicate configured port for the maven repository, etc. A network diagram would be helpful. >>>>> >>>>> It is possible that I need to access the git repository or the Maven repository using Kie specific classes and functionality but then I would assume I need to give it the url/ web address of the Guvnor and way to configure that. >>>>> >>>>> >>>>> Ray >>>>> _______________________________________________ >>>>> 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 From michael.anstis at gmail.com Wed Jan 8 12:25:02 2014 From: michael.anstis at gmail.com (Michael Anstis) Date: Wed, 8 Jan 2014 17:25:02 +0000 Subject: [rules-users] Kie and Guvnor 6.0 In-Reply-To: <5ADD88BD-0278-4243-B9DA-5EB463FA51F8@codehaus.org> References: <5C03BAFE-0504-42CA-B31D-3BF5EA6DA4CE@me.com> <0EEDE22A-6162-46DF-80BA-74AA3FB4F75C@me.com> <8926A145-C5C5-4CB1-A077-994D48FD7B56@me.com> <5ADD88BD-0278-4243-B9DA-5EB463FA51F8@codehaus.org> Message-ID: Data Modeller will cache the project level meta data for types etc. You could try closing the Data Modeller and re-opening. There was a bug too (I think fixed in the latest release) that would require a restart but can be worked around by saving the pom.xml (e.g. change project description). Sent on the move On 8 Jan 2014 16:58, "Mark Proctor" wrote: > > On 8 Jan 2014, at 16:35, Ray Hooker wrote: > > > Mark, That makes sense. I added java.util.ArrayList and even saved > it. I had to shutdown and restart though to get it to pop up in the Data > Modeler as an option for field type. Is there a better way to refresh the > list? > That doesn?t sounds good. I?ve cc?d in the author, to get more details. > > Mark > > > > Ray > > > > > > On Jan 7, 2014, at 9:40 PM, Mark Proctor wrote: > > > >> If you configure the imports, for the project, then those types become > available. > >> > >> Mark > >> On 8 Jan 2014, at 01:32, Ray Hooker wrote: > >> > >>> Thanks for the pointer on the docs. BTW have you seen a way to > utilize more than primitive types in the Data modeler? I see where I can > specify models I have already created but what about other classes such as > ArrayList, etc? This is needed for one-to-many relationships between > facts. For example, I have an existing model where patients have multiple > medication records. I can write rules to deal with this manually (e.g., > using the ?from? keyword), but can I use Guvnor to specify the model as it > really exists?.. which is an ArrayList type Medication? > >>> > >>> Ray > >>> On Jan 7, 2014, at 5:42 AM, Alexandre Porcelli > wrote: > >>> > >>>> Hi, > >>>> > >>>> Here are the docs available for new Workbench: > http://docs.jboss.org/drools/release/6.0.1.Final/drools-docs/html/wb.Workbench.html > >>>> > >>>> Regards, > >>>> --- > >>>> Alexandre Porcelli > >>>> Principal Software Engineer > >>>> Red Hat Business Systems and Intelligence Group > >>>> > >>>> On Jan 7, 2014, at 3:02 AM, Ray Hooker wrote: > >>>> > >>>>> I have installed and worked with the new Guvnor interface. I am not > sure how to interface with it. > >>>>> > >>>>> This may be a basic question, but I have not seen documentation of > how Guvnor works exactly in version 6.0. I see that it uses a git > repository and maven server, but I do not see where it actually resides or > how I can access it? I need info like port, protocol, file location or > something specific. I have tried to example the installation but am not > sure the details. Certainly there is not a configuration panel that might > indicate configured port for the maven repository, etc. A network diagram > would be helpful. > >>>>> > >>>>> It is possible that I need to access the git repository or the Maven > repository using Kie specific classes and functionality but then I would > assume I need to give it the url/ web address of the Guvnor and way to > configure that. > >>>>> > >>>>> > >>>>> Ray > >>>>> _______________________________________________ > >>>>> 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/20140108/16dbb325/attachment.html From michael.anstis at gmail.com Wed Jan 8 12:29:18 2014 From: michael.anstis at gmail.com (Michael Anstis) Date: Wed, 8 Jan 2014 17:29:18 +0000 Subject: [rules-users] Using Advanced Enumeration Concepts in guvnor In-Reply-To: <1389195195603-4027605.post@n3.nabble.com> References: <1389101450752-4027563.post@n3.nabble.com> <1389195195603-4027605.post@n3.nabble.com> Message-ID: Your helper class can be in a JAR in the web-containers classpath (I.e. /lib). No need to change the WAR. Guvnor does not use a database and has no notion of a database connection. Guvnor uses JCR (for Guvnor 5.5 and lower). Your helper class/JAR would need to handle all connectivity to perform what you need. Sent on the move On 8 Jan 2014 15:33, "abhinay_agarwal" wrote: > Hi Mantis, > > Can't I establish a database connection for enumerations and authentication > in guvnor, without making any code change in the war ? > > Because, code change always makes the application less stable and is less > preferred. So, it would be great if these functionality are provided before > hand by drools. :) > > Regards, > Abhinay > > > > -- > View this message in context: > http://drools.46999.n3.nabble.com/Using-Advanced-Enumeration-Concepts-in-guvnor-tp4027563p4027605.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/20140108/0051679b/attachment.html From mproctor at codehaus.org Wed Jan 8 14:30:32 2014 From: mproctor at codehaus.org (Mark Proctor) Date: Wed, 8 Jan 2014 19:30:32 +0000 Subject: [rules-users] Drools 6.0.1 xstream marshaling via camel config not working In-Reply-To: <1389196732604-4027607.post@n3.nabble.com> References: <1389196732604-4027607.post@n3.nabble.com> Message-ID: <6C10CBFA-4421-4FC3-8EFA-DD35A65B6D71@codehaus.org> you have your marshal and unmarshal the wrong way around. Please follow the example application: https://github.com/droolsjbpm/droolsjbpm-integration/blob/master/drools-camel-server-example/src/main/resources/camel-server.xml https://github.com/droolsjbpm/droolsjbpm-integration/blob/master/drools-camel-server-example/src/main/resources/knowledge-services.xml Mark On 8 Jan 2014, at 15:58, jroman wrote: > Hi all, > > I am not sure if I have met a bug in kie-camel-xstream marshalling (drools > 6.0.1). The use case is: > > Java client: MiniRESTClient.java > - Build a list of commands, group them under a BatchExecutionCommand and > send them to a camel route. > > Camel route: camel-client.xml > - Marshal the commad, send it to a drools server and unmarshal the result. > > > The problem is that the marshalling part seams to fail with: > > > It seams that the xstream marshaler is building a java.util.ArrayList > instead of the expected org.apache.cxf.message.MessageContentsList > > The funny thing is that, if I explicitly do the marshaling in the java > client with: > > > > And remove the > > from the policy definition no exception is thrown and the client-server > communication works as expected. Besides, I have the reverse policy in the > server side and there is no problem there. > > Am I doing something wrong? > > I think I have attached everything needed to test the case: my_tests.zip > > > Thanks for reading down to here and for any help you could provide. > > > > > ----- > -- > jroman > -- > View this message in context: http://drools.46999.n3.nabble.com/Drools-6-0-1-xstream-marshaling-via-camel-config-not-working-tp4027607.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 Wed Jan 8 14:39:37 2014 From: mproctor at codehaus.org (Mark Proctor) Date: Wed, 8 Jan 2014 19:39:37 +0000 Subject: [rules-users] Drools 6.0.1 xstream marshaling via camel config not working In-Reply-To: <6C10CBFA-4421-4FC3-8EFA-DD35A65B6D71@codehaus.org> References: <1389196732604-4027607.post@n3.nabble.com> <6C10CBFA-4421-4FC3-8EFA-DD35A65B6D71@codehaus.org> Message-ID: <3A4726CD-1ED9-4677-BD5D-16994D2F9263@codehaus.org> Sorry ignore, I just looked at your example more. Realised you are trying to do something slightly different. It?s not obvious what the problem us, as none of us are Camel experts. Maybe someone else can help? Mark On 8 Jan 2014, at 19:30, Mark Proctor wrote: > you have your marshal and unmarshal the wrong way around. Please follow the example application: > https://github.com/droolsjbpm/droolsjbpm-integration/blob/master/drools-camel-server-example/src/main/resources/camel-server.xml > https://github.com/droolsjbpm/droolsjbpm-integration/blob/master/drools-camel-server-example/src/main/resources/knowledge-services.xml > > Mark > > On 8 Jan 2014, at 15:58, jroman wrote: > >> Hi all, >> >> I am not sure if I have met a bug in kie-camel-xstream marshalling (drools >> 6.0.1). The use case is: >> >> Java client: MiniRESTClient.java >> - Build a list of commands, group them under a BatchExecutionCommand and >> send them to a camel route. >> >> Camel route: camel-client.xml >> - Marshal the commad, send it to a drools server and unmarshal the result. >> >> >> The problem is that the marshalling part seams to fail with: >> >> >> It seams that the xstream marshaler is building a java.util.ArrayList >> instead of the expected org.apache.cxf.message.MessageContentsList >> >> The funny thing is that, if I explicitly do the marshaling in the java >> client with: >> >> >> >> And remove the >> >> from the policy definition no exception is thrown and the client-server >> communication works as expected. Besides, I have the reverse policy in the >> server side and there is no problem there. >> >> Am I doing something wrong? >> >> I think I have attached everything needed to test the case: my_tests.zip >> >> >> Thanks for reading down to here and for any help you could provide. >> >> >> >> >> ----- >> -- >> jroman >> -- >> View this message in context: http://drools.46999.n3.nabble.com/Drools-6-0-1-xstream-marshaling-via-camel-config-not-working-tp4027607.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 Wed Jan 8 18:06:27 2014 From: mproctor at codehaus.org (Mark Proctor) Date: Wed, 8 Jan 2014 23:06:27 +0000 Subject: [rules-users] Drools 6.0.1 xstream marshaling via camel config not working In-Reply-To: <6C10CBFA-4421-4FC3-8EFA-DD35A65B6D71@codehaus.org> References: <1389196732604-4027607.post@n3.nabble.com> <6C10CBFA-4421-4FC3-8EFA-DD35A65B6D71@codehaus.org> Message-ID: this example has both client and server components: https://github.com/droolsjbpm/droolsjbpm-integration/tree/master/drools-camel-server-example I?d start with that, as we know that works. Maybe with a very minimal tweak to that example, you can demonstrate your problem? Mark On 8 Jan 2014, at 19:30, Mark Proctor wrote: > you have your marshal and unmarshal the wrong way around. Please follow the example application: > https://github.com/droolsjbpm/droolsjbpm-integration/blob/master/drools-camel-server-example/src/main/resources/camel-server.xml > https://github.com/droolsjbpm/droolsjbpm-integration/blob/master/drools-camel-server-example/src/main/resources/knowledge-services.xml > > Mark > > On 8 Jan 2014, at 15:58, jroman wrote: > >> Hi all, >> >> I am not sure if I have met a bug in kie-camel-xstream marshalling (drools >> 6.0.1). The use case is: >> >> Java client: MiniRESTClient.java >> - Build a list of commands, group them under a BatchExecutionCommand and >> send them to a camel route. >> >> Camel route: camel-client.xml >> - Marshal the commad, send it to a drools server and unmarshal the result. >> >> >> The problem is that the marshalling part seams to fail with: >> >> >> It seams that the xstream marshaler is building a java.util.ArrayList >> instead of the expected org.apache.cxf.message.MessageContentsList >> >> The funny thing is that, if I explicitly do the marshaling in the java >> client with: >> >> >> >> And remove the >> >> from the policy definition no exception is thrown and the client-server >> communication works as expected. Besides, I have the reverse policy in the >> server side and there is no problem there. >> >> Am I doing something wrong? >> >> I think I have attached everything needed to test the case: my_tests.zip >> >> >> Thanks for reading down to here and for any help you could provide. >> >> >> >> >> ----- >> -- >> jroman >> -- >> View this message in context: http://drools.46999.n3.nabble.com/Drools-6-0-1-xstream-marshaling-via-camel-config-not-working-tp4027607.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 ray.hooker at me.com Wed Jan 8 22:36:05 2014 From: ray.hooker at me.com (Ray Hooker) Date: Wed, 08 Jan 2014 22:36:05 -0500 Subject: [rules-users] Facts - One to Many In-Reply-To: References: Message-ID: <29FC23A0-44FF-4FF3-A4EB-F8B2F531543F@me.com> Wolfgang, Thanks. That works nicely. I do have a followup question. I wrote the following query: rule "Find patient taking Atorvastin (Lipitor)" dialect "mvel" when $p: PatientRecord($meds: medications) MedicationRecord(getCode("RxNorm").contains("617314")) from $meds then System.out.println("Found a patient taking Lipitor: "+$p.medical_record_number); results.addResult(new Result("test",$p.medical_record_number,"Found Patient Taking Lipitor","now")); end The problem is that a patient record may have multiple times where this was prescribed. How would I change the query so that it does not repeat the find so that it is logically: ?If the patient ever took Lipitor? or if there is any record of the patient taking Lipitor then flag then?? instead of flagging for each hit?? So it only flags a patient with at least one medication record indicating Lipitor? Thanks, Ray On Jan 2, 2014, at 12:36 PM, Wolfgang Laun wrote: > As you describe it, here's the way to refer to a particular medication: > > Patient( $meds: medications ) > Medication( drugCode == "55749-003-01" ) from $meds > > This rule determines whether the patient has this particular > medication. There are other operators that might be useful: > > Medication( drugCode str[startsWith] "55749-003" ) from $meds > > Inserting the Medication objects with a backlink to the Patient can > simplify rule evaluation, which may depend on the number and > complexity of the rules. Compare: > > Patient( $meds: medications ) > Medication( drugCode == "55749-003-01" ) from $meds > Medication( drugCode == "55799-565-01" ) from $meds > > with > > $p: Patient() > Medication( drugCode == "55749-003-01", patient == $p ) > Medication( drugCode == "55799-565-01", patient == $p ) > > Much depends on the number of facts you'll need to process. > > To answer your question, "Takes" was a class name I invented to refer > to the relation as an object, and "this" is Java's "this", referring > to the matching object. > > -W > > > On 02/01/2014, Ray Hooker wrote: >> Wolfgang, So in your case you were envisioning the possibility of a Takes >> object that matched between a particular medication and the patient. >> Actually we are fairly close in the case of medications. >> >> As you probably know MongoDB allows for documents. In this case, the >> patient?s document contains subdocuments. In the case of medications, this >> semantically means ?as of the date of this patient document, the patient is >> taking the following medicine listed by the applicable code and text >> description?. >> >> When read from the DB, you actually have a Java object Patient (or ?Record?) >> that has a method ?medications? that returns a set of ?Medication? objects. >> The parent knows about the medication through the set ?medications?. I >> certainly could assert each patient/ record and for each of those assert >> each subdocument, inserting a key back to the parent. >> >> So the rule would need to identify, for example, any case where a particular >> had a medication object where the drug code matched a particular code or set >> of codes. >> >> Any suggestions are appreciated. Also in the example below, is ?Takes? a >> function and what does ?this? refer to? >> >> Thanks, >> >> Ray >> On Jan 2, 2014, at 2:01 AM, Wolfgang Laun wrote: >> >>> Ideally, a relation is represented by separate objects. Then you might >>> have >>> a rule >>> >>> $p: Patient() >>> $p: Takes( patient == $p, $m: medication ) >>> Medication( this == $m ) >>> >>> and this rule will fire for each medication of the patient. >>> >>> Answering such questions without details about the actual data model >>> is impossible. >>> >>> -W >>> >>> On 02/01/2014, Ray Hooker wrote: >>>> I am trying to figure out how to work with an existing model. The data >>>> is >>>> in >>>> MongoDB with embedded documents. It is about patients would have >>>> sub-documents. For example. An individual patient may have multiple >>>> allergies. Also a patient has multiple medications. So it is as >>>> follows: >>>> >>>> - Patient.medications ---> multiple Medication objects >>>> >>>> So I see where you have a simple one to one. Typically perhaps you >>>> might >>>> have the medication record know that it is associated with the patient, >>>> but >>>> that is not how it is currently organized. So the question is can I >>>> write >>>> rules when patients.medications returns a set/ collection of medications >>>> associated with the patient. I want to write a rule such as "if a >>>> patient >>>> is >>>> taking medication=xxx...." >>>> >>>> Thanks for your help. >>>> >>>> Ray Hooker >>> _______________________________________________ >>> 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/20140108/0b37ed75/attachment.html From michael.anstis at gmail.com Wed Jan 8 23:53:19 2014 From: michael.anstis at gmail.com (Michael Anstis) Date: Thu, 9 Jan 2014 04:53:19 +0000 Subject: [rules-users] Facts - One to Many In-Reply-To: <29FC23A0-44FF-4FF3-A4EB-F8B2F531543F@me.com> References: <29FC23A0-44FF-4FF3-A4EB-F8B2F531543F@me.com> Message-ID: Try prefixing MedicationRecord with "exists". See the user guide for more information. Sent on the move On 9 Jan 2014 03:36, "Ray Hooker" wrote: > Wolfgang, Thanks. That works nicely. I do have a followup question. I > wrote the following query: > > rule "Find patient taking Atorvastin (Lipitor)" > dialect "mvel" > when > $p: PatientRecord($meds: medications) > MedicationRecord(getCode("RxNorm").contains("617314")) from $meds > then > System.out.println("Found a patient taking Lipitor: > "+$p.medical_record_number); > results.addResult(new Result("test",$p.medical_record_number,"Found > Patient Taking Lipitor","now")); > end > > The problem is that a patient record may have multiple times where this > was prescribed. How would I change the query so that it does not repeat > the find so that it is logically: > ?If the patient ever took Lipitor? or if there is any record of the > patient taking Lipitor then flag then?? instead of flagging for each hit?? > So it only flags a patient with at least one medication record indicating > Lipitor? > > Thanks, > > > Ray > On Jan 2, 2014, at 12:36 PM, Wolfgang Laun > wrote: > > As you describe it, here's the way to refer to a particular medication: > > Patient( $meds: medications ) > Medication( drugCode == "55749-003-01" ) from $meds > > This rule determines whether the patient has this particular > medication. There are other operators that might be useful: > > Medication( drugCode str[startsWith] "55749-003" ) from $meds > > Inserting the Medication objects with a backlink to the Patient can > simplify rule evaluation, which may depend on the number and > complexity of the rules. Compare: > > Patient( $meds: medications ) > Medication( drugCode == "55749-003-01" ) from $meds > Medication( drugCode == "55799-565-01" ) from $meds > > with > > $p: Patient() > Medication( drugCode == "55749-003-01", patient == $p ) > Medication( drugCode == "55799-565-01", patient == $p ) > > Much depends on the number of facts you'll need to process. > > To answer your question, "Takes" was a class name I invented to refer > to the relation as an object, and "this" is Java's "this", referring > to the matching object. > > -W > > > On 02/01/2014, Ray Hooker wrote: > > Wolfgang, So in your case you were envisioning the possibility of a Takes > object that matched between a particular medication and the patient. > Actually we are fairly close in the case of medications. > > As you probably know MongoDB allows for documents. In this case, the > patient?s document contains subdocuments. In the case of medications, this > semantically means ?as of the date of this patient document, the patient is > taking the following medicine listed by the applicable code and text > description?. > > When read from the DB, you actually have a Java object Patient (or > ?Record?) > that has a method ?medications? that returns a set of ?Medication? objects. > The parent knows about the medication through the set ?medications?. I > certainly could assert each patient/ record and for each of those assert > each subdocument, inserting a key back to the parent. > > So the rule would need to identify, for example, any case where a > particular > had a medication object where the drug code matched a particular code or > set > of codes. > > Any suggestions are appreciated. Also in the example below, is ?Takes? a > function and what does ?this? refer to? > > Thanks, > > Ray > On Jan 2, 2014, at 2:01 AM, Wolfgang Laun wrote: > > Ideally, a relation is represented by separate objects. Then you might > have > a rule > > $p: Patient() > $p: Takes( patient == $p, $m: medication ) > Medication( this == $m ) > > and this rule will fire for each medication of the patient. > > Answering such questions without details about the actual data model > is impossible. > > -W > > On 02/01/2014, Ray Hooker wrote: > > I am trying to figure out how to work with an existing model. The data > is > in > MongoDB with embedded documents. It is about patients would have > sub-documents. For example. An individual patient may have multiple > allergies. Also a patient has multiple medications. So it is as > follows: > > - Patient.medications ---> multiple Medication objects > > So I see where you have a simple one to one. Typically perhaps you > might > have the medication record know that it is associated with the patient, > but > that is not how it is currently organized. So the question is can I > write > rules when patients.medications returns a set/ collection of medications > associated with the patient. I want to write a rule such as "if a > patient > is > taking medication=xxx...." > > Thanks for your help. > > Ray Hooker > > _______________________________________________ > 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/20140109/8becbd39/attachment-0001.html From soumya.bose at plavaga.in Thu Jan 9 01:39:31 2014 From: soumya.bose at plavaga.in (Soumya.plavaga) Date: Wed, 8 Jan 2014 22:39:31 -0800 (PST) Subject: [rules-users] Is there any guvnor api, through which we can update the web guided decision table in drools 6.0.x? Message-ID: <1389249571532-4027618.post@n3.nabble.com> We need a way to update the web guided decision table in Drools 6.0.x programatically. We are able to retrieve the metadata and unmarshal the content of DT and modify that and marshal again to decision table format. But now we want to push that updated content of DT into guvnor git. But could not find any kind of redimade guvnor api in drools 6.0.x through which we can achieve this. Can anyone through some light on this context please? Following is my question - Is there any guvnor api, through which we can update the web guided decision table in drools 6.0.x ? -- View this message in context: http://drools.46999.n3.nabble.com/Is-there-any-guvnor-api-through-which-we-can-update-the-web-guided-decision-table-in-drools-6-0-x-tp4027618.html Sent from the Drools: User forum mailing list archive at Nabble.com. From michael.anstis at gmail.com Thu Jan 9 01:54:56 2014 From: michael.anstis at gmail.com (Michael Anstis) Date: Thu, 9 Jan 2014 06:54:56 +0000 Subject: [rules-users] Is there any guvnor api, through which we can update the web guided decision table in drools 6.0.x? In-Reply-To: <1389249571532-4027618.post@n3.nabble.com> References: <1389249571532-4027618.post@n3.nabble.com> Message-ID: How do you retrieve the decision table in the first place? The recommend approach would be to use a GIT library (e.g. JGIT). Use this to clone the repository used by the workbench, make your updates then push your clone back to the workbench. Sent on the move On 9 Jan 2014 06:40, "Soumya.plavaga" wrote: > We need a way to update the web guided decision table in Drools 6.0.x > programatically. We are able to retrieve the metadata and unmarshal the > content of DT and modify that and marshal again to decision table format. > But now we want to push that updated content of DT into guvnor git. But > could not find any kind of redimade guvnor api in drools 6.0.x through > which > we can achieve this. Can anyone through some light on this context please? > Following is my question - > > Is there any guvnor api, through which we can update the web guided > decision > table in drools 6.0.x ? > > > > -- > View this message in context: > http://drools.46999.n3.nabble.com/Is-there-any-guvnor-api-through-which-we-can-update-the-web-guided-decision-table-in-drools-6-0-x-tp4027618.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/20140109/16969af9/attachment.html From kurrent93 at gmail.com Thu Jan 9 04:07:39 2014 From: kurrent93 at gmail.com (kurrent93) Date: Thu, 9 Jan 2014 01:07:39 -0800 (PST) Subject: [rules-users] drools maven acrhetype? Message-ID: <1389258459226-4027620.post@n3.nabble.com> Hi I would like to start using drools 6. Is there a maven archetype to quickly get a drools project setup? If yes, where can I find it? Thanks -- View this message in context: http://drools.46999.n3.nabble.com/drools-maven-acrhetype-tp4027620.html Sent from the Drools: User forum mailing list archive at Nabble.com. From whathappenif at gmail.com Thu Jan 9 05:01:43 2014 From: whathappenif at gmail.com (LeonJi) Date: Thu, 9 Jan 2014 02:01:43 -0800 (PST) Subject: [rules-users] What is the rest API to modify the import setting of a package in Guvnor? Message-ID: <1389261703130-4027621.post@n3.nabble.com> Hi, I need to change the class import setting for those packages with rest api. Could someone tell me whether there is such api or I have to do it manually? Another question is about the api for creating an asset that links to the one from global area. Does this one exist? Thanks. -- View this message in context: http://drools.46999.n3.nabble.com/What-is-the-rest-API-to-modify-the-import-setting-of-a-package-in-Guvnor-tp4027621.html Sent from the Drools: User forum mailing list archive at Nabble.com. From kurrent93 at gmail.com Thu Jan 9 05:57:11 2014 From: kurrent93 at gmail.com (kurrent93) Date: Thu, 9 Jan 2014 02:57:11 -0800 (PST) Subject: [rules-users] java.lang.RuntimeException: Unable to instance KieServices Message-ID: <1389265031243-4027622.post@n3.nabble.com> Hi I am trying to get started with Drools 6x, and in eclipse, I have created a Drools project, which creates the boilerplate code to run a simple drl. I have the drools runtime installed via Eclipse. Yet, when I try to run the following, I get the following error: java.lang.ExceptionInInitializerError at com.sample.DroolsTest.main(DroolsTest.java:15) Caused by: java.lang.RuntimeException: Unable to instance KieServices at org.kie.api.KieServices$Factory.(KieServices.java:167) ... 1 more Caused by: java.lang.ClassNotFoundException: org.drools.compiler.kie.builder.impl.KieServicesImpl at java.net.URLClassLoader$1.run(Unknown Source) at java.net.URLClassLoader$1.run(Unknown Source) at java.security.AccessController.doPrivileged(Native Method) at java.net.URLClassLoader.findClass(Unknown Source) at java.lang.ClassLoader.loadClass(Unknown Source) at sun.misc.Launcher$AppClassLoader.loadClass(Unknown Source) at java.lang.ClassLoader.loadClass(Unknown Source) at java.lang.Class.forName0(Native Method) at java.lang.Class.forName(Unknown Source) at org.kie.api.KieServices$Factory.(KieServices.java:165) ... 1 more package com.sample; import org.kie.api.KieServices; import org.kie.api.runtime.KieContainer; import org.kie.api.runtime.KieSession; /** * This is a sample class to launch a rule. */ public class DroolsTest { public static final void main(String[] args) { try { // load up the knowledge base KieServices ks = KieServices.Factory.get(); KieContainer kContainer = ks.getKieClasspathContainer(); KieSession kSession = kContainer.newKieSession("ksession-rules"); // go ! Message message = new Message(); message.setMessage("Hello World"); message.setStatus(Message.HELLO); kSession.insert(message); kSession.fireAllRules(); } catch (Throwable t) { t.printStackTrace(); } } public static class Message { public static final int HELLO = 0; public static final int GOODBYE = 1; private String message; private int status; public String getMessage() { return this.message; } public void setMessage(String message) { this.message = message; } public int getStatus() { return this.status; } public void setStatus(int status) { this.status = status; } } } -- View this message in context: http://drools.46999.n3.nabble.com/java-lang-RuntimeException-Unable-to-instance-KieServices-tp4027622.html Sent from the Drools: User forum mailing list archive at Nabble.com. From swapnilaute at gmail.com Thu Jan 9 06:20:19 2014 From: swapnilaute at gmail.com (neal) Date: Thu, 9 Jan 2014 03:20:19 -0800 (PST) Subject: [rules-users] Is there any guvnor api, through which we can update the web guided decision table in drools 6.0.x? In-Reply-To: <1389249571532-4027618.post@n3.nabble.com> References: <1389249571532-4027618.post@n3.nabble.com> Message-ID: <1389266419124-4027623.post@n3.nabble.com> I also have simillar requirement, Is there a way connect the eclipse with drool workbench 6.0? I wanted to add the newly created project in eclipse into drools workbench 6.0. In older version we have webdav to connect eclipse with guvnor. What is the best way to connect the eclipse with drool workbench 6.0? DO we have any plugin? -- View this message in context: http://drools.46999.n3.nabble.com/Is-there-any-guvnor-api-through-which-we-can-update-the-web-guided-decision-table-in-drools-6-0-x-tp4027618p4027623.html Sent from the Drools: User forum mailing list archive at Nabble.com. From michael.anstis at gmail.com Thu Jan 9 06:36:47 2014 From: michael.anstis at gmail.com (Michael Anstis) Date: Thu, 9 Jan 2014 11:36:47 +0000 Subject: [rules-users] Is there any guvnor api, through which we can update the web guided decision table in drools 6.0.x? In-Reply-To: <1389266419124-4027623.post@n3.nabble.com> References: <1389249571532-4027618.post@n3.nabble.com> <1389266419124-4027623.post@n3.nabble.com> Message-ID: You don't need any Drools specific plugin. The 6.0 workbench has a git backend so you should be able to clone it from within Eclipse using the normal Eclipse git plugins. IIRC Drools workbench user guide contains URL details. Sent on the move On 9 Jan 2014 11:20, "neal" wrote: > I also have simillar requirement, Is there a way connect the eclipse with > drool workbench 6.0? > I wanted to add the newly created project in eclipse into drools workbench > 6.0. In older version we have webdav to connect eclipse with guvnor. > What is the best way to connect the eclipse with drool workbench 6.0? DO we > have any plugin? > > > > -- > View this message in context: > http://drools.46999.n3.nabble.com/Is-there-any-guvnor-api-through-which-we-can-update-the-web-guided-decision-table-in-drools-6-0-x-tp4027618p4027623.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/20140109/46b53626/attachment.html From roman.jesus at wanadoo.es Thu Jan 9 07:04:56 2014 From: roman.jesus at wanadoo.es (jroman) Date: Thu, 9 Jan 2014 04:04:56 -0800 (PST) Subject: [rules-users] Drools 6.0.1 xstream marshaling via camel config not working In-Reply-To: <3A4726CD-1ED9-4677-BD5D-16994D2F9263@codehaus.org> References: <1389196732604-4027607.post@n3.nabble.com> <6C10CBFA-4421-4FC3-8EFA-DD35A65B6D71@codehaus.org> <3A4726CD-1ED9-4677-BD5D-16994D2F9263@codehaus.org> Message-ID: <1389269096489-4027625.post@n3.nabble.com> Thanks anyway, Mark. You are right, the problem is in the javaClient to camelRouteRestClient communication. Precisely, in the result of the marshalling operation performed by the xstream bean. Nothing to do with the drools server or the server side of the rest link. ----- -- jroman -- View this message in context: http://drools.46999.n3.nabble.com/Drools-6-0-1-xstream-marshaling-via-camel-config-not-working-tp4027607p4027625.html Sent from the Drools: User forum mailing list archive at Nabble.com. From mproctor at codehaus.org Thu Jan 9 09:39:10 2014 From: mproctor at codehaus.org (Mark Proctor) Date: Thu, 9 Jan 2014 14:39:10 +0000 Subject: [rules-users] java.lang.RuntimeException: Unable to instance KieServices In-Reply-To: <1389265031243-4027622.post@n3.nabble.com> References: <1389265031243-4027622.post@n3.nabble.com> Message-ID: You are missing required dependencies. All the api bootstrapping examples are documented and can be found here: https://github.com/droolsjbpm/drools/tree/master/drools-examples-api either use "mvn eclipse:eclipse? or the m2e plugin, and you will will be good to go. Mark On 9 Jan 2014, at 10:57, kurrent93 wrote: > Hi > > I am trying to get started with Drools 6x, and in eclipse, I have created a > Drools project, which creates the boilerplate code to run a simple drl. > > I have the drools runtime installed via Eclipse. > > Yet, when I try to run the following, I get the following error: > > java.lang.ExceptionInInitializerError > at com.sample.DroolsTest.main(DroolsTest.java:15) > Caused by: java.lang.RuntimeException: Unable to instance KieServices > at org.kie.api.KieServices$Factory.(KieServices.java:167) > ... 1 more > Caused by: java.lang.ClassNotFoundException: > org.drools.compiler.kie.builder.impl.KieServicesImpl > at java.net.URLClassLoader$1.run(Unknown Source) > at java.net.URLClassLoader$1.run(Unknown Source) > at java.security.AccessController.doPrivileged(Native Method) > at java.net.URLClassLoader.findClass(Unknown Source) > at java.lang.ClassLoader.loadClass(Unknown Source) > at sun.misc.Launcher$AppClassLoader.loadClass(Unknown Source) > at java.lang.ClassLoader.loadClass(Unknown Source) > at java.lang.Class.forName0(Native Method) > at java.lang.Class.forName(Unknown Source) > at org.kie.api.KieServices$Factory.(KieServices.java:165) > ... 1 more > > > > package com.sample; > > import org.kie.api.KieServices; > import org.kie.api.runtime.KieContainer; > import org.kie.api.runtime.KieSession; > > /** > * This is a sample class to launch a rule. > */ > public class DroolsTest { > > public static final void main(String[] args) { > try { > // load up the knowledge base > KieServices ks = KieServices.Factory.get(); > KieContainer kContainer = ks.getKieClasspathContainer(); > KieSession kSession = kContainer.newKieSession("ksession-rules"); > > // go ! > Message message = new Message(); > message.setMessage("Hello World"); > message.setStatus(Message.HELLO); > kSession.insert(message); > kSession.fireAllRules(); > } catch (Throwable t) { > t.printStackTrace(); > } > } > > public static class Message { > > public static final int HELLO = 0; > public static final int GOODBYE = 1; > > private String message; > > private int status; > > public String getMessage() { > return this.message; > } > > public void setMessage(String message) { > this.message = message; > } > > public int getStatus() { > return this.status; > } > > public void setStatus(int status) { > this.status = status; > } > > } > > } > > > > > -- > View this message in context: http://drools.46999.n3.nabble.com/java-lang-RuntimeException-Unable-to-instance-KieServices-tp4027622.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 matteo.mortari at gmail.com Thu Jan 9 09:46:43 2014 From: matteo.mortari at gmail.com (Matteo Mortari) Date: Thu, 9 Jan 2014 15:46:43 +0100 Subject: [rules-users] Drool 6.0.0.Final, 2 question re kie-maven-plugin, please? In-Reply-To: References: <1386615234991-4027174.post@n3.nabble.com> Message-ID: Ciao, Happy New Year ! I've appended comments and example project file to DROOLS-373[1] , because despite now using 6.0.1.Final it still does not work, at least for me, I still have to double-declare the dependency as a normal dependency but also within the kie-maven-plugin declaration. Could somebody have a look, referencing the attached example project, and kindly let me know if either it's me really on a difficult relationship with Maven, or actually is this jira to be reopened, please? =) Thanks! Ciao MM [1] https://issues.jboss.org/browse/DROOLS-373 On Tue, Dec 10, 2013 at 7:57 PM, Matteo Mortari wrote: > Thanks a lot for the fix ! > Ciao, > MM > > > On Mon, Dec 9, 2013 at 7:53 PM, Mario Fusco wrote: > >> Hi, >> >> unfortunately you're right. I reproduced the problem regarding the need of >> the duplicate dependencies declarations inside the plugin. I opened a >> ticket >> on jira to report this issue ( https://issues.jboss.org/browse/DROOLS-373) >> and already pushed a fix on the master branch for it ( >> https://github.com/droolsjbpm/drools/commit/b8a952e88 ). >> >> Thanks a lot for having reported this, >> Mario >> >> >> >> -- >> View this message in context: >> http://drools.46999.n3.nabble.com/rules-users-Drool-6-0-0-Final-2-question-re-kie-maven-plugin-please-tp4027117p4027174.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/20140109/d957ca1a/attachment.html From soumya.bose at plavaga.in Thu Jan 9 09:57:05 2014 From: soumya.bose at plavaga.in (Soumya.plavaga) Date: Thu, 9 Jan 2014 06:57:05 -0800 (PST) Subject: [rules-users] Is there any guvnor api, through which we can update the web guided decision table in drools 6.0.x? In-Reply-To: References: <1389249571532-4027618.post@n3.nabble.com> Message-ID: <1389279425971-4027629.post@n3.nabble.com> Thanks for your reply mantis. Now I have cloned the guvnor repo (git://localhost:9418:/{repoName}) using JGit into my local. Once going to push my changes into remote guvnor repo it is giving me org.eclipse.jgit.errors.TransportException: 'push operation is not permitted'. If it is because of any authentication issue while trying to push into remote guvnor repo? If I need to specify any authentication parameter while pushing my changes? One more thing I want to know that - is there any way we can update our changes into guvnor repository programmatically using any guvnor api like KIE ? We need to push our changes on run time into guvnor repository programatically. Note : We are not using drools workbench UI to checkin our changes. -- View this message in context: http://drools.46999.n3.nabble.com/Is-there-any-guvnor-api-through-which-we-can-update-the-web-guided-decision-table-in-drools-6-0-x-tp4027618p4027629.html Sent from the Drools: User forum mailing list archive at Nabble.com. From calcacuervo at gmail.com Thu Jan 9 10:40:20 2014 From: calcacuervo at gmail.com (calcacuervo) Date: Thu, 9 Jan 2014 07:40:20 -0800 (PST) Subject: [rules-users] What is the rest API to modify the import setting of a package in Guvnor? In-Reply-To: <1389261703130-4027621.post@n3.nabble.com> References: <1389261703130-4027621.post@n3.nabble.com> Message-ID: <1389282020080-4027630.post@n3.nabble.com> I think you have to do it manually, updating the "drools" asset from the package. About pointing to the global area, I have not found a way to do it through the REST API. Demian -- View this message in context: http://drools.46999.n3.nabble.com/What-is-the-rest-API-to-modify-the-import-setting-of-a-package-in-Guvnor-tp4027621p4027630.html Sent from the Drools: User forum mailing list archive at Nabble.com. From calcacuervo at gmail.com Thu Jan 9 10:46:00 2014 From: calcacuervo at gmail.com (calcacuervo) Date: Thu, 9 Jan 2014 07:46:00 -0800 (PST) Subject: [rules-users] Adding rules incrementally Message-ID: <1389282360059-4027631.post@n3.nabble.com> Hi Guys. I am trying to add rules incrementally to the kbase, using the same ksession. I mean, when I have a new DRL, I receive it, and want to add it to the kbase (in memory), and the ksession I have will start to use this new rule too. I have been using this example, https://github.com/droolsjbpm/drools/blob/master/drools-compiler/src/test/java/org/drools/compiler/integrationtests/IncrementalCompilationTest.java#L106 I can add new rules, but just passing all the DRLS, and creating a new KieFileSystem. I would like, when I have a new rule, just add (or modify), this rule to the working memory. Is this possible? Any idea? Thanks! Demian -- View this message in context: http://drools.46999.n3.nabble.com/Adding-rules-incrementally-tp4027631.html Sent from the Drools: User forum mailing list archive at Nabble.com. From mproctor at codehaus.org Thu Jan 9 11:04:09 2014 From: mproctor at codehaus.org (Mark Proctor) Date: Thu, 9 Jan 2014 16:04:09 +0000 Subject: [rules-users] Kie and Guvnor 6.0 In-Reply-To: <8926A145-C5C5-4CB1-A077-994D48FD7B56@me.com> References: <5C03BAFE-0504-42CA-B31D-3BF5EA6DA4CE@me.com> <0EEDE22A-6162-46DF-80BA-74AA3FB4F75C@me.com> <8926A145-C5C5-4CB1-A077-994D48FD7B56@me.com> Message-ID: <8121ECCC-EBA7-4AE3-9BDF-2B0898F0BFAC@codehaus.org> I can confirm that I also have to restart the server, for import suggestions to be recognised. We?ll have a fix for this in master shortly. There won?t be a FINAL release though for maybe 6 to 10 weeks. We also found another issue with anything that extends Collections, which has already been fixed in master. Mark On 8 Jan 2014, at 16:35, Ray Hooker wrote: > Mark, That makes sense. I added java.util.ArrayList and even saved it. I had to shutdown and restart though to get it to pop up in the Data Modeler as an option for field type. Is there a better way to refresh the list? > > Ray > > > On Jan 7, 2014, at 9:40 PM, Mark Proctor wrote: > >> If you configure the imports, for the project, then those types become available. >> >> Mark >> On 8 Jan 2014, at 01:32, Ray Hooker wrote: >> >>> Thanks for the pointer on the docs. BTW have you seen a way to utilize more than primitive types in the Data modeler? I see where I can specify models I have already created but what about other classes such as ArrayList, etc? This is needed for one-to-many relationships between facts. For example, I have an existing model where patients have multiple medication records. I can write rules to deal with this manually (e.g., using the ?from? keyword), but can I use Guvnor to specify the model as it really exists?.. which is an ArrayList type Medication? >>> >>> Ray >>> On Jan 7, 2014, at 5:42 AM, Alexandre Porcelli wrote: >>> >>>> Hi, >>>> >>>> Here are the docs available for new Workbench: http://docs.jboss.org/drools/release/6.0.1.Final/drools-docs/html/wb.Workbench.html >>>> >>>> Regards, >>>> --- >>>> Alexandre Porcelli >>>> Principal Software Engineer >>>> Red Hat Business Systems and Intelligence Group >>>> >>>> On Jan 7, 2014, at 3:02 AM, Ray Hooker wrote: >>>> >>>>> I have installed and worked with the new Guvnor interface. I am not sure how to interface with it. >>>>> >>>>> This may be a basic question, but I have not seen documentation of how Guvnor works exactly in version 6.0. I see that it uses a git repository and maven server, but I do not see where it actually resides or how I can access it? I need info like port, protocol, file location or something specific. I have tried to example the installation but am not sure the details. Certainly there is not a configuration panel that might indicate configured port for the maven repository, etc. A network diagram would be helpful. >>>>> >>>>> It is possible that I need to access the git repository or the Maven repository using Kie specific classes and functionality but then I would assume I need to give it the url/ web address of the Guvnor and way to configure that. >>>>> >>>>> >>>>> Ray >>>>> _______________________________________________ >>>>> 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 From michael.anstis at gmail.com Thu Jan 9 11:33:51 2014 From: michael.anstis at gmail.com (Michael Anstis) Date: Thu, 9 Jan 2014 16:33:51 +0000 Subject: [rules-users] Kie and Guvnor 6.0 In-Reply-To: <8121ECCC-EBA7-4AE3-9BDF-2B0898F0BFAC@codehaus.org> References: <5C03BAFE-0504-42CA-B31D-3BF5EA6DA4CE@me.com> <0EEDE22A-6162-46DF-80BA-74AA3FB4F75C@me.com> <8926A145-C5C5-4CB1-A077-994D48FD7B56@me.com> <8121ECCC-EBA7-4AE3-9BDF-2B0898F0BFAC@codehaus.org> Message-ID: This commit should fix the problem:- https://github.com/droolsjbpm/guvnor/blob/master/guvnor-project/guvnor-project-builder/src/main/java/org/guvnor/common/services/builder/ResourceChangeObserver.java#L143 But I notice it's not in 6.x:- https://github.com/droolsjbpm/guvnor/blob/6.0.x/guvnor-project/guvnor-project-builder/src/main/java/org/guvnor/common/services/builder/ResourceChangeObserver.java Looks like this commit added it to master:- https://github.com/droolsjbpm/guvnor/commit/3f0e996170d50825f650fdf3e130ec0aa0f44c4e Toni, looks like the BZ has the applicable ACK's to move to 6.x (shame it missed 6.0.1):- https://bugzilla.redhat.com/show_bug.cgi?id=1045314 On 9 January 2014 16:04, Mark Proctor wrote: > I can confirm that I also have to restart the server, for import > suggestions to be recognised. We?ll have a fix for this in master shortly. > There won?t be a FINAL release though for maybe 6 to 10 weeks. We also > found another issue with anything that extends Collections, which has > already been fixed in master. > > Mark > On 8 Jan 2014, at 16:35, Ray Hooker wrote: > > > Mark, That makes sense. I added java.util.ArrayList and even saved > it. I had to shutdown and restart though to get it to pop up in the Data > Modeler as an option for field type. Is there a better way to refresh the > list? > > > > Ray > > > > > > On Jan 7, 2014, at 9:40 PM, Mark Proctor wrote: > > > >> If you configure the imports, for the project, then those types become > available. > >> > >> Mark > >> On 8 Jan 2014, at 01:32, Ray Hooker wrote: > >> > >>> Thanks for the pointer on the docs. BTW have you seen a way to > utilize more than primitive types in the Data modeler? I see where I can > specify models I have already created but what about other classes such as > ArrayList, etc? This is needed for one-to-many relationships between > facts. For example, I have an existing model where patients have multiple > medication records. I can write rules to deal with this manually (e.g., > using the ?from? keyword), but can I use Guvnor to specify the model as it > really exists?.. which is an ArrayList type Medication? > >>> > >>> Ray > >>> On Jan 7, 2014, at 5:42 AM, Alexandre Porcelli > wrote: > >>> > >>>> Hi, > >>>> > >>>> Here are the docs available for new Workbench: > http://docs.jboss.org/drools/release/6.0.1.Final/drools-docs/html/wb.Workbench.html > >>>> > >>>> Regards, > >>>> --- > >>>> Alexandre Porcelli > >>>> Principal Software Engineer > >>>> Red Hat Business Systems and Intelligence Group > >>>> > >>>> On Jan 7, 2014, at 3:02 AM, Ray Hooker wrote: > >>>> > >>>>> I have installed and worked with the new Guvnor interface. I am not > sure how to interface with it. > >>>>> > >>>>> This may be a basic question, but I have not seen documentation of > how Guvnor works exactly in version 6.0. I see that it uses a git > repository and maven server, but I do not see where it actually resides or > how I can access it? I need info like port, protocol, file location or > something specific. I have tried to example the installation but am not > sure the details. Certainly there is not a configuration panel that might > indicate configured port for the maven repository, etc. A network diagram > would be helpful. > >>>>> > >>>>> It is possible that I need to access the git repository or the Maven > repository using Kie specific classes and functionality but then I would > assume I need to give it the url/ web address of the Guvnor and way to > configure that. > >>>>> > >>>>> > >>>>> Ray > >>>>> _______________________________________________ > >>>>> 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/20140109/e256b3b7/attachment-0001.html From mproctor at codehaus.org Thu Jan 9 13:07:41 2014 From: mproctor at codehaus.org (Mark Proctor) Date: Thu, 9 Jan 2014 18:07:41 +0000 Subject: [rules-users] Adding rules incrementally In-Reply-To: <1389282360059-4027631.post@n3.nabble.com> References: <1389282360059-4027631.post@n3.nabble.com> Message-ID: <86D710AD-4782-4F4E-8751-88529F80F669@codehaus.org> each rule add/remove/update required you to rebuild, publish and consume (in the KieContainer) a new kjar. The kjar will have ALL of the rules, a diff algorithm will only add the new one that is different. Mark On 9 Jan 2014, at 15:46, calcacuervo wrote: > Hi Guys. > > I am trying to add rules incrementally to the kbase, using the same > ksession. I mean, when I have a new DRL, I receive it, and want to add it to > the kbase (in memory), and the ksession I have will start to use this new > rule too. > > I have been using this example, > > https://github.com/droolsjbpm/drools/blob/master/drools-compiler/src/test/java/org/drools/compiler/integrationtests/IncrementalCompilationTest.java#L106 > > I can add new rules, but just passing all the DRLS, and creating a new > KieFileSystem. I would like, when I have a new rule, just add (or modify), > this rule to the working memory. > > Is this possible? Any idea? > > Thanks! > > Demian > > > > -- > View this message in context: http://drools.46999.n3.nabble.com/Adding-rules-incrementally-tp4027631.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 Thu Jan 9 13:54:26 2014 From: mproctor at codehaus.org (Mark Proctor) Date: Thu, 9 Jan 2014 18:54:26 +0000 Subject: [rules-users] Kie and Guvnor 6.0 In-Reply-To: <8121ECCC-EBA7-4AE3-9BDF-2B0898F0BFAC@codehaus.org> References: <5C03BAFE-0504-42CA-B31D-3BF5EA6DA4CE@me.com> <0EEDE22A-6162-46DF-80BA-74AA3FB4F75C@me.com> <8926A145-C5C5-4CB1-A077-994D48FD7B56@me.com> <8121ECCC-EBA7-4AE3-9BDF-2B0898F0BFAC@codehaus.org> Message-ID: <3B260E80-D90B-4DE2-9389-BAA710BAD54E@codehaus.org> There is a workaround. Before saving switch to the Project Editor to ?General Project Settings?. Make any change, such as in the description, and save. That will ensure the correct notification is sent,for the Data Modeller to be updated. Here is a quick video that demonstrate the issue, and them demonstrate the work around: http://screencast.com/t/Myi2Db0l4L This is fixed in master, you?ll be able to get a snapshot build tomorrow. And will be fixed in the next community release. http://hp-dl380pg8-01.lab.eng.brq.redhat.com/jbpm-artifacts/master/ Mark On 9 Jan 2014, at 16:04, Mark Proctor wrote: > I can confirm that I also have to restart the server, for import suggestions to be recognised. We?ll have a fix for this in master shortly. There won?t be a FINAL release though for maybe 6 to 10 weeks. We also found another issue with anything that extends Collections, which has already been fixed in master. > > Mark > On 8 Jan 2014, at 16:35, Ray Hooker wrote: > >> Mark, That makes sense. I added java.util.ArrayList and even saved it. I had to shutdown and restart though to get it to pop up in the Data Modeler as an option for field type. Is there a better way to refresh the list? >> >> Ray >> >> >> On Jan 7, 2014, at 9:40 PM, Mark Proctor wrote: >> >>> If you configure the imports, for the project, then those types become available. >>> >>> Mark >>> On 8 Jan 2014, at 01:32, Ray Hooker wrote: >>> >>>> Thanks for the pointer on the docs. BTW have you seen a way to utilize more than primitive types in the Data modeler? I see where I can specify models I have already created but what about other classes such as ArrayList, etc? This is needed for one-to-many relationships between facts. For example, I have an existing model where patients have multiple medication records. I can write rules to deal with this manually (e.g., using the ?from? keyword), but can I use Guvnor to specify the model as it really exists?.. which is an ArrayList type Medication? >>>> >>>> Ray >>>> On Jan 7, 2014, at 5:42 AM, Alexandre Porcelli wrote: >>>> >>>>> Hi, >>>>> >>>>> Here are the docs available for new Workbench: http://docs.jboss.org/drools/release/6.0.1.Final/drools-docs/html/wb.Workbench.html >>>>> >>>>> Regards, >>>>> --- >>>>> Alexandre Porcelli >>>>> Principal Software Engineer >>>>> Red Hat Business Systems and Intelligence Group >>>>> >>>>> On Jan 7, 2014, at 3:02 AM, Ray Hooker wrote: >>>>> >>>>>> I have installed and worked with the new Guvnor interface. I am not sure how to interface with it. >>>>>> >>>>>> This may be a basic question, but I have not seen documentation of how Guvnor works exactly in version 6.0. I see that it uses a git repository and maven server, but I do not see where it actually resides or how I can access it? I need info like port, protocol, file location or something specific. I have tried to example the installation but am not sure the details. Certainly there is not a configuration panel that might indicate configured port for the maven repository, etc. A network diagram would be helpful. >>>>>> >>>>>> It is possible that I need to access the git repository or the Maven repository using Kie specific classes and functionality but then I would assume I need to give it the url/ web address of the Guvnor and way to configure that. >>>>>> >>>>>> >>>>>> Ray >>>>>> _______________________________________________ >>>>>> 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 > From michael.anstis at gmail.com Thu Jan 9 14:00:59 2014 From: michael.anstis at gmail.com (Michael Anstis) Date: Thu, 9 Jan 2014 19:00:59 +0000 Subject: [rules-users] Is there any guvnor api, through which we can update the web guided decision table in drools 6.0.x? In-Reply-To: <1389279425971-4027629.post@n3.nabble.com> References: <1389249571532-4027618.post@n3.nabble.com> <1389279425971-4027629.post@n3.nabble.com> Message-ID: @Soumya, There is no Guvnor/KIE to manipulate the repository since it is GIT-based and there are a myriad of client libraries that can be used instead. I am a little confused by your comments "We need to push our changes on run time into guvnor repository programatically" and "Note : We are not using drools workbench UI to checkin our changes". What do you use the workbench repository for? Your comments imply you don't need the workbench webapp at all - in which case why try to re-use it's repository? @Alexandre, @Kris, What have you tried (and been successful with) for Eclipse->KIE-WB Repository connections? Cheers, Mike On 9 January 2014 14:57, Soumya.plavaga wrote: > Thanks for your reply mantis. Now I have cloned the guvnor repo > (git://localhost:9418:/{repoName}) using JGit into my local. Once going to > push my changes into remote guvnor repo it is giving me > org.eclipse.jgit.errors.TransportException: 'push operation is not > permitted'. If it is because of any authentication issue while trying to > push into remote guvnor repo? If I need to specify any authentication > parameter while pushing my changes? One more thing I want to know that - is > there any way we can update our changes into guvnor repository > programmatically using any guvnor api like KIE ? We need to push our > changes > on run time into guvnor repository programatically. > > Note : We are not using drools workbench UI to checkin our changes. > > > > -- > View this message in context: > http://drools.46999.n3.nabble.com/Is-there-any-guvnor-api-through-which-we-can-update-the-web-guided-decision-table-in-drools-6-0-x-tp4027618p4027629.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/20140109/08712008/attachment.html From mats.noren at gmail.com Thu Jan 9 19:11:25 2014 From: mats.noren at gmail.com (=?utf-8?Q?Mats_Nor=C3=A9n?=) Date: Fri, 10 Jan 2014 01:11:25 +0100 Subject: [rules-users] [Optaplanner] Filter values => immovable planning entities In-Reply-To: <52AAE6B2.50208@gmail.com> References: <52AAC615.3020509@gmail.com> <52AAE6B2.50208@gmail.com> Message-ID: <8E6FD73A-C181-4084-9803-48CCC0B74E3F@gmail.com> Thanks! It turns out that it was bad data in my factory to create the initial solution that made some of On Fri, Dec 13, 2013 at 11:51 AM, Geoffrey De Smet wrote: > > On 13-12-13 10:39, Mats Nor?n wrote: >> Bad choice of words. Entities. :-) >> >> I've got three classes: >> >> @PlanningEntity(movableEntitySelectionFilter = MovableWorkersSelectionFilter.class) >> public class Person extends Property { >> >> String signature; >> String name; >> Desk desk; >> boolean movable; >> ... >> } >> >> Fact: >> >> public class Desk extends Property { >> >> double x; >> double y; >> >> public Desk() { >> } >> ... >> } >> >> Solution: >> >> @PlanningSolution >> public class DeskAssignmentSolution implements Solution { >> >> private List persons; >> private List desks; >> private HardSoftScore score; >> >> @PlanningEntityCollectionProperty >> public List getPersons() { >> return persons; >> } >> >> public void setPersons(List persons) { >> this.persons = persons; >> } >> >> public void setDesks(List desks) { >> this.desks = desks; >> } >> >> @ValueRangeProvider(id="deskRange") >> public List getDesks() { >> return desks; >> } >> ... >> >> } >> >> A desk is assigned to a person and makes up a desk assignment solution. >> >> Certain desks should not be assigned since the are all ready occupied. The are correctly assigned to the right person in the initial solution. > Ah. > So there are 2 requirements: > - Some persons are immovable: they are already assigned to a desk (MovableWorkersSelectionFilter somehow recognizes those and filters them out). > - Since no 2 persons can share the same desk, there's little point in putting a desk that is already assigned to an immovable person in the value range. You can filter them out of the value range (by putting filters in the CH and local search etc), but I wouldn't bother with that improvement: your original hard constraint "no 2 persons can share the same desk" will gives those moves an infeasible score, so they are unlikely to be picked anyway (and if they are picked it can actually be a good thing: tunnel through an infeasible solution to a better feasible solution). > >> >> Does the SelectionFilter prevent the desk being assigned somehow? I thought a SelectionFilter would only prevent a move of the Person but it's the Desk being assigned? >> >> Regards, >> Mats >> >> >> On Fri, Dec 13, 2013 at 9:32 AM, Geoffrey De Smet wrote: >>> >>> On 12-12-13 18:11, Mats Nor?n wrote: >>>> Hi, >>>> I've got a domain with the following entities: >>> entities? you mean classes? >>>> - Person (planning entity) >>>> - Desk (planning variable) >>> a class cannot be a variable. This probably a problem fact that and person.getDesk() nor DeskAssignement.getPerson() is the planning variables. >>>> - DeskAssignment (solution) >>> Now I am totally confused :) >>> in the official examples, something called Assignment is a planning entity. >>>> >>>> All persons should be assigned to a desk according to some rules. >>>> What I would like to do is to make certain Persons and their Desk immovable, ie, they are assigned a desk in the initial solution and should be fixed there. They are only there for the score calculation. >>> agreed, "immovable" is the correct concept to use for that >>>> >>>> I looked at 14.3.1 Immovable planning entities but couldn't really see how I would apply it to my use case. >>> Take a look at the course scheduling example. >>> Here's a demo of immovable planning entities in that example: >>> http://www.youtube.com/watch?v=4meWIhPRVn8 >>>> Why is the filter applied at the planning entity level? Since it's the planning variable that changes I thought that I should somehow filter the allowed values for the Desk. >>> Don't mix the concept of "(im)movable entities" (which is what you want) with the concept of "limiting value ranges per entity" or the concept of "filtering specific move selectors" (which is overkill and convoluted for your needs). >>>> >>>> Regards, >>>> Mats >>>> >>>> >>>> >>>> >>>> >>>> >>>> _______________________________________________ >>>> 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/20140110/c925b69a/attachment-0001.html From whathappenif at gmail.com Thu Jan 9 20:38:01 2014 From: whathappenif at gmail.com (LeonJi) Date: Thu, 9 Jan 2014 17:38:01 -0800 (PST) Subject: [rules-users] What is the rest API to modify the import setting of a package in Guvnor? In-Reply-To: <1389282020080-4027630.post@n3.nabble.com> References: <1389261703130-4027621.post@n3.nabble.com> <1389282020080-4027630.post@n3.nabble.com> Message-ID: <1389317881760-4027638.post@n3.nabble.com> Thank you. With put method to "http://host:port/guvnor/rest/packages/samplePackage/assets/drools/source", it resolve my problem perfectly. calcacuervo wrote > I think you have to do it manually, updating the "drools" asset from the > package. > > About pointing to the global area, I have not found a way to do it through > the REST API. > > Demian -- View this message in context: http://drools.46999.n3.nabble.com/What-is-the-rest-API-to-modify-the-import-setting-of-a-package-in-Guvnor-tp4027621p4027638.html Sent from the Drools: User forum mailing list archive at Nabble.com. From porcelli at redhat.com Thu Jan 9 21:21:25 2014 From: porcelli at redhat.com (Alexandre Porcelli) Date: Fri, 10 Jan 2014 00:21:25 -0200 Subject: [rules-users] Is there any guvnor api, through which we can update the web guided decision table in drools 6.0.x? In-Reply-To: References: <1389249571532-4027618.post@n3.nabble.com> <1389279425971-4027629.post@n3.nabble.com> Message-ID: <4ED23D19-E091-4F29-8BAB-F98AF40AAF97@redhat.com> Soumya, Regarding clone protocol, if you need to push your changes back you'll have to use ssh instead of git (ssh://{userName}@localhost:8001/{repoName}) Now related to Eclipse->KIE-WB, all you need is Egit. Regards, --- Alexandre Porcelli Principal Software Engineer Red Hat Business Systems and Intelligence Group On Jan 9, 2014, at 5:00 PM, Michael Anstis wrote: > I am a little confused by your comments "We need to push our changes on run time into guvnor repository programatically" and "Note : We are not using drools workbench UI to checkin our changes". What do you use the workbench repository for? Your comments imply you don't need the workbench webapp at all - in which case why try to re-use it's repository? > From calcacuervo at gmail.com Thu Jan 9 21:48:28 2014 From: calcacuervo at gmail.com (Demian Calcaprina) Date: Fri, 10 Jan 2014 00:48:28 -0200 Subject: [rules-users] What is the rest API to modify the import setting of a package in Guvnor? In-Reply-To: <1389317881760-4027638.post@n3.nabble.com> References: <1389261703130-4027621.post@n3.nabble.com> <1389282020080-4027630.post@n3.nabble.com> <1389317881760-4027638.post@n3.nabble.com> Message-ID: yup, by updating the drools asset I was meaning a PUT to the drools asset :) On Thu, Jan 9, 2014 at 10:38 PM, LeonJi wrote: > Thank you. > With put method to > "http://host:port > /guvnor/rest/packages/samplePackage/assets/drools/source", > it resolve my problem perfectly. > > calcacuervo wrote > > I think you have to do it manually, updating the "drools" asset from the > > package. > > > > About pointing to the global area, I have not found a way to do it > through > > the REST API. > > > > Demian > > > > > > -- > View this message in context: > http://drools.46999.n3.nabble.com/What-is-the-rest-API-to-modify-the-import-setting-of-a-package-in-Guvnor-tp4027621p4027638.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/20140110/fd99bba3/attachment.html From wtang at kana.com Fri Jan 10 03:24:51 2014 From: wtang at kana.com (wtang) Date: Fri, 10 Jan 2014 00:24:51 -0800 (PST) Subject: [rules-users] calling a function in When of DRL Message-ID: <1389342291523-4027641.post@n3.nabble.com> I need to call a java function in the LHS (When part of the DRL) like so: When eval(DataComparator.compare("key1", "key2")) where key1 and key2 are keys into a Map encapsulated by DataComparator class. How do I pass the Map to the DataComparator class in the first place. Do I have to do like so: eval(DataComparator.init(Map map) eval(DataComparator.compare("key1", "key2") This all seems like a bad hack to me. What are the standard best practice to achieve what I need? Also eval are slow why? is eval the only way to call a function in the When part? thx! -- View this message in context: http://drools.46999.n3.nabble.com/calling-a-function-in-When-of-DRL-tp4027641.html Sent from the Drools: User forum mailing list archive at Nabble.com. From wolfgang.laun at gmail.com Fri Jan 10 04:11:37 2014 From: wolfgang.laun at gmail.com (Wolfgang Laun) Date: Fri, 10 Jan 2014 10:11:37 +0100 Subject: [rules-users] calling a function in When of DRL In-Reply-To: <1389342291523-4027641.post@n3.nabble.com> References: <1389342291523-4027641.post@n3.nabble.com> Message-ID: The conditional element eval() expects a boolean expression. See Expert 6.0.x -- 7.8.3.8. Conditional Element eval, where it also explains why it is slower. For combining a void method call with the boolean evaluation, use a DRL function. See Expert 6.0.x -- 7.6. Function. function boolean initcomp( Map map, String s1, String s2 ){ ... } -W On 10/01/2014, wtang wrote: > I need to call a java function in the LHS (When part of the DRL) like so: > > When > > eval(DataComparator.compare("key1", "key2")) > > where key1 and key2 are keys into a Map encapsulated by DataComparator > class. How do I pass the Map to the DataComparator class in the first > place. Do I have to do like so: > > eval(DataComparator.init(Map map) > eval(DataComparator.compare("key1", "key2") > > This all seems like a bad hack to me. > > What are the standard best practice to achieve what I need? > > Also eval are slow why? is eval the only way to call a function in the > When > part? > > thx! > > > > -- > View this message in context: > http://drools.46999.n3.nabble.com/calling-a-function-in-When-of-DRL-tp4027641.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 w.gosztyla at deltavista.com Fri Jan 10 08:06:48 2014 From: w.gosztyla at deltavista.com (wogo) Date: Fri, 10 Jan 2014 05:06:48 -0800 (PST) Subject: [rules-users] How to feed camel-server with kmodules using kie-ci? Message-ID: <1389359208571-4027644.post@n3.nabble.com> Hi, I am trying to integrate drools-camel-server-example and kie-ci (6.0.1) plugin. My goal is to load modules from maven (built/deployed from kie-wb). Maven configuration looks fine, as MavenSettings are initialized while debugging (I see my repos). I do everything locally to make things simpler. Standalone code (from Eclipse) works fine with kie-cie - I execute "Underage" rule from mortgages example. I have built server with all kie-cie dependencies, however none of kmodules deployed in Maven is loaded. What am I missing? Is there anything special required in knowledge-services.xml (I have used a default one provided originally in .war)? Do you have an example of mortgages obtained via camel-server? Regards, Wojciech -- View this message in context: http://drools.46999.n3.nabble.com/How-to-feed-camel-server-with-kmodules-using-kie-ci-tp4027644.html Sent from the Drools: User forum mailing list archive at Nabble.com. From mproctor at codehaus.org Fri Jan 10 08:25:23 2014 From: mproctor at codehaus.org (Mark Proctor) Date: Fri, 10 Jan 2014 13:25:23 +0000 Subject: [rules-users] How to feed camel-server with kmodules using kie-ci? In-Reply-To: <1389359208571-4027644.post@n3.nabble.com> References: <1389359208571-4027644.post@n3.nabble.com> Message-ID: If the server is remote, did you populate your remote repositories using settings.xml? Mark On Fri, Jan 10, 2014 at 1:06 PM, wogo wrote: > Hi, > > I am trying to integrate drools-camel-server-example and kie-ci (6.0.1) > plugin. > > My goal is to load modules from maven (built/deployed from kie-wb). > Maven configuration looks fine, as MavenSettings are initialized while > debugging (I see my repos). > I do everything locally to make things simpler. > > Standalone code (from Eclipse) works fine with kie-cie - I execute > "Underage" rule from mortgages example. > > I have built server with all kie-cie dependencies, however none of kmodules > deployed in Maven is loaded. > > What am I missing? Is there anything special required in > knowledge-services.xml (I have used a default one provided originally in > .war)? > Do you have an example of mortgages obtained via camel-server? > > Regards, > Wojciech > > > > -- > View this message in context: > http://drools.46999.n3.nabble.com/How-to-feed-camel-server-with-kmodules-using-kie-ci-tp4027644.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/20140110/297b1896/attachment.html From w.gosztyla at deltavista.com Fri Jan 10 08:30:36 2014 From: w.gosztyla at deltavista.com (wogo) Date: Fri, 10 Jan 2014 05:30:36 -0800 (PST) Subject: [rules-users] load KIE JAR dynamically fails In-Reply-To: <1388929099720-4027520.post@n3.nabble.com> References: <1388929099720-4027520.post@n3.nabble.com> Message-ID: <1389360636933-4027646.post@n3.nabble.com> Hi, Please check if this dependency added to your standalone app help. There is no KnowledgeAgent in 6.0.x, replaced by KieScanner. org.kie kie-ci 6.0.1.Final Wojciech -- View this message in context: http://drools.46999.n3.nabble.com/load-KIE-JAR-dynamically-fails-tp4027520p4027646.html Sent from the Drools: User forum mailing list archive at Nabble.com. From w.gosztyla at deltavista.com Fri Jan 10 08:43:51 2014 From: w.gosztyla at deltavista.com (wogo) Date: Fri, 10 Jan 2014 05:43:51 -0800 (PST) Subject: [rules-users] How to feed camel-server with kmodules using kie-ci? In-Reply-To: References: <1389359208571-4027644.post@n3.nabble.com> Message-ID: <1389361431572-4027647.post@n3.nabble.com> Execution server and kie-wb are running on the same machine with one local repo. >From Eclipse: KieContainer kContainer = ks.newKieContainer(ks.newReleaseId("mortgages", "mortgages", "0.0.1")); works fine. camel-server does not resolve morgages, even though kie-ci is there :( Wojciech -- View this message in context: http://drools.46999.n3.nabble.com/How-to-feed-camel-server-with-kmodules-using-kie-ci-tp4027644p4027647.html Sent from the Drools: User forum mailing list archive at Nabble.com. From soumya.bose at plavaga.in Fri Jan 10 11:43:08 2014 From: soumya.bose at plavaga.in (Soumya.plavaga) Date: Fri, 10 Jan 2014 08:43:08 -0800 (PST) Subject: [rules-users] Is there any guvnor api, through which we can update the web guided decision table in drools 6.0.x? In-Reply-To: <4ED23D19-E091-4F29-8BAB-F98AF40AAF97@redhat.com> References: <1389249571532-4027618.post@n3.nabble.com> <1389279425971-4027629.post@n3.nabble.com> <4ED23D19-E091-4F29-8BAB-F98AF40AAF97@redhat.com> Message-ID: <1389372188516-4027649.post@n3.nabble.com> Hi, I have tried to push my resource using ssh://{userName}@localhost:8001/{repoName}. But it's saying authentication failed. I have not specified any password. Can you please let me know what is the default password it takes to push the change into guvnor repo? Where can I specify the user credentials like user name & password to access the above ssh url for push operation? Many Thanks, /.sb -- View this message in context: http://drools.46999.n3.nabble.com/Is-there-any-guvnor-api-through-which-we-can-update-the-web-guided-decision-table-in-drools-6-0-x-tp4027618p4027649.html Sent from the Drools: User forum mailing list archive at Nabble.com. From abhinay_agarwal at infosys.com Sat Jan 11 09:04:22 2014 From: abhinay_agarwal at infosys.com (abhinay_agarwal) Date: Sat, 11 Jan 2014 06:04:22 -0800 (PST) Subject: [rules-users] Using both Drop Down(Enumeration) and Text Field for a field in guvnor Message-ID: <1389449062912-4027656.post@n3.nabble.com> Heya, Is it possible to use both drop downs and text field for the same field in guvnor. For what I see now, is once I have made an enumeration for a field of a fact, I am bound to choose values from the drop down, which makes it difficult to use functionality of matches and using *. in guvnor. Regards, Abhinay -- View this message in context: http://drools.46999.n3.nabble.com/Using-both-Drop-Down-Enumeration-and-Text-Field-for-a-field-in-guvnor-tp4027656.html Sent from the Drools: User forum mailing list archive at Nabble.com. From ray.hooker at me.com Sat Jan 11 10:22:13 2014 From: ray.hooker at me.com (Ray Hooker) Date: Sat, 11 Jan 2014 10:22:13 -0500 Subject: [rules-users] Using both Drop Down(Enumeration) and Text Field for a field in guvnor In-Reply-To: <1389449062912-4027656.post@n3.nabble.com> References: <1389449062912-4027656.post@n3.nabble.com> Message-ID: <4DFB0E0F-98B4-46B8-9D1C-4784D3983E0F@me.com> This ties into a question, I had as well. I am trying to setup an environment to author rules that have codes associates within them. This is in the medical field where it would be nice to do a look-up. If it possible to extend the interface, possibly in the guided rule development to allow the user to select from a popup list?? It would be nice to use Guvnor rather than having to write a custom set of screens. Ray On Jan 11, 2014, at 9:04 AM, abhinay_agarwal wrote: > Heya, > > Is it possible to use both drop downs and text field for the same field in > guvnor. For what I see now, is once I have made an enumeration for a field > of a fact, I am bound to choose values from the drop down, which makes it > difficult to use functionality of matches and using *. in guvnor. > > Regards, > Abhinay > > > > -- > View this message in context: http://drools.46999.n3.nabble.com/Using-both-Drop-Down-Enumeration-and-Text-Field-for-a-field-in-guvnor-tp4027656.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 michael.anstis at gmail.com Sat Jan 11 15:54:51 2014 From: michael.anstis at gmail.com (Michael Anstis) Date: Sat, 11 Jan 2014 20:54:51 +0000 Subject: [rules-users] Using both Drop Down(Enumeration) and Text Field for a field in guvnor In-Reply-To: <4DFB0E0F-98B4-46B8-9D1C-4784D3983E0F@me.com> References: <1389449062912-4027656.post@n3.nabble.com> <4DFB0E0F-98B4-46B8-9D1C-4784D3983E0F@me.com> Message-ID: 1) No, you can't have ab enumeration defined and expect to have a text box to enter a value. 2) You can define an enumeration that look up their values from elsewhere. Please see the Advanced Enum Concepts section in the user guide. Sent on the move On 11 Jan 2014 15:22, "Ray Hooker" wrote: > This ties into a question, I had as well. I am trying to setup an > environment to author rules that have codes associates within them. This > is in the medical field where it would be nice to do a look-up. If it > possible to extend the interface, possibly in the guided rule development > to allow the user to select from a popup list?? It would be nice to use > Guvnor rather than having to write a custom set of screens. > > > Ray > On Jan 11, 2014, at 9:04 AM, abhinay_agarwal > wrote: > > > Heya, > > > > Is it possible to use both drop downs and text field for the same field > in > > guvnor. For what I see now, is once I have made an enumeration for a > field > > of a fact, I am bound to choose values from the drop down, which makes it > > difficult to use functionality of matches and using *. in guvnor. > > > > Regards, > > Abhinay > > > > > > > > -- > > View this message in context: > http://drools.46999.n3.nabble.com/Using-both-Drop-Down-Enumeration-and-Text-Field-for-a-field-in-guvnor-tp4027656.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/20140111/23cd7a62/attachment.html From ray.hooker at me.com Sat Jan 11 22:54:29 2014 From: ray.hooker at me.com (Ray Hooker) Date: Sat, 11 Jan 2014 22:54:29 -0500 Subject: [rules-users] Using both Drop Down(Enumeration) and Text Field for a field in guvnor In-Reply-To: References: <1389449062912-4027656.post@n3.nabble.com> <4DFB0E0F-98B4-46B8-9D1C-4784D3983E0F@me.com> Message-ID: <771F73BE-8DBE-4245-9C76-DE908BB2B83B@me.com> Michael, It looks promising. The question is whether I can have something like a select that has a text and a value that returned. For example the value RxNorm=617314 is actually ?Atorvastain or Lipitor?. If this was a typically select box, we could populate both the text (e.g., "Atorvastain or Lipitor?) and the value to be returned (e.g., 617314). The resulting rule would only have the code. Ray On Jan 11, 2014, at 3:54 PM, Michael Anstis wrote: > 1) No, you can't have ab enumeration defined and expect to have a text box to enter a value. > > 2) You can define an enumeration that look up their values from elsewhere. Please see the Advanced Enum Concepts section in the user guide. > > Sent on the move > > On 11 Jan 2014 15:22, "Ray Hooker" wrote: > This ties into a question, I had as well. I am trying to setup an environment to author rules that have codes associates within them. This is in the medical field where it would be nice to do a look-up. If it possible to extend the interface, possibly in the guided rule development to allow the user to select from a popup list?? It would be nice to use Guvnor rather than having to write a custom set of screens. > > > Ray > On Jan 11, 2014, at 9:04 AM, abhinay_agarwal wrote: > > > Heya, > > > > Is it possible to use both drop downs and text field for the same field in > > guvnor. For what I see now, is once I have made an enumeration for a field > > of a fact, I am bound to choose values from the drop down, which makes it > > difficult to use functionality of matches and using *. in guvnor. > > > > Regards, > > Abhinay > > > > > > > > -- > > View this message in context: http://drools.46999.n3.nabble.com/Using-both-Drop-Down-Enumeration-and-Text-Field-for-a-field-in-guvnor-tp4027656.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 -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.jboss.org/pipermail/rules-users/attachments/20140111/77d393ff/attachment.html From michael.anstis at gmail.com Sun Jan 12 00:23:19 2014 From: michael.anstis at gmail.com (Michael Anstis) Date: Sun, 12 Jan 2014 05:23:19 +0000 Subject: [rules-users] Using both Drop Down(Enumeration) and Text Field for a field in guvnor In-Reply-To: <771F73BE-8DBE-4245-9C76-DE908BB2B83B@me.com> References: <1389449062912-4027656.post@n3.nabble.com> <4DFB0E0F-98B4-46B8-9D1C-4784D3983E0F@me.com> <771F73BE-8DBE-4245-9C76-DE908BB2B83B@me.com> Message-ID: Yes you can. Use an equals symbol to separate value/code and text. For example M=Male. The user guide should contain details. Sent on the move On 12 Jan 2014 03:55, "Ray Hooker" wrote: > Michael, It looks promising. The question is whether I can have > something like a select that has a text and a value that returned. For > example the value RxNorm=617314 is actually ?Atorvastain or Lipitor?. If > this was a typically select box, we could populate both the text (e.g., > "Atorvastain or Lipitor?) and the value to be returned (e.g., 617314). The > resulting rule would only have the code. > > Ray > On Jan 11, 2014, at 3:54 PM, Michael Anstis > wrote: > > 1) No, you can't have ab enumeration defined and expect to have a text box > to enter a value. > > 2) You can define an enumeration that look up their values from elsewhere. > Please see the Advanced Enum Concepts section in the user guide. > > Sent on the move > On 11 Jan 2014 15:22, "Ray Hooker" wrote: > >> This ties into a question, I had as well. I am trying to setup an >> environment to author rules that have codes associates within them. This >> is in the medical field where it would be nice to do a look-up. If it >> possible to extend the interface, possibly in the guided rule development >> to allow the user to select from a popup list?? It would be nice to use >> Guvnor rather than having to write a custom set of screens. >> >> >> Ray >> On Jan 11, 2014, at 9:04 AM, abhinay_agarwal >> wrote: >> >> > Heya, >> > >> > Is it possible to use both drop downs and text field for the same field >> in >> > guvnor. For what I see now, is once I have made an enumeration for a >> field >> > of a fact, I am bound to choose values from the drop down, which makes >> it >> > difficult to use functionality of matches and using *. in guvnor. >> > >> > Regards, >> > Abhinay >> > >> > >> > >> > -- >> > View this message in context: >> http://drools.46999.n3.nabble.com/Using-both-Drop-Down-Enumeration-and-Text-Field-for-a-field-in-guvnor-tp4027656.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 > > > > _______________________________________________ > 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/20140112/c1799646/attachment.html From nxvanderlinden at gmail.com Sun Jan 12 14:21:23 2014 From: nxvanderlinden at gmail.com (nxv) Date: Sun, 12 Jan 2014 11:21:23 -0800 (PST) Subject: [rules-users] 5.6.0.CR1 gives a NullPointerException in after evaluator In-Reply-To: <528A28BB.5000504@gmail.com> References: <1384422481565-4026780.post@n3.nabble.com> <528A28BB.5000504@gmail.com> Message-ID: <1389554483012-4027661.post@n3.nabble.com> Hello, I'm able to reproduce this issue with a KB containing only 1 rule. rule "Qualification##ToControl" salience 50 when $p: AccessRegisterSnapshot( $effDt: effectivedate ) $dpo: DeliveryPoint() $gCfg: GeneralConfig( ( todate == null || ( todate after[ 0d ] $effDt && todate after[ 1ms ] fromdate ) ) ) from $dpo.generalConfigs then end This rule worked under drools 5.5.0.Final. Caused by: java.lang.NullPointerException at org.drools.base.evaluators.AfterEvaluatorDefinition$AfterEvaluator.evaluate(AfterEvaluatorDefinition.java:347) at org.drools.base.EvaluatorWrapper.evaluate(EvaluatorWrapper.java:99) Davide Sottara wrote > I tried to reproduce the problem, with no success. > Could you please create a self-contained unit test? > If confirmed, I'll fix the problem as soon as possible > Thanks > Davide > > On 11/14/2013 04:48 AM, abr wrote: >> Hi everyone, >> >> I tried to switch from 5.5.0.Final to 5.6.0.CR1 and got a null pointer >> exception in the evaluation of the after evaluator. >> (Exact method is: >> /org.drools.base.evaluators.AfterEvaluatorDefinition.AfterEvaluator.evaluate(InternalWorkingMemory, >> InternalReadAccessor, InternalFactHandle, InternalReadAccessor, >> InternalFactHandle)/ ) >> >> When debugging, the exception occurs at the very first line of the >> method, >> in: >> / if ( extractor1.isNullValue( workingMemory, handle1.getObject() ) || >> extractor2.isNullValue( workingMemory, handle2.getObject() ) >> ) { >> return false; >> } >> / >> The cause of the exception is that handle1 is null. >> >> The rule where the exception occurs looks like: >> / MyFact( >> fromdate before[ 0d ] $min, >> ( todate == null || todate after[ 0d ] $max ) ) >> / >> >> When the exception occurs, /MyFact.fromdate/ is not null, /$min/ is not >> null, /MyFact.todate/ is null, /$max/ is not null. >> In AfterEvaluator.evaluate : /extractor1/ refers to /MyFact.todate/, >> /extractor2/ refers to /$max/, /handle1/ is null, /handle2/ refers to the >> fact including the attribute to which /$max/ variable is bound to. >> >> Of course, this worked fine in 5.5.0.Final. >> I couldn't test this out in Drools 6.0.0.CR5 because I have dependencies >> to >> drools-spring JAR that does not exist anymore in 6.0.0.CR5. >> >> Is it simple to fix this problem? >> >> Thanks in advance. >> >> Best, >> Alexis >> >> >> >> -- >> View this message in context: >> http://drools.46999.n3.nabble.com/5-6-0-CR1-gives-a-NullPointerException-in-after-evaluator-tp4026780.html >> Sent from the Drools: User forum mailing list archive at Nabble.com. >> _______________________________________________ >> rules-users mailing list >> > rules-users at .jboss >> https://lists.jboss.org/mailman/listinfo/rules-users >> > > _______________________________________________ > rules-users mailing list > rules-users at .jboss > https://lists.jboss.org/mailman/listinfo/rules-users -- View this message in context: http://drools.46999.n3.nabble.com/5-6-0-CR1-gives-a-NullPointerException-in-after-evaluator-tp4026780p4027661.html Sent from the Drools: User forum mailing list archive at Nabble.com. From mproctor at codehaus.org Mon Jan 13 02:05:29 2014 From: mproctor at codehaus.org (Mark Proctor) Date: Mon, 13 Jan 2014 07:05:29 +0000 Subject: [rules-users] 5.6.0.CR1 gives a NullPointerException in after evaluator In-Reply-To: <1389554483012-4027661.post@n3.nabble.com> References: <1384422481565-4026780.post@n3.nabble.com> <528A28BB.5000504@gmail.com> <1389554483012-4027661.post@n3.nabble.com> Message-ID: <22E63BB3-B4C1-4339-9E5D-3D11ADC656B1@codehaus.org> That was recreated on 5.6.0.CR1 ? The 5.6 ship has sailed now :( and currently there are no plans for 5.7 any time soon. We should focus on making sure this is fixed in 6.x. Mark On 12 Jan 2014, at 19:21, nxv wrote: > Hello, > > I'm able to reproduce this issue with a KB containing only 1 rule. > > rule "Qualification##ToControl" > salience 50 > when > $p: AccessRegisterSnapshot( > $effDt: effectivedate ) > $dpo: DeliveryPoint() > $gCfg: GeneralConfig( > ( todate == null || > ( todate after[ 0d ] $effDt && > todate after[ 1ms ] fromdate ) ) ) > from $dpo.generalConfigs > then > > end > > This rule worked under drools 5.5.0.Final. > > Caused by: java.lang.NullPointerException at > org.drools.base.evaluators.AfterEvaluatorDefinition$AfterEvaluator.evaluate(AfterEvaluatorDefinition.java:347) > at org.drools.base.EvaluatorWrapper.evaluate(EvaluatorWrapper.java:99) > > > > > Davide Sottara wrote >> I tried to reproduce the problem, with no success. >> Could you please create a self-contained unit test? >> If confirmed, I'll fix the problem as soon as possible >> Thanks >> Davide >> >> On 11/14/2013 04:48 AM, abr wrote: >>> Hi everyone, >>> >>> I tried to switch from 5.5.0.Final to 5.6.0.CR1 and got a null pointer >>> exception in the evaluation of the after evaluator. >>> (Exact method is: >>> /org.drools.base.evaluators.AfterEvaluatorDefinition.AfterEvaluator.evaluate(InternalWorkingMemory, >>> InternalReadAccessor, InternalFactHandle, InternalReadAccessor, >>> InternalFactHandle)/ ) >>> >>> When debugging, the exception occurs at the very first line of the >>> method, >>> in: >>> / if ( extractor1.isNullValue( workingMemory, handle1.getObject() ) || >>> extractor2.isNullValue( workingMemory, handle2.getObject() ) >>> ) { >>> return false; >>> } >>> / >>> The cause of the exception is that handle1 is null. >>> >>> The rule where the exception occurs looks like: >>> / MyFact( >>> fromdate before[ 0d ] $min, >>> ( todate == null || todate after[ 0d ] $max ) ) >>> / >>> >>> When the exception occurs, /MyFact.fromdate/ is not null, /$min/ is not >>> null, /MyFact.todate/ is null, /$max/ is not null. >>> In AfterEvaluator.evaluate : /extractor1/ refers to /MyFact.todate/, >>> /extractor2/ refers to /$max/, /handle1/ is null, /handle2/ refers to the >>> fact including the attribute to which /$max/ variable is bound to. >>> >>> Of course, this worked fine in 5.5.0.Final. >>> I couldn't test this out in Drools 6.0.0.CR5 because I have dependencies >>> to >>> drools-spring JAR that does not exist anymore in 6.0.0.CR5. >>> >>> Is it simple to fix this problem? >>> >>> Thanks in advance. >>> >>> Best, >>> Alexis >>> >>> >>> >>> -- >>> View this message in context: >>> http://drools.46999.n3.nabble.com/5-6-0-CR1-gives-a-NullPointerException-in-after-evaluator-tp4026780.html >>> Sent from the Drools: User forum mailing list archive at Nabble.com. >>> _______________________________________________ >>> rules-users mailing list >>> > >> rules-users at .jboss > >>> https://lists.jboss.org/mailman/listinfo/rules-users >>> >> >> _______________________________________________ >> rules-users mailing list > >> rules-users at .jboss > >> https://lists.jboss.org/mailman/listinfo/rules-users > > > > > > -- > View this message in context: http://drools.46999.n3.nabble.com/5-6-0-CR1-gives-a-NullPointerException-in-after-evaluator-tp4026780p4027661.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/20140113/8678d05f/attachment.html From swapnilaute at gmail.com Mon Jan 13 02:23:26 2014 From: swapnilaute at gmail.com (neal) Date: Sun, 12 Jan 2014 23:23:26 -0800 (PST) Subject: [rules-users] How to do status management in drool workbench 6.0.1? Message-ID: <1389597806579-4027663.post@n3.nabble.com> How to do status management in drool workbench 6.0.1? We had status management in the drools guvnor older version through which i can i put my assets in draft/in-review status.What is the new way to do it? -- View this message in context: http://drools.46999.n3.nabble.com/How-to-do-status-management-in-drool-workbench-6-0-1-tp4027663.html Sent from the Drools: User forum mailing list archive at Nabble.com. From michael.anstis at gmail.com Mon Jan 13 02:48:00 2014 From: michael.anstis at gmail.com (Michael Anstis) Date: Mon, 13 Jan 2014 07:48:00 +0000 Subject: [rules-users] How to do status management in drool workbench 6.0.1? In-Reply-To: <1389597806579-4027663.post@n3.nabble.com> References: <1389597806579-4027663.post@n3.nabble.com> Message-ID: At present there is no alternative. We removed the old "status" management from Guvnor as it, together with build selectors and categories (that don't have any role in 6.0) is all were considered a hack/bodge for lack of real workflow management within the tool. 6.0 has the skeletal infrastructure for a pluggable workflow service that we want to expand upon subsequent releases. This, when fully implemented, will provide for equivalent functionality. Sent on the move On 13 Jan 2014 07:26, "neal" wrote: > How to do status management in drool workbench 6.0.1? > We had status management in the drools guvnor older version through which i > can i put my assets in draft/in-review status.What is the new way to do it? > > > > -- > View this message in context: > http://drools.46999.n3.nabble.com/How-to-do-status-management-in-drool-workbench-6-0-1-tp4027663.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/20140113/64153669/attachment.html From ken.helmes at iprocesses.com Mon Jan 13 02:51:55 2014 From: ken.helmes at iprocesses.com (kenhelmes) Date: Sun, 12 Jan 2014 23:51:55 -0800 (PST) Subject: [rules-users] Process' RulesetNode and SplitNode working memory Message-ID: <1389599515078-4027665.post@n3.nabble.com> Hello, I am working on proof-of-concept with the Process API. A small cutout of code shows an example process: startnode->actionnode->rulesetnode-splitnode(gateway). The process flow starts and runs normally. However, the splitnode constraint does not seem to use the working memory of the rulesetnode and never finds a rule hit. Does the splitnode constraint rule generated by drools, use the same working memory as the rulesetnodes? If a rulesetnode has one ruleflow-group, is there a way to put the splitnode constraint rule into the same ruleflow-group? // Nodes .startNode(1) .name("Start") .done() .actionNode(2) .name("Action") .action("java", "System.out.println(\"Starting process\");") .done() .ruleSetNode(3) .name("City is in list") .ruleFlowGroup("CityRules") .done() // Gateway .splitNode(11) .name("Split 11") .type(Split.TYPE_XOR) .constraint(4, "yes", "rule", "mvel", "City(name == \"Copenhagen\")") .constraint(92, "no", "rule", "mvel", "not City(name == \"Copenhagen\")") .done() -- View this message in context: http://drools.46999.n3.nabble.com/Process-RulesetNode-and-SplitNode-working-memory-tp4027665.html Sent from the Drools: User forum mailing list archive at Nabble.com. From abhinay_agarwal at infosys.com Mon Jan 13 03:55:28 2014 From: abhinay_agarwal at infosys.com (abhinay_agarwal) Date: Mon, 13 Jan 2014 00:55:28 -0800 (PST) Subject: [rules-users] Using both Drop Down(Enumeration) and Text Field for a field in guvnor In-Reply-To: References: <1389449062912-4027656.post@n3.nabble.com> <4DFB0E0F-98B4-46B8-9D1C-4784D3983E0F@me.com> Message-ID: <1389603328640-4027666.post@n3.nabble.com> Hi mike, I am using advanced enum concepts, and my drop down values from the database for a field lets say location. When i use simple rule, it works fine. But, lets suppose I have a rule in which I have to find if a particular string is inside location. LOCATION like %USA%; So inside guvnor i can write LOCATION matches .*USA.* But, while using enumerations, I don't get an option to write that. I can just write: LOCATION matches USA which I guess is wrong. Please let me know, if I can achieve what I want through guvnor or is it out of the scope of the application. Furthermore, if this functionality doesn't exists, I guess it would be a great idea to allow user to decide if he wants to select data from list or type something, because one rule may want the former and the second rule the latter. Regards, Abhinay -- View this message in context: http://drools.46999.n3.nabble.com/Using-both-Drop-Down-Enumeration-and-Text-Field-for-a-field-in-guvnor-tp4027656p4027666.html Sent from the Drools: User forum mailing list archive at Nabble.com. From michael.anstis at gmail.com Mon Jan 13 04:08:18 2014 From: michael.anstis at gmail.com (Michael Anstis) Date: Mon, 13 Jan 2014 09:08:18 +0000 Subject: [rules-users] Using both Drop Down(Enumeration) and Text Field for a field in guvnor In-Reply-To: <1389603328640-4027666.post@n3.nabble.com> References: <1389449062912-4027656.post@n3.nabble.com> <4DFB0E0F-98B4-46B8-9D1C-4784D3983E0F@me.com> <1389603328640-4027666.post@n3.nabble.com> Message-ID: You'd have to add both literal values to your enum definition: USA .*USA* Sent on the move On 13 Jan 2014 08:56, "abhinay_agarwal" wrote: > Hi mike, > > I am using advanced enum concepts, and my drop down values from the > database > for a field lets say location. > > When i use simple rule, it works fine. But, lets suppose I have a rule in > which I have to find if a particular string is inside location. > > LOCATION like %USA%; > > So inside guvnor i can write > > LOCATION matches .*USA.* > > But, while using enumerations, I don't get an option to write that. I can > just write: > > LOCATION matches USA > > which I guess is wrong. > > Please let me know, if I can achieve what I want through guvnor or is it > out > of the scope of the application. > > Furthermore, if this functionality doesn't exists, I guess it would be a > great idea to allow user to decide if he wants to select data from list or > type something, because one rule may want the former and the second rule > the > latter. > > Regards, > Abhinay > > > > -- > View this message in context: > http://drools.46999.n3.nabble.com/Using-both-Drop-Down-Enumeration-and-Text-Field-for-a-field-in-guvnor-tp4027656p4027666.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/20140113/e85abd17/attachment-0001.html From abhinay_agarwal at infosys.com Mon Jan 13 04:35:05 2014 From: abhinay_agarwal at infosys.com (abhinay_agarwal) Date: Mon, 13 Jan 2014 01:35:05 -0800 (PST) Subject: [rules-users] Using both Drop Down(Enumeration) and Text Field for a field in guvnor In-Reply-To: References: <1389449062912-4027656.post@n3.nabble.com> <4DFB0E0F-98B4-46B8-9D1C-4784D3983E0F@me.com> <1389603328640-4027666.post@n3.nabble.com> Message-ID: <1389605705683-4027668.post@n3.nabble.com> My data is getting loaded from Database, so I may not be able to alter the enum. I guess this is the limited scope of the tool. Anyways, this is a good functionality that can be added to the tool :) Thanks, Abhinay -- View this message in context: http://drools.46999.n3.nabble.com/Using-both-Drop-Down-Enumeration-and-Text-Field-for-a-field-in-guvnor-tp4027656p4027668.html Sent from the Drools: User forum mailing list archive at Nabble.com. From michael.anstis at gmail.com Mon Jan 13 05:15:34 2014 From: michael.anstis at gmail.com (Michael Anstis) Date: Mon, 13 Jan 2014 10:15:34 +0000 Subject: [rules-users] Using both Drop Down(Enumeration) and Text Field for a field in guvnor In-Reply-To: <1389605705683-4027668.post@n3.nabble.com> References: <1389449062912-4027656.post@n3.nabble.com> <4DFB0E0F-98B4-46B8-9D1C-4784D3983E0F@me.com> <1389603328640-4027666.post@n3.nabble.com> <1389605705683-4027668.post@n3.nabble.com> Message-ID: In your helper class, that loads the values, from the database you can add the additional "matches" values manually. Sent on the move On 13 Jan 2014 09:35, "abhinay_agarwal" wrote: > My data is getting loaded from Database, so I may not be able to alter the > enum. > > I guess this is the limited scope of the tool. Anyways, this is a good > functionality that can be added to the tool :) > > Thanks, > Abhinay > > > > -- > View this message in context: > http://drools.46999.n3.nabble.com/Using-both-Drop-Down-Enumeration-and-Text-Field-for-a-field-in-guvnor-tp4027656p4027668.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/20140113/3fba27d5/attachment.html From dsotty at gmail.com Mon Jan 13 06:02:51 2014 From: dsotty at gmail.com (Davide Sottara) Date: Mon, 13 Jan 2014 12:02:51 +0100 Subject: [rules-users] 5.6.0.CR1 gives a NullPointerException in after evaluator In-Reply-To: <22E63BB3-B4C1-4339-9E5D-3D11ADC656B1@codehaus.org> References: <1384422481565-4026780.post@n3.nabble.com> <528A28BB.5000504@gmail.com> <1389554483012-4027661.post@n3.nabble.com> <22E63BB3-B4C1-4339-9E5D-3D11ADC656B1@codehaus.org> Message-ID: <52D3C7DB.4050205@gmail.com> This is unlikely to be the same exception that started the initial thread, but a problem nevertheless.. :( could you create a self-contained test case and submit it? Thanks Davide On 01/13/2014 08:05 AM, Mark Proctor wrote: > That was recreated on 5.6.0.CR1 ? The 5.6 ship has sailed now :( and > currently there are no plans for 5.7 any time soon. We should focus on > making sure this is fixed in 6.x. > > Mark > On 12 Jan 2014, at 19:21, nxv > wrote: > >> Hello, >> >> I'm able to reproduce this issue with a KB containing only 1 rule. >> >> rule "Qualification##ToControl" >> salience 50 >> when >> $p: AccessRegisterSnapshot( >> $effDt: effectivedate ) >> $dpo: DeliveryPoint() >> $gCfg: GeneralConfig( >> ( todate == null || >> ( todate after[ 0d ] $effDt && >> todate after[ 1ms ] fromdate ) ) ) >> from $dpo.generalConfigs >> then >> >> end >> >> This rule worked under drools 5.5.0.Final. >> >> Caused by: java.lang.NullPointerException at >> org.drools.base.evaluators.AfterEvaluatorDefinition$AfterEvaluator.evaluate(AfterEvaluatorDefinition.java:347) >> at org.drools.base.EvaluatorWrapper.evaluate(EvaluatorWrapper.java:99) >> >> >> >> >> Davide Sottara wrote >>> I tried to reproduce the problem, with no success. >>> Could you please create a self-contained unit test? >>> If confirmed, I'll fix the problem as soon as possible >>> Thanks >>> Davide >>> >>> On 11/14/2013 04:48 AM, abr wrote: >>>> Hi everyone, >>>> >>>> I tried to switch from 5.5.0.Final to 5.6.0.CR1 and got a null pointer >>>> exception in the evaluation of the after evaluator. >>>> (Exact method is: >>>> /org.drools.base.evaluators.AfterEvaluatorDefinition.AfterEvaluator.evaluate(InternalWorkingMemory, >>>> InternalReadAccessor, InternalFactHandle, InternalReadAccessor, >>>> InternalFactHandle)/ ) >>>> >>>> When debugging, the exception occurs at the very first line of the >>>> method, >>>> in: >>>> / if ( extractor1.isNullValue( workingMemory, >>>> handle1.getObject() ) || >>>> extractor2.isNullValue( workingMemory, handle2.getObject() ) >>>> ) { >>>> return false; >>>> } >>>> / >>>> The cause of the exception is that handle1 is null. >>>> >>>> The rule where the exception occurs looks like: >>>> / MyFact( >>>> fromdate before[ 0d ] $min, >>>> ( todate == null || todate after[ 0d ] $max ) ) >>>> / >>>> >>>> When the exception occurs, /MyFact.fromdate/ is not null, /$min/ is not >>>> null, /MyFact.todate/ is null, /$max/ is not null. >>>> In AfterEvaluator.evaluate : /extractor1/ refers to /MyFact.todate/, >>>> /extractor2/ refers to /$max/, /handle1/ is null, /handle2/ refers >>>> to the >>>> fact including the attribute to which /$max/ variable is bound to. >>>> >>>> Of course, this worked fine in 5.5.0.Final. >>>> I couldn't test this out in Drools 6.0.0.CR5 because I have >>>> dependencies >>>> to >>>> drools-spring JAR that does not exist anymore in 6.0.0.CR5. >>>> >>>> Is it simple to fix this problem? >>>> >>>> Thanks in advance. >>>> >>>> Best, >>>> Alexis >>>> >>>> >>>> >>>> -- >>>> View this message in context: >>>> http://drools.46999.n3.nabble.com/5-6-0-CR1-gives-a-NullPointerException-in-after-evaluator-tp4026780.html >>>> Sent from the Drools: User forum mailing list archive at Nabble.com. >>>> _______________________________________________ >>>> rules-users mailing list >>>> >> >>> rules-users at .jboss >> >>>> https://lists.jboss.org/mailman/listinfo/rules-users >>>> >>> >>> _______________________________________________ >>> rules-users mailing list >> >>> rules-users at .jboss >> >>> https://lists.jboss.org/mailman/listinfo/rules-users >> >> >> >> >> >> -- >> View this message in >> context: http://drools.46999.n3.nabble.com/5-6-0-CR1-gives-a-NullPointerException-in-after-evaluator-tp4026780p4027661.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/20140113/995eb648/attachment.html From abhinay_agarwal at infosys.com Mon Jan 13 06:31:42 2014 From: abhinay_agarwal at infosys.com (abhinay_agarwal) Date: Mon, 13 Jan 2014 03:31:42 -0800 (PST) Subject: [rules-users] Using both Drop Down(Enumeration) and Text Field for a field in guvnor In-Reply-To: References: <1389449062912-4027656.post@n3.nabble.com> <4DFB0E0F-98B4-46B8-9D1C-4784D3983E0F@me.com> <1389603328640-4027666.post@n3.nabble.com> <1389605705683-4027668.post@n3.nabble.com> Message-ID: <1389612702203-4027671.post@n3.nabble.com> I want the rules to be written by the business users, not by the developers. In my scenario, the developers have no idea about the conditions that the business user may write. Regards, Abhinay -- View this message in context: http://drools.46999.n3.nabble.com/Using-both-Drop-Down-Enumeration-and-Text-Field-for-a-field-in-guvnor-tp4027656p4027671.html Sent from the Drools: User forum mailing list archive at Nabble.com. From stephen.masters at me.com Mon Jan 13 06:52:56 2014 From: stephen.masters at me.com (Stephen Masters) Date: Mon, 13 Jan 2014 11:52:56 +0000 Subject: [rules-users] Using both Drop Down(Enumeration) and Text Field for a field in guvnor In-Reply-To: <1389612702203-4027671.post@n3.nabble.com> References: <1389449062912-4027656.post@n3.nabble.com> <4DFB0E0F-98B4-46B8-9D1C-4784D3983E0F@me.com> <1389603328640-4027666.post@n3.nabble.com> <1389605705683-4027668.post@n3.nabble.com> <1389612702203-4027671.post@n3.nabble.com> Message-ID: Of course, you could just create multiple get/set methods for an attribute. String myConstraint; getPredefinedConstraint() { return myConstraint; } setPredefinedConstraint(String predefinedConstraint) { this.myConstraint = predefinedConstraint; } getUnrestrictedConstraint() { return myConstraint; } setUnrestrictedConstraint(String unrestrictedConstraint) { this.myConstraint = unrestrictedConstraint; } Then you can define an enumeration for the ?predefined? constraint and not for the ?unrestricted? constraint. That way your users can choose to define a constraint on a random value of their choosing if they feel that they know better. This whole idea does rather defeat the point of enumerations though... Steve On 13 Jan 2014, at 11:31, abhinay_agarwal wrote: > I want the rules to be written by the business users, not by the developers. > > In my scenario, the developers have no idea about the conditions that the > business user may write. > > Regards, > Abhinay > > > > -- > View this message in context: http://drools.46999.n3.nabble.com/Using-both-Drop-Down-Enumeration-and-Text-Field-for-a-field-in-guvnor-tp4027656p4027671.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 abhinay_agarwal at infosys.com Mon Jan 13 07:35:57 2014 From: abhinay_agarwal at infosys.com (abhinay_agarwal) Date: Mon, 13 Jan 2014 04:35:57 -0800 (PST) Subject: [rules-users] Using both Drop Down(Enumeration) and Text Field for a field in guvnor In-Reply-To: References: <1389449062912-4027656.post@n3.nabble.com> <4DFB0E0F-98B4-46B8-9D1C-4784D3983E0F@me.com> <1389603328640-4027666.post@n3.nabble.com> <1389605705683-4027668.post@n3.nabble.com> <1389612702203-4027671.post@n3.nabble.com> Message-ID: <1389616557689-4027673.post@n3.nabble.com> Hi Steve, I don't see the point how this would resolve my issue ? Suppose I have name and i have few data in database as John, Frank, Joseph, John Mc Guin. Now, to make work easy for business users and to be sure they don't make a mistake, I want to provide these data as enums in guvnor. So, the user can check for data like : name equals John etc. But, the user has a scenario where he wants to check if John is present in a name or not. So the condition should be name equals .*John.* But, coz I am using enum, no .* functionality is available. The only scenario which I can see is (dont know whether it wud work or not) setName(String name) { this.name = ".*" + name + ".*"; } But how do I make things easy for business users, I can't just overpopulate the list. Thanks, Abhinay -- View this message in context: http://drools.46999.n3.nabble.com/Using-both-Drop-Down-Enumeration-and-Text-Field-for-a-field-in-guvnor-tp4027656p4027673.html Sent from the Drools: User forum mailing list archive at Nabble.com. From stephen.masters at me.com Mon Jan 13 07:44:36 2014 From: stephen.masters at me.com (Stephen Masters) Date: Mon, 13 Jan 2014 12:44:36 +0000 Subject: [rules-users] Using both Drop Down(Enumeration) and Text Field for a field in guvnor In-Reply-To: <1389616557689-4027673.post@n3.nabble.com> References: <1389449062912-4027656.post@n3.nabble.com> <4DFB0E0F-98B4-46B8-9D1C-4784D3983E0F@me.com> <1389603328640-4027666.post@n3.nabble.com> <1389605705683-4027668.post@n3.nabble.com> <1389612702203-4027671.post@n3.nabble.com> <1389616557689-4027673.post@n3.nabble.com> Message-ID: <1A268212-DAC9-433A-BCAF-AD0D18968B62@me.com> Ah ? I was looking at the original request about being able to set a value using a text field or an enumeration. It would appear that?s no longer the topic. For examples like that, you might be better off using a DSL. That way you could have a nice phrase with a drop-down menu driven by your enumeration, but the code generated could generate DRL with ?matches'. On 13 Jan 2014, at 12:35, abhinay_agarwal wrote: > Hi Steve, > > I don't see the point how this would resolve my issue ? > > Suppose I have name and i have few data in database as John, Frank, Joseph, > John Mc Guin. > > Now, to make work easy for business users and to be sure they don't make a > mistake, I want to provide these data as enums in guvnor. > > So, the user can check for data like : > > name equals John etc. > > But, the user has a scenario where he wants to check if John is present in a > name or not. So the condition should be > > name equals .*John.* > > But, coz I am using enum, no .* functionality is available. > > The only scenario which I can see is (dont know whether it wud work or not) > > setName(String name) > { > this.name = ".*" + name + ".*"; > } > > But how do I make things easy for business users, I can't just overpopulate > the list. > > Thanks, > Abhinay > > > > -- > View this message in context: http://drools.46999.n3.nabble.com/Using-both-Drop-Down-Enumeration-and-Text-Field-for-a-field-in-guvnor-tp4027656p4027673.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 soumya.bose at plavaga.in Mon Jan 13 09:24:10 2014 From: soumya.bose at plavaga.in (Soumya.plavaga) Date: Mon, 13 Jan 2014 06:24:10 -0800 (PST) Subject: [rules-users] Is there any guvnor api, through which we can update the web guided decision table in drools 6.0.x? In-Reply-To: <1389372188516-4027649.post@n3.nabble.com> References: <1389249571532-4027618.post@n3.nabble.com> <1389279425971-4027629.post@n3.nabble.com> <4ED23D19-E091-4F29-8BAB-F98AF40AAF97@redhat.com> <1389372188516-4027649.post@n3.nabble.com> Message-ID: <1389623050246-4027675.post@n3.nabble.com> Can you please help me with this please? How to disable default user authentication to checkin my resource into remote guvnor repo (ssh://localhost/{repoName}) or how to use my public ssh key for this? -- View this message in context: http://drools.46999.n3.nabble.com/Is-there-any-guvnor-api-through-which-we-can-update-the-web-guided-decision-table-in-drools-6-0-x-tp4027618p4027675.html Sent from the Drools: User forum mailing list archive at Nabble.com. From nxvanderlinden at gmail.com Mon Jan 13 16:14:16 2014 From: nxvanderlinden at gmail.com (nxv) Date: Mon, 13 Jan 2014 13:14:16 -0800 (PST) Subject: [rules-users] 5.6.0.CR1 gives a NullPointerException in after evaluator In-Reply-To: <52D3C7DB.4050205@gmail.com> References: <1384422481565-4026780.post@n3.nabble.com> <528A28BB.5000504@gmail.com> <1389554483012-4027661.post@n3.nabble.com> <22E63BB3-B4C1-4339-9E5D-3D11ADC656B1@codehaus.org> <52D3C7DB.4050205@gmail.com> Message-ID: <1389647656002-4027676.post@n3.nabble.com> The problem is the same as reported by abr. I work with abr on the project :) As he could not reproduce the bug, I just removed lines of code as much as possible to keep only the essentials. Here is a unit test: Drools-after.zip Davide Sottara wrote > This is unlikely to be the same exception that started the initial > thread, but a problem nevertheless.. :( > could you create a self-contained test case and submit it? > Thanks > Davide > > On 01/13/2014 08:05 AM, Mark Proctor wrote: >> That was recreated on 5.6.0.CR1 ? The 5.6 ship has sailed now :( and >> currently there are no plans for 5.7 any time soon. We should focus on >> making sure this is fixed in 6.x. >> >> Mark >> On 12 Jan 2014, at 19:21, nxv < > nxvanderlinden@ > > <mailto: > nxvanderlinden@ > >> wrote: >> >>> Hello, >>> >>> I'm able to reproduce this issue with a KB containing only 1 rule. >>> >>> rule "Qualification##ToControl" >>> salience 50 >>> when >>> $p: AccessRegisterSnapshot( >>> $effDt: effectivedate ) >>> $dpo: DeliveryPoint() >>> $gCfg: GeneralConfig( >>> ( todate == null || >>> ( todate after[ 0d ] $effDt && >>> todate after[ 1ms ] fromdate ) ) ) >>> from $dpo.generalConfigs >>> then >>> >>> end >>> >>> This rule worked under drools 5.5.0.Final. >>> >>> Caused by: java.lang.NullPointerException at >>> org.drools.base.evaluators.AfterEvaluatorDefinition$AfterEvaluator.evaluate(AfterEvaluatorDefinition.java:347) >>> at org.drools.base.EvaluatorWrapper.evaluate(EvaluatorWrapper.java:99) >>> >>> >>> >>> >>> Davide Sottara wrote >>>> I tried to reproduce the problem, with no success. >>>> Could you please create a self-contained unit test? >>>> If confirmed, I'll fix the problem as soon as possible >>>> Thanks >>>> Davide >>>> >>>> On 11/14/2013 04:48 AM, abr wrote: >>>>> Hi everyone, >>>>> >>>>> I tried to switch from 5.5.0.Final to 5.6.0.CR1 and got a null pointer >>>>> exception in the evaluation of the after evaluator. >>>>> (Exact method is: >>>>> /org.drools.base.evaluators.AfterEvaluatorDefinition.AfterEvaluator.evaluate(InternalWorkingMemory, >>>>> InternalReadAccessor, InternalFactHandle, InternalReadAccessor, >>>>> InternalFactHandle)/ ) >>>>> >>>>> When debugging, the exception occurs at the very first line of the >>>>> method, >>>>> in: >>>>> / if ( extractor1.isNullValue( workingMemory, >>>>> handle1.getObject() ) || >>>>> extractor2.isNullValue( workingMemory, handle2.getObject() >>>>> ) >>>>> ) { >>>>> return false; >>>>> } >>>>> / >>>>> The cause of the exception is that handle1 is null. >>>>> >>>>> The rule where the exception occurs looks like: >>>>> / MyFact( >>>>> fromdate before[ 0d ] $min, >>>>> ( todate == null || todate after[ 0d ] $max ) ) >>>>> / >>>>> >>>>> When the exception occurs, /MyFact.fromdate/ is not null, /$min/ is >>>>> not >>>>> null, /MyFact.todate/ is null, /$max/ is not null. >>>>> In AfterEvaluator.evaluate : /extractor1/ refers to /MyFact.todate/, >>>>> /extractor2/ refers to /$max/, /handle1/ is null, /handle2/ refers >>>>> to the >>>>> fact including the attribute to which /$max/ variable is bound to. >>>>> >>>>> Of course, this worked fine in 5.5.0.Final. -- View this message in context: http://drools.46999.n3.nabble.com/5-6-0-CR1-gives-a-NullPointerException-in-after-evaluator-tp4026780p4027676.html Sent from the Drools: User forum mailing list archive at Nabble.com. From wtang at kana.com Mon Jan 13 23:09:38 2014 From: wtang at kana.com (wtang) Date: Mon, 13 Jan 2014 20:09:38 -0800 (PST) Subject: [rules-users] Can When part of DRL contains simple logics? Message-ID: <1389672578324-4027677.post@n3.nabble.com> I have the following code to set a Calendar object at Jan-1-2013 and roll it 3 days to 1-4-2013 and test to see if it is less then the current date. This in all done inside the THEN part of a DRL rule then Calendar c = Calendar.getInstance(); c.set(2013, 1, 1); c.roll(3, true); if (c.getTime().before(new Date())) { System.out.println("successfully rolled 3 days ahead"); } How to you do this in the WHEN part of a DRL rule? -- View this message in context: http://drools.46999.n3.nabble.com/Can-When-part-of-DRL-contains-simple-logics-tp4027677.html Sent from the Drools: User forum mailing list archive at Nabble.com. From wolfgang.laun at gmail.com Tue Jan 14 00:15:42 2014 From: wolfgang.laun at gmail.com (Wolfgang Laun) Date: Tue, 14 Jan 2014 06:15:42 +0100 Subject: [rules-users] Can When part of DRL contains simple logics? In-Reply-To: <1389672578324-4027677.post@n3.nabble.com> References: <1389672578324-4027677.post@n3.nabble.com> Message-ID: You write a DRL function (or a Java static method) returning the result of the if statement's condition, and call it. -W On 14/01/2014, wtang wrote: > I have the following code to set a Calendar object at Jan-1-2013 and roll > it > 3 days to 1-4-2013 and test to see if it is less then the current date. > This in all done inside the THEN part of a DRL rule > > then > Calendar c = Calendar.getInstance(); > c.set(2013, 1, 1); > c.roll(3, true); > if (c.getTime().before(new Date())) { > System.out.println("successfully rolled 3 days ahead"); > } > > How to you do this in the WHEN part of a DRL rule? > > > > -- > View this message in context: > http://drools.46999.n3.nabble.com/Can-When-part-of-DRL-contains-simple-logics-tp4027677.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 Tue Jan 14 00:43:35 2014 From: wtang at kana.com (wtang) Date: Mon, 13 Jan 2014 21:43:35 -0800 (PST) Subject: [rules-users] Can When part of DRL contains simple logics? In-Reply-To: References: <1389672578324-4027677.post@n3.nabble.com> Message-ID: <1389678215094-4027679.post@n3.nabble.com> that is exactly what I did but I need to call eval(myFunction) and it will be slow since eval() is slow. So there seems to be no way to do "logic" when I am in the When part right? thx!!! -- View this message in context: http://drools.46999.n3.nabble.com/Can-When-part-of-DRL-contains-simple-logics-tp4027677p4027679.html Sent from the Drools: User forum mailing list archive at Nabble.com. From wolfgang.laun at gmail.com Tue Jan 14 01:27:45 2014 From: wolfgang.laun at gmail.com (Wolfgang Laun) Date: Tue, 14 Jan 2014 07:27:45 +0100 Subject: [rules-users] Can When part of DRL contains simple logics? In-Reply-To: <1389678215094-4027679.post@n3.nabble.com> References: <1389672578324-4027677.post@n3.nabble.com> <1389678215094-4027679.post@n3.nabble.com> Message-ID: There is no magic wand. But for any expression evaluation on the LHS that occurs frequently, ask yourself whether the data is optimal. For instance: rather than testing repeatedly whether some date in a fact plus three days is greater than today, compare that date to a constant date computed once as today minus three days. -W On 14/01/2014, wtang wrote: > that is exactly what I did but I need to call eval(myFunction) and it will > be > slow since eval() is slow. So there seems to be no way to do "logic" when > I > am in the When part right? > > thx!!! > > > > -- > View this message in context: > http://drools.46999.n3.nabble.com/Can-When-part-of-DRL-contains-simple-logics-tp4027677p4027679.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 ken.helmes at iprocesses.com Tue Jan 14 06:16:52 2014 From: ken.helmes at iprocesses.com (kenhelmes) Date: Tue, 14 Jan 2014 03:16:52 -0800 (PST) Subject: [rules-users] Process' RulesetNode and SplitNode working memory In-Reply-To: <1389599515078-4027665.post@n3.nabble.com> References: <1389599515078-4027665.post@n3.nabble.com> Message-ID: <1389698212240-4027681.post@n3.nabble.com> This was my own bad. The splitnode constraint does use the working memory. The problem was the rules in the previous RuleSetNode weren't firing correctly. The Process API in general seems to work well and is good for our purposes. -- View this message in context: http://drools.46999.n3.nabble.com/Process-RulesetNode-and-SplitNode-working-memory-tp4027665p4027681.html Sent from the Drools: User forum mailing list archive at Nabble.com. From brachi.w at sapiens.com Tue Jan 14 10:01:58 2014 From: brachi.w at sapiens.com (brachi) Date: Tue, 14 Jan 2014 07:01:58 -0800 (PST) Subject: [rules-users] stuck! Unknown accessor type: org.mvel2.optimizers.impl.refl.collection.ArrayCreator@690c2a7a In-Reply-To: <1389097306048-4027560.post@n3.nabble.com> References: <1353967076623-4020969.post@n3.nabble.com> <1354202737050-4021015.post@n3.nabble.com> <1389023861262-4027535.post@n3.nabble.com> <83C4A2C0-10C2-4D0F-B827-4A7B6FB43A96@codehaus.org> <1389097306048-4027560.post@n3.nabble.com> Message-ID: <1389711718331-4027682.post@n3.nabble.com> changed to 5.6.0.Final. then i got this: /*WARN [MvelConstraint] Exception jitting: Operators.contains(LoanProgramName,new String[]{"2008 Temporary Loan Limits"})*/ I get this for any rule that invoke methods and pass it a new array as argument. what is the meaning of this warning? how can I fix it? -- View this message in context: http://drools.46999.n3.nabble.com/stuck-Unknown-accessor-type-org-mvel2-optimizers-impl-refl-collection-ArrayCreator-690c2a7a-tp4020969p4027682.html Sent from the Drools: User forum mailing list archive at Nabble.com. From nick61244 at yahoo.com Tue Jan 14 10:03:45 2014 From: nick61244 at yahoo.com (bobby nick) Date: Tue, 14 Jan 2014 07:03:45 -0800 (PST) Subject: [rules-users] Rules confilct and resulution strategy Message-ID: <1389711825.63725.YahooMailNeo@web125304.mail.ne1.yahoo.com> I am using Drools 5.5 and I have two drl files, i.e. Sample.drl, Sample1.drl, with four rules, two sets of duplicate rules. When I assert facts, rules from Sample1.drl file is getting fired. I assume in this situation rules are in conflict, therefore rules engine using rules resolution strategy firing rules loaded last to knowledge base. But I don't find any documentation indicating what leads to conflict in rules.? If anyone in mailing list has experienced similar issue, appreciate if you could share. Thanks,Amit -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.jboss.org/pipermail/rules-users/attachments/20140114/8b401c8f/attachment-0001.html From wolfgang.laun at gmail.com Tue Jan 14 10:20:20 2014 From: wolfgang.laun at gmail.com (Wolfgang Laun) Date: Tue, 14 Jan 2014 16:20:20 +0100 Subject: [rules-users] Rules confilct and resulution strategy In-Reply-To: <1389711825.63725.YahooMailNeo@web125304.mail.ne1.yahoo.com> References: <1389711825.63725.YahooMailNeo@web125304.mail.ne1.yahoo.com> Message-ID: If rules have identical names, one may blanket the other if both are in the same package, or it may result in an error. (This is documented but may be difficult to find.) -W On 14/01/2014, bobby nick wrote: > I am using Drools 5.5 and I have two drl files, i.e. Sample.drl, > Sample1.drl, with four rules, two > sets of duplicate rules. When I assert facts, rules from Sample1.drl > file is getting fired. I assume in this situation rules are in conflict, > therefore rules engine using rules resolution strategy firing rules > loaded last to knowledge base. But I don't find any documentation > indicating what leads to conflict in rules. > > If anyone in mailing list has experienced > similar issue, appreciate if you could share. > > Thanks,Amit From h.olfa.h at gmail.com Tue Jan 14 15:04:50 2014 From: h.olfa.h at gmail.com (olfa) Date: Tue, 14 Jan 2014 12:04:50 -0800 (PST) Subject: [rules-users] Invitation to connect on LinkedIn Message-ID: <112321793.30302076.1389729847813.JavaMail.app@ela4-app0099.prod> LinkedIn ------------ Davide, J'aimerais vous inviter ? rejoindre mon r?seau professionnel en ligne, sur le site LinkedIn. Olfa Olfa Harrouchi Jeune chercheuse Tunisie Confirm that you know Olfa Harrouchi: https://www.linkedin.com/e/q6k01m-hqfl9pfb-6n/isd/18462569313/rGtNFEqD/?hs=false&tok=0jWtBhE28Qrm41 -- You are receiving Invitation to Connect emails. Click to unsubscribe: http://www.linkedin.com/e/q6k01m-hqfl9pfb-6n/qhXOH69RZIlA6Iq7kAVN8kDc5rRPStI6kAOgKhfdewBa7pmZshXl1-W6pw/goo/ml-node%2Bs46999n3719065h42%40n3%2Enabble%2Ecom/20061/I6269918224_1/?hs=false&tok=2DOa4wpccQrm41 (c) 2012 LinkedIn Corporation. 2029 Stierlin Ct, Mountain View, CA 94043, USA. -- View this message in context: http://drools.46999.n3.nabble.com/Invitation-to-connect-on-LinkedIn-tp4027686.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/20140114/76f8c893/attachment-0001.html From h.olfa.h at gmail.com Tue Jan 14 15:04:51 2014 From: h.olfa.h at gmail.com (olfa) Date: Tue, 14 Jan 2014 12:04:51 -0800 (PST) Subject: [rules-users] Invitation to connect on LinkedIn Message-ID: <1710256184.41366888.1389729848199.JavaMail.app@ela4-app0063.prod> LinkedIn ------------ Davide, J'aimerais vous inviter ? rejoindre mon r?seau professionnel en ligne, sur le site LinkedIn. Olfa Olfa Harrouchi Jeune chercheuse Tunisie Confirm that you know Olfa Harrouchi: https://www.linkedin.com/e/-hjwooc-hqfl9pq7-6e/isd/18462569282/dDIpaL9R/?hs=false&tok=1Ku-0yO70Qrm41 -- You are receiving Invitation to Connect emails. Click to unsubscribe: http://www.linkedin.com/e/-hjwooc-hqfl9pq7-6e/XDN0h_23Fvj-JzsKS9iUQfZPDmJsQaxMS9fTDxpTBmeB1TDiADNagn4oyO/goo/ml-node%2Bs46999n3717731h88%40n3%2Enabble%2Ecom/20061/I6269918207_1/?hs=false&tok=100BmTndkQrm41 (c) 2012 LinkedIn Corporation. 2029 Stierlin Ct, Mountain View, CA 94043, USA. -- View this message in context: http://drools.46999.n3.nabble.com/Invitation-to-connect-on-LinkedIn-tp4027687.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/20140114/44abfc59/attachment-0001.html From calcacuervo at gmail.com Tue Jan 14 16:56:56 2014 From: calcacuervo at gmail.com (Demian Calcaprina) Date: Tue, 14 Jan 2014 19:56:56 -0200 Subject: [rules-users] Problem with declare event Message-ID: Hey Guys, I am having a drools compilation error when declaring an error. I tried to isolate this as much as possible. https://github.com/droolsjbpm/drools/blob/master/drools-compiler/src/test/java/org/drools/compiler/integrationtests/IncrementalCompilationTest.java#L43 I just added after the given line, this: header = header + " declare Message\n "+ " @role(event) \n " + " end \n "; And I get this exception: java.lang.NullPointerException at java.io.FilterOutputStream.write(FilterOutputStream.java:97) at org.drools.compiler.compiler.io.memory.MemoryFileSystem.writeJarEntries(MemoryFileSystem.java:437) at org.drools.compiler.compiler.io.memory.MemoryFileSystem.writeJarEntries(MemoryFileSystem.java:430) at org.drools.compiler.compiler.io.memory.MemoryFileSystem.writeJarEntries(MemoryFileSystem.java:430) at org.drools.compiler.compiler.io.memory.MemoryFileSystem.writeJarEntries(MemoryFileSystem.java:430) at org.drools.compiler.compiler.io.memory.MemoryFileSystem.zip(MemoryFileSystem.java:387) at org.drools.compiler.compiler.io.memory.MemoryFileSystem.writeAsBytes(MemoryFileSystem.java:365) at org.drools.compiler.kie.builder.impl.MemoryKieModule.getBytes(MemoryKieModule.java:64) at org.drools.compiler.CommonTestMethodBase.createKJar(CommonTestMethodBase.java:421) at org.drools.compiler.integrationtests.IncrementalCompilationTest.createAndDeployJar(IncrementalCompilationTest.java:205) at org.drools.compiler.integrationtests.IncrementalCompilationTest.testLoadOrderAfterRuleRemoval(IncrementalCompilationTest.java:70) 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:601) 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.junit.runners.ParentRunner.runLeaf(ParentRunner.java:271) at org.junit.runners.BlockJUnit4ClassRunner.runChild(BlockJUnit4ClassRunner.java:70) at org.junit.runners.BlockJUnit4ClassRunner.runChild(BlockJUnit4ClassRunner.java:50) 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.junit.runners.ParentRunner.run(ParentRunner.java:309) 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) Any idea on how to declare an event on the drl? Thanks! Demian -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.jboss.org/pipermail/rules-users/attachments/20140114/f87795bb/attachment.html From plz.write.to at gmail.com Wed Jan 15 00:44:59 2014 From: plz.write.to at gmail.com (Sonata) Date: Tue, 14 Jan 2014 21:44:59 -0800 (PST) Subject: [rules-users] Can When part of DRL contains simple logics? In-Reply-To: References: <1389672578324-4027677.post@n3.nabble.com> <1389678215094-4027679.post@n3.nabble.com> Message-ID: <1389764699528-4027690.post@n3.nabble.com> laune wrote > There is no magic wand. > > But for any expression evaluation on the LHS that occurs frequently, ask > yourself whether the data is optimal. For instance: rather than testing > repeatedly whether some date in a fact plus three days is greater than > today, compare that date to a constant date computed once as today > minus three days. > > -W I think we are better off if Drools can cache LHS values -- View this message in context: http://drools.46999.n3.nabble.com/Can-When-part-of-DRL-contains-simple-logics-tp4027677p4027690.html Sent from the Drools: User forum mailing list archive at Nabble.com. From swapnilaute at gmail.com Wed Jan 15 04:18:54 2014 From: swapnilaute at gmail.com (neal) Date: Wed, 15 Jan 2014 01:18:54 -0800 (PST) Subject: [rules-users] How to generate rule statements using MVEL 2.0 template? Message-ID: <1389777534343-4027692.post@n3.nabble.com> I came to know through drool user forum that a drl file can be created using recursive MVEL 2.0 template. I am trying like below. public static String prepareRule(String RuleName){ String template = "\n rule \""+RuleName+"\" "+ "\n dialect \"mvel\" "+ "\n salience \"10\" " + "\n when" + "\n demo : Demo( one == \"N\" , two == \"C\" , three == 1005 )" + "\n then" + "\n demo.setFirst( 4003 );" + "\n demo.setLast( 4003 );" + "\n demo.setRuleID( \"SEQ_1\" );"; return template; } public static String getRuleAsString(String template){ Map vars = new HashMap(); return (String) TemplateRuntime.eval(template,vars); } public static void main(String[] args) { System.out.println(getRuleAsString(prepareRule("Rule 1"))); } When i am printing it out, It is generating rule skeleton. I am planning to create whole rule stuff passing arguments like rule name in the example. Am i doing correct? How to do it correctly? -- View this message in context: http://drools.46999.n3.nabble.com/How-to-generate-rule-statements-using-MVEL-2-0-template-tp4027692.html Sent from the Drools: User forum mailing list archive at Nabble.com. From michael.anstis at gmail.com Wed Jan 15 04:24:21 2014 From: michael.anstis at gmail.com (Michael Anstis) Date: Wed, 15 Jan 2014 09:24:21 +0000 Subject: [rules-users] How to generate rule statements using MVEL 2.0 template? In-Reply-To: <1389777534343-4027692.post@n3.nabble.com> References: <1389777534343-4027692.post@n3.nabble.com> Message-ID: You could take a look at drools-templates, and relevant sections in the user guide, as a starter. If that does not cover your requirements take a look at drools-templates source code on github. Alternatively have a look for MVEL templates on Google (other search engines are available). With kind regards, Mike Sent on the move On 15 Jan 2014 09:20, "neal" wrote: > I came to know through drool user forum that a drl file can be created > using > recursive MVEL 2.0 template. > I am trying like below. > > public static String prepareRule(String RuleName){ > String template = "\n rule \""+RuleName+"\" "+ > "\n dialect \"mvel\" "+ > "\n salience \"10\" " + > "\n when" + > "\n demo : Demo( one == \"N\" , two == > \"C\" , three == 1005 )" + > "\n then" + > "\n demo.setFirst( 4003 );" + > "\n demo.setLast( 4003 );" + > "\n demo.setRuleID( \"SEQ_1\" );"; > return template; > } > > public static String getRuleAsString(String template){ > Map vars = new HashMap(); > return (String) TemplateRuntime.eval(template,vars); > } > > public static void main(String[] args) { > > System.out.println(getRuleAsString(prepareRule("Rule 1"))); > } > > When i am printing it out, It is generating rule skeleton. I am planning to > create whole rule stuff passing arguments like rule name in the example. Am > i doing correct? > How to do it correctly? > > > > -- > View this message in context: > http://drools.46999.n3.nabble.com/How-to-generate-rule-statements-using-MVEL-2-0-template-tp4027692.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/20140115/9c28386d/attachment.html From mproctor at codehaus.org Wed Jan 15 07:52:27 2014 From: mproctor at codehaus.org (Mark Proctor) Date: Wed, 15 Jan 2014 12:52:27 +0000 Subject: [rules-users] How to generate rule statements using MVEL 2.0 template? In-Reply-To: References: <1389777534343-4027692.post@n3.nabble.com> Message-ID: <6F1B1208-E189-49A6-83A3-92243AD35F48@codehaus.org> It?s a bit low level, but this is how we generate stuff in drools; https://github.com/droolsjbpm/drools/blob/master/drools-compiler/src/main/java/org/drools/compiler/rule/builder/dialect/java/JavaRuleBuilderHelper.java https://github.com/droolsjbpm/drools/blob/master/drools-compiler/src/main/resources/org/drools/compiler/rule/builder/dialect/java/javaRule.mvel I would avoid drools-templates, stick directly with MVEL templates. Mark On 15 Jan 2014, at 09:24, Michael Anstis wrote: > You could take a look at drools-templates, and relevant sections in the user guide, as a starter. > > If that does not cover your requirements take a look at drools-templates source code on github. > > Alternatively have a look for MVEL templates on Google (other search engines are available). > > With kind regards, > > Mike > > Sent on the move > > On 15 Jan 2014 09:20, "neal" wrote: > I came to know through drool user forum that a drl file can be created using > recursive MVEL 2.0 template. > I am trying like below. > > public static String prepareRule(String RuleName){ > String template = "\n rule \""+RuleName+"\" "+ > "\n dialect \"mvel\" "+ > "\n salience \"10\" " + > "\n when" + > "\n demo : Demo( one == \"N\" , two == \"C\" , three == 1005 )" + > "\n then" + > "\n demo.setFirst( 4003 );" + > "\n demo.setLast( 4003 );" + > "\n demo.setRuleID( \"SEQ_1\" );"; > return template; > } > > public static String getRuleAsString(String template){ > Map vars = new HashMap(); > return (String) TemplateRuntime.eval(template,vars); > } > > public static void main(String[] args) { > > System.out.println(getRuleAsString(prepareRule("Rule 1"))); > } > > When i am printing it out, It is generating rule skeleton. I am planning to > create whole rule stuff passing arguments like rule name in the example. Am > i doing correct? > How to do it correctly? > > > > -- > View this message in context: http://drools.46999.n3.nabble.com/How-to-generate-rule-statements-using-MVEL-2-0-template-tp4027692.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/20140115/c0c2da05/attachment-0001.html From arenaux at genoscope.cns.fr Wed Jan 15 09:01:07 2014 From: arenaux at genoscope.cns.fr (Shinsekai) Date: Wed, 15 Jan 2014 06:01:07 -0800 (PST) Subject: [rules-users] How to add generated rules (from templates) to a KB on the fly? Message-ID: <1389794467076-4027695.post@n3.nabble.com> Hi, I use Drools (6.0.0) with KIE-api and I have a method to generate drl rules from templates+hashmaps. These rules are stored in a List. Now, I would to pack up these generated rules and make them available to a preexistant KieSession. Thus, a KieSession could access to standard KieBases (with rules stored in resource directories) AND to these generated rules (stored in an object, in memory). Is it possible to do that? I precise I don't want to use org.drools.internal.* classes. Regards, Alexandre -- View this message in context: http://drools.46999.n3.nabble.com/How-to-add-generated-rules-from-templates-to-a-KB-on-the-fly-tp4027695.html Sent from the Drools: User forum mailing list archive at Nabble.com. From dunnlow at yahoo.com Wed Jan 15 12:10:12 2014 From: dunnlow at yahoo.com (dunnlow) Date: Wed, 15 Jan 2014 09:10:12 -0800 (PST) Subject: [rules-users] KnowledgeAgent fallback FROM local cache? Message-ID: <1389805812370-4027696.post@n3.nabble.com> I am using drools 5.5 with Guvnor and the Integration Server. My integration server uses a knowledgeagent that pulls the package from guvnor and I have set the drools.resource.urlcache for a local cache in case Guvnor is unavailable. If Guvnor is available at startup, the KAgent sees any deployed changes to my package from then on. If guvnor is NOT available, the local cache is used and everything works fine UNTIL I make a change to Guvnor. The KAgent seems to never fall back to checking for Guvnor's availability. I'd like the KnowledgeAgent to use the local cache until Guvnor is available again. Is there an (existing) way to make this happen? If not, any thought about implementing a solution? Thanks, - J -- View this message in context: http://drools.46999.n3.nabble.com/KnowledgeAgent-fallback-FROM-local-cache-tp4027696.html Sent from the Drools: User forum mailing list archive at Nabble.com. From mproctor at codehaus.org Wed Jan 15 13:03:42 2014 From: mproctor at codehaus.org (Mark Proctor) Date: Wed, 15 Jan 2014 18:03:42 +0000 Subject: [rules-users] KnowledgeAgent fallback FROM local cache? In-Reply-To: <1389805812370-4027696.post@n3.nabble.com> References: <1389805812370-4027696.post@n3.nabble.com> Message-ID: <2355F98E-0137-460D-9E9C-15EFCF94CF7D@codehaus.org> URLResource caches things to a given location, that can be controlled via system property, and has a default. In theory once cached, it should be able to read from the cache without Guvnor being needed to available - even after restart. Look at the CACHE_DIR, and how it?s created and used: https://github.com/droolsjbpm/drools/blob/5.6.x/drools-core/src/main/java/org/drools/io/impl/UrlResource.java There are some fixes in 5.6, related to last read times, which may fix the issue you are having. If the issue continues it?s unlikely we?d fix this, unless it becomes a product requirement. 5.x is now in maintenance, so things will only be fixed if paying customers request it. This is not an issue in 6.0, as we use maven and the local m2 repo now. Mark On 15 Jan 2014, at 17:10, dunnlow wrote: > I am using drools 5.5 with Guvnor and the Integration Server. My integration > server uses a knowledgeagent that pulls the package from guvnor and I have > set the drools.resource.urlcache for a local cache in case Guvnor is > unavailable. > > If Guvnor is available at startup, the KAgent sees any deployed changes to > my package from then on. If guvnor is NOT available, the local cache is > used and everything works fine UNTIL I make a change to Guvnor. The KAgent > seems to never fall back to checking for Guvnor's availability. > > I'd like the KnowledgeAgent to use the local cache until Guvnor is available > again. Is there an (existing) way to make this happen? > > If not, any thought about implementing a solution? > > Thanks, > - J > > > > -- > View this message in context: http://drools.46999.n3.nabble.com/KnowledgeAgent-fallback-FROM-local-cache-tp4027696.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/20140115/0e176ad7/attachment.html From mproctor at codehaus.org Wed Jan 15 13:19:24 2014 From: mproctor at codehaus.org (Mark Proctor) Date: Wed, 15 Jan 2014 18:19:24 +0000 Subject: [rules-users] How to add generated rules (from templates) to a KB on the fly? In-Reply-To: <1389794467076-4027695.post@n3.nabble.com> References: <1389794467076-4027695.post@n3.nabble.com> Message-ID: Just change your rules, increase the project version and build the jar. Then either add the jar manually to KieRepository or make it available through maven, with kie-ci on the class path. Once the new jar is reachable, you can just call KieContainer.updateToVersion Make sure you read this thoroughly: http://docs.jboss.org/drools/release/6.0.1.Final/drools-docs/html/KIEChapter.html Mark On 15 Jan 2014, at 14:01, Shinsekai wrote: > Hi, > > I use Drools (6.0.0) with KIE-api and I have a method to generate drl rules > from templates+hashmaps. These rules are stored in a List. > Now, I would to pack up these generated rules and make them available to a > preexistant KieSession. > > Thus, a KieSession could access to standard KieBases (with rules stored in > resource directories) AND to these generated rules (stored in an object, in > memory). > > Is it possible to do that? > > I precise I don't want to use org.drools.internal.* classes. > > Regards, > > Alexandre > > > > -- > View this message in context: http://drools.46999.n3.nabble.com/How-to-add-generated-rules-from-templates-to-a-KB-on-the-fly-tp4027695.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 adarsh.chaini at hsbcib.com Wed Jan 15 13:23:07 2014 From: adarsh.chaini at hsbcib.com (adarsh.chaini at hsbcib.com) Date: Wed, 15 Jan 2014 18:23:07 +0000 Subject: [rules-users] permgen leak In-Reply-To: References: <1386258456435-4027111.post@n3.nabble.com> <1386259095814-4027115.post@n3.nabble.com> <52AD529D.8040504@gmail.com> <1387189626968-4027321.post@n3.nabble.com> <52AF5639.5060507@gmail.com> <1389015365148-4027530.post@n3.nabble.com> <1389018700389-4027534.post@n3.nabble.com> <23E0006C-4B62-4000-BA2B-05E6314F9026@codehaus.org> <1389024856614-4027539.post@n3.nabble.com> <7E35D477-589F-49E3-B00A-E2D41D070200@codehaus.org> <52CB0140.4090502@gmail.com> <63508E3F-3F1A-42E8-A893-6F2996A275BC@codehaus.org> <2F11EE38-0C02-4C8A-8E12-98CA54AC3C31@codehaus.org> Message-ID: Hi Mark/Davide Is there a work around to this problem in 5.4?. Thanks and regards, Adarsh CHAINI SENIOR LEAD DEVELOPMENT SPECIALIST | HSBC Bank Plc 8 Canada Square, London E14 5HQ, UK _______________________________________________ Phone Int: (0)79914720 Ext: +44 (0)20 79914720 Mobile +44(0)7595530105 Email adarsh.chaini at hsbcib.com _______________________________________________ Protect our environment - please only print this if you have to! From: Mark Proctor To: Rules Users List Date: 08/01/2014 04:46 Subject: Re: [rules-users] permgen leak Sent by: rules-users-bounces at lists.jboss.org For anyone interested. The commit involves addressing two needs. 1) Enforcing MVEL reflection mode throughout - MVEL ASM optimiser can NEVER be used for anything (it doesn?t add much value anyway). 2) Avoiding giving the template system the root class loader(which we use for dynamic stuff), as those templates are statically cached. https://github.com/sotty/drools/commit/1b75d4785861e72338cc5ea1280610a7937be017 Mark On 8 Jan 2014, at 00:53, Mark Proctor wrote: > The root of the perm gen leak has now be solved, thanks to some heroic work by community developer Davide Sottara. > > This is just in time for the 5.6 release going out this week. You will not need to use the kbase.dispose() work around. > > Mark > On 6 Jan 2014, at 20:50, Mark Proctor wrote: > >> The 5.6 approach should be considered a work around, not a fix. Somewhere a ref is being held, that shouldn?t be - we just haven?t found it yet. >> >> Mark >> >> On 6 Jan 2014, at 19:17, Davide Sottara wrote: >> >>> I have run pmander's tests, and reported in a previous email. >>> The leak in 5.x is due to the nature of the composite classloader, and >>> dispose() >>> forces the memory to be released. I don't remember if that fix was in >>> 5.6.CR1 >>> (probably not), so you may have to try 5.6.0-SNAPSHOT or wait for the >>> end of the week. >>> 6.x does not suffer from the same problem, but has a different issue - >>> no way >>> to unload kie modules once they are cached - which Mario has been >>> working on. >>> In either case, pmander's test works fine in both 5.6.x and 6.x after >>> these fixes >>> Davide >>> >>> On 01/06/2014 07:56 PM, Mark Proctor wrote: >>>> I?ve been told 5.6 will be released this week. This is because the JCR2GIT migration tool, in 5.6 is needed for our 6.0 product. >>>> >>>> Davide's current kbase.dispose() method, on the concrete class, should just be considered a work around for the problem. Unless this is fixed by someone in the community, I don?t think any core developers will have time to address this. At least not for 5.x; we?ll continue to look into it for 6.x. >>>> >>>> Mark >>>> >>>> >>>> On 6 Jan 2014, at 16:14, brachi wrote: >>>> >>>>> see previous messages, pmander attached a unit test >>>>> >>>>> >>>>> >>>>> -- >>>>> View this message in context: http://drools.46999.n3.nabble.com/permgen-leak-tp4027038p4027539.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 >> > _______________________________________________ rules-users mailing list rules-users at lists.jboss.org https://lists.jboss.org/mailman/listinfo/rules-users ************************************************************ HSBC Bank plc may be solicited in the course of its placement efforts for a new issue, by investment clients of the firm for whom the Bank as a firm already provides other services. It may equally decide to allocate to its own proprietary book or with an associate of HSBC Group. This represents a potential conflict of interest. HSBC Bank plc has internal arrangements designed to ensure that the firm would give unbiased and full advice to the corporate finance client about the valuation and pricing of the offering as well as internal systems, controls and procedures to identify and manage conflicts of interest. HSBC Bank plc Registered Office: 8 Canada Square, London E14 5HQ, United Kingdom Registered in England - Number 14259 Authorised by the Prudential Regulation Authority and regulated by the Financial Conduct Authority and the Prudential Regulation Authority ************************************************************ ************************************************************ HSBC Bank plc may be solicited in the course of its placement efforts for a new issue, by investment clients of the firm for whom the Bank as a firm already provides other services. It may equally decide to allocate to its own proprietary book or with an associate of HSBC Group. This represents a potential conflict of interest. HSBC Bank plc has internal arrangements designed to ensure that the firm would give unbiased and full advice to the corporate finance client about the valuation and pricing of the offering as well as internal systems, controls and procedures to identify and manage conflicts of interest. HSBC Bank plc Registered Office: 8 Canada Square, London E14 5HQ, United Kingdom Registered in England - Number 14259 Authorised by the Prudential Regulation Authority and regulated by the Financial Conduct Authority and the Prudential Regulation Authority ************************************************************ ----------------------------------------- SAVE PAPER - THINK BEFORE YOU PRINT! This transmission has been issued by a member of the HSBC Group "HSBC" for the information of the addressee only and should not be reproduced and/or distributed to any other person. Each page attached hereto must be read in conjunction with any disclaimer which forms part of it. Unless otherwise stated, this transmission is neither an offer nor the solicitation of an offer to sell or purchase any investment. Its contents are based on information obtained from sources believed to be reliable but HSBC makes no representation and accepts no responsibility or liability as to its completeness or accuracy. -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.jboss.org/pipermail/rules-users/attachments/20140115/e705307b/attachment-0001.html From mproctor at codehaus.org Wed Jan 15 13:27:20 2014 From: mproctor at codehaus.org (Mark Proctor) Date: Wed, 15 Jan 2014 18:27:20 +0000 Subject: [rules-users] permgen leak In-Reply-To: References: <1386258456435-4027111.post@n3.nabble.com> <1386259095814-4027115.post@n3.nabble.com> <52AD529D.8040504@gmail.com> <1387189626968-4027321.post@n3.nabble.com> <52AF5639.5060507@gmail.com> <1389015365148-4027530.post@n3.nabble.com> <1389018700389-4027534.post@n3.nabble.com> <23E0006C-4B62-4000-BA2B-05E6314F9026@codehaus.org> <1389024856614-4027539.post@n3.nabble.com> <7E35D477-589F-49E3-B00A-E2D41D070200@codehaus.org> <52CB0140.4090502@gmail.com> <63508E3F-3F1A-42E8-A893-6F2996A275BC@codehaus.org> <2F11EE38-0C02-4C8A-8E12-98CA54AC3C31@codehaus.org> Message-ID: You can try setting everything to the MVEL dialect, and also forcing MVEL to reflection via the system property (turning off jit) http://mvel.codehaus.org/Disabling+the+JIT+Compiler Mark On 15 Jan 2014, at 18:23, adarsh.chaini at hsbcib.com wrote: > Hi Mark/Davide > > Is there a work around to this problem in 5.4?. > > > Thanks and regards, > > Adarsh CHAINI > SENIOR LEAD DEVELOPMENT SPECIALIST | HSBC Bank Plc > 8 Canada Square, London E14 5HQ, UK > _______________________________________________ > > Phone Int: (0)79914720 Ext: +44 (0)20 79914720 > Mobile +44(0)7595530105 > Email adarsh.chaini at hsbcib.com > > > _______________________________________________ > Protect our environment - please only print this if you have to! > > > > > From: Mark Proctor > To: Rules Users List > Date: 08/01/2014 04:46 > Subject: Re: [rules-users] permgen leak > Sent by: rules-users-bounces at lists.jboss.org > > > > > For anyone interested. The commit involves addressing two needs. > 1) Enforcing MVEL reflection mode throughout - MVEL ASM optimiser can NEVER be used for anything (it doesn?t add much value anyway). > 2) Avoiding giving the template system the root class loader(which we use for dynamic stuff), as those templates are statically cached. > https://github.com/sotty/drools/commit/1b75d4785861e72338cc5ea1280610a7937be017 > > Mark > On 8 Jan 2014, at 00:53, Mark Proctor wrote: > > > The root of the perm gen leak has now be solved, thanks to some heroic work by community developer Davide Sottara. > > > > This is just in time for the 5.6 release going out this week. You will not need to use the kbase.dispose() work around. > > > > Mark > > On 6 Jan 2014, at 20:50, Mark Proctor wrote: > > > >> The 5.6 approach should be considered a work around, not a fix. Somewhere a ref is being held, that shouldn?t be - we just haven?t found it yet. > >> > >> Mark > >> > >> On 6 Jan 2014, at 19:17, Davide Sottara wrote: > >> > >>> I have run pmander's tests, and reported in a previous email. > >>> The leak in 5.x is due to the nature of the composite classloader, and > >>> dispose() > >>> forces the memory to be released. I don't remember if that fix was in > >>> 5.6.CR1 > >>> (probably not), so you may have to try 5.6.0-SNAPSHOT or wait for the > >>> end of the week. > >>> 6.x does not suffer from the same problem, but has a different issue - > >>> no way > >>> to unload kie modules once they are cached - which Mario has been > >>> working on. > >>> In either case, pmander's test works fine in both 5.6.x and 6.x after > >>> these fixes > >>> Davide > >>> > >>> On 01/06/2014 07:56 PM, Mark Proctor wrote: > >>>> I?ve been told 5.6 will be released this week. This is because the JCR2GIT migration tool, in 5.6 is needed for our 6.0 product. > >>>> > >>>> Davide's current kbase.dispose() method, on the concrete class, should just be considered a work around for the problem. Unless this is fixed by someone in the community, I don?t think any core developers will have time to address this. At least not for 5.x; we?ll continue to look into it for 6.x. > >>>> > >>>> Mark > >>>> > >>>> > >>>> On 6 Jan 2014, at 16:14, brachi wrote: > >>>> > >>>>> see previous messages, pmander attached a unit test > >>>>> > >>>>> > >>>>> > >>>>> -- > >>>>> View this message in context: http://drools.46999.n3.nabble.com/permgen-leak-tp4027038p4027539.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 > >> > > > > > _______________________________________________ > rules-users mailing list > rules-users at lists.jboss.org > https://lists.jboss.org/mailman/listinfo/rules-users > > > > > ************************************************************ > HSBC Bank plc may be solicited in the course of its placement efforts for a new issue, by investment clients of the firm for whom the Bank as a firm already provides other services. It may equally decide to allocate to its own proprietary book or with an associate of HSBC Group. This represents a potential conflict of interest. HSBC Bank plc has internal arrangements designed to ensure that the firm would give unbiased and full advice to the corporate finance client about the valuation and pricing of the offering as well as internal systems, controls and procedures to identify and manage conflicts of interest. > > HSBC Bank plc > Registered Office: 8 Canada Square, London E14 5HQ, United Kingdom > Registered in England - Number 14259 > Authorised by the Prudential Regulation Authority and regulated by the Financial Conduct Authority and the Prudential Regulation Authority > ************************************************************ > > > ************************************************************ > HSBC Bank plc may be solicited in the course of its placement efforts for a new issue, by investment clients of the firm for whom the Bank as a firm already provides other services. It may equally decide to allocate to its own proprietary book or with an associate of HSBC Group. This represents a potential conflict of interest. HSBC Bank plc has internal arrangements designed to ensure that the firm would give unbiased and full advice to the corporate finance client about the valuation and pricing of the offering as well as internal systems, controls and procedures to identify and manage conflicts of interest. > > HSBC Bank plc > Registered Office: 8 Canada Square, London E14 5HQ, United Kingdom > Registered in England - Number 14259 > Authorised by the Prudential Regulation Authority and regulated by the Financial Conduct Authority and the Prudential Regulation Authority > ************************************************************ > ----------------------------------------- SAVE PAPER - THINK BEFORE YOU PRINT! This transmission has been issued by a member of the HSBC Group "HSBC" for the information of the addressee only and should not be reproduced and/or distributed to any other person. Each page attached hereto must be read in conjunction with any disclaimer which forms part of it. Unless otherwise stated, this transmission is neither an offer nor the solicitation of an offer to sell or purchase any investment. Its contents are based on information obtained from sources believed to be reliable but HSBC makes no representation and accepts no responsibility or liability as to its completeness or accuracy._______________________________________________ > 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/20140115/3444aa59/attachment.html From calcacuervo at gmail.com Wed Jan 15 14:35:03 2014 From: calcacuervo at gmail.com (Demian Calcaprina) Date: Wed, 15 Jan 2014 17:35:03 -0200 Subject: [rules-users] Problem when creating KieModuleModel Message-ID: Hi Guys! I am having a problem using drools 6 in my project. And I was able to reproduce it in one of the examples.. I just got this example: https://github.com/droolsjbpm/drools/tree/master/drools-examples-api/kiemodulemodel-example built the 2 dependant projects, kiebase inclusion and namedkiesession. Then, run the org.drools.example.api.kiemodulemodel.KieModuleModelExample in my eclipse, and I get the following: SLF4J: Failed to load class "org.slf4j.impl.StaticLoggerBinder". SLF4J: Defaulting to no-operation (NOP) logger implementation SLF4J: See http://www.slf4j.org/codes.html#StaticLoggerBinder for further details. Exception in thread "main" java.lang.NullPointerException at org.drools.compiler.kie.builder.impl.KieBuilderImpl.generateKieModuleMetaInfo(KieBuilderImpl.java:222) at org.drools.compiler.kie.builder.impl.KieBuilderImpl.buildAll(KieBuilderImpl.java:194) at org.drools.example.api.kiemodulemodel.KieModuleModelExample.go(KieModuleModelExample.java:39) at org.drools.example.api.kiemodulemodel.KieModuleModelExample.main(KieModuleModelExample.java:63) Exactly the same happens when I do the same in my project. Any ideas? Thanks! Demian -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.jboss.org/pipermail/rules-users/attachments/20140115/62ceb576/attachment.html From mproctor at codehaus.org Wed Jan 15 15:21:47 2014 From: mproctor at codehaus.org (Mark Proctor) Date: Wed, 15 Jan 2014 20:21:47 +0000 Subject: [rules-users] Problem when creating KieModuleModel In-Reply-To: References: Message-ID: <07B6ECC5-79A8-499F-B16F-21F9CBCBC4AF@codehaus.org> http://bit.ly/1eKm7lC Mark On 15 Jan 2014, at 19:35, Demian Calcaprina wrote: > Hi Guys! > > I am having a problem using drools 6 in my project. And I was able to reproduce it in one of the examples.. > > I just got this example: > > https://github.com/droolsjbpm/drools/tree/master/drools-examples-api/kiemodulemodel-example > > built the 2 dependant projects, kiebase inclusion and namedkiesession. > > Then, run the org.drools.example.api.kiemodulemodel.KieModuleModelExample in my eclipse, and I get the following: > > SLF4J: Failed to load class "org.slf4j.impl.StaticLoggerBinder". > SLF4J: Defaulting to no-operation (NOP) logger implementation > SLF4J: See http://www.slf4j.org/codes.html#StaticLoggerBinder for further details. > Exception in thread "main" java.lang.NullPointerException > at org.drools.compiler.kie.builder.impl.KieBuilderImpl.generateKieModuleMetaInfo(KieBuilderImpl.java:222) > at org.drools.compiler.kie.builder.impl.KieBuilderImpl.buildAll(KieBuilderImpl.java:194) > at org.drools.example.api.kiemodulemodel.KieModuleModelExample.go(KieModuleModelExample.java:39) > at org.drools.example.api.kiemodulemodel.KieModuleModelExample.main(KieModuleModelExample.java:63) > > > Exactly the same happens when I do the same in my project. > > Any ideas? > > Thanks! > > Demian > _______________________________________________ > 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/20140115/185118ee/attachment-0001.html From calcacuervo at gmail.com Wed Jan 15 15:30:02 2014 From: calcacuervo at gmail.com (Demian Calcaprina) Date: Wed, 15 Jan 2014 18:30:02 -0200 Subject: [rules-users] Problem when creating KieModuleModel In-Reply-To: <07B6ECC5-79A8-499F-B16F-21F9CBCBC4AF@codehaus.org> References: <07B6ECC5-79A8-499F-B16F-21F9CBCBC4AF@codehaus.org> Message-ID: Thanks Mark, very instructive. On Wed, Jan 15, 2014 at 5:21 PM, Mark Proctor wrote: > http://bit.ly/1eKm7lC > > Mark > > On 15 Jan 2014, at 19:35, Demian Calcaprina wrote: > > Hi Guys! > > I am having a problem using drools 6 in my project. And I was able to > reproduce it in one of the examples.. > > I just got this example: > > > https://github.com/droolsjbpm/drools/tree/master/drools-examples-api/kiemodulemodel-example > > built the 2 dependant projects, kiebase inclusion and namedkiesession. > > Then, run the org.drools.example.api.kiemodulemodel.KieModuleModelExample > in my eclipse, and I get the following: > > SLF4J: Failed to load class "org.slf4j.impl.StaticLoggerBinder". > SLF4J: Defaulting to no-operation (NOP) logger implementation > SLF4J: See http://www.slf4j.org/codes.html#StaticLoggerBinder for further > details. > Exception in thread "main" java.lang.NullPointerException > at > org.drools.compiler.kie.builder.impl.KieBuilderImpl.generateKieModuleMetaInfo(KieBuilderImpl.java:222) > at > org.drools.compiler.kie.builder.impl.KieBuilderImpl.buildAll(KieBuilderImpl.java:194) > at > org.drools.example.api.kiemodulemodel.KieModuleModelExample.go(KieModuleModelExample.java:39) > at > org.drools.example.api.kiemodulemodel.KieModuleModelExample.main(KieModuleModelExample.java:63) > > > Exactly the same happens when I do the same in my project. > > Any ideas? > > Thanks! > > Demian > _______________________________________________ > 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/20140115/1fc5f5c4/attachment.html From jonathan.labin at gmail.com Wed Jan 15 15:36:45 2014 From: jonathan.labin at gmail.com (jonathan.labin) Date: Wed, 15 Jan 2014 12:36:45 -0800 (PST) Subject: [rules-users] Planner with a list of planning variables In-Reply-To: <51AC94B4.6050305@gmail.com> References: <1370262087.11213.YahooMailNeo@web162403.mail.bf1.yahoo.com> <51AC94B4.6050305@gmail.com> Message-ID: <1389818205315-4027704.post@n3.nabble.com> I have a related question and I'd like to ask it by extending the domain described here. Say that instead of the solution being one recipe, I am building a multiple-course meal of recipes. The problem will define the course slots including the maximum number of ingredients that can be used and the list of ingredients allowed for the slots of that course. Not all courses must have a recipe built. If the constraints of the guests can be satisfied with fewer courses, the caterer saves money. Each course is one recipe as described here: a list of ingredients (in my case i don't particularly care about the order of the ingredients within the recipe). Certainly each recipe does not need to use it's maximum number of ingredients. In my current implementation, I have a flattened list of assignment Planning Entities where each assignment represents an ingredient slot of a course mapped ingredient). For example if the first course has a maximum of 5 ingredients, the second course has a maximum of 10 ingredients, and the third has a maximum of 3 ingredients, my problem would have a list containing 18 Planning Entities all in one list. The trouble with this approach is that each slot is a separate entity. This means that assigning the ingredient to each of the 5 possible slots of first course is considered a separate solution when in reality it doesn't matter which slot of the course the ingredient ends up in. This makes the search space much larger than it needs to be and results in a lot of swapping of ingredient assignments within the same course which results in no change in score. Is there a recommended pattern to model this domain efficiently? Is there a modification that I can apply to my current representation of this domain which will allow an ingredient assigned to any slot of a course to be considered the same? Thanks, Jon -- View this message in context: http://drools.46999.n3.nabble.com/rules-users-Planner-with-a-list-of-planning-variables-tp4024088p4027704.html Sent from the Drools: User forum mailing list archive at Nabble.com. From adarsh.chaini at hsbcib.com Wed Jan 15 15:51:40 2014 From: adarsh.chaini at hsbcib.com (adarsh.chaini at hsbcib.com) Date: Wed, 15 Jan 2014 20:51:40 +0000 Subject: [rules-users] permgen leak In-Reply-To: References: <1386258456435-4027111.post@n3.nabble.com> <1386259095814-4027115.post@n3.nabble.com> <52AD529D.8040504@gmail.com> <1387189626968-4027321.post@n3.nabble.com> <52AF5639.5060507@gmail.com> <1389015365148-4027530.post@n3.nabble.com> <1389018700389-4027534.post@n3.nabble.com> <23E0006C-4B62-4000-BA2B-05E6314F9026@codehaus.org> <1389024856614-4027539.post@n3.nabble.com> <7E35D477-589F-49E3-B00A-E2D41D070200@codehaus.org> <52CB0140.4090502@gmail.com> <63508E3F-3F1A-42E8-A893-6F2996A275BC@codehaus.org> <2F11EE38-0C02-4C8A-8E12-98CA54AC3C31@codehaus.org> Message-ID: Is this possible to set everything to MVEL Dialect as we are using JavaDialect in all our rules. We had this few times before and we managed to avoid it with usage of CMSClassUnlaoadingEnabled . But this has again comeback recently because the rate at which the classes are produced with load,CMS is unable to collect the permgen space at same rate so it trips Thanks and regards, Adarsh CHAINI SENIOR LEAD DEVELOPMENT SPECIALIST | HSBC Bank Plc 8 Canada Square, London E14 5HQ, UK _______________________________________________ Phone Int: (0)79914720 Ext: +44 (0)20 79914720 Mobile +44(0)7595530105 Email adarsh.chaini at hsbcib.com _______________________________________________ Protect our environment - please only print this if you have to! From: Mark Proctor To: Rules Users List Date: 15/01/2014 18:27 Subject: Re: [rules-users] permgen leak Sent by: rules-users-bounces at lists.jboss.org You can try setting everything to the MVEL dialect, and also forcing MVEL to reflection via the system property (turning off jit) http://mvel.codehaus.org/Disabling+the+JIT+Compiler Mark On 15 Jan 2014, at 18:23, adarsh.chaini at hsbcib.com wrote: Hi Mark/Davide Is there a work around to this problem in 5.4?. Thanks and regards, Adarsh CHAINI SENIOR LEAD DEVELOPMENT SPECIALIST | HSBC Bank Plc 8 Canada Square, London E14 5HQ, UK _______________________________________________ Phone Int: (0)79914720 Ext: +44 (0)20 79914720 Mobile +44(0)7595530105 Email adarsh.chaini at hsbcib.com _______________________________________________ Protect our environment - please only print this if you have to! From: Mark Proctor To: Rules Users List Date: 08/01/2014 04:46 Subject: Re: [rules-users] permgen leak Sent by: rules-users-bounces at lists.jboss.org For anyone interested. The commit involves addressing two needs. 1) Enforcing MVEL reflection mode throughout - MVEL ASM optimiser can NEVER be used for anything (it doesn?t add much value anyway). 2) Avoiding giving the template system the root class loader(which we use for dynamic stuff), as those templates are statically cached. https://github.com/sotty/drools/commit/1b75d4785861e72338cc5ea1280610a7937be017 Mark On 8 Jan 2014, at 00:53, Mark Proctor wrote: > The root of the perm gen leak has now be solved, thanks to some heroic work by community developer Davide Sottara. > > This is just in time for the 5.6 release going out this week. You will not need to use the kbase.dispose() work around. > > Mark > On 6 Jan 2014, at 20:50, Mark Proctor wrote: > >> The 5.6 approach should be considered a work around, not a fix. Somewhere a ref is being held, that shouldn?t be - we just haven?t found it yet. >> >> Mark >> >> On 6 Jan 2014, at 19:17, Davide Sottara wrote: >> >>> I have run pmander's tests, and reported in a previous email. >>> The leak in 5.x is due to the nature of the composite classloader, and >>> dispose() >>> forces the memory to be released. I don't remember if that fix was in >>> 5.6.CR1 >>> (probably not), so you may have to try 5.6.0-SNAPSHOT or wait for the >>> end of the week. >>> 6.x does not suffer from the same problem, but has a different issue - >>> no way >>> to unload kie modules once they are cached - which Mario has been >>> working on. >>> In either case, pmander's test works fine in both 5.6.x and 6.x after >>> these fixes >>> Davide >>> >>> On 01/06/2014 07:56 PM, Mark Proctor wrote: >>>> I?ve been told 5.6 will be released this week. This is because the JCR2GIT migration tool, in 5.6 is needed for our 6.0 product. >>>> >>>> Davide's current kbase.dispose() method, on the concrete class, should just be considered a work around for the problem. Unless this is fixed by someone in the community, I don?t think any core developers will have time to address this. At least not for 5.x; we?ll continue to look into it for 6.x. >>>> >>>> Mark >>>> >>>> >>>> On 6 Jan 2014, at 16:14, brachi wrote: >>>> >>>>> see previous messages, pmander attached a unit test >>>>> >>>>> >>>>> >>>>> -- >>>>> View this message in context: http://drools.46999.n3.nabble.com/permgen-leak-tp4027038p4027539.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 >> > _______________________________________________ rules-users mailing list rules-users at lists.jboss.org https://lists.jboss.org/mailman/listinfo/rules-users ************************************************************ HSBC Bank plc may be solicited in the course of its placement efforts for a new issue, by investment clients of the firm for whom the Bank as a firm already provides other services. It may equally decide to allocate to its own proprietary book or with an associate of HSBC Group. This represents a potential conflict of interest. HSBC Bank plc has internal arrangements designed to ensure that the firm would give unbiased and full advice to the corporate finance client about the valuation and pricing of the offering as well as internal systems, controls and procedures to identify and manage conflicts of interest. HSBC Bank plc Registered Office: 8 Canada Square, London E14 5HQ, United Kingdom Registered in England - Number 14259 Authorised by the Prudential Regulation Authority and regulated by the Financial Conduct Authority and the Prudential Regulation Authority ************************************************************ ************************************************************ HSBC Bank plc may be solicited in the course of its placement efforts for a new issue, by investment clients of the firm for whom the Bank as a firm already provides other services. It may equally decide to allocate to its own proprietary book or with an associate of HSBC Group. This represents a potential conflict of interest. HSBC Bank plc has internal arrangements designed to ensure that the firm would give unbiased and full advice to the corporate finance client about the valuation and pricing of the offering as well as internal systems, controls and procedures to identify and manage conflicts of interest. HSBC Bank plc Registered Office: 8 Canada Square, London E14 5HQ, United Kingdom Registered in England - Number 14259 Authorised by the Prudential Regulation Authority and regulated by the Financial Conduct Authority and the Prudential Regulation Authority ************************************************************ ----------------------------------------- SAVE PAPER - THINK BEFORE YOU PRINT! This transmission has been issued by a member of the HSBC Group "HSBC" for the information of the addressee only and should not be reproduced and/or distributed to any other person. Each page attached hereto must be read in conjunction with any disclaimer which forms part of it. Unless otherwise stated, this transmission is neither an offer nor the solicitation of an offer to sell or purchase any investment. Its contents are based on information obtained from sources believed to be reliable but HSBC makes no representation and accepts no responsibility or liability as to its completeness or accuracy._______________________________________________ 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 ************************************************************ HSBC Bank plc may be solicited in the course of its placement efforts for a new issue, by investment clients of the firm for whom the Bank as a firm already provides other services. It may equally decide to allocate to its own proprietary book or with an associate of HSBC Group. This represents a potential conflict of interest. HSBC Bank plc has internal arrangements designed to ensure that the firm would give unbiased and full advice to the corporate finance client about the valuation and pricing of the offering as well as internal systems, controls and procedures to identify and manage conflicts of interest. HSBC Bank plc Registered Office: 8 Canada Square, London E14 5HQ, United Kingdom Registered in England - Number 14259 Authorised by the Prudential Regulation Authority and regulated by the Financial Conduct Authority and the Prudential Regulation Authority ************************************************************ -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.jboss.org/pipermail/rules-users/attachments/20140115/3428e64d/attachment-0001.html From mproctor at codehaus.org Wed Jan 15 16:04:17 2014 From: mproctor at codehaus.org (Mark Proctor) Date: Wed, 15 Jan 2014 21:04:17 +0000 Subject: [rules-users] permgen leak In-Reply-To: References: <1386258456435-4027111.post@n3.nabble.com> <1386259095814-4027115.post@n3.nabble.com> <52AD529D.8040504@gmail.com> <1387189626968-4027321.post@n3.nabble.com> <52AF5639.5060507@gmail.com> <1389015365148-4027530.post@n3.nabble.com> <1389018700389-4027534.post@n3.nabble.com> <23E0006C-4B62-4000-BA2B-05E6314F9026@codehaus.org> <1389024856614-4027539.post@n3.nabble.com> <7E35D477-589F-49E3-B00A-E2D41D070200@codehaus.org> <52CB0140.4090502@gmail.com> <63508E3F-3F1A-42E8-A893-6F2996A275BC@codehaus.org> <2F11EE38-0C02-4C8A-8E12-98CA54AC3C31@codehaus.org> Message-ID: why not just update to 5.6, it?s fixed there. http://downloads.jboss.org/drools/release/5.6.0.Final/ You can specify dialect at the top of the drl file, to be applied to all rules in that file. But that?s about it. Mark On 15 Jan 2014, at 20:51, adarsh.chaini at hsbcib.com wrote: > Is this possible to set everything to MVEL Dialect as we are using JavaDialect in all our rules. > We had this few times before and we managed to avoid it with usage of CMSClassUnlaoadingEnabled . > But this has again comeback recently because the rate at which the classes are produced with load,CMS is unable to collect the permgen space at same rate so it trips > > Thanks and regards, > > Adarsh CHAINI > SENIOR LEAD DEVELOPMENT SPECIALIST | HSBC Bank Plc > 8 Canada Square, London E14 5HQ, UK > _______________________________________________ > > Phone Int: (0)79914720 Ext: +44 (0)20 79914720 > Mobile +44(0)7595530105 > Email adarsh.chaini at hsbcib.com > > > _______________________________________________ > Protect our environment - please only print this if you have to! > > > > > From: Mark Proctor > To: Rules Users List > Date: 15/01/2014 18:27 > Subject: Re: [rules-users] permgen leak > Sent by: rules-users-bounces at lists.jboss.org > > > > > You can try setting everything to the MVEL dialect, and also forcing MVEL to reflection via the system property (turning off jit) > http://mvel.codehaus.org/Disabling+the+JIT+Compiler > > Mark > On 15 Jan 2014, at 18:23, adarsh.chaini at hsbcib.com wrote: > > Hi Mark/Davide > > Is there a work around to this problem in 5.4?. > > > Thanks and regards, > > Adarsh CHAINI > SENIOR LEAD DEVELOPMENT SPECIALIST | HSBC Bank Plc > 8 Canada Square, London E14 5HQ, UK > _______________________________________________ > > Phone Int: (0)79914720 Ext: +44 (0)20 79914720 > Mobile +44(0)7595530105 > Email adarsh.chaini at hsbcib.com > > > > _______________________________________________ > Protect our environment - please only print this if you have to! > > > > > From: Mark Proctor > To: Rules Users List > Date: 08/01/2014 04:46 > Subject: Re: [rules-users] permgen leak > Sent by: rules-users-bounces at lists.jboss.org > > > > > > For anyone interested. The commit involves addressing two needs. > 1) Enforcing MVEL reflection mode throughout - MVEL ASM optimiser can NEVER be used for anything (it doesn?t add much value anyway). > 2) Avoiding giving the template system the root class loader(which we use for dynamic stuff), as those templates are statically cached. > https://github.com/sotty/drools/commit/1b75d4785861e72338cc5ea1280610a7937be017 > > Mark > On 8 Jan 2014, at 00:53, Mark Proctor wrote: > > > The root of the perm gen leak has now be solved, thanks to some heroic work by community developer Davide Sottara. > > > > This is just in time for the 5.6 release going out this week. You will not need to use the kbase.dispose() work around. > > > > Mark > > On 6 Jan 2014, at 20:50, Mark Proctor wrote: > > > >> The 5.6 approach should be considered a work around, not a fix. Somewhere a ref is being held, that shouldn?t be - we just haven?t found it yet. > >> > >> Mark > >> > >> On 6 Jan 2014, at 19:17, Davide Sottara wrote: > >> > >>> I have run pmander's tests, and reported in a previous email. > >>> The leak in 5.x is due to the nature of the composite classloader, and > >>> dispose() > >>> forces the memory to be released. I don't remember if that fix was in > >>> 5.6.CR1 > >>> (probably not), so you may have to try 5.6.0-SNAPSHOT or wait for the > >>> end of the week. > >>> 6.x does not suffer from the same problem, but has a different issue - > >>> no way > >>> to unload kie modules once they are cached - which Mario has been > >>> working on. > >>> In either case, pmander's test works fine in both 5.6.x and 6.x after > >>> these fixes > >>> Davide > >>> > >>> On 01/06/2014 07:56 PM, Mark Proctor wrote: > >>>> I?ve been told 5.6 will be released this week. This is because the JCR2GIT migration tool, in 5.6 is needed for our 6.0 product. > >>>> > >>>> Davide's current kbase.dispose() method, on the concrete class, should just be considered a work around for the problem. Unless this is fixed by someone in the community, I don?t think any core developers will have time to address this. At least not for 5.x; we?ll continue to look into it for 6.x. > >>>> > >>>> Mark > >>>> > >>>> > >>>> On 6 Jan 2014, at 16:14, brachi wrote: > >>>> > >>>>> see previous messages, pmander attached a unit test > >>>>> > >>>>> > >>>>> > >>>>> -- > >>>>> View this message in context: http://drools.46999.n3.nabble.com/permgen-leak-tp4027038p4027539.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 > >> > > > > > _______________________________________________ > rules-users mailing list > rules-users at lists.jboss.org > https://lists.jboss.org/mailman/listinfo/rules-users > > > > > ************************************************************ > HSBC Bank plc may be solicited in the course of its placement efforts for a new issue, by investment clients of the firm for whom the Bank as a firm already provides other services. It may equally decide to allocate to its own proprietary book or with an associate of HSBC Group. This represents a potential conflict of interest. HSBC Bank plc has internal arrangements designed to ensure that the firm would give unbiased and full advice to the corporate finance client about the valuation and pricing of the offering as well as internal systems, controls and procedures to identify and manage conflicts of interest. > > HSBC Bank plc > Registered Office: 8 Canada Square, London E14 5HQ, United Kingdom > Registered in England - Number 14259 > Authorised by the Prudential Regulation Authority and regulated by the Financial Conduct Authority and the Prudential Regulation Authority > ************************************************************ > > > ************************************************************ > HSBC Bank plc may be solicited in the course of its placement efforts for a new issue, by investment clients of the firm for whom the Bank as a firm already provides other services. It may equally decide to allocate to its own proprietary book or with an associate of HSBC Group. This represents a potential conflict of interest. HSBC Bank plc has internal arrangements designed to ensure that the firm would give unbiased and full advice to the corporate finance client about the valuation and pricing of the offering as well as internal systems, controls and procedures to identify and manage conflicts of interest. > > HSBC Bank plc > Registered Office: 8 Canada Square, London E14 5HQ, United Kingdom > Registered in England - Number 14259 > Authorised by the Prudential Regulation Authority and regulated by the Financial Conduct Authority and the Prudential Regulation Authority > ************************************************************ > ----------------------------------------- SAVE PAPER - THINK BEFORE YOU PRINT! This transmission has been issued by a member of the HSBC Group "HSBC" for the information of the addressee only and should not be reproduced and/or distributed to any other person. Each page attached hereto must be read in conjunction with any disclaimer which forms part of it. Unless otherwise stated, this transmission is neither an offer nor the solicitation of an offer to sell or purchase any investment. Its contents are based on information obtained from sources believed to be reliable but HSBC makes no representation and accepts no responsibility or liability as to its completeness or accuracy._______________________________________________ > 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 > > > > ************************************************************ > HSBC Bank plc may be solicited in the course of its placement efforts for a new issue, by investment clients of the firm for whom the Bank as a firm already provides other services. It may equally decide to allocate to its own proprietary book or with an associate of HSBC Group. This represents a potential conflict of interest. HSBC Bank plc has internal arrangements designed to ensure that the firm would give unbiased and full advice to the corporate finance client about the valuation and pricing of the offering as well as internal systems, controls and procedures to identify and manage conflicts of interest. > > HSBC Bank plc > Registered Office: 8 Canada Square, London E14 5HQ, United Kingdom > Registered in England - Number 14259 > Authorised by the Prudential Regulation Authority and regulated by the Financial Conduct Authority and the Prudential Regulation Authority > ************************************************************ > ----------------------------------------- SAVE PAPER - THINK BEFORE YOU PRINT! This transmission has been issued by a member of the HSBC Group "HSBC" for the information of the addressee only and should not be reproduced and/or distributed to any other person. Each page attached hereto must be read in conjunction with any disclaimer which forms part of it. Unless otherwise stated, this transmission is neither an offer nor the solicitation of an offer to sell or purchase any investment. Its contents are based on information obtained from sources believed to be reliable but HSBC makes no representation and accepts no responsibility or liability as to its completeness or accuracy._______________________________________________ > 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/20140115/681a4ebd/attachment-0001.html From npatel at ndorange.com Wed Jan 15 17:40:11 2014 From: npatel at ndorange.com (Nikita Patel) Date: Wed, 15 Jan 2014 22:40:11 +0000 Subject: [rules-users] Ability to use Any of the Following (OR) with DSLs Message-ID: Hi, I have created multiple DSLs. I now want to be able to create a rule which says: 1. For any of the following: DSL 1 DSL 2 2. For any of the following: DSL 3 DSL 2 DSL 4 3. For any of the following: DSL 3 How can I currently do this? Appreciate any pointers. Thanks, Nikita -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.jboss.org/pipermail/rules-users/attachments/20140115/fd003cc9/attachment.html From plz.write.to at gmail.com Wed Jan 15 18:33:49 2014 From: plz.write.to at gmail.com (Sonata) Date: Wed, 15 Jan 2014 15:33:49 -0800 (PST) Subject: [rules-users] Inconsistent output when @PropertyReactive is used Message-ID: <1389828829499-4027709.post@n3.nabble.com> Below is a test to demonstrate it, also add the @PropertyReactive property to MyClass() package com.sample; rule base when m : MyClass(data == null) then end rule "2" extends base when String() MyClass(value != "test") from m then System.out.println("2 fired"); end rule "1" extends base salience 1 when MyClass(value == null) from m then System.out.println("1 fired"); insert(new String()); modify(m) { setValue("test") } end The test above should output "1 fired" and "2 fired". Although we have set the value to "test", rule "2" supposes to not fire, but it is in fact expected to fire due to the non-reactive property of CE "from", and the result confirms this. But if we reorder the code in rule "1" to rule "1" extends base salience 1 when MyClass(value == null) from m then System.out.println("1 fired"); modify(m) { setValue("test") } insert(new String()); end Then you get only "1 fired", as if CE "from" is reactive again. This only happens when you have the @PropertyReactive property added to MyClass() Version tested are 5.5.0.Final and 5.6.0.Final Could the Drools team review this? Thank you. -- View this message in context: http://drools.46999.n3.nabble.com/Inconsistent-output-when-PropertyReactive-is-used-tp4027709.html Sent from the Drools: User forum mailing list archive at Nabble.com. From mproctor at codehaus.org Wed Jan 15 18:49:17 2014 From: mproctor at codehaus.org (Mark Proctor) Date: Wed, 15 Jan 2014 23:49:17 +0000 Subject: [rules-users] Inconsistent output when @PropertyReactive is used In-Reply-To: <1389828829499-4027709.post@n3.nabble.com> References: <1389828829499-4027709.post@n3.nabble.com> Message-ID: <3DCCD07F-7A7E-4A48-8031-7503B335F84D@codehaus.org> property reactive will not work with ?from?. Mark On 15 Jan 2014, at 23:33, Sonata wrote: > Below is a test to demonstrate it, also add the @PropertyReactive property to > MyClass() > > package com.sample; > > rule base > when m : MyClass(data == null) > then > end > > rule "2" extends base > when > String() > MyClass(value != "test") from m > then > System.out.println("2 fired"); > end > > rule "1" extends base > salience 1 > when > MyClass(value == null) from m > then > System.out.println("1 fired"); > insert(new String()); > modify(m) { setValue("test") } > end > > The test above should output "1 fired" and "2 fired". > Although we have set the value to "test", rule "2" supposes to not fire, but > it is in fact expected to fire due to the non-reactive property of CE > "from", and the result confirms this. > > But if we reorder the code in rule "1" to > > rule "1" extends base > salience 1 > when > MyClass(value == null) from m > then > System.out.println("1 fired"); > modify(m) { setValue("test") } > insert(new String()); > end > > Then you get only "1 fired", as if CE "from" is reactive again. > This only happens when you have the @PropertyReactive property added to > MyClass() > Version tested are 5.5.0.Final and 5.6.0.Final > > Could the Drools team review this? Thank you. > > > > -- > View this message in context: http://drools.46999.n3.nabble.com/Inconsistent-output-when-PropertyReactive-is-used-tp4027709.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 plz.write.to at gmail.com Wed Jan 15 19:08:02 2014 From: plz.write.to at gmail.com (Sonata) Date: Wed, 15 Jan 2014 16:08:02 -0800 (PST) Subject: [rules-users] Inconsistent output when @PropertyReactive is used In-Reply-To: <3DCCD07F-7A7E-4A48-8031-7503B335F84D@codehaus.org> References: <1389828829499-4027709.post@n3.nabble.com> <3DCCD07F-7A7E-4A48-8031-7503B335F84D@codehaus.org> Message-ID: <1389830882073-4027712.post@n3.nabble.com> Mark Proctor wrote > property reactive will not work with ?from?. > > Mark Yes I am aware of that and I stated that on my post already. But this "will not work with ?from?" is not consistence, making the result unpredictable. -- View this message in context: http://drools.46999.n3.nabble.com/Inconsistent-output-when-PropertyReactive-is-used-tp4027709p4027712.html Sent from the Drools: User forum mailing list archive at Nabble.com. From mproctor at codehaus.org Wed Jan 15 19:48:09 2014 From: mproctor at codehaus.org (Mark Proctor) Date: Thu, 16 Jan 2014 00:48:09 +0000 Subject: [rules-users] Inconsistent output when @PropertyReactive is used In-Reply-To: <1389830882073-4027712.post@n3.nabble.com> References: <1389828829499-4027709.post@n3.nabble.com> <3DCCD07F-7A7E-4A48-8031-7503B335F84D@codehaus.org> <1389830882073-4027712.post@n3.nabble.com> Message-ID: ordering matters, it?s not inconsistent. The from is applied in the alpha network, it stops reactive of pattern modify. The insert joins with the ?from? in the beta network and propagates - @PR is not applied at that level. When ?insert? is first, there is nothing for it to join with; so the insert does nothing. The later modify is ignored during @PR. When the insert is after, while the @PR is ignored for the modify the insert will now join with MyClass and propagate. This is the expected behaviour. Mark On 16 Jan 2014, at 00:08, Sonata wrote: > Mark Proctor wrote >> property reactive will not work with ?from?. >> >> Mark > > Yes I am aware of that and I stated that on my post already. > But this "will not work with ?from?" is not consistence, making the result > unpredictable. > > > > > -- > View this message in context: http://drools.46999.n3.nabble.com/Inconsistent-output-when-PropertyReactive-is-used-tp4027709p4027712.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 Wed Jan 15 19:51:43 2014 From: dsotty at gmail.com (Davide Sottara) Date: Thu, 16 Jan 2014 01:51:43 +0100 Subject: [rules-users] Inconsistent output when @PropertyReactive is used In-Reply-To: <1389828829499-4027709.post@n3.nabble.com> References: <1389828829499-4027709.post@n3.nabble.com> Message-ID: <52D72D1F.7080103@gmail.com> Actually (and arguably) I think that the behavior is consistent. In the first case, you insert a MyClass instance: base is eligible for activation, and so is rule 1. When rule 1 fires, it inserts a String which continues the previous propagation through rule 2. At this point, value is still != "test" and an activation for rule 2 is created. Now the modify: since the only @PR pattern is MyClass( data == null ) in rule "base" and you are setting the property value, the (re)propagation is blocked. This prevents the previous activation of rule 2 from being overwritten and cancelled, so rule 2 fires. In the second example, things are slightly different. Rule 1 activates as in the previous case, firing. This time, you modify m first, but since no String is in the WM, there is nothing to (re)propagate or cancel for rule 2. However, there is indeed a MyClass instance in the WM. When you insert the String, the modification has already been propagated: this time the String simply joins with the existing MyClass and continues its propagation. The next node is a "from" which checks the current value: it is now "test", so the alpha constraint blocks the propagation. Rule 1 does not fire as expected, but it has little do do with @PR. Davide On 01/16/2014 12:33 AM, Sonata wrote: > Below is a test to demonstrate it, also add the @PropertyReactive property to > MyClass() > > package com.sample; > > rule base > when m : MyClass(data == null) > then > end > > rule "2" extends base > when > String() > MyClass(value != "test") from m > then > System.out.println("2 fired"); > end > > rule "1" extends base > salience 1 > when > MyClass(value == null) from m > then > System.out.println("1 fired"); > insert(new String()); > modify(m) { setValue("test") } > end > > The test above should output "1 fired" and "2 fired". > Although we have set the value to "test", rule "2" supposes to not fire, but > it is in fact expected to fire due to the non-reactive property of CE > "from", and the result confirms this. > > But if we reorder the code in rule "1" to > > rule "1" extends base > salience 1 > when > MyClass(value == null) from m > then > System.out.println("1 fired"); > modify(m) { setValue("test") } > insert(new String()); > end > > Then you get only "1 fired", as if CE "from" is reactive again. > This only happens when you have the @PropertyReactive property added to > MyClass() > Version tested are 5.5.0.Final and 5.6.0.Final > > Could the Drools team review this? Thank you. > > > > -- > View this message in context: http://drools.46999.n3.nabble.com/Inconsistent-output-when-PropertyReactive-is-used-tp4027709.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 plz.write.to at gmail.com Wed Jan 15 20:51:23 2014 From: plz.write.to at gmail.com (Sonata) Date: Wed, 15 Jan 2014 17:51:23 -0800 (PST) Subject: [rules-users] Inconsistent output when @PropertyReactive is used In-Reply-To: <52D72D1F.7080103@gmail.com> References: <1389828829499-4027709.post@n3.nabble.com> <52D72D1F.7080103@gmail.com> Message-ID: <1389837083852-4027715.post@n3.nabble.com> Thanks very much for the detailed explanation Mark Proctor and Davide Sottara! I really wouldn't have thought that the ordering of code matters here while they are logically equivalent. And to understand that is actually required to be at very low level... So to sum up, when you have @PropertyReactive 1. "from" conditions are not re-evaluated 2. unless it has another non "from" condition preceding it and that condition is re-evaluated (by insert or modify) and this is expected behaviour. -- View this message in context: http://drools.46999.n3.nabble.com/Inconsistent-output-when-PropertyReactive-is-used-tp4027709p4027715.html Sent from the Drools: User forum mailing list archive at Nabble.com. From dean at basys.com Wed Jan 15 22:40:12 2014 From: dean at basys.com (Dean Whisnant) Date: Wed, 15 Jan 2014 22:40:12 -0500 Subject: [rules-users] permgen leak In-Reply-To: <2F11EE38-0C02-4C8A-8E12-98CA54AC3C31@codehaus.org> References: <1386258456435-4027111.post@n3.nabble.com> <1386259095814-4027115.post@n3.nabble.com> <52AD529D.8040504@gmail.com> <1387189626968-4027321.post@n3.nabble.com> <52AF5639.5060507@gmail.com> <1389015365148-4027530.post@n3.nabble.com> <1389018700389-4027534.post@n3.nabble.com> <23E0006C-4B62-4000-BA2B-05E6314F9026@codehaus.org> <1389024856614-4027539.post@n3.nabble.com> <7E35D477-589F-49E3-B00A-E2D41D070200@codehaus.org> <52CB0140.4090502@gmail.com> <63508E3F-3F1A-42E8-A893-6F2996A275BC@codehaus.org> <2F11EE38-0C02-4C8A-8E12-98CA54AC3C31@codehaus.org> Message-ID: <86842F7EF952B940B49255CEDB657F2C03FB03A4CB61@Exchange07.basysnet.com> Hi, This may be a very basic question, but I'm using drools 5.1.1 and when I invoke a stateful session and that session ends I receive back all of the facts that were created during that session and I translate those into an EDI transaction. As an example I might have a few objects of types "2700*LX,2750* N1,2750* REF, and 2750*DTP". I know my rules fired create objects like: LX*1 N1*75*CMSEC REF*17*A DTP*007*D8*20140114 LX*2 N1*75*STATUS REF*17*AFTNM DTP*007*D8*20140114 Each of these lines is an object of the type I mentioned above. My task is to make sure that the different object types "stick" together when I put them in the .x12 file so that they are formatted above. What I do internally is I keep track that I have two of each of these objects, but I don't know if there is some type of timestamp that is on them that I could keep the first LX, N1, REF, DTP together or not. In one example I have a rule that inserts them in the order you see, yes, it literally inserts 8 objects/facts into memory. And I need to know the order they were inserted so that I can properly form a file out of them on the backend. Any thoughts? Thanks, Dean From mproctor at codehaus.org Wed Jan 15 22:46:21 2014 From: mproctor at codehaus.org (Mark Proctor) Date: Thu, 16 Jan 2014 03:46:21 +0000 Subject: [rules-users] permgen leak In-Reply-To: <86842F7EF952B940B49255CEDB657F2C03FB03A4CB61@Exchange07.basysnet.com> References: <1386258456435-4027111.post@n3.nabble.com> <1386259095814-4027115.post@n3.nabble.com> <52AD529D.8040504@gmail.com> <1387189626968-4027321.post@n3.nabble.com> <52AF5639.5060507@gmail.com> <1389015365148-4027530.post@n3.nabble.com> <1389018700389-4027534.post@n3.nabble.com> <23E0006C-4B62-4000-BA2B-05E6314F9026@codehaus.org> <1389024856614-4027539.post@n3.nabble.com> <7E35D477-589F-49E3-B00A-E2D41D070200@codehaus.org> <52CB0140.4090502@gmail.com> <63508E3F-3F1A-42E8-A893-6F2996A275BC@codehaus.org> <2F11EE38-0C02-4C8A-8E12-98CA54AC3C31@codehaus.org> <86842F7EF952B940B49255CEDB657F2C03FB03A4CB61@Exchange07.basysnet.com> Message-ID: Please don?t reply to existing posts, to start new discussions, it screws up the threads. Please read: http://www.jboss.org/drools/lists Anti-patterns to be ignored or attract abuse from others: 12. Reply to an existing thread but starting a new topic Mark On 16 Jan 2014, at 03:40, Dean Whisnant wrote: > Hi, > > This may be a very basic question, but I'm using drools 5.1.1 and when I invoke a stateful session and that session ends I receive back all of the facts that were created during that session and I translate those into an EDI transaction. As an example I might have a few objects of types "2700*LX,2750* N1,2750* REF, and 2750*DTP". I know my rules fired create objects like: > > LX*1 > N1*75*CMSEC > REF*17*A > DTP*007*D8*20140114 > LX*2 > N1*75*STATUS > REF*17*AFTNM > DTP*007*D8*20140114 > > Each of these lines is an object of the type I mentioned above. > > My task is to make sure that the different object types "stick" together when I put them in the .x12 file so that they are formatted above. > > What I do internally is I keep track that I have two of each of these objects, but I don't know if there is some type of timestamp that is on them that I could keep the first LX, N1, REF, DTP together or not. > > In one example I have a rule that inserts them in the order you see, yes, it literally inserts 8 objects/facts into memory. And I need to know the order they were inserted so that I can properly form a file out of them on the backend. > > Any thoughts? > > Thanks, > > Dean > > _______________________________________________ > 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/20140116/6dbf9bd3/attachment.html From ge0ffrey.spam at gmail.com Thu Jan 16 02:31:18 2014 From: ge0ffrey.spam at gmail.com (Geoffrey De Smet) Date: Thu, 16 Jan 2014 08:31:18 +0100 Subject: [rules-users] Planner with a list of planning variables In-Reply-To: <1389818205315-4027704.post@n3.nabble.com> References: <1370262087.11213.YahooMailNeo@web162403.mail.bf1.yahoo.com> <51AC94B4.6050305@gmail.com> <1389818205315-4027704.post@n3.nabble.com> Message-ID: On 15-01-14 21:36, jonathan.labin wrote: > I have a related question and I'd like to ask it by extending the domain > described here. > > Say that instead of the solution being one recipe, I am building a > multiple-course meal of recipes. > The problem will define the course slots including the maximum number of > ingredients that can be used and the list of ingredients allowed for the > slots of that course. > Not all courses must have a recipe built. If the constraints of the guests > can be satisfied with fewer courses, the caterer saves money. > > Each course is one recipe as described here: a list of ingredients > (in my case i don't particularly care about the order of the ingredients > within the recipe). Certainly each recipe does not need to use it's maximum > number of ingredients. > > In my current implementation, I have a flattened list of assignment Planning > Entities where each assignment represents an ingredient slot of a course > mapped ingredient). > For example if the first course has a maximum of 5 ingredients, the second > course has a maximum of 10 ingredients, and the third has a maximum of 3 > ingredients, my problem would have a list containing 18 Planning Entities > all in one list. > > The trouble with this approach is that each slot is a separate entity. This > means that assigning the ingredient to each of the 5 possible slots of first > course is considered a separate solution when in reality it doesn't matter > which slot of the course the ingredient ends up in. This makes the search > space much larger than it needs to be and results in a lot of swapping of > ingredient assignments within the same course which results in no change in > score. The curriculum course example had the same problem: Lectures (= entities) belonging to the same course are interchangeable. Therefore, I configured the swapMoveSelector as such: org.optaplanner.examples.curriculumcourse.solver.move.DifferentCourseSwapMoveFilter > > Is there a recommended pattern to model this domain efficiently? Is there a > modification that I can apply to my current representation of this domain > which will allow an ingredient assigned to any slot of a course to be > considered the same? This cannot (currently) be expressed declaratively on the domain. We might want to support that in the future (so the filterClass is automatically applied on the swapMoveSelector etc), feel free to create a jira. > > Thanks, > > Jon > > > > -- > View this message in context: http://drools.46999.n3.nabble.com/rules-users-Planner-with-a-list-of-planning-variables-tp4024088p4027704.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 adarsh.chaini at hsbcib.com Thu Jan 16 05:09:22 2014 From: adarsh.chaini at hsbcib.com (adarsh.chaini at hsbcib.com) Date: Thu, 16 Jan 2014 10:09:22 +0000 Subject: [rules-users] permgen leak In-Reply-To: References: <1386258456435-4027111.post@n3.nabble.com> <1387189626968-4027321.post@n3.nabble.com> <52AF5639.5060507@gmail.com> <1389015365148-4027530.post@n3.nabble.com> <1389018700389-4027534.post@n3.nabble.com> <23E0006C-4B62-4000-BA2B-05E6314F9026@codehaus.org> <1389024856614-4027539.post@n3.nabble.com> <7E35D477-589F-49E3-B00A-E2D41D070200@codehaus.org> <52CB0140.4090502@gmail.com> <63508E3F-3F1A-42E8-A893-6F2996A275BC@codehaus.org> <2F11EE38-0C02-4C8A-8E12-98CA54AC3C31@codehaus.org> Message-ID: Mark, Thanks for your reply. We have been testing against 5.5.0.Final and we faced some problems . One of the problem was that we had a quick fix to mvel component from redhat guys (with their good will )to one of the critical concurrency issues we faced .But it seems that fix is not part of these community releases and there has been changes to mvel after that change. Is there a way that we can make the same permgen fix to the 5.4.0.Final codebase?. Or Is this possible to get the concurrency fix these newer versions?. Thanks and regards, Adarsh CHAINI SENIOR LEAD DEVELOPMENT SPECIALIST | HSBC Bank Plc 8 Canada Square, London E14 5HQ, UK _______________________________________________ Phone Int: (0)79914720 Ext: +44 (0)20 79914720 Mobile +44(0)7595530105 Email adarsh.chaini at hsbcib.com _______________________________________________ Protect our environment - please only print this if you have to! From: Mark Proctor To: Rules Users List Date: 15/01/2014 21:05 Subject: Re: [rules-users] permgen leak Sent by: rules-users-bounces at lists.jboss.org why not just update to 5.6, it?s fixed there. http://downloads.jboss.org/drools/release/5.6.0.Final/ You can specify dialect at the top of the drl file, to be applied to all rules in that file. But that?s about it. Mark On 15 Jan 2014, at 20:51, adarsh.chaini at hsbcib.com wrote: Is this possible to set everything to MVEL Dialect as we are using JavaDialect in all our rules. We had this few times before and we managed to avoid it with usage of CMSClassUnlaoadingEnabled . But this has again comeback recently because the rate at which the classes are produced with load,CMS is unable to collect the permgen space at same rate so it trips Thanks and regards, Adarsh CHAINI SENIOR LEAD DEVELOPMENT SPECIALIST | HSBC Bank Plc 8 Canada Square, London E14 5HQ, UK _______________________________________________ Phone Int: (0)79914720 Ext: +44 (0)20 79914720 Mobile +44(0)7595530105 Email adarsh.chaini at hsbcib.com _______________________________________________ Protect our environment - please only print this if you have to! From: Mark Proctor To: Rules Users List Date: 15/01/2014 18:27 Subject: Re: [rules-users] permgen leak Sent by: rules-users-bounces at lists.jboss.org You can try setting everything to the MVEL dialect, and also forcing MVEL to reflection via the system property (turning off jit) http://mvel.codehaus.org/Disabling+the+JIT+Compiler Mark On 15 Jan 2014, at 18:23, adarsh.chaini at hsbcib.com wrote: Hi Mark/Davide Is there a work around to this problem in 5.4?. Thanks and regards, Adarsh CHAINI SENIOR LEAD DEVELOPMENT SPECIALIST | HSBC Bank Plc 8 Canada Square, London E14 5HQ, UK _______________________________________________ Phone Int: (0)79914720 Ext: +44 (0)20 79914720 Mobile +44(0)7595530105 Email adarsh.chaini at hsbcib.com _______________________________________________ Protect our environment - please only print this if you have to! From: Mark Proctor To: Rules Users List Date: 08/01/2014 04:46 Subject: Re: [rules-users] permgen leak Sent by: rules-users-bounces at lists.jboss.org For anyone interested. The commit involves addressing two needs. 1) Enforcing MVEL reflection mode throughout - MVEL ASM optimiser can NEVER be used for anything (it doesn?t add much value anyway). 2) Avoiding giving the template system the root class loader(which we use for dynamic stuff), as those templates are statically cached. https://github.com/sotty/drools/commit/1b75d4785861e72338cc5ea1280610a7937be017 Mark On 8 Jan 2014, at 00:53, Mark Proctor wrote: > The root of the perm gen leak has now be solved, thanks to some heroic work by community developer Davide Sottara. > > This is just in time for the 5.6 release going out this week. You will not need to use the kbase.dispose() work around. > > Mark > On 6 Jan 2014, at 20:50, Mark Proctor wrote: > >> The 5.6 approach should be considered a work around, not a fix. Somewhere a ref is being held, that shouldn?t be - we just haven?t found it yet. >> >> Mark >> >> On 6 Jan 2014, at 19:17, Davide Sottara wrote: >> >>> I have run pmander's tests, and reported in a previous email. >>> The leak in 5.x is due to the nature of the composite classloader, and >>> dispose() >>> forces the memory to be released. I don't remember if that fix was in >>> 5.6.CR1 >>> (probably not), so you may have to try 5.6.0-SNAPSHOT or wait for the >>> end of the week. >>> 6.x does not suffer from the same problem, but has a different issue - >>> no way >>> to unload kie modules once they are cached - which Mario has been >>> working on. >>> In either case, pmander's test works fine in both 5.6.x and 6.x after >>> these fixes >>> Davide >>> >>> On 01/06/2014 07:56 PM, Mark Proctor wrote: >>>> I?ve been told 5.6 will be released this week. This is because the JCR2GIT migration tool, in 5.6 is needed for our 6.0 product. >>>> >>>> Davide's current kbase.dispose() method, on the concrete class, should just be considered a work around for the problem. Unless this is fixed by someone in the community, I don?t think any core developers will have time to address this. At least not for 5.x; we?ll continue to look into it for 6.x. >>>> >>>> Mark >>>> >>>> >>>> On 6 Jan 2014, at 16:14, brachi wrote: >>>> >>>>> see previous messages, pmander attached a unit test >>>>> >>>>> >>>>> >>>>> -- >>>>> View this message in context: http://drools.46999.n3.nabble.com/permgen-leak-tp4027038p4027539.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 >> > _______________________________________________ rules-users mailing list rules-users at lists.jboss.org https://lists.jboss.org/mailman/listinfo/rules-users ************************************************************ HSBC Bank plc may be solicited in the course of its placement efforts for a new issue, by investment clients of the firm for whom the Bank as a firm already provides other services. It may equally decide to allocate to its own proprietary book or with an associate of HSBC Group. This represents a potential conflict of interest. HSBC Bank plc has internal arrangements designed to ensure that the firm would give unbiased and full advice to the corporate finance client about the valuation and pricing of the offering as well as internal systems, controls and procedures to identify and manage conflicts of interest. HSBC Bank plc Registered Office: 8 Canada Square, London E14 5HQ, United Kingdom Registered in England - Number 14259 Authorised by the Prudential Regulation Authority and regulated by the Financial Conduct Authority and the Prudential Regulation Authority ************************************************************ ************************************************************ HSBC Bank plc may be solicited in the course of its placement efforts for a new issue, by investment clients of the firm for whom the Bank as a firm already provides other services. It may equally decide to allocate to its own proprietary book or with an associate of HSBC Group. This represents a potential conflict of interest. HSBC Bank plc has internal arrangements designed to ensure that the firm would give unbiased and full advice to the corporate finance client about the valuation and pricing of the offering as well as internal systems, controls and procedures to identify and manage conflicts of interest. HSBC Bank plc Registered Office: 8 Canada Square, London E14 5HQ, United Kingdom Registered in England - Number 14259 Authorised by the Prudential Regulation Authority and regulated by the Financial Conduct Authority and the Prudential Regulation Authority ************************************************************ ----------------------------------------- SAVE PAPER - THINK BEFORE YOU PRINT! This transmission has been issued by a member of the HSBC Group "HSBC" for the information of the addressee only and should not be reproduced and/or distributed to any other person. Each page attached hereto must be read in conjunction with any disclaimer which forms part of it. Unless otherwise stated, this transmission is neither an offer nor the solicitation of an offer to sell or purchase any investment. Its contents are based on information obtained from sources believed to be reliable but HSBC makes no representation and accepts no responsibility or liability as to its completeness or accuracy._______________________________________________ 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 ************************************************************ HSBC Bank plc may be solicited in the course of its placement efforts for a new issue, by investment clients of the firm for whom the Bank as a firm already provides other services. It may equally decide to allocate to its own proprietary book or with an associate of HSBC Group. This represents a potential conflict of interest. HSBC Bank plc has internal arrangements designed to ensure that the firm would give unbiased and full advice to the corporate finance client about the valuation and pricing of the offering as well as internal systems, controls and procedures to identify and manage conflicts of interest. HSBC Bank plc Registered Office: 8 Canada Square, London E14 5HQ, United Kingdom Registered in England - Number 14259 Authorised by the Prudential Regulation Authority and regulated by the Financial Conduct Authority and the Prudential Regulation Authority ************************************************************ ----------------------------------------- SAVE PAPER - THINK BEFORE YOU PRINT! This transmission has been issued by a member of the HSBC Group "HSBC" for the information of the addressee only and should not be reproduced and/or distributed to any other person. Each page attached hereto must be read in conjunction with any disclaimer which forms part of it. Unless otherwise stated, this transmission is neither an offer nor the solicitation of an offer to sell or purchase any investment. Its contents are based on information obtained from sources believed to be reliable but HSBC makes no representation and accepts no responsibility or liability as to its completeness or accuracy._______________________________________________ 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 ************************************************************ HSBC Bank plc may be solicited in the course of its placement efforts for a new issue, by investment clients of the firm for whom the Bank as a firm already provides other services. It may equally decide to allocate to its own proprietary book or with an associate of HSBC Group. This represents a potential conflict of interest. HSBC Bank plc has internal arrangements designed to ensure that the firm would give unbiased and full advice to the corporate finance client about the valuation and pricing of the offering as well as internal systems, controls and procedures to identify and manage conflicts of interest. HSBC Bank plc Registered Office: 8 Canada Square, London E14 5HQ, United Kingdom Registered in England - Number 14259 Authorised by the Prudential Regulation Authority and regulated by the Financial Conduct Authority and the Prudential Regulation Authority ************************************************************ -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.jboss.org/pipermail/rules-users/attachments/20140116/7ec8a9c5/attachment-0001.html From waynemetcalfe at outlook.com Thu Jan 16 09:42:06 2014 From: waynemetcalfe at outlook.com (waynemetcalfe) Date: Thu, 16 Jan 2014 06:42:06 -0800 (PST) Subject: [rules-users] KieBuilder.buildAll() causing exception Message-ID: <1389883326051-4027720.post@n3.nabble.com> Hi Guys, I'm a pretty recent Drools user. I'm trying to update a project to stop using the deprecated KnowledgeBase. I've followed examples on http://blog.athico.com/2013/10/configuration-and-convention-based.html , but an exception is being thrown when trying to build the KieBases. Drools version:6.0.0.Final Java version: 1.7.0_45 Code snippet: ... final KieServices ks = KieServices.Factory.get(); final KieRepository kr = ks.getRepository(); final KieFileSystem kfs = ks.newKieFileSystem(); //ruleScript is simply a string containing the rules kfs.write("src/main/resources/com/company/test/rules/rules.drl", ruleScript); KieBuilder kb = ks.newKieBuilder(kfs); kb.buildAll(); if (kb.getResults().hasMessages(Level.ERROR)){ configuration.getLog().error("\nSomething wrong here!\n\n"); } final KieContainer kContainer = ks.newKieContainer(kr.getDefaultReleaseId()); session = kContainer.newKieSession(); ... The following exception is thrown: java.lang.instrument.IllegalClassFormatException: Error while instrumenting class org/drools/compiler/lang/DRL6Lexer. at org.jacoco.agent.rt.internal_9dd1198.CoverageTransformer.transform(CoverageTransformer.java:89) at sun.instrument.TransformerManager.transform(TransformerManager.java:188) at sun.instrument.InstrumentationImpl.transform(InstrumentationImpl.java:424) at java.lang.ClassLoader.defineClass1(Native Method) at java.lang.ClassLoader.defineClass(ClassLoader.java:800) at java.security.SecureClassLoader.defineClass(SecureClassLoader.java:142) at java.net.URLClassLoader.defineClass(URLClassLoader.java:449) at java.net.URLClassLoader.access$100(URLClassLoader.java:71) at java.net.URLClassLoader$1.run(URLClassLoader.java:361) at java.net.URLClassLoader$1.run(URLClassLoader.java:355) at java.security.AccessController.doPrivileged(Native Method) at java.net.URLClassLoader.findClass(URLClassLoader.java:354) at java.lang.ClassLoader.loadClass(ClassLoader.java:425) at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:308) at java.lang.ClassLoader.loadClass(ClassLoader.java:358) at org.drools.compiler.compiler.DRLFactory.getDRLLexer(DRLFactory.java:93) at org.drools.compiler.compiler.DRLFactory.buildLexer(DRLFactory.java:43) at org.drools.compiler.compiler.DrlParser.parse(DrlParser.java:164) at org.drools.compiler.compiler.DrlParser.parse(DrlParser.java:146) at org.drools.compiler.compiler.PackageBuilder.drlToPackageDescr(PackageBuilder.java:518) at org.drools.compiler.compiler.CompositeKnowledgeBuilderImpl$1.map(CompositeKnowledgeBuilderImpl.java:404) at org.drools.compiler.compiler.CompositeKnowledgeBuilderImpl.buildResource(CompositeKnowledgeBuilderImpl.java:329) at org.drools.compiler.compiler.CompositeKnowledgeBuilderImpl.buildPackageDescr(CompositeKnowledgeBuilderImpl.java:312) at org.drools.compiler.compiler.CompositeKnowledgeBuilderImpl.buildPackages(CompositeKnowledgeBuilderImpl.java:96) at org.drools.compiler.compiler.CompositeKnowledgeBuilderImpl.build(CompositeKnowledgeBuilderImpl.java:87) at org.drools.compiler.kie.builder.impl.AbstractKieModule.buildKnowledgePackages(AbstractKieModule.java:204) at org.drools.compiler.kie.builder.impl.AbstractKieProject.verify(AbstractKieProject.java:39) at org.drools.compiler.kie.builder.impl.KieBuilderImpl.buildKieProject(KieBuilderImpl.java:309) at org.drools.compiler.kie.builder.impl.KieBuilderImpl.buildAll(KieBuilderImpl.java:187) at com.company.test.rules.BasicRuleEngine.start(BasicRuleEngine.java:66) at com.company.test.rules.TestBasicRuleEngine.listenersShouldBeNotifiedOfStartAndStop(TestBasicRuleEngine.java:88) 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.junit.internal.runners.statements.RunBefores.evaluate(RunBefores.java:26) at org.junit.runners.ParentRunner.runLeaf(ParentRunner.java:271) at org.junit.runners.BlockJUnit4ClassRunner.runChild(BlockJUnit4ClassRunner.java:70) at org.junit.runners.BlockJUnit4ClassRunner.runChild(BlockJUnit4ClassRunner.java:50) 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.junit.runners.ParentRunner.run(ParentRunner.java:309) at org.apache.maven.surefire.junit4.JUnit4Provider.execute(JUnit4Provider.java:254) at org.apache.maven.surefire.junit4.JUnit4Provider.executeTestSet(JUnit4Provider.java:149) at org.apache.maven.surefire.junit4.JUnit4Provider.invoke(JUnit4Provider.java:124) 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.apache.maven.surefire.util.ReflectionUtils.invokeMethodWithArray2(ReflectionUtils.java:208) at org.apache.maven.surefire.booter.ProviderFactory$ProviderProxy.invoke(ProviderFactory.java:159) at org.apache.maven.surefire.booter.ProviderFactory.invokeProvider(ProviderFactory.java:87) at org.apache.maven.surefire.booter.ForkedBooter.runSuitesInProcess(ForkedBooter.java:153) at org.apache.maven.surefire.booter.ForkedBooter.main(ForkedBooter.java:95) Caused by: java.io.IOException: Error while instrumenting class org/drools/compiler/lang/DRL6Lexer. at org.jacoco.agent.rt.internal_9dd1198.core.instr.Instrumenter.instrumentError(Instrumenter.java:147) at org.jacoco.agent.rt.internal_9dd1198.core.instr.Instrumenter.instrument(Instrumenter.java:98) at org.jacoco.agent.rt.internal_9dd1198.CoverageTransformer.transform(CoverageTransformer.java:87) ... 60 more Caused by: java.lang.RuntimeException: Method code too large! at org.jacoco.agent.rt.internal_9dd1198.asm.MethodWriter.a(Unknown Source) at org.jacoco.agent.rt.internal_9dd1198.asm.ClassWriter.toByteArray(Unknown Source) at org.jacoco.agent.rt.internal_9dd1198.core.instr.Instrumenter.instrument(Instrumenter.java:79) at org.jacoco.agent.rt.internal_9dd1198.core.instr.Instrumenter.instrument(Instrumenter.java:96) ... 61 more Any help or info would be greatly appreciated! -- View this message in context: http://drools.46999.n3.nabble.com/KieBuilder-buildAll-causing-exception-tp4027720.html Sent from the Drools: User forum mailing list archive at Nabble.com. From mproctor at codehaus.org Thu Jan 16 10:08:19 2014 From: mproctor at codehaus.org (Mark Proctor) Date: Thu, 16 Jan 2014 15:08:19 +0000 Subject: [rules-users] permgen leak In-Reply-To: References: <1386258456435-4027111.post@n3.nabble.com> <1387189626968-4027321.post@n3.nabble.com> <52AF5639.5060507@gmail.com> <1389015365148-4027530.post@n3.nabble.com> <1389018700389-4027534.post@n3.nabble.com> <23E0006C-4B62-4000-BA2B-05E6314F9026@codehaus.org> <1389024856614-4027539.post@n3.nabble.com> <7E35D477-589F-49E3-B00A-E2D41D070200@codehaus.org> <52CB0140.4090502@gmail.com> <63508E3F-3F1A-42E8-A893-6F2996A275BC@codehaus.org> <2F11EE38-0C02-4C8A-8E12-98CA54AC3C31@codehaus.org> Message-ID: <82CAE82B-C6B3-4E69-A03D-A2B03E031C21@codehaus.org> On 16 Jan 2014, at 10:09, adarsh.chaini at hsbcib.com wrote: > Mark, > > Thanks for your reply. This is a different discussion than the topic, which is about perm gen leaks. Please start new threads, for new topics. http://www.jboss.org/drools/lists "Anti-patterns to be ignored or attract abuse from others: 12. Reply to an existing thread but starting a new topic" > > We have been testing against 5.5.0.Final and we faced some problems . > One of the problem was that we had a quick fix to mvel component from redhat guys (with their good will ) If you are a paying customer, best to use the customer portal. Questions are tracked under SLA, and help shape product updates. > to one of the critical concurrency issues we faced .But it seems that fix is not part of these community releases and there has been changes to mvel after that change. > > Is there a way that we can make the same permgen fix to the 5.4.0.Final codebase?. we don?t do maintenance releases in community, i.e. no 5.4.1. > Or > Is this possible to get the concurrency fix these newer versions?. The fix will be in the next product patch release, check with the customer portal for details. Mark > > > Thanks and regards, > > Adarsh CHAINI > SENIOR LEAD DEVELOPMENT SPECIALIST | HSBC Bank Plc > 8 Canada Square, London E14 5HQ, UK > _______________________________________________ > > Phone Int: (0)79914720 Ext: +44 (0)20 79914720 > Mobile +44(0)7595530105 > Email adarsh.chaini at hsbcib.com > > > _______________________________________________ > Protect our environment - please only print this if you have to! > > > > > From: Mark Proctor > To: Rules Users List > Date: 15/01/2014 21:05 > Subject: Re: [rules-users] permgen leak > Sent by: rules-users-bounces at lists.jboss.org > > > > > why not just update to 5.6, it?s fixed there. > http://downloads.jboss.org/drools/release/5.6.0.Final/ > > You can specify dialect at the top of the drl file, to be applied to all rules in that file. But that?s about it. > > Mark > On 15 Jan 2014, at 20:51, adarsh.chaini at hsbcib.com wrote: > > Is this possible to set everything to MVEL Dialect as we are using JavaDialect in all our rules. > We had this few times before and we managed to avoid it with usage of CMSClassUnlaoadingEnabled . > But this has again comeback recently because the rate at which the classes are produced with load,CMS is unable to collect the permgen space at same rate so it trips > > Thanks and regards, > > Adarsh CHAINI > SENIOR LEAD DEVELOPMENT SPECIALIST | HSBC Bank Plc > 8 Canada Square, London E14 5HQ, UK > _______________________________________________ > > Phone Int: (0)79914720 Ext: +44 (0)20 79914720 > Mobile +44(0)7595530105 > Email adarsh.chaini at hsbcib.com > > > > _______________________________________________ > Protect our environment - please only print this if you have to! > > > > > From: Mark Proctor > To: Rules Users List > Date: 15/01/2014 18:27 > Subject: Re: [rules-users] permgen leak > Sent by: rules-users-bounces at lists.jboss.org > > > > > > You can try setting everything to the MVEL dialect, and also forcing MVEL to reflection via the system property (turning off jit) > http://mvel.codehaus.org/Disabling+the+JIT+Compiler > > Mark > On 15 Jan 2014, at 18:23, adarsh.chaini at hsbcib.com wrote: > > Hi Mark/Davide > > Is there a work around to this problem in 5.4?. > > > Thanks and regards, > > Adarsh CHAINI > SENIOR LEAD DEVELOPMENT SPECIALIST | HSBC Bank Plc > 8 Canada Square, London E14 5HQ, UK > _______________________________________________ > > Phone Int: (0)79914720 Ext: +44 (0)20 79914720 > Mobile +44(0)7595530105 > Email adarsh.chaini at hsbcib.com > > > > > _______________________________________________ > Protect our environment - please only print this if you have to! > > > > > From: Mark Proctor > To: Rules Users List > Date: 08/01/2014 04:46 > Subject: Re: [rules-users] permgen leak > Sent by: rules-users-bounces at lists.jboss.org > > > > > > > For anyone interested. The commit involves addressing two needs. > 1) Enforcing MVEL reflection mode throughout - MVEL ASM optimiser can NEVER be used for anything (it doesn?t add much value anyway). > 2) Avoiding giving the template system the root class loader(which we use for dynamic stuff), as those templates are statically cached. > https://github.com/sotty/drools/commit/1b75d4785861e72338cc5ea1280610a7937be017 > > Mark > On 8 Jan 2014, at 00:53, Mark Proctor wrote: > > > The root of the perm gen leak has now be solved, thanks to some heroic work by community developer Davide Sottara. > > > > This is just in time for the 5.6 release going out this week. You will not need to use the kbase.dispose() work around. > > > > Mark > > On 6 Jan 2014, at 20:50, Mark Proctor wrote: > > > >> The 5.6 approach should be considered a work around, not a fix. Somewhere a ref is being held, that shouldn?t be - we just haven?t found it yet. > >> > >> Mark > >> > >> On 6 Jan 2014, at 19:17, Davide Sottara wrote: > >> > >>> I have run pmander's tests, and reported in a previous email. > >>> The leak in 5.x is due to the nature of the composite classloader, and > >>> dispose() > >>> forces the memory to be released. I don't remember if that fix was in > >>> 5.6.CR1 > >>> (probably not), so you may have to try 5.6.0-SNAPSHOT or wait for the > >>> end of the week. > >>> 6.x does not suffer from the same problem, but has a different issue - > >>> no way > >>> to unload kie modules once they are cached - which Mario has been > >>> working on. > >>> In either case, pmander's test works fine in both 5.6.x and 6.x after > >>> these fixes > >>> Davide > >>> > >>> On 01/06/2014 07:56 PM, Mark Proctor wrote: > >>>> I?ve been told 5.6 will be released this week. This is because the JCR2GIT migration tool, in 5.6 is needed for our 6.0 product. > >>>> > >>>> Davide's current kbase.dispose() method, on the concrete class, should just be considered a work around for the problem. Unless this is fixed by someone in the community, I don?t think any core developers will have time to address this. At least not for 5.x; we?ll continue to look into it for 6.x. > >>>> > >>>> Mark > >>>> > >>>> > >>>> On 6 Jan 2014, at 16:14, brachi wrote: > >>>> > >>>>> see previous messages, pmander attached a unit test > >>>>> > >>>>> > >>>>> > >>>>> -- > >>>>> View this message in context: http://drools.46999.n3.nabble.com/permgen-leak-tp4027038p4027539.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 > >> > > > > > _______________________________________________ > rules-users mailing list > rules-users at lists.jboss.org > https://lists.jboss.org/mailman/listinfo/rules-users > > > > > ************************************************************ > HSBC Bank plc may be solicited in the course of its placement efforts for a new issue, by investment clients of the firm for whom the Bank as a firm already provides other services. It may equally decide to allocate to its own proprietary book or with an associate of HSBC Group. This represents a potential conflict of interest. HSBC Bank plc has internal arrangements designed to ensure that the firm would give unbiased and full advice to the corporate finance client about the valuation and pricing of the offering as well as internal systems, controls and procedures to identify and manage conflicts of interest. > > HSBC Bank plc > Registered Office: 8 Canada Square, London E14 5HQ, United Kingdom > Registered in England - Number 14259 > Authorised by the Prudential Regulation Authority and regulated by the Financial Conduct Authority and the Prudential Regulation Authority > ************************************************************ > > > ************************************************************ > HSBC Bank plc may be solicited in the course of its placement efforts for a new issue, by investment clients of the firm for whom the Bank as a firm already provides other services. It may equally decide to allocate to its own proprietary book or with an associate of HSBC Group. This represents a potential conflict of interest. HSBC Bank plc has internal arrangements designed to ensure that the firm would give unbiased and full advice to the corporate finance client about the valuation and pricing of the offering as well as internal systems, controls and procedures to identify and manage conflicts of interest. > > HSBC Bank plc > Registered Office: 8 Canada Square, London E14 5HQ, United Kingdom > Registered in England - Number 14259 > Authorised by the Prudential Regulation Authority and regulated by the Financial Conduct Authority and the Prudential Regulation Authority > ************************************************************ > ----------------------------------------- SAVE PAPER - THINK BEFORE YOU PRINT! This transmission has been issued by a member of the HSBC Group "HSBC" for the information of the addressee only and should not be reproduced and/or distributed to any other person. Each page attached hereto must be read in conjunction with any disclaimer which forms part of it. Unless otherwise stated, this transmission is neither an offer nor the solicitation of an offer to sell or purchase any investment. Its contents are based on information obtained from sources believed to be reliable but HSBC makes no representation and accepts no responsibility or liability as to its completeness or accuracy._______________________________________________ > 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 > > > > ************************************************************ > HSBC Bank plc may be solicited in the course of its placement efforts for a new issue, by investment clients of the firm for whom the Bank as a firm already provides other services. It may equally decide to allocate to its own proprietary book or with an associate of HSBC Group. This represents a potential conflict of interest. HSBC Bank plc has internal arrangements designed to ensure that the firm would give unbiased and full advice to the corporate finance client about the valuation and pricing of the offering as well as internal systems, controls and procedures to identify and manage conflicts of interest. > > HSBC Bank plc > Registered Office: 8 Canada Square, London E14 5HQ, United Kingdom > Registered in England - Number 14259 > Authorised by the Prudential Regulation Authority and regulated by the Financial Conduct Authority and the Prudential Regulation Authority > ************************************************************ > ----------------------------------------- SAVE PAPER - THINK BEFORE YOU PRINT! This transmission has been issued by a member of the HSBC Group "HSBC" for the information of the addressee only and should not be reproduced and/or distributed to any other person. Each page attached hereto must be read in conjunction with any disclaimer which forms part of it. Unless otherwise stated, this transmission is neither an offer nor the solicitation of an offer to sell or purchase any investment. Its contents are based on information obtained from sources believed to be reliable but HSBC makes no representation and accepts no responsibility or liability as to its completeness or accuracy._______________________________________________ > 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 > > > > ************************************************************ > HSBC Bank plc may be solicited in the course of its placement efforts for a new issue, by investment clients of the firm for whom the Bank as a firm already provides other services. It may equally decide to allocate to its own proprietary book or with an associate of HSBC Group. This represents a potential conflict of interest. HSBC Bank plc has internal arrangements designed to ensure that the firm would give unbiased and full advice to the corporate finance client about the valuation and pricing of the offering as well as internal systems, controls and procedures to identify and manage conflicts of interest. > > HSBC Bank plc > Registered Office: 8 Canada Square, London E14 5HQ, United Kingdom > Registered in England - Number 14259 > Authorised by the Prudential Regulation Authority and regulated by the Financial Conduct Authority and the Prudential Regulation Authority > ************************************************************ > ----------------------------------------- SAVE PAPER - THINK BEFORE YOU PRINT! This transmission has been issued by a member of the HSBC Group "HSBC" for the information of the addressee only and should not be reproduced and/or distributed to any other person. Each page attached hereto must be read in conjunction with any disclaimer which forms part of it. Unless otherwise stated, this transmission is neither an offer nor the solicitation of an offer to sell or purchase any investment. Its contents are based on information obtained from sources believed to be reliable but HSBC makes no representation and accepts no responsibility or liability as to its completeness or accuracy._______________________________________________ > 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/20140116/1f9f4b4d/attachment-0001.html From mproctor at codehaus.org Thu Jan 16 10:15:02 2014 From: mproctor at codehaus.org (Mark Proctor) Date: Thu, 16 Jan 2014 15:15:02 +0000 Subject: [rules-users] KieBuilder.buildAll() causing exception In-Reply-To: <1389883326051-4027720.post@n3.nabble.com> References: <1389883326051-4027720.post@n3.nabble.com> Message-ID: <3F29E716-9F63-42D8-BB6C-059F0060BA9F@codehaus.org> Doing a quick google. The problem seems to be the jacob instrumentation, it cannot instrument very large classes, as it makes the LOC too large. Jacob isn?t needed anyway, and can be disabled: http://stackoverflow.com/questions/14559117/how-do-i-disable-jacoco-agent-after-jacocoreport Mark (Professional Google Search Monkey) On 16 Jan 2014, at 14:42, waynemetcalfe wrote: > Hi Guys, > I'm a pretty recent Drools user. > > I'm trying to update a project to stop using the deprecated KnowledgeBase. > I've followed examples on > http://blog.athico.com/2013/10/configuration-and-convention-based.html > , > but an exception is being thrown when trying to build the KieBases. > > Drools version:6.0.0.Final > Java version: 1.7.0_45 > > Code snippet: > ... > final KieServices ks = KieServices.Factory.get(); > final KieRepository kr = ks.getRepository(); > final KieFileSystem kfs = ks.newKieFileSystem(); > //ruleScript is simply a string containing the rules > kfs.write("src/main/resources/com/company/test/rules/rules.drl", > ruleScript); > KieBuilder kb = ks.newKieBuilder(kfs); > kb.buildAll(); > > if (kb.getResults().hasMessages(Level.ERROR)){ > configuration.getLog().error("\nSomething wrong here!\n\n"); > } > > final KieContainer kContainer = > ks.newKieContainer(kr.getDefaultReleaseId()); > session = kContainer.newKieSession(); > ... > > The following exception is thrown: > > java.lang.instrument.IllegalClassFormatException: Error while instrumenting > class org/drools/compiler/lang/DRL6Lexer. > at > org.jacoco.agent.rt.internal_9dd1198.CoverageTransformer.transform(CoverageTransformer.java:89) > at > sun.instrument.TransformerManager.transform(TransformerManager.java:188) > at > sun.instrument.InstrumentationImpl.transform(InstrumentationImpl.java:424) > at java.lang.ClassLoader.defineClass1(Native Method) > at java.lang.ClassLoader.defineClass(ClassLoader.java:800) > at > java.security.SecureClassLoader.defineClass(SecureClassLoader.java:142) > at java.net.URLClassLoader.defineClass(URLClassLoader.java:449) > at java.net.URLClassLoader.access$100(URLClassLoader.java:71) > at java.net.URLClassLoader$1.run(URLClassLoader.java:361) > at java.net.URLClassLoader$1.run(URLClassLoader.java:355) > at java.security.AccessController.doPrivileged(Native Method) > at java.net.URLClassLoader.findClass(URLClassLoader.java:354) > at java.lang.ClassLoader.loadClass(ClassLoader.java:425) > at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:308) > at java.lang.ClassLoader.loadClass(ClassLoader.java:358) > at > org.drools.compiler.compiler.DRLFactory.getDRLLexer(DRLFactory.java:93) > at > org.drools.compiler.compiler.DRLFactory.buildLexer(DRLFactory.java:43) > at org.drools.compiler.compiler.DrlParser.parse(DrlParser.java:164) > at org.drools.compiler.compiler.DrlParser.parse(DrlParser.java:146) > at > org.drools.compiler.compiler.PackageBuilder.drlToPackageDescr(PackageBuilder.java:518) > at > org.drools.compiler.compiler.CompositeKnowledgeBuilderImpl$1.map(CompositeKnowledgeBuilderImpl.java:404) > at > org.drools.compiler.compiler.CompositeKnowledgeBuilderImpl.buildResource(CompositeKnowledgeBuilderImpl.java:329) > at > org.drools.compiler.compiler.CompositeKnowledgeBuilderImpl.buildPackageDescr(CompositeKnowledgeBuilderImpl.java:312) > at > org.drools.compiler.compiler.CompositeKnowledgeBuilderImpl.buildPackages(CompositeKnowledgeBuilderImpl.java:96) > at > org.drools.compiler.compiler.CompositeKnowledgeBuilderImpl.build(CompositeKnowledgeBuilderImpl.java:87) > at > org.drools.compiler.kie.builder.impl.AbstractKieModule.buildKnowledgePackages(AbstractKieModule.java:204) > at > org.drools.compiler.kie.builder.impl.AbstractKieProject.verify(AbstractKieProject.java:39) > at > org.drools.compiler.kie.builder.impl.KieBuilderImpl.buildKieProject(KieBuilderImpl.java:309) > at > org.drools.compiler.kie.builder.impl.KieBuilderImpl.buildAll(KieBuilderImpl.java:187) > at > com.company.test.rules.BasicRuleEngine.start(BasicRuleEngine.java:66) > at > com.company.test.rules.TestBasicRuleEngine.listenersShouldBeNotifiedOfStartAndStop(TestBasicRuleEngine.java:88) > 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.junit.internal.runners.statements.RunBefores.evaluate(RunBefores.java:26) > at org.junit.runners.ParentRunner.runLeaf(ParentRunner.java:271) > at > org.junit.runners.BlockJUnit4ClassRunner.runChild(BlockJUnit4ClassRunner.java:70) > at > org.junit.runners.BlockJUnit4ClassRunner.runChild(BlockJUnit4ClassRunner.java:50) > 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.junit.runners.ParentRunner.run(ParentRunner.java:309) > at > org.apache.maven.surefire.junit4.JUnit4Provider.execute(JUnit4Provider.java:254) > at > org.apache.maven.surefire.junit4.JUnit4Provider.executeTestSet(JUnit4Provider.java:149) > at > org.apache.maven.surefire.junit4.JUnit4Provider.invoke(JUnit4Provider.java:124) > 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.apache.maven.surefire.util.ReflectionUtils.invokeMethodWithArray2(ReflectionUtils.java:208) > at > org.apache.maven.surefire.booter.ProviderFactory$ProviderProxy.invoke(ProviderFactory.java:159) > at > org.apache.maven.surefire.booter.ProviderFactory.invokeProvider(ProviderFactory.java:87) > at > org.apache.maven.surefire.booter.ForkedBooter.runSuitesInProcess(ForkedBooter.java:153) > at > org.apache.maven.surefire.booter.ForkedBooter.main(ForkedBooter.java:95) > Caused by: java.io.IOException: Error while instrumenting class > org/drools/compiler/lang/DRL6Lexer. > at > org.jacoco.agent.rt.internal_9dd1198.core.instr.Instrumenter.instrumentError(Instrumenter.java:147) > at > org.jacoco.agent.rt.internal_9dd1198.core.instr.Instrumenter.instrument(Instrumenter.java:98) > at > org.jacoco.agent.rt.internal_9dd1198.CoverageTransformer.transform(CoverageTransformer.java:87) > ... 60 more > Caused by: java.lang.RuntimeException: Method code too large! > at > org.jacoco.agent.rt.internal_9dd1198.asm.MethodWriter.a(Unknown Source) > at > org.jacoco.agent.rt.internal_9dd1198.asm.ClassWriter.toByteArray(Unknown > Source) > at > org.jacoco.agent.rt.internal_9dd1198.core.instr.Instrumenter.instrument(Instrumenter.java:79) > at > org.jacoco.agent.rt.internal_9dd1198.core.instr.Instrumenter.instrument(Instrumenter.java:96) > ... 61 more > > > Any help or info would be greatly appreciated! > > > > > -- > View this message in context: http://drools.46999.n3.nabble.com/KieBuilder-buildAll-causing-exception-tp4027720.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 Thu Jan 16 10:16:33 2014 From: mproctor at codehaus.org (Mark Proctor) Date: Thu, 16 Jan 2014 15:16:33 +0000 Subject: [rules-users] KieBuilder.buildAll() causing exception In-Reply-To: <3F29E716-9F63-42D8-BB6C-059F0060BA9F@codehaus.org> References: <1389883326051-4027720.post@n3.nabble.com> <3F29E716-9F63-42D8-BB6C-059F0060BA9F@codehaus.org> Message-ID: <5BC99999-DA6C-468C-9C46-82F6C01D0252@codehaus.org> sorry jacoco not jacob. Mark On 16 Jan 2014, at 15:15, Mark Proctor wrote: > Doing a quick google. The problem seems to be the jacob instrumentation, it cannot instrument very large classes, as it makes the LOC too large. Jacob isn?t needed anyway, and can be disabled: > http://stackoverflow.com/questions/14559117/how-do-i-disable-jacoco-agent-after-jacocoreport > > Mark (Professional Google Search Monkey) > On 16 Jan 2014, at 14:42, waynemetcalfe wrote: > >> Hi Guys, >> I'm a pretty recent Drools user. >> >> I'm trying to update a project to stop using the deprecated KnowledgeBase. >> I've followed examples on >> http://blog.athico.com/2013/10/configuration-and-convention-based.html >> , >> but an exception is being thrown when trying to build the KieBases. >> >> Drools version:6.0.0.Final >> Java version: 1.7.0_45 >> >> Code snippet: >> ... >> final KieServices ks = KieServices.Factory.get(); >> final KieRepository kr = ks.getRepository(); >> final KieFileSystem kfs = ks.newKieFileSystem(); >> //ruleScript is simply a string containing the rules >> kfs.write("src/main/resources/com/company/test/rules/rules.drl", >> ruleScript); >> KieBuilder kb = ks.newKieBuilder(kfs); >> kb.buildAll(); >> >> if (kb.getResults().hasMessages(Level.ERROR)){ >> configuration.getLog().error("\nSomething wrong here!\n\n"); >> } >> >> final KieContainer kContainer = >> ks.newKieContainer(kr.getDefaultReleaseId()); >> session = kContainer.newKieSession(); >> ... >> >> The following exception is thrown: >> >> java.lang.instrument.IllegalClassFormatException: Error while instrumenting >> class org/drools/compiler/lang/DRL6Lexer. >> at >> org.jacoco.agent.rt.internal_9dd1198.CoverageTransformer.transform(CoverageTransformer.java:89) >> at >> sun.instrument.TransformerManager.transform(TransformerManager.java:188) >> at >> sun.instrument.InstrumentationImpl.transform(InstrumentationImpl.java:424) >> at java.lang.ClassLoader.defineClass1(Native Method) >> at java.lang.ClassLoader.defineClass(ClassLoader.java:800) >> at >> java.security.SecureClassLoader.defineClass(SecureClassLoader.java:142) >> at java.net.URLClassLoader.defineClass(URLClassLoader.java:449) >> at java.net.URLClassLoader.access$100(URLClassLoader.java:71) >> at java.net.URLClassLoader$1.run(URLClassLoader.java:361) >> at java.net.URLClassLoader$1.run(URLClassLoader.java:355) >> at java.security.AccessController.doPrivileged(Native Method) >> at java.net.URLClassLoader.findClass(URLClassLoader.java:354) >> at java.lang.ClassLoader.loadClass(ClassLoader.java:425) >> at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:308) >> at java.lang.ClassLoader.loadClass(ClassLoader.java:358) >> at >> org.drools.compiler.compiler.DRLFactory.getDRLLexer(DRLFactory.java:93) >> at >> org.drools.compiler.compiler.DRLFactory.buildLexer(DRLFactory.java:43) >> at org.drools.compiler.compiler.DrlParser.parse(DrlParser.java:164) >> at org.drools.compiler.compiler.DrlParser.parse(DrlParser.java:146) >> at >> org.drools.compiler.compiler.PackageBuilder.drlToPackageDescr(PackageBuilder.java:518) >> at >> org.drools.compiler.compiler.CompositeKnowledgeBuilderImpl$1.map(CompositeKnowledgeBuilderImpl.java:404) >> at >> org.drools.compiler.compiler.CompositeKnowledgeBuilderImpl.buildResource(CompositeKnowledgeBuilderImpl.java:329) >> at >> org.drools.compiler.compiler.CompositeKnowledgeBuilderImpl.buildPackageDescr(CompositeKnowledgeBuilderImpl.java:312) >> at >> org.drools.compiler.compiler.CompositeKnowledgeBuilderImpl.buildPackages(CompositeKnowledgeBuilderImpl.java:96) >> at >> org.drools.compiler.compiler.CompositeKnowledgeBuilderImpl.build(CompositeKnowledgeBuilderImpl.java:87) >> at >> org.drools.compiler.kie.builder.impl.AbstractKieModule.buildKnowledgePackages(AbstractKieModule.java:204) >> at >> org.drools.compiler.kie.builder.impl.AbstractKieProject.verify(AbstractKieProject.java:39) >> at >> org.drools.compiler.kie.builder.impl.KieBuilderImpl.buildKieProject(KieBuilderImpl.java:309) >> at >> org.drools.compiler.kie.builder.impl.KieBuilderImpl.buildAll(KieBuilderImpl.java:187) >> at >> com.company.test.rules.BasicRuleEngine.start(BasicRuleEngine.java:66) >> at >> com.company.test.rules.TestBasicRuleEngine.listenersShouldBeNotifiedOfStartAndStop(TestBasicRuleEngine.java:88) >> 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.junit.internal.runners.statements.RunBefores.evaluate(RunBefores.java:26) >> at org.junit.runners.ParentRunner.runLeaf(ParentRunner.java:271) >> at >> org.junit.runners.BlockJUnit4ClassRunner.runChild(BlockJUnit4ClassRunner.java:70) >> at >> org.junit.runners.BlockJUnit4ClassRunner.runChild(BlockJUnit4ClassRunner.java:50) >> 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.junit.runners.ParentRunner.run(ParentRunner.java:309) >> at >> org.apache.maven.surefire.junit4.JUnit4Provider.execute(JUnit4Provider.java:254) >> at >> org.apache.maven.surefire.junit4.JUnit4Provider.executeTestSet(JUnit4Provider.java:149) >> at >> org.apache.maven.surefire.junit4.JUnit4Provider.invoke(JUnit4Provider.java:124) >> 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.apache.maven.surefire.util.ReflectionUtils.invokeMethodWithArray2(ReflectionUtils.java:208) >> at >> org.apache.maven.surefire.booter.ProviderFactory$ProviderProxy.invoke(ProviderFactory.java:159) >> at >> org.apache.maven.surefire.booter.ProviderFactory.invokeProvider(ProviderFactory.java:87) >> at >> org.apache.maven.surefire.booter.ForkedBooter.runSuitesInProcess(ForkedBooter.java:153) >> at >> org.apache.maven.surefire.booter.ForkedBooter.main(ForkedBooter.java:95) >> Caused by: java.io.IOException: Error while instrumenting class >> org/drools/compiler/lang/DRL6Lexer. >> at >> org.jacoco.agent.rt.internal_9dd1198.core.instr.Instrumenter.instrumentError(Instrumenter.java:147) >> at >> org.jacoco.agent.rt.internal_9dd1198.core.instr.Instrumenter.instrument(Instrumenter.java:98) >> at >> org.jacoco.agent.rt.internal_9dd1198.CoverageTransformer.transform(CoverageTransformer.java:87) >> ... 60 more >> Caused by: java.lang.RuntimeException: Method code too large! >> at >> org.jacoco.agent.rt.internal_9dd1198.asm.MethodWriter.a(Unknown Source) >> at >> org.jacoco.agent.rt.internal_9dd1198.asm.ClassWriter.toByteArray(Unknown >> Source) >> at >> org.jacoco.agent.rt.internal_9dd1198.core.instr.Instrumenter.instrument(Instrumenter.java:79) >> at >> org.jacoco.agent.rt.internal_9dd1198.core.instr.Instrumenter.instrument(Instrumenter.java:96) >> ... 61 more >> >> >> Any help or info would be greatly appreciated! >> >> >> >> >> -- >> View this message in context: http://drools.46999.n3.nabble.com/KieBuilder-buildAll-causing-exception-tp4027720.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/20140116/9c40d773/attachment-0001.html From Pamela.Bowman at jenzabar.com Thu Jan 16 10:17:51 2014 From: Pamela.Bowman at jenzabar.com (Bowman, Pamela) Date: Thu, 16 Jan 2014 15:17:51 +0000 Subject: [rules-users] standalone guvnor Message-ID: <8D8357425330E248A1F2BFF138A44E3822F136DA@CIN-EXCH02.jenzabar.net> My application already uses the Drools rules engine successfully. For our new release, we were planned to integrate the Guvnor (standalone) into that application with an iframe. This worked in our prototyping efforts using Guvnor 5.5 (I believe). We'd like to upgrade to the new 6.0 to have greater flexibility copying rules. But, we can't find any similar feature in the new workbench. Is there a standalone view - that only shows the rules - available in 6.0.X? Thanks! Pamela Pamela Bowman Senior Software Engineer Jenzabar, Inc. 424 Wards Corner Road, 2nd Fl | Loveland, OH 45140 tel: 513.563.4542 fax: 513.733.8990 pamela.bowman at jenzabar.com www.jenzabar.com [Description: JAM 2014] Follow us! [Description: http://www.jenzabar.com/images/JenzabarFacebook_icon.png] [Description: http://www.jenzabar.com/images/JenzabarTwitter_icon.png] [Description: http://www.jenzabar.com/newgraphics/Jenzabar_Linked_In.gif] [Description: http://www.jenzabar.com/newgraphics/Jenzabar_google+.gif] -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.jboss.org/pipermail/rules-users/attachments/20140116/c9c9cb3f/attachment.html -------------- next part -------------- A non-text attachment was scrubbed... Name: image001.gif Type: image/gif Size: 9900 bytes Desc: image001.gif Url : http://lists.jboss.org/pipermail/rules-users/attachments/20140116/c9c9cb3f/attachment.gif -------------- next part -------------- A non-text attachment was scrubbed... Name: image002.gif Type: image/gif Size: 1113 bytes Desc: image002.gif Url : http://lists.jboss.org/pipermail/rules-users/attachments/20140116/c9c9cb3f/attachment-0001.gif -------------- next part -------------- A non-text attachment was scrubbed... Name: image003.gif Type: image/gif Size: 1119 bytes Desc: image003.gif Url : http://lists.jboss.org/pipermail/rules-users/attachments/20140116/c9c9cb3f/attachment-0002.gif -------------- next part -------------- A non-text attachment was scrubbed... Name: image004.gif Type: image/gif Size: 640 bytes Desc: image004.gif Url : http://lists.jboss.org/pipermail/rules-users/attachments/20140116/c9c9cb3f/attachment-0003.gif -------------- next part -------------- A non-text attachment was scrubbed... Name: image005.gif Type: image/gif Size: 668 bytes Desc: image005.gif Url : http://lists.jboss.org/pipermail/rules-users/attachments/20140116/c9c9cb3f/attachment-0004.gif From adarsh.chaini at hsbcib.com Thu Jan 16 11:16:04 2014 From: adarsh.chaini at hsbcib.com (adarsh.chaini at hsbcib.com) Date: Thu, 16 Jan 2014 16:16:04 +0000 Subject: [rules-users] How do I access the 4.5.0.Final source code repository In-Reply-To: <82CAE82B-C6B3-4E69-A03D-A2B03E031C21@codehaus.org> References: <1386258456435-4027111.post@n3.nabble.com> <1389015365148-4027530.post@n3.nabble.com> <1389018700389-4027534.post@n3.nabble.com> <23E0006C-4B62-4000-BA2B-05E6314F9026@codehaus.org> <1389024856614-4027539.post@n3.nabble.com> <7E35D477-589F-49E3-B00A-E2D41D070200@codehaus.org> <52CB0140.4090502@gmail.com> <63508E3F-3F1A-42E8-A893-6F2996A275BC@codehaus.org> <2F11EE38-0C02-4C8A-8E12-98CA54AC3C31@codehaus.org> Message-ID: Hi Mark, Started a new topi though it was related to permgen leak Can you please point me to the 5.4.0.Final source code repository that can be pulled for local development ?. Is there any maven based repository for these projects ?. Adarsh ************************************************************ HSBC Bank plc may be solicited in the course of its placement efforts for a new issue, by investment clients of the firm for whom the Bank as a firm already provides other services. It may equally decide to allocate to its own proprietary book or with an associate of HSBC Group. This represents a potential conflict of interest. HSBC Bank plc has internal arrangements designed to ensure that the firm would give unbiased and full advice to the corporate finance client about the valuation and pricing of the offering as well as internal systems, controls and procedures to identify and manage conflicts of interest. HSBC Bank plc Registered Office: 8 Canada Square, London E14 5HQ, United Kingdom Registered in England - Number 14259 Authorised by the Prudential Regulation Authority and regulated by the Financial Conduct Authority and the Prudential Regulation Authority ************************************************************ ************************************************************ HSBC Bank plc may be solicited in the course of its placement efforts for a new issue, by investment clients of the firm for whom the Bank as a firm already provides other services. It may equally decide to allocate to its own proprietary book or with an associate of HSBC Group. This represents a potential conflict of interest. HSBC Bank plc has internal arrangements designed to ensure that the firm would give unbiased and full advice to the corporate finance client about the valuation and pricing of the offering as well as internal systems, controls and procedures to identify and manage conflicts of interest. HSBC Bank plc Registered Office: 8 Canada Square, London E14 5HQ, United Kingdom Registered in England - Number 14259 Authorised by the Prudential Regulation Authority and regulated by the Financial Conduct Authority and the Prudential Regulation Authority ************************************************************ ----------------------------------------- SAVE PAPER - THINK BEFORE YOU PRINT! This transmission has been issued by a member of the HSBC Group "HSBC" for the information of the addressee only and should not be reproduced and/or distributed to any other person. Each page attached hereto must be read in conjunction with any disclaimer which forms part of it. Unless otherwise stated, this transmission is neither an offer nor the solicitation of an offer to sell or purchase any investment. Its contents are based on information obtained from sources believed to be reliable but HSBC makes no representation and accepts no responsibility or liability as to its completeness or accuracy. -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.jboss.org/pipermail/rules-users/attachments/20140116/a44a3193/attachment-0001.html From akjones at email.com Thu Jan 16 11:22:28 2014 From: akjones at email.com (akjones33) Date: Thu, 16 Jan 2014 08:22:28 -0800 (PST) Subject: [rules-users] Drools 6.0.0 Camel-server query results Message-ID: <1389889348858-4027726.post@n3.nabble.com> Hi all - I'm just getting started with Drools and trying to get my first query running through Camel-Server using XML. I had expected that a query would return the objects found, with their attributes as XML elements but I only get an identifier. The query is query "depositAccept" dA: DepositAccept(); end DepositAccept is defined in java as public class DepositAccept { private String message; public String getMessage() { return message; } public void setMessage(String message) { this.message = message; } } In my XML batch execution command I have 1 1001 which gives me the response 1 1001 dA I take that to mean that "dA" exists (i.e. the query returns one object) but I would have expected then to have the "message" attribute shown from the DepoistAccount object that dA refers to. Is that possible ? thanks -- View this message in context: http://drools.46999.n3.nabble.com/Drools-6-0-0-Camel-server-query-results-tp4027726.html Sent from the Drools: User forum mailing list archive at Nabble.com. From waynemetcalfe at outlook.com Thu Jan 16 11:25:51 2014 From: waynemetcalfe at outlook.com (waynemetcalfe) Date: Thu, 16 Jan 2014 08:25:51 -0800 (PST) Subject: [rules-users] KieBuilder.buildAll() causing exception In-Reply-To: <1389883326051-4027720.post@n3.nabble.com> References: <1389883326051-4027720.post@n3.nabble.com> Message-ID: <1389889551859-4027727.post@n3.nabble.com> Thanks Mark! This solved my problem. -- View this message in context: http://drools.46999.n3.nabble.com/KieBuilder-buildAll-causing-exception-tp4027720p4027727.html Sent from the Drools: User forum mailing list archive at Nabble.com. From porcelli at redhat.com Thu Jan 16 11:38:01 2014 From: porcelli at redhat.com (Alexandre Porcelli) Date: Thu, 16 Jan 2014 14:38:01 -0200 Subject: [rules-users] standalone guvnor In-Reply-To: <8D8357425330E248A1F2BFF138A44E3822F136DA@CIN-EXCH02.jenzabar.net> References: <8D8357425330E248A1F2BFF138A44E3822F136DA@CIN-EXCH02.jenzabar.net> Message-ID: Hi Pamela, Yes we have something like that available but unfortunately it's not working correctly by now. I'm already working on a fix for this issue right now that should be released with 6.1 Regards, --- Alexandre Porcelli Principal Software Engineer Red Hat Business Systems and Intelligence Group On Jan 16, 2014, at 1:17 PM, Bowman, Pamela wrote: > My application already uses the Drools rules engine successfully. For our new release, we were planned to integrate the Guvnor (standalone) into that application with an iframe. This worked in our prototyping efforts using Guvnor 5.5 (I believe). > > We?d like to upgrade to the new 6.0 to have greater flexibility copying rules. But, we can?t find any similar feature in the new workbench. > > Is there a standalone view ? that only shows the rules ? available in 6.0.X? > > Thanks! > Pamela > > > Pamela Bowman > Senior Software Engineer > Jenzabar, Inc. > 424 Wards Corner Road, 2nd Fl | Loveland, OH 45140 > tel: 513.563.4542 fax: 513.733.8990 > pamela.bowman at jenzabar.com > www.jenzabar.com > > > Follow us! > > _______________________________________________ > rules-users mailing list > rules-users at lists.jboss.org > https://lists.jboss.org/mailman/listinfo/rules-users From dean at basys.com Thu Jan 16 12:06:54 2014 From: dean at basys.com (Dean Whisnant) Date: Thu, 16 Jan 2014 12:06:54 -0500 Subject: [rules-users] Order of object creation in stateful session Message-ID: <86842F7EF952B940B49255CEDB657F2C03FB03A4CB7D@Exchange07.basysnet.com> Hi, This may be a very basic question, but I'm using drools 5.1.1 and when I invoke a stateful session and that session ends I receive back all of the facts that were created during that session and I translate those into an EDI transaction. As an example I might have a few objects of types "2700*LX,2750* N1,2750* REF, and 2750*DTP". I know my rules fired create objects like: LX*1 N1*75*CMSEC REF*17*A DTP*007*D8*20140114 LX*2 N1*75*STATUS REF*17*AFTNM DTP*007*D8*20140114 Each of these lines is an object of the type I mentioned above. My task is to make sure that the different object types "stick" together when I put them in the .x12 file so that they are formatted above. What I do internally is I keep track that I have two of each of these objects, but I don't know if there is some type of timestamp that is on them that I could keep the first LX, N1, REF, DTP together or not. In one example I have a rule that inserts them in the order you see, yes, it literally inserts 8 objects/facts into memory. And I need to know the order they were inserted so that I can properly form a file out of them on the backend. Here's how I grab the objects and factHandle list. Is there a method that might help me know what object was created by what rule and how I might keep facts created in a rule together? // Get handle to all objects coming from drools Collection handleList = null; try { handleList = ksession.getFactHandles(); } catch (Exception e) { _log.error("kSession get Fact Handles. Error=" + e.getMessage()); } // Build the List with the results from drools - objectOutList Object anObject; TranslatedObjectImpl aTranslatedObject; FactHandle fH; for (Iterator it = handleList.iterator(); it.hasNext();) { fH = (FactHandle) it.next(); anObject = (Object) ksession.getObject(fH); if (anObject instanceof String) { // prt("Ignoring back from drool the String object " + anObject.getClass().getCustomerLogName()); } else if (anObject instanceof TranslatedObjectImpl) { aTranslatedObject = (TranslatedObjectImpl) ksession.getObject(fH); objectOutList.add(aTranslatedObject); if (_log.isTraceEnabled()) _log.trace("Back from drools, translated object " + anObject.getClass().getSimpleName()); } else { objectOutList.add(ksession.getObject(fH)); if (_log.isTraceEnabled()) _log.trace("Back from drools, found object " + anObject.getClass().getSimpleName()); } } if (_log.isDebugEnabled()) _log.debug("Done with Transformer. Total number of Drools object = " + objectOutList.size()); ksession.dispose(); Any thoughts? Thanks, Dean -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.jboss.org/pipermail/rules-users/attachments/20140116/527a803d/attachment-0001.html From mproctor at codehaus.org Thu Jan 16 12:33:40 2014 From: mproctor at codehaus.org (Mark Proctor) Date: Thu, 16 Jan 2014 17:33:40 +0000 Subject: [rules-users] How do I access the 4.5.0.Final source code repository In-Reply-To: References: <1386258456435-4027111.post@n3.nabble.com> <1389015365148-4027530.post@n3.nabble.com> <1389018700389-4027534.post@n3.nabble.com> <23E0006C-4B62-4000-BA2B-05E6314F9026@codehaus.org> <1389024856614-4027539.post@n3.nabble.com> <7E35D477-589F-49E3-B00A-E2D41D070200@codehaus.org> <52CB0140.4090502@gmail.com> <63508E3F-3F1A-42E8-A893-6F2996A275BC@codehaus.org> <2F11EE38-0C02-4C8A-8E12-98CA54AC3C31@codehaus.org> Message-ID: Adarsh, We are in the middle of a product release right now, so my team and I are unable to spare any more community time. Please ask this Q through the customer support portal, where there is a dedicated team there that can help you, all tracked through an SLA. Mark On 16 Jan 2014, at 16:16, adarsh.chaini at hsbcib.com wrote: > Hi Mark, > > Started a new topi though it was related to permgen leak > > Can you please point me to the 5.4.0.Final source code repository that can be pulled for local development ?. > Is there any maven based repository for these projects ?. > > Adarsh > > > > ************************************************************ > HSBC Bank plc may be solicited in the course of its placement efforts for a new issue, by investment clients of the firm for whom the Bank as a firm already provides other services. It may equally decide to allocate to its own proprietary book or with an associate of HSBC Group. This represents a potential conflict of interest. HSBC Bank plc has internal arrangements designed to ensure that the firm would give unbiased and full advice to the corporate finance client about the valuation and pricing of the offering as well as internal systems, controls and procedures to identify and manage conflicts of interest. > > HSBC Bank plc > Registered Office: 8 Canada Square, London E14 5HQ, United Kingdom > Registered in England - Number 14259 > Authorised by the Prudential Regulation Authority and regulated by the Financial Conduct Authority and the Prudential Regulation Authority > ************************************************************ > > > ************************************************************ > HSBC Bank plc may be solicited in the course of its placement efforts for a new issue, by investment clients of the firm for whom the Bank as a firm already provides other services. It may equally decide to allocate to its own proprietary book or with an associate of HSBC Group. This represents a potential conflict of interest. HSBC Bank plc has internal arrangements designed to ensure that the firm would give unbiased and full advice to the corporate finance client about the valuation and pricing of the offering as well as internal systems, controls and procedures to identify and manage conflicts of interest. > > HSBC Bank plc > Registered Office: 8 Canada Square, London E14 5HQ, United Kingdom > Registered in England - Number 14259 > Authorised by the Prudential Regulation Authority and regulated by the Financial Conduct Authority and the Prudential Regulation Authority > ************************************************************ > ----------------------------------------- SAVE PAPER - THINK BEFORE YOU PRINT! This transmission has been issued by a member of the HSBC Group "HSBC" for the information of the addressee only and should not be reproduced and/or distributed to any other person. Each page attached hereto must be read in conjunction with any disclaimer which forms part of it. Unless otherwise stated, this transmission is neither an offer nor the solicitation of an offer to sell or purchase any investment. Its contents are based on information obtained from sources believed to be reliable but HSBC makes no representation and accepts no responsibility or liability as to its completeness or accuracy._______________________________________________ > 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/20140116/f869cd5e/attachment.html From wolfgang.laun at gmail.com Thu Jan 16 13:18:39 2014 From: wolfgang.laun at gmail.com (Wolfgang Laun) Date: Thu, 16 Jan 2014 19:18:39 +0100 Subject: [rules-users] Drools 6.0.0 Camel-server query results In-Reply-To: <1389889348858-4027726.post@n3.nabble.com> References: <1389889348858-4027726.post@n3.nabble.com> Message-ID: Did you insert a DepositAccept fact? The XML you've posted doesn't contain one. If there's no matching fact the query won't return anything. -W On 16/01/2014, akjones33 wrote: > Hi all - I'm just getting started with Drools and trying to get my first > query running through Camel-Server using XML. I had expected that a query > would return the objects found, with their attributes as XML elements but I > only get an identifier. > > The query is > > query "depositAccept" > dA: DepositAccept(); > end > > DepositAccept is defined in java as > > public class DepositAccept { > > private String message; > > public String getMessage() { > return message; > } > > public void setMessage(String message) { > this.message = message; > } > } > > In my XML batch execution command I have > > > > > 1 > 1001 > > > > > > > which gives me the response > > > > > 1 > 1001 > > > > > > dA > > > > external-form="0:1:1485038299:1485038299:1:DEFAULT:NON_TRAIT"/> > > > I take that to mean that "dA" exists (i.e. the query returns one object) > but > I would have expected then to have the "message" attribute shown from the > DepoistAccount object that dA refers to. Is that possible ? > > thanks > > > > -- > View this message in context: > http://drools.46999.n3.nabble.com/Drools-6-0-0-Camel-server-query-results-tp4027726.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 Jan 16 13:27:25 2014 From: wolfgang.laun at gmail.com (Wolfgang Laun) Date: Thu, 16 Jan 2014 19:27:25 +0100 Subject: [rules-users] Order of object creation in stateful session In-Reply-To: <86842F7EF952B940B49255CEDB657F2C03FB03A4CB7D@Exchange07.basysnet.com> References: <86842F7EF952B940B49255CEDB657F2C03FB03A4CB7D@Exchange07.basysnet.com> Message-ID: Look into the WorkingMemoryEvent and ~Listener classes. This will tell you when what is inserted; keeping track of inserts should be simple. To learn which rule is responsible, listen to Before- and AfterMatchFired events: if they straddle inserts, you know which rule. Or run a RuntimeLogger and mine the log data (but I think the listeners provide more flexibility and better access to the data). -W On 16/01/2014, Dean Whisnant wrote: > Hi, > > > > This may be a very basic question, but I'm using drools 5.1.1 and when I > invoke a stateful session and that session ends I receive back all of the > facts that were created during that session and I translate those into an > EDI transaction. As an example I might have a few objects of types > "2700*LX,2750* N1,2750* REF, and 2750*DTP". I know my rules fired create > objects like: > > > > LX*1 > > N1*75*CMSEC > > REF*17*A > > DTP*007*D8*20140114 > > LX*2 > > N1*75*STATUS > > REF*17*AFTNM > > DTP*007*D8*20140114 > > > > Each of these lines is an object of the type I mentioned above. > > > > My task is to make sure that the different object types "stick" together > when I put them in the .x12 file so that they are formatted above. > > > > What I do internally is I keep track that I have two of each of these > objects, but I don't know if there is some type of timestamp that is on them > that I could keep the first LX, N1, REF, DTP together or not. > > > > In one example I have a rule that inserts them in the order you see, yes, it > literally inserts 8 objects/facts into memory. And I need to know the order > they were inserted so that I can properly form a file out of them on the > backend. > > > > Here's how I grab the objects and factHandle list. Is there a method that > might help me know what object was created by what rule and how I might keep > facts created in a rule together? > > > > // Get handle to all objects coming from > drools > > Collection handleList = null; > > try > > { > > handleList = > ksession.getFactHandles(); > > } > > catch (Exception e) > > { > > _log.error("kSession get > Fact Handles. Error=" + e.getMessage()); > > } > > // Build the List with the results from drools - objectOutList > > Object anObject; > > TranslatedObjectImpl aTranslatedObject; > > FactHandle fH; > > > > for (Iterator it = > handleList.iterator(); it.hasNext();) > > { > > fH = (FactHandle) > it.next(); > > anObject = (Object) > ksession.getObject(fH); > > if (anObject instanceof > String) > > { > > // > prt("Ignoring back from drool the String object " + > anObject.getClass().getCustomerLogName()); > > } > > else if (anObject instanceof > TranslatedObjectImpl) > > { > > > aTranslatedObject = (TranslatedObjectImpl) ksession.getObject(fH); > > > objectOutList.add(aTranslatedObject); > > if > (_log.isTraceEnabled()) _log.trace("Back from drools, translated object " + > anObject.getClass().getSimpleName()); > > } > > else > > { > > > objectOutList.add(ksession.getObject(fH)); > > if > (_log.isTraceEnabled()) _log.trace("Back from drools, found object " + > anObject.getClass().getSimpleName()); > > } > > } > > if (_log.isDebugEnabled()) _log.debug("Done > with Transformer. Total number of Drools object = " + > objectOutList.size()); > > ksession.dispose(); > > > > Any thoughts? > > > > Thanks, > > > > Dean > > From akjones at email.com Thu Jan 16 13:58:40 2014 From: akjones at email.com (akjones33) Date: Thu, 16 Jan 2014 10:58:40 -0800 (PST) Subject: [rules-users] Drools 6.0.0 Camel-server query results In-Reply-To: References: <1389889348858-4027726.post@n3.nabble.com> Message-ID: <1389898720318-4027733.post@n3.nabble.com> Yep - checking that. the rules SHOULD be inserting it but I think maybe I'm not understanding exactly WHEN things are happening. The other thing I haven't got straight is stateful sessions. If I execute a command that inserts an object, then make a second REST call that get-objects, I'm getting back an empty list even though the session is declared stateful in knowledge-services.xml Are stateful session supposed to be supported in the 6.0.0 distribution of drools-camel-server ? And if so, next question, how do I dispose of the session at the appropriate time ? -- View this message in context: http://drools.46999.n3.nabble.com/Drools-6-0-0-Camel-server-query-results-tp4027726p4027733.html Sent from the Drools: User forum mailing list archive at Nabble.com. From jonathan.labin at gmail.com Thu Jan 16 14:58:59 2014 From: jonathan.labin at gmail.com (jonathan.labin) Date: Thu, 16 Jan 2014 11:58:59 -0800 (PST) Subject: [rules-users] Planner with a list of planning variables In-Reply-To: References: <1370262087.11213.YahooMailNeo@web162403.mail.bf1.yahoo.com> <51AC94B4.6050305@gmail.com> <1389818205315-4027704.post@n3.nabble.com> Message-ID: <1389902339313-4027734.post@n3.nabble.com> Does having PeriodChangeMove and RoomChangeMove undermine the effect of having the swap filter? Since a swap can be constructed by a sequence of changes does the filter reduce the space or simply remove swapMoves that are silly to enact? -- View this message in context: http://drools.46999.n3.nabble.com/rules-users-Planner-with-a-list-of-planning-variables-tp4024088p4027734.html Sent from the Drools: User forum mailing list archive at Nabble.com. From aseem.belsare at gmail.com Thu Jan 16 17:09:01 2014 From: aseem.belsare at gmail.com (Aseem Belsare) Date: Thu, 16 Jan 2014 16:09:01 -0600 Subject: [rules-users] How do I access the 4.5.0.Final source code repository In-Reply-To: References: <1386258456435-4027111.post@n3.nabble.com> <1389015365148-4027530.post@n3.nabble.com> <1389018700389-4027534.post@n3.nabble.com> <23E0006C-4B62-4000-BA2B-05E6314F9026@codehaus.org> <1389024856614-4027539.post@n3.nabble.com> <7E35D477-589F-49E3-B00A-E2D41D070200@codehaus.org> <52CB0140.4090502@gmail.com> <63508E3F-3F1A-42E8-A893-6F2996A275BC@codehaus.org> <2F11EE38-0C02-4C8A-8E12-98CA54AC3C31@codehaus.org> <82CAE82B-C6B3-4E69-A03D-A2B03E031C21@codehaus.org> Message-ID: Adarsh, Is this what you're looking for? https://github.com/droolsjbpm/drools/tree/5.4.0.Final Aseem On Thu, Jan 16, 2014 at 11:33 AM, Mark Proctor wrote: > Adarsh, > > We are in the middle of a product release right now, so my team and I are > unable to spare any more community time. Please ask this Q through the > customer support portal, where there is a dedicated team there that can > help you, all tracked through an SLA. > > Mark > On 16 Jan 2014, at 16:16, adarsh.chaini at hsbcib.com wrote: > > Hi Mark, > > Started a new topi though it was related to permgen leak > > Can you please point me to the 5.4.0.Final source code repository that > can be pulled for local development ?. > Is there any maven based repository for these projects ?. > > Adarsh > > > > ************************************************************ > HSBC Bank plc may be solicited in the course of its placement efforts for > a new issue, by investment clients of the firm for whom the Bank as a firm > already provides other services. It may equally decide to allocate to its > own proprietary book or with an associate of HSBC Group. This represents a > potential conflict of interest. HSBC Bank plc has internal arrangements > designed to ensure that the firm would give unbiased and full advice to the > corporate finance client about the valuation and pricing of the offering as > well as internal systems, controls and procedures to identify and manage > conflicts of interest. > > HSBC Bank plc > Registered Office: 8 Canada Square, London E14 5HQ, United Kingdom > Registered in England - Number 14259 > Authorised by the Prudential Regulation Authority and regulated by the > Financial Conduct Authority and the Prudential Regulation Authority > ************************************************************ > > > ************************************************************ > HSBC Bank plc may be solicited in the course of its placement efforts for > a new issue, by investment clients of the firm for whom the Bank as a firm > already provides other services. It may equally decide to allocate to its > own proprietary book or with an associate of HSBC Group. This represents a > potential conflict of interest. HSBC Bank plc has internal arrangements > designed to ensure that the firm would give unbiased and full advice to the > corporate finance client about the valuation and pricing of the offering as > well as internal systems, controls and procedures to identify and manage > conflicts of interest. > > HSBC Bank plc > Registered Office: 8 Canada Square, London E14 5HQ, United Kingdom > Registered in England - Number 14259 > Authorised by the Prudential Regulation Authority and regulated by the > Financial Conduct Authority and the Prudential Regulation Authority > ************************************************************ > ----------------------------------------- SAVE PAPER - THINK BEFORE YOU > PRINT! This transmission has been issued by a member of the HSBC Group > "HSBC" for the information of the addressee only and should not be > reproduced and/or distributed to any other person. Each page attached > hereto must be read in conjunction with any disclaimer which forms part of > it. Unless otherwise stated, this transmission is neither an offer nor the > solicitation of an offer to sell or purchase any investment. Its contents > are based on information obtained from sources believed to be reliable but > HSBC makes no representation and accepts no responsibility or liability as > to its completeness or > accuracy._______________________________________________ > 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/20140116/3646d38b/attachment-0001.html From soumya.bose at plavaga.in Fri Jan 17 01:16:46 2014 From: soumya.bose at plavaga.in (Soumya.plavaga) Date: Thu, 16 Jan 2014 22:16:46 -0800 (PST) Subject: [rules-users] Looking for a way to point drools wb to pick my external git repo. Message-ID: <1389939406574-4027736.post@n3.nabble.com> Hi, I am looking for a way to point drools wb to pick my external git repo instead of picking it's own internal git repo. Can you please through some light on that i.e what all changes I need to do for this in which areas? Any help will be appreciated. -- View this message in context: http://drools.46999.n3.nabble.com/Looking-for-a-way-to-point-drools-wb-to-pick-my-external-git-repo-tp4027736.html Sent from the Drools: User forum mailing list archive at Nabble.com. From soumya.bose at plavaga.in Fri Jan 17 01:27:09 2014 From: soumya.bose at plavaga.in (Soumya.plavaga) Date: Thu, 16 Jan 2014 22:27:09 -0800 (PST) Subject: [rules-users] Issue with Kie-cli-config Message-ID: <1389940029165-4027737.post@n3.nabble.com> Hi, I tried to use kie-cli-config tools but it is not getting worked. I have downloaded the zip distribution of that as mentioned in doc but when I am running the kie-clie-config.sh file it's not resolving the main method under CmdMain class. I have also tried to add the maven dependency for 'kie-cli-config' in my java project and tried to execute the main method it's giving some exception at the point where initializing the clicontext. It's giving exception in the following line - bootstrap.validateBeans(); (within - org.jboss.weld.environment.se.Weld.initialize()). Exception coming - Unsatisfied dependencies for type [ServletContext] with qualifiers [@Named] at injection point [[field] @Inject @Named private org.uberfire.backend.server.plugin.RuntimePluginsServiceServerImpl.servletContext] Hence I can not go forward after this. Looks like ServletContext is not getting resolved within 'RuntimePluginsServiceServerImpl' class. Can you please confirm if this is an issue ? In that case what will be the work around we will use? Any help will be really appreciated. Many Thanks, Soumya -- View this message in context: http://drools.46999.n3.nabble.com/Issue-with-Kie-cli-config-tp4027737.html Sent from the Drools: User forum mailing list archive at Nabble.com. From michael.anstis at gmail.com Fri Jan 17 01:29:43 2014 From: michael.anstis at gmail.com (Michael Anstis) Date: Fri, 17 Jan 2014 06:29:43 +0000 Subject: [rules-users] Looking for a way to point drools wb to pick my external git repo. In-Reply-To: <1389939406574-4027736.post@n3.nabble.com> References: <1389939406574-4027736.post@n3.nabble.com> Message-ID: Ensure your user has the admin role; go to the admin perspective and add a new or clone an existing repository. This is covered in the user guide. Sent on the move On 17 Jan 2014 06:18, "Soumya.plavaga" wrote: > Hi, > > I am looking for a way to point drools wb to pick my external git repo > instead of picking it's own internal git repo. Can you please through some > light on that i.e what all changes I need to do for this in which areas? > Any > help will be appreciated. > > > > -- > View this message in context: > http://drools.46999.n3.nabble.com/Looking-for-a-way-to-point-drools-wb-to-pick-my-external-git-repo-tp4027736.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/20140117/71e66102/attachment.html From ge0ffrey.spam at gmail.com Fri Jan 17 03:59:24 2014 From: ge0ffrey.spam at gmail.com (Geoffrey De Smet) Date: Fri, 17 Jan 2014 09:59:24 +0100 Subject: [rules-users] Planner with a list of planning variables In-Reply-To: <1389902339313-4027734.post@n3.nabble.com> References: <1370262087.11213.YahooMailNeo@web162403.mail.bf1.yahoo.com> <51AC94B4.6050305@gmail.com> <1389818205315-4027704.post@n3.nabble.com> <1389902339313-4027734.post@n3.nabble.com> Message-ID: <52D8F0EC.4010900@gmail.com> On 16-01-14 20:58, jonathan.labin wrote: > Does having PeriodChangeMove and RoomChangeMove undermine the effect of > having the swap filter? no, because they move only 1 lecture > Since a swap can be constructed by a sequence of changes does the filter > reduce the space or simply remove swapMoves that are silly to enact? simply remove swapMoves that are silly to enact It matters how big the ocean (= search space) is, but it matters far more how you navigate it. > > > > -- > View this message in context: http://drools.46999.n3.nabble.com/rules-users-Planner-with-a-list-of-planning-variables-tp4024088p4027734.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 akjones at email.com Fri Jan 17 07:12:31 2014 From: akjones at email.com (akjones33) Date: Fri, 17 Jan 2014 04:12:31 -0800 (PST) Subject: [rules-users] Drools 6.0.0 Camel-server query results In-Reply-To: <1389889348858-4027726.post@n3.nabble.com> References: <1389889348858-4027726.post@n3.nabble.com> Message-ID: <1389960751038-4027742.post@n3.nabble.com> To answer my own question on the stateful session - the target session for the REST query is determined by the settings of the camel route - the "lookup" attribute in the batch-execution command is ignored. -- View this message in context: http://drools.46999.n3.nabble.com/Drools-6-0-0-Camel-server-query-results-tp4027726p4027742.html Sent from the Drools: User forum mailing list archive at Nabble.com. From clickthex at yahoo.com Fri Jan 17 14:39:26 2014 From: clickthex at yahoo.com (SrjTx) Date: Fri, 17 Jan 2014 11:39:26 -0800 (PST) Subject: [rules-users] Guvnor enumerations In-Reply-To: References: <54A78BE6-30CD-4C5D-8EAE-BC4B196ABFCE@me.com> <0651A8E9-95C2-4AB0-A790-1A11DF769532@me.com> Message-ID: <1389987565950-4027743.post@n3.nabble.com> I am seeing this behavior with 6.0.0 Final. I can't say that mine used to work with 5.x as I start with the 6.x series. Was this fixed, is there a work-around, etc? The get method is public. ----------------- 1. | 'ListingGroupxxx.name' : ['a','b','c'] 2. | 'ListingGroup.name' : (new com.xyz.mgmt.listing.ListingGroupBean()).getAllListingGroupNames() Unable to load enumeration data. [Error: unable to invoke method: getAllListingGroupNames] [Near : {... ng.ListingGroupBean()).getAllListingGroupNames() ] ....}] ^ [Line: 2, Column: 74] Error type: org.mvel2.PropertyAccessException -- View this message in context: http://drools.46999.n3.nabble.com/rules-users-Guvnor-enumerations-tp4023057p4027743.html Sent from the Drools: User forum mailing list archive at Nabble.com. From michael.anstis at gmail.com Fri Jan 17 15:24:03 2014 From: michael.anstis at gmail.com (Michael Anstis) Date: Fri, 17 Jan 2014 20:24:03 +0000 Subject: [rules-users] Guvnor enumerations In-Reply-To: <1389987565950-4027743.post@n3.nabble.com> References: <54A78BE6-30CD-4C5D-8EAE-BC4B196ABFCE@me.com> <0651A8E9-95C2-4AB0-A790-1A11DF769532@me.com> <1389987565950-4027743.post@n3.nabble.com> Message-ID: I assume your Java class has a public method of that name; and the class is on the server classpath? Sent on the move On 17 Jan 2014 19:40, "SrjTx" wrote: > I am seeing this behavior with 6.0.0 Final. > > I can't say that mine used to work with 5.x as I start with the 6.x series. > > Was this fixed, is there a work-around, etc? > > The get method is public. > > > ----------------- > 1. | 'ListingGroupxxx.name' : ['a','b','c'] > 2. | 'ListingGroup.name' : (new > com.xyz.mgmt.listing.ListingGroupBean()).getAllListingGroupNames() > > > > Unable to load enumeration data. > > [Error: unable to invoke method: getAllListingGroupNames] [Near : {... > ng.ListingGroupBean()).getAllListingGroupNames() ] ....}] ^ [Line: 2, > Column: 74] > > Error type: org.mvel2.PropertyAccessException > > > > -- > View this message in context: > http://drools.46999.n3.nabble.com/rules-users-Guvnor-enumerations-tp4023057p4027743.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/20140117/95e1eb3e/attachment.html From clickthex at yahoo.com Fri Jan 17 16:38:19 2014 From: clickthex at yahoo.com (SrjTx) Date: Fri, 17 Jan 2014 13:38:19 -0800 (PST) Subject: [rules-users] Guvnor enumerations In-Reply-To: References: <54A78BE6-30CD-4C5D-8EAE-BC4B196ABFCE@me.com> <0651A8E9-95C2-4AB0-A790-1A11DF769532@me.com> <1389987565950-4027743.post@n3.nabble.com> Message-ID: <1389994699695-4027745.post@n3.nabble.com> Yes, that is a public method. The jar file that contains that class is in .../WEB-INF/lib The class is public with the annotation @Stateless I get this error when I validate the enumeration file. The Guided Rule editor sees ListingGroupBean and allListingGroupNames as one of its fields, but is that because I have it uploaded to the artifact repository? Do you need to upload jars that are already in .../WEB-INF/lib? Also, how do you delete an entry from the artifact repository? Thanks for the quick response! -- View this message in context: http://drools.46999.n3.nabble.com/rules-users-Guvnor-enumerations-tp4023057p4027745.html Sent from the Drools: User forum mailing list archive at Nabble.com. From michael.anstis at gmail.com Fri Jan 17 17:06:23 2014 From: michael.anstis at gmail.com (Michael Anstis) Date: Fri, 17 Jan 2014 22:06:23 +0000 Subject: [rules-users] Guvnor enumerations In-Reply-To: <1389994699695-4027745.post@n3.nabble.com> References: <54A78BE6-30CD-4C5D-8EAE-BC4B196ABFCE@me.com> <0651A8E9-95C2-4AB0-A790-1A11DF769532@me.com> <1389987565950-4027743.post@n3.nabble.com> <1389994699695-4027745.post@n3.nabble.com> Message-ID: If the enum values are available in the editor, but validation shows the error, it is a bug. Please raise a JIRA against GUVNOR. You cannot delete artifacts from the repository through the UI. You will need to perform this manually in the /repositories/kie folder (and your .m2 if applicable). Sent on the move On 17 Jan 2014 21:39, "SrjTx" wrote: > Yes, that is a public method. > > The jar file that contains that class is in .../WEB-INF/lib > > The class is public with the annotation @Stateless > > I get this error when I validate the enumeration file. > > The Guided Rule editor sees ListingGroupBean and allListingGroupNames as > one of its fields, but is that because I have it uploaded to the artifact > repository? Do you need to upload jars that are already in > .../WEB-INF/lib? > > Also, how do you delete an entry from the artifact repository? > > Thanks for the quick response! > > > > > > > > -- > View this message in context: > http://drools.46999.n3.nabble.com/rules-users-Guvnor-enumerations-tp4023057p4027745.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/20140117/5ef6bbae/attachment-0001.html From clickthex at yahoo.com Fri Jan 17 18:23:22 2014 From: clickthex at yahoo.com (SrjTx) Date: Fri, 17 Jan 2014 15:23:22 -0800 (PST) Subject: [rules-users] Guvnor enumerations In-Reply-To: References: <54A78BE6-30CD-4C5D-8EAE-BC4B196ABFCE@me.com> <0651A8E9-95C2-4AB0-A790-1A11DF769532@me.com> <1389987565950-4027743.post@n3.nabble.com> <1389994699695-4027745.post@n3.nabble.com> Message-ID: <1390001002616-4027747.post@n3.nabble.com> I submitted the JIRA. I have googled around to figure this out, but I don't know maven. I deleted the directories I didn't want from /repositories/kie and also from .m2 But, every time I start JBoss, the .m2 ones come back and I get errors like 17:13:24,345 INFO [stdout] (http-/127.0.0.1:8080-4) [WARNING] The POM for com.xxx.mgmt.listing:SuperListingGroupAccess:jar:1.0.0 is missing, no dependency information available Dependency artifact not found for: Which mvn commands do I need to run and in which directory? -- View this message in context: http://drools.46999.n3.nabble.com/rules-users-Guvnor-enumerations-tp4023057p4027747.html Sent from the Drools: User forum mailing list archive at Nabble.com. From clickthex at yahoo.com Fri Jan 17 18:56:02 2014 From: clickthex at yahoo.com (SrjTx) Date: Fri, 17 Jan 2014 15:56:02 -0800 (PST) Subject: [rules-users] Guvnor enumerations In-Reply-To: <1390001002616-4027747.post@n3.nabble.com> References: <54A78BE6-30CD-4C5D-8EAE-BC4B196ABFCE@me.com> <0651A8E9-95C2-4AB0-A790-1A11DF769532@me.com> <1389987565950-4027743.post@n3.nabble.com> <1389994699695-4027745.post@n3.nabble.com> <1390001002616-4027747.post@n3.nabble.com> Message-ID: <1390002962455-4027748.post@n3.nabble.com> Figured out. This was because I had a project that had the jar I deleted as a dependency. -- View this message in context: http://drools.46999.n3.nabble.com/rules-users-Guvnor-enumerations-tp4023057p4027748.html Sent from the Drools: User forum mailing list archive at Nabble.com. From clickthex at yahoo.com Fri Jan 17 20:04:15 2014 From: clickthex at yahoo.com (SrjTx) Date: Fri, 17 Jan 2014 17:04:15 -0800 (PST) Subject: [rules-users] DSL: Unable to Expand Error - Even things that shouldn't be expanded. Message-ID: <1390007054997-4027749.post@n3.nabble.com> I've done a couple DSL/RDSLR rules in the past with success. Been trying to create one today but get "Unable to expand" errors on validation on every line, even with not substitutions. What am i missing? Here is a NON-DSL/RDRL file that works just fine. 5. | rule "AAA" 6. | dialect "mvel" 7. | when 8. | $sep : DroolsSepBean( ) 9. | then 10. | System.out.println("HI"); 11. | end Here is a DSL/RDSLR file that generates the errors below (note this is the same code as above and nothing should substitute) I even took out the $sep assignment to make it more simple (it gives same errors if it's in there) 5. | rule "dsltest" 6. | dialect "mvel" 7. | when 8. | DroolsSepBean( ) 9. | then 10. | System.out.println("HI"); 11. | end 18:42:57,396 ERROR [org.drools.compiler.kie.builder.impl.AbstractKieModule] (http-/127.0.0.1:8080-2) Unable to build KieBaseModel:defaultKieBase [8] Unable to expand: DroolsSepBean( ) [10] Unable to expand: System.out.println("HI"); -- View this message in context: http://drools.46999.n3.nabble.com/DSL-Unable-to-Expand-Error-Even-things-that-shouldn-t-be-expanded-tp4027749.html Sent from the Drools: User forum mailing list archive at Nabble.com. From clickthex at yahoo.com Fri Jan 17 20:16:42 2014 From: clickthex at yahoo.com (SrjTx) Date: Fri, 17 Jan 2014 17:16:42 -0800 (PST) Subject: [rules-users] DSL: Unable to Expand Error - Even things that shouldn't be expanded. In-Reply-To: <1390007054997-4027749.post@n3.nabble.com> References: <1390007054997-4027749.post@n3.nabble.com> Message-ID: <1390007802978-4027750.post@n3.nabble.com> KIE WB 6.0.0 Final -- View this message in context: http://drools.46999.n3.nabble.com/DSL-Unable-to-Expand-Error-Even-things-that-shouldn-t-be-expanded-tp4027749p4027750.html Sent from the Drools: User forum mailing list archive at Nabble.com. From michael.anstis at gmail.com Sat Jan 18 02:55:30 2014 From: michael.anstis at gmail.com (Michael Anstis) Date: Sat, 18 Jan 2014 07:55:30 +0000 Subject: [rules-users] DSL: Unable to Expand Error - Even things that shouldn't be expanded. In-Reply-To: <1390007054997-4027749.post@n3.nabble.com> References: <1390007054997-4027749.post@n3.nabble.com> Message-ID: There was a bug that has now been fixed. I think it made the 6.0.1 cut. Sent on the move On 18 Jan 2014 01:04, "SrjTx" wrote: > I've done a couple DSL/RDSLR rules in the past with success. Been trying > to > create one today but get "Unable to expand" errors on validation on every > line, even with not substitutions. > > What am i missing? > > Here is a NON-DSL/RDRL file that works just fine. > > 5. | rule "AAA" > 6. | dialect "mvel" > 7. | when > 8. | $sep : DroolsSepBean( ) > 9. | then > 10. | System.out.println("HI"); > 11. | end > > Here is a DSL/RDSLR file that generates the errors below (note this is the > same code as above and nothing should substitute) I even took out the $sep > assignment to make it more simple (it gives same errors if it's in there) > > 5. | rule "dsltest" > 6. | dialect "mvel" > 7. | when > 8. | DroolsSepBean( ) > 9. | then > 10. | System.out.println("HI"); > 11. | end > > > 18:42:57,396 ERROR [org.drools.compiler.kie.builder.impl.AbstractKieModule] > (http-/127.0.0.1:8080-2) Unable to build KieBaseModel:defaultKieBase > [8] Unable to expand: DroolsSepBean( ) > [10] Unable to expand: System.out.println("HI"); > > > > > > -- > View this message in context: > http://drools.46999.n3.nabble.com/DSL-Unable-to-Expand-Error-Even-things-that-shouldn-t-be-expanded-tp4027749.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/20140118/897161b6/attachment.html From srivastavamohit91 at gmail.com Sat Jan 18 09:19:34 2014 From: srivastavamohit91 at gmail.com (Mohit Srivastava) Date: Sat, 18 Jan 2014 19:49:34 +0530 Subject: [rules-users] Unable to deploy drool-workbench on tomcat 7 Message-ID: Hi Everyone, I tried to deploy drool-workbench on tomcat 7 . But I have encountered with errors. I am unable to figure out the reason, I like to get some help from you guys . 2014-01-18 19:44:12,202 [http-bio-8081-exec-2] INFO KieModule was added:ZipKieModule[ ReleaseId=org.drools:drools-wb-rest-defaultapprover:6.0.1.Finalfile=/usr/tomcat/apache-tomcat-7.0.50/webapps/drools-wb-6.0.1.Final-tomcat7.0/WEB-INF/lib/drools-wb-rest-defaultapprover-6.0.1.Final.jar] 2014-01-18 19:44:17,512 [http-bio-8081-exec-2] ERROR Failed to setup Repository 'uf-playground' java.lang.RuntimeException: org.apache.lucene.store.LockObtainFailedException: Lock obtain timed out: NativeFSLock@/.index/write.lock at org.uberfire.metadata.backend.lucene.setups.DirectoryLuceneSetup.(DirectoryLuceneSetup.java:78) ~[uberfire-metadata-backend-lucene-0.3.1.Final.jar:0.3.1.Final] at org.uberfire.metadata.backend.lucene.setups.NIOLuceneSetup.(NIOLuceneSetup.java:31) ~[uberfire-metadata-backend-lucene-0.3.1.Final.jar:0.3.1.Final] 2014-01-18 19:44:17,926 [http-bio-8081-exec-2] ERROR Can't initialize FileSystemProviders java.util.ServiceConfigurationError: org.uberfire.java.nio.file.spi.FileSystemProvider: Provider org.uberfire.java.nio.fs.jgit.JGitFileSystemProvider could not be instantiated: org.uberfire.java.nio.IOException: java.net.BindException: Address already in use Thanks -- Mohit -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.jboss.org/pipermail/rules-users/attachments/20140118/175d347e/attachment.html From michael.anstis at gmail.com Sat Jan 18 09:26:20 2014 From: michael.anstis at gmail.com (Michael Anstis) Date: Sat, 18 Jan 2014 14:26:20 +0000 Subject: [rules-users] Unable to deploy drool-workbench on tomcat 7 In-Reply-To: References: Message-ID: Is the error message following a stop/restart of Tomcat? The message indicates an instance of the application may already be running or not shutdown correctly. Sent on the move On 18 Jan 2014 14:20, "Mohit Srivastava" wrote: > Hi Everyone, > > I tried to deploy drool-workbench on tomcat 7 . But I have encountered > with errors. > I am unable to figure out the reason, I like to get some help from you > guys . > > 2014-01-18 19:44:12,202 [http-bio-8081-exec-2] INFO KieModule was > added:ZipKieModule[ > ReleaseId=org.drools:drools-wb-rest-defaultapprover:6.0.1.Finalfile=/usr/tomcat/apache-tomcat-7.0.50/webapps/drools-wb-6.0.1.Final-tomcat7.0/WEB-INF/lib/drools-wb-rest-defaultapprover-6.0.1.Final.jar] > 2014-01-18 19:44:17,512 [http-bio-8081-exec-2] ERROR Failed to setup > Repository 'uf-playground' > java.lang.RuntimeException: > org.apache.lucene.store.LockObtainFailedException: Lock obtain timed out: > NativeFSLock@/.index/write.lock > at > org.uberfire.metadata.backend.lucene.setups.DirectoryLuceneSetup.(DirectoryLuceneSetup.java:78) > ~[uberfire-metadata-backend-lucene-0.3.1.Final.jar:0.3.1.Final] > at > org.uberfire.metadata.backend.lucene.setups.NIOLuceneSetup.(NIOLuceneSetup.java:31) > ~[uberfire-metadata-backend-lucene-0.3.1.Final.jar:0.3.1.Final] > > 2014-01-18 19:44:17,926 [http-bio-8081-exec-2] ERROR Can't initialize > FileSystemProviders > java.util.ServiceConfigurationError: > org.uberfire.java.nio.file.spi.FileSystemProvider: Provider > org.uberfire.java.nio.fs.jgit.JGitFileSystemProvider could not be > instantiated: org.uberfire.java.nio.IOException: java.net.BindException: > Address already in use > > > Thanks > -- > Mohit > > _______________________________________________ > 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/20140118/15d44ce8/attachment.html From srivastavamohit91 at gmail.com Sat Jan 18 09:31:56 2014 From: srivastavamohit91 at gmail.com (Mohit Srivastava) Date: Sat, 18 Jan 2014 20:01:56 +0530 Subject: [rules-users] Unable to deploy drool-workbench on tomcat 7 In-Reply-To: References: Message-ID: Yeah, It happens sometimes and sometimes it works normally. But I changes the port of tomcat as well as I restart the whole machine. Then I start the service which already deployed(i.e. drools one) and I encountered the same error. And If there is any instance , then any Idea why they are not shutdown , while stopping tomcat ? On Sat, Jan 18, 2014 at 7:56 PM, Michael Anstis wrote: > Is the error message following a stop/restart of Tomcat? The message > indicates an instance of the application may already be running or not > shutdown correctly. > > Sent on the move > On 18 Jan 2014 14:20, "Mohit Srivastava" > wrote: > >> Hi Everyone, >> >> I tried to deploy drool-workbench on tomcat 7 . But I have encountered >> with errors. >> I am unable to figure out the reason, I like to get some help from you >> guys . >> >> 2014-01-18 19:44:12,202 [http-bio-8081-exec-2] INFO KieModule was >> added:ZipKieModule[ >> ReleaseId=org.drools:drools-wb-rest-defaultapprover:6.0.1.Finalfile=/usr/tomcat/apache-tomcat-7.0.50/webapps/drools-wb-6.0.1.Final-tomcat7.0/WEB-INF/lib/drools-wb-rest-defaultapprover-6.0.1.Final.jar] >> 2014-01-18 19:44:17,512 [http-bio-8081-exec-2] ERROR Failed to setup >> Repository 'uf-playground' >> java.lang.RuntimeException: >> org.apache.lucene.store.LockObtainFailedException: Lock obtain timed out: >> NativeFSLock@/.index/write.lock >> at >> org.uberfire.metadata.backend.lucene.setups.DirectoryLuceneSetup.(DirectoryLuceneSetup.java:78) >> ~[uberfire-metadata-backend-lucene-0.3.1.Final.jar:0.3.1.Final] >> at >> org.uberfire.metadata.backend.lucene.setups.NIOLuceneSetup.(NIOLuceneSetup.java:31) >> ~[uberfire-metadata-backend-lucene-0.3.1.Final.jar:0.3.1.Final] >> >> 2014-01-18 19:44:17,926 [http-bio-8081-exec-2] ERROR Can't initialize >> FileSystemProviders >> java.util.ServiceConfigurationError: >> org.uberfire.java.nio.file.spi.FileSystemProvider: Provider >> org.uberfire.java.nio.fs.jgit.JGitFileSystemProvider could not be >> instantiated: org.uberfire.java.nio.IOException: java.net.BindException: >> Address already in use >> >> >> Thanks >> -- >> Mohit >> >> _______________________________________________ >> 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/20140118/e8bfec57/attachment-0001.html From srivastavamohit91 at gmail.com Sat Jan 18 09:45:52 2014 From: srivastavamohit91 at gmail.com (Mohit Srivastava) Date: Sat, 18 Jan 2014 20:15:52 +0530 Subject: [rules-users] Unable to deploy drool-workbench on tomcat 7 In-Reply-To: References: Message-ID: I think thats a tomcat problem. its not shutting down properly. But here is something new : 2014-01-18 20:13:39,469 [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 On Sat, Jan 18, 2014 at 8:01 PM, Mohit Srivastava < srivastavamohit91 at gmail.com> wrote: > Yeah, It happens sometimes and sometimes it works normally. > But I changes the port of tomcat as well as I restart the whole machine. > Then I start the service which already deployed(i.e. drools one) and I > encountered the same error. > > And If there is any instance , then any Idea why they are not shutdown , > while stopping tomcat ? > > > On Sat, Jan 18, 2014 at 7:56 PM, Michael Anstis wrote: > >> Is the error message following a stop/restart of Tomcat? The message >> indicates an instance of the application may already be running or not >> shutdown correctly. >> >> Sent on the move >> On 18 Jan 2014 14:20, "Mohit Srivastava" >> wrote: >> >>> Hi Everyone, >>> >>> I tried to deploy drool-workbench on tomcat 7 . But I have encountered >>> with errors. >>> I am unable to figure out the reason, I like to get some help from you >>> guys . >>> >>> 2014-01-18 19:44:12,202 [http-bio-8081-exec-2] INFO KieModule was >>> added:ZipKieModule[ >>> ReleaseId=org.drools:drools-wb-rest-defaultapprover:6.0.1.Finalfile=/usr/tomcat/apache-tomcat-7.0.50/webapps/drools-wb-6.0.1.Final-tomcat7.0/WEB-INF/lib/drools-wb-rest-defaultapprover-6.0.1.Final.jar] >>> 2014-01-18 19:44:17,512 [http-bio-8081-exec-2] ERROR Failed to setup >>> Repository 'uf-playground' >>> java.lang.RuntimeException: >>> org.apache.lucene.store.LockObtainFailedException: Lock obtain timed out: >>> NativeFSLock@/.index/write.lock >>> at >>> org.uberfire.metadata.backend.lucene.setups.DirectoryLuceneSetup.(DirectoryLuceneSetup.java:78) >>> ~[uberfire-metadata-backend-lucene-0.3.1.Final.jar:0.3.1.Final] >>> at >>> org.uberfire.metadata.backend.lucene.setups.NIOLuceneSetup.(NIOLuceneSetup.java:31) >>> ~[uberfire-metadata-backend-lucene-0.3.1.Final.jar:0.3.1.Final] >>> >>> 2014-01-18 19:44:17,926 [http-bio-8081-exec-2] ERROR Can't initialize >>> FileSystemProviders >>> java.util.ServiceConfigurationError: >>> org.uberfire.java.nio.file.spi.FileSystemProvider: Provider >>> org.uberfire.java.nio.fs.jgit.JGitFileSystemProvider could not be >>> instantiated: org.uberfire.java.nio.IOException: java.net.BindException: >>> Address already in use >>> >>> >>> Thanks >>> -- >>> Mohit >>> >>> _______________________________________________ >>> 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/20140118/bc716c92/attachment.html From srivastavamohit91 at gmail.com Sat Jan 18 09:56:38 2014 From: srivastavamohit91 at gmail.com (Mohit Srivastava) Date: Sat, 18 Jan 2014 20:26:38 +0530 Subject: [rules-users] Unable to deploy drool-workbench on tomcat 7 In-Reply-To: References: Message-ID: One more problem I encounter: I started a tomcat once and deployed successfully drool workbench as there is no previous existing tomcat service is running. But if I stop the /drools-wb-6.0.1.Final-tomcat7.0 from tomcat manager and again start same from manager. I encountered this error. I think , this should not be related to tomcat . Its something with drool war. Highlight of error: Jan 18, 2014 8:17:51 PM org.apache.catalina.loader.WebappClassLoader clearReferencesThreads SEVERE: The web application [/drools-wb-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. Jan 18, 2014 8:17:51 PM org.apache.catalina.loader.WebappClassLoader clearReferencesThreads SEVERE: The web application [/drools-wb-6.0.1.Final-tomcat7.0] appears to have started a thread named [Thread-4] but has failed to stop it. This is very likely to create a memory leak. Jan 18, 2014 8:17:51 PM org.apache.catalina.loader.WebappClassLoader clearReferencesThreads SEVERE: The web application [/drools-wb-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. Jan 18, 2014 8:17:51 PM org.apache.catalina.loader.WebappClassLoader clearReferencesThreads SEVERE: The web application [/drools-wb-6.0.1.Final-tomcat7.0] appears to have started a thread named [com.google.inject.internal.util.$Finalizer] but has failed to stop it. This is very likely to create a memory leak. Jan 18, 2014 8:17:51 PM org.apache.catalina.loader.WebappClassLoader clearReferencesThreads SEVERE: The web application [/drools-wb-6.0.1.Final-tomcat7.0] appears to have started a thread named [Thread-5] but has failed to stop it. This is very likely to create a memory leak. Full Error: http://pastebin.com/75tAuZvu Should I log this into jira ? -- Mohit On Sat, Jan 18, 2014 at 8:15 PM, Mohit Srivastava < srivastavamohit91 at gmail.com> wrote: > I think thats a tomcat problem. its not shutting down properly. > > But here is something new : > 2014-01-18 20:13:39,469 [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 > > > On Sat, Jan 18, 2014 at 8:01 PM, Mohit Srivastava < > srivastavamohit91 at gmail.com> wrote: > >> Yeah, It happens sometimes and sometimes it works normally. >> But I changes the port of tomcat as well as I restart the whole machine. >> Then I start the service which already deployed(i.e. drools one) and I >> encountered the same error. >> >> And If there is any instance , then any Idea why they are not shutdown , >> while stopping tomcat ? >> >> >> On Sat, Jan 18, 2014 at 7:56 PM, Michael Anstis > > wrote: >> >>> Is the error message following a stop/restart of Tomcat? The message >>> indicates an instance of the application may already be running or not >>> shutdown correctly. >>> >>> Sent on the move >>> On 18 Jan 2014 14:20, "Mohit Srivastava" >>> wrote: >>> >>>> Hi Everyone, >>>> >>>> I tried to deploy drool-workbench on tomcat 7 . But I have encountered >>>> with errors. >>>> I am unable to figure out the reason, I like to get some help from you >>>> guys . >>>> >>>> 2014-01-18 19:44:12,202 [http-bio-8081-exec-2] INFO KieModule was >>>> added:ZipKieModule[ >>>> ReleaseId=org.drools:drools-wb-rest-defaultapprover:6.0.1.Finalfile=/usr/tomcat/apache-tomcat-7.0.50/webapps/drools-wb-6.0.1.Final-tomcat7.0/WEB-INF/lib/drools-wb-rest-defaultapprover-6.0.1.Final.jar] >>>> 2014-01-18 19:44:17,512 [http-bio-8081-exec-2] ERROR Failed to setup >>>> Repository 'uf-playground' >>>> java.lang.RuntimeException: >>>> org.apache.lucene.store.LockObtainFailedException: Lock obtain timed out: >>>> NativeFSLock@/.index/write.lock >>>> at >>>> org.uberfire.metadata.backend.lucene.setups.DirectoryLuceneSetup.(DirectoryLuceneSetup.java:78) >>>> ~[uberfire-metadata-backend-lucene-0.3.1.Final.jar:0.3.1.Final] >>>> at >>>> org.uberfire.metadata.backend.lucene.setups.NIOLuceneSetup.(NIOLuceneSetup.java:31) >>>> ~[uberfire-metadata-backend-lucene-0.3.1.Final.jar:0.3.1.Final] >>>> >>>> 2014-01-18 19:44:17,926 [http-bio-8081-exec-2] ERROR Can't initialize >>>> FileSystemProviders >>>> java.util.ServiceConfigurationError: >>>> org.uberfire.java.nio.file.spi.FileSystemProvider: Provider >>>> org.uberfire.java.nio.fs.jgit.JGitFileSystemProvider could not be >>>> instantiated: org.uberfire.java.nio.IOException: java.net.BindException: >>>> Address already in use >>>> >>>> >>>> Thanks >>>> -- >>>> Mohit >>>> >>>> _______________________________________________ >>>> 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/20140118/dc69d2ad/attachment.html From michael.anstis at gmail.com Sat Jan 18 13:27:03 2014 From: michael.anstis at gmail.com (Michael Anstis) Date: Sat, 18 Jan 2014 18:27:03 +0000 Subject: [rules-users] Unable to deploy drool-workbench on tomcat 7 In-Reply-To: References: Message-ID: Yes please Sent on the move On 18 Jan 2014 14:57, "Mohit Srivastava" wrote: > One more problem I encounter: > > I started a tomcat once and deployed successfully drool workbench as there > is no previous existing tomcat service is running. > > But if I stop the /drools-wb-6.0.1.Final-tomcat7.0 from > tomcat manager and again start same from manager. I encountered this error. > I think , this should not be related to tomcat . Its something with drool > war. > > Highlight of error: > > Jan 18, 2014 8:17:51 PM org.apache.catalina.loader.WebappClassLoader > clearReferencesThreads > SEVERE: The web application [/drools-wb-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. > Jan 18, 2014 8:17:51 PM org.apache.catalina.loader.WebappClassLoader > clearReferencesThreads > SEVERE: The web application [/drools-wb-6.0.1.Final-tomcat7.0] appears to > have started a thread named [Thread-4] but has failed to stop it. This is > very likely to create a memory leak. > Jan 18, 2014 8:17:51 PM org.apache.catalina.loader.WebappClassLoader > clearReferencesThreads > SEVERE: The web application [/drools-wb-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. > Jan 18, 2014 8:17:51 PM org.apache.catalina.loader.WebappClassLoader > clearReferencesThreads > SEVERE: The web application [/drools-wb-6.0.1.Final-tomcat7.0] appears to > have started a thread named [com.google.inject.internal.util.$Finalizer] > but has failed to stop it. This is very likely to create a memory leak. > Jan 18, 2014 8:17:51 PM org.apache.catalina.loader.WebappClassLoader > clearReferencesThreads > SEVERE: The web application [/drools-wb-6.0.1.Final-tomcat7.0] appears to > have started a thread named [Thread-5] but has failed to stop it. This is > very likely to create a memory leak. > > Full Error: > http://pastebin.com/75tAuZvu > > Should I log this into jira ? > > -- > Mohit > > > On Sat, Jan 18, 2014 at 8:15 PM, Mohit Srivastava < > srivastavamohit91 at gmail.com> wrote: > >> I think thats a tomcat problem. its not shutting down properly. >> >> But here is something new : >> 2014-01-18 20:13:39,469 [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 >> >> >> On Sat, Jan 18, 2014 at 8:01 PM, Mohit Srivastava < >> srivastavamohit91 at gmail.com> wrote: >> >>> Yeah, It happens sometimes and sometimes it works normally. >>> But I changes the port of tomcat as well as I restart the whole machine. >>> Then I start the service which already deployed(i.e. drools one) and I >>> encountered the same error. >>> >>> And If there is any instance , then any Idea why they are not shutdown , >>> while stopping tomcat ? >>> >>> >>> On Sat, Jan 18, 2014 at 7:56 PM, Michael Anstis < >>> michael.anstis at gmail.com> wrote: >>> >>>> Is the error message following a stop/restart of Tomcat? The message >>>> indicates an instance of the application may already be running or not >>>> shutdown correctly. >>>> >>>> Sent on the move >>>> On 18 Jan 2014 14:20, "Mohit Srivastava" >>>> wrote: >>>> >>>>> Hi Everyone, >>>>> >>>>> I tried to deploy drool-workbench on tomcat 7 . But I have encountered >>>>> with errors. >>>>> I am unable to figure out the reason, I like to get some help from you >>>>> guys . >>>>> >>>>> 2014-01-18 19:44:12,202 [http-bio-8081-exec-2] INFO KieModule was >>>>> added:ZipKieModule[ >>>>> ReleaseId=org.drools:drools-wb-rest-defaultapprover:6.0.1.Finalfile=/usr/tomcat/apache-tomcat-7.0.50/webapps/drools-wb-6.0.1.Final-tomcat7.0/WEB-INF/lib/drools-wb-rest-defaultapprover-6.0.1.Final.jar] >>>>> 2014-01-18 19:44:17,512 [http-bio-8081-exec-2] ERROR Failed to setup >>>>> Repository 'uf-playground' >>>>> java.lang.RuntimeException: >>>>> org.apache.lucene.store.LockObtainFailedException: Lock obtain timed out: >>>>> NativeFSLock@/.index/write.lock >>>>> at >>>>> org.uberfire.metadata.backend.lucene.setups.DirectoryLuceneSetup.(DirectoryLuceneSetup.java:78) >>>>> ~[uberfire-metadata-backend-lucene-0.3.1.Final.jar:0.3.1.Final] >>>>> at >>>>> org.uberfire.metadata.backend.lucene.setups.NIOLuceneSetup.(NIOLuceneSetup.java:31) >>>>> ~[uberfire-metadata-backend-lucene-0.3.1.Final.jar:0.3.1.Final] >>>>> >>>>> 2014-01-18 19:44:17,926 [http-bio-8081-exec-2] ERROR Can't initialize >>>>> FileSystemProviders >>>>> java.util.ServiceConfigurationError: >>>>> org.uberfire.java.nio.file.spi.FileSystemProvider: Provider >>>>> org.uberfire.java.nio.fs.jgit.JGitFileSystemProvider could not be >>>>> instantiated: org.uberfire.java.nio.IOException: java.net.BindException: >>>>> Address already in use >>>>> >>>>> >>>>> Thanks >>>>> -- >>>>> Mohit >>>>> >>>>> _______________________________________________ >>>>> 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/20140118/69770099/attachment-0001.html From waynemetcalfe at outlook.com Sun Jan 19 10:22:06 2014 From: waynemetcalfe at outlook.com (waynemetcalfe) Date: Sun, 19 Jan 2014 07:22:06 -0800 (PST) Subject: [rules-users] Cannot find KieModule: org.default:artifact:1.0.0-SNAPSHOT Message-ID: <1390144926592-4027760.post@n3.nabble.com> I've seen this problem a few places while searching for a solution. Is it possible to overcome this issue? Drools version:6.0.0.Final Java version: 1.7.0_45 Code snippet: ... final KieServices ks = KieServices.Factory.get(); final KieRepository kr = ks.getRepository(); final KieFileSystem kfs = ks.newKieFileSystem(); //ruleScript is simply a string containing the rules kfs.write("src/main/resources/com/company/test/rules/rules.drl", ruleScript); KieBuilder kb = ks.newKieBuilder(kfs); kb.buildAll(); if (kb.getResults().hasMessages(Level.ERROR)){ configuration.getLog().error("\nSomething wrong here!\n\n"); } final KieContainer kContainer = ks.newKieContainer(kr.getDefaultReleaseId()); session = kContainer.newKieSession(); Exception: java.lang.RuntimeException: Cannot find KieModule: org.default:artifact:1.0.0-SNAPSHOT at org.drools.compiler.kie.builder.impl.KieServicesImpl.newKieContainer(KieServicesImpl.java:86) Thanks -- View this message in context: http://drools.46999.n3.nabble.com/Cannot-find-KieModule-org-default-artifact-1-0-0-SNAPSHOT-tp4027760.html Sent from the Drools: User forum mailing list archive at Nabble.com. From agattik at gmail.com Sun Jan 19 15:55:10 2014 From: agattik at gmail.com (Alexandre Gattiker) Date: Sun, 19 Jan 2014 21:55:10 +0100 Subject: [rules-users] No inferred expiration when correlating events in Drools Fusion Message-ID: Hello, I am trying to use Drools Fusion (5.6.0 or 6.0.1) to correlate events, but can't get the internal mechanism for expiring events to work in my rule. I made up a simple example that detects duplicate messages over a short time window. The rule below seems to work fine, but facts accumulate indefinitely in the working memory. Changing window:length(1) to window:time(10s) does not solve the issue. declare DataEvent @role(event) end rule "Detect duplicates" when DataEvent ( $text: text ) over window:length(1) ArrayList( size >= 2 ) from collect( DataEvent( text == $text ) over window:time( 10s ) ) then System.err.println("Duplicate detected"); end Now, if I change my condition to the following, I see that facts automatically expire and are retracted after 10 seconds. ...when ArrayList( size >= 10 ) from collect( DataEvent( ) over window:time( 10s ) ) then... Many thanks in advance. -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.jboss.org/pipermail/rules-users/attachments/20140119/95b639f3/attachment.html From waynemetcalfe at outlook.com Sun Jan 19 16:46:08 2014 From: waynemetcalfe at outlook.com (wayne metcalfe) Date: Sun, 19 Jan 2014 21:46:08 +0000 Subject: [rules-users] No inferred expiration when correlating events in Drools Fusion In-Reply-To: References: Message-ID: This might be an option: http://docs.jboss.org/drools/release/5.3.0.Beta1/drools-fusion-docs/html/ch02.html#d0e1288 > On 19 Jan 2014, at 20:57, "Alexandre Gattiker" wrote: > > Hello, > > I am trying to use Drools Fusion (5.6.0 or 6.0.1) to correlate events, but can't get the internal mechanism for expiring events to work in my rule. > > I made up a simple example that detects duplicate messages over a short time window. The rule below seems to work fine, but facts accumulate indefinitely in the working memory. Changing window:length(1) to window:time(10s) does not solve the issue. > > declare DataEvent > @role(event) > end > rule "Detect duplicates" > when > DataEvent ( $text: text ) over window:length(1) > ArrayList( size >= 2 ) from collect( DataEvent( text == $text ) over window:time( 10s ) ) > then > System.err.println("Duplicate detected"); > end > > Now, if I change my condition to the following, I see that facts automatically expire and are retracted after 10 seconds. > > ...when > ArrayList( size >= 10 ) from collect( DataEvent( ) over window:time( 10s ) ) > then... > > Many thanks in advance. > > > _______________________________________________ > 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 Jan 20 01:52:12 2014 From: wolfgang.laun at gmail.com (Wolfgang Laun) Date: Mon, 20 Jan 2014 07:52:12 +0100 Subject: [rules-users] No inferred expiration when correlating events in Drools Fusion In-Reply-To: References: Message-ID: Subsection 8.8.2., Inferred expiration offset, sounds great when you read it, and I'm sure that it has been implemented with a vengeance. But, given the ever increasing complexity of the LHS language, who can claim that the implementation is complete? Even the smallest glitch can thwart the automatism. And, assuming that the implementation is complete and correct, a single CE in a single rule can inhibit automatic expiration for a fact, which alone is sufficient to create a memory leak and may have a domino effect on others. This, then, inevitably leads to the conclusion that using this feature is a risky game. Use it if you are a gambler. It would be much better if you could take out insurance, e.g., by an API that answers the question whether automatic expiry is in effect for a certain fact type. -W On 19/01/2014, Alexandre Gattiker wrote: > Hello, > > I am trying to use Drools Fusion (5.6.0 or 6.0.1) to correlate events, but > can't get the internal mechanism for expiring events to work in my rule. > > I made up a simple example that detects duplicate messages over a short > time window. The rule below seems to work fine, but facts accumulate > indefinitely in the working memory. Changing window:length(1) to > window:time(10s) does not solve the issue. > > declare DataEvent > @role(event) > end > rule "Detect duplicates" > when > DataEvent ( $text: text ) over window:length(1) > ArrayList( size >= 2 ) from collect( DataEvent( text == $text ) over > window:time( 10s ) ) > then > System.err.println("Duplicate detected"); > end > > Now, if I change my condition to the following, I see that facts > automatically expire and are retracted after 10 seconds. > > ...when > ArrayList( size >= 10 ) from collect( DataEvent( ) over window:time( > 10s ) ) > then... > > Many thanks in advance. > From swapnilaute at gmail.com Mon Jan 20 05:46:15 2014 From: swapnilaute at gmail.com (neal) Date: Mon, 20 Jan 2014 02:46:15 -0800 (PST) Subject: [rules-users] How to generate rule statements using MVEL 2.0 template? In-Reply-To: <6F1B1208-E189-49A6-83A3-92243AD35F48@codehaus.org> References: <1389777534343-4027692.post@n3.nabble.com> <6F1B1208-E189-49A6-83A3-92243AD35F48@codehaus.org> Message-ID: <1390214775313-4027765.post@n3.nabble.com> Hi Mark, This is the rough template i have created to produce rules. I am able to generate basic rules and able to write them .drl. package @{package}; @foreach{importEntry : imports} import @{importEntry}; @end{} @foreach{importEntry : staticImports} import static @{importEntry}; @end{} rule "@{ruleName}" dialect "@{dialectName}" salience @{salienceValue} enabled @{enableValue} when @foreach{modelObject : modelObjects} @{modelObject.referenceName} : @{modelObject.referenceType} ( @foreach{ attribute : modelObject.attributes} @{attribute.name} @{attribute.operator} "@{attribute.value}" @end{} ) @end{} then @foreach{modelObject : modelObjects} @{modelObject.referenceName} : @{modelObject.referenceType} ( @foreach{ attribute : modelObject.thenAttributes} @{attribute.name} @{attribute.operator} "@{attribute.value}" @end{} ) @end{} end I am reading the generated rule through .drl into String. How can i able to parse it so that it will give me object model which i passed to this template? -- View this message in context: http://drools.46999.n3.nabble.com/How-to-generate-rule-statements-using-MVEL-2-0-template-tp4027692p4027765.html Sent from the Drools: User forum mailing list archive at Nabble.com. From ivan.otenko at gmail.com Mon Jan 20 08:10:41 2014 From: ivan.otenko at gmail.com (ivot) Date: Mon, 20 Jan 2014 05:10:41 -0800 (PST) Subject: [rules-users] Project Explorer has dissappeared in KIE Workbench Message-ID: <1390223441353-4027767.post@n3.nabble.com> Hi All, I have installed JBoss 7.1.1 and deployed kie-drools-wb-distribution-6.0.1.Final.war. However, when I log in to KIE Workbench I get an error message: Alos I do not see Project Explorer on the screen. Also when I click on Explorer Menu option Project Explorer is not listed there: It seems that there were some warnings during deployment of kie workbench (see server.log attached). server.log Can anyone advise please how to fix this? Thank you in advance, Ivan -- View this message in context: http://drools.46999.n3.nabble.com/Project-Explorer-has-dissappeared-in-KIE-Workbench-tp4027767.html Sent from the Drools: User forum mailing list archive at Nabble.com. From michael.anstis at gmail.com Mon Jan 20 08:25:32 2014 From: michael.anstis at gmail.com (Michael Anstis) Date: Mon, 20 Jan 2014 13:25:32 +0000 Subject: [rules-users] Project Explorer has dissappeared in KIE Workbench In-Reply-To: <1390223441353-4027767.post@n3.nabble.com> References: <1390223441353-4027767.post@n3.nabble.com> Message-ID: Can you please confirm you downloaded the WAR from http://download.jboss.org/drools/release/6.0.1.Final/kie-drools-wb-distribution-6.0.1.Final.zip On 20 January 2014 13:10, ivot wrote: > Hi All, > > I have installed JBoss 7.1.1 and deployed > kie-drools-wb-distribution-6.0.1.Final.war. > > However, when I log in to KIE Workbench I get an error message: > > > > Alos I do not see Project Explorer on the screen. Also when I click on > Explorer Menu option Project Explorer is not listed there: > > > > It seems that there were some warnings during deployment of kie workbench > (see server.log attached). > > server.log > > Can anyone advise please how to fix this? > > Thank you in advance, > Ivan > > > > > > > > -- > View this message in context: > http://drools.46999.n3.nabble.com/Project-Explorer-has-dissappeared-in-KIE-Workbench-tp4027767.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/20140120/3f098cf8/attachment.html From brachi.w at sapiens.com Mon Jan 20 08:41:48 2014 From: brachi.w at sapiens.com (brachi) Date: Mon, 20 Jan 2014 05:41:48 -0800 (PST) Subject: [rules-users] stuck! Unknown accessor type: org.mvel2.optimizers.impl.refl.collection.ArrayCreator@690c2a7a In-Reply-To: <1389711718331-4027682.post@n3.nabble.com> References: <1353967076623-4020969.post@n3.nabble.com> <1354202737050-4021015.post@n3.nabble.com> <1389023861262-4027535.post@n3.nabble.com> <83C4A2C0-10C2-4D0F-B827-4A7B6FB43A96@codehaus.org> <1389097306048-4027560.post@n3.nabble.com> <1389711718331-4027682.post@n3.nabble.com> Message-ID: <1390225308598-4027769.post@n3.nabble.com> any news? -- View this message in context: http://drools.46999.n3.nabble.com/stuck-Unknown-accessor-type-org-mvel2-optimizers-impl-refl-collection-ArrayCreator-690c2a7a-tp4020969p4027769.html Sent from the Drools: User forum mailing list archive at Nabble.com. From toni.rikkola at gmail.com Mon Jan 20 08:53:57 2014 From: toni.rikkola at gmail.com (Toni Rikkola) Date: Mon, 20 Jan 2014 15:53:57 +0200 Subject: [rules-users] Project Explorer has dissappeared in KIE Workbench In-Reply-To: References: <1390223441353-4027767.post@n3.nabble.com> Message-ID: <1390226037.22118.44.camel@localhost.localdomain> I tested the 6.0.1.Final war with Chrome and got the user agent error. Looks like the only browser that works 100% is Firefox and any other that uses Gecko 1.8. Toni On ma, 2014-01-20 at 13:25 +0000, Michael Anstis wrote: > Can you please confirm you downloaded the WAR > from http://download.jboss.org/drools/release/6.0.1.Final/kie-drools-wb-distribution-6.0.1.Final.zip > > > > > > > On 20 January 2014 13:10, ivot wrote: > Hi All, > > I have installed JBoss 7.1.1 and deployed > kie-drools-wb-distribution-6.0.1.Final.war. > > However, when I log in to KIE Workbench I get an error > message: > > > > Alos I do not see Project Explorer on the screen. Also when I > click on > Explorer Menu option Project Explorer is not listed there: > > > > It seems that there were some warnings during deployment of > kie workbench > (see server.log attached). > > server.log > > > Can anyone advise please how to fix this? > > Thank you in advance, > Ivan > > > > > > > > -- > View this message in context: > http://drools.46999.n3.nabble.com/Project-Explorer-has-dissappeared-in-KIE-Workbench-tp4027767.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 clickthex at yahoo.com Mon Jan 20 10:59:21 2014 From: clickthex at yahoo.com (SrjTx) Date: Mon, 20 Jan 2014 07:59:21 -0800 (PST) Subject: [rules-users] DSL: Unable to Expand Error - Even things that shouldn't be expanded. In-Reply-To: References: <1390007054997-4027749.post@n3.nabble.com> Message-ID: <1390233561598-4027772.post@n3.nabble.com> Must not be in 6.0.1. I upgraded to 6.0.1 I even created a new repo with the rule 7. | when 8. | Number( ) 9. | then 10. | end and get [8] No mapping entries for expanding: insert( new Number() ); [8] Unable to expand: insert( new Number() ); -- View this message in context: http://drools.46999.n3.nabble.com/DSL-Unable-to-Expand-Error-Even-things-that-shouldn-t-be-expanded-tp4027749p4027772.html Sent from the Drools: User forum mailing list archive at Nabble.com. From clickthex at yahoo.com Mon Jan 20 11:01:54 2014 From: clickthex at yahoo.com (SrjTx) Date: Mon, 20 Jan 2014 08:01:54 -0800 (PST) Subject: [rules-users] DSL: Unable to Expand Error - Even things that shouldn't be expanded. In-Reply-To: <1390233561598-4027772.post@n3.nabble.com> References: <1390007054997-4027749.post@n3.nabble.com> <1390233561598-4027772.post@n3.nabble.com> Message-ID: <1390233714550-4027773.post@n3.nabble.com> BTW, it would be nice if some where on the GUI you could see what version you were running. -- View this message in context: http://drools.46999.n3.nabble.com/DSL-Unable-to-Expand-Error-Even-things-that-shouldn-t-be-expanded-tp4027749p4027773.html Sent from the Drools: User forum mailing list archive at Nabble.com. From ivan.otenko at gmail.com Mon Jan 20 11:09:48 2014 From: ivan.otenko at gmail.com (ivot) Date: Mon, 20 Jan 2014 08:09:48 -0800 (PST) Subject: [rules-users] Project Explorer has dissappeared in KIE Workbench In-Reply-To: <1390226037.22118.44.camel@localhost.localdomain> References: <1390223441353-4027767.post@n3.nabble.com> <1390226037.22118.44.camel@localhost.localdomain> Message-ID: Hi, Yes, I have downloaded kie-drools from the location below. Actually, I reinstalled the JBoss and KIE-Workbench and then logged in to Workbench using Firefox and though I do not see Project Explorer option in the Explore option, Project Explorer itself is showing on the lefthandside and did not disappear so far. Also I did not see Error message when logging in to KIE Workbench. It seems that FireFox works properly with KIE Workbench (IE and Chrome failed previously). Thanks for the hint about FireFox. I saw on youtube video that KIE Workbench was launched in FireFox, but did not think it was so important. Thank you, Ivan 2014/1/20 Toni Rikkola-2 [via Drools] < ml-node+s46999n4027770h83 at n3.nabble.com> > I tested the 6.0.1.Final war with Chrome and got the user agent error. > Looks like the only browser that works 100% is Firefox and any other > that uses Gecko 1.8. > > Toni > > On ma, 2014-01-20 at 13:25 +0000, Michael Anstis wrote: > > > Can you please confirm you downloaded the WAR > > from > http://download.jboss.org/drools/release/6.0.1.Final/kie-drools-wb-distribution-6.0.1.Final.zip > > > > > > > > > > > > > > On 20 January 2014 13:10, ivot <[hidden email]> > wrote: > > Hi All, > > > > I have installed JBoss 7.1.1 and deployed > > kie-drools-wb-distribution-6.0.1.Final.war. > > > > However, when I log in to KIE Workbench I get an error > > message: > > > > < > http://drools.46999.n3.nabble.com/file/n4027767/StartUp_Error.png> > > > > Alos I do not see Project Explorer on the screen. Also when I > > click on > > Explorer Menu option Project Explorer is not listed there: > > > > < > http://drools.46999.n3.nabble.com/file/n4027767/No_Project_Explorer.png> > > > > It seems that there were some warnings during deployment of > > kie workbench > > (see server.log attached). > > > > server.log > > > > > > Can anyone advise please how to fix this? > > > > Thank you in advance, > > Ivan > > > > > > > > > > > > > > > > -- > > View this message in context: > > > http://drools.46999.n3.nabble.com/Project-Explorer-has-dissappeared-in-KIE-Workbench-tp4027767.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 > > > _______________________________________________ > 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/Project-Explorer-has-dissappeared-in-KIE-Workbench-tp4027767p4027770.html > To unsubscribe from Project Explorer has dissappeared in KIE Workbench, click > here > . > NAML > -- View this message in context: http://drools.46999.n3.nabble.com/Project-Explorer-has-dissappeared-in-KIE-Workbench-tp4027767p4027774.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/20140120/c128b1fd/attachment.html From paul.s.mander at gmail.com Mon Jan 20 11:38:32 2014 From: paul.s.mander at gmail.com (pmander) Date: Mon, 20 Jan 2014 08:38:32 -0800 (PST) Subject: [rules-users] named consequences for an or... Message-ID: <1390235912924-4027775.post@n3.nabble.com> I was using or in a rule for example rule "or example" when $t : (Transaction(org == "us") or Transaction(acc == "111")) then insert(new Record($t, 1)); end This would work but would create 2 Record objects which we sorted out later on but now for performance reasons I don't want the second match to be evaluated if the first one matches. I saw a post about named consequences and came up with something like: when $t : Transaction(org == "us") if ($t != null) break[t1] $t1 : Transaction(acc == "111") then insert(new Record($t1, 1)); then[t1] insert(new Record($t, 1)); end This compiles but the "or" doesn't work. This is probably due to my "break". Is there a way I can do what I need? Note that the performance implication of performing the or is not apparent in this example but it is there - I have simplified this example to make it easier to talk about (and to protect the innocent) -- View this message in context: http://drools.46999.n3.nabble.com/named-consequences-for-an-or-tp4027775.html Sent from the Drools: User forum mailing list archive at Nabble.com. From martin_kitzler at gmx.at Mon Jan 20 12:03:32 2014 From: martin_kitzler at gmx.at (Martin Kitzler) Date: Mon, 20 Jan 2014 18:03:32 +0100 (CET) Subject: [rules-users] Fusion CEP Design problem / Race Condition Message-ID: An HTML attachment was scrubbed... URL: http://lists.jboss.org/pipermail/rules-users/attachments/20140120/69cf19e5/attachment-0001.html From paul.s.mander at gmail.com Mon Jan 20 12:03:41 2014 From: paul.s.mander at gmail.com (pmander) Date: Mon, 20 Jan 2014 09:03:41 -0800 (PST) Subject: [rules-users] named consequences for an or... In-Reply-To: <1390235912924-4027775.post@n3.nabble.com> References: <1390235912924-4027775.post@n3.nabble.com> Message-ID: <1390237421846-4027777.post@n3.nabble.com> I could do this: when $t : Transaction((org == "us") || (expensive() == "111")) then insert(new Record($t, 1)); end If org is indeed equal to "us" is it guaranteed that expensive() doesn't get executed? -- View this message in context: http://drools.46999.n3.nabble.com/named-consequences-for-an-or-tp4027775p4027777.html Sent from the Drools: User forum mailing list archive at Nabble.com. From soumya.bose at plavaga.in Mon Jan 20 12:16:23 2014 From: soumya.bose at plavaga.in (Soumya.plavaga) Date: Mon, 20 Jan 2014 09:16:23 -0800 (PST) Subject: [rules-users] Issue with Kie-cli-config In-Reply-To: <1389940029165-4027737.post@n3.nabble.com> References: <1389940029165-4027737.post@n3.nabble.com> Message-ID: <1390238183478-4027779.post@n3.nabble.com> I am getting login failed while doing ssh localhost -p 8001. I have tried the following steps - 1. My drools-wb is running on my localhost. Drools internal ssh server is runing on port 8001. 2. I have generated the ssh public & private key using ssh-keygen -t rsa with empty pass phrase. 3. It created id_rsa & id_rsa.pub under $HOME/.ssh. 4. I have copied the content of id_rsa.pub into $HOME/.ssh/authorized_keys. 5. After that tried to access the ssh localhost -p 8001. I have now recieved a message that - Authenticated with partial success along with password prompt. 'debug 1: authentication that can continue: password, keyboard-interactive.' It looks like some where in the server side configuration of drool's ssh server it is setting 'publicKeyAuthentication no'. But did not figure out where I can enable that settings in drool's internal ssh server to pick my generated public key. I have also tried to setup a different ssh server on my localhost and can confirm it is correctly picking my public key for ssh authentication with the same set of ssh configuration I followed above. So my questions are - 1. Where does drools keep it's ssh server settings? 2. If I need to allow my ssh public key for authentication, which settings I need to change? -- View this message in context: http://drools.46999.n3.nabble.com/Issue-with-Kie-cli-config-tp4027737p4027779.html Sent from the Drools: User forum mailing list archive at Nabble.com. From srivastavamohit91 at gmail.com Mon Jan 20 13:30:59 2014 From: srivastavamohit91 at gmail.com (Mohit Srivastava) Date: Tue, 21 Jan 2014 00:00:59 +0530 Subject: [rules-users] Unable to figure out few feature for tomcat7 deployment Message-ID: Hi, I deployed drools workbench on tomcat. Guide only explains every thing on Wildfly or JBOSS EPA cluster But I am unable to figure out following things: - How to add new user? - How to change system properties? Thanks -- Mohit -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.jboss.org/pipermail/rules-users/attachments/20140121/ee6892dd/attachment.html From wolfgang.laun at gmail.com Mon Jan 20 15:46:55 2014 From: wolfgang.laun at gmail.com (Wolfgang Laun) Date: Mon, 20 Jan 2014 21:46:55 +0100 Subject: [rules-users] named consequences for an or... In-Reply-To: <1390237421846-4027777.post@n3.nabble.com> References: <1390235912924-4027775.post@n3.nabble.com> <1390237421846-4027777.post@n3.nabble.com> Message-ID: On 20/01/2014, pmander wrote: > I could do this: > > when > $t : Transaction((org == "us") || (expensive() == "111")) > then > insert(new Record($t, 1)); > end > Yes, that takes care of the unwanted duplication. > If org is indeed equal to "us" is it guaranteed that expensive() doesn't > get > executed? You can test this quite easily: add a print to expensive(). -W > > > > -- > View this message in context: > http://drools.46999.n3.nabble.com/named-consequences-for-an-or-tp4027775p4027777.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 Jan 20 16:02:29 2014 From: wolfgang.laun at gmail.com (Wolfgang Laun) Date: Mon, 20 Jan 2014 22:02:29 +0100 Subject: [rules-users] Fusion CEP Design problem / Race Condition In-Reply-To: References: Message-ID: The test (as you describe it) isn't really reproducing what will happen in reality. A burst of 5000 events (almost) at the same time followed by a lull of 5sec isn't quite like a scenario of 25-50k per minute. The Alarm tied to some eventValue is OK. But I'd try and accumulate the matching events "manually" into a list kept in the Alarm fact, and I'd even try and do the retraction by comparing the timestamp of the oldest with the timestamp of a new arrival. You can easily handle the situation when 30 is reached. (You may have to decide when this is retriggered, i.e., the count falls below 30 and then exceeds 30 once more.) A little consideration should also be given to the number of different eventValues. If these values are from a stable set, I don't see any problems. -W On 20/01/2014, Martin Kitzler wrote: > Hello everyone, > > i'm having some design problems with Drools Fusion and CEP. Maybe you can > guide me into the right direction. > (Drools 5.6) > > > > Problem: > I want to use Fusion CEP to handle a quite large amount of events (25-50 > thousand per minute as a start). The events don't have to live very long so > I plan to expire them very soon. > My rule is pretty simple: > There is only one event type (which has a string value field in it). > The rule should fire when there are X events with the same value Y in time > window Z. > The effect of the rule should be something like an Alarm which will be > extracted from outside the rule engine. > > > I found some similar examples (and also studies the documentation) but the > race condition (see down below) destroys all my plans. > > > > ATM it looks like this: > declare MyEvent > @role(event) > @expires( 30s ) > end > > declare Alarm > @role(event) > end > > > rule "RULE 1" > when > $e : MyEvent( ) from entry-point entryone > // not Alarm(eventValue == $e.getEventValue()) > Number( $count : intValue, $count > 30) from accumulate( $i : (MyEvent ( > eventValue == $e.getEventValue() ) over window:time(15s) from entry-point > entryone), count( $i ) ) > then > // insert( new Alarm($e.getEventValue(), $count)); > System.out.println("rule 1. value="+$e.getEventValue() +" count=" + > $count); > end > > -> When there are more than 30 "same" events (same value) in the last 15 > seconds. > MyEvent and Alarm are simple POJOs. Only fields, getter, setter, ... (value > is a String, count is a Integer) > > > > > The rule like this will fire for EVERY event -> when there are 30 similar > events then the log message is printed 30 times. > I'm unhappy with this situation because I actually only need the RHS > triggered only once for each value. Secondly I thought that the performance > would be better when firing only once. > So I introduced the Alarm object which is created after the rule triggers > the first time for the given value. (the two commented lines) > When the rule triggers the first time for value X, I create an Alarm object > for this value. Then the "not Alarm(...)" should prevent the execution. > This works for the first few thousand events. Then I receive a race > condition exception. Occurs usually between event 2000 - 10000. > Exception in thread "main" org.drools.RuntimeDroolsException: Unexpected > exception executing action > org.drools.reteoo.PropagationQueuingNode$PropagateAction at 61f0b700 > at > org.drools.common.AbstractWorkingMemory.executeQueuedActions(AbstractWorkingMemory.java:1047) > at org.drools.reteoo.WindowNode.assertObject(WindowNode.java:182) > 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.NamedEntryPoint.insert(NamedEntryPoint.java:327) > at org.drools.common.NamedEntryPoint.insert(NamedEntryPoint.java:130) > at org.drools.common.NamedEntryPoint.insert(NamedEntryPoint.java:58) > at ........myClass.main(...) > at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) > at > sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39) > at > sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25) > at java.lang.reflect.Method.invoke(Method.java:597) > at com.intellij.rt.execution.application.AppMain.main(AppMain.java:120) > Caused by: java.lang.NullPointerException > at > org.drools.reteoo.ReteooWorkingMemory$EvaluateResultConstraints.execute(ReteooWorkingMemory.java:593) > at > org.drools.common.PropagationContextImpl.evaluateActionQueue(PropagationContextImpl.java:364) > at > org.drools.reteoo.PropagationQueuingNode$AssertAction.execute(PropagationQueuingNode.java:449) > at > org.drools.reteoo.PropagationQueuingNode.propagateActions(PropagationQueuingNode.java:289) > at > org.drools.reteoo.PropagationQueuingNode$PropagateAction.execute(PropagationQueuingNode.java:611) > at > org.drools.common.AbstractWorkingMemory.executeQueuedActions(AbstractWorkingMemory.java:1045) > ... 16 more > > > I'm adding a few thousand events into the knowledge session. Then let the > thread sleep for a few seconds for drools to catch up. I tried this with > various combinations and always received the exception. > It works when trying for a few hundred events. (rule triggers as planed) > > > for the sake of completeness: > My Java class that starts the knowledge session and inserts the events: > KnowledgeBaseConfiguration config = > KnowledgeBaseFactory.newKnowledgeBaseConfiguration(); > config.setOption(EventProcessingOption.STREAM); > kbase = KnowledgeBaseFactory.newKnowledgeBase(config); > kbase.addKnowledgePackages(pkgs); > KnowledgeSessionConfiguration conf = > KnowledgeBaseFactory.newKnowledgeSessionConfiguration(); > ksession = kbase.newStatefulKnowledgeSession(conf, null); > entryPoint1 = ksession.getWorkingMemoryEntryPoint("entryone"); > new Thread() { > @Override > public void run() { > ksession.fireUntilHalt(); > } > }.start(); > > ... > reader = new BufferedReader(new FileReader("50k.log")); > String line = reader.readLine(); > long i = 0; > while (line != null) { > MyEvent entry = parser.parse(line.trim()); > if ( entry != null ) { > entryPoint1.insert(entry); > } > line = reader.readLine(); > if ( ++i % 5000 == 0 ) { > System.out.println("Inserter: " + i + " lines inserted. - " > + sdf.format(new Date())); > Thread.sleep(5000); > } > } > > > My main question: > Apart from the race condition problem, are there any other ways I could > solve my problem? > > E.g. > * Do you think that I shouldn't care about "not Alarm(eventValue == > $e.getEventValue())" and just live with the result that the program, that > uses the knowledge base, has to deal with lots of identical Alarm events? > (And has to perform the accumulate more often) > * Is there an easier way to count the events? > * Is Drools overburdened with the number of events? > * Is Drools Fusion/CEP not designed for my problem and other tools are more > useful instead? Which ones? > > I would appreciate any ideas. > > Sincerely, > Martin > > From clickthex at yahoo.com Mon Jan 20 16:18:37 2014 From: clickthex at yahoo.com (SrjTx) Date: Mon, 20 Jan 2014 13:18:37 -0800 (PST) Subject: [rules-users] DSL: Unable to Expand Error - Even things that shouldn't be expanded. In-Reply-To: <1390233714550-4027773.post@n3.nabble.com> References: <1390007054997-4027749.post@n3.nabble.com> <1390233561598-4027772.post@n3.nabble.com> <1390233714550-4027773.post@n3.nabble.com> Message-ID: <1390252717046-4027783.post@n3.nabble.com> Another data point. I set this up on another machine and it works. Something on my machine must be corrupted. What would you recommend I delete? .niogit? (My .war is already all new) -- View this message in context: http://drools.46999.n3.nabble.com/DSL-Unable-to-Expand-Error-Even-things-that-shouldn-t-be-expanded-tp4027749p4027783.html Sent from the Drools: User forum mailing list archive at Nabble.com. From mireynol at redhat.com Mon Jan 20 17:33:35 2014 From: mireynol at redhat.com (mreynolds) Date: Mon, 20 Jan 2014 14:33:35 -0800 (PST) Subject: [rules-users] Drools Support in IntelliJ Message-ID: <1390257215180-4027784.post@n3.nabble.com> I recently saw this video: http://www.screenr.com/w9q8 There are some pretty advanced features being displayed that makes the Eclipse editor pale in comparison. I assumed that there was a Drools plugin for this and Googlefu seems to indicate that this is the case. However, whenever I open a DRL file IntelliJ says it found a plugin that supports that extension, but when I browse the plugin repo it turns up nothing. Searching for JBoss revealed a JBPM pluginbut no mention of Drools. This isn't an environment issue either as this happens to me on both Linux and Windows. Does anyone know how to get this plugin? Is there another repository that needs to be added? -- View this message in context: http://drools.46999.n3.nabble.com/Drools-Support-in-IntelliJ-tp4027784.html Sent from the Drools: User forum mailing list archive at Nabble.com. From clickthex at yahoo.com Mon Jan 20 18:01:04 2014 From: clickthex at yahoo.com (SrjTx) Date: Mon, 20 Jan 2014 15:01:04 -0800 (PST) Subject: [rules-users] DSL: Unable to Expand Error - Even things that shouldn't be expanded. In-Reply-To: <1390252717046-4027783.post@n3.nabble.com> References: <1390007054997-4027749.post@n3.nabble.com> <1390233561598-4027772.post@n3.nabble.com> <1390233714550-4027773.post@n3.nabble.com> <1390252717046-4027783.post@n3.nabble.com> Message-ID: <1390258864008-4027785.post@n3.nabble.com> more data points with jboss not running: I deleted .niogit. I deleted all my .jar files from the kie and .m2 repos I deleted and re-installed the kie-wb.jar started jboss. .niogit came back started kiewb Tried to add a rule to mortgage demo project I still get the errors. I'm not sure what can still be different between this setup and the one I set up from scratch on the other machine that works. (In case it's lost in the chain, the install on this machine used to work) As a DSL/RDSLR file 1. | import java.lang.Number; 2. | import org.mortgages.Applicant; 3. | 4. | rule "sss" 5. | dialect "mvel" 6. | when 7. | Applicant( ) 8. | then 9. | end 16:56:36,143 ERROR [org.drools.compiler.kie.builder.impl.AbstractKieModule] (http-/127.0.0.1:8080-1) Unable to build KieBaseModel:defaultKieBase [7] Unable to expand: Applicant( ) -- View this message in context: http://drools.46999.n3.nabble.com/DSL-Unable-to-Expand-Error-Even-things-that-shouldn-t-be-expanded-tp4027749p4027785.html Sent from the Drools: User forum mailing list archive at Nabble.com. From clickthex at yahoo.com Mon Jan 20 18:14:59 2014 From: clickthex at yahoo.com (SrjTx) Date: Mon, 20 Jan 2014 15:14:59 -0800 (PST) Subject: [rules-users] DSL: Unable to Expand Error - Even things that shouldn't be expanded. In-Reply-To: <1390258864008-4027785.post@n3.nabble.com> References: <1390007054997-4027749.post@n3.nabble.com> <1390233561598-4027772.post@n3.nabble.com> <1390233714550-4027773.post@n3.nabble.com> <1390252717046-4027783.post@n3.nabble.com> <1390258864008-4027785.post@n3.nabble.com> Message-ID: <1390259699515-4027786.post@n3.nabble.com> Does any of this matter - I don't remember if it was there before the problem or not 17:13:17,704 WARN [org.jboss.as.server.deployment] (MSC service thread 1-8) JBAS015960: Class Path entry xercesImpl.jar in /opt/jboss-as-7.2.0.Final/standalone/deployments/kie-drools-wb.war/WEB-INF/lib/xalan-2.7.1.jar does not point to a valid jar for a Class-Path reference. 17:13:17,704 WARN [org.jboss.as.server.deployment] (MSC service thread 1-8) JBAS015960: Class Path entry xml-apis.jar in /opt/jboss-as-7.2.0.Final/standalone/deployments/kie-drools-wb.war/WEB-INF/lib/xalan-2.7.1.jar does not point to a valid jar for a Class-Path reference. 17:13:17,705 WARN [org.jboss.as.server.deployment] (MSC service thread 1-8) JBAS015960: Class Path entry serializer.jar in /opt/jboss-as-7.2.0.Final/standalone/deployments/kie-drools-wb.war/WEB-INF/lib/xalan-2.7.1.jar does not point to a valid jar for a Class-Path reference. 17:13:17,707 WARN [org.jboss.as.server.deployment] (MSC service thread 1-8) JBAS015960: Class Path entry jaxb-api.jar in /opt/jboss-as-7.2.0.Final/standalone/deployments/kie-drools-wb.war/WEB-INF/lib/jaxb-impl-2.2.5.jar does not point to a valid jar for a Class-Path reference. 17:13:17,708 WARN [org.jboss.as.server.deployment] (MSC service thread 1-8) JBAS015960: Class Path entry activation.jar in /opt/jboss-as-7.2.0.Final/standalone/deployments/kie-drools-wb.war/WEB-INF/lib/jaxb-impl-2.2.5.jar does not point to a valid jar for a Class-Path reference. 17:13:17,708 WARN [org.jboss.as.server.deployment] (MSC service thread 1-8) JBAS015960: Class Path entry jsr173_1.0_api.jar in /opt/jboss-as-7.2.0.Final/standalone/deployments/kie-drools-wb.war/WEB-INF/lib/jaxb-impl-2.2.5.jar does not point to a valid jar for a Class-Path reference. 17:13:17,708 WARN [org.jboss.as.server.deployment] (MSC service thread 1-8) JBAS015960: Class Path entry jaxb1-impl.jar in /opt/jboss-as-7.2.0.Final/standalone/deployments/kie-drools-wb.war/WEB-INF/lib/jaxb-impl-2.2.5.jar does not point to a valid jar for a Class-Path reference. 17:13:17,709 WARN [org.jboss.as.server.deployment] (MSC service thread 1-8) JBAS015960: Class Path entry xml-apis.jar in /opt/jboss-as-7.2.0.Final/standalone/deployments/kie-drools-wb.war/WEB-INF/lib/serializer-2.7.1.jar does not point to a valid jar for a Class-Path reference. 17:13:17,716 WARN [org.jboss.as.server.deployment] (MSC service thread 1-8) JBAS015960: Class Path entry jaxb-api.jar in /opt/jboss-as-7.2.0.Final/standalone/deployments/kie-drools-wb.war/WEB-INF/lib/jaxb-xjc-2.2.5.jar does not point to a valid jar for a Class-Path reference. 17:13:17,717 WARN [org.jboss.as.server.deployment] (MSC service thread 1-8) JBAS015960: Class Path entry jaxb-impl.jar in /opt/jboss-as-7.2.0.Final/standalone/deployments/kie-drools-wb.war/WEB-INF/lib/jaxb-xjc-2.2.5.jar does not point to a valid jar for a Class-Path reference. 17:13:17,717 WARN [org.jboss.as.server.deployment] (MSC service thread 1-8) JBAS015960: Class Path entry jsr173_1.0_api.jar in /opt/jboss-as-7.2.0.Final/standalone/deployments/kie-drools-wb.war/WEB-INF/lib/jaxb-xjc-2.2.5.jar does not point to a valid jar for a Class-Path reference. 17:13:17,717 WARN [org.jboss.as.server.deployment] (MSC service thread 1-8) JBAS015960: Class Path entry activation.jar in /opt/jboss-as-7.2.0.Final/standalone/deployments/kie-drools-wb.war/WEB-INF/lib/jaxb-xjc-2.2.5.jar does not point to a valid jar for a Class-Path reference. 17:13:17,717 WARN [org.jboss.as.server.deployment] (MSC service thread 1-8) JBAS015960: Class Path entry avalon-framework-4.2.0.jar in /opt/jboss-as-7.2.0.Final/standalone/deployments/kie-drools-wb.war/WEB-INF/lib/fop-0.95.jar does not point to a valid jar for a Class-Path reference. 17:13:17,718 WARN [org.jboss.as.server.deployment] (MSC service thread 1-8) JBAS015960: Class Path entry batik-all-1.7.jar in /opt/jboss-as-7.2.0.Final/standalone/deployments/kie-drools-wb.war/WEB-INF/lib/fop-0.95.jar does not point to a valid jar for a Class-Path reference. 17:13:17,718 WARN [org.jboss.as.server.deployment] (MSC service thread 1-8) JBAS015960: Class Path entry commons-io-1.3.1.jar in /opt/jboss-as-7.2.0.Final/standalone/deployments/kie-drools-wb.war/WEB-INF/lib/fop-0.95.jar does not point to a valid jar for a Class-Path reference. 17:13:17,718 WARN [org.jboss.as.server.deployment] (MSC service thread 1-8) JBAS015960: Class Path entry commons-logging-1.0.4.jar in /opt/jboss-as-7.2.0.Final/standalone/deployments/kie-drools-wb.war/WEB-INF/lib/fop-0.95.jar does not point to a valid jar for a Class-Path reference. 17:13:17,718 WARN [org.jboss.as.server.deployment] (MSC service thread 1-8) JBAS015960: Class Path entry serializer-2.7.0.jar in /opt/jboss-as-7.2.0.Final/standalone/deployments/kie-drools-wb.war/WEB-INF/lib/fop-0.95.jar does not point to a valid jar for a Class-Path reference. 17:13:17,718 WARN [org.jboss.as.server.deployment] (MSC service thread 1-8) JBAS015960: Class Path entry servlet-2.2.jar in /opt/jboss-as-7.2.0.Final/standalone/deployments/kie-drools-wb.war/WEB-INF/lib/fop-0.95.jar does not point to a valid jar for a Class-Path reference. 17:13:17,718 WARN [org.jboss.as.server.deployment] (MSC service thread 1-8) JBAS015960: Class Path entry xalan-2.7.0.jar in /opt/jboss-as-7.2.0.Final/standalone/deployments/kie-drools-wb.war/WEB-INF/lib/fop-0.95.jar does not point to a valid jar for a Class-Path reference. 17:13:17,719 WARN [org.jboss.as.server.deployment] (MSC service thread 1-8) JBAS015960: Class Path entry xercesImpl-2.7.1.jar in /opt/jboss-as-7.2.0.Final/standalone/deployments/kie-drools-wb.war/WEB-INF/lib/fop-0.95.jar does not point to a valid jar for a Class-Path reference. 17:13:17,719 WARN [org.jboss.as.server.deployment] (MSC service thread 1-8) JBAS015960: Class Path entry xml-apis-1.3.04.jar in /opt/jboss-as-7.2.0.Final/standalone/deployments/kie-drools-wb.war/WEB-INF/lib/fop-0.95.jar does not point to a valid jar for a Class-Path reference. 17:13:17,719 WARN [org.jboss.as.server.deployment] (MSC service thread 1-8) JBAS015960: Class Path entry xml-apis-ext-1.3.04.jar in /opt/jboss-as-7.2.0.Final/standalone/deployments/kie-drools-wb.war/WEB-INF/lib/fop-0.95.jar does not point to a valid jar for a Class-Path reference. 17:13:17,719 WARN [org.jboss.as.server.deployment] (MSC service thread 1-8) JBAS015960: Class Path entry xmlgraphics-commons-1.3.1.jar in /opt/jboss-as-7.2.0.Final/standalone/deployments/kie-drools-wb.war/WEB-INF/lib/fop-0.95.jar does not point to a valid jar for a Class-Path reference. 17:13:17,719 WARN [org.jboss.as.server.deployment] (MSC service thread 1-8) JBAS015960: Class Path entry fop-hyph.jar in /opt/jboss-as-7.2.0.Final/standalone/deployments/kie-drools-wb.war/WEB-INF/lib/fop-0.95.jar does not point to a valid jar for a Class-Path reference. 17:13:17,720 WARN [org.jboss.as.server.deployment] (MSC service thread 1-8) JBAS015960: Class Path entry jai_codec.jar in /opt/jboss-as-7.2.0.Final/standalone/deployments/kie-drools-wb.war/WEB-INF/lib/fop-0.95.jar does not point to a valid jar for a Class-Path reference. 17:13:17,720 WARN [org.jboss.as.server.deployment] (MSC service thread 1-8) JBAS015960: Class Path entry jai_core.jar in /opt/jboss-as-7.2.0.Final/standalone/deployments/kie-drools-wb.war/WEB-INF/lib/fop-0.95.jar does not point to a valid jar for a Class-Path reference. 17:13:17,720 WARN [org.jboss.as.server.deployment] (MSC service thread 1-8) JBAS015960: Class Path entry jai_imageio.jar in /opt/jboss-as-7.2.0.Final/standalone/deployments/kie-drools-wb.war/WEB-INF/lib/fop-0.95.jar does not point to a valid jar for a Class-Path reference. 17:13:17,720 WARN [org.jboss.as.server.deployment] (MSC service thread 1-8) JBAS015960: Class Path entry jimi-1.0.jar in /opt/jboss-as-7.2.0.Final/standalone/deployments/kie-drools-wb.war/WEB-INF/lib/fop-0.95.jar does not point to a valid jar for a Class-Path reference. 17:13:17,720 WARN [org.jboss.as.server.deployment] (MSC service thread 1-8) JBAS015960: Class Path entry xmlunit1.0.jar in /opt/jboss-as-7.2.0.Final/standalone/deployments/kie-drools-wb.war/WEB-INF/lib/fop-0.95.jar does not point to a valid jar for a Class-Path reference. 17:13:17,725 WARN [org.jboss.as.server.deployment] (MSC service thread 1-8) JBAS015960: Class Path entry xml-apis-1.0.b2.jar in /opt/jboss-as-7.2.0.Final/standalone/deployments/kie-drools-wb.war/WEB-INF/lib/jbpmmigration-0.11.jar does not point to a valid jar for a Class-Path reference. 17:13:17,725 WARN [org.jboss.as.server.deployment] (MSC service thread 1-8) JBAS015960: Class Path entry log4j-1.2.16.jar in /opt/jboss-as-7.2.0.Final/standalone/deployments/kie-drools-wb.war/WEB-INF/lib/jbpmmigration-0.11.jar does not point to a valid jar for a Class-Path reference. 17:13:17,832 WARN [org.jboss.as.server.deployment] (MSC service thread 1-3) JBAS015893: Encountered invalid class name 'org.xmlpull.mxp1.MXParser,org.xmlpull.mxp1_serializer.MXSerializer' for service type 'org.xmlpull.v1.XmlPullParserFactory' 17:13:17,835 WARN [org.jboss.as.server.deployment] (MSC service thread 1-3) JBAS015893: Encountered invalid class name 'org.xmlpull.mxp1.MXParser,org.xmlpull.mxp1_serializer.MXSerializer' for service type 'org.xmlpull.v1.XmlPullParserFactory' 17:13:17,840 WARN [org.jboss.as.server.deployment] (MSC service thread 1-3) JBAS015893: Encountered invalid class name 'org.springframework.context.ApplicationContext,org.springframework.beans.BeansException,org.springframework.beans.factory.xml.NamespaceHandlerResolver' for service type 'org.apache.cxf.bus.factory' 17:13:18,286 WARN [org.jboss.as.dependency.private] (MSC service thread 1-3) JBAS018567: Deployment "deployment.kie-drools-wb.war" is using a private module ("org.jboss.netty:main") which may be changed or removed in future versions without notice. 17:13:18,286 WARN [org.jboss.as.dependency.private] (MSC service thread 1-3) JBAS018567: Deployment "deployment.kie-drools-wb.war" is using a private module ("org.jboss.netty:main") which may be changed or removed in future versions without notice. -- View this message in context: http://drools.46999.n3.nabble.com/DSL-Unable-to-Expand-Error-Even-things-that-shouldn-t-be-expanded-tp4027749p4027786.html Sent from the Drools: User forum mailing list archive at Nabble.com. From anjana.ackroyd at gmail.com Mon Jan 20 19:45:57 2014 From: anjana.ackroyd at gmail.com (Anjana Ackroyd) Date: Mon, 20 Jan 2014 16:45:57 -0800 Subject: [rules-users] Drools Support in IntelliJ In-Reply-To: <1390257215180-4027784.post@n3.nabble.com> References: <1390257215180-4027784.post@n3.nabble.com> Message-ID: http://planet.jboss.org/post/add_jboss_drools_support_in_intellij_idea_leif_hanack I just imported that zip file from the above link into my intellij On Mon, Jan 20, 2014 at 2:33 PM, mreynolds wrote: > I recently saw this video: > > http://www.screenr.com/w9q8 > > There are some pretty advanced features being displayed that makes the > Eclipse editor pale in comparison. I assumed that there was a Drools plugin > for this and Googlefu seems to indicate that this is the case. However, > whenever I open a DRL file IntelliJ says it found a plugin that supports > that extension, but when I browse the plugin repo it turns up nothing. > Searching for JBoss revealed a JBPM pluginbut no mention of Drools. This > isn't an environment issue either as this happens to me on both Linux and > Windows. > > Does anyone know how to get this plugin? Is there another repository that > needs to be added? > > > > -- > View this message in context: > http://drools.46999.n3.nabble.com/Drools-Support-in-IntelliJ-tp4027784.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/20140120/390be217/attachment.html From ge0ffrey.spam at gmail.com Tue Jan 21 03:24:23 2014 From: ge0ffrey.spam at gmail.com (Geoffrey De Smet) Date: Tue, 21 Jan 2014 09:24:23 +0100 Subject: [rules-users] Drools Support in IntelliJ In-Reply-To: <1390257215180-4027784.post@n3.nabble.com> References: <1390257215180-4027784.post@n3.nabble.com> Message-ID: The intellij drools plugin is available in intellij ultimate only I think. Then you need to do menu File, menu item Other settings, menu item Configure plugins to enable it. And then when it's enabled, check settings -> File type to see if *.drl is assigned to the drools drl editor (and not some custom format you created yourself in an older intellij version). Works from intellij 12+ IIRC (but 13 is better ;-). On 20-01-14 23:33, mreynolds wrote: > I recently saw this video: > > http://www.screenr.com/w9q8 > > There are some pretty advanced features being displayed that makes the > Eclipse editor pale in comparison. I assumed that there was a Drools plugin > for this and Googlefu seems to indicate that this is the case. However, > whenever I open a DRL file IntelliJ says it found a plugin that supports > that extension, but when I browse the plugin repo it turns up nothing. > Searching for JBoss revealed a JBPM pluginbut no mention of Drools. This > isn't an environment issue either as this happens to me on both Linux and > Windows. > > Does anyone know how to get this plugin? Is there another repository that > needs to be added? > > > > -- > View this message in context: http://drools.46999.n3.nabble.com/Drools-Support-in-IntelliJ-tp4027784.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 paul.s.mander at gmail.com Tue Jan 21 08:20:32 2014 From: paul.s.mander at gmail.com (pmander) Date: Tue, 21 Jan 2014 05:20:32 -0800 (PST) Subject: [rules-users] named consequences for an or... In-Reply-To: References: <1390235912924-4027775.post@n3.nabble.com> <1390237421846-4027777.post@n3.nabble.com> Message-ID: <1390310432798-4027792.post@n3.nabble.com> laune wrote > On 20/01/2014, pmander < > paul.s.mander@ > > wrote: >> I could do this: >> >> when >> $t : Transaction((org == "us") || (expensive() == "111")) >> then >> insert(new Record($t, 1)); >> end >> > > Yes, that takes care of the unwanted duplication. > >> If org is indeed equal to "us" is it guaranteed that expensive() doesn't >> get >> executed? > > You can test this quite easily: add a print to expensive(). > > -W I quick related question regarding performance. I now have rule "3" when $t : Transaction( ( ( fieldFor("SALES_ORG")=="SO10167" && fieldFor("CHANNEL")=="A" && fieldFor("ONLINE_IND")=="N" && colMatch(rulesMap,3,2000,baseData,"PRODUCT",0) ) || ( fieldFor("CHANNEL")=="A" && fieldFor("ONLINE_IND")=="N" && fieldFor("ACCOUNT") in("A11329","A11330","A11331","A11332","A11333","A11334","A11335","A11336") && colMatch(rulesMap,3,2000,baseData,"PRODUCT",0) ) ) ) then do something end instead of rule "3" when $t : ( Transaction( fieldFor("CHANNEL")=="A", fieldFor("ONLINE_IND")=="N", fieldFor("SALES_ORG")=="SO10167", colMatch(rulesMap,3,1370,baseData,"PRODUCT",0)) or Transaction( fieldFor("CHANNEL")=="A", fieldFor("ONLINE_IND")=="N", fieldFor("ACCOUNT") in("A11329","A11330","A11331","A11332","A11333","A11334","A11335","A11336"), colMatch(rulesMap,3,2000,baseData,"PRODUCT",0) ) then do something end I would have thought that the first was slight better performance wise as the second produces twice as many matches which I need to filter out but putting 20,000 Transactions through this (2400 rules) takes 51 seconds for option 2 and 200 seconds for option 1. If I just have the first half of the rule: $t : ( Transaction( fieldFor("CHANNEL")=="A", fieldFor("ONLINE_IND")=="N", fieldFor("SALES_ORG")=="SO10167", colMatch(rulesMap,3,1370,baseData,"PRODUCT",0)) then do something end then the performance is 10 seconds. The extra time being taken up with all those other "or" mis-matches. -- View this message in context: http://drools.46999.n3.nabble.com/named-consequences-for-an-or-tp4027775p4027792.html Sent from the Drools: User forum mailing list archive at Nabble.com. From swapnilaute at gmail.com Tue Jan 21 08:45:10 2014 From: swapnilaute at gmail.com (neal) Date: Tue, 21 Jan 2014 05:45:10 -0800 (PST) Subject: [rules-users] How to create object model (parse into object) from mvel string in drl file? Message-ID: <1390311910527-4027793.post@n3.nabble.com> Below is the template to generate the rule statement (It is basic one). What I want to do is to read the string and convert into object. package @{package}; @foreach{importEntry : imports} import @{importEntry}; @end{} @foreach{importEntry : staticImports} import static @{importEntry}; @end{} rule "@{ruleName}" dialect "@{dialectName}" salience @{salienceValue} enabled @{enableValue} when @foreach{modelObject : modelObjects} @{modelObject.referenceName} : @{modelObject.referenceType} ( @foreach{ attribute : modelObject.attributes} @{attribute.name} @{attribute.operator} "@{attribute.value}" @end{} ) @end{} then // tempate data to set attribute end / code to run the tempate TemplateRegistry RULE_REGISTRY = new SimpleTemplateRegistry(); RULE_REGISTRY.addNamedTemplate( "rules", getCompiledTemplate(prepareSimpleTemplate())); System.out.println(TemplateRuntime.execute( RULE_REGISTRY.getNamedTemplate( "rules" ), getMap(),RULE_REGISTRY )); } // method to get tempate in string public static String prepareSimpleTemplate() { return StringUtils.readFileAsString(new InputStreamReader( MvelDemo.class.getResourceAsStream("RuleTemplate.mvel"))); } The rule statement generated is: package some; import rout.Vo; rule "Row_001" dialect "mvel" salience 10 enabled true when vo : Vo ( type_code == "S" ) then vo.a_name = "X" end How to generate object model from String generated from MVEL template? Is there any parser available to convert String into Object model in MVEL? -- View this message in context: http://drools.46999.n3.nabble.com/How-to-create-object-model-parse-into-object-from-mvel-string-in-drl-file-tp4027793.html Sent from the Drools: User forum mailing list archive at Nabble.com. From wolfgang.laun at gmail.com Tue Jan 21 09:21:41 2014 From: wolfgang.laun at gmail.com (Wolfgang Laun) Date: Tue, 21 Jan 2014 15:21:41 +0100 Subject: [rules-users] How to create object model (parse into object) from mvel string in drl file? In-Reply-To: <1390311910527-4027793.post@n3.nabble.com> References: <1390311910527-4027793.post@n3.nabble.com> Message-ID: What *exactly* do you expect as the output of this parser for *this* example? -W On 21/01/2014, neal wrote: > Below is the template to generate the rule statement (It is basic one). > What I want to do is to read the string and convert into object. > > package @{package}; > > @foreach{importEntry : imports} > import @{importEntry}; > @end{} > > @foreach{importEntry : staticImports} > import static @{importEntry}; > @end{} > > rule "@{ruleName}" > > dialect "@{dialectName}" > salience @{salienceValue} > enabled @{enableValue} > > when > @foreach{modelObject : modelObjects} @{modelObject.referenceName} : > @{modelObject.referenceType} ( @foreach{ attribute : > modelObject.attributes} > @{attribute.name} @{attribute.operator} "@{attribute.value}" @end{} ) > @end{} > > then > // tempate data to set attribute > end > > / code to run the tempate > TemplateRegistry RULE_REGISTRY = new SimpleTemplateRegistry(); > > RULE_REGISTRY.addNamedTemplate( "rules", > getCompiledTemplate(prepareSimpleTemplate())); > System.out.println(TemplateRuntime.execute( > RULE_REGISTRY.getNamedTemplate( "rules" ), > getMap(),RULE_REGISTRY )); > } > > > // method to get tempate in string > public static String prepareSimpleTemplate() { > return StringUtils.readFileAsString(new InputStreamReader( > MvelDemo.class.getResourceAsStream("RuleTemplate.mvel"))); > } > > The rule statement generated is: > > package some; > > import rout.Vo; > > rule "Row_001" > > dialect "mvel" > salience 10 > enabled true > > when > vo : Vo ( type_code == "S" ) > then > vo.a_name = "X" > end > > How to generate object model from String generated from MVEL template? Is > there any parser available to convert String into Object model in MVEL? > > > > -- > View this message in context: > http://drools.46999.n3.nabble.com/How-to-create-object-model-parse-into-object-from-mvel-string-in-drl-file-tp4027793.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 anijit.sarkar at gmail.com Tue Jan 21 09:34:25 2014 From: anijit.sarkar at gmail.com (anij) Date: Tue, 21 Jan 2014 06:34:25 -0800 (PST) Subject: [rules-users] Drools 5.4: DRL: How to use .equals() or .equalIgnoreCase() in rule condition? Message-ID: <1390314865853-4027795.post@n3.nabble.com> Hi, I'm using drools 5.4. This is my current rule looks like: / package resouces.rules import java.util.*; rule "King User_BNG" agenda-group "User Validation_BNG" salience 6 no-loop true when map : Map() eval((Integer) map.get("Age") >= 40 && map.get("Nationality").toString() == "Indian" ) then map.put("King User_BNG_Message","King User"); System.out.println("RULE : "+drools.getRule().getName() ); end/ -- View this message in context: http://drools.46999.n3.nabble.com/Drools-5-4-DRL-How-to-use-equals-or-equalIgnoreCase-in-rule-condition-tp4027795.html Sent from the Drools: User forum mailing list archive at Nabble.com. From wolfgang.laun at gmail.com Tue Jan 21 09:54:17 2014 From: wolfgang.laun at gmail.com (Wolfgang Laun) Date: Tue, 21 Jan 2014 15:54:17 +0100 Subject: [rules-users] Drools 5.4: DRL: How to use .equals() or .equalIgnoreCase() in rule condition? In-Reply-To: <1390314865853-4027795.post@n3.nabble.com> References: <1390314865853-4027795.post@n3.nabble.com> Message-ID: As in Java - it's as simple as that. If you have any problems, report them. -W On 21/01/2014, anij wrote: > Hi, > I'm using drools 5.4. > This is my current rule looks like: > / > package resouces.rules > > import java.util.*; > > rule "King User_BNG" > agenda-group "User Validation_BNG" > salience 6 > no-loop true > when > map : Map() > eval((Integer) map.get("Age") >= 40 && map.get("Nationality").toString() > == > "Indian" ) > then > map.put("King User_BNG_Message","King User"); > System.out.println("RULE : "+drools.getRule().getName() ); > end/ > > > > -- > View this message in context: > http://drools.46999.n3.nabble.com/Drools-5-4-DRL-How-to-use-equals-or-equalIgnoreCase-in-rule-condition-tp4027795.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 Tue Jan 21 10:00:39 2014 From: mproctor at codehaus.org (Mark Proctor) Date: Tue, 21 Jan 2014 15:00:39 +0000 Subject: [rules-users] Drools Support in IntelliJ In-Reply-To: References: <1390257215180-4027784.post@n3.nabble.com> Message-ID: <9B0A48FF-91B7-44BF-9C9E-F2369E423743@codehaus.org> There is also the issue that it doesn't work we'll with dialects, and gives syntax errors when there are none. This can only be fixed in the future by dropping diaclects and having a single language - it's too hard for tooling otherwise. Mark On Tuesday, 21 January 2014, Geoffrey De Smet wrote: The intellij drools plugin is available in intellij ultimate only I think. Then you need to do menu File, menu item Other settings, menu item Configure plugins to enable it. And then when it's enabled, check settings -> File type to see if *.drl is assigned to the drools drl editor (and not some custom format you created yourself in an older intellij version). Works from intellij 12+ IIRC (but 13 is better ;-). On 20-01-14 23:33, mreynolds wrote: > I recently saw this video: > > http://www.screenr.com/w9q8 > > There are some pretty advanced features being displayed that makes the > Eclipse editor pale in comparison. I assumed that there was a Drools plugin > for this and Googlefu seems to indicate that this is the case. However, > whenever I open a DRL file IntelliJ says it found a plugin that supports > that extension, but when I browse the plugin repo it turns up nothing. > Searching for JBoss revealed a JBPM pluginbut no mention of Drools. This > isn't an environment issue either as this happens to me on both Linux and > Windows. > > Does anyone know how to get this plugin? Is there another repository that > needs to be added? > > > > -- > View this message in context: http://drools.46999.n3.nabble.com/Drools-Support-in-IntelliJ-tp4027784.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/20140121/7a01909d/attachment-0001.html From mproctor at codehaus.org Tue Jan 21 10:14:24 2014 From: mproctor at codehaus.org (Mark Proctor) Date: Tue, 21 Jan 2014 15:14:24 +0000 Subject: [rules-users] stuck! Unknown accessor type: org.mvel2.optimizers.impl.refl.collection.ArrayCreator@690c2a7a In-Reply-To: <1390225308598-4027769.post@n3.nabble.com> References: <1353967076623-4020969.post@n3.nabble.com> <1354202737050-4021015.post@n3.nabble.com> <1389023861262-4027535.post@n3.nabble.com> <83C4A2C0-10C2-4D0F-B827-4A7B6FB43A96@codehaus.org> <1389097306048-4027560.post@n3.nabble.com> <1389711718331-4027682.post@n3.nabble.com> <1390225308598-4027769.post@n3.nabble.com> Message-ID: it?s on our TODO list. Mark On 20 Jan 2014, at 13:41, brachi wrote: > any news? > > > > -- > View this message in context: http://drools.46999.n3.nabble.com/stuck-Unknown-accessor-type-org-mvel2-optimizers-impl-refl-collection-ArrayCreator-690c2a7a-tp4020969p4027769.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 michael.anstis at gmail.com Tue Jan 21 14:05:18 2014 From: michael.anstis at gmail.com (Michael Anstis) Date: Tue, 21 Jan 2014 19:05:18 +0000 Subject: [rules-users] DSL: Unable to Expand Error - Even things that shouldn't be expanded. In-Reply-To: <1390252717046-4027783.post@n3.nabble.com> References: <1390007054997-4027749.post@n3.nabble.com> <1390233561598-4027772.post@n3.nabble.com> <1390233714550-4027773.post@n3.nabble.com> <1390252717046-4027783.post@n3.nabble.com> Message-ID: If you're using 6.0.1.Final WARs then you should not need to clear anything else (although there have been occasions when clearing the browser cache has been required - but since DSL expansion is server side this should not be necessary). Sent on the move On 20 Jan 2014 21:19, "SrjTx" wrote: > Another data point. > > I set this up on another machine and it works. > > Something on my machine must be corrupted. > > What would you recommend I delete? .niogit? > > (My .war is already all new) > > > > -- > View this message in context: > http://drools.46999.n3.nabble.com/DSL-Unable-to-Expand-Error-Even-things-that-shouldn-t-be-expanded-tp4027749p4027783.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/20140121/7de6ae04/attachment.html From rishi.choudhary at gmail.com Tue Jan 21 23:32:42 2014 From: rishi.choudhary at gmail.com (dotrc) Date: Tue, 21 Jan 2014 20:32:42 -0800 (PST) Subject: [rules-users] Drools 6.0.1: Pushing changes back to Workbench GIT using SSH Message-ID: <1390365162098-4027800.post@n3.nabble.com> I am using workbench for managing my rules maven projects within the embedded GIT repository. I am aware that using git:// protocol, I can clone an existing rule repository; I can do this successfully. For authoring rules, I want to use Eclipse (using EGit). I want to push my commits back to the GIT repo. I understand that I'll have to use ssh protocol instead of git for specifying the repo, something like this: ssh://{userName}@localhost:8001/{repoName} When we use a standard GIT repo like stash, it gives us an option to set our public key on the stash server, but I'm not able to find a way to do that with the embedded ssh server within workbench. Hence, I'm not able to authenticate myself and perform a push. We tried creating a private-public key pair using ssh-keygen and put that within c:\users\\.ssh and added the public key to 'authorized_keys(2) (though I know this may not be the right place) and then used the private key as the identity file with ssh client directly from cygwin, again to no avail. Any pointers will be really appreciated. Also, should the username be 'admin' or any other specific one for pushing? Will the existing Windows username work? Thanks, Rishi -- View this message in context: http://drools.46999.n3.nabble.com/Drools-6-0-1-Pushing-changes-back-to-Workbench-GIT-using-SSH-tp4027800.html Sent from the Drools: User forum mailing list archive at Nabble.com. From martin_kitzler at gmx.at Wed Jan 22 05:21:14 2014 From: martin_kitzler at gmx.at (Martin Kitzler) Date: Wed, 22 Jan 2014 11:21:14 +0100 (CET) Subject: [rules-users] Fusion CEP Design problem / Race Condition In-Reply-To: References: , Message-ID: An HTML attachment was scrubbed... URL: http://lists.jboss.org/pipermail/rules-users/attachments/20140122/74eb532c/attachment.html From jarkko.matinpoika at gmail.com Wed Jan 22 07:03:02 2014 From: jarkko.matinpoika at gmail.com (JarkkoMakela) Date: Wed, 22 Jan 2014 04:03:02 -0800 (PST) Subject: [rules-users] Drools 6.0.1: GC overhead limit exceeded, even though objects are retracted Message-ID: <1390392182640-4027803.post@n3.nabble.com> We have a program that validates large amount of data. When changing this program to use drools 6.0.1 instead of 5.5.0, this GC overhead limit exceeded problem occurred. Program reads one object to memory, then validate it and then retract it. This is repeated thousands of times. java version "1.7.0_45" java options: JVM_ARGS="$JVM_ARGS -Xmx256m" JVM_ARGS="$JVM_ARGS -XX:+HeapDumpOnOutOfMemoryError" JVM_ARGS="$JVM_ARGS -XX:HeapDumpPath=/home/heapdumps" I also tried different java garbage collection options: -XX:+UseSerialGC, -XX:+UseParallelGC and -XX:+UseConcMarkSweepGC, but it did not help. Heapdump says that: One instance of "org.drools.core.reteoo.JoinNodeLeftTuple" loaded by "sun.misc.Launcher$AppClassLoader @ 0xf03a13a8" occupies 203,920,080 (98.40%) bytes. This error is reproduced with rules below. These rules add one object to memory, then there is one rule that evaluates that object, and after that the object is retracted. This is repeated in continuous loop, but memory runs out soon. package com.cat declare ValidationError jee : String end declare cat2 name : String age : Integer end rule 'add cat2' dialect 'mvel' salience 3000 when not(exists(cat2())) then System.out.println("insert cat2"); $p = new cat2() insert ($p); modify ($p){ name = "mau" }; end rule 'this rule does not fire' dialect 'mvel' salience 4500 when $k1 : cat2($name : name != "miau") $k2 : cat2($nameofcat2 : name == "miau") then modify ($k1){ name = $nameofcat2 }; modify ($k2){ name = ("miau") }; System.out.println("this rule does not fire"); end rule 'retract cat2' dialect 'mvel' salience -50 when $c2 : cat2() then retract($c2); System.out.println("retract cat2"); end query "getValidationErrors" validationError: ValidationError() end -- View this message in context: http://drools.46999.n3.nabble.com/Drools-6-0-1-GC-overhead-limit-exceeded-even-though-objects-are-retracted-tp4027803.html Sent from the Drools: User forum mailing list archive at Nabble.com. From milenko.rubin at el2.de Wed Jan 22 08:56:57 2014 From: milenko.rubin at el2.de (milenko) Date: Wed, 22 Jan 2014 05:56:57 -0800 (PST) Subject: [rules-users] OptaPlanner vehicle routing problem with "multiple depots" Message-ID: <1390399017520-4027804.post@n3.nabble.com> Dear OptaPlanner users, I am working for a small company located in Munich and have a software problem, which I would like to solve with OptaPlnner. In our case, we have multiple technicians which are starting their work each day from different locations (e.g. their homes). Each technician has to serve customers at different locations. Each customers has his own time window for the visit (earliest arrival time, wait time, planned start time, planned end time, real end time, ?). On one hand the route of each technician should be optimized. Also the planned customer time window should be met optimally. There should not be many empty gaps in the time schedule of single technicians. For me this looks somehow similar like the vehicle routing problem with time window. In our case we have the following similarities: Customer= Customer Vehicle = Technician Time windows = Time windows + additional time windows Depot = We have many Depots (Starting locations) for each single technician I do not know how I could transfer the parameter capacity of the vehicle ? probably I don?t need it.. What I tried: I changed the parameters in the xml-input file to change the location position of the customers and also the different time windows. But I don?t succeed to add additional depots (customers)? Does somebody has an idea how to realize that? Best regards. Milenko -- View this message in context: http://drools.46999.n3.nabble.com/OptaPlanner-vehicle-routing-problem-with-multiple-depots-tp4027804.html Sent from the Drools: User forum mailing list archive at Nabble.com. From ge0ffrey.spam at gmail.com Wed Jan 22 09:08:11 2014 From: ge0ffrey.spam at gmail.com (Geoffrey De Smet) Date: Wed, 22 Jan 2014 15:08:11 +0100 Subject: [rules-users] OptaPlanner vehicle routing problem with "multiple depots" In-Reply-To: <1390399017520-4027804.post@n3.nabble.com> References: <1390399017520-4027804.post@n3.nabble.com> Message-ID: On 22-01-14 14:56, milenko wrote: > Dear OptaPlanner users, > > I am working for a small company located in Munich and have a software > problem, which I would like to solve with OptaPlnner. > > In our case, we have multiple technicians which are starting their work each > day from different locations (e.g. their homes). > Each technician has to serve customers at different locations. > Each customers has his own time window for the visit (earliest arrival time, > wait time, planned start time, planned end time, real end time, ?). > On one hand the route of each technician should be optimized. > Also the planned customer time window should be met optimally. > There should not be many empty gaps in the time schedule of single > technicians. > > For me this looks somehow similar like the vehicle routing problem with time > window. > > In our case we have the following similarities: > > Customer= Customer > Vehicle = Technician > Time windows = Time windows + additional time windows > Depot = We have many Depots (Starting locations) for each single technician > > I do not know how I could transfer the parameter capacity of the vehicle ? > probably I don?t need it.. > > What I tried: I changed the parameters in the xml-input file to change the > location position of the customers and also the different time windows. > But I don?t succeed to add additional depots (customers)? Does somebody has > an idea how to realize that? There are different input formats: data/vrp/import/ => 3 different academic vrp formats data/vrp/unsolved/ => xstream format data/vrp/solved/ => also xstream format It should be possible to add it in the xstream format, but it might be easier to add it in one of the academic vrp formats. See docs for a link to more info about the formats. Click the "import" button in the examples gui to use them. Note that: - it's not tested with multiple depot's yet. But the example was designed to work with it. (If it doesn't it's probably easy to fix) - the GUI hard codes that there's only 1 depot IIRC. Look for usages of VehicleRoutingSolution.getDepotList() hth > > Best regards. > Milenko > > > > -- > View this message in context: http://drools.46999.n3.nabble.com/OptaPlanner-vehicle-routing-problem-with-multiple-depots-tp4027804.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 soumya.bose at plavaga.in Wed Jan 22 09:54:18 2014 From: soumya.bose at plavaga.in (Soumya.plavaga) Date: Wed, 22 Jan 2014 06:54:18 -0800 (PST) Subject: [rules-users] Need a way to import multiple pre-compiled kie-bases at runt ime. Message-ID: <1390402458413-4027806.post@n3.nabble.com> We have two set of rules. Some of them are static. Some of them changes frequently. We need to find a way to keep the pre-compiled version of those rules into filesystem and import them into knowledge base at run time. So that over all performance to prepare the knowledge base will minimize. I am trying the following approach with drools 6.0.1 - Having two drools project say A & B. Both having 1 drl. I have stored the serialized version of kiebases for project A & B in two different fiile systems say a.txt & b.txt. Now at the run time I am De-serializing the kiebases from the above text files and getting two kieBase objects. Now if I need to include both the kiebases at run time to fire all the rules within project A & project B what I need to do? Any help will be really appreciated. -- View this message in context: http://drools.46999.n3.nabble.com/Need-a-way-to-import-multiple-pre-compiled-kie-bases-at-runt-ime-tp4027806.html Sent from the Drools: User forum mailing list archive at Nabble.com. From mireynol at redhat.com Wed Jan 22 10:43:51 2014 From: mireynol at redhat.com (Michael Reynolds) Date: Wed, 22 Jan 2014 10:43:51 -0500 (EST) Subject: [rules-users] Drools Support in IntelliJ In-Reply-To: <9B0A48FF-91B7-44BF-9C9E-F2369E423743@codehaus.org> References: <1390257215180-4027784.post@n3.nabble.com> <9B0A48FF-91B7-44BF-9C9E-F2369E423743@codehaus.org> Message-ID: <1024158091.4359887.1390405431742.JavaMail.root@redhat.com> That is upsetting to hear that you need the paid edition of IntelliJ for any Drools support. I can't justify shelling out the money for IDE for a single (albeit very attractive) feature. The weird thing is that I could really live without any of the code completion or deep rules analysis. My day to day would be a lot nicer just to have the configurable auto-formatting and auto organizing of import statements with keyboard shortcuts. Does anyone have any suggestions as to where I could look at hacking on the Eclipse plugin? Michael Reynolds Red Hat, Inc. mireynol at redhat.com ----- Original Message ----- From: "Mark Proctor" To: "Rules Users List" Sent: Tuesday, January 21, 2014 10:00:39 AM Subject: Re: [rules-users] Drools Support in IntelliJ There is also the issue that it doesn't work we'll with dialects, and gives syntax errors when there are none. This can only be fixed in the future by dropping diaclects and having a single language - it's too hard for tooling otherwise. Mark On Tuesday, 21 January 2014, Geoffrey De Smet < ge0ffrey.spam at gmail.com > wrote: The intellij drools plugin is available in intellij ultimate only I think. Then you need to do menu File, menu item Other settings, menu item Configure plugins to enable it. And then when it's enabled, check settings -> File type to see if *.drl is assigned to the drools drl editor (and not some custom format you created yourself in an older intellij version). Works from intellij 12+ IIRC (but 13 is better ;-). On 20-01-14 23:33, mreynolds wrote: > I recently saw this video: > > http://www.screenr.com/w9q8 > > There are some pretty advanced features being displayed that makes the > Eclipse editor pale in comparison. I assumed that there was a Drools plugin > for this and Googlefu seems to indicate that this is the case. However, > whenever I open a DRL file IntelliJ says it found a plugin that supports > that extension, but when I browse the plugin repo it turns up nothing. > Searching for JBoss revealed a JBPM pluginbut no mention of Drools. This > isn't an environment issue either as this happens to me on both Linux and > Windows. > > Does anyone know how to get this plugin? Is there another repository that > needs to be added? > > > > -- > View this message in context: http://drools.46999.n3.nabble.com/Drools-Support-in-IntelliJ-tp4027784.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 mproctor at codehaus.org Wed Jan 22 11:40:24 2014 From: mproctor at codehaus.org (Mark Proctor) Date: Wed, 22 Jan 2014 16:40:24 +0000 Subject: [rules-users] Drools Support in IntelliJ In-Reply-To: <1024158091.4359887.1390405431742.JavaMail.root@redhat.com> References: <1390257215180-4027784.post@n3.nabble.com> <9B0A48FF-91B7-44BF-9C9E-F2369E423743@codehaus.org> <1024158091.4359887.1390405431742.JavaMail.root@redhat.com> Message-ID: <00D6DD27-5A48-4C61-BB1F-9F09449C3653@codehaus.org> Eclipse tooling is found here: https://github.com/droolsjbpm/droolsjbpm-tools Pop onto irc if you have questions. http://www.jboss.org/drools/irc As mentioned ?dialects? makes tooling incredibly hard, to get right. This makes time we spend on eclipse editors, less productive. It?s why we want to move to a single language, without dialects, for DRL7. With an aim of making sure it?s much easier to do tooling. Mark On 22 Jan 2014, at 15:43, Michael Reynolds wrote: > That is upsetting to hear that you need the paid edition of IntelliJ for any Drools support. I can't justify shelling out the money for IDE for a single (albeit very attractive) feature. > > The weird thing is that I could really live without any of the code completion or deep rules analysis. My day to day would be a lot nicer just to have the configurable auto-formatting and auto organizing of import statements with keyboard shortcuts. Does anyone have any suggestions as to where I could look at hacking on the Eclipse plugin? > > Michael Reynolds > Red Hat, Inc. > mireynol at redhat.com > > ----- Original Message ----- > From: "Mark Proctor" > To: "Rules Users List" > Sent: Tuesday, January 21, 2014 10:00:39 AM > Subject: Re: [rules-users] Drools Support in IntelliJ > > There is also the issue that it doesn't work we'll with dialects, and gives syntax errors when there are none. This can only be fixed in the future by dropping diaclects and having a single language - it's too hard for tooling otherwise. > > Mark > > On Tuesday, 21 January 2014, Geoffrey De Smet < ge0ffrey.spam at gmail.com > wrote: > > > The intellij drools plugin is available in intellij ultimate only I think. > Then you need to do menu File, menu item Other settings, menu item > Configure plugins to enable it. > > And then when it's enabled, check settings -> File type to see if *.drl > is assigned to the drools drl editor (and not some custom format you > created yourself in an older intellij version). > > Works from intellij 12+ IIRC (but 13 is better ;-). > > On 20-01-14 23:33, mreynolds wrote: >> I recently saw this video: >> >> http://www.screenr.com/w9q8 >> >> There are some pretty advanced features being displayed that makes the >> Eclipse editor pale in comparison. I assumed that there was a Drools plugin >> for this and Googlefu seems to indicate that this is the case. However, >> whenever I open a DRL file IntelliJ says it found a plugin that supports >> that extension, but when I browse the plugin repo it turns up nothing. >> Searching for JBoss revealed a JBPM pluginbut no mention of Drools. This >> isn't an environment issue either as this happens to me on both Linux and >> Windows. >> >> Does anyone know how to get this plugin? Is there another repository that >> needs to be added? >> >> >> >> -- >> View this message in context: http://drools.46999.n3.nabble.com/Drools-Support-in-IntelliJ-tp4027784.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 > _______________________________________________ > rules-users mailing list > rules-users at lists.jboss.org > https://lists.jboss.org/mailman/listinfo/rules-users From mproctor at codehaus.org Wed Jan 22 11:42:56 2014 From: mproctor at codehaus.org (Mark Proctor) Date: Wed, 22 Jan 2014 16:42:56 +0000 Subject: [rules-users] Need a way to import multiple pre-compiled kie-bases at runt ime. In-Reply-To: <1390402458413-4027806.post@n3.nabble.com> References: <1390402458413-4027806.post@n3.nabble.com> Message-ID: <269CBE73-9022-495D-8151-70AB9271648B@codehaus.org> Why store serialised kiebases? Is it really that expensive to consume a kjar? As long as you build with drools maven plugin, it should have a lot of aspects pre-ompiled now. Our incremental ?diff? will take care of static and dynamic aspects, if you always build and deploy new jars, using the drools maven plugin. Mark On 22 Jan 2014, at 14:54, Soumya.plavaga wrote: > We have two set of rules. Some of them are static. Some of them changes > frequently. We need to find a way to keep the pre-compiled version of those > rules into filesystem and import them into knowledge base at run time. So > that over all performance to prepare the knowledge base will minimize. > > I am trying the following approach with drools 6.0.1 - > > Having two drools project say A & B. Both having 1 drl. I have stored the > serialized version of kiebases for project A & B in two different fiile > systems say a.txt & b.txt. Now at the run time I am De-serializing the > kiebases from the above text files and getting two kieBase objects. Now if I > need to include both the kiebases at run time to fire all the rules within > project A & project B what I need to do? Any help will be really > appreciated. > > > > > > -- > View this message in context: http://drools.46999.n3.nabble.com/Need-a-way-to-import-multiple-pre-compiled-kie-bases-at-runt-ime-tp4027806.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 esteban.aliverti at gmail.com Wed Jan 22 15:22:12 2014 From: esteban.aliverti at gmail.com (Esteban Aliverti) Date: Wed, 22 Jan 2014 18:22:12 -0200 Subject: [rules-users] Buggy query behavior in drools 5.6 and 6.1-SNAPSHOT ?? Message-ID: Hi guys, I was writing some rules using backward chaining and found a strange behavior. I managed to isolate the error in the test project I'm attaching. In the project I have 2 classes: Parent and Child Parent: * String id * String attribute1 * String attribute2 * List children Child: * String parentId; * String name; * String value; In the test I'm creating 1 Parent object with just 1 child and then inserting the Parent object into a drools session: Parent p1 = new Parent(); p1.setId("1"); p1.setAttribute1("a1"); p1.setAttribute2(null); Child c1p1 = new Child(); c1p1.setName("n1"); c1p1.setParentId(p1.getId()); c1p1.setValue("v1.1"); p1.addChild(c1p1); kSession.insert(p1); kSession.fireAllRules(); So far so good. The rules I have in my session are the following: declare Parent @propertyReactive end query getChildWithName(String $parentId, String $name, Child $child) $child:= Child(parentId == $parentId, name == $name) end rule "Insert Children" when $p: Parent() @watch(!*) $c: Child() from $p.children then System.out.println("Inserting child "+$c); insert($c); end rule "Rule A" when $p: Parent(attribute2 != null) ?getChildWithName($p.attribute2, "n1", $child;) then System.out.println("FOUND: "+$child+". The attribute 'parentId' of this object must have the value '"+$p.getAttribute2()+"'. Does it? "+$child.getParentId()+" == "+$p.getAttribute2()+" ??"); globalList.add($child); end rule "Copy Attribute1 into Attribute2" when $p: Parent(attribute1 != null, attribute2 == null) then modify($p){ setAttribute2($p.getAttribute1()) } end The important part here is 'Rule A' and 'Copy Attribute1 into Attribute2'. The latter copies the value of attribute1 to attribute2 for any Parent object present in the session. (Note that the parent I'm inserting has attribute2 = null). 'Rule A' is then using a query to get a Child object that has a parent with id = $p.attribute2 (where $p is a previously matched Parent). Given that I only have 1 Parent in my session and that its id is '1' I don't expect 'Rule A' to be activated/executed. When I modify parent.attribute2 in 'Copy Attribute1 into Attribute2' I'm setting its value to 'a1'. 'Rule A' (via the query) should then look for a Child with parentid = 'a1' and It shouldn't find anything. Funny thing is that 'Rule A' activates and fires. The child object that is 'returned' by the query has a parentId of '1' so I don't know how this behavior is possible. If you take a look at the System.out output you will see that the activation makes no sense at all. Am I doing something wrong in my project? Is this a bug? Is this the expected behavior? Regards, XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX Esteban Aliverti - Blog @ http://ilesteban.wordpress.com -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.jboss.org/pipermail/rules-users/attachments/20140122/9d29a335/attachment.html -------------- next part -------------- A non-text attachment was scrubbed... Name: drools-query-test.zip Type: application/zip Size: 6786 bytes Desc: not available Url : http://lists.jboss.org/pipermail/rules-users/attachments/20140122/9d29a335/attachment.zip From dsotty at gmail.com Wed Jan 22 16:46:28 2014 From: dsotty at gmail.com (Davide Sottara) Date: Wed, 22 Jan 2014 15:46:28 -0600 Subject: [rules-users] Buggy query behavior in drools 5.6 and 6.1-SNAPSHOT ?? In-Reply-To: References: Message-ID: <52E03C34.8010002@gmail.com> I'd say it's a bug... maybe indexing is involved? Replacing ruleA's LHS with $p: Parent( $a2 : attribute2 != null) ?getChildWithName($a2 , "n1", $child;) makes it work as expected. I will investigate further. Davide On 01/22/2014 02:22 PM, Esteban Aliverti wrote: > Hi guys, > I was writing some rules using backward chaining and found a strange > behavior. > I managed to isolate the error in the test project I'm attaching. > > In the project I have 2 classes: Parent and Child > > Parent: > * String id > * String attribute1 > * String attribute2 > * List children > > Child: > * String parentId; > * String name; > * String value; > > > In the test I'm creating 1 Parent object with just 1 child and then > inserting the Parent object into a drools session: > > Parent p1 = new Parent(); > p1.setId("1"); > p1.setAttribute1("a1"); > p1.setAttribute2(null); > > Child c1p1 = new Child(); > c1p1.setName("n1"); > c1p1.setParentId(p1.getId()); > c1p1.setValue("v1.1"); > p1.addChild(c1p1); > > kSession.insert(p1); > kSession.fireAllRules(); > > > So far so good. > The rules I have in my session are the following: > > declare Parent > @propertyReactive > end > > query getChildWithName(String $parentId, String $name, Child $child) > $child:= Child(parentId == $parentId, name == $name) > end > > rule "Insert Children" > when > $p: Parent() @watch(!*) > $c: Child() from $p.children > then > System.out.println("Inserting child "+$c); > insert($c); > end > > rule "Rule A" > when > $p: Parent(attribute2 != null) > ?getChildWithName($p.attribute2, "n1", $child;) > then > System.out.println("FOUND: "+$child+". The attribute 'parentId' of > this object must have the value '"+$p.getAttribute2()+"'. Does it? > "+$child.getParentId()+" == "+$p.getAttribute2()+" ??"); > globalList.add($child); > end > > > rule "Copy Attribute1 into Attribute2" > when > $p: Parent(attribute1 != null, attribute2 == null) > then > modify($p){ > setAttribute2($p.getAttribute1()) > } > end > > The important part here is 'Rule A' and 'Copy Attribute1 into > Attribute2'. The latter copies the value of attribute1 to attribute2 > for any Parent object present in the session. (Note that the parent > I'm inserting has attribute2 = null). 'Rule A' is then using a query > to get a Child object that has a parent with id = $p.attribute2 (where > $p is a previously matched Parent). > Given that I only have 1 Parent in my session and that its id is '1' I > don't expect 'Rule A' to be activated/executed. When I modify > parent.attribute2 in 'Copy Attribute1 into Attribute2' I'm setting its > value to 'a1'. 'Rule A' (via the query) should then look for a Child > with parentid = 'a1' and It shouldn't find anything. > Funny thing is that 'Rule A' activates and fires. The child object > that is 'returned' by the query has a parentId of '1' so I don't know > how this behavior is possible. If you take a look at the System.out > output you will see that the activation makes no sense at all. > > Am I doing something wrong in my project? Is this a bug? Is this the > expected behavior? > > Regards, > > > > XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX > > Esteban Aliverti > - Blog @ http://ilesteban.wordpress.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/20140122/b67a06a1/attachment-0001.html From dsotty at gmail.com Wed Jan 22 16:57:56 2014 From: dsotty at gmail.com (Davide Sottara) Date: Wed, 22 Jan 2014 15:57:56 -0600 Subject: [rules-users] Buggy query behavior in drools 5.6 and 6.1-SNAPSHOT ?? In-Reply-To: References: Message-ID: <52E03EE4.6030502@gmail.com> Indeed, the use case can be simplified further: package org.drools.test.bc; declare Parent attribute2 : String end declare Child parentId : String end query getChildWithName( String $parentId, Child $child ) $child:= Child( parentId == $parentId ) end rule "Insert Children" when then Parent p1 = new Parent( "a1" ); Child c1p1 = new Child( "1" ); insert( c1p1 ); insert( p1 ); end rule "Rule A" when $p: Parent( $a2 : attribute2 ) ?getChildWithName( $p.attribute2, $child;) then System.out.println("FOUND: "+ $child + " >> " + $child.getParentId() + " == " + $p.getAttribute2() + " ??" ); end It has nothing to do with nested objects, @PR or modifications. It seems that the culprit is the chained property accessor. Davide On 01/22/2014 02:22 PM, Esteban Aliverti wrote: > Hi guys, > I was writing some rules using backward chaining and found a strange > behavior. > I managed to isolate the error in the test project I'm attaching. > > In the project I have 2 classes: Parent and Child > > Parent: > * String id > * String attribute1 > * String attribute2 > * List children > > Child: > * String parentId; > * String name; > * String value; > > > In the test I'm creating 1 Parent object with just 1 child and then > inserting the Parent object into a drools session: > > Parent p1 = new Parent(); > p1.setId("1"); > p1.setAttribute1("a1"); > p1.setAttribute2(null); > > Child c1p1 = new Child(); > c1p1.setName("n1"); > c1p1.setParentId(p1.getId()); > c1p1.setValue("v1.1"); > p1.addChild(c1p1); > > kSession.insert(p1); > kSession.fireAllRules(); > > > So far so good. > The rules I have in my session are the following: > > declare Parent > @propertyReactive > end > > query getChildWithName(String $parentId, String $name, Child $child) > $child:= Child(parentId == $parentId, name == $name) > end > > rule "Insert Children" > when > $p: Parent() @watch(!*) > $c: Child() from $p.children > then > System.out.println("Inserting child "+$c); > insert($c); > end > > rule "Rule A" > when > $p: Parent(attribute2 != null) > ?getChildWithName($p.attribute2, "n1", $child;) > then > System.out.println("FOUND: "+$child+". The attribute 'parentId' of > this object must have the value '"+$p.getAttribute2()+"'. Does it? > "+$child.getParentId()+" == "+$p.getAttribute2()+" ??"); > globalList.add($child); > end > > > rule "Copy Attribute1 into Attribute2" > when > $p: Parent(attribute1 != null, attribute2 == null) > then > modify($p){ > setAttribute2($p.getAttribute1()) > } > end > > The important part here is 'Rule A' and 'Copy Attribute1 into > Attribute2'. The latter copies the value of attribute1 to attribute2 > for any Parent object present in the session. (Note that the parent > I'm inserting has attribute2 = null). 'Rule A' is then using a query > to get a Child object that has a parent with id = $p.attribute2 (where > $p is a previously matched Parent). > Given that I only have 1 Parent in my session and that its id is '1' I > don't expect 'Rule A' to be activated/executed. When I modify > parent.attribute2 in 'Copy Attribute1 into Attribute2' I'm setting its > value to 'a1'. 'Rule A' (via the query) should then look for a Child > with parentid = 'a1' and It shouldn't find anything. > Funny thing is that 'Rule A' activates and fires. The child object > that is 'returned' by the query has a parentId of '1' so I don't know > how this behavior is possible. If you take a look at the System.out > output you will see that the activation makes no sense at all. > > Am I doing something wrong in my project? Is this a bug? Is this the > expected behavior? > > Regards, > > > > XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX > > Esteban Aliverti > - Blog @ http://ilesteban.wordpress.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/20140122/533cff8b/attachment.html From esteban.aliverti at gmail.com Wed Jan 22 19:00:56 2014 From: esteban.aliverti at gmail.com (Esteban Aliverti) Date: Wed, 22 Jan 2014 22:00:56 -0200 Subject: [rules-users] Buggy query behavior in drools 5.6 and 6.1-SNAPSHOT ?? In-Reply-To: <52E03EE4.6030502@gmail.com> References: <52E03EE4.6030502@gmail.com> Message-ID: Good catch Davide. I can confirm that not using nested accessors the query works as expected. Regards, XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX Esteban Aliverti - Blog @ http://ilesteban.wordpress.com On Wed, Jan 22, 2014 at 6:57 PM, Davide Sottara wrote: > Indeed, the use case can be simplified further: > > package org.drools.test.bc; > > declare Parent > attribute2 : String > end > > declare Child > parentId : String > end > > query getChildWithName( String $parentId, Child $child ) > $child:= Child( parentId == $parentId ) > > end > > rule "Insert Children" > when > then > Parent p1 = new Parent( "a1" ); > Child c1p1 = new Child( "1" ); > > insert( c1p1 ); > insert( p1 ); > > end > > rule "Rule A" > when > $p: Parent( $a2 : attribute2 ) > ?getChildWithName( $p.attribute2, $child;) > then > System.out.println("FOUND: "+ $child + " >> " + $child.getParentId() + > " == " + $p.getAttribute2() + " ??" ); > end > > It has nothing to do with nested objects, @PR or modifications. > It seems that the culprit is the chained property accessor. > > > Davide > > > > On 01/22/2014 02:22 PM, Esteban Aliverti wrote: > > Hi guys, > I was writing some rules using backward chaining and found a strange > behavior. > I managed to isolate the error in the test project I'm attaching. > > In the project I have 2 classes: Parent and Child > > Parent: > * String id > * String attribute1 > * String attribute2 > * List children > > Child: > * String parentId; > * String name; > * String value; > > > In the test I'm creating 1 Parent object with just 1 child and then > inserting the Parent object into a drools session: > > Parent p1 = new Parent(); > p1.setId("1"); > p1.setAttribute1("a1"); > p1.setAttribute2(null); > > Child c1p1 = new Child(); > c1p1.setName("n1"); > c1p1.setParentId(p1.getId()); > c1p1.setValue("v1.1"); > p1.addChild(c1p1); > > kSession.insert(p1); > kSession.fireAllRules(); > > > So far so good. > The rules I have in my session are the following: > > declare Parent > @propertyReactive > end > > query getChildWithName(String $parentId, String $name, Child $child) > $child:= Child(parentId == $parentId, name == $name) > end > > rule "Insert Children" > when > $p: Parent() @watch(!*) > $c: Child() from $p.children > then > System.out.println("Inserting child "+$c); > insert($c); > end > > rule "Rule A" > when > $p: Parent(attribute2 != null) > ?getChildWithName($p.attribute2, "n1", $child;) > then > System.out.println("FOUND: "+$child+". The attribute 'parentId' of > this object must have the value '"+$p.getAttribute2()+"'. Does it? > "+$child.getParentId()+" == "+$p.getAttribute2()+" ??"); > globalList.add($child); > end > > > rule "Copy Attribute1 into Attribute2" > when > $p: Parent(attribute1 != null, attribute2 == null) > then > modify($p){ > setAttribute2($p.getAttribute1()) > } > end > > The important part here is 'Rule A' and 'Copy Attribute1 into > Attribute2'. The latter copies the value of attribute1 to attribute2 for > any Parent object present in the session. (Note that the parent I'm > inserting has attribute2 = null). 'Rule A' is then using a query to get a > Child object that has a parent with id = $p.attribute2 (where $p is a > previously matched Parent). > Given that I only have 1 Parent in my session and that its id is '1' I > don't expect 'Rule A' to be activated/executed. When I modify > parent.attribute2 in 'Copy Attribute1 into Attribute2' I'm setting its > value to 'a1'. 'Rule A' (via the query) should then look for a Child with > parentid = 'a1' and It shouldn't find anything. > Funny thing is that 'Rule A' activates and fires. The child object that is > 'returned' by the query has a parentId of '1' so I don't know how this > behavior is possible. If you take a look at the System.out output you will > see that the activation makes no sense at all. > > Am I doing something wrong in my project? Is this a bug? Is this the > expected behavior? > > Regards, > > > > XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX > > Esteban Aliverti > - Blog @ http://ilesteban.wordpress.com > > > _______________________________________________ > 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/20140122/f9f62e48/attachment-0001.html From dsotty at gmail.com Wed Jan 22 22:18:19 2014 From: dsotty at gmail.com (Davide Sottara) Date: Wed, 22 Jan 2014 21:18:19 -0600 Subject: [rules-users] Buggy query behavior in drools 5.6 and 6.1-SNAPSHOT ?? In-Reply-To: References: <52E03EE4.6030502@gmail.com> Message-ID: <52E089FB.4060606@gmail.com> Esteban, I have created a ticket for this with an explanation of the weird behavior. https://issues.jboss.org/browse/DROOLS-414 The problem is in QueryElementBuilder line#343. It's an easy fix but I don't have time for it right now, could someone look into it? Thanks Davide On 01/22/2014 06:00 PM, Esteban Aliverti wrote: > Good catch Davide. I can confirm that not using nested accessors the > query works as expected. > > Regards, > > > XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX > > Esteban Aliverti > - Blog @ http://ilesteban.wordpress.com > > > On Wed, Jan 22, 2014 at 6:57 PM, Davide Sottara > wrote: > > Indeed, the use case can be simplified further: > > package org.drools.test.bc; > > declare Parent > attribute2 : String > end > > declare Child > parentId : String > end > > query getChildWithName( String $parentId, Child $child ) > $child:= Child( parentId == $parentId ) > > end > > rule "Insert Children" > when > then > Parent p1 = new Parent( "a1" ); > Child c1p1 = new Child( "1" ); > > insert( c1p1 ); > insert( p1 ); > > end > > rule "Rule A" > when > $p: Parent( $a2 : attribute2 ) > ?getChildWithName( $p.attribute2, $child;) > then > System.out.println("FOUND: "+ $child + " >> " + > $child.getParentId() + " == " + $p.getAttribute2() + " ??" ); > end > > It has nothing to do with nested objects, @PR or modifications. > It seems that the culprit is the chained property accessor. > > > Davide > > > > On 01/22/2014 02:22 PM, Esteban Aliverti wrote: >> Hi guys, >> I was writing some rules using backward chaining and found a >> strange behavior. >> I managed to isolate the error in the test project I'm attaching. >> >> In the project I have 2 classes: Parent and Child >> >> Parent: >> * String id >> * String attribute1 >> * String attribute2 >> * List children >> >> Child: >> * String parentId; >> * String name; >> * String value; >> >> >> In the test I'm creating 1 Parent object with just 1 child and >> then inserting the Parent object into a drools session: >> >> Parent p1 = new Parent(); >> p1.setId("1"); >> p1.setAttribute1("a1"); >> p1.setAttribute2(null); >> >> Child c1p1 = new Child(); >> c1p1.setName("n1"); >> c1p1.setParentId(p1.getId()); >> c1p1.setValue("v1.1"); >> p1.addChild(c1p1); >> >> kSession.insert(p1); >> kSession.fireAllRules(); >> >> >> So far so good. >> The rules I have in my session are the following: >> >> declare Parent >> @propertyReactive >> end >> >> query getChildWithName(String $parentId, String $name, Child $child) >> $child:= Child(parentId == $parentId, name == $name) >> end >> >> rule "Insert Children" >> when >> $p: Parent() @watch(!*) >> $c: Child() from $p.children >> then >> System.out.println("Inserting child "+$c); >> insert($c); >> end >> >> rule "Rule A" >> when >> $p: Parent(attribute2 != null) >> ?getChildWithName($p.attribute2, "n1", $child;) >> then >> System.out.println("FOUND: "+$child+". The attribute >> 'parentId' of this object must have the value >> '"+$p.getAttribute2()+"'. Does it? "+$child.getParentId()+" == >> "+$p.getAttribute2()+" ??"); >> globalList.add($child); >> end >> >> >> rule "Copy Attribute1 into Attribute2" >> when >> $p: Parent(attribute1 != null, attribute2 == null) >> then >> modify($p){ >> setAttribute2($p.getAttribute1()) >> } >> end >> >> The important part here is 'Rule A' and 'Copy Attribute1 into >> Attribute2'. The latter copies the value of attribute1 to >> attribute2 for any Parent object present in the session. (Note >> that the parent I'm inserting has attribute2 = null). 'Rule A' is >> then using a query to get a Child object that has a parent with >> id = $p.attribute2 (where $p is a previously matched Parent). >> Given that I only have 1 Parent in my session and that its id is >> '1' I don't expect 'Rule A' to be activated/executed. When I >> modify parent.attribute2 in 'Copy Attribute1 into Attribute2' I'm >> setting its value to 'a1'. 'Rule A' (via the query) should then >> look for a Child with parentid = 'a1' and It shouldn't find >> anything. >> Funny thing is that 'Rule A' activates and fires. The child >> object that is 'returned' by the query has a parentId of '1' so I >> don't know how this behavior is possible. If you take a look at >> the System.out output you will see that the activation makes no >> sense at all. >> >> Am I doing something wrong in my project? Is this a bug? Is this >> the expected behavior? >> >> Regards, >> >> >> >> XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX >> >> Esteban Aliverti >> - Blog @ http://ilesteban.wordpress.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 -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.jboss.org/pipermail/rules-users/attachments/20140122/722767b5/attachment.html From mario.fusco at gmail.com Thu Jan 23 04:19:46 2014 From: mario.fusco at gmail.com (Mario Fusco) Date: Thu, 23 Jan 2014 01:19:46 -0800 (PST) Subject: [rules-users] stuck! Unknown accessor type: org.mvel2.optimizers.impl.refl.collection.ArrayCreator@690c2a7a In-Reply-To: <1390225308598-4027769.post@n3.nabble.com> References: <1353967076623-4020969.post@n3.nabble.com> <1354202737050-4021015.post@n3.nabble.com> <1389023861262-4027535.post@n3.nabble.com> <83C4A2C0-10C2-4D0F-B827-4A7B6FB43A96@codehaus.org> <1389097306048-4027560.post@n3.nabble.com> <1389711718331-4027682.post@n3.nabble.com> <1390225308598-4027769.post@n3.nabble.com> Message-ID: <1390468786042-4027817.post@n3.nabble.com> A quick premise: in Drools 5.5 we introduced a mechanism to compile constraints, i.e. something that translates constraints in bytecode in order to evaluate them in compiled mode, instead of being interpreted by mvel, and then make this evaluation faster. That warning means that for your specific constraint this compilation process fails. When this happens drools keeps working correctly because the compiled constraint is just discarded and the constraint is evaluated in interpreted mode as usual. As I said the only drawback is that this interpreted evaluation is a bit slower than the compiled one. I reproduced this problem and found that indeed drools is at the moment unable to compile a constraint containing an array creation. I am working to fix this issue just now. Note anyway that this problem only (marginally) affects performances and not correctness. However, if you want to workaround this problem, my suggestion is to replace, where possible, the array with a vararg. For instance you could modify the signature of that Operators.contains as it follows boolean contains(String s, String... array) { ... } This will also have a nice effect on your drl so you could now rewrite the constraint just as: Operators.contains(LoanProgramName, "2008 Temporary Loan Limits") and I just checked that doing so will also allow drools to correctly compile it. I hope this helps, Mario -- View this message in context: http://drools.46999.n3.nabble.com/stuck-Unknown-accessor-type-org-mvel2-optimizers-impl-refl-collection-ArrayCreator-690c2a7a-tp4020969p4027817.html Sent from the Drools: User forum mailing list archive at Nabble.com. From mario.fusco at gmail.com Thu Jan 23 05:50:31 2014 From: mario.fusco at gmail.com (Mario Fusco) Date: Thu, 23 Jan 2014 02:50:31 -0800 (PST) Subject: [rules-users] stuck! Unknown accessor type: org.mvel2.optimizers.impl.refl.collection.ArrayCreator@690c2a7a In-Reply-To: References: <1353967076623-4020969.post@n3.nabble.com> <1354202737050-4021015.post@n3.nabble.com> <1389023861262-4027535.post@n3.nabble.com> <83C4A2C0-10C2-4D0F-B827-4A7B6FB43A96@codehaus.org> <1389097306048-4027560.post@n3.nabble.com> <1389711718331-4027682.post@n3.nabble.com> <1390225308598-4027769.post@n3.nabble.com> Message-ID: <1390474231247-4027818.post@n3.nabble.com> I just fixed this issue on master with this commit: https://github.com/droolsjbpm/drools/commit/fb7c8858f Thank you for having reported it, Mario -- View this message in context: http://drools.46999.n3.nabble.com/stuck-Unknown-accessor-type-org-mvel2-optimizers-impl-refl-collection-ArrayCreator-690c2a7a-tp4020969p4027818.html Sent from the Drools: User forum mailing list archive at Nabble.com. From brachi.w at sapiens.com Thu Jan 23 06:46:22 2014 From: brachi.w at sapiens.com (brachi) Date: Thu, 23 Jan 2014 03:46:22 -0800 (PST) Subject: [rules-users] stuck! Unknown accessor type: org.mvel2.optimizers.impl.refl.collection.ArrayCreator@690c2a7a In-Reply-To: <1390474231247-4027818.post@n3.nabble.com> References: <1353967076623-4020969.post@n3.nabble.com> <1354202737050-4021015.post@n3.nabble.com> <1389023861262-4027535.post@n3.nabble.com> <83C4A2C0-10C2-4D0F-B827-4A7B6FB43A96@codehaus.org> <1389097306048-4027560.post@n3.nabble.com> <1389711718331-4027682.post@n3.nabble.com> <1390225308598-4027769.post@n3.nabble.com> <1390474231247-4027818.post@n3.nabble.com> Message-ID: <1390477582338-4027820.post@n3.nabble.com> Thank you. few questions: 1. does exist an option to dismiss this error, even if it says to disable this mvel constraints optimizations? 2. when and where will it be released? can it be fixed on 5.5 or 5.6? -- View this message in context: http://drools.46999.n3.nabble.com/stuck-Unknown-accessor-type-org-mvel2-optimizers-impl-refl-collection-ArrayCreator-690c2a7a-tp4020969p4027820.html Sent from the Drools: User forum mailing list archive at Nabble.com. From esteban.aliverti at gmail.com Thu Jan 23 07:15:28 2014 From: esteban.aliverti at gmail.com (Esteban Aliverti) Date: Thu, 23 Jan 2014 10:15:28 -0200 Subject: [rules-users] Buggy query behavior in drools 5.6 and 6.1-SNAPSHOT ?? In-Reply-To: <52E089FB.4060606@gmail.com> References: <52E03EE4.6030502@gmail.com> <52E089FB.4060606@gmail.com> Message-ID: Let me see what I can do. XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX Esteban Aliverti - Blog @ http://ilesteban.wordpress.com On Thu, Jan 23, 2014 at 12:18 AM, Davide Sottara wrote: > Esteban, I have created a ticket for this with > an explanation of the weird behavior. > > https://issues.jboss.org/browse/DROOLS-414 > > The problem is in QueryElementBuilder line#343. > It's an easy fix but I don't have time for it right now, > could someone look into it? > > Thanks > Davide > > > > On 01/22/2014 06:00 PM, Esteban Aliverti wrote: > > Good catch Davide. I can confirm that not using nested accessors the query > works as expected. > > Regards, > > > XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX > > Esteban Aliverti > - Blog @ http://ilesteban.wordpress.com > > > On Wed, Jan 22, 2014 at 6:57 PM, Davide Sottara wrote: > >> Indeed, the use case can be simplified further: >> >> package org.drools.test.bc; >> >> declare Parent >> attribute2 : String >> end >> >> declare Child >> parentId : String >> end >> >> query getChildWithName( String $parentId, Child $child ) >> $child:= Child( parentId == $parentId ) >> >> end >> >> rule "Insert Children" >> when >> then >> Parent p1 = new Parent( "a1" ); >> Child c1p1 = new Child( "1" ); >> >> insert( c1p1 ); >> insert( p1 ); >> >> end >> >> rule "Rule A" >> when >> $p: Parent( $a2 : attribute2 ) >> ?getChildWithName( $p.attribute2, $child;) >> then >> System.out.println("FOUND: "+ $child + " >> " + $child.getParentId() >> + " == " + $p.getAttribute2() + " ??" ); >> end >> >> It has nothing to do with nested objects, @PR or modifications. >> It seems that the culprit is the chained property accessor. >> >> >> Davide >> >> >> >> On 01/22/2014 02:22 PM, Esteban Aliverti wrote: >> >> Hi guys, >> I was writing some rules using backward chaining and found a strange >> behavior. >> I managed to isolate the error in the test project I'm attaching. >> >> In the project I have 2 classes: Parent and Child >> >> Parent: >> * String id >> * String attribute1 >> * String attribute2 >> * List children >> >> Child: >> * String parentId; >> * String name; >> * String value; >> >> >> In the test I'm creating 1 Parent object with just 1 child and then >> inserting the Parent object into a drools session: >> >> Parent p1 = new Parent(); >> p1.setId("1"); >> p1.setAttribute1("a1"); >> p1.setAttribute2(null); >> >> Child c1p1 = new Child(); >> c1p1.setName("n1"); >> c1p1.setParentId(p1.getId()); >> c1p1.setValue("v1.1"); >> p1.addChild(c1p1); >> >> kSession.insert(p1); >> kSession.fireAllRules(); >> >> >> So far so good. >> The rules I have in my session are the following: >> >> declare Parent >> @propertyReactive >> end >> >> query getChildWithName(String $parentId, String $name, Child $child) >> $child:= Child(parentId == $parentId, name == $name) >> end >> >> rule "Insert Children" >> when >> $p: Parent() @watch(!*) >> $c: Child() from $p.children >> then >> System.out.println("Inserting child "+$c); >> insert($c); >> end >> >> rule "Rule A" >> when >> $p: Parent(attribute2 != null) >> ?getChildWithName($p.attribute2, "n1", $child;) >> then >> System.out.println("FOUND: "+$child+". The attribute 'parentId' of >> this object must have the value '"+$p.getAttribute2()+"'. Does it? >> "+$child.getParentId()+" == "+$p.getAttribute2()+" ??"); >> globalList.add($child); >> end >> >> >> rule "Copy Attribute1 into Attribute2" >> when >> $p: Parent(attribute1 != null, attribute2 == null) >> then >> modify($p){ >> setAttribute2($p.getAttribute1()) >> } >> end >> >> The important part here is 'Rule A' and 'Copy Attribute1 into >> Attribute2'. The latter copies the value of attribute1 to attribute2 for >> any Parent object present in the session. (Note that the parent I'm >> inserting has attribute2 = null). 'Rule A' is then using a query to get a >> Child object that has a parent with id = $p.attribute2 (where $p is a >> previously matched Parent). >> Given that I only have 1 Parent in my session and that its id is '1' I >> don't expect 'Rule A' to be activated/executed. When I modify >> parent.attribute2 in 'Copy Attribute1 into Attribute2' I'm setting its >> value to 'a1'. 'Rule A' (via the query) should then look for a Child with >> parentid = 'a1' and It shouldn't find anything. >> Funny thing is that 'Rule A' activates and fires. The child object that >> is 'returned' by the query has a parentId of '1' so I don't know how this >> behavior is possible. If you take a look at the System.out output you will >> see that the activation makes no sense at all. >> >> Am I doing something wrong in my project? Is this a bug? Is this the >> expected behavior? >> >> Regards, >> >> >> >> XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX >> >> Esteban Aliverti >> - Blog @ http://ilesteban.wordpress.com >> >> >> _______________________________________________ >> 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 > -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.jboss.org/pipermail/rules-users/attachments/20140123/a28f5cdb/attachment.html From paul.s.mander at gmail.com Thu Jan 23 07:40:23 2014 From: paul.s.mander at gmail.com (pmander) Date: Thu, 23 Jan 2014 04:40:23 -0800 (PST) Subject: [rules-users] java dialect and declared types Message-ID: <1390480823925-4027822.post@n3.nabble.com> If I declare a type in a drl and reference the attributes in a rule then all is fine for either dialect. But, if one of the attributes is a java class that has been compiled and inserted then under the java dialect only I get a compilation error: rule compilation error the field ... is not visible for example declare DroolsTransaction ORG : String PRODUCT : String raw : Transaction end rule "create classes" salience 100 when $t : Transaction() then insert(new DroolsTransaction((String)$t.fieldFor("ORG"), (String)$t.fieldFor("PRODUCT"), $t)); end I insert Transaction objects in the session and this works fine for the following rule if I have the dialect set to mvel. rule "1" when $t : DroolsTransaction(ORG == "A" , PRODUCT == "001", raw.complicated()) then do something end but when I switch dialects to java, the compilation complains that raw is not visible. I guess drools is dynamically creating the DroolsTransaction object with private fields... and I need public accessors - how to define them? -- View this message in context: http://drools.46999.n3.nabble.com/java-dialect-and-declared-types-tp4027822.html Sent from the Drools: User forum mailing list archive at Nabble.com. From dsotty at gmail.com Thu Jan 23 07:51:23 2014 From: dsotty at gmail.com (Davide Sottara) Date: Thu, 23 Jan 2014 06:51:23 -0600 Subject: [rules-users] java dialect and declared types In-Reply-To: <1390480823925-4027822.post@n3.nabble.com> References: <1390480823925-4027822.post@n3.nabble.com> Message-ID: <52E1104B.9060503@gmail.com> Declared types have public accessors as usual. This seems a minor bug in the expression analysis. Can you try getRaw().complicated() and / or raw.complicated and report what happens? Thanks Davide On 01/23/2014 06:40 AM, pmander wrote: > If I declare a type in a drl and reference the attributes in a rule then all > is fine for either dialect. But, if one of the attributes is a java class > that has been compiled and inserted then under the java dialect only I get a > compilation error: rule compilation error the field ... is not visible > > for example > > declare DroolsTransaction > ORG : String > PRODUCT : String > raw : Transaction > end > > rule "create classes" > salience 100 > when > $t : Transaction() > then > insert(new DroolsTransaction((String)$t.fieldFor("ORG"), > (String)$t.fieldFor("PRODUCT"), $t)); > end > > I insert Transaction objects in the session and this works fine for the > following rule if I have the dialect set to mvel. > > rule "1" > when > $t : DroolsTransaction(ORG == "A" , PRODUCT == "001", raw.complicated()) > then > do something > end > > but when I switch dialects to java, the compilation complains that raw is > not visible. > > I guess drools is dynamically creating the DroolsTransaction object with > private fields... and I need public accessors - how to define them? > > > > -- > View this message in context: http://drools.46999.n3.nabble.com/java-dialect-and-declared-types-tp4027822.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 esteban.aliverti at gmail.com Thu Jan 23 08:24:11 2014 From: esteban.aliverti at gmail.com (Esteban Aliverti) Date: Thu, 23 Jan 2014 11:24:11 -0200 Subject: [rules-users] Buggy query behavior in drools 5.6 and 6.1-SNAPSHOT ?? In-Reply-To: References: <52E03EE4.6030502@gmail.com> <52E089FB.4060606@gmail.com> Message-ID: Ok, I think I have a fix already in place. I'll add a test in MiscTest (drools-compiler) and create a Pull Request. Regards, XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX Esteban Aliverti - Blog @ http://ilesteban.wordpress.com On Thu, Jan 23, 2014 at 9:15 AM, Esteban Aliverti < esteban.aliverti at gmail.com> wrote: > Let me see what I can do. > > > XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX > > Esteban Aliverti > - Blog @ http://ilesteban.wordpress.com > > > On Thu, Jan 23, 2014 at 12:18 AM, Davide Sottara wrote: > >> Esteban, I have created a ticket for this with >> an explanation of the weird behavior. >> >> https://issues.jboss.org/browse/DROOLS-414 >> >> The problem is in QueryElementBuilder line#343. >> It's an easy fix but I don't have time for it right now, >> could someone look into it? >> >> Thanks >> Davide >> >> >> >> On 01/22/2014 06:00 PM, Esteban Aliverti wrote: >> >> Good catch Davide. I can confirm that not using nested accessors the >> query works as expected. >> >> Regards, >> >> >> XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX >> >> Esteban Aliverti >> - Blog @ http://ilesteban.wordpress.com >> >> >> On Wed, Jan 22, 2014 at 6:57 PM, Davide Sottara wrote: >> >>> Indeed, the use case can be simplified further: >>> >>> package org.drools.test.bc; >>> >>> declare Parent >>> attribute2 : String >>> end >>> >>> declare Child >>> parentId : String >>> end >>> >>> query getChildWithName( String $parentId, Child $child ) >>> $child:= Child( parentId == $parentId ) >>> >>> end >>> >>> rule "Insert Children" >>> when >>> then >>> Parent p1 = new Parent( "a1" ); >>> Child c1p1 = new Child( "1" ); >>> >>> insert( c1p1 ); >>> insert( p1 ); >>> >>> end >>> >>> rule "Rule A" >>> when >>> $p: Parent( $a2 : attribute2 ) >>> ?getChildWithName( $p.attribute2, $child;) >>> then >>> System.out.println("FOUND: "+ $child + " >> " + $child.getParentId() >>> + " == " + $p.getAttribute2() + " ??" ); >>> end >>> >>> It has nothing to do with nested objects, @PR or modifications. >>> It seems that the culprit is the chained property accessor. >>> >>> >>> Davide >>> >>> >>> >>> On 01/22/2014 02:22 PM, Esteban Aliverti wrote: >>> >>> Hi guys, >>> I was writing some rules using backward chaining and found a strange >>> behavior. >>> I managed to isolate the error in the test project I'm attaching. >>> >>> In the project I have 2 classes: Parent and Child >>> >>> Parent: >>> * String id >>> * String attribute1 >>> * String attribute2 >>> * List children >>> >>> Child: >>> * String parentId; >>> * String name; >>> * String value; >>> >>> >>> In the test I'm creating 1 Parent object with just 1 child and then >>> inserting the Parent object into a drools session: >>> >>> Parent p1 = new Parent(); >>> p1.setId("1"); >>> p1.setAttribute1("a1"); >>> p1.setAttribute2(null); >>> >>> Child c1p1 = new Child(); >>> c1p1.setName("n1"); >>> c1p1.setParentId(p1.getId()); >>> c1p1.setValue("v1.1"); >>> p1.addChild(c1p1); >>> >>> kSession.insert(p1); >>> kSession.fireAllRules(); >>> >>> >>> So far so good. >>> The rules I have in my session are the following: >>> >>> declare Parent >>> @propertyReactive >>> end >>> >>> query getChildWithName(String $parentId, String $name, Child $child) >>> $child:= Child(parentId == $parentId, name == $name) >>> end >>> >>> rule "Insert Children" >>> when >>> $p: Parent() @watch(!*) >>> $c: Child() from $p.children >>> then >>> System.out.println("Inserting child "+$c); >>> insert($c); >>> end >>> >>> rule "Rule A" >>> when >>> $p: Parent(attribute2 != null) >>> ?getChildWithName($p.attribute2, "n1", $child;) >>> then >>> System.out.println("FOUND: "+$child+". The attribute 'parentId' of >>> this object must have the value '"+$p.getAttribute2()+"'. Does it? >>> "+$child.getParentId()+" == "+$p.getAttribute2()+" ??"); >>> globalList.add($child); >>> end >>> >>> >>> rule "Copy Attribute1 into Attribute2" >>> when >>> $p: Parent(attribute1 != null, attribute2 == null) >>> then >>> modify($p){ >>> setAttribute2($p.getAttribute1()) >>> } >>> end >>> >>> The important part here is 'Rule A' and 'Copy Attribute1 into >>> Attribute2'. The latter copies the value of attribute1 to attribute2 for >>> any Parent object present in the session. (Note that the parent I'm >>> inserting has attribute2 = null). 'Rule A' is then using a query to get a >>> Child object that has a parent with id = $p.attribute2 (where $p is a >>> previously matched Parent). >>> Given that I only have 1 Parent in my session and that its id is '1' I >>> don't expect 'Rule A' to be activated/executed. When I modify >>> parent.attribute2 in 'Copy Attribute1 into Attribute2' I'm setting its >>> value to 'a1'. 'Rule A' (via the query) should then look for a Child with >>> parentid = 'a1' and It shouldn't find anything. >>> Funny thing is that 'Rule A' activates and fires. The child object that >>> is 'returned' by the query has a parentId of '1' so I don't know how this >>> behavior is possible. If you take a look at the System.out output you will >>> see that the activation makes no sense at all. >>> >>> Am I doing something wrong in my project? Is this a bug? Is this the >>> expected behavior? >>> >>> Regards, >>> >>> >>> >>> XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX >>> >>> Esteban Aliverti >>> - Blog @ http://ilesteban.wordpress.com >>> >>> >>> _______________________________________________ >>> 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 >> > > -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.jboss.org/pipermail/rules-users/attachments/20140123/4b463213/attachment-0001.html From paul.s.mander at gmail.com Thu Jan 23 09:06:06 2014 From: paul.s.mander at gmail.com (pmander) Date: Thu, 23 Jan 2014 06:06:06 -0800 (PST) Subject: [rules-users] java dialect and declared types In-Reply-To: <52E1104B.9060503@gmail.com> References: <1390480823925-4027822.post@n3.nabble.com> <52E1104B.9060503@gmail.com> Message-ID: <1390485966674-4027825.post@n3.nabble.com> will do, although complicated() has parameters and so I think I'll only able to try getRaw.complicated() -- View this message in context: http://drools.46999.n3.nabble.com/java-dialect-and-declared-types-tp4027822p4027825.html Sent from the Drools: User forum mailing list archive at Nabble.com. From dsotty at gmail.com Thu Jan 23 09:16:51 2014 From: dsotty at gmail.com (Davide Sottara) Date: Thu, 23 Jan 2014 08:16:51 -0600 Subject: [rules-users] java dialect and declared types In-Reply-To: <1390485966674-4027825.post@n3.nabble.com> References: <1390480823925-4027822.post@n3.nabble.com> <52E1104B.9060503@gmail.com> <1390485966674-4027825.post@n3.nabble.com> Message-ID: <52E12453.2040104@gmail.com> In that case I'm almost sure that the whole constraint has to be treated as a java expression. So yes, you will probably need getRaw().complicated( ... ) On 01/23/2014 08:06 AM, pmander wrote: > will do, although complicated() has parameters and so I think I'll only able > to try getRaw.complicated() > > > > -- > View this message in context: http://drools.46999.n3.nabble.com/java-dialect-and-declared-types-tp4027822p4027825.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 paul.s.mander at gmail.com Thu Jan 23 09:46:03 2014 From: paul.s.mander at gmail.com (pmander) Date: Thu, 23 Jan 2014 06:46:03 -0800 (PST) Subject: [rules-users] java dialect and declared types In-Reply-To: <52E1104B.9060503@gmail.com> References: <1390480823925-4027822.post@n3.nabble.com> <52E1104B.9060503@gmail.com> Message-ID: <1390488363576-4027827.post@n3.nabble.com> Davide Sottara wrote > Declared types have public accessors as usual. > This seems a minor bug in the expression analysis. > Can you try > > getRaw().complicated() > > and / or > > raw.complicated > > and report what happens? > Thanks > Davide getRaw().complicated() works. This isn't just in the constraint. I use raw in the "then" also and it needs changing to getRaw() also. Thanks -- View this message in context: http://drools.46999.n3.nabble.com/java-dialect-and-declared-types-tp4027822p4027827.html Sent from the Drools: User forum mailing list archive at Nabble.com. From dsotty at gmail.com Thu Jan 23 10:01:53 2014 From: dsotty at gmail.com (Davide Sottara) Date: Thu, 23 Jan 2014 09:01:53 -0600 Subject: [rules-users] java dialect and declared types In-Reply-To: <1390488363576-4027827.post@n3.nabble.com> References: <1390480823925-4027822.post@n3.nabble.com> <52E1104B.9060503@gmail.com> <1390488363576-4027827.post@n3.nabble.com> Message-ID: <52E12EE1.9050203@gmail.com> Yes, if you use the java dialect, the whole RHS is parsed as a java block with some minor syntactic sugar (e.g. "insert"). On 01/23/2014 08:46 AM, pmander wrote: > Davide Sottara wrote >> Declared types have public accessors as usual. >> This seems a minor bug in the expression analysis. >> Can you try >> >> getRaw().complicated() >> >> and / or >> >> raw.complicated >> >> and report what happens? >> Thanks >> Davide > getRaw().complicated() works. This isn't just in the constraint. I use raw > in the "then" also and it needs changing to getRaw() also. > > Thanks > > > > -- > View this message in context: http://drools.46999.n3.nabble.com/java-dialect-and-declared-types-tp4027822p4027827.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 paul.s.mander at gmail.com Thu Jan 23 10:11:51 2014 From: paul.s.mander at gmail.com (pmander) Date: Thu, 23 Jan 2014 07:11:51 -0800 (PST) Subject: [rules-users] java dialect and declared types In-Reply-To: <52E12EE1.9050203@gmail.com> References: <1390480823925-4027822.post@n3.nabble.com> <52E1104B.9060503@gmail.com> <1390488363576-4027827.post@n3.nabble.com> <52E12EE1.9050203@gmail.com> Message-ID: <1390489911789-4027829.post@n3.nabble.com> Thanks, This was just for a performance test to check mvel against java. Mvel in our case is quicker. The tests also show that 5.5.0 is quicker than 6.0.0. -- View this message in context: http://drools.46999.n3.nabble.com/java-dialect-and-declared-types-tp4027822p4027829.html Sent from the Drools: User forum mailing list archive at Nabble.com. From mproctor at codehaus.org Thu Jan 23 10:21:29 2014 From: mproctor at codehaus.org (Mark Proctor) Date: Thu, 23 Jan 2014 15:21:29 +0000 Subject: [rules-users] java dialect and declared types In-Reply-To: <1390489911789-4027829.post@n3.nabble.com> References: <1390480823925-4027822.post@n3.nabble.com> <52E1104B.9060503@gmail.com> <1390488363576-4027827.post@n3.nabble.com> <52E12EE1.9050203@gmail.com> <1390489911789-4027829.post@n3.nabble.com> Message-ID: please do pop onto irc and provides us with more details on the performance testing you are doing. We need to add more tests to our test suite, to track any regressions. http://www.jboss.org/drools/irc Mark On 23 Jan 2014, at 15:11, pmander wrote: > Thanks, > > This was just for a performance test to check mvel against java. Mvel in our > case is quicker. The tests also show that 5.5.0 is quicker than 6.0.0. > > > > > > -- > View this message in context: http://drools.46999.n3.nabble.com/java-dialect-and-declared-types-tp4027822p4027829.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 Thu Jan 23 10:33:59 2014 From: mario.fusco at gmail.com (Mario Fusco) Date: Thu, 23 Jan 2014 07:33:59 -0800 (PST) Subject: [rules-users] java dialect and declared types In-Reply-To: <1390489911789-4027829.post@n3.nabble.com> References: <1390480823925-4027822.post@n3.nabble.com> <52E1104B.9060503@gmail.com> <1390488363576-4027827.post@n3.nabble.com> <52E12EE1.9050203@gmail.com> <1390489911789-4027829.post@n3.nabble.com> Message-ID: <1390491239914-4027831.post@n3.nabble.com> Hi, I'd like to reproduce and verify your performance claims. If you found a performance regression it would be very interesting for me to investigate it. Could you please send a small self-contained project with the benchmarks you tried? Personally I believe that "The tests also show that 5.5.0 is quicker than 6.0.0" isn't true in general. For instance Geoffrey De Smet just published a performance comparison between phreak (the default algorithm in 6) and reteoo demonstrating quite the opposite: http://blog.athico.com/2014/01/which-rule-engine-algorithm-is-faster.html Nevertheless it is very possible that your claim is perfectly valid for your test case, so I'd like to discover under which circumstances 5.5. is actually faster than 6 and check if we can improve also in those cases. Thanks, Mario -- View this message in context: http://drools.46999.n3.nabble.com/java-dialect-and-declared-types-tp4027822p4027831.html Sent from the Drools: User forum mailing list archive at Nabble.com. From husby024 at umn.edu Thu Jan 23 10:58:26 2014 From: husby024 at umn.edu (jhusby) Date: Thu, 23 Jan 2014 07:58:26 -0800 (PST) Subject: [rules-users] kContainer.newKieSession() fails in Apache Karaf In-Reply-To: <1390437322185-4027815.post@n3.nabble.com> References: <1390437322185-4027815.post@n3.nabble.com> Message-ID: <1390492706283-4027832.post@n3.nabble.com> I wasn't subscribed to the mailing list so I don't think my message below went through. Apologies if it did. jhusby wrote > I'm trying to run Drools in an OSGi container (Apache Karaf 2.3.3 to be > precise). When I try to call newKieSession() on a KieContainer, I get an > exception as follows: > > java.lang.IllegalArgumentException: conflict Resolver > 'org.drools.core.conflict.DepthConflictResolver' not found > at > org.drools.core.RuleBaseConfiguration.determineConflictResolver(RuleBaseConfiguration.java:868)[276:org.drools.core:6.0.1.20131220-0333] > at > org.drools.core.RuleBaseConfiguration.init(RuleBaseConfiguration.java:459)[276:org.drools.core:6.0.1.20131220-0333] > at > org.drools.core.RuleBaseConfiguration.init(RuleBaseConfiguration.java:415)[276:org.drools.core:6.0.1.20131220-0333] > at org.drools.core.RuleBaseConfiguration. > > (RuleBaseConfiguration.java:402)[276:org.drools.core:6.0.1.20131220-0333] > at > org.drools.core.impl.KnowledgeBaseFactoryServiceImpl.newKnowledgeBaseConfiguration(KnowledgeBaseFactoryServiceImpl.java:37)[276:org.drools.core:6.0.1.20131220-0333] > at > org.kie.internal.KnowledgeBaseFactory.newKnowledgeBaseConfiguration(KnowledgeBaseFactory.java:125)[275:org.kie.internalapi:6.0.1.20131220-0322] > at > org.drools.compiler.kie.builder.impl.KieContainerImpl.getKnowledgeBaseConfiguration(KieContainerImpl.java:323)[277:org.drools.compiler:6.0.1.20131220-0333] > at > org.drools.compiler.kie.builder.impl.KieContainerImpl.createKieBase(KieContainerImpl.java:316)[277:org.drools.compiler:6.0.1.20131220-0333] > at > org.drools.compiler.kie.builder.impl.KieContainerImpl.getKieBase(KieContainerImpl.java:257)[277:org.drools.compiler:6.0.1.20131220-0333] > at > org.drools.compiler.kie.builder.impl.KieContainerImpl.newKieSession(KieContainerImpl.java:400)[277:org.drools.compiler:6.0.1.20131220-0333] > at > org.drools.compiler.kie.builder.impl.KieContainerImpl.newKieSession(KieContainerImpl.java:349)[277:org.drools.compiler:6.0.1.20131220-0333] > at > org.drools.compiler.kie.builder.impl.KieContainerImpl.newKieSession(KieContainerImpl.java:331)[277:org.drools.compiler:6.0.1.20131220-0333] > > As a workaround, I was able to get it working by doing this: > > KieBaseConfiguration kbaseConf = KnowledgeBaseFactory > .newKnowledgeBaseConfiguration( > null, > getClass().getClassLoader(), > RuleBaseConfiguration.class.getClassLoader() > ); > KieBase kbase = kContainer.newKieBase(kbaseConf); > kSession = kbase.newKieSession(); > > but this is obviously less than ideal. Any ideas on how to make this work > better in OSGi? > > Thank you! > > Joseph -- View this message in context: http://drools.46999.n3.nabble.com/kContainer-newKieSession-fails-in-Apache-Karaf-tp4027815p4027832.html Sent from the Drools: User forum mailing list archive at Nabble.com. From husby024 at umn.edu Thu Jan 23 11:02:02 2014 From: husby024 at umn.edu (jhusby) Date: Thu, 23 Jan 2014 08:02:02 -0800 (PST) Subject: [rules-users] Dynamic rules in Drools 6 Message-ID: <1390492922745-4027833.post@n3.nabble.com> Looking at the test case from Edson, quoted below, it appears that there's no way to reuse a current session when upgrading the kbase rules? I need to add and remove rules on the fly, and so if I have a stateful session, does this mean I need to dispose of the current session, upgrade the container, create a new session, and repopulate it with all my objects? I was hoping to simply rebuild the repository, call kContainer.updateToVersion(), and have the the session (with all my objects still populated) automatically use that new version of the rules repository. Is this not possible? Thanks, Joseph > Edson Tirelli-4 wrote > Here is a code example of creating kie modules in memory and upgrading > existing kbases/ksessions: > > https://github.com/droolsjbpm/drools/blob/master/drools-compiler/src/test/java/org/drools/compiler/integrationtests/IncrementalCompilationTest.java#L106 > > It is a test case, but maybe it will be easier to follow. We are > working > on additional ways of doing similar things as well. > > Edson -- View this message in context: http://drools.46999.n3.nabble.com/Dynamic-rules-in-Drools-6-tp4027833.html Sent from the Drools: User forum mailing list archive at Nabble.com. From paul.s.mander at gmail.com Thu Jan 23 11:05:23 2014 From: paul.s.mander at gmail.com (pmander) Date: Thu, 23 Jan 2014 08:05:23 -0800 (PST) Subject: [rules-users] java dialect and declared types In-Reply-To: <1390491239914-4027831.post@n3.nabble.com> References: <1390480823925-4027822.post@n3.nabble.com> <52E1104B.9060503@gmail.com> <1390488363576-4027827.post@n3.nabble.com> <52E12EE1.9050203@gmail.com> <1390489911789-4027829.post@n3.nabble.com> <1390491239914-4027831.post@n3.nabble.com> Message-ID: <1390493123715-4027834.post@n3.nabble.com> I should qualify this with the way that we are using drools. In general perhaps 6 is quicker that 5.5. It will be extremely difficult to create a self contained test to demonstrate this as the tests are performed with tens of millions of transactions against ten of thousands of rules. I will however attempt to scale this down to something that can demonstrate these findings. This wont happen straight away so pin this thread and hopefully in a week or so I will be able to submit something. -- View this message in context: http://drools.46999.n3.nabble.com/java-dialect-and-declared-types-tp4027822p4027834.html Sent from the Drools: User forum mailing list archive at Nabble.com. From mproctor at codehaus.org Thu Jan 23 11:11:58 2014 From: mproctor at codehaus.org (Mark Proctor) Date: Thu, 23 Jan 2014 16:11:58 +0000 Subject: [rules-users] Dynamic rules in Drools 6 In-Reply-To: <1390492922745-4027833.post@n3.nabble.com> References: <1390492922745-4027833.post@n3.nabble.com> Message-ID: On 23 Jan 2014, at 16:02, jhusby wrote: > Looking at the test case from Edson, quoted below, it appears that there's no > way to reuse a current session when upgrading the kbase rules? I need to > add and remove rules on the fly, and so if I have a stateful session, does > this mean I need to dispose of the current session, upgrade the container, > create a new session, and repopulate it with all my objects? > > I was hoping to simply rebuild the repository, call > kContainer.updateToVersion(), and have the the session (with all my objects > still populated) automatically use that new version of the rules repository. > Is this not possible? > yes,this is how it works now. Make sure you build the jar with the maven plugin, so that it can performance the incremental diff. We have a number of low level unit tests, that show this should work. If you have found a bug, please update the test class here: https://github.com/droolsjbpm/drools/blob/master/drools-compiler/src/test/java/org/drools/compiler/integrationtests/IncrementalCompilationTest.java Mark > Thanks, > Joseph > > >> Edson Tirelli-4 wrote >> Here is a code example of creating kie modules in memory and upgrading >> existing kbases/ksessions: >> >> https://github.com/droolsjbpm/drools/blob/master/drools-compiler/src/test/java/org/drools/compiler/integrationtests/IncrementalCompilationTest.java#L106 >> >> It is a test case, but maybe it will be easier to follow. We are >> working >> on additional ways of doing similar things as well. >> >> Edson > > > > > > -- > View this message in context: http://drools.46999.n3.nabble.com/Dynamic-rules-in-Drools-6-tp4027833.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 Thu Jan 23 11:19:54 2014 From: dsotty at gmail.com (Davide Sottara) Date: Thu, 23 Jan 2014 10:19:54 -0600 Subject: [rules-users] Dynamic rules in Drools 6 In-Reply-To: References: <1390492922745-4027833.post@n3.nabble.com> Message-ID: <52E1412A.1030206@gmail.com> There may be some misunderstanding here.. you can indeed rebuild the jar, but there is also a programmatic way to add (DRL) resources to an in-memory FS and update the KBs/KSs on the fly. See the examples in IncrementalCompilationTests Davide On 01/23/2014 10:11 AM, Mark Proctor wrote: > On 23 Jan 2014, at 16:02, jhusby wrote: > >> Looking at the test case from Edson, quoted below, it appears that there's no >> way to reuse a current session when upgrading the kbase rules? I need to >> add and remove rules on the fly, and so if I have a stateful session, does >> this mean I need to dispose of the current session, upgrade the container, >> create a new session, and repopulate it with all my objects? >> >> I was hoping to simply rebuild the repository, call >> kContainer.updateToVersion(), and have the the session (with all my objects >> still populated) automatically use that new version of the rules repository. >> Is this not possible? >> > yes,this is how it works now. Make sure you build the jar with the maven plugin, so that it can performance the incremental diff. We have a number of low level unit tests, that show this should work. If you have found a bug, please update the test class here: > https://github.com/droolsjbpm/drools/blob/master/drools-compiler/src/test/java/org/drools/compiler/integrationtests/IncrementalCompilationTest.java > > Mark > > >> Thanks, >> Joseph >> >> >>> Edson Tirelli-4 wrote >>> Here is a code example of creating kie modules in memory and upgrading >>> existing kbases/ksessions: >>> >>> https://github.com/droolsjbpm/drools/blob/master/drools-compiler/src/test/java/org/drools/compiler/integrationtests/IncrementalCompilationTest.java#L106 >>> >>> It is a test case, but maybe it will be easier to follow. We are >>> working >>> on additional ways of doing similar things as well. >>> >>> Edson >> >> >> >> >> -- >> View this message in context: http://drools.46999.n3.nabble.com/Dynamic-rules-in-Drools-6-tp4027833.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 ch007m at gmail.com Thu Jan 23 11:35:17 2014 From: ch007m at gmail.com (Charles Moulliard) Date: Thu, 23 Jan 2014 17:35:17 +0100 Subject: [rules-users] kContainer.newKieSession() fails in Apache Karaf In-Reply-To: <1390492706283-4027832.post@n3.nabble.com> References: <1390437322185-4027815.post@n3.nabble.com> <1390492706283-4027832.post@n3.nabble.com> Message-ID: Hi Joseph, I propose that you have a look to this example which is currently working on Karaf - https://github.com/cmoulliard/droolsjbpm-osgi-examples (simple = OSGI BundleActivator + KieSession + Drools Rules) Regards, Charles On Thu, Jan 23, 2014 at 4:58 PM, jhusby wrote: > I wasn't subscribed to the mailing list so I don't think my message below > went through. Apologies if it did. > > > jhusby wrote > > I'm trying to run Drools in an OSGi container (Apache Karaf 2.3.3 to be > > precise). When I try to call newKieSession() on a KieContainer, I get an > > exception as follows: > > > > java.lang.IllegalArgumentException: conflict Resolver > > 'org.drools.core.conflict.DepthConflictResolver' not found > > at > > > org.drools.core.RuleBaseConfiguration.determineConflictResolver(RuleBaseConfiguration.java:868)[276:org.drools.core:6.0.1.20131220-0333] > > at > > > org.drools.core.RuleBaseConfiguration.init(RuleBaseConfiguration.java:459)[276:org.drools.core:6.0.1.20131220-0333] > > at > > > org.drools.core.RuleBaseConfiguration.init(RuleBaseConfiguration.java:415)[276:org.drools.core:6.0.1.20131220-0333] > > at org.drools.core.RuleBaseConfiguration. > > > > (RuleBaseConfiguration.java:402)[276:org.drools.core:6.0.1.20131220-0333] > > at > > > org.drools.core.impl.KnowledgeBaseFactoryServiceImpl.newKnowledgeBaseConfiguration(KnowledgeBaseFactoryServiceImpl.java:37)[276:org.drools.core:6.0.1.20131220-0333] > > at > > > org.kie.internal.KnowledgeBaseFactory.newKnowledgeBaseConfiguration(KnowledgeBaseFactory.java:125)[275:org.kie.internalapi:6.0.1.20131220-0322] > > at > > > org.drools.compiler.kie.builder.impl.KieContainerImpl.getKnowledgeBaseConfiguration(KieContainerImpl.java:323)[277:org.drools.compiler:6.0.1.20131220-0333] > > at > > > org.drools.compiler.kie.builder.impl.KieContainerImpl.createKieBase(KieContainerImpl.java:316)[277:org.drools.compiler:6.0.1.20131220-0333] > > at > > > org.drools.compiler.kie.builder.impl.KieContainerImpl.getKieBase(KieContainerImpl.java:257)[277:org.drools.compiler:6.0.1.20131220-0333] > > at > > > org.drools.compiler.kie.builder.impl.KieContainerImpl.newKieSession(KieContainerImpl.java:400)[277:org.drools.compiler:6.0.1.20131220-0333] > > at > > > org.drools.compiler.kie.builder.impl.KieContainerImpl.newKieSession(KieContainerImpl.java:349)[277:org.drools.compiler:6.0.1.20131220-0333] > > at > > > org.drools.compiler.kie.builder.impl.KieContainerImpl.newKieSession(KieContainerImpl.java:331)[277:org.drools.compiler:6.0.1.20131220-0333] > > > > As a workaround, I was able to get it working by doing this: > > > > KieBaseConfiguration kbaseConf = KnowledgeBaseFactory > > > .newKnowledgeBaseConfiguration( > > null, > > > getClass().getClassLoader(), > > > RuleBaseConfiguration.class.getClassLoader() > > ); > > KieBase kbase = kContainer.newKieBase(kbaseConf); > > kSession = kbase.newKieSession(); > > > > but this is obviously less than ideal. Any ideas on how to make this > work > > better in OSGi? > > > > Thank you! > > > > Joseph > > > > > > -- > View this message in context: > http://drools.46999.n3.nabble.com/kContainer-newKieSession-fails-in-Apache-Karaf-tp4027815p4027832.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/20140123/2cf4d8a5/attachment.html From husby024 at umn.edu Thu Jan 23 12:01:40 2014 From: husby024 at umn.edu (jhusby) Date: Thu, 23 Jan 2014 09:01:40 -0800 (PST) Subject: [rules-users] kContainer.newKieSession() fails in Apache Karaf In-Reply-To: References: <1390437322185-4027815.post@n3.nabble.com> <1390492706283-4027832.post@n3.nabble.com> Message-ID: <1390496500775-4027838.post@n3.nabble.com> I actually looked through your example project yesterday; very helpful!!! However, there are a few things I'm not sure are compatible with what I'm trying to do. 1. I need to rebuild the rules on the fly, so I was using examples from the IncrementalCompilationTest.java to accomplish that task. However, those tests don't use a classpath container... can I still rebuild a KieModule via runtime code when running in a classpathContainer? 2. Your example code calls .newKieSession() on a kbase object as opposed to a kContainer object. Is there a reason why? If I create a new KieSession from a kbase vs. kContainer, will I still be able to rebuild the kjar dynamically in the code and keep using the same stateful session? 3. It looks like I'll have to wait until Drools 6.1.0 to get the parameter to specify a classloader when creating the container? I see you just added that recently. I've tried using Thread.currentThread().setContextClassLoader(...) but can't seem to make that work with Drools 6.0.1 in Karaf 2.3.3 because then RuleBaseConfiguration sets the classloader and uses it to try resolving org.drools.core.conflict.DepthConflictResolver, which it can't do because it's no longer using the OSGi classloader. Thank you, Joseph Charles Moulliard-2 wrote > Hi Joseph, > > I propose that you have a look to this example which is currently working > on Karaf - https://github.com/cmoulliard/droolsjbpm-osgi-examples (simple > = > OSGI BundleActivator + KieSession + Drools Rules) > > Regards, > > Charles -- View this message in context: http://drools.46999.n3.nabble.com/kContainer-newKieSession-fails-in-Apache-Karaf-tp4027815p4027838.html Sent from the Drools: User forum mailing list archive at Nabble.com. From gboro54 at gmail.com Thu Jan 23 13:38:48 2014 From: gboro54 at gmail.com (gboro54) Date: Thu, 23 Jan 2014 10:38:48 -0800 (PST) Subject: [rules-users] Kie-Workbench install error Message-ID: <1390502328318-4027840.post@n3.nabble.com> Hi! I am trying to install the Kie-workbench war to a jboss 7 environment and get the exception below. I would imagine this is because of firewall and my company will not open a connection to this repo. My question: is there a way to have the deployment go through without loading the example projects? Thanks! Caused by: 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) at org.uberfire.backend.server.repositories.git.GitRepositoryFactoryHelper$Proxy$_$$_WeldClientProxy.newRepository(GitRepositoryFactoryHelper$Proxy$_$$_WeldClientProxy.java) at org.uberfire.backend.server.repositories.RepositoryFactoryImpl.newRepository(RepositoryFactoryImpl.java:36) at org.uberfire.backend.server.repositories.RepositoryFactoryImpl$Proxy$_$$_WeldClientProxy.newRepository(RepositoryFactoryImpl$Proxy$_$$_WeldClientProxy.java) at org.uberfire.backend.server.repositories.RepositoryServiceImpl.createRepository(RepositoryServiceImpl.java:182) at org.uberfire.backend.server.repositories.RepositoryServiceImpl.createRepository(RepositoryServiceImpl.java:173) at org.uberfire.backend.server.repositories.RepositoryServiceImpl$Proxy$_$$_WeldClientProxy.createRepository(RepositoryServiceImpl$Proxy$_$$_WeldClientProxy.java) at org.kie.workbench.drools.backend.server.AppSetup.createRepository(AppSetup.java:274) at org.kie.workbench.drools.backend.server.AppSetup.assertPlayground(AppSetup.java:101) ... 43 more -- View this message in context: http://drools.46999.n3.nabble.com/Kie-Workbench-install-error-tp4027840.html Sent from the Drools: User forum mailing list archive at Nabble.com. From mproctor at codehaus.org Thu Jan 23 14:55:49 2014 From: mproctor at codehaus.org (Mark Proctor) Date: Thu, 23 Jan 2014 19:55:49 +0000 Subject: [rules-users] Kie-Workbench install error In-Reply-To: <1390502328318-4027840.post@n3.nabble.com> References: <1390502328318-4027840.post@n3.nabble.com> Message-ID: <1C521A72-40C0-4EF0-82C5-9394D5ACA907@codehaus.org> http://docs.jboss.org/drools/release/6.0.1.Final/drools-docs/html/wb.Workbench.html#wb.Installation 15.1.3. System properties org.kie.demo: Enables external clone of a demo application from GitHub. This System Property takes precedence over org.kie.example. Default: true org.kie.example: Enables example structure composed by Repository, Organization Unit and Project. Default: false Mark On 23 Jan 2014, at 18:38, gboro54 wrote: > Hi! I am trying to install the Kie-workbench war to a jboss 7 environment and > get the exception below. I would imagine this is because of firewall and my > company will not open a connection to this repo. My question: is there a way > to have the deployment go through without loading the example projects? > > Thanks! > > Caused by: 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) > at > org.uberfire.backend.server.repositories.git.GitRepositoryFactoryHelper$Proxy$_$$_WeldClientProxy.newRepository(GitRepositoryFactoryHelper$Proxy$_$$_WeldClientProxy.java) > at > org.uberfire.backend.server.repositories.RepositoryFactoryImpl.newRepository(RepositoryFactoryImpl.java:36) > at > org.uberfire.backend.server.repositories.RepositoryFactoryImpl$Proxy$_$$_WeldClientProxy.newRepository(RepositoryFactoryImpl$Proxy$_$$_WeldClientProxy.java) > at > org.uberfire.backend.server.repositories.RepositoryServiceImpl.createRepository(RepositoryServiceImpl.java:182) > at > org.uberfire.backend.server.repositories.RepositoryServiceImpl.createRepository(RepositoryServiceImpl.java:173) > at > org.uberfire.backend.server.repositories.RepositoryServiceImpl$Proxy$_$$_WeldClientProxy.createRepository(RepositoryServiceImpl$Proxy$_$$_WeldClientProxy.java) > at > org.kie.workbench.drools.backend.server.AppSetup.createRepository(AppSetup.java:274) > at > org.kie.workbench.drools.backend.server.AppSetup.assertPlayground(AppSetup.java:101) > ... 43 more > > > > > -- > View this message in context: http://drools.46999.n3.nabble.com/Kie-Workbench-install-error-tp4027840.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/20140123/6d70838b/attachment-0001.html From gboro54 at gmail.com Thu Jan 23 14:57:54 2014 From: gboro54 at gmail.com (gboro54) Date: Thu, 23 Jan 2014 11:57:54 -0800 (PST) Subject: [rules-users] Kie-Workbench install error In-Reply-To: <1C521A72-40C0-4EF0-82C5-9394D5ACA907@codehaus.org> References: <1390502328318-4027840.post@n3.nabble.com> <1C521A72-40C0-4EF0-82C5-9394D5ACA907@codehaus.org> Message-ID: <1390507074166-4027842.post@n3.nabble.com> I found that 5 minutes after posting...guess it proves you should read documentation before posting... Thanks! Mark Proctor wrote > http://docs.jboss.org/drools/release/6.0.1.Final/drools-docs/html/wb.Workbench.html#wb.Installation > 15.1.3. System properties > > org.kie.demo: Enables external clone of a demo application from GitHub. > This System Property takes precedence over org.kie.example. Default: true > org.kie.example: Enables example structure composed by Repository, > Organization Unit and Project. Default: false > Mark > > On 23 Jan 2014, at 18:38, gboro54 < > gboro54@ > > wrote: > >> Hi! I am trying to install the Kie-workbench war to a jboss 7 environment >> and >> get the exception below. I would imagine this is because of firewall and >> my >> company will not open a connection to this repo. My question: is there a >> way >> to have the deployment go through without loading the example projects? >> >> Thanks! >> >> Caused by: 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) >> at >> org.uberfire.backend.server.repositories.git.GitRepositoryFactoryHelper$Proxy$_$$_WeldClientProxy.newRepository(GitRepositoryFactoryHelper$Proxy$_$$_WeldClientProxy.java) >> at >> org.uberfire.backend.server.repositories.RepositoryFactoryImpl.newRepository(RepositoryFactoryImpl.java:36) >> at >> org.uberfire.backend.server.repositories.RepositoryFactoryImpl$Proxy$_$$_WeldClientProxy.newRepository(RepositoryFactoryImpl$Proxy$_$$_WeldClientProxy.java) >> at >> org.uberfire.backend.server.repositories.RepositoryServiceImpl.createRepository(RepositoryServiceImpl.java:182) >> at >> org.uberfire.backend.server.repositories.RepositoryServiceImpl.createRepository(RepositoryServiceImpl.java:173) >> at >> org.uberfire.backend.server.repositories.RepositoryServiceImpl$Proxy$_$$_WeldClientProxy.createRepository(RepositoryServiceImpl$Proxy$_$$_WeldClientProxy.java) >> at >> org.kie.workbench.drools.backend.server.AppSetup.createRepository(AppSetup.java:274) >> at >> org.kie.workbench.drools.backend.server.AppSetup.assertPlayground(AppSetup.java:101) >> ... 43 more >> >> >> >> >> -- >> View this message in context: >> http://drools.46999.n3.nabble.com/Kie-Workbench-install-error-tp4027840.html >> Sent from the Drools: User forum mailing list archive at Nabble.com. >> _______________________________________________ >> rules-users mailing list >> > rules-users at .jboss >> https://lists.jboss.org/mailman/listinfo/rules-users > > > _______________________________________________ > rules-users mailing list > rules-users at .jboss > https://lists.jboss.org/mailman/listinfo/rules-users -- View this message in context: http://drools.46999.n3.nabble.com/Kie-Workbench-install-error-tp4027840p4027842.html Sent from the Drools: User forum mailing list archive at Nabble.com. From mproctor at codehaus.org Thu Jan 23 14:58:45 2014 From: mproctor at codehaus.org (Mark Proctor) Date: Thu, 23 Jan 2014 19:58:45 +0000 Subject: [rules-users] java dialect and declared types In-Reply-To: <1390493123715-4027834.post@n3.nabble.com> References: <1390480823925-4027822.post@n3.nabble.com> <52E1104B.9060503@gmail.com> <1390488363576-4027827.post@n3.nabble.com> <52E12EE1.9050203@gmail.com> <1390489911789-4027829.post@n3.nabble.com> <1390491239914-4027831.post@n3.nabble.com> <1390493123715-4027834.post@n3.nabble.com> Message-ID: <31949629-49A4-409E-9960-1E407665E133@codehaus.org> The building and loading of rules will take longer. Also there will be no performance games for rule bases that do not have joins. there may be a minor overhead for those, but it should be < 10% difference. Mark On 23 Jan 2014, at 16:05, pmander wrote: > I should qualify this with the way that we are using drools. In general > perhaps 6 is quicker that 5.5. It will be extremely difficult to create a > self contained test to demonstrate this as the tests are performed with tens > of millions of transactions against ten of thousands of rules. > > I will however attempt to scale this down to something that can demonstrate > these findings. This wont happen straight away so pin this thread and > hopefully in a week or so I will be able to submit something. > > > > -- > View this message in context: http://drools.46999.n3.nabble.com/java-dialect-and-declared-types-tp4027822p4027834.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 michael.anstis at gmail.com Thu Jan 23 15:09:02 2014 From: michael.anstis at gmail.com (Michael Anstis) Date: Thu, 23 Jan 2014 20:09:02 +0000 Subject: [rules-users] Kie-Workbench install error In-Reply-To: <1390507074166-4027842.post@n3.nabble.com> References: <1390502328318-4027840.post@n3.nabble.com> <1C521A72-40C0-4EF0-82C5-9394D5ACA907@codehaus.org> <1390507074166-4027842.post@n3.nabble.com> Message-ID: There's also org.kie.example.repositories that can point to a local folder containing the example repositories. The workbench distribution on the drools download page contains a zip holding the example repositories that are at github (for those unable to access github). Sent on the move On 23 Jan 2014 19:58, "gboro54" wrote: > I found that 5 minutes after posting...guess it proves you should read > documentation before posting... Thanks! > > > Mark Proctor wrote > > > http://docs.jboss.org/drools/release/6.0.1.Final/drools-docs/html/wb.Workbench.html#wb.Installation > > 15.1.3. System properties > > > > org.kie.demo: Enables external clone of a demo application from GitHub. > > This System Property takes precedence over org.kie.example. Default: true > > org.kie.example: Enables example structure composed by Repository, > > Organization Unit and Project. Default: false > > Mark > > > > On 23 Jan 2014, at 18:38, gboro54 < > > > gboro54@ > > > > wrote: > > > >> Hi! I am trying to install the Kie-workbench war to a jboss 7 > environment > >> and > >> get the exception below. I would imagine this is because of firewall and > >> my > >> company will not open a connection to this repo. My question: is there a > >> way > >> to have the deployment go through without loading the example projects? > >> > >> Thanks! > >> > >> Caused by: 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) > >> at > >> > org.uberfire.backend.server.repositories.git.GitRepositoryFactoryHelper$Proxy$_$$_WeldClientProxy.newRepository(GitRepositoryFactoryHelper$Proxy$_$$_WeldClientProxy.java) > >> at > >> > org.uberfire.backend.server.repositories.RepositoryFactoryImpl.newRepository(RepositoryFactoryImpl.java:36) > >> at > >> > org.uberfire.backend.server.repositories.RepositoryFactoryImpl$Proxy$_$$_WeldClientProxy.newRepository(RepositoryFactoryImpl$Proxy$_$$_WeldClientProxy.java) > >> at > >> > org.uberfire.backend.server.repositories.RepositoryServiceImpl.createRepository(RepositoryServiceImpl.java:182) > >> at > >> > org.uberfire.backend.server.repositories.RepositoryServiceImpl.createRepository(RepositoryServiceImpl.java:173) > >> at > >> > org.uberfire.backend.server.repositories.RepositoryServiceImpl$Proxy$_$$_WeldClientProxy.createRepository(RepositoryServiceImpl$Proxy$_$$_WeldClientProxy.java) > >> at > >> > org.kie.workbench.drools.backend.server.AppSetup.createRepository(AppSetup.java:274) > >> at > >> > org.kie.workbench.drools.backend.server.AppSetup.assertPlayground(AppSetup.java:101) > >> ... 43 more > >> > >> > >> > >> > >> -- > >> View this message in context: > >> > http://drools.46999.n3.nabble.com/Kie-Workbench-install-error-tp4027840.html > >> Sent from the Drools: User forum mailing list archive at Nabble.com. > >> _______________________________________________ > >> rules-users mailing list > >> > > > rules-users at .jboss > > >> https://lists.jboss.org/mailman/listinfo/rules-users > > > > > > _______________________________________________ > > rules-users mailing list > > > rules-users at .jboss > > > https://lists.jboss.org/mailman/listinfo/rules-users > > > > > > -- > View this message in context: > http://drools.46999.n3.nabble.com/Kie-Workbench-install-error-tp4027840p4027842.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/20140123/8ea76a02/attachment.html From ch007m at gmail.com Fri Jan 24 02:16:49 2014 From: ch007m at gmail.com (Charles Moulliard) Date: Fri, 24 Jan 2014 08:16:49 +0100 Subject: [rules-users] kContainer.newKieSession() fails in Apache Karaf In-Reply-To: <1390496500775-4027838.post@n3.nabble.com> References: <1390437322185-4027815.post@n3.nabble.com> <1390492706283-4027832.post@n3.nabble.com> <1390496500775-4027838.post@n3.nabble.com> Message-ID: Hi Joseph, My example uses this META-INF/kmodules.xml to create the KieBase On Thu, Jan 23, 2014 at 6:01 PM, jhusby wrote: > I actually looked through your example project yesterday; very helpful!!! > However, there are a few things I'm not sure are compatible with what I'm > trying to do. > > 1. I need to rebuild the rules on the fly, so I was using examples from > the IncrementalCompilationTest.java > < > https://github.com/droolsjbpm/drools/blob/master/drools-compiler/src/test/java/org/drools/compiler/integrationtests/IncrementalCompilationTest.java > > > to accomplish that task. However, those tests don't use a classpath > container... can I still rebuild a KieModule via runtime code when running > in a classpathContainer? > > 2. Your example code calls .newKieSession() on a kbase object as opposed > to > a kContainer object. Is there a reason why? If I create a new KieSession > from a kbase vs. kContainer, will I still be able to rebuild the kjar > dynamically in the code and keep using the same stateful session? > > 3. It looks like I'll have to wait until Drools 6.1.0 to get the parameter > to specify a classloader when creating the container? I see you just added > that recently. I've tried using > Thread.currentThread().setContextClassLoader(...) but can't seem to make > that work with Drools 6.0.1 in Karaf 2.3.3 because then > RuleBaseConfiguration sets the classloader and uses it to try resolving > org.drools.core.conflict.DepthConflictResolver, which it can't do because > it's no longer using the OSGi classloader. > > Thank you, > > Joseph > > > Charles Moulliard-2 wrote > > Hi Joseph, > > > > I propose that you have a look to this example which is currently working > > on Karaf - https://github.com/cmoulliard/droolsjbpm-osgi-examples(simple > > = > > OSGI BundleActivator + KieSession + Drools Rules) > > > > Regards, > > > > Charles > > > > > > -- > View this message in context: > http://drools.46999.n3.nabble.com/kContainer-newKieSession-fails-in-Apache-Karaf-tp4027815p4027838.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/20140124/3de01b50/attachment.html From ch007m at gmail.com Fri Jan 24 02:38:01 2014 From: ch007m at gmail.com (Charles Moulliard) Date: Fri, 24 Jan 2014 08:38:01 +0100 Subject: [rules-users] kContainer.newKieSession() fails in Apache Karaf In-Reply-To: <1390496500775-4027838.post@n3.nabble.com> References: <1390437322185-4027815.post@n3.nabble.com> <1390492706283-4027832.post@n3.nabble.com> <1390496500775-4027838.post@n3.nabble.com> Message-ID: Hi Joseph, 1. I need to rebuild the rules on the fly, so I was using examples from the IncrementalCompilationTest.java < https://github.com/droolsjbpm/drools/blob/master/drools-compiler/src/test/java/org/drools/compiler/integrationtests/IncrementalCompilationTest.java > to accomplish that task. However, those tests don't use a classpath container... can I still rebuild a KieModule via runtime code when running in a classpathContainer? >> My example uses this META-INF/kmodules.xml file to let the KieContainer to scan and discover the resources (.drl, pacjkages) when we call KieContainer kcont = ks.newKieClasspathContainer(getClass().getClassLoader()); KieBase kbase = kcont.getKieBase("sampleKBase"); As you have mentioned in your email, this is a static approach as we load the resources before to create a KieSession and fire the rules. To be able to do increment, the approach that you mention is the way to go. I have also created an example where the KieModule is created using a programming approach --> *https://github.com/cmoulliard/droolsjbpm-osgi-examples/blob/master/simple-external-resource/src/main/java/org/drools/example/osgi/FetchExternalResourceOsgiActivator.java . That should not be difficult to adapt it to support increment* 2. Your example code calls .newKieSession() on a kbase object as opposed to a kContainer object. Is there a reason why? If I create a new KieSession from a kbase vs. kContainer, will I still be able to rebuild the kjar dynamically in the code and keep using the same stateful session? I need that Mario Fusco or Marc Proctor confirm what I will say here (or somebody) else but I suspect that if you create a session on the KieContainer level and not on the KieBase could allow you to support increment as this unit test show you ( https://github.com/droolsjbpm/drools/blob/master/drools-compiler/src/test/java/org/drools/compiler/integrationtests/IncrementalCompilationTest.java#L660) without having to recreate a new session (stateless) 3. It looks like I'll have to wait until Drools 6.1.0 to get the parameter to specify a classloader when creating the container? I see you just added that recently. I've tried using Thread.currentThread().setContextClassLoader(...) but can't seem to make that work with Drools 6.0.1 in Karaf 2.3.3 because then RuleBaseConfiguration sets the classloader and uses it to try resolving org.drools.core.conflict.DepthConflictResolver, which it can't do because it's no longer using the OSGi classloader. >> I have no ideas if my modifications will be merged with 6.0.x release. Mario Fusco should be able to provide a response Regards, On Thu, Jan 23, 2014 at 6:01 PM, jhusby wrote: > I actually looked through your example project yesterday; very helpful!!! > However, there are a few things I'm not sure are compatible with what I'm > trying to do. > > 1. I need to rebuild the rules on the fly, so I was using examples from > the IncrementalCompilationTest.java > < > https://github.com/droolsjbpm/drools/blob/master/drools-compiler/src/test/java/org/drools/compiler/integrationtests/IncrementalCompilationTest.java > > > to accomplish that task. However, those tests don't use a classpath > container... can I still rebuild a KieModule via runtime code when running > in a classpathContainer? > > 2. Your example code calls .newKieSession() on a kbase object as opposed > to > a kContainer object. Is there a reason why? If I create a new KieSession > from a kbase vs. kContainer, will I still be able to rebuild the kjar > dynamically in the code and keep using the same stateful session? > > 3. It looks like I'll have to wait until Drools 6.1.0 to get the parameter > to specify a classloader when creating the container? I see you just added > that recently. I've tried using > Thread.currentThread().setContextClassLoader(...) but can't seem to make > that work with Drools 6.0.1 in Karaf 2.3.3 because then > RuleBaseConfiguration sets the classloader and uses it to try resolving > org.drools.core.conflict.DepthConflictResolver, which it can't do because > it's no longer using the OSGi classloader. > > Thank you, > > Joseph > > > Charles Moulliard-2 wrote > > Hi Joseph, > > > > I propose that you have a look to this example which is currently working > > on Karaf - https://github.com/cmoulliard/droolsjbpm-osgi-examples(simple > > = > > OSGI BundleActivator + KieSession + Drools Rules) > > > > Regards, > > > > Charles > > > > > > -- > View this message in context: > http://drools.46999.n3.nabble.com/kContainer-newKieSession-fails-in-Apache-Karaf-tp4027815p4027838.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/20140124/481b895d/attachment-0001.html From mario.fusco at gmail.com Fri Jan 24 02:54:29 2014 From: mario.fusco at gmail.com (Mario Fusco) Date: Thu, 23 Jan 2014 23:54:29 -0800 (PST) Subject: [rules-users] stuck! Unknown accessor type: org.mvel2.optimizers.impl.refl.collection.ArrayCreator@690c2a7a In-Reply-To: <1390477582338-4027820.post@n3.nabble.com> References: <1354202737050-4021015.post@n3.nabble.com> <1389023861262-4027535.post@n3.nabble.com> <83C4A2C0-10C2-4D0F-B827-4A7B6FB43A96@codehaus.org> <1389097306048-4027560.post@n3.nabble.com> <1389711718331-4027682.post@n3.nabble.com> <1390225308598-4027769.post@n3.nabble.com> <1390474231247-4027818.post@n3.nabble.com> <1390477582338-4027820.post@n3.nabble.com> Message-ID: <1390550069929-4027849.post@n3.nabble.com> brachi wrote > 1. does exist an option to dismiss this error, even if it says to disable > this mvel constraints optimizations? It is just an harmless log statement and if you want to silent it you just have to configure your logback.xml file accordingly (i.e. raising the log level of org.drools.core.rule.constraint.MvelConstraint to error). brachi wrote > 2. when and where will it be released? can it be fixed on 5.5 or 5.6? I still don't know if we will drop a 5.6.1 release, but I don't think so. Very likely this fix will be available only on 6.x Mario -- View this message in context: http://drools.46999.n3.nabble.com/stuck-Unknown-accessor-type-org-mvel2-optimizers-impl-refl-collection-ArrayCreator-690c2a7a-tp4020969p4027849.html Sent from the Drools: User forum mailing list archive at Nabble.com. From ch007m at gmail.com Fri Jan 24 02:56:09 2014 From: ch007m at gmail.com (Charles Moulliard) Date: Fri, 24 Jan 2014 08:56:09 +0100 Subject: [rules-users] kContainer.newKieSession() fails in Apache Karaf In-Reply-To: References: <1390437322185-4027815.post@n3.nabble.com> <1390492706283-4027832.post@n3.nabble.com> <1390496500775-4027838.post@n3.nabble.com> Message-ID: Joseph, Concerning the KieSession, here is the response : What is the difference if I create a session on KieContainer vs KieBase (Global, Local List ...) ? there shouldn't be any difference. the possibility of creating a session from a KieContainer is just a shortcut. under the hood it retrieves the KieBase in which that KieSession has been defined (or build it if you're using it for the first time) and then creates the KieSession from there Regards, On Fri, Jan 24, 2014 at 8:38 AM, Charles Moulliard wrote: > Hi Joseph, > > 1. I need to rebuild the rules on the fly, so I was using examples from > the IncrementalCompilationTest.java > < > https://github.com/droolsjbpm/drools/blob/master/drools-compiler/src/test/java/org/drools/compiler/integrationtests/IncrementalCompilationTest.java > > > to accomplish that task. However, those tests don't use a classpath > container... can I still rebuild a KieModule via runtime code when running > in a classpathContainer? > > >> My example uses this META-INF/kmodules.xml file to let the > KieContainer to scan and discover the resources (.drl, pacjkages) when we > call > > KieContainer kcont = ks.newKieClasspathContainer(getClass().getClassLoader()); > KieBase kbase = kcont.getKieBase("sampleKBase"); > > As you have mentioned in your email, this is a static approach as we load the resources before to create a KieSession and fire the rules. > To be able to do increment, the approach that you mention is the way to go. I have also created an example where the KieModule is created using a programming approach --> *https://github.com/cmoulliard/droolsjbpm-osgi-examples/blob/master/simple-external-resource/src/main/java/org/drools/example/osgi/FetchExternalResourceOsgiActivator.java . That should not be difficult to adapt it to support increment* > > > 2. Your example code calls .newKieSession() on a kbase object as opposed > to > a kContainer object. Is there a reason why? If I create a new KieSession > from a kbase vs. kContainer, will I still be able to rebuild the kjar > dynamically in the code and keep using the same stateful session? > > I need that Mario Fusco or Marc Proctor confirm what I will say here (or > somebody) else but I suspect that if you create a session on the > KieContainer level and not on the KieBase could allow you to support > increment as this unit test show you ( > https://github.com/droolsjbpm/drools/blob/master/drools-compiler/src/test/java/org/drools/compiler/integrationtests/IncrementalCompilationTest.java#L660) > without having to recreate a new session (stateless) > > > 3. It looks like I'll have to wait until Drools 6.1.0 to get the parameter > to specify a classloader when creating the container? I see you just added > that recently. I've tried using > Thread.currentThread().setContextClassLoader(...) but can't seem to make > that work with Drools 6.0.1 in Karaf 2.3.3 because then > RuleBaseConfiguration sets the classloader and uses it to try resolving > org.drools.core.conflict.DepthConflictResolver, which it can't do because > it's no longer using the OSGi classloader. > > >> I have no ideas if my modifications will be merged with 6.0.x release. > Mario Fusco should be able to provide a response > > Regards, > > > > On Thu, Jan 23, 2014 at 6:01 PM, jhusby wrote: > >> I actually looked through your example project yesterday; very helpful!!! >> However, there are a few things I'm not sure are compatible with what I'm >> trying to do. >> >> 1. I need to rebuild the rules on the fly, so I was using examples from >> the IncrementalCompilationTest.java >> < >> https://github.com/droolsjbpm/drools/blob/master/drools-compiler/src/test/java/org/drools/compiler/integrationtests/IncrementalCompilationTest.java >> > >> to accomplish that task. However, those tests don't use a classpath >> container... can I still rebuild a KieModule via runtime code when running >> in a classpathContainer? >> >> 2. Your example code calls .newKieSession() on a kbase object as opposed >> to >> a kContainer object. Is there a reason why? If I create a new KieSession >> from a kbase vs. kContainer, will I still be able to rebuild the kjar >> dynamically in the code and keep using the same stateful session? >> >> 3. It looks like I'll have to wait until Drools 6.1.0 to get the >> parameter >> to specify a classloader when creating the container? I see you just >> added >> that recently. I've tried using >> Thread.currentThread().setContextClassLoader(...) but can't seem to make >> that work with Drools 6.0.1 in Karaf 2.3.3 because then >> RuleBaseConfiguration sets the classloader and uses it to try resolving >> org.drools.core.conflict.DepthConflictResolver, which it can't do because >> it's no longer using the OSGi classloader. >> >> Thank you, >> >> Joseph >> >> >> Charles Moulliard-2 wrote >> > Hi Joseph, >> > >> > I propose that you have a look to this example which is currently >> working >> > on Karaf - https://github.com/cmoulliard/droolsjbpm-osgi-examples(simple >> > = >> > OSGI BundleActivator + KieSession + Drools Rules) >> > >> > Regards, >> > >> > Charles >> >> >> >> >> >> -- >> View this message in context: >> http://drools.46999.n3.nabble.com/kContainer-newKieSession-fails-in-Apache-Karaf-tp4027815p4027838.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 > > -- 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/20140124/da46f191/attachment.html From jonathan.labin at gmail.com Fri Jan 24 16:56:57 2014 From: jonathan.labin at gmail.com (jonathan.labin) Date: Fri, 24 Jan 2014 13:56:57 -0800 (PST) Subject: [rules-users] SwapMove for Entities with different Value ranges Message-ID: <1390600617095-4027852.post@n3.nabble.com> I'd like to implement something like a swap move but in my domain each Planning Entity has it's own value range provider. The value ranges are completely disjoint sets of value instances although two values from separate ranges can be considered equivalent for the purposes of the swap. I have started implementing my move using ShiftAssignmentSwapMove as a template however I want to be correct and efficient about how and when the work of searching for the value from the leftEntity's value range that is equivalent to the rightEntity's current value. The methods isMoveDoable and doMove must both have this identification made. Can they share the answer with a class variable in a way that is safe under caching configurations? Is there a recommendation for minimizing the repeated effort to identify these equivalent values? Thanks, Jon -- View this message in context: http://drools.46999.n3.nabble.com/SwapMove-for-Entities-with-different-Value-ranges-tp4027852.html Sent from the Drools: User forum mailing list archive at Nabble.com. From rexxe98 at gmail.com Sat Jan 25 16:59:32 2014 From: rexxe98 at gmail.com (Andrew Berman) Date: Sat, 25 Jan 2014 13:59:32 -0800 Subject: [rules-users] NullPointerException with kie-spring 6.0.1 and Spring 4.0 Message-ID: Hello, I'm trying to play around with Drool 6.0.1 integration with Spring (I'm using spring-boot which includes spring 4.0). I've looked at the unit tests written and have copied them pretty much exactly. When I start the app, I consistently receive: Caused by: org.springframework.beans.BeanInstantiationException: Could not instantiate bean class [org.kie.spring.KModuleBeanFactoryPostProcessor]: Constructor threw exception; nested exception is java.lang.NullPointerException at org.springframework.beans.BeanUtils.instantiateClass(BeanUtils.java:164) at org.springframework.beans.factory.support.SimpleInstantiationStrategy.instantiate(SimpleInstantiationStrategy.java:89) at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.instantiateBean(AbstractAutowireCapableBeanFactory.java:1069) ... 22 more Caused by: java.lang.NullPointerException at org.kie.spring.KModuleBeanFactoryPostProcessor.initConfigFilePath(KModuleBeanFactoryPostProcessor.java:79) at org.kie.spring.KModuleBeanFactoryPostProcessor.(KModuleBeanFactoryPostProcessor.java:64) at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method) at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:57) at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45) at java.lang.reflect.Constructor.newInstance(Constructor.java:526) at org.springframework.beans.BeanUtils.instantiateClass(BeanUtils.java:148) When debugging the NPE comes from line 79, getClass().getResource("/").getPath(), because getResource yields null. Here is my spring context file: Can someone help out? Thanks!! -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.jboss.org/pipermail/rules-users/attachments/20140125/2b8f7b57/attachment-0001.html From swaroop.oggu at gmail.com Sat Jan 25 17:48:19 2014 From: swaroop.oggu at gmail.com (swaroop) Date: Sat, 25 Jan 2014 14:48:19 -0800 (PST) Subject: [rules-users] Scala-Drools Guvnor Message-ID: <1390690098794-4027855.post@n3.nabble.com> Hi , Does Guvnor or RuleWorkbench support the scala object model(Exported as jar) ? When i tried with simple scala case classes, I was able to upload the model(After adding the scala lib to Guvnor Lib directory) but was not able to see the classes when iam composing a rule . Any pointers would be helpful Regards Oggu -- View this message in context: http://drools.46999.n3.nabble.com/Scala-Drools-Guvnor-tp4027855.html Sent from the Drools: User forum mailing list archive at Nabble.com. From jeanmarc.vanel at gmail.com Sun Jan 26 05:22:30 2014 From: jeanmarc.vanel at gmail.com (Jean-Marc Vanel) Date: Sun, 26 Jan 2014 11:22:30 +0100 Subject: [rules-users] Scala-Drools Guvnor In-Reply-To: <1390690098794-4027855.post@n3.nabble.com> References: <1390690098794-4027855.post@n3.nabble.com> Message-ID: Hi Oggu When you have a property pp in your Scala, the Scala compiler generates a method pp(), not getPp() as Drools and many Java tools expect (the JavaBeans specification). Try this to see what happens; echo 'case class C1 ( pp1: Int, var pp2:String )' > case_class.scala scalac case_class.scala javap C1.class | grep pp public int pp1(); public java.lang.String pp2(); public void pp2_$eq(java.lang.String); Instead in Scala you can do: import scala.reflect.{BeanProperty, BooleanBeanProperty} class C1 { @BeanProperty val pp1: Int = 0; @BeanProperty var pp2:String = "" } 2014-01-25 swaroop > Hi , > > Does Guvnor or RuleWorkbench support the scala object model(Exported as > jar) > ? When i tried with simple scala case classes, I was able to upload the > model(After adding the scala lib to Guvnor Lib directory) but was not able > to see the classes when iam composing a rule . Any pointers would be > helpful > > Regards > Oggu > > > > -- > View this message in context: > http://drools.46999.n3.nabble.com/Scala-Drools-Guvnor-tp4027855.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 > -- Jean-Marc Vanel D?ductions SARL - Consulting, services, training, Rule-based programming, Semantic Web http://deductions-software.com/ +33 (0)6 89 16 29 52 Twitter: @jmvanel , @jmvanel_fr ; chat: irc://irc.freenode.net#eulergui -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.jboss.org/pipermail/rules-users/attachments/20140126/4b5be601/attachment.html From vinodkiran at usa.net Sun Jan 26 10:50:41 2014 From: vinodkiran at usa.net (vinodkiran) Date: Sun, 26 Jan 2014 07:50:41 -0800 (PST) Subject: [rules-users] NullPointerException with kie-spring 6.0.1 and Spring 4.0 In-Reply-To: References: Message-ID: <1390751441563-4027858.post@n3.nabble.com> Andrew, I am able to reproduce the NPE with spring-boot and Spring 4.0. I am running some tests locally to isolate the exact cause. --Vinod -- View this message in context: http://drools.46999.n3.nabble.com/rules-users-NullPointerException-with-kie-spring-6-0-1-and-Spring-4-0-tp4027854p4027858.html Sent from the Drools: User forum mailing list archive at Nabble.com. From vinodkiran at usa.net Sun Jan 26 12:47:06 2014 From: vinodkiran at usa.net (vinodkiran) Date: Sun, 26 Jan 2014 09:47:06 -0800 (PST) Subject: [rules-users] NullPointerException with kie-spring 6.0.1 and Spring 4.0 In-Reply-To: <1390751441563-4027858.post@n3.nabble.com> References: <1390751441563-4027858.post@n3.nabble.com> Message-ID: <1390758426693-4027859.post@n3.nabble.com> Andrew, 1. The NPE happens when you execute a spring-boot project via a jar (e.g: java -jar target/kie-spring-boot-0.1.0.jar) If you execute the same project using 'mvn exec:java' the NPE is not seen and we are able to move forward. 2. However, Spring Boot/Spring 4.0 seems to be creating some beans with no names. This causes a NPE with kie-spring in a different location. I have fixed this and submitted a PR for the changes. This might be available in the next release. Try running this example with the latest snapshot in a day or two. I have uploaded my code to to github (https://github.com/vinodkiran/kie-spring-boot) --Vinod PS: the reported NPE seems to be related to https://github.com/spring-projects/spring-boot/pull/41 -- View this message in context: http://drools.46999.n3.nabble.com/rules-users-NullPointerException-with-kie-spring-6-0-1-and-Spring-4-0-tp4027854p4027859.html Sent from the Drools: User forum mailing list archive at Nabble.com. From clickthex at yahoo.com Sun Jan 26 19:30:18 2014 From: clickthex at yahoo.com (SrjTx) Date: Sun, 26 Jan 2014 16:30:18 -0800 (PST) Subject: [rules-users] Can't get snmp/log4j to work with 6.0.1.F KIE-WB (this is a tough one!) Message-ID: <1390782617832-4027860.post@n3.nabble.com> This is long, but please hang in there, this is driving me nuts. Keep and eye out for the /javax/jms/JMSException/ Any idea, hints, or solutions would be greatly appreciated! So I need to access to snmp4j-1.10.1.jar in kie-wb, but it doesn't have a pom file, so I rebuilt it to have the one at http://repo1.maven.org/maven2/org/snmp4j/snmp4j/1.10.1/snmp4j-1.10.1.pom So now it depends on a very old version of log4j: log4jlog4j1.2.9 log4j 1.2.9 doesn't have a pom, so I created the following pom that depends on jboss-jms-api_1.1_spec-1.0.1.Final.jar - which has /javax/jms/MessageListener.class/ as shown by: jar tf /opt/jboss-as-7.2.0.Final/standalone/deployments/kie-drools-wb.war/WEB-INF/lib/jboss-jms-api_1.1_spec-1.0.1.Final.jar | grep MessageListener /javax/jms/MessageListener.class/ pom.xml for log4j 4.0.0 log4j log4j 1.2.9 guvnor-m2-repo Guvnor M2 Repo http://localhost:8080/kie-drools-wb/maven2/ org.jboss.spec.javax.jms jboss-jms-api_1.1_spec 1.0.1.Final All of which results in the following errors in kie-wb An error was found during external classes check. The external class org.apache.log4j.net.JMSAppender did not pass the verification. Please check the external .jar files configured as dependencies for this project. The low level error is: : /javax/jms/JMSException/
An error was found during external classes check. The external class org.apache.log4j.net.SMTPAppender did not pass the verification. Please check the external .jar files configured as dependencies for this project. The low level error is: : javax/mail/Address
An error was found during external classes check. The external class com.securelogix.common.logging.NGPMailer did not pass the verification. Please check the external .jar files configured as dependencies for this project. The low level error is: : javax/mail/Address
An error was found during external classes check. The external class org.jboss.logging.Log4jLogger did not pass the verification. Please check the external .jar files configured as dependencies for this project. The low level error is: : org/apache/log4j/Priority
An error was found during external classes check. The external class org.jboss.logging.Slf4jLogger did not pass the verification. Please check the external .jar files configured as dependencies for this project. The low level error is: : org/slf4j/Logger
An error was found during external classes check. The external class org.jboss.logging.Slf4jLocationAwareLogger did not pass the verification. Please check the external .jar files configured as dependencies for this project. The low level error is: : org/slf4j/spi/LocationAwareLogger and the following on jboss startup 17:53:51,124 WARN [org.jboss.modules] (http-/127.0.0.1:8080-4) Failed to define class org.apache.log4j.net.JMSSink in Module "org.jboss.log4j.logmanager:main" from local module loader @4f67c097 (finder: local module finder @2495223b (roots: /opt/jboss-as-7.2.0.Final/modules,/opt/jboss-as-7.2.0.Final/modules/system/layers/brms,/opt/jboss-as-7.2.0.Final/modules/system/layers/soa,/opt/jboss-as-7.2.0.Final/modules/system/layers/base)): java.lang.LinkageError: Failed to link org/apache/log4j/net/JMSSink (Module "org.jboss.log4j.logmanager:main" from local module loader @4f67c097 (finder: local module finder @2495223b (roots: /opt/jboss-as-7.2.0.Final/modules,/opt/jboss-as-7.2.0.Final/modules/system/layers/brms,/opt/jboss-as-7.2.0.Final/modules/system/layers/soa,/opt/jboss-as-7.2.0.Final/modules/system/layers/base))) at org.jboss.modules.ModuleClassLoader.defineClass(ModuleClassLoader.java:407) [jboss-modules.jar:1.2.0.CR1] at org.jboss.modules.ModuleClassLoader.loadClassLocal(ModuleClassLoader.java:254) [jboss-modules.jar:1.2.0.CR1] at org.jboss.modules.ModuleClassLoader$1.loadClassLocal(ModuleClassLoader.java:73) [jboss-modules.jar:1.2.0.CR1] at org.jboss.modules.Module.loadModuleClass(Module.java:518) [jboss-modules.jar:1.2.0.CR1] at org.jboss.modules.ModuleClassLoader.findClass(ModuleClassLoader.java:182) [jboss-modules.jar:1.2.0.CR1] at org.jboss.modules.ConcurrentClassLoader.performLoadClassUnchecked(ConcurrentClassLoader.java:468) [jboss-modules.jar:1.2.0.CR1] at org.jboss.modules.ConcurrentClassLoader.performLoadClassChecked(ConcurrentClassLoader.java:456) [jboss-modules.jar:1.2.0.CR1] at org.jboss.modules.ConcurrentClassLoader.performLoadClass(ConcurrentClassLoader.java:398) [jboss-modules.jar:1.2.0.CR1] at org.jboss.modules.ConcurrentClassLoader.loadClass(ConcurrentClassLoader.java:120) [jboss-modules.jar:1.2.0.CR1] at java.lang.Class.forName0(Native Method) [rt.jar:1.7.0_10] at java.lang.Class.forName(Class.java:264) [rt.jar:1.7.0_10] at org.drools.core.common.ProjectClassLoader.internalLoadClass(ProjectClassLoader.java:95) [drools-core-6.0.1.Final.jar:6.0.1.Final] at org.drools.core.common.ProjectClassLoader.loadClass(ProjectClassLoader.java:82) [drools-core-6.0.1.Final.jar:6.0.1.Final] at java.lang.ClassLoader.loadClass(ClassLoader.java:356) [rt.jar:1.7.0_10] at java.lang.Class.forName0(Native Method) [rt.jar:1.7.0_10] at java.lang.Class.forName(Class.java:264) [rt.jar:1.7.0_10] at org.kie.scanner.KieModuleMetaDataImpl.getClass(KieModuleMetaDataImpl.java:91) [kie-ci-6.0.1.Final.jar:6.0.1.Final] at org.guvnor.common.services.builder.Builder.build(Builder.java:162) [guvnor-project-builder-6.0.1.Final.jar:6.0.1.Final] at org.guvnor.common.services.builder.BuildServiceImpl.doBuild(BuildServiceImpl.java:122) [guvnor-project-builder-6.0.1.Final.jar:6.0.1.Final] at org.guvnor.common.services.builder.BuildServiceImpl.build(BuildServiceImpl.java:77) [guvnor-project-builder-6.0.1.Final.jar:6.0.1.Final] at org.guvnor.common.services.builder.BuildServiceImpl$Proxy$_$$_WeldClientProxy.build(BuildServiceImpl$Proxy$_$$_WeldClientProxy.java) [guvnor-project-builder-6.0.1.Final.jar:6.0.1.Final] at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) [rt.jar:1.7.0_10] at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57) [rt.jar:1.7.0_10] at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) [rt.jar:1.7.0_10] at java.lang.reflect.Method.invoke(Method.java:601) [rt.jar:1.7.0_10] at org.jboss.errai.bus.server.io.AbstractRPCMethodCallback.invokeMethodFromMessage(AbstractRPCMethodCallback.java:48) [errai-bus-2.4.3.Final.jar:2.4.3.Final] at org.jboss.errai.bus.server.io.ValueReplyRPCEndpointCallback.callback(ValueReplyRPCEndpointCallback.java:22) [errai-bus-2.4.3.Final.jar:2.4.3.Final] at org.jboss.errai.bus.server.io.RemoteServiceCallback.callback(RemoteServiceCallback.java:54) [errai-bus-2.4.3.Final.jar:2.4.3.Final] at org.jboss.errai.cdi.server.CDIExtensionPoints$3.callback(CDIExtensionPoints.java:499) [errai-weld-integration-2.4.3.Final.jar:2.4.3.Final] at org.jboss.errai.bus.server.DeliveryPlan.deliver(DeliveryPlan.java:47) [errai-bus-2.4.3.Final.jar:2.4.3.Final] at org.jboss.errai.bus.server.ServerMessageBusImpl.sendGlobal(ServerMessageBusImpl.java:284) [errai-bus-2.4.3.Final.jar:2.4.3.Final] at org.jboss.errai.bus.server.SimpleDispatcher.dispatchGlobal(SimpleDispatcher.java:46) [errai-bus-2.4.3.Final.jar:2.4.3.Final] at org.jboss.errai.bus.server.service.ErraiServiceImpl.store(ErraiServiceImpl.java:92) [errai-bus-2.4.3.Final.jar:2.4.3.Final] at org.jboss.errai.bus.server.service.ErraiServiceImpl.store(ErraiServiceImpl.java:109) [errai-bus-2.4.3.Final.jar:2.4.3.Final] at org.jboss.errai.bus.server.servlet.DefaultBlockingServlet.doPost(DefaultBlockingServlet.java:140) [errai-bus-2.4.3.Final.jar:2.4.3.Final] at javax.servlet.http.HttpServlet.service(HttpServlet.java:754) [jboss-servlet-api_3.0_spec-1.0.2.Final.jar:1.0.2.Final] at javax.servlet.http.HttpServlet.service(HttpServlet.java:847) [jboss-servlet-api_3.0_spec-1.0.2.Final.jar:1.0.2.Final] at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:295) [jbossweb-7.2.0.Final.jar:7.2.0.Final] at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:214) [jbossweb-7.2.0.Final.jar:7.2.0.Final] at org.jboss.solder.servlet.exception.CatchExceptionFilter.doFilter(CatchExceptionFilter.java:65) [solder-impl-3.2.1.Final.jar:3.2.1.Final] at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:246) [jbossweb-7.2.0.Final.jar:7.2.0.Final] at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:214) [jbossweb-7.2.0.Final.jar:7.2.0.Final] at org.jboss.solder.servlet.event.ServletEventBridgeFilter.doFilter(ServletEventBridgeFilter.java:74) [solder-impl-3.2.1.Final.jar:3.2.1.Final] at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:246) [jbossweb-7.2.0.Final.jar:7.2.0.Final] at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:214) [jbossweb-7.2.0.Final.jar:7.2.0.Final] at org.jbpm.designer.web.filter.impl.PluggableFilter.doFilter(PluggableFilter.java:70) [jbpm-designer-backend-6.0.1.Final.jar:6.0.1.Final] at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:246) [jbossweb-7.2.0.Final.jar:7.2.0.Final] at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:214) [jbossweb-7.2.0.Final.jar:7.2.0.Final] at org.uberfire.security.server.UberFireSecurityFilter.doFilter(UberFireSecurityFilter.java:266) [uberfire-security-server-0.3.1.Final.jar:0.3.1.Final] at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:246) [jbossweb-7.2.0.Final.jar:7.2.0.Final] at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:214) [jbossweb-7.2.0.Final.jar:7.2.0.Final] at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:230) [jbossweb-7.2.0.Final.jar:7.2.0.Final] at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:149) [jbossweb-7.2.0.Final.jar:7.2.0.Final] at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:481) [jbossweb-7.2.0.Final.jar:7.2.0.Final] at org.jboss.as.jpa.interceptor.WebNonTxEmCloserValve.invoke(WebNonTxEmCloserValve.java:50) [jboss-as-jpa-7.2.0.Final.jar:7.2.0.Final] at org.jboss.as.jpa.interceptor.WebNonTxEmCloserValve.invoke(WebNonTxEmCloserValve.java:50) [jboss-as-jpa-7.2.0.Final.jar:7.2.0.Final] at org.jboss.as.web.security.SecurityContextAssociationValve.invoke(SecurityContextAssociationValve.java:169) [jboss-as-web-7.2.0.Final.jar:7.2.0.Final] at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:145) [jbossweb-7.2.0.Final.jar:7.2.0.Final] at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:97) [jbossweb-7.2.0.Final.jar:7.2.0.Final] at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:102) [jbossweb-7.2.0.Final.jar:7.2.0.Final] at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:336) [jbossweb-7.2.0.Final.jar:7.2.0.Final] at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:856) [jbossweb-7.2.0.Final.jar:7.2.0.Final] at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:653) [jbossweb-7.2.0.Final.jar:7.2.0.Final] at org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:920) [jbossweb-7.2.0.Final.jar:7.2.0.Final] at java.lang.Thread.run(Thread.java:722) [rt.jar:1.7.0_10] Caused by: java.lang.NoClassDefFoundError:/ javax/jms/MessageListener/ at java.lang.ClassLoader.defineClass1(Native Method) [rt.jar:1.7.0_10] at java.lang.ClassLoader.defineClass(ClassLoader.java:791) [rt.jar:1.7.0_10] at java.security.SecureClassLoader.defineClass(SecureClassLoader.java:142) [rt.jar:1.7.0_10] at org.jboss.modules.ModuleClassLoader.doDefineOrLoadClass(ModuleClassLoader.java:338) [jboss-modules.jar:1.2.0.CR1] at org.jboss.modules.ModuleClassLoader.defineClass(ModuleClassLoader.java:402) [jboss-modules.jar:1.2.0.CR1] ... 64 more Caused by: java.lang.ClassNotFoundException:/ javax.jms.MessageListener/ from [Module "org.jboss.log4j.logmanager:main" from local module loader @4f67c097 (finder: local module finder @2495223b (roots: /opt/jboss-as-7.2.0.Final/modules,/opt/jboss-as-7.2.0.Final/modules/system/layers/brms,/opt/jboss-as-7.2.0.Final/modules/system/layers/soa,/opt/jboss-as-7.2.0.Final/modules/system/layers/base))] at org.jboss.modules.ModuleClassLoader.findClass(ModuleClassLoader.java:190) [jboss-modules.jar:1.2.0.CR1] at org.jboss.modules.ConcurrentClassLoader.performLoadClassUnchecked(ConcurrentClassLoader.java:468) [jboss-modules.jar:1.2.0.CR1] at org.jboss.modules.ConcurrentClassLoader.performLoadClassChecked(ConcurrentClassLoader.java:456) [jboss-modules.jar:1.2.0.CR1] at org.jboss.modules.ConcurrentClassLoader.performLoadClass(ConcurrentClassLoader.java:398) [jboss-modules.jar:1.2.0.CR1] at org.jboss.modules.ConcurrentClassLoader.loadClass(ConcurrentClassLoader.java:120) [jboss-modules.jar:1.2.0.CR1] ... 69 more -- View this message in context: http://drools.46999.n3.nabble.com/Can-t-get-snmp-log4j-to-work-with-6-0-1-F-KIE-WB-this-is-a-tough-one-tp4027860.html Sent from the Drools: User forum mailing list archive at Nabble.com. From michael.anstis at gmail.com Mon Jan 27 01:29:23 2014 From: michael.anstis at gmail.com (Michael Anstis) Date: Mon, 27 Jan 2014 06:29:23 +0000 Subject: [rules-users] Can't get snmp/log4j to work with 6.0.1.F KIE-WB (this is a tough one!) In-Reply-To: <1390782617832-4027860.post@n3.nabble.com> References: <1390782617832-4027860.post@n3.nabble.com> Message-ID: Hi, Firstly if you want to use a JAR that doesn't have a POM you should be able to upload it "as is" to the workbench that should prompt you for the POM GAV and it'll inject a simple POM into the JAR for you. Secondly, all the errors you show indicate additional dependencies that are missing. For example the definition for class JMSException cannot be found at runtime. Maven dependencies that are scope "provided" exhibit this behaviour. In your case I would have to assume the missing classes would have normally been provided by the (J2EE?) application server. With kind regards, Mike Sent on the move On 27 Jan 2014 00:32, "SrjTx" wrote: > This is long, but please hang in there, this is driving me nuts. > > Keep and eye out for the /javax/jms/JMSException/ > > Any idea, hints, or solutions would be greatly appreciated! > > > So I need to access to snmp4j-1.10.1.jar in kie-wb, but it doesn't have a > pom file, so I rebuilt it to have the one at > http://repo1.maven.org/maven2/org/snmp4j/snmp4j/1.10.1/snmp4j-1.10.1.pom > > > So now it depends on a very old version of log4j: > > > log4jlog4j1.2.9 > > > log4j 1.2.9 doesn't have a pom, so I created the following pom that depends > on jboss-jms-api_1.1_spec-1.0.1.Final.jar - which has > /javax/jms/MessageListener.class/ as shown by: > > jar tf > > /opt/jboss-as-7.2.0.Final/standalone/deployments/kie-drools-wb.war/WEB-INF/lib/jboss-jms-api_1.1_spec-1.0.1.Final.jar > | grep MessageListener > /javax/jms/MessageListener.class/ > > > > pom.xml for log4j > > > xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 > http://maven.apache.org/xsd/maven-4.0.0.xsd" > xmlns="http://maven.apache.org/POM/4.0.0" > xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"> > 4.0.0 > > log4j > log4j > 1.2.9 > > > > guvnor-m2-repo > Guvnor M2 Repo > http://localhost:8080/kie-drools-wb/maven2/ > > > > > > org.jboss.spec.javax.jms > jboss-jms-api_1.1_spec > 1.0.1.Final > > > > > All of which results in the following errors in kie-wb > > > An error was found during external classes check. The external class > org.apache.log4j.net.JMSAppender did not pass the verification. Please > check > the external .jar files configured as dependencies for this project. The > low > level error is: : /javax/jms/JMSException/ > >
> > An error was found during external classes check. The external class > org.apache.log4j.net.SMTPAppender did not pass the verification. Please > check the external .jar files configured as dependencies for this project. > The low level error is: : javax/mail/Address > >
> > An error was found during external classes check. The external class > com.securelogix.common.logging.NGPMailer did not pass the verification. > Please check the external .jar files configured as dependencies for this > project. The low level error is: : javax/mail/Address > >
> > An error was found during external classes check. The external class > org.jboss.logging.Log4jLogger did not pass the verification. Please check > the external .jar files configured as dependencies for this project. The > low > level error is: : org/apache/log4j/Priority > >
> > An error was found during external classes check. The external class > org.jboss.logging.Slf4jLogger did not pass the verification. Please check > the external .jar files configured as dependencies for this project. The > low > level error is: : org/slf4j/Logger > >
> > An error was found during external classes check. The external class > org.jboss.logging.Slf4jLocationAwareLogger did not pass the verification. > Please check the external .jar files configured as dependencies for this > project. The low level error is: : org/slf4j/spi/LocationAwareLogger > > > > and the following on jboss startup > > 17:53:51,124 WARN [org.jboss.modules] (http-/127.0.0.1:8080-4) Failed to > define class org.apache.log4j.net.JMSSink in Module > "org.jboss.log4j.logmanager:main" from local module loader @4f67c097 > (finder: local module finder @2495223b (roots: > > /opt/jboss-as-7.2.0.Final/modules,/opt/jboss-as-7.2.0.Final/modules/system/layers/brms,/opt/jboss-as-7.2.0.Final/modules/system/layers/soa,/opt/jboss-as-7.2.0.Final/modules/system/layers/base)): > java.lang.LinkageError: Failed to link org/apache/log4j/net/JMSSink (Module > "org.jboss.log4j.logmanager:main" from local module loader @4f67c097 > (finder: local module finder @2495223b (roots: > > /opt/jboss-as-7.2.0.Final/modules,/opt/jboss-as-7.2.0.Final/modules/system/layers/brms,/opt/jboss-as-7.2.0.Final/modules/system/layers/soa,/opt/jboss-as-7.2.0.Final/modules/system/layers/base))) > at > org.jboss.modules.ModuleClassLoader.defineClass(ModuleClassLoader.java:407) > [jboss-modules.jar:1.2.0.CR1] > at > > org.jboss.modules.ModuleClassLoader.loadClassLocal(ModuleClassLoader.java:254) > [jboss-modules.jar:1.2.0.CR1] > at > > org.jboss.modules.ModuleClassLoader$1.loadClassLocal(ModuleClassLoader.java:73) > [jboss-modules.jar:1.2.0.CR1] > at org.jboss.modules.Module.loadModuleClass(Module.java:518) > [jboss-modules.jar:1.2.0.CR1] > at > org.jboss.modules.ModuleClassLoader.findClass(ModuleClassLoader.java:182) > [jboss-modules.jar:1.2.0.CR1] > at > > org.jboss.modules.ConcurrentClassLoader.performLoadClassUnchecked(ConcurrentClassLoader.java:468) > [jboss-modules.jar:1.2.0.CR1] > at > > org.jboss.modules.ConcurrentClassLoader.performLoadClassChecked(ConcurrentClassLoader.java:456) > [jboss-modules.jar:1.2.0.CR1] > at > > org.jboss.modules.ConcurrentClassLoader.performLoadClass(ConcurrentClassLoader.java:398) > [jboss-modules.jar:1.2.0.CR1] > at > > org.jboss.modules.ConcurrentClassLoader.loadClass(ConcurrentClassLoader.java:120) > [jboss-modules.jar:1.2.0.CR1] > at java.lang.Class.forName0(Native Method) [rt.jar:1.7.0_10] > at java.lang.Class.forName(Class.java:264) [rt.jar:1.7.0_10] > at > > org.drools.core.common.ProjectClassLoader.internalLoadClass(ProjectClassLoader.java:95) > [drools-core-6.0.1.Final.jar:6.0.1.Final] > at > > org.drools.core.common.ProjectClassLoader.loadClass(ProjectClassLoader.java:82) > [drools-core-6.0.1.Final.jar:6.0.1.Final] > at java.lang.ClassLoader.loadClass(ClassLoader.java:356) > [rt.jar:1.7.0_10] > at java.lang.Class.forName0(Native Method) [rt.jar:1.7.0_10] > at java.lang.Class.forName(Class.java:264) [rt.jar:1.7.0_10] > at > > org.kie.scanner.KieModuleMetaDataImpl.getClass(KieModuleMetaDataImpl.java:91) > [kie-ci-6.0.1.Final.jar:6.0.1.Final] > at > org.guvnor.common.services.builder.Builder.build(Builder.java:162) > [guvnor-project-builder-6.0.1.Final.jar:6.0.1.Final] > at > > org.guvnor.common.services.builder.BuildServiceImpl.doBuild(BuildServiceImpl.java:122) > [guvnor-project-builder-6.0.1.Final.jar:6.0.1.Final] > at > > org.guvnor.common.services.builder.BuildServiceImpl.build(BuildServiceImpl.java:77) > [guvnor-project-builder-6.0.1.Final.jar:6.0.1.Final] > at > > org.guvnor.common.services.builder.BuildServiceImpl$Proxy$_$$_WeldClientProxy.build(BuildServiceImpl$Proxy$_$$_WeldClientProxy.java) > [guvnor-project-builder-6.0.1.Final.jar:6.0.1.Final] > at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) > [rt.jar:1.7.0_10] > at > > sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57) > [rt.jar:1.7.0_10] > at > > sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) > [rt.jar:1.7.0_10] > at java.lang.reflect.Method.invoke(Method.java:601) > [rt.jar:1.7.0_10] > at > > org.jboss.errai.bus.server.io.AbstractRPCMethodCallback.invokeMethodFromMessage(AbstractRPCMethodCallback.java:48) > [errai-bus-2.4.3.Final.jar:2.4.3.Final] > at > > org.jboss.errai.bus.server.io.ValueReplyRPCEndpointCallback.callback(ValueReplyRPCEndpointCallback.java:22) > [errai-bus-2.4.3.Final.jar:2.4.3.Final] > at > > org.jboss.errai.bus.server.io.RemoteServiceCallback.callback(RemoteServiceCallback.java:54) > [errai-bus-2.4.3.Final.jar:2.4.3.Final] > at > > org.jboss.errai.cdi.server.CDIExtensionPoints$3.callback(CDIExtensionPoints.java:499) > [errai-weld-integration-2.4.3.Final.jar:2.4.3.Final] > at > org.jboss.errai.bus.server.DeliveryPlan.deliver(DeliveryPlan.java:47) > [errai-bus-2.4.3.Final.jar:2.4.3.Final] > at > > org.jboss.errai.bus.server.ServerMessageBusImpl.sendGlobal(ServerMessageBusImpl.java:284) > [errai-bus-2.4.3.Final.jar:2.4.3.Final] > at > > org.jboss.errai.bus.server.SimpleDispatcher.dispatchGlobal(SimpleDispatcher.java:46) > [errai-bus-2.4.3.Final.jar:2.4.3.Final] > at > > org.jboss.errai.bus.server.service.ErraiServiceImpl.store(ErraiServiceImpl.java:92) > [errai-bus-2.4.3.Final.jar:2.4.3.Final] > at > > org.jboss.errai.bus.server.service.ErraiServiceImpl.store(ErraiServiceImpl.java:109) > [errai-bus-2.4.3.Final.jar:2.4.3.Final] > at > > org.jboss.errai.bus.server.servlet.DefaultBlockingServlet.doPost(DefaultBlockingServlet.java:140) > [errai-bus-2.4.3.Final.jar:2.4.3.Final] > at javax.servlet.http.HttpServlet.service(HttpServlet.java:754) > [jboss-servlet-api_3.0_spec-1.0.2.Final.jar:1.0.2.Final] > at javax.servlet.http.HttpServlet.service(HttpServlet.java:847) > [jboss-servlet-api_3.0_spec-1.0.2.Final.jar:1.0.2.Final] > at > > org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:295) > [jbossweb-7.2.0.Final.jar:7.2.0.Final] > at > > org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:214) > [jbossweb-7.2.0.Final.jar:7.2.0.Final] > at > > org.jboss.solder.servlet.exception.CatchExceptionFilter.doFilter(CatchExceptionFilter.java:65) > [solder-impl-3.2.1.Final.jar:3.2.1.Final] > at > > org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:246) > [jbossweb-7.2.0.Final.jar:7.2.0.Final] > at > > org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:214) > [jbossweb-7.2.0.Final.jar:7.2.0.Final] > at > > org.jboss.solder.servlet.event.ServletEventBridgeFilter.doFilter(ServletEventBridgeFilter.java:74) > [solder-impl-3.2.1.Final.jar:3.2.1.Final] > at > > org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:246) > [jbossweb-7.2.0.Final.jar:7.2.0.Final] > at > > org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:214) > [jbossweb-7.2.0.Final.jar:7.2.0.Final] > at > > org.jbpm.designer.web.filter.impl.PluggableFilter.doFilter(PluggableFilter.java:70) > [jbpm-designer-backend-6.0.1.Final.jar:6.0.1.Final] > at > > org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:246) > [jbossweb-7.2.0.Final.jar:7.2.0.Final] > at > > org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:214) > [jbossweb-7.2.0.Final.jar:7.2.0.Final] > at > > org.uberfire.security.server.UberFireSecurityFilter.doFilter(UberFireSecurityFilter.java:266) > [uberfire-security-server-0.3.1.Final.jar:0.3.1.Final] > at > > org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:246) > [jbossweb-7.2.0.Final.jar:7.2.0.Final] > at > > org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:214) > [jbossweb-7.2.0.Final.jar:7.2.0.Final] > at > > org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:230) > [jbossweb-7.2.0.Final.jar:7.2.0.Final] > at > > org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:149) > [jbossweb-7.2.0.Final.jar:7.2.0.Final] > at > > org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:481) > [jbossweb-7.2.0.Final.jar:7.2.0.Final] > at > > org.jboss.as.jpa.interceptor.WebNonTxEmCloserValve.invoke(WebNonTxEmCloserValve.java:50) > [jboss-as-jpa-7.2.0.Final.jar:7.2.0.Final] > at > > org.jboss.as.jpa.interceptor.WebNonTxEmCloserValve.invoke(WebNonTxEmCloserValve.java:50) > [jboss-as-jpa-7.2.0.Final.jar:7.2.0.Final] > at > > org.jboss.as.web.security.SecurityContextAssociationValve.invoke(SecurityContextAssociationValve.java:169) > [jboss-as-web-7.2.0.Final.jar:7.2.0.Final] > at > > org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:145) > [jbossweb-7.2.0.Final.jar:7.2.0.Final] > at > > org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:97) > [jbossweb-7.2.0.Final.jar:7.2.0.Final] > at > > org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:102) > [jbossweb-7.2.0.Final.jar:7.2.0.Final] > at > org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:336) > [jbossweb-7.2.0.Final.jar:7.2.0.Final] > at > org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:856) > [jbossweb-7.2.0.Final.jar:7.2.0.Final] > at > > org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:653) > [jbossweb-7.2.0.Final.jar:7.2.0.Final] > at > org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:920) > [jbossweb-7.2.0.Final.jar:7.2.0.Final] > at java.lang.Thread.run(Thread.java:722) [rt.jar:1.7.0_10] > Caused by: java.lang.NoClassDefFoundError:/ javax/jms/MessageListener/ > at java.lang.ClassLoader.defineClass1(Native Method) > [rt.jar:1.7.0_10] > at java.lang.ClassLoader.defineClass(ClassLoader.java:791) > [rt.jar:1.7.0_10] > at > java.security.SecureClassLoader.defineClass(SecureClassLoader.java:142) > [rt.jar:1.7.0_10] > at > > org.jboss.modules.ModuleClassLoader.doDefineOrLoadClass(ModuleClassLoader.java:338) > [jboss-modules.jar:1.2.0.CR1] > at > org.jboss.modules.ModuleClassLoader.defineClass(ModuleClassLoader.java:402) > [jboss-modules.jar:1.2.0.CR1] > ... 64 more > Caused by: java.lang.ClassNotFoundException:/ javax.jms.MessageListener/ > from [Module "org.jboss.log4j.logmanager:main" from local module loader > @4f67c097 (finder: local module finder @2495223b (roots: > > /opt/jboss-as-7.2.0.Final/modules,/opt/jboss-as-7.2.0.Final/modules/system/layers/brms,/opt/jboss-as-7.2.0.Final/modules/system/layers/soa,/opt/jboss-as-7.2.0.Final/modules/system/layers/base))] > at > org.jboss.modules.ModuleClassLoader.findClass(ModuleClassLoader.java:190) > [jboss-modules.jar:1.2.0.CR1] > at > > org.jboss.modules.ConcurrentClassLoader.performLoadClassUnchecked(ConcurrentClassLoader.java:468) > [jboss-modules.jar:1.2.0.CR1] > at > > org.jboss.modules.ConcurrentClassLoader.performLoadClassChecked(ConcurrentClassLoader.java:456) > [jboss-modules.jar:1.2.0.CR1] > at > > org.jboss.modules.ConcurrentClassLoader.performLoadClass(ConcurrentClassLoader.java:398) > [jboss-modules.jar:1.2.0.CR1] > at > > org.jboss.modules.ConcurrentClassLoader.loadClass(ConcurrentClassLoader.java:120) > [jboss-modules.jar:1.2.0.CR1] > ... 69 more > > > > > > -- > View this message in context: > http://drools.46999.n3.nabble.com/Can-t-get-snmp-log4j-to-work-with-6-0-1-F-KIE-WB-this-is-a-tough-one-tp4027860.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/20140127/5a3b6bdd/attachment-0001.html From rabarijaonadomoina at gmail.com Mon Jan 27 08:59:25 2014 From: rabarijaonadomoina at gmail.com (tia) Date: Mon, 27 Jan 2014 05:59:25 -0800 (PST) Subject: [rules-users] Unable to get LastModified for ClasspathResource In-Reply-To: <1389371334582-4027648.post@n3.nabble.com> References: <1374134659616-4025031.post@n3.nabble.com> <1389371334582-4027648.post@n3.nabble.com> Message-ID: <1390831165405-4027862.post@n3.nabble.com> Hi, I exactly get the same error: java.lang.RuntimeException: Unable to get LastModified for ClasspathResource ... ...Caused by: java.io.FileNotFoundException: 'src/main/rules/changeset.xml' cannot be opened because it does not exist But none of the solutions above worked for me. Here is my code: private static String ruleXmlFile="src/main/rules/changeset.xml"; KnowledgeBuilder kbuilder = KnowledgeBuilderFactory.newKnowledgeBuilder(); kbuilder.add(ResourceFactory.newClassPathResource(ruleXmlFile), ResourceType.CHANGE_SET); But when I test with this: Scanner scanner=new Scanner(new FileReader(ruleXmlFile)); System.out.println(scanner.next()); It's OK, my file is well read ! If someone has an idea ;) I'm using Drools 6.0.0 and Eclipse. -- View this message in context: http://drools.46999.n3.nabble.com/Unable-to-get-LastModified-for-ClasspathResource-tp4025031p4027862.html Sent from the Drools: User forum mailing list archive at Nabble.com. From clickthex at yahoo.com Mon Jan 27 09:08:12 2014 From: clickthex at yahoo.com (SrjTx) Date: Mon, 27 Jan 2014 06:08:12 -0800 (PST) Subject: [rules-users] Can't get snmp/log4j to work with 6.0.1.F KIE-WB (this is a tough one!) In-Reply-To: References: <1390782617832-4027860.post@n3.nabble.com> Message-ID: <1390831692521-4027863.post@n3.nabble.com> Thanks for the reply! When you say "Maven dependencies that are scope "provided" exhibit this behaviour. In your case I would have to assume the missing classes would have normally been provided by the (J2EE?) application server." Yes, they are jboss. What do I need to do to use them then? That I have the jar file with that class in it in maven repo doesn't count? >>jar tf >>/opt/jboss-as-7.2.0.Final/standalone/deployments/kie-drools-wb.war/WEB-INF/lib/jboss-jms-api_1.1_spec-1.0.1.Final.jar | grep MessageListener >>/javax/jms/MessageListener.class/ Regarding POMS, I've found uploading JARs without POMs and entering GAV to be 50/50 on working. So I tend to add the poms When it doesn't work, you get errors like below (This is the error you get trying to upload snmp4j-1.10.1.jar) Upload failed: JBWEB000065: HTTP Status 500 - mark/reset not supported JBWEB000309: type JBWEB000066: Exception report JBWEB000068: message mark/reset not supported JBWEB000069: description JBWEB000145: The server encountered an internal error that prevented it from fulfilling this request. JBWEB000070: exception org.guvnor.common.services.shared.exceptions.GenericPortableException: *mark/reset not supported* org.guvnor.common.services.backend.exceptions.ExceptionUtilities.handleException(ExceptionUtilities.java:24) org.guvnor.m2repo.backend.server.FileServlet.uploadFile(FileServlet.java:180) org.guvnor.m2repo.backend.server.FileServlet.processUpload(FileServlet.java:84) org.guvnor.m2repo.backend.server.FileServlet.doPost(FileServlet.java:70) javax.servlet.http.HttpServlet.service(HttpServlet.java:754) javax.servlet.http.HttpServlet.service(HttpServlet.java:847) org.jboss.solder.servlet.exception.CatchExceptionFilter.doFilter(CatchExceptionFilter.java:65) org.jboss.solder.servlet.event.ServletEventBridgeFilter.doFilter(ServletEventBridgeFilter.java:74) org.jbpm.designer.web.filter.impl.PluggableFilter.doFilter(PluggableFilter.java:70) org.uberfire.security.server.UberFireSecurityFilter.doFilter(UberFireSecurityFilter.java:266) JBWEB000072: note JBWEB000073: The full stack trace of the root cause is available in the JBoss Web/7.2.0.Final logs. JBoss Web/7.2.0.Final Ok -- View this message in context: http://drools.46999.n3.nabble.com/Can-t-get-snmp-log4j-to-work-with-6-0-1-F-KIE-WB-this-is-a-tough-one-tp4027860p4027863.html Sent from the Drools: User forum mailing list archive at Nabble.com. From clickthex at yahoo.com Mon Jan 27 10:04:48 2014 From: clickthex at yahoo.com (SrjTx) Date: Mon, 27 Jan 2014 07:04:48 -0800 (PST) Subject: [rules-users] Can't get snmp/log4j to work with 6.0.1.F KIE-WB (this is a tough one!) In-Reply-To: <1390831692521-4027863.post@n3.nabble.com> References: <1390782617832-4027860.post@n3.nabble.com> <1390831692521-4027863.post@n3.nabble.com> Message-ID: <1390835088424-4027864.post@n3.nabble.com> I should also point out that the missing class is in the local maven repo. /opt/jboss-as-7.2.0.Final/bin/repositories/kie/org/jboss/spec/javax/jms/jboss-jms-api_1.1_spec/1.0.1.Final (ROOT:1664 - 1.0.1.Final> jar tf jboss-jms-api_1.1_spec-1.0.1.Final.jar | grep MessageL javax/jms/MessageListener.class I guess I am still somewhat confused on when something should go in the maven repo (Upload through GUI) and when it just needs to be in /opt/jboss-as-7.2.0.Final/standalone/deployments/kie-drools-wb.war/WEB-INF/lib/ I know for sure that if I want to use an object in the of the editors, it must be Uploaded. I thought, that jar that supported uploaded jars went in /opt/jboss-as-7.2.0.Final/standalone/deployments/kie-drools-wb.war/WEB-INF/lib/? Is that true? If not, what is /opt/jboss-as-7.2.0.Final/standalone/deployments/kie-drools-wb.war/WEB-INF/lib/ used for? Thanks again! -- View this message in context: http://drools.46999.n3.nabble.com/Can-t-get-snmp-log4j-to-work-with-6-0-1-F-KIE-WB-this-is-a-tough-one-tp4027860p4027864.html Sent from the Drools: User forum mailing list archive at Nabble.com. From clickthex at yahoo.com Mon Jan 27 11:08:26 2014 From: clickthex at yahoo.com (SrjTx) Date: Mon, 27 Jan 2014 08:08:26 -0800 (PST) Subject: [rules-users] Can't get snmp/log4j to work with 6.0.1.F KIE-WB (this is a tough one!) In-Reply-To: <1390835088424-4027864.post@n3.nabble.com> References: <1390782617832-4027860.post@n3.nabble.com> <1390831692521-4027863.post@n3.nabble.com> <1390835088424-4027864.post@n3.nabble.com> Message-ID: <1390838906144-4027865.post@n3.nabble.com> Ok, so I really simplified this. I got rid of all my other junk and wanted to see if a modern log4j would load. I put in log4j 1.2.16 (Now more snmp, etc.) I still get the same error. So I put the the reference to jboss-jms-api_1.1_spec-1.0.1.Final.jar which is both m2 and kie repos back in and which does have javax/jms/MessageListener and I still get class not found. -- View this message in context: http://drools.46999.n3.nabble.com/Can-t-get-snmp-log4j-to-work-with-6-0-1-F-KIE-WB-this-is-a-tough-one-tp4027860p4027865.html Sent from the Drools: User forum mailing list archive at Nabble.com. From michael.anstis at gmail.com Mon Jan 27 11:11:34 2014 From: michael.anstis at gmail.com (Michael Anstis) Date: Mon, 27 Jan 2014 16:11:34 +0000 Subject: [rules-users] Can't get snmp/log4j to work with 6.0.1.F KIE-WB (this is a tough one!) In-Reply-To: <1390838906144-4027865.post@n3.nabble.com> References: <1390782617832-4027860.post@n3.nabble.com> <1390831692521-4027863.post@n3.nabble.com> <1390835088424-4027864.post@n3.nabble.com> <1390838906144-4027865.post@n3.nabble.com> Message-ID: I assume you added jboss-jms-api as a dependency to your project? On 27 January 2014 16:08, SrjTx wrote: > Ok, so I really simplified this. > I got rid of all my other junk and wanted to see if a modern log4j would > load. > > I put in log4j 1.2.16 (Now more snmp, etc.) > I still get the same error. > So I put the the reference to > jboss-jms-api_1.1_spec-1.0.1.Final.jar > which is both m2 and kie repos back in and which does have > javax/jms/MessageListener > and I still get class not found. > > > > -- > View this message in context: > http://drools.46999.n3.nabble.com/Can-t-get-snmp-log4j-to-work-with-6-0-1-F-KIE-WB-this-is-a-tough-one-tp4027860p4027865.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/20140127/f67cc1bf/attachment.html From clickthex at yahoo.com Mon Jan 27 11:35:21 2014 From: clickthex at yahoo.com (SrjTx) Date: Mon, 27 Jan 2014 08:35:21 -0800 (PST) Subject: [rules-users] Can't get snmp/log4j to work with 6.0.1.F KIE-WB (this is a tough one!) In-Reply-To: References: <1390782617832-4027860.post@n3.nabble.com> <1390831692521-4027863.post@n3.nabble.com> <1390835088424-4027864.post@n3.nabble.com> <1390838906144-4027865.post@n3.nabble.com> Message-ID: <1390840521701-4027868.post@n3.nabble.com> The only place I could find that class was jboss-jms-api_1.1_spec-1.0.1.Final.jar . You are saying there is another? -- View this message in context: http://drools.46999.n3.nabble.com/Can-t-get-snmp-log4j-to-work-with-6-0-1-F-KIE-WB-this-is-a-tough-one-tp4027860p4027868.html Sent from the Drools: User forum mailing list archive at Nabble.com. From michael.anstis at gmail.com Mon Jan 27 11:42:49 2014 From: michael.anstis at gmail.com (Michael Anstis) Date: Mon, 27 Jan 2014 16:42:49 +0000 Subject: [rules-users] Can't get snmp/log4j to work with 6.0.1.F KIE-WB (this is a tough one!) In-Reply-To: <1390840521701-4027868.post@n3.nabble.com> References: <1390782617832-4027860.post@n3.nabble.com> <1390831692521-4027863.post@n3.nabble.com> <1390835088424-4027864.post@n3.nabble.com> <1390838906144-4027865.post@n3.nabble.com> <1390840521701-4027868.post@n3.nabble.com> Message-ID: No, I was just lazy and didn't type the full JAR name! As well as uploading "jboss-jms-api_1.1_spec-1.0.1.Final.jar" to the Workbench's Maven Repository you need to add "jboss-jms-api_1.1_spec-1.0.1.Final.jar" as a dependency to your project. I copied and pasted this time :_) On 27 January 2014 16:35, SrjTx wrote: > The only place I could find that class was > jboss-jms-api_1.1_spec-1.0.1.Final.jar . > > > You are saying there is another? > > > > -- > View this message in context: > http://drools.46999.n3.nabble.com/Can-t-get-snmp-log4j-to-work-with-6-0-1-F-KIE-WB-this-is-a-tough-one-tp4027860p4027868.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/20140127/f8d45d5d/attachment.html From clickthex at yahoo.com Mon Jan 27 11:50:50 2014 From: clickthex at yahoo.com (SrjTx) Date: Mon, 27 Jan 2014 08:50:50 -0800 (PST) Subject: [rules-users] Can't get snmp/log4j to work with 6.0.1.F KIE-WB (this is a tough one!) In-Reply-To: References: <1390782617832-4027860.post@n3.nabble.com> <1390831692521-4027863.post@n3.nabble.com> <1390835088424-4027864.post@n3.nabble.com> <1390838906144-4027865.post@n3.nabble.com> <1390840521701-4027868.post@n3.nabble.com> Message-ID: <1390841450356-4027870.post@n3.nabble.com> Sorry, just wanted to make sure I wasn't missing a subtlety. :) Yes, I have done that. I also tried jms-api-1.1-rev-1.jar with same results. -- View this message in context: http://drools.46999.n3.nabble.com/Can-t-get-snmp-log4j-to-work-with-6-0-1-F-KIE-WB-this-is-a-tough-one-tp4027860p4027870.html Sent from the Drools: User forum mailing list archive at Nabble.com. From paul.s.mander at gmail.com Mon Jan 27 11:55:48 2014 From: paul.s.mander at gmail.com (pmander) Date: Mon, 27 Jan 2014 08:55:48 -0800 (PST) Subject: [rules-users] java dialect and declared types In-Reply-To: <31949629-49A4-409E-9960-1E407665E133@codehaus.org> References: <1390480823925-4027822.post@n3.nabble.com> <52E1104B.9060503@gmail.com> <1390488363576-4027827.post@n3.nabble.com> <52E12EE1.9050203@gmail.com> <1390489911789-4027829.post@n3.nabble.com> <1390491239914-4027831.post@n3.nabble.com> <1390493123715-4027834.post@n3.nabble.com> <31949629-49A4-409E-9960-1E407665E133@codehaus.org> Message-ID: <1390841748810-4027871.post@n3.nabble.com> Mark Proctor wrote > Also there will be no performance games for rule bases that do not have > joins Can you elaborate on what a join is? -- View this message in context: http://drools.46999.n3.nabble.com/java-dialect-and-declared-types-tp4027822p4027871.html Sent from the Drools: User forum mailing list archive at Nabble.com. From michael.anstis at gmail.com Mon Jan 27 12:02:36 2014 From: michael.anstis at gmail.com (Michael Anstis) Date: Mon, 27 Jan 2014 17:02:36 +0000 Subject: [rules-users] Can't get snmp/log4j to work with 6.0.1.F KIE-WB (this is a tough one!) In-Reply-To: <1390841450356-4027870.post@n3.nabble.com> References: <1390782617832-4027860.post@n3.nabble.com> <1390831692521-4027863.post@n3.nabble.com> <1390835088424-4027864.post@n3.nabble.com> <1390838906144-4027865.post@n3.nabble.com> <1390840521701-4027868.post@n3.nabble.com> <1390841450356-4027870.post@n3.nabble.com> Message-ID: Good :) When building a project (to get the meta-data needed to drive the editors in the workbench) we iterate all classes resolved from Maven and call the following:- clazz.getDeclaredConstructors(); clazz.getDeclaredFields(); clazz.getDeclaredMethods(); clazz.getDeclaredClasses(); clazz.getDeclaredAnnotations(); Should any of those calls fail you'll get the error you report. In short, there has to be a class somewhere that has a dependency on another class not in the Maven classpath. What class this is: IDK. What dependency does this class have IDK either... all I can help with is explain where the error is coming from - leaving the research to you. With kind regards, Mike On 27 January 2014 16:50, SrjTx wrote: > Sorry, just wanted to make sure I wasn't missing a subtlety. :) > > Yes, I have done that. > > I also tried jms-api-1.1-rev-1.jar with same results. > > > > > > > > -- > View this message in context: > http://drools.46999.n3.nabble.com/Can-t-get-snmp-log4j-to-work-with-6-0-1-F-KIE-WB-this-is-a-tough-one-tp4027860p4027870.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/20140127/3fca91ea/attachment-0001.html From clickthex at yahoo.com Mon Jan 27 12:24:16 2014 From: clickthex at yahoo.com (SrjTx) Date: Mon, 27 Jan 2014 09:24:16 -0800 (PST) Subject: [rules-users] Can't get snmp/log4j to work with 6.0.1.F KIE-WB (this is a tough one!) In-Reply-To: References: <1390782617832-4027860.post@n3.nabble.com> <1390831692521-4027863.post@n3.nabble.com> <1390835088424-4027864.post@n3.nabble.com> <1390838906144-4027865.post@n3.nabble.com> <1390840521701-4027868.post@n3.nabble.com> <1390841450356-4027870.post@n3.nabble.com> Message-ID: <1390843456872-4027873.post@n3.nabble.com> Thanks! -- View this message in context: http://drools.46999.n3.nabble.com/Can-t-get-snmp-log4j-to-work-with-6-0-1-F-KIE-WB-this-is-a-tough-one-tp4027860p4027873.html Sent from the Drools: User forum mailing list archive at Nabble.com. From rexxe98 at gmail.com Mon Jan 27 12:35:48 2014 From: rexxe98 at gmail.com (Andrew Berman) Date: Mon, 27 Jan 2014 09:35:48 -0800 Subject: [rules-users] NullPointerException with kie-spring 6.0.1 and Spring 4.0 In-Reply-To: <1390758426693-4027859.post@n3.nabble.com> References: <1390751441563-4027858.post@n3.nabble.com> <1390758426693-4027859.post@n3.nabble.com> Message-ID: Hi Vinod, Thanks for looking into this. Can you tell me what you changed to get this to work? Do you have a patch? Thanks! On Sun, Jan 26, 2014 at 9:47 AM, vinodkiran wrote: > Andrew, > > 1. The NPE happens when you execute a spring-boot project via a jar (e.g: > java -jar target/kie-spring-boot-0.1.0.jar) > > If you execute the same project using 'mvn exec:java' the NPE is not seen > and we are able to move forward. > > 2. However, Spring Boot/Spring 4.0 seems to be creating some beans with no > names. This causes a NPE with kie-spring in a different location. I have > fixed this and submitted a PR for the changes. This might be available in > the next release. Try running this example with the latest snapshot in a > day > or two. > > I have uploaded my code to to github > (https://github.com/vinodkiran/kie-spring-boot) > > --Vinod > > PS: the reported NPE seems to be related to > https://github.com/spring-projects/spring-boot/pull/41 > > > > > > -- > View this message in context: > http://drools.46999.n3.nabble.com/rules-users-NullPointerException-with-kie-spring-6-0-1-and-Spring-4-0-tp4027854p4027859.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/20140127/88aefe67/attachment.html From mproctor at codehaus.org Mon Jan 27 13:31:21 2014 From: mproctor at codehaus.org (Mark Proctor) Date: Mon, 27 Jan 2014 18:31:21 +0000 Subject: [rules-users] java dialect and declared types In-Reply-To: <1390841748810-4027871.post@n3.nabble.com> References: <1390480823925-4027822.post@n3.nabble.com> <52E1104B.9060503@gmail.com> <1390488363576-4027827.post@n3.nabble.com> <52E12EE1.9050203@gmail.com> <1390489911789-4027829.post@n3.nabble.com> <1390491239914-4027831.post@n3.nabble.com> <1390493123715-4027834.post@n3.nabble.com> <31949629-49A4-409E-9960-1E407665E133@codehaus.org> <1390841748810-4027871.post@n3.nabble.com> Message-ID: <729601B4-4FB1-488E-AD46-04A4E4563B65@codehaus.org> a join is any rule that has more than one pattern. Each pattern after the first, causes an additional join node in the network. Mark On 27 Jan 2014, at 16:55, pmander wrote: > Mark Proctor wrote >> Also there will be no performance games for rule bases that do not have >> joins > > Can you elaborate on what a join is? > > > > > -- > View this message in context: http://drools.46999.n3.nabble.com/java-dialect-and-declared-types-tp4027822p4027871.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 clickthex at yahoo.com Mon Jan 27 19:54:52 2014 From: clickthex at yahoo.com (SrjTx) Date: Mon, 27 Jan 2014 16:54:52 -0800 (PST) Subject: [rules-users] Null pointer exception when using global in rdrl 6.0.1.F Message-ID: <1390870492478-4027876.post@n3.nabble.com> I have a class that I declared final, has a private constructor, has only static members and methods. Some of its members are static instance of classes. In KIE-WBI added a global of that type with name X When I try to make a call on X.foo(), I get a null pointer exception. (note that x.foo() calls y.foo(), where y is a static member of X. I've read some posts that a global has to be static, am I stretching, what it means for a global to be static? I am guessing I need to write some java code that will create an instance of X and inject into working memory? I was hoping to be able to create this object within either the drools or SY framework. I have googled and be reading on this for quite a bit now, but I think I have succeeded only in confusing myself. Any help greatly appreciated. -- View this message in context: http://drools.46999.n3.nabble.com/Null-pointer-exception-when-using-global-in-rdrl-6-0-1-F-tp4027876.html Sent from the Drools: User forum mailing list archive at Nabble.com. From vinodkiran at usa.net Mon Jan 27 20:16:38 2014 From: vinodkiran at usa.net (vinodkiran) Date: Mon, 27 Jan 2014 17:16:38 -0800 (PST) Subject: [rules-users] NullPointerException with kie-spring 6.0.1 and Spring 4.0 In-Reply-To: References: <1390751441563-4027858.post@n3.nabble.com> <1390758426693-4027859.post@n3.nabble.com> Message-ID: <1390871798675-4027877.post@n3.nabble.com> https://github.com/droolsjbpm/droolsjbpm-integration/pull/80 -- View this message in context: http://drools.46999.n3.nabble.com/rules-users-NullPointerException-with-kie-spring-6-0-1-and-Spring-4-0-tp4027854p4027877.html Sent from the Drools: User forum mailing list archive at Nabble.com. From rexxe98 at gmail.com Mon Jan 27 20:40:03 2014 From: rexxe98 at gmail.com (Andrew Berman) Date: Mon, 27 Jan 2014 17:40:03 -0800 Subject: [rules-users] NullPointerException with kie-spring 6.0.1 and Spring 4.0 In-Reply-To: <1390871798675-4027877.post@n3.nabble.com> References: <1390751441563-4027858.post@n3.nabble.com> <1390758426693-4027859.post@n3.nabble.com> <1390871798675-4027877.post@n3.nabble.com> Message-ID: Awesome, thanks!! On Mon, Jan 27, 2014 at 5:16 PM, vinodkiran wrote: > https://github.com/droolsjbpm/droolsjbpm-integration/pull/80 > > > > > > -- > View this message in context: > http://drools.46999.n3.nabble.com/rules-users-NullPointerException-with-kie-spring-6-0-1-and-Spring-4-0-tp4027854p4027877.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/20140127/5aeaa5ef/attachment.html From clickthex at yahoo.com Mon Jan 27 21:11:05 2014 From: clickthex at yahoo.com (SrjTx) Date: Mon, 27 Jan 2014 18:11:05 -0800 (PST) Subject: [rules-users] Null pointer exception when using global in rdrl 6.0.1.F In-Reply-To: <1390870492478-4027876.post@n3.nabble.com> References: <1390870492478-4027876.post@n3.nabble.com> Message-ID: <1390875065303-4027879.post@n3.nabble.com> That being said, I figured I could grab the knowledge base that I defined in KIE and work with its working memory. Much googling, cannot figure out how to get my knowledge base (or package) by name. I must be missing something, seems like this should be straight forward. -- View this message in context: http://drools.46999.n3.nabble.com/Null-pointer-exception-when-using-global-in-rdrl-6-0-1-F-tp4027876p4027879.html Sent from the Drools: User forum mailing list archive at Nabble.com. From wolfgang.laun at gmail.com Mon Jan 27 23:57:54 2014 From: wolfgang.laun at gmail.com (Wolfgang Laun) Date: Tue, 28 Jan 2014 05:57:54 +0100 Subject: [rules-users] Null pointer exception when using global in rdrl 6.0.1.F In-Reply-To: <1390870492478-4027876.post@n3.nabble.com> References: <1390870492478-4027876.post@n3.nabble.com> Message-ID: On 28/01/2014, SrjTx wrote: > I have a class that I declared final, has a private constructor, has only > static members and methods. > Some of its members are static instance of classes. > In KIE-WBI added a global of that type with name X You can't use a global that has a type X as you describe it, as you won't be able to instantiate an X object if the constructor is private. (OK, you could have a static getInstance method according to the singleton pattern - but the use of an object where everything in the class is static is rather doubtful.) > > When I try to make a call on X.foo(), I get a null pointer exception. Well, if there's no object you haven't initialised the global. > (note > that x.foo() calls y.foo(), where y is a static member of X. > > I've read some posts that a global has to be static, am I stretching, what > it means for a global to be static? I don't know where you've read that, but do read the documentation first. > > I am guessing I need to write some java code that will create an instance > of > X and inject into working memory? You are guessing, and you are guessing wrong. kSession.setGlobal( "theDRLnameOfTheGlobal", new XbutNotAsYouDescribedIt() ) > I was hoping to be able to create this > object within either the drools or SY framework. > > I have googled and be reading on this for quite a bit now, but I think I > have succeeded only in confusing myself. > > Any help greatly appreciated. Documentation, 7.5.2, global - about all you need to know. -W > > > > -- > View this message in context: > http://drools.46999.n3.nabble.com/Null-pointer-exception-when-using-global-in-rdrl-6-0-1-F-tp4027876.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 clickthex at yahoo.com Tue Jan 28 01:18:12 2014 From: clickthex at yahoo.com (SrjTx) Date: Mon, 27 Jan 2014 22:18:12 -0800 (PST) Subject: [rules-users] Null pointer exception when using global in rdrl 6.0.1.F In-Reply-To: References: <1390870492478-4027876.post@n3.nabble.com> Message-ID: <1390889892141-4027881.post@n3.nabble.com> Thanks for the reply. I have read that section of the docs a multiple times. Unfortunately, I do not have a handle to the ksession to call setGlobal on. My knowledge session is created/owned by KIE-WB/Switchyard and we are looking for an API so that I can get a handle to something on which I can call setGlobal. Ideally, I need something like xxx.getKnowledgeBaseByName("mykb"); or maybe xxx.getKnowledgePackageByName("mykb"); or maybe xxx.getKnowledgeSessionByName("mykb"); which ever of those I can call setGlobal on. FYI, our KIE stuff is container managed via maven integration with kie-wb - we do not control the lifecycle of any KIE objects kb, package, session, etc. Thanks again -- View this message in context: http://drools.46999.n3.nabble.com/Null-pointer-exception-when-using-global-in-rdrl-6-0-1-F-tp4027876p4027881.html Sent from the Drools: User forum mailing list archive at Nabble.com. From wolfgang.laun at gmail.com Tue Jan 28 01:43:48 2014 From: wolfgang.laun at gmail.com (Wolfgang Laun) Date: Tue, 28 Jan 2014 07:43:48 +0100 Subject: [rules-users] Null pointer exception when using global in rdrl 6.0.1.F In-Reply-To: <1390889892141-4027881.post@n3.nabble.com> References: <1390870492478-4027876.post@n3.nabble.com> <1390889892141-4027881.post@n3.nabble.com> Message-ID: On 28/01/2014, SrjTx wrote: > Thanks for the reply. > I have read that section of the docs a multiple times. > > Unfortunately, I do not have a handle to the ksession to call setGlobal on. > > My knowledge session is created/owned by KIE-WB/Switchyard and we are > looking for an API so that I can get a handle to something on which I can > call setGlobal. I've had a quick look at https://docs.jboss.org/author/display/SWITCHYARD/Knowledge+Services and it seems to me that you need to define I suspect that "from" should be some Java expression returning the global object and "to" the global's DRL name, perhaps from the SwitchYard Context. But the author doesn't provide any examples and no details. One other approach you might take is to install a global via a high-priority one-shot rule: rule "startup" salience 999999999 when then kcontext.getKieRuntime().setGlobal(...,"..."); end Lastly, you can simply use a static object in some class: import foo.bar.Globals; ... then Globals.foo.store( whatever ); ... -W > > Ideally, I need something like > xxx.getKnowledgeBaseByName("mykb"); > or maybe > xxx.getKnowledgePackageByName("mykb"); > or maybe > xxx.getKnowledgeSessionByName("mykb"); > > which ever of those I can call setGlobal on. > > FYI, our KIE stuff is container managed via maven integration with kie-wb - > we do not control the lifecycle of any KIE objects kb, package, session, > etc. > > Thanks again > > > > -- > View this message in context: > http://drools.46999.n3.nabble.com/Null-pointer-exception-when-using-global-in-rdrl-6-0-1-F-tp4027876p4027881.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 milenko.rubin at el2.de Tue Jan 28 04:46:13 2014 From: milenko.rubin at el2.de (milenko) Date: Tue, 28 Jan 2014 01:46:13 -0800 (PST) Subject: [rules-users] OptaPlanner vehicle routing problem with "multiple depots" In-Reply-To: References: <1390399017520-4027804.post@n3.nabble.com> Message-ID: <1390902373843-4027883.post@n3.nabble.com> Dear Geoffrey, I succeeded now to produce more Depots, so that each of them contains some vehicles. The optimisation works excellent. Some values are unclear to: - In the XML-Input file is the customerList: what is meant by milliReadyTime and milliDueTime (physical Dimension?). I understand that these are the earliest and latest times at which the sevice can start. How can i put in real times (e.g. 9:15-10:15 and 45min ServiceDuration)? - In the XML-Input file is the depotList: what is meant here by milliReadyTime and milliDueTime? Thank you very much for your help. Best regards. Milenko -- View this message in context: http://drools.46999.n3.nabble.com/OptaPlanner-vehicle-routing-problem-with-multiple-depots-tp4027804p4027883.html Sent from the Drools: User forum mailing list archive at Nabble.com. From paul.s.mander at gmail.com Tue Jan 28 05:58:21 2014 From: paul.s.mander at gmail.com (pmander) Date: Tue, 28 Jan 2014 02:58:21 -0800 (PST) Subject: [rules-users] java dialect and declared types In-Reply-To: <729601B4-4FB1-488E-AD46-04A4E4563B65@codehaus.org> References: <1390480823925-4027822.post@n3.nabble.com> <52E1104B.9060503@gmail.com> <1390488363576-4027827.post@n3.nabble.com> <52E12EE1.9050203@gmail.com> <1390489911789-4027829.post@n3.nabble.com> <1390491239914-4027831.post@n3.nabble.com> <1390493123715-4027834.post@n3.nabble.com> <31949629-49A4-409E-9960-1E407665E133@codehaus.org> <1390841748810-4027871.post@n3.nabble.com> <729601B4-4FB1-488E-AD46-04A4E4563B65@codehaus.org> Message-ID: <1390906701628-4027884.post@n3.nabble.com> I've tried to reproduce this in a tester but all my unit tests show 6.0.0 marginally quicker. The rules and data are simplified for the test so I'll try something closer to what i am seeing on the full system. I've just done another comparison and the results are shown in the attached image. There are a number of spikes in the 6.0.1 run that don't help, but it is clear that the 5.5.0 execution is better. I've run the tests several times and all show the same thing. 1st col is average time - 250 jobs to process 2nd col is total time for test to complete - 10 processes executing - 48 core machine 4gb per process - mvel dialect For 5.5.0 5854 215 5707 193 5629 189 5512 183 5607 189 5395 183 5369 183 For 6.0.0 6229 244 5828 219 6076 223 5767 220 5735 220 5821 214 -- View this message in context: http://drools.46999.n3.nabble.com/java-dialect-and-declared-types-tp4027822p4027884.html Sent from the Drools: User forum mailing list archive at Nabble.com. From sujeet.kumar at anz.com Tue Jan 28 06:15:58 2014 From: sujeet.kumar at anz.com (km.sujeet) Date: Tue, 28 Jan 2014 03:15:58 -0800 (PST) Subject: [rules-users] Drools as osgi bundle in Jboss AS Message-ID: <1390907758955-4027885.post@n3.nabble.com> Hi, I am trying to run "Hello World" using drools as osgi bundle in Jboss AS. Deployed below jars to Jboss container : drools-compiler-6.0.0.Beta1.jar drools-core-6.0.0.Beta1.jar drools-templates-6.0.0.Beta1.jar kie-api-6.0.0.Beta1.jar kie-internal-6.0.0.beta1.jar While deploying my own bundle to Jboss which has "Hello World" Drools application, I get below exception: Caused by: org.drools.RuntimeDroolsException: Unable to load dialect 'org.drools.rule.builder.dialect.java.JavaDialectConfiguration:java:org.drools.rule.builder.dialect.java.JavaDialectConfiguration' at org.drools.compiler.PackageBuilderConfiguration.addDialect(PackageBuilderConfiguration.java:321) at org.drools.compiler.PackageBuilderConfiguration.buildDialectConfigurationMap(PackageBuilderConfiguration.java:307) at org.drools.compiler.PackageBuilderConfiguration.init(PackageBuilderConfiguration.java:192) at org.drools.compiler.PackageBuilderConfiguration.(PackageBuilderConfiguration.java:170) at org.drools.builder.impl.KnowledgeBuilderFactoryServiceImpl.newKnowledgeBuilderConfiguration(KnowledgeBuilderFactoryServiceImpl.java:22) at org.drools.builder.KnowledgeBuilderFactory.newKnowledgeBuilderConfiguration(KnowledgeBuilderFactory.java:74) at org.drools.container.spring.beans.KnowledgeBaseBeanFactory.afterPropertiesSet(KnowledgeBaseBeanFactory.java:80) at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.invokeInitMethods(AbstractAutowireCapableBeanFactory.java:1514) at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.initializeBean(AbstractAutowireCapableBeanFactory.java:1452) ... 34 more Caused by: java.lang.RuntimeException: The Eclipse JDT Core jar is not in the classpath at org.drools.rule.builder.dialect.java.JavaDialectConfiguration.setCompiler(JavaDialectConfiguration.java:100) at org.drools.rule.builder.dialect.java.JavaDialectConfiguration.init(JavaDialectConfiguration.java:61) at org.drools.compiler.PackageBuilderConfiguration.addDialect(PackageBuilderConfiguration.java:317) ... 42 more Then added "org.eclipse.jdt.core_3.8.3.v20130121-145325.jar" to classpath of OSGI bundle (Hello World Bundle) and deployed again. Above exception has got resolved, but application is not working. Code below : public void start(){ logger.info("started."); System.out.println("Hello World in client!! "); //droolsSession = createKnowledgeSession(); MessageTest message = new MessageTest(); message.setMessage("Testing Hello World"); message.setStatus(MessageTest.HELLO); droolsSession.insert(message); droolsSession.fireAllRules(); } @SuppressWarnings("deprecation") private StatefulKnowledgeSession createKnowledgeSession() { System.out.println("Inside createKnowledgeSession!! "); KnowledgeBuilderFactoryServiceImpl knowledgeBuilderFactoryServiceImpl = new KnowledgeBuilderFactoryServiceImpl(); KnowledgeBuilder kbuilder = knowledgeBuilderFactoryServiceImpl.newKnowledgeBuilder(); kbuilder.add((Resource) new ClassPathResource("Sample.drl"), ResourceType.DRL); System.out.println("Completed createKnowledgeSession!! "); if (kbuilder.hasErrors()) { if (kbuilder.getErrors().size() > 0) { for (KnowledgeBuilderError kerror : kbuilder.getErrors()) { System.err.println(kerror); } } } KnowledgeBase kbase = kbuilder.newKnowledgeBase(); return kbase.newStatefulKnowledgeSession(); //return kbase.newStatefulKnowledgeSession(); } -- View this message in context: http://drools.46999.n3.nabble.com/Drools-as-osgi-bundle-in-Jboss-AS-tp4027885.html Sent from the Drools: User forum mailing list archive at Nabble.com. From clickthex at yahoo.com Tue Jan 28 10:14:55 2014 From: clickthex at yahoo.com (SrjTx) Date: Tue, 28 Jan 2014 07:14:55 -0800 (PST) Subject: [rules-users] Null pointer exception when using global in rdrl 6.0.1.F In-Reply-To: References: <1390870492478-4027876.post@n3.nabble.com> <1390889892141-4027881.post@n3.nabble.com> Message-ID: <1390922095479-4027886.post@n3.nabble.com> Thanks! -- View this message in context: http://drools.46999.n3.nabble.com/Null-pointer-exception-when-using-global-in-rdrl-6-0-1-F-tp4027876p4027886.html Sent from the Drools: User forum mailing list archive at Nabble.com. From husby024 at umn.edu Tue Jan 28 11:10:47 2014 From: husby024 at umn.edu (jhusby) Date: Tue, 28 Jan 2014 08:10:47 -0800 (PST) Subject: [rules-users] Null Pointer Exception with 10K+ kBase objects Message-ID: <1390925447711-4027887.post@n3.nabble.com> I'm trying to stress-test Drools to see what its limits are, and I stumbled across a NPE when I have a large amount of facts in a stateful knowledgebase: java.lang.NullPointerException at org.drools.core.phreak.PhreakTimerNode.doPropagateChildLeftTuple(PhreakTimerNode.java:355) at org.drools.core.phreak.PhreakTimerNode.doPropagateChildLeftTuples(PhreakTimerNode.java:325) at org.drools.core.phreak.PhreakTimerNode.doNode(PhreakTimerNode.java:72) at org.drools.core.phreak.RuleNetworkEvaluator.innerEval(RuleNetworkEvaluator.java:357) at org.drools.core.phreak.RuleNetworkEvaluator.outerEval(RuleNetworkEvaluator.java:161) at org.drools.core.phreak.RuleNetworkEvaluator.evaluateNetwork(RuleNetworkEvaluator.java:116) at org.drools.core.phreak.RuleExecutor.reEvaluateNetwork(RuleExecutor.java:200) at org.drools.core.phreak.RuleExecutor.evaluateNetworkAndFire(RuleExecutor.java:67) 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:957) at org.drools.core.common.AbstractWorkingMemory.fireAllRules(AbstractWorkingMemory.java:931) at org.drools.core.impl.StatefulKnowledgeSessionImpl.fireAllRules(StatefulKnowledgeSessionImpl.java:256) I have a little program that creates, populates, fires, and destroys a session repeatedly. With 10K objects in the knowledge base, I get the NPE the first time I loop through my program, but not subsequently (probably because by the subsequent executions things have been cached). With 100K objects, I get the exception most times. With 1M objects, I get the NPE every time. Am I doing anything wrong or is it simply taking so long to execute all the rules that something times out? Is there a timeout param I could set? Thank you! Joseph -- View this message in context: http://drools.46999.n3.nabble.com/Null-Pointer-Exception-with-10K-kBase-objects-tp4027887.html Sent from the Drools: User forum mailing list archive at Nabble.com. From dsotty at gmail.com Tue Jan 28 11:18:52 2014 From: dsotty at gmail.com (Davide Sottara) Date: Tue, 28 Jan 2014 17:18:52 +0100 Subject: [rules-users] Null Pointer Exception with 10K+ kBase objects In-Reply-To: <1390925447711-4027887.post@n3.nabble.com> References: <1390925447711-4027887.post@n3.nabble.com> Message-ID: <52E7D86C.1090309@gmail.com> Could you post the full test case (rules + java)? Thanks Davide On 01/28/2014 05:10 PM, jhusby wrote: > I'm trying to stress-test Drools to see what its limits are, and I stumbled > across a NPE when I have a large amount of facts in a stateful > knowledgebase: > > java.lang.NullPointerException > at > org.drools.core.phreak.PhreakTimerNode.doPropagateChildLeftTuple(PhreakTimerNode.java:355) > at > org.drools.core.phreak.PhreakTimerNode.doPropagateChildLeftTuples(PhreakTimerNode.java:325) > at org.drools.core.phreak.PhreakTimerNode.doNode(PhreakTimerNode.java:72) > at > org.drools.core.phreak.RuleNetworkEvaluator.innerEval(RuleNetworkEvaluator.java:357) > at > org.drools.core.phreak.RuleNetworkEvaluator.outerEval(RuleNetworkEvaluator.java:161) > at > org.drools.core.phreak.RuleNetworkEvaluator.evaluateNetwork(RuleNetworkEvaluator.java:116) > at > org.drools.core.phreak.RuleExecutor.reEvaluateNetwork(RuleExecutor.java:200) > at > org.drools.core.phreak.RuleExecutor.evaluateNetworkAndFire(RuleExecutor.java:67) > 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:957) > at > org.drools.core.common.AbstractWorkingMemory.fireAllRules(AbstractWorkingMemory.java:931) > at > org.drools.core.impl.StatefulKnowledgeSessionImpl.fireAllRules(StatefulKnowledgeSessionImpl.java:256) > > I have a little program that creates, populates, fires, and destroys a > session repeatedly. With 10K objects in the knowledge base, I get the NPE > the first time I loop through my program, but not subsequently (probably > because by the subsequent executions things have been cached). With 100K > objects, I get the exception most times. With 1M objects, I get the NPE > every time. > > Am I doing anything wrong or is it simply taking so long to execute all the > rules that something times out? Is there a timeout param I could set? > > Thank you! > > Joseph > > > > -- > View this message in context: http://drools.46999.n3.nabble.com/Null-Pointer-Exception-with-10K-kBase-objects-tp4027887.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 husby024 at umn.edu Tue Jan 28 12:02:48 2014 From: husby024 at umn.edu (jhusby) Date: Tue, 28 Jan 2014 09:02:48 -0800 (PST) Subject: [rules-users] Null Pointer Exception with 10K+ kBase objects In-Reply-To: <52E7D86C.1090309@gmail.com> References: <1390925447711-4027887.post@n3.nabble.com> <52E7D86C.1090309@gmail.com> Message-ID: <1390928568796-4027890.post@n3.nabble.com> Here is my test project: DroolsTest.zip Change the TOTAL_OBJECTS member of Main.java to see the impact of having a large number of objects: * If you set it to 1K, everything should work fine. * If you set it to 10K, it will NPE the first time but succeed afterward. * If you set it to 100K, it will NPE every time. Thank you! Joseph Davide Sottara wrote > Could you post the full test case (rules + java)? > Thanks > Davide > > On 01/28/2014 05:10 PM, jhusby wrote: >> I'm trying to stress-test Drools to see what its limits are, and I >> stumbled >> across a NPE when I have a large amount of facts in a stateful >> knowledgebase: >> >> java.lang.NullPointerException >> at >> org.drools.core.phreak.PhreakTimerNode.doPropagateChildLeftTuple(PhreakTimerNode.java:355) >> at >> org.drools.core.phreak.PhreakTimerNode.doPropagateChildLeftTuples(PhreakTimerNode.java:325) >> at >> org.drools.core.phreak.PhreakTimerNode.doNode(PhreakTimerNode.java:72) >> at >> org.drools.core.phreak.RuleNetworkEvaluator.innerEval(RuleNetworkEvaluator.java:357) >> at >> org.drools.core.phreak.RuleNetworkEvaluator.outerEval(RuleNetworkEvaluator.java:161) >> at >> org.drools.core.phreak.RuleNetworkEvaluator.evaluateNetwork(RuleNetworkEvaluator.java:116) >> at >> org.drools.core.phreak.RuleExecutor.reEvaluateNetwork(RuleExecutor.java:200) >> at >> org.drools.core.phreak.RuleExecutor.evaluateNetworkAndFire(RuleExecutor.java:67) >> 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:957) >> at >> org.drools.core.common.AbstractWorkingMemory.fireAllRules(AbstractWorkingMemory.java:931) >> at >> org.drools.core.impl.StatefulKnowledgeSessionImpl.fireAllRules(StatefulKnowledgeSessionImpl.java:256) >> >> I have a little program that creates, populates, fires, and destroys a >> session repeatedly. With 10K objects in the knowledge base, I get the >> NPE >> the first time I loop through my program, but not subsequently (probably >> because by the subsequent executions things have been cached). With 100K >> objects, I get the exception most times. With 1M objects, I get the NPE >> every time. >> >> Am I doing anything wrong or is it simply taking so long to execute all >> the >> rules that something times out? Is there a timeout param I could set? >> >> Thank you! >> >> Joseph -- View this message in context: http://drools.46999.n3.nabble.com/Null-Pointer-Exception-with-10K-kBase-objects-tp4027887p4027890.html Sent from the Drools: User forum mailing list archive at Nabble.com. From mario.fusco at gmail.com Tue Jan 28 12:51:00 2014 From: mario.fusco at gmail.com (Mario Fusco) Date: Tue, 28 Jan 2014 09:51:00 -0800 (PST) Subject: [rules-users] Null Pointer Exception with 10K+ kBase objects In-Reply-To: <1390928568796-4027890.post@n3.nabble.com> References: <1390925447711-4027887.post@n3.nabble.com> <52E7D86C.1090309@gmail.com> <1390928568796-4027890.post@n3.nabble.com> Message-ID: <1390931460083-4027891.post@n3.nabble.com> I downloaded your zip file and reproduced the problem you reported (even on master branch). I'll start investigating it in a bit and I'll keep you updated with my findings. Thank you, Mario -- View this message in context: http://drools.46999.n3.nabble.com/Null-Pointer-Exception-with-10K-kBase-objects-tp4027887p4027891.html Sent from the Drools: User forum mailing list archive at Nabble.com. From jonathan.labin at gmail.com Tue Jan 28 13:03:51 2014 From: jonathan.labin at gmail.com (jonathan.labin) Date: Tue, 28 Jan 2014 10:03:51 -0800 (PST) Subject: [rules-users] Moves Defined from Current State Message-ID: <1390932231144-4027892.post@n3.nabble.com> I'm using Optaplanner 6.0.1 and I'm having trouble defining a type of move that I'd like to define. In my domain, there may be an opportunity to split the value assigned to one entity across two entities. For example: E1=5 could become E2=2, E3=3 The trouble is that in some cases this split can be performed more than one way. The above example could also be split to become E2=1,E3=4, ... At the time that the Moves is created (and initialized with entities) by the MoveFactory, there are values assigned to the entities but those values may change and shouldn't be part of the Move (am I right about that?). So when Moves are executed, the values assigned could be considered to create a set of Moves based on the current state but aren't Moves already created long before then? Is there a way to generate moves based on the current state? How do you ensure they are not cached ore reused after that step? Thanks, Jon -- View this message in context: http://drools.46999.n3.nabble.com/Moves-Defined-from-Current-State-tp4027892.html Sent from the Drools: User forum mailing list archive at Nabble.com. From terry at inastrol.com Tue Jan 28 14:08:06 2014 From: terry at inastrol.com (Inastrol) Date: Tue, 28 Jan 2014 11:08:06 -0800 (PST) Subject: [rules-users] Drools, slf4j and Eclipse Error on DroolsTest.Java In-Reply-To: <1390925652690-4027888.post@n3.nabble.com> References: <1390617259610-4027853.post@n3.nabble.com> <1390925652690-4027888.post@n3.nabble.com> Message-ID: <52E7FFE5.9080802@inastrol.com> This isn't my code. It's created when a Drools project is created in Eclipse. I guess that's why this is so frustrating. It's supposed to demonstrate a very simple Drools program and I can't get it to work. It's hard to debug someone else's code when you don't know the language yet. Code is kSession.insert(message); Thanks sdjoe [via Drools] wrote: > Hard to say without seeing your code. Can you post it here and point > out where the NPE is happening on line 23? > > ------------------------------------------------------------------------ > If you reply to this email, your message will be added to the > discussion below: > http://drools.46999.n3.nabble.com/Drools-slf4j-and-Eclipse-Error-on-DroolsTest-Java-tp4027853p4027888.html > > To unsubscribe from Drools, slf4j and Eclipse Error on > DroolsTest.Java, click here > . > NAML > > package com.sample; import org.kie.api.KieServices; import org.kie.api.runtime.KieContainer; import org.kie.api.runtime.KieSession; /** * This is a sample class to launch a rule. */ public class DroolsTest { public static final void main(String[] args) { try { // load up the knowledge base KieServices ks = KieServices.Factory.get(); KieContainer kContainer = ks.getKieClasspathContainer(); KieSession kSession = kContainer.newKieSession("ksession-rules"); // go ! Message message = new Message(); message.setMessage("Hello World"); message.setStatus(Message.HELLO); kSession.insert(message); kSession.fireAllRules(); } catch (Throwable t) { t.printStackTrace(); } } public static class Message { public static final int HELLO = 0; public static final int GOODBYE = 1; private String message; private int status; public String getMessage() { return this.message; } public void setMessage(String message) { this.message = message; } public int getStatus() { return this.status; } public void setStatus(int status) { this.status = status; } } } -- View this message in context: http://drools.46999.n3.nabble.com/Drools-slf4j-and-Eclipse-Error-on-DroolsTest-Java-tp4027853p4027893.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/20140128/cef04f95/attachment-0001.html From mproctor at codehaus.org Tue Jan 28 14:34:17 2014 From: mproctor at codehaus.org (Mark Proctor) Date: Tue, 28 Jan 2014 19:34:17 +0000 Subject: [rules-users] java dialect and declared types In-Reply-To: <1390906701628-4027884.post@n3.nabble.com> References: <1390480823925-4027822.post@n3.nabble.com> <52E1104B.9060503@gmail.com> <1390488363576-4027827.post@n3.nabble.com> <52E12EE1.9050203@gmail.com> <1390489911789-4027829.post@n3.nabble.com> <1390491239914-4027831.post@n3.nabble.com> <1390493123715-4027834.post@n3.nabble.com> <31949629-49A4-409E-9960-1E407665E133@codehaus.org> <1390841748810-4027871.post@n3.nabble.com> <729601B4-4FB1-488E-AD46-04A4E4563B65@codehaus.org> <1390906701628-4027884.post@n3.nabble.com> Message-ID: Are you able to provide a test, for something that produces this? Mark On 28 Jan 2014, at 10:58, pmander wrote: > I've tried to reproduce this in a tester but all my unit tests show 6.0.0 > marginally quicker. The rules and data are simplified for the test so I'll > try something closer to what i am seeing on the full system. I've just done > another comparison and the results are shown in the attached image. > > There are a number of spikes in the 6.0.1 run that don't help, but it is > clear that the 5.5.0 execution is better. I've run the tests several times > and all show the same thing. > > 1st col is average time - 250 jobs to process > 2nd col is total time for test to complete - 10 processes executing - 48 > core machine 4gb per process - mvel dialect > > For 5.5.0 > > 5854 215 > 5707 193 > 5629 189 > 5512 183 > 5607 189 > 5395 183 > 5369 183 > > For 6.0.0 > > 6229 244 > 5828 219 > 6076 223 > 5767 220 > 5735 220 > 5821 214 > > > > > -- > View this message in context: http://drools.46999.n3.nabble.com/java-dialect-and-declared-types-tp4027822p4027884.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 Tue Jan 28 16:05:58 2014 From: mproctor at codehaus.org (Mark Proctor) Date: Tue, 28 Jan 2014 21:05:58 +0000 Subject: [rules-users] java dialect and declared types In-Reply-To: <1390489911789-4027829.post@n3.nabble.com> References: <1390480823925-4027822.post@n3.nabble.com> <52E1104B.9060503@gmail.com> <1390488363576-4027827.post@n3.nabble.com> <52E12EE1.9050203@gmail.com> <1390489911789-4027829.post@n3.nabble.com> Message-ID: please do pop onto irc and provides us with more details on the performance testing you are doing. We need to add more tests to our test suite, to track any regressions. http://www.jboss.org/drools/irc Mark On 23 Jan 2014, at 15:11, pmander wrote: Thanks, This was just for a performance test to check mvel against java. Mvel in our case is quicker. The tests also show that 5.5.0 is quicker than 6.0.0. -- View this message in context: http://drools.46999.n3.nabble.com/java-dialect-and-declared-types-tp4027822p4027829.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/20140128/e5b3c059/attachment.html From anjana.ackroyd at gmail.com Tue Jan 28 16:05:41 2014 From: anjana.ackroyd at gmail.com (anjana.ackroyd) Date: Tue, 28 Jan 2014 13:05:41 -0800 (PST) Subject: [rules-users] permgen error for simple rule stress test Message-ID: <1390943141810-4027895.post@n3.nabble.com> We are running a simple stress test (whose code I will paste below) for a numbercompare rule file) We get the following error before the test finishes. Which seems odd for one rule javax.servlet.ServletException: java.lang.OutOfMemoryError: PermGen space This test is run against 3 loablanced tomcat servers Here is my JVM_OPTS for each of those tomcat JVM_OPTS="-Xms4096m -Xmx4096m -XX:NewSize=2048m -XX:PermSize=512m -XX:MaxPermSize=512m -Xss1024K -XX:+UseCodeCacheFlushing -XX:-UseSplitVerifier" Here is I have a simple rule file deployed on guvnor on my abc with JVM_OPTS on the guvnor being JVM_OPTS="-Xms4096m -Xmx4096m -XX:NewSize=2048m -XX:PermSize=512m -XX:MaxPermSize=512m -Xss1024K Here is my stress test that we are running package DroolsTest; import java.io.BufferedReader; import java.io.InputStream; import java.io.InputStreamReader; import java.net.HttpURLConnection; import java.net.URL; import confident.guppy.tools.Caller; public class DroolsSpeedTest { public static void main(String[] args) { HttpURLConnection httpURLConnection = null; InputStream inputStream = null; BufferedReader bufferedReader = null; long t1 = System.currentTimeMillis(); for (int i = 0; i < 10000; i++) { try { long start = System.currentTimeMillis(); // Three boxes String url = "https://abc-uat2.xyz.com/ces/v2.0/rules/10/compare/10"; httpURLConnection = (HttpURLConnection) ( new URL(url).openConnection()); if (httpURLConnection != null) { inputStream = httpURLConnection.getInputStream(); bufferedReader = new BufferedReader(new InputStreamReader( inputStream)); String results = ""; String info = ""; while ((info = bufferedReader.readLine()) != null) { results += info; } //caller.log(results); } else { System.out.println("Unable to create the HTTP connection with the required server..."); } if (i % 20 == 0 && i != 0 ) { System.out.println(" passing " + i + " ms " + ( System.currentTimeMillis() - start )); } } catch (Exception boom) { boom.printStackTrace(); System.out.println("It died on the " + i + " attempt because " + boom.getMessage()); } } long t2 = System.currentTimeMillis() - t1 ; System.out.println("I took ms : "+ t2 ); } } Here is my rules defined on guvnor package org.numbercompare; declare NumberCompare message : String numberone: Integer numbertwo: Integer end rule "numberone is equals to numbertwo" when n: NumberCompare(numberone == numbertwo); then n.setMessage("numberone is equals to numbertwo"); end rule "numberone is greater than numbertwo" when n: NumberCompare(numberone > numbertwo); then n.setMessage("numberone is greater than numbertwo"); end rule "numberone is less than numbertwo" when n: NumberCompare(numberone < numbertwo); then n.setMessage("numberone is less than numbertwo"); end Here is my code that updates the rule file public KnowledgeBase readKnowledgeBase() throws Exception { ResourceFactory.getResourceChangeNotifierService().start(); ResourceFactory.getResourceChangeScannerService().start(); ResourceChangeScannerConfiguration sconf = ResourceFactory.getResourceChangeScannerService().newResourceChangeScannerConfiguration(); sconf.setProperty("drools.resource.scanner.interval", "2"); ResourceFactory.getResourceChangeScannerService().configure(sconf); KnowledgeAgentConfiguration kaconf = KnowledgeAgentFactory.newKnowledgeAgentConfiguration(); kaconf.setProperty("drools.agent.scanDirectories", "true"); kaconf.setProperty("drools.agent.scanResources", "true"); kaconf.setProperty("drools.agent.newInstance", "false"); KnowledgeAgent kagent = KnowledgeAgentFactory.newKnowledgeAgent("CS", kaconf); kagent.applyChangeSet(ResourceFactory.newClassPathResource("ChangeSet.xml")); KnowledgeBase kbase = kagent.getKnowledgeBase(); return kbase; } @Override public DroolsDTO getDroolsDTO(int numberone, int numbertwo) throws Exception { DroolsDTO droolsDTO = new DroolsDTO(); KnowledgeBase kb = readKnowledgeBase(); FactType factType = kb.getFactType("org.numbercompare", "NumberCompare"); Object nc = factType.newInstance(); factType.set(nc, "numberone", numberone); factType.set(nc, "numbertwo", numbertwo); StatefulKnowledgeSession ksession = kb.newStatefulKnowledgeSession(); ksession.insert(nc); ksession.fireAllRules(); ksession.dispose(); droolsDTO.setMessage(factType.get(nc, "message").toString()); return droolsDTO; } My changeset.xml Also in the guvnor logs during the test I see , I see thousands of these: WARN 28-01 11:50:55,551 (RulesRepositoryManager.java:getRulesRepository:70) Creating RulesRepository with default username. =============== session-guest-864931 and the session-guest numbers keep climbing. and admin user logging in about every second. -- View this message in context: http://drools.46999.n3.nabble.com/permgen-error-for-simple-rule-stress-test-tp4027895.html Sent from the Drools: User forum mailing list archive at Nabble.com. From gboro54 at gmail.com Tue Jan 28 16:39:10 2014 From: gboro54 at gmail.com (gboro54) Date: Tue, 28 Jan 2014 13:39:10 -0800 (PST) Subject: [rules-users] kie-workbench external maven repo Message-ID: <1390945150640-4027897.post@n3.nabble.com> Is there a way to setup the kie workbench to point to an internal maven repo to pull internal libraries? -- View this message in context: http://drools.46999.n3.nabble.com/kie-workbench-external-maven-repo-tp4027897.html Sent from the Drools: User forum mailing list archive at Nabble.com. From rexxe98 at gmail.com Tue Jan 28 17:03:44 2014 From: rexxe98 at gmail.com (Andrew Berman) Date: Tue, 28 Jan 2014 14:03:44 -0800 Subject: [rules-users] Drools 6 and Gradle? Message-ID: Hello, I keep running into an issue where Drools is looking for a pom.properties file and I get an error since I'm using Gradle. Does Drools depend on Maven? I noticed there is a lot of code looking for Maven and pom.xml and pom.properties, why is that? Thanks! -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.jboss.org/pipermail/rules-users/attachments/20140128/f3b104ac/attachment.html From mproctor at codehaus.org Tue Jan 28 19:06:56 2014 From: mproctor at codehaus.org (Mark Proctor) Date: Wed, 29 Jan 2014 00:06:56 +0000 Subject: [rules-users] Drools 6 and Gradle? In-Reply-To: References: Message-ID: <197C7A2B-45D7-4083-AE67-4466487B6CC4@codehaus.org> We require jars that are built to conform to maven standards. But they do not need to be built with maven. That means they do need a pom.properties in there. If gradle does not add that automatically, you should be able to automate that yourself. The pom.properties is a very simple file, that requires 3 key value pairs: #Generated by Maven #Wed Nov 18 14:44:09 PST 2009 version=2.2 groupId=javax.el artifactId=el-api This is necessary for discovery of jars, and versioning of jars within the same JVM. Maven provides a standard for this, so it seemed redundant us creating yet another way to declare this meta data. Mark On 28 Jan 2014, at 22:03, Andrew Berman wrote: > Hello, > > I keep running into an issue where Drools is looking for a pom.properties file and I get an error since I'm using Gradle. Does Drools depend on Maven? I noticed there is a lot of code looking for Maven and pom.xml and pom.properties, why is that? > > 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/20140129/dece82de/attachment.html From mproctor at codehaus.org Tue Jan 28 19:12:31 2014 From: mproctor at codehaus.org (Mark Proctor) Date: Wed, 29 Jan 2014 00:12:31 +0000 Subject: [rules-users] kie-workbench external maven repo In-Reply-To: <1390945150640-4027897.post@n3.nabble.com> References: <1390945150640-4027897.post@n3.nabble.com> Message-ID: It obeys the settings.xml file for repository configurations. http://docs.jboss.org/drools/release/6.0.1.Final/drools-docs/html/KIEChapter.html 4.2.3.5. Settings.xml and Remote Repository Ssetup Mark On 28 Jan 2014, at 21:39, gboro54 wrote: > Is there a way to setup the kie workbench to point to an internal maven repo > to pull internal libraries? > > > > -- > View this message in context: http://drools.46999.n3.nabble.com/kie-workbench-external-maven-repo-tp4027897.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/20140129/1158f819/attachment-0001.html From mproctor at codehaus.org Tue Jan 28 19:18:32 2014 From: mproctor at codehaus.org (Mark Proctor) Date: Wed, 29 Jan 2014 00:18:32 +0000 Subject: [rules-users] permgen error for simple rule stress test In-Reply-To: <1390943141810-4027895.post@n3.nabble.com> References: <1390943141810-4027895.post@n3.nabble.com> Message-ID: permien issus were fixed in the 5.6 release, and 6.0 release, by Davide Sottara. Mark On 28 Jan 2014, at 21:05, anjana.ackroyd wrote: > We are running a simple stress test (whose code I will paste below) for a > numbercompare rule file) > We get the following error before the test finishes. Which seems odd for one > rule > javax.servlet.ServletException: java.lang.OutOfMemoryError: PermGen space > > This test is run against 3 loablanced tomcat servers > > > Here is my JVM_OPTS for each of those tomcat > JVM_OPTS="-Xms4096m -Xmx4096m -XX:NewSize=2048m -XX:PermSize=512m > -XX:MaxPermSize=512m -Xss1024K -XX:+UseCodeCacheFlushing > -XX:-UseSplitVerifier" > > Here is > > I have a simple rule file deployed on guvnor on my abc with JVM_OPTS on the > guvnor being > JVM_OPTS="-Xms4096m -Xmx4096m -XX:NewSize=2048m -XX:PermSize=512m > -XX:MaxPermSize=512m -Xss1024K > > > > > Here is my stress test that we are running > > package DroolsTest; > import java.io.BufferedReader; > import java.io.InputStream; > import java.io.InputStreamReader; > import java.net.HttpURLConnection; > import java.net.URL; > > import confident.guppy.tools.Caller; > > public class DroolsSpeedTest { > > public static void main(String[] args) { > HttpURLConnection httpURLConnection = null; > InputStream inputStream = null; > BufferedReader bufferedReader = null; > > long t1 = System.currentTimeMillis(); > for (int i = 0; i < 10000; i++) { > try { > long start = > System.currentTimeMillis(); > // Three > boxes > String url = > "https://abc-uat2.xyz.com/ces/v2.0/rules/10/compare/10"; > > > > > httpURLConnection = (HttpURLConnection) ( new URL(url).openConnection()); > > if > (httpURLConnection != null) { > > inputStream = httpURLConnection.getInputStream(); > > bufferedReader = new BufferedReader(new InputStreamReader( > > inputStream)); > > String results = ""; > > String info = ""; > > while ((info = bufferedReader.readLine()) != null) { > > results += info; > > } > > //caller.log(results); > } else { > > System.out.println("Unable to create the HTTP connection with the required > server..."); > } > > if (i % 20 > == 0 && i != 0 ) { > > System.out.println(" passing " + i + " ms " + ( > System.currentTimeMillis() - start )); > } > > } catch (Exception boom) { > > boom.printStackTrace(); > > System.out.println("It died on the " + i + " attempt because " + > boom.getMessage()); > } > } > long t2 = System.currentTimeMillis() - t1 ; > System.out.println("I took ms : "+ t2 ); > } > } > > > > > Here is my rules defined on guvnor > > > > package org.numbercompare; > declare NumberCompare > message : String > numberone: Integer > numbertwo: Integer > end > > rule "numberone is equals to numbertwo" > > when > n: NumberCompare(numberone == numbertwo); > > then > n.setMessage("numberone is equals to numbertwo"); > > end > > rule "numberone is greater than numbertwo" > when > n: NumberCompare(numberone > numbertwo); > > then > n.setMessage("numberone is greater than numbertwo"); > end > > rule "numberone is less than numbertwo" > when > n: NumberCompare(numberone < numbertwo); > > then > n.setMessage("numberone is less than numbertwo"); > > end > > > Here is my code that updates the rule file > > > > public KnowledgeBase readKnowledgeBase() throws Exception { > ResourceFactory.getResourceChangeNotifierService().start(); > ResourceFactory.getResourceChangeScannerService().start(); > ResourceChangeScannerConfiguration sconf = > ResourceFactory.getResourceChangeScannerService().newResourceChangeScannerConfiguration(); > sconf.setProperty("drools.resource.scanner.interval", "2"); > ResourceFactory.getResourceChangeScannerService().configure(sconf); > KnowledgeAgentConfiguration kaconf = > KnowledgeAgentFactory.newKnowledgeAgentConfiguration(); > kaconf.setProperty("drools.agent.scanDirectories", "true"); > kaconf.setProperty("drools.agent.scanResources", "true"); > kaconf.setProperty("drools.agent.newInstance", "false"); > KnowledgeAgent kagent = > KnowledgeAgentFactory.newKnowledgeAgent("CS", kaconf); > > kagent.applyChangeSet(ResourceFactory.newClassPathResource("ChangeSet.xml")); > KnowledgeBase kbase = kagent.getKnowledgeBase(); > > return kbase; > } > > @Override > public DroolsDTO getDroolsDTO(int numberone, int numbertwo) throws > Exception { > DroolsDTO droolsDTO = new DroolsDTO(); > KnowledgeBase kb = readKnowledgeBase(); > FactType factType = kb.getFactType("org.numbercompare", > "NumberCompare"); > Object nc = factType.newInstance(); > factType.set(nc, "numberone", numberone); > factType.set(nc, "numbertwo", numbertwo); > StatefulKnowledgeSession ksession = > kb.newStatefulKnowledgeSession(); > ksession.insert(nc); > ksession.fireAllRules(); > ksession.dispose(); > droolsDTO.setMessage(factType.get(nc, "message").toString()); > return droolsDTO; > } > > > My changeset.xml > xmlns:xs='http://www.w3.org/2001/XMLSchema-instance' > xs:schemaLocation='http://drools.org/drools-5.0/change-set > http://anonsvn.jboss.org/repos/labs/labs/jbossrules/trunk/drools-api/src/main/resources/change-set-1.0.0.xsd' >> > > source='http://abc:8082/guvnor/org.drools.guvnor.Guvnor/package/org.numbercompare/LATEST' > type='PKG' basicAuthentication="enabled" username="admin" password="admin"/> > > > > > > > > > > Also in the guvnor logs during the test I see > , I see thousands of these: WARN 28-01 11:50:55,551 > (RulesRepositoryManager.java:getRulesRepository:70) Creating RulesRepository > with default username. =============== session-guest-864931 > and the session-guest numbers keep climbing. > and admin user logging in about every second. > > > > > -- > View this message in context: http://drools.46999.n3.nabble.com/permgen-error-for-simple-rule-stress-test-tp4027895.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 harpreet2301 at yahoo.com Tue Jan 28 19:50:42 2014 From: harpreet2301 at yahoo.com (Harpreet Singh) Date: Tue, 28 Jan 2014 16:50:42 -0800 (PST) Subject: [rules-users] ReteOO, KnowledgeBase and KnowledgeSession relation Message-ID: <1390956642.98362.YahooMailNeo@web121204.mail.ne1.yahoo.com> Hi, I understand that the ReteOO network is built when a KnowledgeBase is created. Can you please tell me: -?if any modifications are made to this network after a session (say StatefulKnowledgeSession) has been created from this KnowledgeBase? - any optimizations made at the session level? (such that time taken to fire rules decreases when certain set of facts are re-inserted and rules re-executed) I could not find any explanation in Drools Expert documentation regarding the above two points. Any pointers explaining the relation between ReteOO, KnowledgeBase and KnowledgeSession will be helpful. Thanks.? -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.jboss.org/pipermail/rules-users/attachments/20140128/ca27e2f2/attachment.html From terry at inastrol.com Tue Jan 28 20:01:08 2014 From: terry at inastrol.com (Inastrol) Date: Tue, 28 Jan 2014 17:01:08 -0800 (PST) Subject: [rules-users] Drools, slf4j and Eclipse Error on DroolsTest.Java In-Reply-To: <1390925652690-4027888.post@n3.nabble.com> References: <1390617259610-4027853.post@n3.nabble.com> <1390925652690-4027888.post@n3.nabble.com> Message-ID: <52E852B4.6020500@inastrol.com> Figured out the problem. Didn't have Maven installed as a plug-in correctly. The book I'm using to learn Drools, didn't include that step. Terry Moriarty wrote: > This isn't my code. It's created when a Drools project is created in > Eclipse. I guess that's why this is so frustrating. It's supposed to > demonstrate a very simple Drools program and I can't get it to work. > It's hard to debug someone else's code when you don't know the > language yet. > > Code is kSession.insert(message); > > Thanks > > sdjoe [via Drools] wrote: > >> Hard to say without seeing your code. Can you post it here and point >> out where the NPE is happening on line 23? >> >> ------------------------------------------------------------------------ >> If you reply to this email, your message will be added to the >> discussion below: >> http://drools.46999.n3.nabble.com/Drools-slf4j-and-Eclipse-Error-on-DroolsTest-Java-tp4027853p4027888.html >> >> To unsubscribe from Drools, slf4j and Eclipse Error on >> DroolsTest.Java, click here >> . >> NAML >> >> > >------------------------------------------------------------------------ > >package com.sample; > >import org.kie.api.KieServices; >import org.kie.api.runtime.KieContainer; >import org.kie.api.runtime.KieSession; > >/** > * This is a sample class to launch a rule. > */ >public class DroolsTest { > > public static final void main(String[] args) { > try { > // load up the knowledge base > KieServices ks = KieServices.Factory.get(); > KieContainer kContainer = ks.getKieClasspathContainer(); > KieSession kSession = kContainer.newKieSession("ksession-rules"); > > // go ! > Message message = new Message(); > message.setMessage("Hello World"); > message.setStatus(Message.HELLO); > kSession.insert(message); > kSession.fireAllRules(); > } catch (Throwable t) { > t.printStackTrace(); > } > } > > public static class Message { > > public static final int HELLO = 0; > public static final int GOODBYE = 1; > > private String message; > > private int status; > > public String getMessage() { > return this.message; > } > > public void setMessage(String message) { > this.message = message; > } > > public int getStatus() { > return this.status; > } > > public void setStatus(int status) { > this.status = status; > } > > } > >} > > -- View this message in context: http://drools.46999.n3.nabble.com/Drools-slf4j-and-Eclipse-Error-on-DroolsTest-Java-tp4027853p4027904.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/20140128/a1567858/attachment.html From mproctor at codehaus.org Tue Jan 28 20:02:22 2014 From: mproctor at codehaus.org (Mark Proctor) Date: Wed, 29 Jan 2014 01:02:22 +0000 Subject: [rules-users] ReteOO, KnowledgeBase and KnowledgeSession relation In-Reply-To: <1390956642.98362.YahooMailNeo@web121204.mail.ne1.yahoo.com> References: <1390956642.98362.YahooMailNeo@web121204.mail.ne1.yahoo.com> Message-ID: On 29 Jan 2014, at 00:50, Harpreet Singh wrote: > Hi, > > I understand that the ReteOO network is built when a KnowledgeBase is created. Can you please tell me: > - if any modifications are made to this network after a session (say StatefulKnowledgeSession) has been created from this KnowledgeBase? Not unless you add or remove rules. > - any optimizations made at the session level? (such that time taken to fire rules decreases when certain set of facts are re-inserted and rules re-executed) no, not if you have to re-insert all data. > > I could not find any explanation in Drools Expert documentation regarding the above two points. Any pointers explaining the relation between ReteOO, KnowledgeBase and KnowledgeSession will be helpful. > > 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/20140129/37827b24/attachment-0001.html From mproctor at codehaus.org Tue Jan 28 20:03:17 2014 From: mproctor at codehaus.org (Mark Proctor) Date: Wed, 29 Jan 2014 01:03:17 +0000 Subject: [rules-users] Drools, slf4j and Eclipse Error on DroolsTest.Java In-Reply-To: <52E852B4.6020500@inastrol.com> References: <1390617259610-4027853.post@n3.nabble.com> <1390925652690-4027888.post@n3.nabble.com> <52E852B4.6020500@inastrol.com> Message-ID: The book will be older, than the 6.x series. Mark On 29 Jan 2014, at 01:01, Inastrol wrote: > Figured out the problem. Didn't have Maven installed as a plug-in correctly. The book I'm using to learn Drools, didn't include that step. > > > Terry Moriarty wrote: >> This isn't my code. It's created when a Drools project is created in Eclipse. I guess that's why this is so frustrating. It's supposed to demonstrate a very simple Drools program and I can't get it to work. It's hard to debug someone else's code when you don't know the language yet. >> >> Code is kSession.insert(message); >> >> Thanks >> >> sdjoe [via Drools] wrote: >>> Hard to say without seeing your code. Can you post it here and point out where the NPE is happening on line 23? >>> >>> If you reply to this email, your message will be added to the discussion below: >>> http://drools.46999.n3.nabble.com/Drools-slf4j-and-Eclipse-Error-on-DroolsTest-Java-tp4027853p4027888.html >>> To unsubscribe from Drools, slf4j and Eclipse Error on DroolsTest.Java, click here. >>> NAML >> >> package com.sample; >> >> import org.kie.api.KieServices; >> import org.kie.api.runtime.KieContainer; >> import org.kie.api.runtime.KieSession; >> >> /** >> * This is a sample class to launch a rule. >> */ >> public class DroolsTest { >> >> public static final void main(String[] args) { >> try { >> // load up the knowledge base >> KieServices ks = KieServices.Factory.get(); >> KieContainer kContainer = ks.getKieClasspathContainer(); >> KieSession kSession = kContainer.newKieSession("ksession-rules"); >> >> // go ! >> Message message = new Message(); >> message.setMessage("Hello World"); >> message.setStatus(Message.HELLO); >> kSession.insert(message); >> kSession.fireAllRules(); >> } catch (Throwable t) { >> t.printStackTrace(); >> } >> } >> >> public static class Message { >> >> public static final int HELLO = 0; >> public static final int GOODBYE = 1; >> >> private String message; >> >> private int status; >> >> public String getMessage() { >> return this.message; >> } >> >> public void setMessage(String message) { >> this.message = message; >> } >> >> public int getStatus() { >> return this.status; >> } >> >> public void setStatus(int status) { >> this.status = status; >> } >> >> } >> >> } >> > > View this message in context: Re: Drools, slf4j and Eclipse Error on DroolsTest.Java > 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/20140129/3d54bd6f/attachment.html From rexxe98 at gmail.com Tue Jan 28 20:11:49 2014 From: rexxe98 at gmail.com (Andrew Berman) Date: Tue, 28 Jan 2014 17:11:49 -0800 Subject: [rules-users] Drools 6 and Gradle? In-Reply-To: <197C7A2B-45D7-4083-AE67-4466487B6CC4@codehaus.org> References: <197C7A2B-45D7-4083-AE67-4466487B6CC4@codehaus.org> Message-ID: Great, thanks Mark! On Tue, Jan 28, 2014 at 4:06 PM, Mark Proctor wrote: > We require jars that are built to conform to maven standards. But they do > not need to be built with maven. That means they do need a pom.properties > in there. If gradle does not add that automatically, you should be able to > automate that yourself. > > The pom.properties is a very simple file, that requires 3 key value pairs: > > *#Generated by Maven > **#Wed Nov 18 14:44:09 PST 2009 > **version*=*2.2 > **groupId*=*javax.el > **artifactId*=*el-api > * > > > This is necessary for discovery of jars, and versioning of jars within the > same JVM. Maven provides a standard for this, so it seemed redundant us > creating yet another way to declare this meta data. > > Mark > > > On 28 Jan 2014, at 22:03, Andrew Berman wrote: > > Hello, > > I keep running into an issue where Drools is looking for a pom.properties > file and I get an error since I'm using Gradle. Does Drools depend on > Maven? I noticed there is a lot of code looking for Maven and pom.xml and > pom.properties, why is that? > > Thanks! > _______________________________________________ > 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/20140128/0c0beb39/attachment.html From terry at inastrol.com Tue Jan 28 20:21:15 2014 From: terry at inastrol.com (Terry Moriarty) Date: Tue, 28 Jan 2014 17:21:15 -0800 Subject: [rules-users] Drools, slf4j and Eclipse Error on DroolsTest.Java In-Reply-To: References: <1390617259610-4027853.post@n3.nabble.com> <1390925652690-4027888.post@n3.nabble.com> <52E852B4.6020500@inastrol.com> Message-ID: <52E8578B.5050801@inastrol.com> But there are no books available for 6.,x, right? I'll just hope that it hasn't changed that much so I can use these books to learn the basics of the product. Mark Proctor wrote: > The book will be older, than the 6.x series. > > Mark > On 29 Jan 2014, at 01:01, Inastrol > wrote: > >> Figured out the problem. Didn't have Maven installed as a plug-in >> correctly. The book I'm using to learn Drools, didn't include that step. >> >> >> Terry Moriarty wrote: >> >>> This isn't my code. It's created when a Drools project is created >>> in Eclipse. I guess that's why this is so frustrating. It's >>> supposed to demonstrate a very simple Drools program and I can't get >>> it to work. It's hard to debug someone else's code when you don't >>> know the language yet. >>> >>> Code is kSession.insert(message); >>> >>> Thanks >>> >>> sdjoe [via Drools] wrote: >>> >>>> Hard to say without seeing your code. Can you post it here and >>>> point out where the NPE is happening on line 23? >>>> >>>> ------------------------------------------------------------------------ >>>> If you reply to this email, your message will be added to the >>>> discussion below: >>>> http://drools.46999.n3.nabble.com/Drools-slf4j-and-Eclipse-Error-on-DroolsTest-Java-tp4027853p4027888.html >>>> >>>> To unsubscribe from Drools, slf4j and Eclipse Error on >>>> DroolsTest.Java, click here. >>>> NAML >>>> >>>> >>> >>>------------------------------------------------------------------------ >>> >>>package com.sample; >>> >>>import org.kie.api.KieServices; >>>import org.kie.api.runtime.KieContainer; >>>import org.kie.api.runtime.KieSession; >>> >>>/** >>> * This is a sample class to launch a rule. >>> */ >>>public class DroolsTest { >>> >>> public static final void main(String[] args) { >>> try { >>> // load up the knowledge base >>> KieServices ks = KieServices.Factory.get(); >>> KieContainer kContainer = ks.getKieClasspathContainer(); >>> KieSession kSession = kContainer.newKieSession("ksession-rules"); >>> >>> // go ! >>> Message message = new Message(); >>> message.setMessage("Hello World"); >>> message.setStatus(Message.HELLO); >>> kSession.insert(message); >>> kSession.fireAllRules(); >>> } catch (Throwable t) { >>> t.printStackTrace(); >>> } >>> } >>> >>> public static class Message { >>> >>> public static final int HELLO = 0; >>> public static final int GOODBYE = 1; >>> >>> private String message; >>> >>> private int status; >>> >>> public String getMessage() { >>> return this.message; >>> } >>> >>> public void setMessage(String message) { >>> this.message = message; >>> } >>> >>> public int getStatus() { >>> return this.status; >>> } >>> >>> public void setStatus(int status) { >>> this.status = status; >>> } >>> >>> } >>> >>>} >>> >>> >> >> ------------------------------------------------------------------------ >> View this message in context: Re: Drools, slf4j and Eclipse Error on >> DroolsTest.Java >> >> 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/20140128/bb40a0a3/attachment-0001.html From clickthex at yahoo.com Wed Jan 29 12:51:05 2014 From: clickthex at yahoo.com (SrjTx) Date: Wed, 29 Jan 2014 09:51:05 -0800 (PST) Subject: [rules-users] Null pointer exception when using global in rdrl 6.0.1.F - WHAT WE DID In-Reply-To: References: <1390870492478-4027876.post@n3.nabble.com> <1390889892141-4027881.post@n3.nabble.com> Message-ID: <1391017865497-4027910.post@n3.nabble.com> So here's what we end up doing. Updated the camel route coming into switchyard to have a bean in the middle. This bean is basically a pass-through, but it has a static instance of the "global" class we need. As the java object passes thought the bean, we assigned our "global" class to it, and then we can use it in "thens" by doing something like ourObject.ourGlobal.foo(); Kind of a hack as your java objects need setter/getter for the "global", but for now, it works. -- View this message in context: http://drools.46999.n3.nabble.com/Null-pointer-exception-when-using-global-in-rdrl-6-0-1-F-tp4027876p4027910.html Sent from the Drools: User forum mailing list archive at Nabble.com. From travistcummings at yahoo.com Wed Jan 29 13:10:06 2014 From: travistcummings at yahoo.com (travistcummings) Date: Wed, 29 Jan 2014 10:10:06 -0800 (PST) Subject: [rules-users] Pooling KnowledgeBase instances Message-ID: <1391019006923-4027911.post@n3.nabble.com> Hi, I am running into an issue in a highly concurrent environment where my threads are waiting on locking of the rule base when I try to insert into the session. I am wondering if an appropriate solution would be to create a pool of KnowledgeBase objects, each having its own rule base. A thread dump of my server had the message below for about 40 threads. For my use case, I create the knowledge base once, then don't modify it in any way. Thank you! Travis "ajp-bio-8010-exec-984" daemon prio=10 tid=0x081f3800 nid=0x2a7c waiting on condition [0x9f368000] java.lang.Thread.State: WAITING (parking) at sun.misc.Unsafe.park(Native Method) - parking to wait for <0xf0489a50> (a java.util.concurrent.locks.ReentrantReadWriteLock$NonfairSync) at java.util.concurrent.locks.LockSupport.park(LockSupport.java:186) at java.util.concurrent.locks.AbstractQueuedSynchronizer.parkAndCheckInterrupt(AbstractQueuedSynchronizer.java:834) at java.util.concurrent.locks.AbstractQueuedSynchronizer.acquireQueued(AbstractQueuedSynchronizer.java:867) at java.util.concurrent.locks.AbstractQueuedSynchronizer.acquire(AbstractQueuedSynchronizer.java:1197) at java.util.concurrent.locks.ReentrantReadWriteLock$WriteLock.lock(ReentrantReadWriteLock.java:945) at org.drools.common.UpgradableReentrantReadWriteLock.lowPriorityWriteLock(UpgradableReentrantReadWriteLock.java:105) at org.drools.common.UpgradableReentrantReadWriteLock.writeLock(UpgradableReentrantReadWriteLock.java:88) at org.drools.common.AbstractRuleBase.lock(AbstractRuleBase.java:475) at org.drools.reteoo.builder.PatternBuilder.attachObjectTypeNode(PatternBuilder.java:276) at org.drools.reteoo.ClassObjectTypeConf.(ClassObjectTypeConf.java:103) at org.drools.common.ObjectTypeConfigurationRegistry.getObjectTypeConf(ObjectTypeConfigurationRegistry.java:71) at org.drools.reteoo.Rete.assertObject(Rete.java:107) at org.drools.reteoo.ReteooRuleBase.assertObject(ReteooRuleBase.java:286) at org.drools.reteoo.ReteooWorkingMemory$WorkingMemoryReteAssertAction.execute(ReteooWorkingMemory.java:434) at org.drools.common.AbstractWorkingMemory.executeQueuedActions(AbstractWorkingMemory.java:993) at org.drools.common.NamedEntryPoint.insert(NamedEntryPoint.java:335) at org.drools.common.NamedEntryPoint.insert(NamedEntryPoint.java:311) at org.drools.common.AbstractWorkingMemory.insert(AbstractWorkingMemory.java:903) at org.drools.common.AbstractWorkingMemory.insert(AbstractWorkingMemory.java:847) at org.drools.impl.StatefulKnowledgeSessionImpl.insert(StatefulKnowledgeSessionImpl.java:269) -- View this message in context: http://drools.46999.n3.nabble.com/Pooling-KnowledgeBase-instances-tp4027911.html Sent from the Drools: User forum mailing list archive at Nabble.com. From mmadhavan at facs.org Wed Jan 29 13:22:46 2014 From: mmadhavan at facs.org (mattmadhavan) Date: Wed, 29 Jan 2014 10:22:46 -0800 (PST) Subject: [rules-users] Mvel "in" operator and Inline List Question (Elements with range) Message-ID: <1391019765946-4027912.post@n3.nabble.com> Hello, I see the example mvel "in" operator for the inline array as follows: surgeryCode in [00, 12, 13, 15, 19, *20, 21, 22, 23, 24, 25*, 30, 33, 45, 48, 55, 56, 65, 66, 70, 80, 90, 99] If you notice above the codes *21 to 25* are contiguous (Range) Is it possible to specify in the list a 'short hand' notation like 21-25 like as follows: surgeryCode in [00, 12, 13, 15, 19, 20, *21-25*, 30, 33, 45, 48, 55, 56, 65, 66, 70, 80, 90, 99] If Drools does not support it, is writing my own Custom Operator is my only option? Thanks in advance! Matt'M -- View this message in context: http://drools.46999.n3.nabble.com/Mvel-in-operator-and-Inline-List-Question-Elements-with-range-tp4027912.html Sent from the Drools: User forum mailing list archive at Nabble.com. From mmadhavan at facs.org Wed Jan 29 13:24:03 2014 From: mmadhavan at facs.org (mattmadhavan) Date: Wed, 29 Jan 2014 10:24:03 -0800 (PST) Subject: [rules-users] Drools - Processing large volume of (Same Type) Facts with muliple complex Rules groups Message-ID: <1391019843378-4027913.post@n3.nabble.com> Hello, I have a few questions on Drools. * My client has millions of rows of Facts of same type , to which the rules are applied. The facts are never updated. * There is multiple set of Rule groups (Cancer type can be Breast/Colon/Thyroid etc), with each group containing multiple rules in a separate .drl file (BeastCancer.drl, ColonCancer.drl etc). I have the following requirements/questions 1) Each group has a first rule that checks for Cancer type - If the caner type is not the one for this group (Say the CaseFact is for Colon but the current rule group is for Breast) the rule flow should stop for this group and continue for other groups. I guess I can achieve this by having my first rule with a high Salience and skip the rest of the rules if the condition is met. (drools.clearAgenda () may be ?) 2) within a group of rules - I need to skip the execution for rest of rules in this group only depending on the condition. 3) Some conditional flow (I believe I can achieve this with Rule Flow Group). 4) Should I have have one KnowledgeBase/Stateless session per .drl file (one per beast.drl one for colon.drl)? That seems to be the logical thing to! 5) Main question is how do I skip execution of a set of rules I appreciate in advance! Thanks Matt'M -- View this message in context: http://drools.46999.n3.nabble.com/Drools-Processing-large-volume-of-Same-Type-Facts-with-muliple-complex-Rules-groups-tp4027913.html Sent from the Drools: User forum mailing list archive at Nabble.com. From mproctor at codehaus.org Wed Jan 29 13:37:11 2014 From: mproctor at codehaus.org (Mark Proctor) Date: Wed, 29 Jan 2014 18:37:11 +0000 Subject: [rules-users] Pooling KnowledgeBase instances In-Reply-To: <1391019006923-4027911.post@n3.nabble.com> References: <1391019006923-4027911.post@n3.nabble.com> Message-ID: <756BBE6D-AC96-4751-9503-F2964049035A@codehaus.org> We don?t know what version you are running on. Various fixes have gone into threading over the years, try 5.6 or 6.0 and come back if there are problems. Makr On 29 Jan 2014, at 18:10, travistcummings wrote: > Hi, > > I am running into an issue in a highly concurrent environment where my > threads are waiting on locking of the rule base when I try to insert into > the session. I am wondering if an appropriate solution would be to create a > pool of KnowledgeBase objects, each having its own rule base. A thread dump > of my server had the message below for about 40 threads. > > For my use case, I create the knowledge base once, then don't modify it in > any way. > > Thank you! > Travis > > > "ajp-bio-8010-exec-984" daemon prio=10 tid=0x081f3800 nid=0x2a7c waiting on > condition [0x9f368000] > java.lang.Thread.State: WAITING (parking) > at sun.misc.Unsafe.park(Native Method) > - parking to wait for <0xf0489a50> (a > java.util.concurrent.locks.ReentrantReadWriteLock$NonfairSync) > at java.util.concurrent.locks.LockSupport.park(LockSupport.java:186) > at > java.util.concurrent.locks.AbstractQueuedSynchronizer.parkAndCheckInterrupt(AbstractQueuedSynchronizer.java:834) > at > java.util.concurrent.locks.AbstractQueuedSynchronizer.acquireQueued(AbstractQueuedSynchronizer.java:867) > at > java.util.concurrent.locks.AbstractQueuedSynchronizer.acquire(AbstractQueuedSynchronizer.java:1197) > at > java.util.concurrent.locks.ReentrantReadWriteLock$WriteLock.lock(ReentrantReadWriteLock.java:945) > at > org.drools.common.UpgradableReentrantReadWriteLock.lowPriorityWriteLock(UpgradableReentrantReadWriteLock.java:105) > at > org.drools.common.UpgradableReentrantReadWriteLock.writeLock(UpgradableReentrantReadWriteLock.java:88) > at org.drools.common.AbstractRuleBase.lock(AbstractRuleBase.java:475) > at > org.drools.reteoo.builder.PatternBuilder.attachObjectTypeNode(PatternBuilder.java:276) > at > org.drools.reteoo.ClassObjectTypeConf.(ClassObjectTypeConf.java:103) > at > org.drools.common.ObjectTypeConfigurationRegistry.getObjectTypeConf(ObjectTypeConfigurationRegistry.java:71) > at org.drools.reteoo.Rete.assertObject(Rete.java:107) > at org.drools.reteoo.ReteooRuleBase.assertObject(ReteooRuleBase.java:286) > at > org.drools.reteoo.ReteooWorkingMemory$WorkingMemoryReteAssertAction.execute(ReteooWorkingMemory.java:434) > at > org.drools.common.AbstractWorkingMemory.executeQueuedActions(AbstractWorkingMemory.java:993) > at org.drools.common.NamedEntryPoint.insert(NamedEntryPoint.java:335) > at org.drools.common.NamedEntryPoint.insert(NamedEntryPoint.java:311) > at > org.drools.common.AbstractWorkingMemory.insert(AbstractWorkingMemory.java:903) > at > org.drools.common.AbstractWorkingMemory.insert(AbstractWorkingMemory.java:847) > at > org.drools.impl.StatefulKnowledgeSessionImpl.insert(StatefulKnowledgeSessionImpl.java:269) > > > > -- > View this message in context: http://drools.46999.n3.nabble.com/Pooling-KnowledgeBase-instances-tp4027911.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 travistcummings at yahoo.com Wed Jan 29 14:37:55 2014 From: travistcummings at yahoo.com (travistcummings) Date: Wed, 29 Jan 2014 11:37:55 -0800 (PST) Subject: [rules-users] Pooling KnowledgeBase instances In-Reply-To: <756BBE6D-AC96-4751-9503-F2964049035A@codehaus.org> References: <1391019006923-4027911.post@n3.nabble.com> <756BBE6D-AC96-4751-9503-F2964049035A@codehaus.org> Message-ID: <1391024275105-4027915.post@n3.nabble.com> I am running 5.5. I will look into upgrading but that may not be a possibility right now. As for 5.5, is creating a pool of Knowledge bases a reasonable solution? -- View this message in context: http://drools.46999.n3.nabble.com/Pooling-KnowledgeBase-instances-tp4027911p4027915.html Sent from the Drools: User forum mailing list archive at Nabble.com. From david.stern at bankofamerica.com Wed Jan 29 14:53:45 2014 From: david.stern at bankofamerica.com (dstern) Date: Wed, 29 Jan 2014 11:53:45 -0800 (PST) Subject: [rules-users] Usage of the jcr2vfs migration tool Message-ID: <1391025225433-4027916.post@n3.nabble.com> Are there instructions anywhere for using the jcr2vfs migration tool? I pruned my JCR repository (created under Guvnor 5.6.0.Final) until the migration tool ran without error (which meant archiving all my brl format assets among other things) but I'm not sure what to do with the output. I copied the contents of outputVfs to my existing .niogit folder (leaving the .niogit generated by the migration tool alone) but the migrated repository doesn't show up. Is this because I didn't replace my existing .niogit with the one generated by the tool? -- View this message in context: http://drools.46999.n3.nabble.com/Usage-of-the-jcr2vfs-migration-tool-tp4027916.html Sent from the Drools: User forum mailing list archive at Nabble.com. From michael.anstis at gmail.com Wed Jan 29 15:07:58 2014 From: michael.anstis at gmail.com (Michael Anstis) Date: Wed, 29 Jan 2014 20:07:58 +0000 Subject: [rules-users] Usage of the jcr2vfs migration tool In-Reply-To: <1391025225433-4027916.post@n3.nabble.com> References: <1391025225433-4027916.post@n3.nabble.com> Message-ID: You should be able to add (clone) the repository created by the migration tool using the administration perspective. Sent on the move On 29 Jan 2014 19:54, "dstern" wrote: > Are there instructions anywhere for using the jcr2vfs migration tool? > > I pruned my JCR repository (created under Guvnor 5.6.0.Final) until the > migration tool ran without error (which meant archiving all my brl format > assets among other things) but I'm not sure what to do with the output. > > I copied the contents of outputVfs to my existing .niogit folder (leaving > the .niogit generated by the migration tool alone) but the migrated > repository doesn't show up. Is this because I didn't replace my existing > .niogit with the one generated by the tool? > > > > -- > View this message in context: > http://drools.46999.n3.nabble.com/Usage-of-the-jcr2vfs-migration-tool-tp4027916.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/20140129/9a4b4ac8/attachment.html From michael.anstis at gmail.com Wed Jan 29 15:09:15 2014 From: michael.anstis at gmail.com (Michael Anstis) Date: Wed, 29 Jan 2014 20:09:15 +0000 Subject: [rules-users] Usage of the jcr2vfs migration tool In-Reply-To: <1391025225433-4027916.post@n3.nabble.com> References: <1391025225433-4027916.post@n3.nabble.com> Message-ID: Oh, and BRL files should migrate too; if yours do not, create a test and raise a JIRA for GUVNOR (or even provide a pull request with a fix!!!) Sent on the move On 29 Jan 2014 19:54, "dstern" wrote: > Are there instructions anywhere for using the jcr2vfs migration tool? > > I pruned my JCR repository (created under Guvnor 5.6.0.Final) until the > migration tool ran without error (which meant archiving all my brl format > assets among other things) but I'm not sure what to do with the output. > > I copied the contents of outputVfs to my existing .niogit folder (leaving > the .niogit generated by the migration tool alone) but the migrated > repository doesn't show up. Is this because I didn't replace my existing > .niogit with the one generated by the tool? > > > > -- > View this message in context: > http://drools.46999.n3.nabble.com/Usage-of-the-jcr2vfs-migration-tool-tp4027916.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/20140129/85c65260/attachment-0001.html From clickthex at yahoo.com Wed Jan 29 15:33:52 2014 From: clickthex at yahoo.com (SrjTx) Date: Wed, 29 Jan 2014 12:33:52 -0800 (PST) Subject: [rules-users] DSL: Unable to Expand Error - Even things that shouldn't be expanded. In-Reply-To: References: <1390007054997-4027749.post@n3.nabble.com> <1390233561598-4027772.post@n3.nabble.com> <1390233714550-4027773.post@n3.nabble.com> <1390252717046-4027783.post@n3.nabble.com> Message-ID: <1391027632756-4027919.post@n3.nabble.com> I am still seeing this most of the time, is there a JIRA I should update, or create? -- View this message in context: http://drools.46999.n3.nabble.com/DSL-Unable-to-Expand-Error-Even-things-that-shouldn-t-be-expanded-tp4027749p4027919.html Sent from the Drools: User forum mailing list archive at Nabble.com. From michael.anstis at gmail.com Wed Jan 29 15:43:23 2014 From: michael.anstis at gmail.com (Michael Anstis) Date: Wed, 29 Jan 2014 20:43:23 +0000 Subject: [rules-users] DSL: Unable to Expand Error - Even things that shouldn't be expanded. In-Reply-To: <1391027632756-4027919.post@n3.nabble.com> References: <1390007054997-4027749.post@n3.nabble.com> <1390233561598-4027772.post@n3.nabble.com> <1390233714550-4027773.post@n3.nabble.com> <1390252717046-4027783.post@n3.nabble.com> <1391027632756-4027919.post@n3.nabble.com> Message-ID: "Most of the time" implies there are other occassions when you do not see it. Can you provide a link to an example repository containing a rule exhibiting the behaviour? I can dig out a bugzilla reference number tomorrow; when I'll be back on the laptop. Sent on the move On 29 Jan 2014 20:34, "SrjTx" wrote: > I am still seeing this most of the time, is there a JIRA I should update, > or > create? > > > > > -- > View this message in context: > http://drools.46999.n3.nabble.com/DSL-Unable-to-Expand-Error-Even-things-that-shouldn-t-be-expanded-tp4027749p4027919.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/20140129/fafdd409/attachment.html From mjr4184 at gmail.com Wed Jan 29 15:53:31 2014 From: mjr4184 at gmail.com (mikerod) Date: Wed, 29 Jan 2014 12:53:31 -0800 (PST) Subject: [rules-users] Incorrect resolution of global symbols in LHS rule constraint (Java dialect) Message-ID: <1391028811297-4027921.post@n3.nabble.com> I upgraded from 5.5.0.Final of Drools (rule engine) to 5.6.0.Final and I am now seeing errors with globals. We have rule constraints that access globals in a DRL; like this: some.classpath.package2.MyType ( global_instance.invoke(this) == true ) I have `some.classpath.package.SomeType global_instance;` declared at the top of the DRL, but it doesn't seem to be interpeting it as a global in the rule's restriction. So, putting this into context within, I have a DRL such as: package my.package.example; global some.classpath.package.SomeType global_instance; **** rule "Example rule" when some.classpath.package2.MyType ( global_instance.invoke(this) == true ) then // do something end **** I am getting an error from the package builder originating from the "Example rule" specifying something like: "can't find method MyType.global_instance()" Once, again this did work in 5.5.0.Final, but in 5.6.0.Final I am getting a failure trying to build the knowledge package. It looks to me like the `global_instance` symbol is not being recognized as a global in the DRL and is trying to be resolved as a method of the MyType class. So I guess it would be trying to do a "MyType.global_instance().invoke(this)" or something. The intent is that `global_instance` will be set for a session with an immutable function-type of class (invoke is an instance method though; not static). The rule restriction uses this function/predicate to determine if some complex criteria is true for `this` MyType instance. I would appreciate any insight into what the issue might be. I haven't been able to find any threads out there on a similar issue. -- View this message in context: http://drools.46999.n3.nabble.com/Incorrect-resolution-of-global-symbols-in-LHS-rule-constraint-Java-dialect-tp4027921.html Sent from the Drools: User forum mailing list archive at Nabble.com. From mproctor at codehaus.org Wed Jan 29 16:05:17 2014 From: mproctor at codehaus.org (Mark Proctor) Date: Wed, 29 Jan 2014 21:05:17 +0000 Subject: [rules-users] Drools 6 performance Message-ID: <86F04BFB-1E27-4CF6-8756-88CDB1D76DF2@codehaus.org> If anyone has tried 6.0 and seeing performance gains, please contact us. We want to find the real world use cases that benefit from the lazy evaluation. Mark From wolfgang.laun at gmail.com Wed Jan 29 16:22:09 2014 From: wolfgang.laun at gmail.com (Wolfgang Laun) Date: Wed, 29 Jan 2014 22:22:09 +0100 Subject: [rules-users] Mvel "in" operator and Inline List Question (Elements with range) In-Reply-To: <1391019765946-4027912.post@n3.nabble.com> References: <1391019765946-4027912.post@n3.nabble.com> Message-ID: You won't be able to improve things with a custom operator because the expression is still evaluated by the compiler and MVEL. This will give you -4 from 21-25. You could provide the expression as a string and parse and evaluate that, but that's not very convenient either. Creating sets as objects in Java code and make them available as static objects in some class might be the best way. -W On 29 January 2014 19:22, mattmadhavan wrote: > Hello, > I see the example mvel "in" operator for the inline array as follows: > > > surgeryCode in [00, 12, 13, 15, 19, *20, 21, 22, 23, 24, 25*, 30, 33, 45, > 48, 55, 56, 65, 66, 70, 80, 90, 99] > > If you notice above the codes *21 to 25* are contiguous (Range) > > Is it possible to specify in the list a 'short hand' notation like 21-25 > like as follows: > > surgeryCode in [00, 12, 13, 15, 19, 20, *21-25*, 30, 33, 45, 48, 55, 56, 65, > 66, 70, 80, 90, 99] > > If Drools does not support it, is writing my own Custom Operator is my only > option? > > Thanks in advance! > > Matt'M > > > > > -- > View this message in context: http://drools.46999.n3.nabble.com/Mvel-in-operator-and-Inline-List-Question-Elements-with-range-tp4027912.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 dunnlow at yahoo.com Wed Jan 29 16:55:52 2014 From: dunnlow at yahoo.com (dunnlow) Date: Wed, 29 Jan 2014 13:55:52 -0800 (PST) Subject: [rules-users] Intermittent startup error with Integration Server? Message-ID: <1391032552625-4027924.post@n3.nabble.com> I'm using the Drools Integration server (5.5) (with a persisted stateful ksession) and a java client that is sending events via httpclient. Most of the time, things work fine. Sometimes, when I restart the integration server, when it comes back up I I start getting messages (all following msgs to the server fail with a 500 (internal) error): org.apache.cxf.jaxrs.impl.WebApplicationExceptoinMapper toResponse WARNING: WebApplicationException has been caught : No converter specified for class org.drools.command.runtime.BatchExceutionCommandImpl ---- Debugging information ---- version : null ------------------------------- To fix this problem, I need to: 1) stop the client sending messages to the integration server, 2) restart the integration server 3) once it's up, I send a single message (which is successfully processed) 4) turn the client back on, and everything is just fine. It appears as if the Integration server doesn't like receiving messages as it is coming up. Does anyone have any thoughts about what is going on here and how to mitigate? Thanks, -J -- View this message in context: http://drools.46999.n3.nabble.com/Intermittent-startup-error-with-Integration-Server-tp4027924.html Sent from the Drools: User forum mailing list archive at Nabble.com. From anjana.ackroyd at gmail.com Wed Jan 29 17:08:30 2014 From: anjana.ackroyd at gmail.com (anjana.ackroyd) Date: Wed, 29 Jan 2014 14:08:30 -0800 (PST) Subject: [rules-users] permgen error for simple rule stress test In-Reply-To: References: <1390943141810-4027895.post@n3.nabble.com> Message-ID: <1391033310293-4027925.post@n3.nabble.com> Mark, I did some more analysis and I tracked it down to Guvnor my app connects to running out of memory before the test starts failing.Once I restart guvnor and redo my tests I get good response time and it eventually starts to slow down then throw 500 errors. I see a whole bunch of logs for Creating RulesRepository with default username. like before it throws out of memory WARN 29-01 14:08:18,920 (RulesRepositoryManager.java:getRulesRepository:70) Creating RulesRepository with default username. =============== session-guest-779944 =============== session-guest-779944 java.lang.OutOfMemoryError: GC overhead limit exceeded at org.jboss.weld.util.reflection.Reflections$TypeHolder.wrap(Reflections.java:542) at org.jboss.weld.util.reflection.Reflections$TypeHolder.access$000(Reflections.java:470) at org.jboss.weld.util.reflection.Reflections.isAssignableFrom(Reflections.java:320) at org.jboss.weld.util.reflection.Reflections.isAssignableFrom(Reflections.java:290) at org.jboss.weld.resolution.ResolvableBuilder.create(ResolvableBuilder.java:123) at org.jboss.weld.manager.BeanManagerImpl.getBeans(BeanManagerImpl.java:486) at org.jboss.weld.injection.ParameterInjectionPoint.getValueToInject(ParameterInjectionPoint.java:118) at org.jboss.weld.injection.MethodInjectionPoint.getParameterValues(MethodInjectionPoint.java:217) at org.jboss.weld.injection.MethodInjectionPoint.invokeOnInstance(MethodInjectionPoint.java:137) at org.jboss.weld.bean.ProducerMethod$ProducerMethodProducer.produce(ProducerMethod.java:136) at org.jboss.weld.bean.AbstractProducerBean$AbstractProducer.produce(AbstractProducerBean.java:319) at org.jboss.weld.bean.AbstractProducerBean.create(AbstractProducerBean.java:307) at org.jboss.weld.context.AbstractContext.get(AbstractContext.java:107) at org.jboss.weld.bean.proxy.ContextBeanInstance.getInstance(ContextBeanInstance.java:90) at org.jboss.weld.bean.proxy.ProxyMethodHandler.invoke(ProxyMethodHandler.java:79) at org.drools.repository.RulesRepository$Proxy$_$$_WeldClientProxy.loadModule(RulesRepository$Proxy$_$$_WeldClientProxy.java) at org.drools.guvnor.server.files.FileManagerService.getLastModified(FileManagerService.java:378) at org.drools.guvnor.server.files.FileManagerService$Proxy$_$$_WeldClientProxy.getLastModified(FileManagerService$Proxy$_$$_WeldClientProxy.java) at org.drools.guvnor.server.files.PackageDeploymentServlet.getLastModified(PackageDeploymentServlet.java:74) at javax.servlet.http.HttpServlet.service(HttpServlet.java:636) at javax.servlet.http.HttpServlet.service(HttpServlet.java:722) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:305) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:210) at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:224) at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:169) at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:472) at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:168) at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:98) at org.apache.catalina.valves.AccessLogValve.invoke(AccessLogValve.java:928) at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:118) at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:407) at org.apache.coyote.http11.AbstractHttp11Processor.process(AbstractHttp11Processor.java:987) We are running guvnor 5.5.0-Final on Springsource TOmcat 7.0.23 JAVA_HOME="/usr/pservices/jdk1.7.0_45" AGENT_PATHS="" JAVA_AGENTS="" JAVA_LIBRARY_PATH="" JVM_OPTS="-Xms4096m -Xmx4096m -XX:NewSize=2048m -XX:PermSize=512m -XX:MaxPermSize=512m -Xss1024K " JAVA_OPTS="$JVM_OPTS $AGENT_PATHS $JAVA_AGENTS $JAVA_LIBRARY_PATH" -- View this message in context: http://drools.46999.n3.nabble.com/permgen-error-for-simple-rule-stress-test-tp4027895p4027925.html Sent from the Drools: User forum mailing list archive at Nabble.com. From mproctor at codehaus.org Wed Jan 29 19:25:49 2014 From: mproctor at codehaus.org (Mark Proctor) Date: Thu, 30 Jan 2014 00:25:49 +0000 Subject: [rules-users] permgen error for simple rule stress test In-Reply-To: <1391033310293-4027925.post@n3.nabble.com> References: <1390943141810-4027895.post@n3.nabble.com> <1391033310293-4027925.post@n3.nabble.com> Message-ID: <952AD77F-D797-4E1F-BE15-B4925DC9E516@codehaus.org> 5.x is in maintenance now, it?s unlikely we will fix this - unless it?s requested by a paying customer. Although we will still consider community provided fixes. If it?s related to the permgen fixes we did for 5.6, it may already be fixed by that. If you can show the issue is still present in 6x, we will try and hunt it down and fix it there. Mark On 29 Jan 2014, at 22:08, anjana.ackroyd wrote: > Mark, > > I did some more analysis and I tracked it down to Guvnor my app connects to > running out of memory before the test starts failing.Once I restart guvnor > and redo my tests I get good response time and it eventually starts to slow > down then throw 500 errors. > > I see a whole bunch of logs for Creating RulesRepository with default > username. like before it throws out of memory > > > > > > > WARN 29-01 14:08:18,920 (RulesRepositoryManager.java:getRulesRepository:70) > Creating RulesRepository with default username. > =============== session-guest-779944 > =============== session-guest-779944 > java.lang.OutOfMemoryError: GC overhead limit exceeded > at > org.jboss.weld.util.reflection.Reflections$TypeHolder.wrap(Reflections.java:542) > at > org.jboss.weld.util.reflection.Reflections$TypeHolder.access$000(Reflections.java:470) > at > org.jboss.weld.util.reflection.Reflections.isAssignableFrom(Reflections.java:320) > at > org.jboss.weld.util.reflection.Reflections.isAssignableFrom(Reflections.java:290) > at > org.jboss.weld.resolution.ResolvableBuilder.create(ResolvableBuilder.java:123) > at > org.jboss.weld.manager.BeanManagerImpl.getBeans(BeanManagerImpl.java:486) > at > org.jboss.weld.injection.ParameterInjectionPoint.getValueToInject(ParameterInjectionPoint.java:118) > at > org.jboss.weld.injection.MethodInjectionPoint.getParameterValues(MethodInjectionPoint.java:217) > at > org.jboss.weld.injection.MethodInjectionPoint.invokeOnInstance(MethodInjectionPoint.java:137) > at > org.jboss.weld.bean.ProducerMethod$ProducerMethodProducer.produce(ProducerMethod.java:136) > at > org.jboss.weld.bean.AbstractProducerBean$AbstractProducer.produce(AbstractProducerBean.java:319) > at > org.jboss.weld.bean.AbstractProducerBean.create(AbstractProducerBean.java:307) > at > org.jboss.weld.context.AbstractContext.get(AbstractContext.java:107) > at > org.jboss.weld.bean.proxy.ContextBeanInstance.getInstance(ContextBeanInstance.java:90) > at > org.jboss.weld.bean.proxy.ProxyMethodHandler.invoke(ProxyMethodHandler.java:79) > at > org.drools.repository.RulesRepository$Proxy$_$$_WeldClientProxy.loadModule(RulesRepository$Proxy$_$$_WeldClientProxy.java) > at > org.drools.guvnor.server.files.FileManagerService.getLastModified(FileManagerService.java:378) > at > org.drools.guvnor.server.files.FileManagerService$Proxy$_$$_WeldClientProxy.getLastModified(FileManagerService$Proxy$_$$_WeldClientProxy.java) > at > org.drools.guvnor.server.files.PackageDeploymentServlet.getLastModified(PackageDeploymentServlet.java:74) > at javax.servlet.http.HttpServlet.service(HttpServlet.java:636) > at javax.servlet.http.HttpServlet.service(HttpServlet.java:722) > at > org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:305) > at > org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:210) > at > org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:224) > at > org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:169) > at > org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:472) > at > org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:168) > at > org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:98) > at > org.apache.catalina.valves.AccessLogValve.invoke(AccessLogValve.java:928) > at > org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:118) > at > org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:407) > at > org.apache.coyote.http11.AbstractHttp11Processor.process(AbstractHttp11Processor.java:987) > > > > > > > We are running guvnor 5.5.0-Final on Springsource TOmcat 7.0.23 > > > > > JAVA_HOME="/usr/pservices/jdk1.7.0_45" > AGENT_PATHS="" > JAVA_AGENTS="" > JAVA_LIBRARY_PATH="" > JVM_OPTS="-Xms4096m -Xmx4096m -XX:NewSize=2048m -XX:PermSize=512m > -XX:MaxPermSize=512m -Xss1024K " > JAVA_OPTS="$JVM_OPTS $AGENT_PATHS $JAVA_AGENTS $JAVA_LIBRARY_PATH" > > > > > > > -- > View this message in context: http://drools.46999.n3.nabble.com/permgen-error-for-simple-rule-stress-test-tp4027895p4027925.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 harpreet2301 at yahoo.com Wed Jan 29 19:33:19 2014 From: harpreet2301 at yahoo.com (Harpreet Singh) Date: Wed, 29 Jan 2014 16:33:19 -0800 (PST) Subject: [rules-users] Inconsistency in Drools' Performance (Version 5.5.0) Message-ID: <1391041999.44623.YahooMailNeo@web121206.mail.ne1.yahoo.com> Hi, I have been trying to measure Drools' ?5.5.0 performance for quite some time. I see that Drools' perform inconsistently in terms of CPU time. Please see the below code (modification of DroolsTest example): /*Code start*/ public class DroolsTest { ? ? public static final void main(String[] args) { ? ? ? ? try { ? ? ? ? ? ? // load up the knowledge base ? ? ? ? ? ? KnowledgeBase kbase = readKnowledgeBase(); ? ? ? ? ? ? // go ! ? ? ? ? ? ? for (int i = 0; i < 20; i++) { ? ? ? ? ? ? Message message = new Message(); ? ? ? ? ? ? message.setMessage("Hello World"); ? ? ? ? ? ? message.setStatus(Message.HELLO); ? ? ? ? ? ? long startTime = System.nanoTime(); ? ? ? ? ? ? StatefulKnowledgeSession ksession = kbase.newStatefulKnowledgeSession(); ? ? ? ? ? ? FactHandle handle = ksession.insert(message); ? ? ? ? ? ? ksession.fireAllRules(); ? ? ? ? ? ? ksession.retract(handle); ? ? ? ? ? ? System.out.println("Time taken is: " + (System.nanoTime()-startTime)/1000); ? ? ? ? ? ? ksession.dispose(); ? ? ? ? ? ? } ? ? ? ? } catch (Throwable t) { ? ? ? ? ? ? t.printStackTrace(); ? ? ? ? } ? ? } ? ? private static KnowledgeBase readKnowledgeBase() throws Exception { ? ? ? ? KnowledgeBuilder kbuilder = KnowledgeBuilderFactory.newKnowledgeBuilder(); ? ? ? ? kbuilder.add(ResourceFactory.newClassPathResource("Sample.drl"), ResourceType.DRL); ? ? ? ? KnowledgeBuilderErrors errors = kbuilder.getErrors(); ? ? ? ? if (errors.size() > 0) { ? ? ? ? ? ? for (KnowledgeBuilderError error: errors) { ? ? ? ? ? ? ? ? System.err.println(error); ? ? ? ? ? ? } ? ? ? ? ? ? throw new IllegalArgumentException("Could not parse knowledge."); ? ? ? ? } ? ? ? ? KnowledgeBase kbase = KnowledgeBaseFactory.newKnowledgeBase(); ? ? ? ? kbase.addKnowledgePackages(kbuilder.getKnowledgePackages()); ? ? ? ? return kbase; ? ? } ? ? public static class Message { ? ? ? ? public static final int HELLO = 0; ? ? ? ? public static final int GOODBYE = 1; ? ? ? ? private String message; ? ? ? ? private int status; ? ? ? ? public String getMessage() { ? ? ? ? ? ? return this.message; ? ? ? ? } ? ? ? ? public void setMessage(String message) { ? ? ? ? ? ? this.message = message; ? ? ? ? } ? ? ? ? public int getStatus() { ? ? ? ? ? ? return this.status; ? ? ? ? } ? ? ? ? public void setStatus(int status) { ? ? ? ? ? ? this.status = status; ? ? ? ? } ? ? } } /** Code end**/ I have just added timing code to the DroolsTest.java program (provided by JBoss) and I am using Sample.drl file (provided by JBoss). The rules get executed correctly but the timings that I see are: Iteration 1:?103753 (we can ignore this as the classes get loaded during the first iteration) Iteration 2: 861 Iteration 3: 744 Iteration 4: 1350 Iteration 5: 718 Iteration 6: 651 Iteration 7: 661 Iteration 8: 668 Iteration 9: 648 Iteration 10: 3564 Iteration 11: 911 Iteration 12: 689 Iteration 13: 682 Iteration 14: 796 Iteration 15: 4236 Iteration 16: 774 Iteration 17: 772 Iteration 18: 722 Iteration 19: 713 Iteration 20: ?697 I profiled it with Yourkit Profiler and the increase in time does not correspond to garbage collection. I also timed individual calls and found out that: - ksession.insert: takes consistent time - ksession.fireAllRules: inconsistent - kbase.newStatefulKnowledgeSession: inconsistent I see same inconsistency in performance when I integrate Drools with original project (which I can't share here). I also found that this has nothing to do with compiler optimizations. Why is there inconsistent performance??Is there anything that I am missing? Thank you. -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.jboss.org/pipermail/rules-users/attachments/20140129/1a1d27ca/attachment.html From mproctor at codehaus.org Wed Jan 29 19:54:27 2014 From: mproctor at codehaus.org (Mark Proctor) Date: Thu, 30 Jan 2014 00:54:27 +0000 Subject: [rules-users] Inconsistency in Drools' Performance (Version 5.5.0) In-Reply-To: <1391041999.44623.YahooMailNeo@web121206.mail.ne1.yahoo.com> References: <1391041999.44623.YahooMailNeo@web121206.mail.ne1.yahoo.com> Message-ID: <3460A6AF-623E-4140-9B40-6388087FB89E@codehaus.org> 1) Any benchmark for the first minute or so, is pointless. The JVM will not have time to optimise its JIT. 2) About every 30s or so, there will be a slowdown as GC kicks in. You can alleviate (but not remove) this a little with the correct xmx, xms settings, and choosing the correct garbage collector. What those should be, depends on your usage of Drools, you will need to read up, and try different combinations. Certainly make sure you have -server set. http://www.oracle.com/technetwork/java/javase/tech/vmoptions-jsp-140102.html http://www.javaworld.com/article/2078645/java-se/jvm-performance-optimization--part-3--garbage-collection.html http://www.javaworld.com/article/2078661/java-concurrency/jvm-performance-optimization--part-4--c4-garbage-collection-for-low-latency-java-ap.html Beyond that, welcome to the Java platform :) Mark On 30 Jan 2014, at 00:33, Harpreet Singh wrote: > Hi, > > I have been trying to measure Drools' 5.5.0 performance for quite some time. I see that Drools' perform inconsistently in terms of CPU time. > > Please see the below code (modification of DroolsTest example): > > /*Code start*/ > > public class DroolsTest { > > public static final void main(String[] args) { > try { > // load up the knowledge base > KnowledgeBase kbase = readKnowledgeBase(); > // go ! > for (int i = 0; i < 20; i++) { > Message message = new Message(); > message.setMessage("Hello World"); > message.setStatus(Message.HELLO); > long startTime = System.nanoTime(); > StatefulKnowledgeSession ksession = kbase.newStatefulKnowledgeSession(); > FactHandle handle = ksession.insert(message); > ksession.fireAllRules(); > ksession.retract(handle); > System.out.println("Time taken is: " + (System.nanoTime()-startTime)/1000); > ksession.dispose(); > } > } catch (Throwable t) { > t.printStackTrace(); > } > } > > private static KnowledgeBase readKnowledgeBase() throws Exception { > KnowledgeBuilder kbuilder = KnowledgeBuilderFactory.newKnowledgeBuilder(); > kbuilder.add(ResourceFactory.newClassPathResource("Sample.drl"), ResourceType.DRL); > KnowledgeBuilderErrors errors = kbuilder.getErrors(); > if (errors.size() > 0) { > for (KnowledgeBuilderError error: errors) { > System.err.println(error); > } > throw new IllegalArgumentException("Could not parse knowledge."); > } > KnowledgeBase kbase = KnowledgeBaseFactory.newKnowledgeBase(); > kbase.addKnowledgePackages(kbuilder.getKnowledgePackages()); > return kbase; > } > > public static class Message { > > public static final int HELLO = 0; > public static final int GOODBYE = 1; > > private String message; > > private int status; > > public String getMessage() { > return this.message; > } > > public void setMessage(String message) { > this.message = message; > } > > public int getStatus() { > return this.status; > } > > public void setStatus(int status) { > this.status = status; > } > > } > } > /** Code end**/ > > I have just added timing code to the DroolsTest.java program (provided by JBoss) and I am using Sample.drl file (provided by JBoss). The rules get executed correctly but the timings that I see are: > > Iteration 1: 103753 (we can ignore this as the classes get loaded during the first iteration) > Iteration 2: 861 > Iteration 3: 744 > Iteration 4: 1350 > Iteration 5: 718 > Iteration 6: 651 > Iteration 7: 661 > Iteration 8: 668 > Iteration 9: 648 > Iteration 10: 3564 > Iteration 11: 911 > Iteration 12: 689 > Iteration 13: 682 > Iteration 14: 796 > Iteration 15: 4236 > Iteration 16: 774 > Iteration 17: 772 > Iteration 18: 722 > Iteration 19: 713 > Iteration 20: 697 > > I profiled it with Yourkit Profiler and the increase in time does not correspond to garbage collection. I also timed individual calls and found out that: > - ksession.insert: takes consistent time > - ksession.fireAllRules: inconsistent > - kbase.newStatefulKnowledgeSession: inconsistent > > I see same inconsistency in performance when I integrate Drools with original project (which I can't share here). I also found that this has nothing to do with compiler optimizations. > > Why is there inconsistent performance? Is there anything that I am missing? > > Thank you. > > > > _______________________________________________ > 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/20140130/f227797a/attachment-0001.html From dsotty at gmail.com Wed Jan 29 20:27:20 2014 From: dsotty at gmail.com (Davide Sottara) Date: Thu, 30 Jan 2014 02:27:20 +0100 Subject: [rules-users] Incorrect resolution of global symbols in LHS rule constraint (Java dialect) In-Reply-To: <1391028811297-4027921.post@n3.nabble.com> References: <1391028811297-4027921.post@n3.nabble.com> Message-ID: <52E9AA78.7000101@gmail.com> The bug affects Drools 6.x too, it's probably due to some change in MVEL and the way it analyzes constraints. Notably, it works if you write some.classpath.package2.MyType ( global_instance.invoke(this) ) since constraints are expected to evaluate to true anyway. Can you please open a JIRA ticket anyway? Thanks Davide On 01/29/2014 09:53 PM, mikerod wrote: > I upgraded from 5.5.0.Final of Drools (rule engine) to 5.6.0.Final and I am > now seeing errors with globals. > > We have rule constraints that access globals in a DRL; like this: > some.classpath.package2.MyType ( global_instance.invoke(this) == true ) > > I have `some.classpath.package.SomeType global_instance;` declared at the > top of the DRL, but it doesn't seem to be interpeting it as a global in the > rule's restriction. > > So, putting this into context within, I have a DRL such as: > > package my.package.example; > > global some.classpath.package.SomeType global_instance; > **** > > rule "Example rule" > when > some.classpath.package2.MyType ( global_instance.invoke(this) == true ) > then > // do something > end > > **** > > I am getting an error from the package builder originating from the "Example > rule" specifying something like: > "can't find method MyType.global_instance()" > > Once, again this did work in 5.5.0.Final, but in 5.6.0.Final I am getting a > failure trying to build the knowledge package. > It looks to me like the `global_instance` symbol is not being recognized as > a global in the DRL and is trying to be > resolved as a method of the MyType class. > So I guess it would be trying to do a > "MyType.global_instance().invoke(this)" or something. > > The intent is that `global_instance` will be set for a session with an > immutable function-type of class > (invoke is an instance method though; not static). The rule restriction > uses this function/predicate to determine if some > complex criteria is true for `this` MyType instance. > > I would appreciate any insight into what the issue might be. I haven't been > able to find any threads out there on a similar issue. > > > > > -- > View this message in context: http://drools.46999.n3.nabble.com/Incorrect-resolution-of-global-symbols-in-LHS-rule-constraint-Java-dialect-tp4027921.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 clickthex at yahoo.com Thu Jan 30 09:19:10 2014 From: clickthex at yahoo.com (SrjTx) Date: Thu, 30 Jan 2014 06:19:10 -0800 (PST) Subject: [rules-users] DSL: Unable to Expand Error - Even things that shouldn't be expanded. In-Reply-To: References: <1390007054997-4027749.post@n3.nabble.com> <1390233561598-4027772.post@n3.nabble.com> <1390233714550-4027773.post@n3.nabble.com> <1390252717046-4027783.post@n3.nabble.com> <1391027632756-4027919.post@n3.nabble.com> Message-ID: <1391091550794-4027930.post@n3.nabble.com> Yeah, I know the most of the time thing stinks. I'm just not sure what to check next at this point. Here's the history I have. RDSLR worked initial on my machine and then stopped. It worked on a clean install and then stopped. Now I've tried 2 more clean installs and it has never worked. I guess I can check grepcode and see if I can figure out what might be the root cause. -- View this message in context: http://drools.46999.n3.nabble.com/DSL-Unable-to-Expand-Error-Even-things-that-shouldn-t-be-expanded-tp4027749p4027930.html Sent from the Drools: User forum mailing list archive at Nabble.com. From clickthex at yahoo.com Thu Jan 30 09:48:41 2014 From: clickthex at yahoo.com (SrjTx) Date: Thu, 30 Jan 2014 06:48:41 -0800 (PST) Subject: [rules-users] Project Explorer has dissappeared in KIE Workbench In-Reply-To: References: <1390223441353-4027767.post@n3.nabble.com> <1390226037.22118.44.camel@localhost.localdomain> Message-ID: <1391093321493-4027931.post@n3.nabble.com> I've been using kiewb for at least a month now and just yesterday the project explorer disappeared. Note that I have been using chrome the whole time and occasionally, I would get a warning about "gecko", but everything seemed to work. I tried with firefox and the Project Explorer is still MIA. I did verify another issue with Firefox that I thought might be chrome specific. The paging does not work on the artifact repository. You can only ever see 11 items. This is true both in the upload area and when selecting for project dependencies. Note the artifacts do get uploaded and you can add them manually with the [Add] button instead of with the [Add From Repo] button. -- View this message in context: http://drools.46999.n3.nabble.com/Project-Explorer-has-dissappeared-in-KIE-Workbench-tp4027767p4027931.html Sent from the Drools: User forum mailing list archive at Nabble.com. From clickthex at yahoo.com Thu Jan 30 10:02:37 2014 From: clickthex at yahoo.com (SrjTx) Date: Thu, 30 Jan 2014 07:02:37 -0800 (PST) Subject: [rules-users] Project Explorer has dissappeared in KIE Workbench In-Reply-To: <1391093321493-4027931.post@n3.nabble.com> References: <1390223441353-4027767.post@n3.nabble.com> <1390226037.22118.44.camel@localhost.localdomain> <1391093321493-4027931.post@n3.nabble.com> Message-ID: <1391094157678-4027932.post@n3.nabble.com> Forgot to mention. I did reinstall kiewb and it was still missing. I have not tried replacing jboss. -- View this message in context: http://drools.46999.n3.nabble.com/Project-Explorer-has-dissappeared-in-KIE-Workbench-tp4027767p4027932.html Sent from the Drools: User forum mailing list archive at Nabble.com. From michael.anstis at gmail.com Thu Jan 30 10:27:58 2014 From: michael.anstis at gmail.com (Michael Anstis) Date: Thu, 30 Jan 2014 15:27:58 +0000 Subject: [rules-users] Project Explorer has dissappeared in KIE Workbench In-Reply-To: <1391093321493-4027931.post@n3.nabble.com> References: <1390223441353-4027767.post@n3.nabble.com> <1390226037.22118.44.camel@localhost.localdomain> <1391093321493-4027931.post@n3.nabble.com> Message-ID: Gecko errors mean the WAR has only been compiled for Firefox... I don't know if we are planning a re-release to fix or whether you'll need to wait for the next release. I am working on the paging problem at the moment and will push a fix to source soon. Sent on the move On 30 Jan 2014 14:49, "SrjTx" wrote: > I've been using kiewb for at least a month now and just yesterday the > project > explorer disappeared. > Note that I have been using chrome the whole time and occasionally, I would > get a warning about "gecko", but everything seemed to work. > > I tried with firefox and the Project Explorer is still MIA. > > I did verify another issue with Firefox that I thought might be chrome > specific. The paging does not work on the artifact repository. You can > only ever see 11 items. This is true both in the upload area and when > selecting for project dependencies. > Note the artifacts do get uploaded and you can add them manually with the > [Add] button instead of with the [Add From Repo] button. > > > > -- > View this message in context: > http://drools.46999.n3.nabble.com/Project-Explorer-has-dissappeared-in-KIE-Workbench-tp4027767p4027931.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/20140130/54c05d92/attachment.html From wolfgang.laun at gmail.com Thu Jan 30 11:01:06 2014 From: wolfgang.laun at gmail.com (Wolfgang Laun) Date: Thu, 30 Jan 2014 17:01:06 +0100 Subject: [rules-users] DSL: Unable to Expand Error - Even things that shouldn't be expanded. In-Reply-To: <1391091550794-4027930.post@n3.nabble.com> References: <1390007054997-4027749.post@n3.nabble.com> <1390233561598-4027772.post@n3.nabble.com> <1390233714550-4027773.post@n3.nabble.com> <1390252717046-4027783.post@n3.nabble.com> <1391027632756-4027919.post@n3.nabble.com> <1391091550794-4027930.post@n3.nabble.com> Message-ID: I've re-read the exmples, which are all plain DRL. The subject and the error messages have "DSL" in it. Is there plain DRL text on a file that the Builder thinks is DSL (.dsl)? -W On 30/01/2014, SrjTx wrote: > Yeah, I know the most of the time thing stinks. > > I'm just not sure what to check next at this point. > > Here's the history I have. > > RDSLR worked initial on my machine and then stopped. > It worked on a clean install and then stopped. > Now I've tried 2 more clean installs and it has never worked. > > I guess I can check grepcode and see if I can figure out what might be the > root cause. > > > > -- > View this message in context: > http://drools.46999.n3.nabble.com/DSL-Unable-to-Expand-Error-Even-things-that-shouldn-t-be-expanded-tp4027749p4027930.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 michael.anstis at gmail.com Thu Jan 30 11:10:10 2014 From: michael.anstis at gmail.com (Michael Anstis) Date: Thu, 30 Jan 2014 16:10:10 +0000 Subject: [rules-users] Project Explorer has dissappeared in KIE Workbench In-Reply-To: References: <1390223441353-4027767.post@n3.nabble.com> <1390226037.22118.44.camel@localhost.localdomain> <1391093321493-4027931.post@n3.nabble.com> Message-ID: Fix for Artifact Repository paging pushed . On 30 January 2014 15:27, Michael Anstis wrote: > Gecko errors mean the WAR has only been compiled for Firefox... I don't > know if we are planning a re-release to fix or whether you'll need to wait > for the next release. > > I am working on the paging problem at the moment and will push a fix to > source soon. > > Sent on the move > On 30 Jan 2014 14:49, "SrjTx" wrote: > >> I've been using kiewb for at least a month now and just yesterday the >> project >> explorer disappeared. >> Note that I have been using chrome the whole time and occasionally, I >> would >> get a warning about "gecko", but everything seemed to work. >> >> I tried with firefox and the Project Explorer is still MIA. >> >> I did verify another issue with Firefox that I thought might be chrome >> specific. The paging does not work on the artifact repository. You can >> only ever see 11 items. This is true both in the upload area and when >> selecting for project dependencies. >> Note the artifacts do get uploaded and you can add them manually with the >> [Add] button instead of with the [Add From Repo] button. >> >> >> >> -- >> View this message in context: >> http://drools.46999.n3.nabble.com/Project-Explorer-has-dissappeared-in-KIE-Workbench-tp4027767p4027931.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/20140130/d19e78cf/attachment.html From husby024 at umn.edu Thu Jan 30 11:24:56 2014 From: husby024 at umn.edu (jhusby) Date: Thu, 30 Jan 2014 08:24:56 -0800 (PST) Subject: [rules-users] kContainer.newKieSession() fails in Apache Karaf In-Reply-To: References: <1390437322185-4027815.post@n3.nabble.com> <1390492706283-4027832.post@n3.nabble.com> <1390496500775-4027838.post@n3.nabble.com> Message-ID: <1391099096147-4027934.post@n3.nabble.com> Mario, Do you know whether the new method Charles added: ks.newKieClasspathContainer(getClass().getClassLoader()); will get merged into the 6.0.x release? I cannot seem to make incremental rule building work in OSGi without it. For instance, even when I run (in Apache Karaf) the example project Charles made (referenced below), when I call: ks.newKieContainer(APP_REL_ID).getKieBase(); it fails with: java.lang.IllegalArgumentException: conflict Resolver 'org.drools.core.conflict.DepthConflictResolver' not found probably because I'm not initializing the KieClasspathContainer with the classloader from my class. Thanks! Joseph Charles Moulliard-2 wrote > My example uses this META-INF/kmodules.xml file to let the KieContainer > to scan and discover the resources (.drl, pacjkages) when we call > > KieContainer kcont = > ks.newKieClasspathContainer(getClass().getClassLoader()); > KieBase kbase = kcont.getKieBase("sampleKBase"); > > As you have mentioned in your email, this is a static approach as we > load the resources before to create a KieSession and fire the rules. > To be able to do increment, the approach that you mention is the way > to go. I have also created an example where the KieModule is created > using a programming approach --> > *https://github.com/cmoulliard/droolsjbpm-osgi-examples/blob/master/simple-external-resource/src/main/java/org/drools/example/osgi/FetchExternalResourceOsgiActivator.java > <https://github.com/cmoulliard/droolsjbpm-osgi-examples/blob/master/simple-external-resource/src/main/java/org/drools/example/osgi/FetchExternalResourceOsgiActivator.java>. > That should not be difficult to adapt it to support increment* > > 3. It looks like I'll have to wait until Drools 6.1.0 to get the > parameter > to specify a classloader when creating the container? I see you just > added > that recently. I've tried using > Thread.currentThread().setContextClassLoader(...) but can't seem to make > that work with Drools 6.0.1 in Karaf 2.3.3 because then > RuleBaseConfiguration sets the classloader and uses it to try resolving > org.drools.core.conflict.DepthConflictResolver, which it can't do because > it's no longer using the OSGi classloader. > > I have no ideas if my modifications will be merged with 6.0.x release. > Mario Fusco should be able to provide a response -- View this message in context: http://drools.46999.n3.nabble.com/kContainer-newKieSession-fails-in-Apache-Karaf-tp4027815p4027934.html Sent from the Drools: User forum mailing list archive at Nabble.com. From michael.anstis at gmail.com Thu Jan 30 11:38:34 2014 From: michael.anstis at gmail.com (Michael Anstis) Date: Thu, 30 Jan 2014 16:38:34 +0000 Subject: [rules-users] DSL: Unable to Expand Error - Even things that shouldn't be expanded. In-Reply-To: References: <1390007054997-4027749.post@n3.nabble.com> <1390233561598-4027772.post@n3.nabble.com> <1390233714550-4027773.post@n3.nabble.com> <1390252717046-4027783.post@n3.nabble.com> <1391027632756-4027919.post@n3.nabble.com> <1391091550794-4027930.post@n3.nabble.com> Message-ID: Using latest master I did the following steps (in mortgages example repository) 1) Add new Guided Rule 2) Tick "Use DSL" 3) Click OK 4) Add a DSL sentence 5) Validated rule - OK 6) Viewed Source - OK 7) Saved - OK 8) Re-opened - OK In conclusion I cannot replicate. Please provide the exact steps and rule etc you used to reproduce the problem. With kind regards, Mike On 30 January 2014 16:01, Wolfgang Laun wrote: > I've re-read the exmples, which are all plain DRL. The subject and the > error messages have "DSL" in it. Is there plain DRL text on a file > that the Builder thinks is DSL (.dsl)? > > -W > > On 30/01/2014, SrjTx wrote: > > Yeah, I know the most of the time thing stinks. > > > > I'm just not sure what to check next at this point. > > > > Here's the history I have. > > > > RDSLR worked initial on my machine and then stopped. > > It worked on a clean install and then stopped. > > Now I've tried 2 more clean installs and it has never worked. > > > > I guess I can check grepcode and see if I can figure out what might be > the > > root cause. > > > > > > > > -- > > View this message in context: > > > http://drools.46999.n3.nabble.com/DSL-Unable-to-Expand-Error-Even-things-that-shouldn-t-be-expanded-tp4027749p4027930.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/20140130/cbd76903/attachment.html From matteo.mortari at gmail.com Thu Jan 30 14:49:43 2014 From: matteo.mortari at gmail.com (Matteo Mortari) Date: Thu, 30 Jan 2014 20:49:43 +0100 Subject: [rules-users] "Cannot find KieModule" with kieServices.newKieContainer() with LATEST or RELEASE instead of explicit version number (eg: 0.0.1) Message-ID: Hello, in the hope this could save time if someone has been experiencing same issue. Drools 6.0.1.Final I had message "Cannot find KieModule" with kieServices.newKieContainer() with LATEST or RELEASE , instead of explicit version number (eg: 0.0.1) on a application where the KIE module Rule artifact project kjar has been locally-installed from remote Maven repository, that is the right hand side of this diagram: http://docs.jboss.org/drools/release/6.0.1.Final/drools-docs/html_single/#d0e933 Meaning that before launching Application, I performed mvn org.apache.maven.plugins:maven-dependency-plugin:2.8:get -Dartifact=com.acme:X:LATEST -DrepoUrl= http://nexus-hostname/nexus/content/repositories/releases/ Then: kieServices.newKieContainer() with LATEST, kieServices.newKieContainer() with RELEASE, failed with stack trace: Exception in thread "main" java.lang.RuntimeException: Cannot find KieModule: com.acme:X:RELEASE at org.drools.compiler.kie.builder.impl.KieServicesImpl.newKieContainer(KieServicesImpl.java:86) at (...) But kieServices.newKieContainer() with a fixed version, eg.: 0.0.2 did indeed worked OK, if installed in the local .m2 repository. To avoid this issue, I found only 3 possible workarounds 1 use mvn maven-dependency-plugin:go-offline but did not work all of the time 2 manually ensure maven-metadata-local.xml file is generate in local .m2 repository 3 just download manually .jar and .pom of the remote maven repo, and then install with mvn install:install-file In this case, of workaround kieServices.newKieContainer() works OK with all the version LATEST, RELEASE, and fixed version number. Raise jira DROOLS-419 with more details and example projects, please don't hate me if was just me missing something or not-Drools issue actually =P In my defense I had good intentions saving somebody's else time in case same strange behavior, which is really strange because to me it worked only with explicit fixed version number, and that was really bizarre ;) Hope this helps, Ciao MM -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.jboss.org/pipermail/rules-users/attachments/20140130/f50450c1/attachment.html From mjr4184 at gmail.com Thu Jan 30 16:03:21 2014 From: mjr4184 at gmail.com (mikerod) Date: Thu, 30 Jan 2014 13:03:21 -0800 (PST) Subject: [rules-users] Incorrect resolution of global symbols in LHS rule constraint (Java dialect) In-Reply-To: <52E9AA78.7000101@gmail.com> References: <1391028811297-4027921.post@n3.nabble.com> <52E9AA78.7000101@gmail.com> Message-ID: <1391115801450-4027935.post@n3.nabble.com> Thank you for your reply. That was helpful. I did notice that the workaround you proposed of only calling the `some.classpath.package2.MyType ( global_instance.invoke(this) )` was still not analyzing the constraint correctly. I think this was because #invoke() was returning an java.lang.Object type (which would be a java.lang.Boolean at runtime). This led us to the discovery that if we just flipped the order of the constraint expression to: `some.classpath.package2.MyType ( true == global_instance.invoke(this) )` it works fine. It looks like with beginning the expression with `true ==` instead of having it `== true` after the method call, was able to be analyzed correctly. I posted a Jira for this @ https://issues.jboss.org/browse/DROOLS-420 . I haven't logged a Drools Jira before, so hopefully it is filled out as expected/desired. -- View this message in context: http://drools.46999.n3.nabble.com/Incorrect-resolution-of-global-symbols-in-LHS-rule-constraint-Java-dialect-tp4027921p4027935.html Sent from the Drools: User forum mailing list archive at Nabble.com. From dsotty at gmail.com Thu Jan 30 16:09:17 2014 From: dsotty at gmail.com (Davide Sottara) Date: Thu, 30 Jan 2014 22:09:17 +0100 Subject: [rules-users] Incorrect resolution of global symbols in LHS rule constraint (Java dialect) In-Reply-To: <1391115801450-4027935.post@n3.nabble.com> References: <1391028811297-4027921.post@n3.nabble.com> <52E9AA78.7000101@gmail.com> <1391115801450-4027935.post@n3.nabble.com> Message-ID: <52EABF7D.1000404@gmail.com> Thanks, today we have actually identified the real cause of the error and we are already working to get it fixed. I wonder if a cast would also work : MyType( (Boolean) global_invoke( this ) ) Davide On 01/30/2014 10:03 PM, mikerod wrote: > Thank you for your reply. That was helpful. I did notice that the > workaround you proposed of > only calling the `some.classpath.package2.MyType ( > global_instance.invoke(this) )` was still not analyzing the constraint > correctly. I think this was because #invoke() was returning an > java.lang.Object type (which would be a java.lang.Boolean at runtime). > > This led us to the discovery that if we just flipped the order of the > constraint expression to: > `some.classpath.package2.MyType ( true == global_instance.invoke(this) )` > it works fine. > > It looks like with beginning the expression with `true ==` instead of having > it `== true` after the method call, was able to be > analyzed correctly. > > I posted a Jira for this @ https://issues.jboss.org/browse/DROOLS-420 . I > haven't logged a Drools Jira before, so hopefully > it is filled out as expected/desired. > > > > > -- > View this message in context: http://drools.46999.n3.nabble.com/Incorrect-resolution-of-global-symbols-in-LHS-rule-constraint-Java-dialect-tp4027921p4027935.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 kashili at yahoo.com Thu Jan 30 19:32:14 2014 From: kashili at yahoo.com (kashili) Date: Thu, 30 Jan 2014 16:32:14 -0800 (PST) Subject: [rules-users] Null pointer exception when adding drools to existing project Message-ID: <1391128334586-4027944.post@n3.nabble.com> I am having too many issues integrating drools into my existing code base, bcos I am unfamiliar with drools/jboss/maven. I have large code base and trying to add drools to it. I was able to run helloworld-drools from eclipse, but I cannot make it work when I add drools to existing project(File ->new ->drools->rule resource). I could compile, but I get null pointer exception when I run it (makes me believe that it has to add something to pom.xml or involved with other setup) I described my entire problem below. http://stackoverflow.com/questions/21466716/unknown-kiesession-name-in-drools-6-0-while-trying-to-add-drools-to-existing-ma One of the threads in this forum speaks about wiki; I appreciate pointing me to any specifics in resolving this. -- View this message in context: http://drools.46999.n3.nabble.com/Null-pointer-exception-when-adding-drools-to-existing-project-tp4027944.html Sent from the Drools: User forum mailing list archive at Nabble.com. From mproctor at codehaus.org Thu Jan 30 19:44:26 2014 From: mproctor at codehaus.org (Mark Proctor) Date: Fri, 31 Jan 2014 00:44:26 +0000 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: <42D5AAEB-C3E9-47B9-9AA7-C14668B0AE8B@codehaus.org> Can you create a unit test that reproduces your issue. Something that follows this: https://github.com/droolsjbpm/drools/blob/master/kie-ci/src/test/java/org/kie/scanner/KieRepositoryScannerTest.java http://docs.jboss.org/drools/release/5.6.0.Final/droolsjbpm-introduction-docs/html/gettingstarted.html Mark On 30 Jan 2014, at 19:49, Matteo Mortari wrote: > Hello, > in the hope this could save time if someone has been experiencing same issue. Drools 6.0.1.Final > > I had message "Cannot find KieModule" with kieServices.newKieContainer() with LATEST or RELEASE , instead of explicit version number (eg: 0.0.1) on a application where the KIE module Rule artifact project kjar has been locally-installed from remote Maven repository, that is the right hand side of this diagram: http://docs.jboss.org/drools/release/6.0.1.Final/drools-docs/html_single/#d0e933 > > Meaning that before launching Application, I performed > mvn org.apache.maven.plugins:maven-dependency-plugin:2.8:get -Dartifact=com.acme:X:LATEST -DrepoUrl=http://nexus-hostname/nexus/content/repositories/releases/ > > Then: > kieServices.newKieContainer() with LATEST, > kieServices.newKieContainer() with RELEASE, > > failed with stack trace: > Exception in thread "main" java.lang.RuntimeException: Cannot find KieModule: com.acme:X:RELEASE > at org.drools.compiler.kie.builder.impl.KieServicesImpl.newKieContainer(KieServicesImpl.java:86) > at (...) > > But kieServices.newKieContainer() with a fixed version, eg.: 0.0.2 did indeed worked OK, if installed in the local .m2 repository. > > To avoid this issue, I found only 3 possible workarounds > 1 use mvn maven-dependency-plugin:go-offline but did not work all of the time > 2 manually ensure maven-metadata-local.xml file is generate in local .m2 repository > 3 just download manually .jar and .pom of the remote maven repo, and then install with mvn install:install-file > > In this case, of workaround kieServices.newKieContainer() works OK with all the version LATEST, RELEASE, and fixed version number. > > Raise jira DROOLS-419 with more details and example projects, please don't hate me if was just me missing something or not-Drools issue actually > =P > In my defense I had good intentions saving somebody's else time in case same strange behavior, which is really strange because to me it worked only with explicit fixed version number, and that was really bizarre ;) > > Hope this helps, > Ciao > MM > _______________________________________________ > 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/20140131/1782e66c/attachment-0001.html From mproctor at codehaus.org Thu Jan 30 19:47:33 2014 From: mproctor at codehaus.org (Mark Proctor) Date: Fri, 31 Jan 2014 00:47:33 +0000 Subject: [rules-users] Null pointer exception when adding drools to existing project In-Reply-To: <1391128334586-4027944.post@n3.nabble.com> References: <1391128334586-4027944.post@n3.nabble.com> Message-ID: <999C86F3-9C17-4DF4-9C8E-7D1F7E59FA43@codehaus.org> We have a number of examples, all documented. that get you started. Each can be run from the command line with maven, and have unit test to show them running. https://github.com/droolsjbpm/drools/tree/master/drools-examples-api Docs here: http://docs.jboss.org/drools/release/6.0.1.Final/drools-docs/html/KIEChapter.html#KIEExamplesSection Mark On 31 Jan 2014, at 00:32, kashili wrote: > I am having too many issues integrating drools into my existing code base, > bcos I am unfamiliar with drools/jboss/maven. > > I have large code base and trying to add drools to it. I was able to run > helloworld-drools from eclipse, but I cannot make it work when I add drools > to existing project(File ->new ->drools->rule resource). I could compile, > but I get null pointer exception when I run it (makes me believe that it has > to add something to pom.xml or involved with other setup) > I described my entire problem below. > > http://stackoverflow.com/questions/21466716/unknown-kiesession-name-in-drools-6-0-while-trying-to-add-drools-to-existing-ma > > > One of the threads in this forum speaks about wiki; I appreciate pointing me > to any specifics in resolving this. > > > > -- > View this message in context: http://drools.46999.n3.nabble.com/Null-pointer-exception-when-adding-drools-to-existing-project-tp4027944.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 kashili at yahoo.com Thu Jan 30 21:11:13 2014 From: kashili at yahoo.com (kashili) Date: Thu, 30 Jan 2014 18:11:13 -0800 (PST) Subject: [rules-users] Null pointer exception when adding drools to existing project In-Reply-To: <999C86F3-9C17-4DF4-9C8E-7D1F7E59FA43@codehaus.org> References: <1391128334586-4027944.post@n3.nabble.com> <999C86F3-9C17-4DF4-9C8E-7D1F7E59FA43@codehaus.org> Message-ID: <1391134273127-4027947.post@n3.nabble.com> I infact looked at the docs and examples and could not reach to conclusion (because they are aimed at getting started and api details). None of them show how to convert an existing project into drools (there were bits and pieces there, which I believe I covered in my question). I did look at my project under properties->java build path ->libraries and I see drools library with almost 20 files there; so I am thinking the problem is not classpath related (may be related to directory structure or kmodule.xml is not linking the class files with rules file correctly). I am newbie to drools.. -- View this message in context: http://drools.46999.n3.nabble.com/Null-pointer-exception-when-adding-drools-to-existing-project-tp4027944p4027947.html Sent from the Drools: User forum mailing list archive at Nabble.com. From mproctor at codehaus.org Thu Jan 30 21:56:30 2014 From: mproctor at codehaus.org (Mark Proctor) Date: Fri, 31 Jan 2014 02:56:30 +0000 Subject: [rules-users] Null pointer exception when adding drools to existing project In-Reply-To: <1391134273127-4027947.post@n3.nabble.com> References: <1391128334586-4027944.post@n3.nabble.com> <999C86F3-9C17-4DF4-9C8E-7D1F7E59FA43@codehaus.org> <1391134273127-4027947.post@n3.nabble.com> Message-ID: There is no ksession called ?ksession-rules?, or it can?t find one. Which means your kmodule.xml is incorrectly defined, or cannot be found. Take the simplest project, copy it. And use that as a starting point, changing the drl files to have the rule content you want and adding your domain classes. Either this one: https://github.com/droolsjbpm/drools/tree/master/drools-examples-api/default-kiesession Or this one: https://github.com/droolsjbpm/drools/tree/master/drools-examples-api/named-kiesession Mark On 31 Jan 2014, at 02:11, kashili wrote: > I infact looked at the docs and examples and could not reach to conclusion > (because they are aimed at getting started and api details). None of them > show how to convert an existing project into drools (there were bits and > pieces there, which I believe I covered in my question). I did look at my > project under properties->java build path ->libraries and I see drools > library with almost 20 files there; so I am thinking the problem is not > classpath related (may be related to directory structure or kmodule.xml is > not linking the class files with rules file correctly). I am newbie to > drools.. > > > > -- > View this message in context: http://drools.46999.n3.nabble.com/Null-pointer-exception-when-adding-drools-to-existing-project-tp4027944p4027947.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 vinodkiran at usa.net Fri Jan 31 00:57:33 2014 From: vinodkiran at usa.net (vinodkiran) Date: Thu, 30 Jan 2014 21:57:33 -0800 (PST) Subject: [rules-users] NullPointerException with kie-spring 6.0.1 and Spring 4.0 In-Reply-To: References: <1390751441563-4027858.post@n3.nabble.com> <1390758426693-4027859.post@n3.nabble.com> <1390871798675-4027877.post@n3.nabble.com> Message-ID: <1391147853432-4027949.post@n3.nabble.com> Andrew, The fix has been merged to the master. Can you try the latest snapshot build and check if your issue is fixed? --Vinod -- View this message in context: http://drools.46999.n3.nabble.com/rules-users-NullPointerException-with-kie-spring-6-0-1-and-Spring-4-0-tp4027854p4027949.html Sent from the Drools: User forum mailing list archive at Nabble.com. From matteo.mortari at gmail.com Fri Jan 31 05:00:53 2014 From: matteo.mortari at gmail.com (Matteo Mortari) Date: Fri, 31 Jan 2014 11:00:53 +0100 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: <42D5AAEB-C3E9-47B9-9AA7-C14668B0AE8B@codehaus.org> References: <42D5AAEB-C3E9-47B9-9AA7-C14668B0AE8B@codehaus.org> Message-ID: Hello Mark, For reference, I've attached to the original Jira DROOLS-419 zip file with source code and detailed instruction how to replicate issue, and how to replicate workaround as well. That is the simple code I've used to replicate the issue on Windows box and Linux box before submitting the jira bug entry. Concerning your question to provide unit test, I have to admit I'm a bit lost how could this be achieved ? As this is more of an integration aspect than code, if I was to write a JUnit for this, it would require to 1 empty .m2 local repo directory, 2 provide an "embedded nexus" (not sure if actually feasible) and 3 perform maven commands from shell, not by direct use of the API. 4 do the kie api call to trigger the stack trace. So, can I kindly know if zip file and instructions with Jira DROOLS-419 are sufficient, or I shall investigate further if and how to self-contain all of this in a JUnit test, please? Thank you for your feedback MM On Fri, Jan 31, 2014 at 1:44 AM, Mark Proctor wrote: > Can you create a unit test that reproduces your issue. Something that > follows this: > > https://github.com/droolsjbpm/drools/blob/master/kie-ci/src/test/java/org/kie/scanner/KieRepositoryScannerTest.java > > > http://docs.jboss.org/drools/release/5.6.0.Final/droolsjbpm-introduction-docs/html/gettingstarted.html > > Mark > > > On 30 Jan 2014, at 19:49, Matteo Mortari wrote: > > Hello, > in the hope this could save time if someone has been experiencing same > issue. Drools 6.0.1.Final > > I had message "Cannot find KieModule" with kieServices.newKieContainer() > with LATEST or RELEASE , instead of explicit version number (eg: 0.0.1) on > a application where the KIE module Rule artifact project kjar has been > locally-installed from remote Maven repository, that is the right hand side > of this diagram: > http://docs.jboss.org/drools/release/6.0.1.Final/drools-docs/html_single/#d0e933 > > Meaning that before launching Application, I performed > mvn org.apache.maven.plugins:maven-dependency-plugin:2.8:get > -Dartifact=com.acme:X:LATEST -DrepoUrl= > http://nexus-hostname/nexus/content/repositories/releases/ > > Then: > kieServices.newKieContainer() with LATEST, > kieServices.newKieContainer() with RELEASE, > > failed with stack trace: > Exception in thread "main" java.lang.RuntimeException: Cannot find > KieModule: com.acme:X:RELEASE > at > org.drools.compiler.kie.builder.impl.KieServicesImpl.newKieContainer(KieServicesImpl.java:86) > at (...) > > But kieServices.newKieContainer() with a fixed version, eg.: 0.0.2 did > indeed worked OK, if installed in the local .m2 repository. > > To avoid this issue, I found only 3 possible workarounds > 1 use mvn maven-dependency-plugin:go-offline but did not work all of the > time > 2 manually ensure maven-metadata-local.xml file is generate in local .m2 > repository > 3 just download manually .jar and .pom of the remote maven repo, and then > install with mvn install:install-file > > In this case, of workaround kieServices.newKieContainer() works OK with > all the version LATEST, RELEASE, and fixed version number. > > Raise jira DROOLS-419 with more details and example projects, please don't > hate me if was just me missing something or not-Drools issue actually > =P > In my defense I had good intentions saving somebody's else time in case > same strange behavior, which is really strange because to me it worked only > with explicit fixed version number, and that was really bizarre ;) > > Hope this helps, > Ciao > MM > _______________________________________________ > 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/20140131/d276b1b9/attachment.html From mjr4184 at gmail.com Fri Jan 31 09:31:04 2014 From: mjr4184 at gmail.com (mikerod) Date: Fri, 31 Jan 2014 06:31:04 -0800 (PST) Subject: [rules-users] Incorrect resolution of global symbols in LHS rule constraint (Java dialect) In-Reply-To: <52EABF7D.1000404@gmail.com> References: <1391028811297-4027921.post@n3.nabble.com> <52E9AA78.7000101@gmail.com> <1391115801450-4027935.post@n3.nabble.com> <52EABF7D.1000404@gmail.com> Message-ID: <1391178664275-4027953.post@n3.nabble.com> Ah, yes indeed a Boolean cast works for the issue of returning an Object. I'm glad to hear the root cause has already been addressed though. I appreciate the quick feedback on this! -- View this message in context: http://drools.46999.n3.nabble.com/Incorrect-resolution-of-global-symbols-in-LHS-rule-constraint-Java-dialect-tp4027921p4027953.html Sent from the Drools: User forum mailing list archive at Nabble.com. From rabarijaonadomoina at gmail.com Fri Jan 31 09:25:17 2014 From: rabarijaonadomoina at gmail.com (tia) Date: Fri, 31 Jan 2014 06:25:17 -0800 (PST) Subject: [rules-users] Unable to get LastModified for ClasspathResource In-Reply-To: References: <1374134659616-4025031.post@n3.nabble.com> <1389371334582-4027648.post@n3.nabble.com> <1390831165405-4027862.post@n3.nabble.com> Message-ID: <1391178317542-4027952.post@n3.nabble.com> I wanted to use a changeset but apparently, it's not used anymore in the version 6 of Drools. So, I changed my code and did something like this: https://github.com/droolsjbpm/drools/blob/master/drools-examples-api/default-kiesession/src/main/java/org/drools/example/api/defaultkiesession/DefaultKieSessionExample.java -- View this message in context: http://drools.46999.n3.nabble.com/Unable-to-get-LastModified-for-ClasspathResource-tp4025031p4027952.html Sent from the Drools: User forum mailing list archive at Nabble.com. From mproctor at codehaus.org Fri Jan 31 10:37:40 2014 From: mproctor at codehaus.org (Mark Proctor) Date: Fri, 31 Jan 2014 15:37:40 +0000 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: <42D5AAEB-C3E9-47B9-9AA7-C14668B0AE8B@codehaus.org> Message-ID: Just want to check that you have kie-ci on the class path? As this is necessary to resolve meta versions using maven. Otherwise only explicit versions will work, on the local m2 cache only. Mark On 31 Jan 2014, at 10:00, Matteo Mortari wrote: > Hello Mark, > For reference, I've attached to the original Jira DROOLS-419 zip file with source code and detailed instruction how to replicate issue, and how to replicate workaround as well. That is the simple code I've used to replicate the issue on Windows box and Linux box before submitting the jira bug entry. > > Concerning your question to provide unit test, I have to admit I'm a bit lost how could this be achieved ? > As this is more of an integration aspect than code, if I was to write a JUnit for this, it would require to 1 empty .m2 local repo directory, 2 provide an "embedded nexus" (not sure if actually feasible) and 3 perform maven commands from shell, not by direct use of the API. 4 do the kie api call to trigger the stack trace. > > So, can I kindly know if zip file and instructions with Jira DROOLS-419 are sufficient, or I shall investigate further if and how to self-contain all of this in a JUnit test, please? > > Thank you for your feedback > MM > > > On Fri, Jan 31, 2014 at 1:44 AM, Mark Proctor wrote: > Can you create a unit test that reproduces your issue. Something that follows this: > https://github.com/droolsjbpm/drools/blob/master/kie-ci/src/test/java/org/kie/scanner/KieRepositoryScannerTest.java > > http://docs.jboss.org/drools/release/5.6.0.Final/droolsjbpm-introduction-docs/html/gettingstarted.html > > Mark > > > On 30 Jan 2014, at 19:49, Matteo Mortari wrote: > >> Hello, >> in the hope this could save time if someone has been experiencing same issue. Drools 6.0.1.Final >> >> I had message "Cannot find KieModule" with kieServices.newKieContainer() with LATEST or RELEASE , instead of explicit version number (eg: 0.0.1) on a application where the KIE module Rule artifact project kjar has been locally-installed from remote Maven repository, that is the right hand side of this diagram: http://docs.jboss.org/drools/release/6.0.1.Final/drools-docs/html_single/#d0e933 >> >> Meaning that before launching Application, I performed >> mvn org.apache.maven.plugins:maven-dependency-plugin:2.8:get -Dartifact=com.acme:X:LATEST -DrepoUrl=http://nexus-hostname/nexus/content/repositories/releases/ >> >> Then: >> kieServices.newKieContainer() with LATEST, >> kieServices.newKieContainer() with RELEASE, >> >> failed with stack trace: >> Exception in thread "main" java.lang.RuntimeException: Cannot find KieModule: com.acme:X:RELEASE >> at org.drools.compiler.kie.builder.impl.KieServicesImpl.newKieContainer(KieServicesImpl.java:86) >> at (...) >> >> But kieServices.newKieContainer() with a fixed version, eg.: 0.0.2 did indeed worked OK, if installed in the local .m2 repository. >> >> To avoid this issue, I found only 3 possible workarounds >> 1 use mvn maven-dependency-plugin:go-offline but did not work all of the time >> 2 manually ensure maven-metadata-local.xml file is generate in local .m2 repository >> 3 just download manually .jar and .pom of the remote maven repo, and then install with mvn install:install-file >> >> In this case, of workaround kieServices.newKieContainer() works OK with all the version LATEST, RELEASE, and fixed version number. >> >> Raise jira DROOLS-419 with more details and example projects, please don't hate me if was just me missing something or not-Drools issue actually >> =P >> In my defense I had good intentions saving somebody's else time in case same strange behavior, which is really strange because to me it worked only with explicit fixed version number, and that was really bizarre ;) >> >> Hope this helps, >> Ciao >> MM >> _______________________________________________ >> 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/20140131/89e2bacb/attachment-0001.html From mproctor at codehaus.org Fri Jan 31 10:39:49 2014 From: mproctor at codehaus.org (Mark Proctor) Date: Fri, 31 Jan 2014 15:39:49 +0000 Subject: [rules-users] Unable to get LastModified for ClasspathResource In-Reply-To: <1391178317542-4027952.post@n3.nabble.com> References: <1374134659616-4025031.post@n3.nabble.com> <1389371334582-4027648.post@n3.nabble.com> <1390831165405-4027862.post@n3.nabble.com> <1391178317542-4027952.post@n3.nabble.com> Message-ID: <5A5BAFF1-FBDC-4505-8688-EDEFAA298564@codehaus.org> All working for you now? http://docs.jboss.org/drools/release/6.0.1.Final/drools-docs/html/KIEChapter.html#KIEExamplesSection Mark On 31 Jan 2014, at 14:25, tia wrote: > I wanted to use a changeset but apparently, it's not used anymore in the > version 6 of Drools. > So, I changed my code and did something like this: > https://github.com/droolsjbpm/drools/blob/master/drools-examples-api/default-kiesession/src/main/java/org/drools/example/api/defaultkiesession/DefaultKieSessionExample.java > > > > -- > View this message in context: http://drools.46999.n3.nabble.com/Unable-to-get-LastModified-for-ClasspathResource-tp4025031p4027952.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 rabarijaonadomoina at gmail.com Fri Jan 31 10:44:13 2014 From: rabarijaonadomoina at gmail.com (tia) Date: Fri, 31 Jan 2014 07:44:13 -0800 (PST) Subject: [rules-users] Unable to get LastModified for ClasspathResource In-Reply-To: <5A5BAFF1-FBDC-4505-8688-EDEFAA298564@codehaus.org> References: <1374134659616-4025031.post@n3.nabble.com> <1389371334582-4027648.post@n3.nabble.com> <1390831165405-4027862.post@n3.nabble.com> <1391178317542-4027952.post@n3.nabble.com> <5A5BAFF1-FBDC-4505-8688-EDEFAA298564@codehaus.org> Message-ID: Yes :-) 2014-01-31 Mark Proctor [via Drools] < ml-node+s46999n4027955h88 at n3.nabble.com>: > All working for you now? > > http://docs.jboss.org/drools/release/6.0.1.Final/drools-docs/html/KIEChapter.html#KIEExamplesSection > > Mark > On 31 Jan 2014, at 14:25, tia <[hidden email]> > wrote: > > > I wanted to use a changeset but apparently, it's not used anymore in the > > version 6 of Drools. > > So, I changed my code and did something like this: > > > https://github.com/droolsjbpm/drools/blob/master/drools-examples-api/default-kiesession/src/main/java/org/drools/example/api/defaultkiesession/DefaultKieSessionExample.java > > > > > > > > -- > > View this message in context: > http://drools.46999.n3.nabble.com/Unable-to-get-LastModified-for-ClasspathResource-tp4025031p4027952.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/Unable-to-get-LastModified-for-ClasspathResource-tp4025031p4027955.html > To unsubscribe from Unable to get LastModified for ClasspathResource, click > here > . > NAML > -- View this message in context: http://drools.46999.n3.nabble.com/Unable-to-get-LastModified-for-ClasspathResource-tp4025031p4027956.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/20140131/c5070c87/attachment.html From mario.fusco at gmail.com Fri Jan 31 11:47:51 2014 From: mario.fusco at gmail.com (Mario Fusco) Date: Fri, 31 Jan 2014 08:47:51 -0800 (PST) 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: <42D5AAEB-C3E9-47B9-9AA7-C14668B0AE8B@codehaus.org> Message-ID: <1391186871100-4027957.post@n3.nabble.com> Ciao Matteo, I tried the test case attached to DROOLS-419 and it works for me. To be more precise what I tried it is simply installing the kjar you provided on my local maven repo and check that the main class of your second project is able to retrieve the kjar and build the drools project using both LATEST and RELEASE as version. I realize the use case you described is quite more complex, but I believe the additional complexity is all maven related and has nothing to do with Drools. Moreover if you need to use additional (external) maven repositories my suggestion is to try to configure them in your settings.xml file. Also be aware that you can define a location for an alternative settings.xml file (and then define there the additional repositories you need if you want) using the system property kie.maven.settings.custom like in: java -jar -Dkie.maven.settings.custom=/my/alternative/settings.xml drools6testmvnlatest.thestandaloneengine-jar-with-dependencies.jar RELEASE I hope this helps, but if I am missing some important detail and you still think the issue you reported could be somewhat related with Drools please let me know. Thanks, Mario -- 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-tp4027941p4027957.html Sent from the Drools: User forum mailing list archive at Nabble.com. From dunnlow at yahoo.com Fri Jan 31 15:17:18 2014 From: dunnlow at yahoo.com (dunnlow) Date: Fri, 31 Jan 2014 12:17:18 -0800 (PST) Subject: [rules-users] Uberfire jars missing for workbench? Message-ID: <1391199438305-4027958.post@n3.nabble.com> I'm trying to run the new workbench (6.0) in Tomcat 7. I loaded the distributed war for tomcat into eclipse but can not find several classes in the org.uberfire.client package. It seems like I need the uberfire-client-api jar, but it isn't included in the distribution? Where is the best place to obtain this jar (or is there another)? (fyi, I'm developing offline so it is always problematic to build/run apps that are not self-contained.) also, fyi, the "Download Now" button on http://droolsjbpm.github.io/uberfire/ gives a 404 error Thanks for any insight, -J -- View this message in context: http://drools.46999.n3.nabble.com/Uberfire-jars-missing-for-workbench-tp4027958.html Sent from the Drools: User forum mailing list archive at Nabble.com. From michael.anstis at gmail.com Fri Jan 31 15:25:59 2014 From: michael.anstis at gmail.com (Michael Anstis) Date: Fri, 31 Jan 2014 20:25:59 +0000 Subject: [rules-users] Uberfire jars missing for workbench? In-Reply-To: <1391199438305-4027958.post@n3.nabble.com> References: <1391199438305-4027958.post@n3.nabble.com> Message-ID: All JARs that are used exclusively by GWT to compile client-side Java Script are excluded in the distributions as they are not needed at runtime. Sent on the move On 31 Jan 2014 20:18, "dunnlow" wrote: > I'm trying to run the new workbench (6.0) in Tomcat 7. I loaded the > distributed war for tomcat into eclipse but can not find several classes in > the org.uberfire.client package. It seems like I need the > uberfire-client-api jar, but it isn't included in the distribution? Where > is the best place to obtain this jar (or is there another)? > > (fyi, I'm developing offline so it is always problematic to build/run apps > that are not self-contained.) > > also, fyi, the "Download Now" button on > http://droolsjbpm.github.io/uberfire/ gives a 404 error > > Thanks for any insight, > -J > > > > -- > View this message in context: > http://drools.46999.n3.nabble.com/Uberfire-jars-missing-for-workbench-tp4027958.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/20140131/ca5d30cb/attachment.html From dunnlow at yahoo.com Fri Jan 31 15:53:07 2014 From: dunnlow at yahoo.com (dunnlow) Date: Fri, 31 Jan 2014 12:53:07 -0800 (PST) Subject: [rules-users] Uberfire jars missing for workbench? In-Reply-To: References: <1391199438305-4027958.post@n3.nabble.com> Message-ID: <1391201587343-4027960.post@n3.nabble.com> manstis wrote > All JARs that are used exclusively by GWT to compile client-side Java > Script are excluded in the distributions as they are not needed at > runtime. Ok, so I hear you saying, "don't worry about them"....i wont :) Thanks. Sorry also imagine this is a noob question. When I try to start up tomcat with the wb deployed, I get a WeldException at startup: (Unable to invoke [method] @PostConstruct public org.kie.workbench.drools.backend.server.AppSetup.assertPlayground() on org.kie.workbench.drools.backend.server.AppSetup at 5f1ace64 . . Caused by : java.lang.RuntimeException: https://github.com/guvnorngtestuser1/guvnorng-playground.git: cannot open git-upload-pack. I assume something is trying to reach out to github? (which it can not of course because I am running offline). Clearly, I'm missing something major and have some reading to do. Can you suggest where I can find an explanation for what is going on? (The Drools documentation is light on installation details) Thanks again. -- View this message in context: http://drools.46999.n3.nabble.com/Uberfire-jars-missing-for-workbench-tp4027958p4027960.html Sent from the Drools: User forum mailing list archive at Nabble.com. From michael.anstis at gmail.com Fri Jan 31 16:04:48 2014 From: michael.anstis at gmail.com (Michael Anstis) Date: Fri, 31 Jan 2014 21:04:48 +0000 Subject: [rules-users] Uberfire jars missing for workbench? In-Reply-To: <1391201587343-4027960.post@n3.nabble.com> References: <1391199438305-4027958.post@n3.nabble.com> <1391201587343-4027960.post@n3.nabble.com> Message-ID: In the User Guide there is a section about system properties for the workbench. One of these is to disable automatic installation of the example repository at github (I forget which; z.y.example or x.y.demo something like that). If you downloaded the workbench from the Drools download page this zip contains another zip containing the demo/exmple repository (for people like yourself, behind a firewall). If you unzip this there is another system property you can use to point the workbench bootstrap process to the folder containing these repositories. With kind regards, Mike Sent on the move On 31 Jan 2014 20:54, "dunnlow" wrote: > manstis wrote > > All JARs that are used exclusively by GWT to compile client-side Java > > Script are excluded in the distributions as they are not needed at > > runtime. > > Ok, so I hear you saying, "don't worry about them"....i wont :) > > Thanks. Sorry also imagine this is a noob question. When I try to start > up > tomcat with the wb deployed, I get a WeldException at startup: > > (Unable to invoke [method] @PostConstruct public > org.kie.workbench.drools.backend.server.AppSetup.assertPlayground() on > org.kie.workbench.drools.backend.server.AppSetup at 5f1ace64 > . > . > Caused by : java.lang.RuntimeException: > https://github.com/guvnorngtestuser1/guvnorng-playground.git: cannot open > git-upload-pack. > > I assume something is trying to reach out to github? (which it can not of > course because I am running offline). Clearly, I'm missing something major > and have some reading to do. Can you suggest where I can find an > explanation for what is going on? (The Drools documentation is light on > installation details) > > Thanks again. > > > > > -- > View this message in context: > http://drools.46999.n3.nabble.com/Uberfire-jars-missing-for-workbench-tp4027958p4027960.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/20140131/70298636/attachment-0001.html From dunnlow at yahoo.com Fri Jan 31 16:36:15 2014 From: dunnlow at yahoo.com (dunnlow) Date: Fri, 31 Jan 2014 13:36:15 -0800 (PST) Subject: [rules-users] Uberfire jars missing for workbench? In-Reply-To: References: <1391199438305-4027958.post@n3.nabble.com> <1391201587343-4027960.post@n3.nabble.com> Message-ID: <1391204175077-4027962.post@n3.nabble.com> Did as you suggested: unzipped the repositories directory and set the system property *org.kie.example.repositories* to the resulting main directory. Worked like a shot :) Thank you! -J -- View this message in context: http://drools.46999.n3.nabble.com/Uberfire-jars-missing-for-workbench-tp4027958p4027962.html Sent from the Drools: User forum mailing list archive at Nabble.com.