From ge0ffrey.spam at gmail.com Sun Dec 1 04:58:55 2013 From: ge0ffrey.spam at gmail.com (Geoffrey De Smet) Date: Sun, 01 Dec 2013 10:58:55 +0100 Subject: [rules-users] [Optaplanner] Scheduling + VRP In-Reply-To: References: Message-ID: <529B085F.8090606@gmail.com> On 30-11-13 15:02, Mats Nor?n wrote: > Hi, > I'm looking for an example that does both scheduling and vrp. No example of that combination yet. > I have workers with certain skills and I have goods (which require a particular skill set) to be delivered or picked up within certain time windows. > Each worker work in a team. > The team should if possible be assigned to the same delivery/pickup. > The workers work in shifts and by law has to have breaks etc. > I want to create a schedule that assigns workers/teams to deliveries/pickups and stay within the time windows as well as optimizing the distance travelled. > I thought about the nurse rostering example together with cvrptw but the nurse rostering uses shifts (day, night). > > Do I have to do it in two steps? First VRP and then try to assign the workers? In practice, I often see this happening in 2 separate, sequential planning problems (or phases), but that's just because of Conway's law: "organizations which design systems ... are constrained to produce designs which are copies of the communication structures of these organizations" 2 phases is probably suboptimal, because the limitations on the second phase influence the planning of the first phase. There are 3 ways to handle that: 1) Ignore it that 2 phases is suboptimal. You 'll have better results that the old system already. You can tweak it by adding some constraints in phase 1 that make it easier for phase 2. 2) Bender's decomposition. Basically ping-pong between phase 1 and phase 2 (where the result of phase 2 adds constraints in phase 1). Not yet supported out-of-the-box by OptaPlanner, but probably a domain specific pita to implement. 3) Do it all in 1 phase. OptaPlanner 6 has been written to handle multiple planning entity classes and multiple planning variables, so it's definitely possible. You 'll like need to add course grained moves to get things to change for phase 1 in a way that works for phase 2, to avoid getting stuck in a "score trap" (see docs). I am a strong believer in approach 3). If you go that way, let me know how it works out: I need cases to prove that the human planners that follow Conway's law should not limit our potential when automating this. But the conservative choice is 1). In any case, I recommend to prototype phase 1 first. > > The only hard facts are the workers worktime and the goods delivery/pickup time. > > Any suggestions? > > Best regards, > Mats > _______________________________________________ > rules-users mailing list > rules-users at lists.jboss.org > https://lists.jboss.org/mailman/listinfo/rules-users > From mats.noren at gmail.com Sun Dec 1 17:27:58 2013 From: mats.noren at gmail.com (=?utf-8?Q?Mats_Nor=C3=A9n?=) Date: Sun, 1 Dec 2013 23:27:58 +0100 Subject: [rules-users] [Optaplanner] Scheduling + VRP In-Reply-To: <529B085F.8090606@gmail.com> References: <529B085F.8090606@gmail.com> Message-ID: Thanks, I'll give number three a try :-) Is there an example with two planning entities? Regards, Mats 1 dec 2013 kl. 10:58 skrev Geoffrey De Smet : > > On 30-11-13 15:02, Mats Nor?n wrote: >> Hi, >> I'm looking for an example that does both scheduling and vrp. > No example of that combination yet. >> I have workers with certain skills and I have goods (which require a particular skill set) to be delivered or picked up within certain time windows. >> Each worker work in a team. >> The team should if possible be assigned to the same delivery/pickup. >> The workers work in shifts and by law has to have breaks etc. >> I want to create a schedule that assigns workers/teams to deliveries/pickups and stay within the time windows as well as optimizing the distance travelled. >> I thought about the nurse rostering example together with cvrptw but the nurse rostering uses shifts (day, night). >> >> Do I have to do it in two steps? First VRP and then try to assign the workers? > In practice, I often see this happening in 2 separate, sequential > planning problems (or phases), > but that's just because of Conway's law: > "organizations which design systems ... are constrained to produce > designs which are copies of the communication structures of these > organizations" > > 2 phases is probably suboptimal, because the limitations on the second > phase influence the planning of the first phase. > There are 3 ways to handle that: > > 1) Ignore it that 2 phases is suboptimal. You 'll have better results > that the old system already. You can tweak it by adding some constraints > in phase 1 that make it easier for phase 2. > > 2) Bender's decomposition. Basically ping-pong between phase 1 and phase > 2 (where the result of phase 2 adds constraints in phase 1). Not yet > supported out-of-the-box by OptaPlanner, but probably a domain specific > pita to implement. > > 3) Do it all in 1 phase. OptaPlanner 6 has been written to handle > multiple planning entity classes and multiple planning variables, so > it's definitely possible. You 'll like need to add course grained moves > to get things to change for phase 1 in a way that works for phase 2, to > avoid getting stuck in a "score trap" (see docs). > > I am a strong believer in approach 3). If you go that way, let me know > how it works out: I need cases to prove that the human planners that > follow Conway's law should not limit our potential when automating this. > But the conservative choice is 1). > > In any case, I recommend to prototype phase 1 first. > >> >> The only hard facts are the workers worktime and the goods delivery/pickup time. >> >> Any suggestions? >> >> Best 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 From mproctor at codehaus.org Sun Dec 1 18:32:35 2013 From: mproctor at codehaus.org (Mark Proctor) Date: Sun, 1 Dec 2013 23:32:35 +0000 Subject: [rules-users] 6.0 Architecture cheat Sheets Message-ID: I sketched up this over the weekend, as a sort of architectural cheat sheet. Hope it helps clarifies some things around GIT and Maven. Mark -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.jboss.org/pipermail/rules-users/attachments/20131201/ea26bb0a/attachment-0001.html -------------- next part -------------- A non-text attachment was scrubbed... Name: PastedGraphic-13.png Type: image/png Size: 115302 bytes Desc: not available Url : http://lists.jboss.org/pipermail/rules-users/attachments/20131201/ea26bb0a/attachment-0002.png -------------- next part -------------- A non-text attachment was scrubbed... Name: PastedGraphic-14.png Type: image/png Size: 80349 bytes Desc: not available Url : http://lists.jboss.org/pipermail/rules-users/attachments/20131201/ea26bb0a/attachment-0003.png From wtang at kana.com Sun Dec 1 23:31:05 2013 From: wtang at kana.com (wtang) Date: Sun, 1 Dec 2013 20:31:05 -0800 (PST) Subject: [rules-users] Drools 6.0 Kie API vs Drools 5.x Knowledge API Message-ID: <1385958665712-4027032.post@n3.nabble.com> Hello, I am upgrading from Drools 5.x in which I am using the Knowledge Base API to Drools 6.0. I understand that Drools 6.0 still support the 5.x Knowledge API. I definitely need to upgrade from 5.x to 6.0, but should I change my existing code that was using the 5.x Knowledge API to use the new 6.0 Kie API? What are the pros and cons? thanks! -- View this message in context: http://drools.46999.n3.nabble.com/Drools-6-0-Kie-API-vs-Drools-5-x-Knowledge-API-tp4027032.html Sent from the Drools: User forum mailing list archive at Nabble.com. From ge0ffrey.spam at gmail.com Mon Dec 2 02:27:27 2013 From: ge0ffrey.spam at gmail.com (Geoffrey De Smet) Date: Mon, 02 Dec 2013 08:27:27 +0100 Subject: [rules-users] [Optaplanner] Scheduling + VRP In-Reply-To: References: <529B085F.8090606@gmail.com> Message-ID: <529C365F.4090404@gmail.com> On 01-12-13 23:27, Mats Nor?n wrote: > Thanks, > I'll give number three a try :-) > Is there an example with two planning entities? Not yet. Also look for a recent question on this mailing list about Construction Heuristics and 2 planning entity classes. There's a small undocumented part that that didn't make the 6.0.0.Final ref manual. > > Regards, > Mats > > 1 dec 2013 kl. 10:58 skrev Geoffrey De Smet : > >> On 30-11-13 15:02, Mats Nor?n wrote: >>> Hi, >>> I'm looking for an example that does both scheduling and vrp. >> No example of that combination yet. >>> I have workers with certain skills and I have goods (which require a particular skill set) to be delivered or picked up within certain time windows. >>> Each worker work in a team. >>> The team should if possible be assigned to the same delivery/pickup. >>> The workers work in shifts and by law has to have breaks etc. >>> I want to create a schedule that assigns workers/teams to deliveries/pickups and stay within the time windows as well as optimizing the distance travelled. >>> I thought about the nurse rostering example together with cvrptw but the nurse rostering uses shifts (day, night). >>> >>> Do I have to do it in two steps? First VRP and then try to assign the workers? >> In practice, I often see this happening in 2 separate, sequential >> planning problems (or phases), >> but that's just because of Conway's law: >> "organizations which design systems ... are constrained to produce >> designs which are copies of the communication structures of these >> organizations" >> >> 2 phases is probably suboptimal, because the limitations on the second >> phase influence the planning of the first phase. >> There are 3 ways to handle that: >> >> 1) Ignore it that 2 phases is suboptimal. You 'll have better results >> that the old system already. You can tweak it by adding some constraints >> in phase 1 that make it easier for phase 2. >> >> 2) Bender's decomposition. Basically ping-pong between phase 1 and phase >> 2 (where the result of phase 2 adds constraints in phase 1). Not yet >> supported out-of-the-box by OptaPlanner, but probably a domain specific >> pita to implement. >> >> 3) Do it all in 1 phase. OptaPlanner 6 has been written to handle >> multiple planning entity classes and multiple planning variables, so >> it's definitely possible. You 'll like need to add course grained moves >> to get things to change for phase 1 in a way that works for phase 2, to >> avoid getting stuck in a "score trap" (see docs). >> >> I am a strong believer in approach 3). If you go that way, let me know >> how it works out: I need cases to prove that the human planners that >> follow Conway's law should not limit our potential when automating this. >> But the conservative choice is 1). >> >> In any case, I recommend to prototype phase 1 first. >> >>> The only hard facts are the workers worktime and the goods delivery/pickup time. >>> >>> Any suggestions? >>> >>> Best 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 From mproctor at codehaus.org Mon Dec 2 08:40:55 2013 From: mproctor at codehaus.org (Mark Proctor) Date: Mon, 2 Dec 2013 13:40:55 +0000 Subject: [rules-users] dzone cheat sheets Message-ID: <7C4F8D71-08FD-4A5E-8576-B4FD544852A9@codehaus.org> Anyone in the community want to help create and publish a new set of cheat sheets, for the 6.0 stuff? Mark From mproctor at codehaus.org Mon Dec 2 10:35:27 2013 From: mproctor at codehaus.org (Mark Proctor) Date: Mon, 2 Dec 2013 15:35:27 +0000 Subject: [rules-users] Drools 6.0 Kie API vs Drools 5.x Knowledge API In-Reply-To: <1385958665712-4027032.post@n3.nabble.com> References: <1385958665712-4027032.post@n3.nabble.com> Message-ID: There is no harm on staying with your existing code, if it continues to work. Start new projects with the new api and then migrate the old stuff over at your leisure. Mark On 2 Dec 2013, at 04:31, wtang wrote: > Hello, > > I am upgrading from Drools 5.x in which I am using the Knowledge Base API to > Drools 6.0. > > I understand that Drools 6.0 still support the 5.x Knowledge API. I > definitely need to upgrade from 5.x to 6.0, but should I change my existing > code that was using the 5.x Knowledge API to use the new 6.0 Kie API? > > What are the pros and cons? > > thanks! > > > > -- > View this message in context: http://drools.46999.n3.nabble.com/Drools-6-0-Kie-API-vs-Drools-5-x-Knowledge-API-tp4027032.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 alexis.brouard at haulogy.net Mon Dec 2 10:42:26 2013 From: alexis.brouard at haulogy.net (abr) Date: Mon, 2 Dec 2013 07:42:26 -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: <1385998946058-4027037.post@n3.nabble.com> Dear all, I desperately tried to reproduce this issue in a self-contained unit test. But with no success :( The discussion by jknehr is interesting. However, in my case, I do not have a large number of event and I do not have multi-threading in place. But I have many rules loaded in the KB (more than 700.) If the issue is also due to volume, it will be hard to reproduce... -- View this message in context: http://drools.46999.n3.nabble.com/5-6-0-CR1-gives-a-NullPointerException-in-after-evaluator-tp4026780p4027037.html Sent from the Drools: User forum mailing list archive at Nabble.com. From brachi.w at sapiens.com Mon Dec 2 10:51:03 2013 From: brachi.w at sapiens.com (brachi) Date: Mon, 2 Dec 2013 07:51:03 -0800 (PST) Subject: [rules-users] permgen leak Message-ID: <1385999463610-4027038.post@n3.nabble.com> i'm using drools 5.5.0, after the rules deployment, (associate DRL's with the KnowladBase and compile them) my permgen grows to 500m, and also if i undeploy, the permgen doesn't cleaned up. (only if i restart the server) It won't help me to increase the permgen size, because the client does a lot of heavy deployment, and can be in the maximum size by 3-4 deployments. I tried this tomcat flags, and it does nothing: -XX:+UseConcMarkSweepGC -XX:+CMSPermGenSweepingEnabled -XX:+CMSClassUnloadingEnabled -XX:+UseParNewGC I tried set the flag : PermGenThreshold=0, like other people suggested in your forums and it doesn't help. any help? it's production issue... -- View this message in context: http://drools.46999.n3.nabble.com/permgen-leak-tp4027038.html Sent from the Drools: User forum mailing list archive at Nabble.com. From paul.s.mander at gmail.com Mon Dec 2 10:52:58 2013 From: paul.s.mander at gmail.com (Paul Mander) Date: Mon, 2 Dec 2013 15:52:58 +0000 Subject: [rules-users] permgen leak In-Reply-To: <1385999463610-4027038.post@n3.nabble.com> References: <1385999463610-4027038.post@n3.nabble.com> Message-ID: I found that changing dialect to mvel stopped jitting classes and the performance hit was not noticeable. On 2 December 2013 15:51, brachi wrote: > i'm using drools 5.5.0, after the rules deployment, (associate DRL's with > the > KnowladBase and compile them) > my permgen grows to 500m, and also if i undeploy, the permgen doesn't > cleaned up. (only if i restart the server) > It won't help me to increase the permgen size, because the client does a > lot > of heavy deployment, and can be in the maximum size by 3-4 deployments. > I tried this tomcat flags, and it does nothing: > -XX:+UseConcMarkSweepGC -XX:+CMSPermGenSweepingEnabled > -XX:+CMSClassUnloadingEnabled -XX:+UseParNewGC > I tried set the flag : PermGenThreshold=0, like other people suggested in > your forums and it doesn't help. > any help? it's production issue... > > > > -- > View this message in context: > http://drools.46999.n3.nabble.com/permgen-leak-tp4027038.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/20131202/6e6f3b70/attachment.html From brachi.w at sapiens.com Mon Dec 2 11:05:52 2013 From: brachi.w at sapiens.com (brachi) Date: Mon, 2 Dec 2013 08:05:52 -0800 (PST) Subject: [rules-users] permgen leak In-Reply-To: References: <1385999463610-4027038.post@n3.nabble.com> Message-ID: <1386000352680-4027040.post@n3.nabble.com> i tried it. wasn't help. i used MAT to analyze the leak, and it points on mvel2.optimizer -- View this message in context: http://drools.46999.n3.nabble.com/permgen-leak-tp4027038p4027040.html Sent from the Drools: User forum mailing list archive at Nabble.com. From gcaputo at pactenovation.fr Mon Dec 2 11:19:33 2013 From: gcaputo at pactenovation.fr (vince) Date: Mon, 2 Dec 2013 08:19:33 -0800 (PST) Subject: [rules-users] Drools 6.0.0 Final - execution rules with process flow Message-ID: <1386001173844-4027041.post@n3.nabble.com> I have started taking a look at the 6.0.0 Final and I imported and executed the Drools Hello World sample process project. So far so good. Then I wanted to execute a rule from the ruleflow. To test that scenario I replaced the script task with a businss rule task and created the ruleflow-group property in the ruleflow node and in the rule I want to fire (which just print a text message, no objects are involved).But this is not working. I noticed that the starting actions of the package are executed but not the final ones, but I am not able to explain why. What am I missing here? Is there an example where I can compare the code? Thanks. -- View this message in context: http://drools.46999.n3.nabble.com/Drools-6-0-0-Final-execution-rules-with-process-flow-tp4027041.html Sent from the Drools: User forum mailing list archive at Nabble.com. From stephen.masters at me.com Mon Dec 2 11:38:41 2013 From: stephen.masters at me.com (Stephen Masters) Date: Mon, 02 Dec 2013 16:38:41 +0000 Subject: [rules-users] permgen leak In-Reply-To: <1386000352680-4027040.post@n3.nabble.com> References: <1385999463610-4027038.post@n3.nabble.com> <1386000352680-4027040.post@n3.nabble.com> Message-ID: <9E7AF538-4B43-4CC9-ACF7-905C3BA38CC2@me.com> When you say that it won?t help to increase the permgen size, are you saying that you have tried it and it didn?t work? What size does it reach, given an extra gig or 2? How much is it growing for each redeployment? Also from your explanation, it would appear that permgen is hitting 500 meg before you insert any facts into working memory. Is that the case? On 2 Dec 2013, at 16:05, brachi wrote: > i tried it. wasn't help. > i used MAT to analyze the leak, and it points on mvel2.optimizer > > > > -- > View this message in context: http://drools.46999.n3.nabble.com/permgen-leak-tp4027038p4027040.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 Mon Dec 2 11:40:03 2013 From: paul.s.mander at gmail.com (Paul Mander) Date: Mon, 2 Dec 2013 16:40:03 +0000 Subject: [rules-users] permgen leak In-Reply-To: <1386000352680-4027040.post@n3.nabble.com> References: <1385999463610-4027038.post@n3.nabble.com> <1386000352680-4027040.post@n3.nabble.com> Message-ID: and set drools.permgenThreshold=0 in drools.rulebase.conf On 2 December 2013 16:05, brachi wrote: > i tried it. wasn't help. > i used MAT to analyze the leak, and it points on mvel2.optimizer > > > > -- > View this message in context: > http://drools.46999.n3.nabble.com/permgen-leak-tp4027038p4027040.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/20131202/7cea2521/attachment-0001.html From paul.s.mander at gmail.com Mon Dec 2 12:38:21 2013 From: paul.s.mander at gmail.com (pmander) Date: Mon, 2 Dec 2013 09:38:21 -0800 (PST) Subject: [rules-users] drools 6 equivalent of addKnowledgePackages Message-ID: <1386005900764-4027044.post@n3.nabble.com> Just doing some investigation of the drools 6 release. We dynamically build our rules and use some thing like the following to bring them into a stateful session: KnowledgeBuilder builder = KnowledgeBuilderFactory.newKnowledgeBuilder(); builder.add(ResourceFactory.newReaderResource(new StringReader( compiledRules)), ResourceType.DRL); KnowledgeBuilderErrors errors = builder.getErrors(); kbase.addKnowledgePackages(builder.getKnowledgePackages()); This appears to be deprecated but there is no indication in the javadoc for what the alternative is. -- View this message in context: http://drools.46999.n3.nabble.com/drools-6-equivalent-of-addKnowledgePackages-tp4027044.html Sent from the Drools: User forum mailing list archive at Nabble.com. From brachi.w at sapiens.com Mon Dec 2 13:49:01 2013 From: brachi.w at sapiens.com (brachi) Date: Mon, 2 Dec 2013 10:49:01 -0800 (PST) Subject: [rules-users] permgen leak In-Reply-To: References: <1385999463610-4027038.post@n3.nabble.com> <1386000352680-4027040.post@n3.nabble.com> Message-ID: <1386010141468-4027045.post@n3.nabble.com> i did, nothing changed. the leak still exists. -- View this message in context: http://drools.46999.n3.nabble.com/permgen-leak-tp4027038p4027045.html Sent from the Drools: User forum mailing list archive at Nabble.com. From brachi.w at sapiens.com Mon Dec 2 13:53:32 2013 From: brachi.w at sapiens.com (brachi) Date: Mon, 2 Dec 2013 10:53:32 -0800 (PST) Subject: [rules-users] permgen leak In-Reply-To: <9E7AF538-4B43-4CC9-ACF7-905C3BA38CC2@me.com> References: <1385999463610-4027038.post@n3.nabble.com> <1386000352680-4027040.post@n3.nabble.com> <9E7AF538-4B43-4CC9-ACF7-905C3BA38CC2@me.com> Message-ID: <1386010412544-4027046.post@n3.nabble.com> increasing the size solves the "out of memory exception". but didn't solve the leak. i can increase it to 2G and i will be able to work, but will fail in the next deployments. this memory won't cleaned up, only if I will restart the server. the leak can't be solve by increasing the memory. and yes, without insert any facts, memory is being 500 mega, after fireAll() it being 650 mega. -- View this message in context: http://drools.46999.n3.nabble.com/permgen-leak-tp4027038p4027046.html Sent from the Drools: User forum mailing list archive at Nabble.com. From paul.s.mander at gmail.com Mon Dec 2 13:56:18 2013 From: paul.s.mander at gmail.com (Paul Mander) Date: Mon, 2 Dec 2013 18:56:18 +0000 Subject: [rules-users] permgen leak In-Reply-To: <1386010141468-4027045.post@n3.nabble.com> References: <1385999463610-4027038.post@n3.nabble.com> <1386000352680-4027040.post@n3.nabble.com> <1386010141468-4027045.post@n3.nabble.com> Message-ID: <3C5C869A-922C-41FC-A14A-3F9411EFBCDD@gmail.com> This is exactly what happened to me. I was getting > 500mb of perm gen that would eventually blow the heap when refreshing the rules. I switch to Mvel and changed that setting and now I just have a steady 50m perm gen that doesn't grow > On Dec 2, 2013, at 6:49 PM, brachi wrote: > > i did, nothing changed. the leak still exists. > > > > -- > View this message in context: http://drools.46999.n3.nabble.com/permgen-leak-tp4027038p4027045.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 Dec 2 14:10:51 2013 From: brachi.w at sapiens.com (brachi) Date: Mon, 2 Dec 2013 11:10:51 -0800 (PST) Subject: [rules-users] permgen leak In-Reply-To: <3C5C869A-922C-41FC-A14A-3F9411EFBCDD@gmail.com> References: <1385999463610-4027038.post@n3.nabble.com> <1386000352680-4027040.post@n3.nabble.com> <1386010141468-4027045.post@n3.nabble.com> <3C5C869A-922C-41FC-A14A-3F9411EFBCDD@gmail.com> Message-ID: <1386011451286-4027048.post@n3.nabble.com> how did you changed to mvel? this property?drools.dialect.mvel.strict false or true? i think i tried it with false... -- View this message in context: http://drools.46999.n3.nabble.com/permgen-leak-tp4027038p4027048.html Sent from the Drools: User forum mailing list archive at Nabble.com. From paul.s.mander at gmail.com Mon Dec 2 14:19:49 2013 From: paul.s.mander at gmail.com (Paul Mander) Date: Mon, 2 Dec 2013 19:19:49 +0000 Subject: [rules-users] permgen leak In-Reply-To: <1386011451286-4027048.post@n3.nabble.com> References: <1385999463610-4027038.post@n3.nabble.com> <1386000352680-4027040.post@n3.nabble.com> <1386010141468-4027045.post@n3.nabble.com> <3C5C869A-922C-41FC-A14A-3F9411EFBCDD@gmail.com> <1386011451286-4027048.post@n3.nabble.com> Message-ID: No, set the dialect in the drl itself. Dialect "mvel" I think. I'll check tomorrow. > On Dec 2, 2013, at 7:10 PM, brachi wrote: > > how did you changed to mvel? > this property?drools.dialect.mvel.strict > false or true? > i think i tried it with false... > > > > > > -- > View this message in context: http://drools.46999.n3.nabble.com/permgen-leak-tp4027038p4027048.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 Dec 2 14:23:29 2013 From: brachi.w at sapiens.com (brachi) Date: Mon, 2 Dec 2013 11:23:29 -0800 (PST) Subject: [rules-users] permgen leak In-Reply-To: References: <1385999463610-4027038.post@n3.nabble.com> <1386000352680-4027040.post@n3.nabble.com> <1386010141468-4027045.post@n3.nabble.com> <3C5C869A-922C-41FC-A14A-3F9411EFBCDD@gmail.com> <1386011451286-4027048.post@n3.nabble.com> Message-ID: <1386012209916-4027050.post@n3.nabble.com> in the drl itself.... interesting... have a DRL for example? please.. -- View this message in context: http://drools.46999.n3.nabble.com/permgen-leak-tp4027038p4027050.html Sent from the Drools: User forum mailing list archive at Nabble.com. From mproctor at codehaus.org Mon Dec 2 14:33:36 2013 From: mproctor at codehaus.org (Mark Proctor) Date: Mon, 2 Dec 2013 19:33:36 +0000 Subject: [rules-users] permgen leak In-Reply-To: <1386011451286-4027048.post@n3.nabble.com> References: <1385999463610-4027038.post@n3.nabble.com> <1386000352680-4027040.post@n3.nabble.com> <1386010141468-4027045.post@n3.nabble.com> <3C5C869A-922C-41FC-A14A-3F9411EFBCDD@gmail.com> <1386011451286-4027048.post@n3.nabble.com> Message-ID: <0AAA15D2-979B-4369-9A05-B741239A7689@codehaus.org> Did you try enabling the JVM flag CMSClassUnloadingEnabled http://stackoverflow.com/questions/3334911/what-does-jvm-flag-cmsclassunloadingenabled-actually-do This typically seems the source of most people?s leaks. Mark On 2 Dec 2013, at 19:10, brachi wrote: > how did you changed to mvel? > this property?drools.dialect.mvel.strict > false or true? > i think i tried it with false... > > > > > > -- > View this message in context: http://drools.46999.n3.nabble.com/permgen-leak-tp4027038p4027048.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 Dec 2 14:41:42 2013 From: brachi.w at sapiens.com (brachi) Date: Mon, 2 Dec 2013 11:41:42 -0800 (PST) Subject: [rules-users] permgen leak In-Reply-To: <0AAA15D2-979B-4369-9A05-B741239A7689@codehaus.org> References: <1385999463610-4027038.post@n3.nabble.com> <1386000352680-4027040.post@n3.nabble.com> <1386010141468-4027045.post@n3.nabble.com> <3C5C869A-922C-41FC-A14A-3F9411EFBCDD@gmail.com> <1386011451286-4027048.post@n3.nabble.com> <0AAA15D2-979B-4369-9A05-B741239A7689@codehaus.org> Message-ID: <1386013302159-4027052.post@n3.nabble.com> thanks, I used CMSClassUnloadingEnabled, but this can't help because the GC can't garbage this classes because they are in use somewhere, that is actually the leak. -- View this message in context: http://drools.46999.n3.nabble.com/permgen-leak-tp4027038p4027052.html Sent from the Drools: User forum mailing list archive at Nabble.com. From paul.s.mander at gmail.com Mon Dec 2 14:45:59 2013 From: paul.s.mander at gmail.com (Paul Mander) Date: Mon, 2 Dec 2013 19:45:59 +0000 Subject: [rules-users] permgen leak In-Reply-To: <1386013302159-4027052.post@n3.nabble.com> References: <1385999463610-4027038.post@n3.nabble.com> <1386000352680-4027040.post@n3.nabble.com> <1386010141468-4027045.post@n3.nabble.com> <3C5C869A-922C-41FC-A14A-3F9411EFBCDD@gmail.com> <1386011451286-4027048.post@n3.nabble.com> <0AAA15D2-979B-4369-9A05-B741239A7689@codehaus.org> <1386013302159-4027052.post@n3.nabble.com> Message-ID: <44AD5C6B-263F-4E51-8EBF-BF30D87E028D@gmail.com> http://www.commonj.com/blogs/2010/11/13/drools-tutorial-by-examples/ > On Dec 2, 2013, at 7:41 PM, brachi wrote: > > thanks, I used CMSClassUnloadingEnabled, but this can't help because the GC > can't garbage this classes because they are in use somewhere, that is > actually the leak. > > > > -- > View this message in context: http://drools.46999.n3.nabble.com/permgen-leak-tp4027038p4027052.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 Mon Dec 2 18:28:16 2013 From: mproctor at codehaus.org (Mark Proctor) Date: Mon, 2 Dec 2013 23:28:16 +0000 Subject: [rules-users] permgen leak In-Reply-To: <1386013302159-4027052.post@n3.nabble.com> References: <1385999463610-4027038.post@n3.nabble.com> <1386000352680-4027040.post@n3.nabble.com> <1386010141468-4027045.post@n3.nabble.com> <3C5C869A-922C-41FC-A14A-3F9411EFBCDD@gmail.com> <1386011451286-4027048.post@n3.nabble.com> <0AAA15D2-979B-4369-9A05-B741239A7689@codehaus.org> <1386013302159-4027052.post@n3.nabble.com> Message-ID: <79CC380D-332C-4510-96E3-0C1FCF231D92@codehaus.org> At this point we are probably stuck, without a unit test that reproduces the issue. Or better still a patch fixing it. Mark On 2 Dec 2013, at 19:41, brachi wrote: > thanks, I used CMSClassUnloadingEnabled, but this can't help because the GC > can't garbage this classes because they are in use somewhere, that is > actually the leak. > > > > -- > View this message in context: http://drools.46999.n3.nabble.com/permgen-leak-tp4027038p4027052.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 Mon Dec 2 19:05:53 2013 From: mproctor at codehaus.org (Mark Proctor) Date: Tue, 3 Dec 2013 00:05:53 +0000 Subject: [rules-users] drools 6 equivalent of addKnowledgePackages In-Reply-To: <1386005900764-4027044.post@n3.nabble.com> References: <1386005900764-4027044.post@n3.nabble.com> Message-ID: <0257AF0D-55E7-4C4D-996E-F1280C80E55B@codehaus.org> I?ve sent a few emails on this now. See docs: http://docs.jboss.org/drools/release/6.0.0.Final/drools-docs/html/KIEChapter.html 4.2.2.4. Defining a KieModule programmatically 4.2.5.9. Programaticaly build a Simple KieModule with Defaults 4.2.5.10. Programaticaly build a KieModule using Meta Models Mark On 2 Dec 2013, at 17:38, pmander wrote: > Just doing some investigation of the drools 6 release. We dynamically build > our rules and use some thing like the following to bring them into a > stateful session: > > KnowledgeBuilder builder = KnowledgeBuilderFactory.newKnowledgeBuilder(); > builder.add(ResourceFactory.newReaderResource(new StringReader( > compiledRules)), ResourceType.DRL); > KnowledgeBuilderErrors errors = builder.getErrors(); > kbase.addKnowledgePackages(builder.getKnowledgePackages()); > > This appears to be deprecated but there is no indication in the javadoc for > what the alternative is. > > > > -- > View this message in context: http://drools.46999.n3.nabble.com/drools-6-equivalent-of-addKnowledgePackages-tp4027044.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 sterjevm at mt.net.mk Tue Dec 3 03:22:18 2013 From: sterjevm at mt.net.mk (marjan.sterjev) Date: Tue, 3 Dec 2013 00:22:18 -0800 (PST) Subject: [rules-users] KIE Internal M2 Repository Access Denied Message-ID: <1386058938108-4027058.post@n3.nabble.com> I have installed drools-wb-6.0.0.Final-tomcat7.0 on Tomcat 7.0 with all default settings. The OS platform is windows 7. I?m trying to access the internal KIE M2-Repository in order to dynamically load (re-load with KieScanner) Kie Modules. The repository is defined in the POM the following way: kie-wb http://kie-server:8080/drools-wb-6.0.0.Final-tomcat7.0/maven2/ The maven build fails with Unauthorized error: Could not transfer artifact com.masterit.labs:my-model:pom:0.0.1-SNAPSHOT from/to kie-wb (http://kie-server:8080/drools-wb-6.0.0.Final-tomcat7.0/maven2): Not authorized , ReasonPhrase:Unauthorized. -> [Help 1] If I access the maven2 repository directly in the browser the error is: java.io.FileNotFoundException: repositories\kie (Access is denied) java.io.RandomAccessFile.open(Native Method) java.io.RandomAccessFile.(RandomAccessFile.java:216) org.guvnor.m2repo.backend.server.FileDownloadServlet.serveResource(FileDownloadServlet.java:166) org.guvnor.m2repo.backend.server.FileDownloadServlet.doGet(FileDownloadServlet.java:65) javax.servlet.http.HttpServlet.service(HttpServlet.java:621) javax.servlet.http.HttpServlet.service(HttpServlet.java:728) org.uberfire.security.server.UberFireSecurityFilter.doFilter(UberFireSecurityFilter.java:266) However, manually I can always type the path to some M2 resource in the browser and get the result. For example the URL below returns the required artifact: http://kie-server:8080/drools-wb-6.0.0.Final-tomcat7.0/maven2/com/interworks/labs/my-model/0.0.1-SNAPSHOT/maven-metadata.xml -- View this message in context: http://drools.46999.n3.nabble.com/KIE-Internal-M2-Repository-Access-Denied-tp4027058.html Sent from the Drools: User forum mailing list archive at Nabble.com. From paul.s.mander at gmail.com Tue Dec 3 03:25:02 2013 From: paul.s.mander at gmail.com (pmander) Date: Tue, 3 Dec 2013 00:25:02 -0800 (PST) Subject: [rules-users] drools 6 equivalent of addKnowledgePackages In-Reply-To: <0257AF0D-55E7-4C4D-996E-F1280C80E55B@codehaus.org> References: <1386005900764-4027044.post@n3.nabble.com> <0257AF0D-55E7-4C4D-996E-F1280C80E55B@codehaus.org> Message-ID: <1386059102870-4027059.post@n3.nabble.com> I head previously read that but didn't spot the bit that mentions creating from a drl defined as a String. I take it this can be done from KieFileSystem. String rules = ... KieFileSystem kfs = kieServices.newKieFileSystem(); kfs.write(kieServices.getResources().newReaderResource(new StringReader(rules))); This throws an exception complaining that the resource doesn't have a source or target path set. Is there a way to push a dynamically created drl into this without writing it to disk first? -- View this message in context: http://drools.46999.n3.nabble.com/drools-6-equivalent-of-addKnowledgePackages-tp4027044p4027059.html Sent from the Drools: User forum mailing list archive at Nabble.com. From dsotty at gmail.com Tue Dec 3 03:50:00 2013 From: dsotty at gmail.com (Davide Sottara) Date: Tue, 03 Dec 2013 01:50:00 -0700 Subject: [rules-users] drools 6 equivalent of addKnowledgePackages In-Reply-To: <1386059102870-4027059.post@n3.nabble.com> References: <1386005900764-4027044.post@n3.nabble.com> <0257AF0D-55E7-4C4D-996E-F1280C80E55B@codehaus.org> <1386059102870-4027059.post@n3.nabble.com> Message-ID: <529D9B38.9080409@gmail.com> The KIEFileSystem is an in-memory filesystem, so what you are doing is correct. You will have to set at least two more properties of the resource: 1) the sourcePath - e.g. "foo/myRule.drl" will eventually place the rule "file" in the virtual src/main/resources/foo folder, where it will be picked up by the builder 2) the resource type, e.g. ResourceType.DRL Unfortunately, the API-based, incremental build process in 6.0 final has a few issues and may not always work as expected. It is being fixed even now, but you may have to rebuild and update your full virtual jar every time you want to modify the knowledge base. See the test class IncrementalCompilationTest in the source code and the drools examples, and feel free to ask for more clarifications Best Davide On 12/03/2013 01:25 AM, pmander wrote: > I head previously read that but didn't spot the bit that mentions creating > from a drl defined as a String. I take it this can be done from > KieFileSystem. > > String rules = ... > KieFileSystem kfs = kieServices.newKieFileSystem(); > kfs.write(kieServices.getResources().newReaderResource(new > StringReader(rules))); > > This throws an exception complaining that the resource doesn't have a source > or target path set. > > Is there a way to push a dynamically created drl into this without writing > it to disk first? > > > > -- > View this message in context: http://drools.46999.n3.nabble.com/drools-6-equivalent-of-addKnowledgePackages-tp4027044p4027059.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 Dec 3 04:27:17 2013 From: paul.s.mander at gmail.com (Paul Mander) Date: Tue, 3 Dec 2013 09:27:17 +0000 Subject: [rules-users] permgen leak In-Reply-To: <79CC380D-332C-4510-96E3-0C1FCF231D92@codehaus.org> References: <1385999463610-4027038.post@n3.nabble.com> <1386000352680-4027040.post@n3.nabble.com> <1386010141468-4027045.post@n3.nabble.com> <3C5C869A-922C-41FC-A14A-3F9411EFBCDD@gmail.com> <1386011451286-4027048.post@n3.nabble.com> <0AAA15D2-979B-4369-9A05-B741239A7689@codehaus.org> <1386013302159-4027052.post@n3.nabble.com> <79CC380D-332C-4510-96E3-0C1FCF231D92@codehaus.org> Message-ID: <0DC511DF-68A3-4250-8E90-AACDB0F6B6AB@gmail.com> I'm putting together a test now. Should be ready in about an hour > On Dec 2, 2013, at 11:28 PM, Mark Proctor wrote: > > At this point we are probably stuck, without a unit test that reproduces the issue. Or better still a patch fixing it. > > Mark >> On 2 Dec 2013, at 19:41, brachi wrote: >> >> thanks, I used CMSClassUnloadingEnabled, but this can't help because the GC >> can't garbage this classes because they are in use somewhere, that is >> actually the leak. >> >> >> >> -- >> View this message in context: http://drools.46999.n3.nabble.com/permgen-leak-tp4027038p4027052.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 michael.anstis at gmail.com Tue Dec 3 06:07:44 2013 From: michael.anstis at gmail.com (Michael Anstis) Date: Tue, 3 Dec 2013 11:07:44 +0000 Subject: [rules-users] KIE Internal M2 Repository Access Denied In-Reply-To: <1386058938108-4027058.post@n3.nabble.com> References: <1386058938108-4027058.post@n3.nabble.com> Message-ID: Hi, I've looked into what you report; and it does indeed appear we have a small issue ;) For now you can amend the /WEB-INF/classes/url_filter.yaml file in the WAR to remove the Maven Repository from authentication (see the exclusion below):- filter: - pattern: /rest/** exclude: - /*.ico - /org.drools.workbench.DroolsWorkbench/images/** - /org.drools.workbench.DroolsWorkbench/css/** - /css/** - /images/** * - /maven2/*** With kind regards, Mike On 3 December 2013 08:22, marjan.sterjev wrote: > I have installed drools-wb-6.0.0.Final-tomcat7.0 on Tomcat 7.0 with all > default settings. The OS platform is windows 7. > > I?m trying to access the internal KIE M2-Repository in order to dynamically > load (re-load with KieScanner) Kie Modules. The repository is defined in > the > POM the following way: > > > kie-wb > > http://kie-server:8080/drools-wb-6.0.0.Final-tomcat7.0/maven2/ > > > The maven build fails with Unauthorized error: > > Could not transfer artifact com.masterit.labs:my-model:pom:0.0.1-SNAPSHOT > from/to kie-wb > (http://kie-server:8080/drools-wb-6.0.0.Final-tomcat7.0/maven2): Not > authorized , ReasonPhrase:Unauthorized. -> [Help 1] > > If I access the maven2 repository directly in the browser the error is: > > java.io.FileNotFoundException: repositories\kie (Access is denied) > java.io.RandomAccessFile.open(Native Method) > java.io.RandomAccessFile.(RandomAccessFile.java:216) > > > org.guvnor.m2repo.backend.server.FileDownloadServlet.serveResource(FileDownloadServlet.java:166) > > > org.guvnor.m2repo.backend.server.FileDownloadServlet.doGet(FileDownloadServlet.java:65) > javax.servlet.http.HttpServlet.service(HttpServlet.java:621) > javax.servlet.http.HttpServlet.service(HttpServlet.java:728) > > > org.uberfire.security.server.UberFireSecurityFilter.doFilter(UberFireSecurityFilter.java:266) > > However, manually I can always type the path to some M2 resource in the > browser and get the result. For example the URL below returns the required > artifact: > > > http://kie-server:8080/drools-wb-6.0.0.Final-tomcat7.0/maven2/com/interworks/labs/my-model/0.0.1-SNAPSHOT/maven-metadata.xml > > > > > > > > > -- > View this message in context: > http://drools.46999.n3.nabble.com/KIE-Internal-M2-Repository-Access-Denied-tp4027058.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/20131203/7387f51f/attachment.html From paul.s.mander at gmail.com Tue Dec 3 07:00:41 2013 From: paul.s.mander at gmail.com (pmander) Date: Tue, 3 Dec 2013 04:00:41 -0800 (PST) Subject: [rules-users] permgen leak In-Reply-To: <0DC511DF-68A3-4250-8E90-AACDB0F6B6AB@gmail.com> References: <1386000352680-4027040.post@n3.nabble.com> <1386010141468-4027045.post@n3.nabble.com> <3C5C869A-922C-41FC-A14A-3F9411EFBCDD@gmail.com> <1386011451286-4027048.post@n3.nabble.com> <0AAA15D2-979B-4369-9A05-B741239A7689@codehaus.org> <1386013302159-4027052.post@n3.nabble.com> <79CC380D-332C-4510-96E3-0C1FCF231D92@codehaus.org> <0DC511DF-68A3-4250-8E90-AACDB0F6B6AB@gmail.com> Message-ID: <1386072041134-4027063.post@n3.nabble.com> I've put together a test and running it through a few times shows that the perm gen will actually recover but only if it is set at a level that is double the initial value. Let me elaborate. In my test, I create a session, add the rules, the facts, query the results, remove the facts and results and then repeat. Based on certain numbers of rules and facts, this will use 350mb of perm gen no matter how many times I repeat. Now if I run the whole test again which will dispose of the original session and create a new one then I get perm gen errors if my max perm gen is 512m. Looking at the perm gen graph in jconsole or similar shows that the second session builds on the first perm gen and it fails without recovering. If I now adjust the rules/facts so that I use 235mb then the second run completes and the 3rd run causes GC in the perm gen. you can see this in jconsole. So, if you profile your app and see what the perm gen if initially, doubel the max perm gen (and add a bit more) then you should be ok. However, if I change the dialect to "mvel" and then add drools.rulebase.conf into META-INF with drools.permgenThreshold=0, then my permgen sits at 19mb for the last test and does not increase when running it multiple times. Interestingly, it was stated in a previous through that mvel was less performant but interestingly, the java dialect test took 179 seconds to complete but the mvel one tool 112seconds. This does appear to question the defaults in the application. -- View this message in context: http://drools.46999.n3.nabble.com/permgen-leak-tp4027038p4027063.html Sent from the Drools: User forum mailing list archive at Nabble.com. From brachi.w at sapiens.com Tue Dec 3 07:04:57 2013 From: brachi.w at sapiens.com (brachi) Date: Tue, 3 Dec 2013 04:04:57 -0800 (PST) Subject: [rules-users] permgen leak In-Reply-To: <0DC511DF-68A3-4250-8E90-AACDB0F6B6AB@gmail.com> References: <1386000352680-4027040.post@n3.nabble.com> <1386010141468-4027045.post@n3.nabble.com> <3C5C869A-922C-41FC-A14A-3F9411EFBCDD@gmail.com> <1386011451286-4027048.post@n3.nabble.com> <0AAA15D2-979B-4369-9A05-B741239A7689@codehaus.org> <1386013302159-4027052.post@n3.nabble.com> <79CC380D-332C-4510-96E3-0C1FCF231D92@codehaus.org> <0DC511DF-68A3-4250-8E90-AACDB0F6B6AB@gmail.com> Message-ID: <1386072297227-4027064.post@n3.nabble.com> thank you pmander, I tried the dialect "mval" and the permgen size was 150m after the deployment. still have some compilation and runtime issues because of the dialect... waiting to your unit test, I hope it will help us solve this problem. thank you very much! -- View this message in context: http://drools.46999.n3.nabble.com/permgen-leak-tp4027038p4027064.html Sent from the Drools: User forum mailing list archive at Nabble.com. From paul.s.mander at gmail.com Tue Dec 3 07:50:23 2013 From: paul.s.mander at gmail.com (pmander) Date: Tue, 3 Dec 2013 04:50:23 -0800 (PST) Subject: [rules-users] permgen leak In-Reply-To: <1386072297227-4027064.post@n3.nabble.com> References: <1386000352680-4027040.post@n3.nabble.com> <1386010141468-4027045.post@n3.nabble.com> <3C5C869A-922C-41FC-A14A-3F9411EFBCDD@gmail.com> <1386011451286-4027048.post@n3.nabble.com> <0AAA15D2-979B-4369-9A05-B741239A7689@codehaus.org> <1386013302159-4027052.post@n3.nabble.com> <79CC380D-332C-4510-96E3-0C1FCF231D92@codehaus.org> <0DC511DF-68A3-4250-8E90-AACDB0F6B6AB@gmail.com> <1386072297227-4027064.post@n3.nabble.com> Message-ID: <1386075023882-4027065.post@n3.nabble.com> permgen.zip Here's the test I was using. You can change the dialect, number of runs, batches, rules etc as attributes in the test class. -- View this message in context: http://drools.46999.n3.nabble.com/permgen-leak-tp4027038p4027065.html Sent from the Drools: User forum mailing list archive at Nabble.com. From paul.s.mander at gmail.com Tue Dec 3 07:51:12 2013 From: paul.s.mander at gmail.com (pmander) Date: Tue, 3 Dec 2013 04:51:12 -0800 (PST) Subject: [rules-users] permgen leak In-Reply-To: <1386075023882-4027065.post@n3.nabble.com> References: <1386010141468-4027045.post@n3.nabble.com> <3C5C869A-922C-41FC-A14A-3F9411EFBCDD@gmail.com> <1386011451286-4027048.post@n3.nabble.com> <0AAA15D2-979B-4369-9A05-B741239A7689@codehaus.org> <1386013302159-4027052.post@n3.nabble.com> <79CC380D-332C-4510-96E3-0C1FCF231D92@codehaus.org> <0DC511DF-68A3-4250-8E90-AACDB0F6B6AB@gmail.com> <1386072297227-4027064.post@n3.nabble.com> <1386075023882-4027065.post@n3.nabble.com> Message-ID: <1386075072321-4027066.post@n3.nabble.com> Oh, and run the test with -Xmx2048m -XX:PermSize=512m -XX:MaxPermSize=512m or else it will fail straight away. Paul -- View this message in context: http://drools.46999.n3.nabble.com/permgen-leak-tp4027038p4027066.html Sent from the Drools: User forum mailing list archive at Nabble.com. From sterjevm at mt.net.mk Tue Dec 3 08:09:25 2013 From: sterjevm at mt.net.mk (marjan.sterjev) Date: Tue, 3 Dec 2013 05:09:25 -0800 (PST) Subject: [rules-users] KIE Internal M2 Repository Access Denied In-Reply-To: <1386058938108-4027058.post@n3.nabble.com> References: <1386058938108-4027058.post@n3.nabble.com> Message-ID: <1386076165985-4027067.post@n3.nabble.com> Thank you. It works now with the security exclusion applied. Let's move on. The documentation says that KieScanner can scan local and remote repositories. However I can't get it works. Consider this simple program that tries to dynamically load rules jar that is not referenced in the project's pom: import java.util.Scanner; import org.kie.api.KieServices; import org.kie.api.builder.KieScanner; import org.kie.api.runtime.KieContainer; import org.kie.api.runtime.StatelessKieSession; import com.interworks.labs.domain.Employee; public class TestMyModel { public static void main(String[] args) throws Throwable { KieServices ks = KieServices.Factory.get(); KieContainer kContainer = ks.newKieContainer(ks.newReleaseId( "com.masterit.labs", "my-rules", "1.0.0")); KieScanner kScanner = ks.newKieScanner(kContainer); kScanner.start(10000L); Scanner scanner = new Scanner(System.in); while (true) { runRule(kContainer); System.out .println("Press enter in order to run the test again...."); scanner.nextLine(); } } private static void runRule(KieContainer kieKontainer) { StatelessKieSession kSession = kieKontainer .newStatelessKieSession("my-session"); Employee employee = new Employee("John", "Smith", 30); kSession.setGlobal("out", System.out); kSession.execute(employee); } } I'm running the program with this command line: mvn -gs ./settings.xml exec:java -Dexec.mainClass="TestMyModel" -Dkie.maven.settings.custom=D:/Projects/Java/Drools/my-mod el-test/settings.xml Everything is ok when the program starts, the rules artifact is loaded from the KIE WB and successfully executed. However if I change the rules in the Guvnor, build and deploy the change is not visible. I must stop the program, delete the my-rules artifact and restart the program after that. Any idea? -- View this message in context: http://drools.46999.n3.nabble.com/KIE-Internal-M2-Repository-Access-Denied-tp4027058p4027067.html Sent from the Drools: User forum mailing list archive at Nabble.com. From mario.fusco at gmail.com Tue Dec 3 09:30:18 2013 From: mario.fusco at gmail.com (Mario Fusco) Date: Tue, 3 Dec 2013 06:30:18 -0800 (PST) Subject: [rules-users] KIE Internal M2 Repository Access Denied In-Reply-To: <1386076165985-4027067.post@n3.nabble.com> References: <1386058938108-4027058.post@n3.nabble.com> <1386076165985-4027067.post@n3.nabble.com> Message-ID: <1386081018511-4027068.post@n3.nabble.com> Hi, the problem with the last code you pasted is that you're passing to the KieContainer a ReleaseId with a fixed non-snapshot version. Version 1.0.0 can be installed only once in a maven repository so the KieScanner assumes there's no need to do a further scan. To overcome this problem you should use a SNAPSHOT version like in: KieContainer kContainer = ks.newKieContainer(ks.newReleaseId( "com.masterit.labs", "my-rules", "1.0.0-SNAPSHOT")); I also made it possible to pass range versions to the KieContainer like in: KieContainer kContainer = ks.newKieContainer(ks.newReleaseId( "com.masterit.labs", "my-rules", "[1.0.0,)")); but unfortunately I didn't developed this improvement fast enough to have it included in the final release. It will be part of the next minor release, but of course in order to use this you will have to increase the version number of your project before to deploy the new kjar. I hope this helps, Mario -- View this message in context: http://drools.46999.n3.nabble.com/KIE-Internal-M2-Repository-Access-Denied-tp4027058p4027068.html Sent from the Drools: User forum mailing list archive at Nabble.com. From ters at ukr.net Tue Dec 3 10:44:20 2013 From: ters at ukr.net (ters) Date: Tue, 3 Dec 2013 07:44:20 -0800 (PST) Subject: [rules-users] CEP accumulate unclear behavior Message-ID: <1386085460355-4027069.post@n3.nabble.com> Hi all. Respected experts of drools, please help me to understand how pattern + accumulate behave. I believe that an example is the best way to explain the problem, maybe it will look bulky, but suppose be enough. I use CEP and EventProcessingOption.Stream. Event class: /public class ServicePerformanceEvent { private String serviceName; private Integer duration; public ServicePerformanceEvent(String name, Integer duration) { serviceName = name; this.duration = duration; } }/ There are 2 tests, 1st - with fireAllRules invocation, 2nd - with firwUntilHalt invocation. / @Test public void *test1_FireAllRules() *throws RuleGeneratorException { System.out.println("-= 1 =-"); ksession.insert(new ServicePerformanceEvent("MyService", 2)); ksession.fireAllRules(); System.out.println("-= 2 =-"); ksession.insert(new ServicePerformanceEvent("AnotherService", 10)); ksession.fireAllRules(); System.out.println("-= 3 =-"); ksession.insert(new ServicePerformanceEvent("MyService", 12)); ksession.fireAllRules(); System.out.println("---test1 end---"); } @Test public void *test2_FireUntilHalt()* throws RuleGeneratorException, InterruptedException { System.out.println("-= 1 =-"); ksession.insert(new ServicePerformanceEvent("MyService", 2)); runFireUntilHaltThread(); Thread.sleep(1000); System.out.println("-= 2 =-"); ksession.insert(new ServicePerformanceEvent("AnotherService", 10)); Thread.sleep(1000); System.out.println("-= 3 =-"); ksession.insert(new ServicePerformanceEvent("MyService", 12)); Thread.sleep(1000); System.out.println("---test2 end---"); }/ There are 3 simple rules for which I performing tests: *////First Rule:* declare com.test.event.ServicePerformanceEvent @role( event ) end rule "ServicePerformanceEvent test rule1" dialect "mvel" when $event : ServicePerformanceEvent(serviceName == "MyService"); then System.out.println("$event.duration = " + $event.duration); System.out.println("----------FIRED----------"); end Invocation results of the test1_FireAllRules() and test2_FireUntilHalt() the same: -= 1 =- $event.duration = 2 ----------FIRED---------- -= 2 =- -= 3 =- $event.duration = 12 ----------FIRED---------- ---test end--- Actual: As expected rule fires for each new inserted event with desired serviceName "MyService" (- behavior is clear). *////Second rule:* rule "ServicePerformanceEvent test rule2" dialect "mvel" when accumulate(ServicePerformanceEvent(serviceName == "MyService", $thisDuration : duration); $avg : average($thisDuration)); then System.out.println("$events avg duration = " + $avg); System.out.println("----------FIRED----------"); end Invocation results of the test1_FireAllRules() and the test2_FireUntilHalt() the same again: -= 1 =- $events avg duration = 2.0 ----------FIRED---------- -= 2 =- -= 3 =- $events avg duration = 7.0 ----------FIRED---------- ---test end--- Actual: Now rule accumulates average only for events from working memory with desired serviceName (-this is clear) but fires only for inserted events with expected serviceName "MyService" (- not clear) *My expectation*: rule must fire for each currently inserted event and average must be calculated for all events from working memory with serviceName=="MyService". *////Third rule:* /rule "ServicePerformanceEvent test rule3" dialect "mvel" when $event : ServicePerformanceEvent(serviceName == "MyService"); accumulate(ServicePerformanceEvent(serviceName == "MyService", $thisDuration : duration); $avg : average($thisDuration)); then System.out.println("$event.duration = " + $event.duration); System.out.println("$events avg duration = " + $avg); System.out.println("----------FIRED----------"); end/ Invocation results of the test1_FireAllRules(): -= 1 =- $events avg duration = 2.0 ----------FIRED---------- -= 2 =- -= 3 =- $events avg duration = 7.0 ----------FIRED---------- $events avg duration = 7.0 ----------FIRED---------- ---test1 end--- Actual: In case -=3=- rule fires for each event into working memory during average calculation (- not clear) *My expectation*: firing rule only for current/last inserted event and calculation average for all events into working memory considering sevriceName=="MyService". Invocation results of the test2_FireUntilHalt(): -= 1 =- $events avg duration = 2.0 ----------FIRED---------- -= 2 =- -= 3 =- $events avg duration = 2.0 ----------FIRED---------- $events avg duration = 7.0 ----------FIRED---------- $events avg duration = 7.0 ----------FIRED---------- ---test2 end--- OR (with another sleep time) -= 1 =- $events avg duration = 2.0 ----------FIRED---------- -= 2 =- -= 3 =- $events avg duration = 7.0 ----------FIRED---------- $events avg duration = 7.0 ----------FIRED---------- $events avg duration = 7.0 ----------FIRED---------- ---test2 end--- This results I can't explain and understand. Could anyone help me to understand this pattern + accumulate behavior. I spent a lot of time on my actual project task but with no result . *The actual task is*: Rule must fire for last inserted event if its serviceName equals to "MyService" and its duration greater than average duration of all events with same serviceName from the working memory. On the project we use fireUntilHalt strategy. I really hope and appreciate any help. Thanks in advance. -- View this message in context: http://drools.46999.n3.nabble.com/CEP-accumulate-unclear-behavior-tp4027069.html Sent from the Drools: User forum mailing list archive at Nabble.com. From mproctor at codehaus.org Tue Dec 3 10:59:48 2013 From: mproctor at codehaus.org (Mark Proctor) Date: Tue, 3 Dec 2013 15:59:48 +0000 Subject: [rules-users] KIE Internal M2 Repository Access Denied In-Reply-To: <1386081018511-4027068.post@n3.nabble.com> References: <1386058938108-4027058.post@n3.nabble.com> <1386076165985-4027067.post@n3.nabble.com> <1386081018511-4027068.post@n3.nabble.com> Message-ID: You can work around this now by having a wrapper project. All to does is have a single maven dependency on the target project, and in that you specify your maven version ranges. Mark On 3 Dec 2013, at 14:30, Mario Fusco wrote: > Hi, > > the problem with the last code you pasted is that you're passing to the > KieContainer a ReleaseId with a fixed non-snapshot version. Version 1.0.0 > can be installed only once in a maven repository so the KieScanner assumes > there's no need to do a further scan. To overcome this problem you should > use a SNAPSHOT version like in: > > KieContainer kContainer = > ks.newKieContainer(ks.newReleaseId( > "com.masterit.labs", "my-rules", > "1.0.0-SNAPSHOT")); > > I also made it possible to pass range versions to the KieContainer like in: > > KieContainer kContainer = > ks.newKieContainer(ks.newReleaseId( > "com.masterit.labs", "my-rules", > "[1.0.0,)")); > > but unfortunately I didn't developed this improvement fast enough to have it > included in the final release. It will be part of the next minor release, > but of course in order to use this you will have to increase the version > number of your project before to deploy the new kjar. > > I hope this helps, > Mario > > > > > > -- > View this message in context: http://drools.46999.n3.nabble.com/KIE-Internal-M2-Repository-Access-Denied-tp4027058p4027068.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 ters at ukr.net Tue Dec 3 11:20:01 2013 From: ters at ukr.net (ters) Date: Tue, 3 Dec 2013 08:20:01 -0800 (PST) Subject: [rules-users] CEP accumulate unclear behavior In-Reply-To: <1386085460355-4027069.post@n3.nabble.com> References: <1386085460355-4027069.post@n3.nabble.com> Message-ID: <1386087601137-4027072.post@n3.nabble.com> Forgot to mention, I use drools version 5.0.4 Final. -- View this message in context: http://drools.46999.n3.nabble.com/CEP-accumulate-unclear-behavior-tp4027069p4027072.html Sent from the Drools: User forum mailing list archive at Nabble.com. From alexis.brouard at haulogy.net Tue Dec 3 11:52:42 2013 From: alexis.brouard at haulogy.net (abr) Date: Tue, 3 Dec 2013 08:52:42 -0800 (PST) Subject: [rules-users] How to declare custom accumulators in kmodule.xml? Message-ID: <1386089562028-4027073.post@n3.nabble.com> Hello everyone, I tried to move from Drools 5.5.0.Final to 6.0.0.Final and I've some issues with moving from declaring kbase in Spring to the new kmodule.xml. My main concern for the moment is about custom accumulators. In the 5.5.0.Final Spring config, I had something like : [...] [...] I've thoroughly read the 6.0.0.Final documentation and the kie-spring-6.0.0.xsd (found here: https://github.com/droolsjbpm/droolsjbpm-integration/blob/master/kie-spring/src/main/resources/org/kie/spring/kie-spring-6.0.0.xsd) but I haven't find a way to declare custom accumulators. I also tested my luck by changing all "drools:" by "kie:" but with no success. Would you point me to a working example of declaring custom accumulators in 6.0.0.Final? Thanks in advance. -- View this message in context: http://drools.46999.n3.nabble.com/How-to-declare-custom-accumulators-in-kmodule-xml-tp4027073.html Sent from the Drools: User forum mailing list archive at Nabble.com. From sterjevm at mt.net.mk Tue Dec 3 12:09:59 2013 From: sterjevm at mt.net.mk (marjan.sterjev) Date: Tue, 3 Dec 2013 09:09:59 -0800 (PST) Subject: [rules-users] KIE Internal M2 Repository Access Denied In-Reply-To: References: <1386058938108-4027058.post@n3.nabble.com> <1386076165985-4027067.post@n3.nabble.com> <1386081018511-4027068.post@n3.nabble.com> Message-ID: <1386090599930-4027074.post@n3.nabble.com> KieScanner behaves the same with SNAPSHOT versions. Maybe I'm doing something wrong.... -- View this message in context: http://drools.46999.n3.nabble.com/KIE-Internal-M2-Repository-Access-Denied-tp4027058p4027074.html Sent from the Drools: User forum mailing list archive at Nabble.com. From ed.tirelli at gmail.com Tue Dec 3 12:43:34 2013 From: ed.tirelli at gmail.com (Edson Tirelli) Date: Tue, 3 Dec 2013 12:43:34 -0500 Subject: [rules-users] How to declare custom accumulators in kmodule.xml? In-Reply-To: <1386089562028-4027073.post@n3.nabble.com> References: <1386089562028-4027073.post@n3.nabble.com> Message-ID: Alexis, This was not exposed in the kmodule and we are discussing the best way to do it. Ideally, we want to reduce in 6 the complexities of configuration we had in 5, and for accumulate functions, we are thinking the best would be to simply support them in imports in the DRL file. So, for instance, to use a function foo() in a rule, one would do (pseudo code for now): import function org.bar.FooFunction.foo; Or a similar construct. Happy to hear your thoughts about this compared to a module/system wide configuration like we had in 5. We will do this over the next few days. Having said that, for those already using accumulate functions and migrating to Drools 6, the work around until we get this in place is to use the "old" way, adding a configuration file to the META-INF directory: META-INF/drools.packagebuilder.conf And setting the custom functions in there as properties (e.g.): drools.accumulate.function.foo = org.bar.FooFunction .. We will get this sorted out in the next few days, if anyone wants to contribute their thoughts, it is welcomed. Edson On Tue, Dec 3, 2013 at 11:52 AM, abr wrote: > Hello everyone, > > I tried to move from Drools 5.5.0.Final to 6.0.0.Final and I've some issues > with moving from declaring kbase in Spring to the new kmodule.xml. > > My main concern for the moment is about custom accumulators. > In the 5.5.0.Final Spring config, I had something like : > > class="my.namespace.rules.accumulators.MyCustomAccumulator" > /> > > > > [...] > > > > > > [...] > > > > > > I've thoroughly read the 6.0.0.Final documentation and the > kie-spring-6.0.0.xsd (found here: > > https://github.com/droolsjbpm/droolsjbpm-integration/blob/master/kie-spring/src/main/resources/org/kie/spring/kie-spring-6.0.0.xsd > ) > but I haven't find a way to declare custom accumulators. > > I also tested my luck by changing all "drools:" by "kie:" but with no > success. > > Would you point me to a working example of declaring custom accumulators in > 6.0.0.Final? > > Thanks in advance. > > > > > -- > View this message in context: > http://drools.46999.n3.nabble.com/How-to-declare-custom-accumulators-in-kmodule-xml-tp4027073.html > Sent from the Drools: User forum mailing list archive at Nabble.com. > _______________________________________________ > rules-users mailing list > rules-users at lists.jboss.org > https://lists.jboss.org/mailman/listinfo/rules-users > -- Edson Tirelli Principal Software Engineer Red Hat Business Systems and Intelligence Group -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.jboss.org/pipermail/rules-users/attachments/20131203/a69c8a1f/attachment-0001.html From h.olfa.h at gmail.com Tue Dec 3 13:13:48 2013 From: h.olfa.h at gmail.com (olfa) Date: Tue, 3 Dec 2013 10:13:48 -0800 (PST) Subject: [rules-users] Connectons-nous sur LinkedIn Message-ID: <1886701374.72077070.1386094390302.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 ? la recherche d'un poste Phd Tunisie Veuillez confirmer que vous connaissez Olfa Harrouchi?: https://www.linkedin.com/e/-hjwooc-horgt8fy-4k/isd/18462569282/dDIpaL9R/?hs=false&tok=2O0DTaqkG5w601 -- Vous recevez des invitations ? vous connecter par e-mail. Cliquez ici si vous ne souhaitez plus recevoir ces e-mails?: http://www.linkedin.com/e/-hjwooc-horgt8fy-4k/XDN0h_23Fvj-JzsKS9iUQfZPDmJsQaxMS9fTDxpTBmeB1TDiADNagn4oyO/goo/ml-node%2Bs46999n3717731h88%40n3%2Enabble%2Ecom/20061/I6038173493_1/?hs=false&tok=1ESLj9nx25w601 (c) 2012 LinkedIn Corporation. 2029 Stierlin Ct, Mountain View, CA 94043, USA. -- View this message in context: http://drools.46999.n3.nabble.com/Connectons-nous-sur-LinkedIn-tp4027076.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/20131203/e82b00e5/attachment.html From h.olfa.h at gmail.com Tue Dec 3 13:13:49 2013 From: h.olfa.h at gmail.com (olfa) Date: Tue, 3 Dec 2013 10:13:49 -0800 (PST) Subject: [rules-users] Connectons-nous sur LinkedIn Message-ID: <429725438.35358281.1386094390449.JavaMail.app@ela4-app4299.prod> LinkedIn ------------ Davide, J'aimerais vous inviter ? rejoindre mon r?seau professionnel en ligne, sur le site LinkedIn. Olfa Olfa Harrouchi Jeune chercheuse ? la recherche d'un poste Phd Tunisie Veuillez confirmer que vous connaissez Olfa Harrouchi?: https://www.linkedin.com/e/q6k01m-horgt8ka-4d/isd/18462569313/rGtNFEqD/?hs=false&tok=0WOv2ke1y5w601 -- Vous recevez des invitations ? vous connecter par e-mail. Cliquez ici si vous ne souhaitez plus recevoir ces e-mails?: http://www.linkedin.com/e/q6k01m-horgt8ka-4d/qhXOH69RZIlA6Iq7kAVN8kDc5rRPStI6kAOgKhfdewBa7pmZshXl1-W6pw/goo/ml-node%2Bs46999n3719065h42%40n3%2Enabble%2Ecom/20061/I6038173504_1/?hs=false&tok=0u4GJAAhO5w601 (c) 2012 LinkedIn Corporation. 2029 Stierlin Ct, Mountain View, CA 94043, USA. -- View this message in context: http://drools.46999.n3.nabble.com/Connectons-nous-sur-LinkedIn-tp4027077.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/20131203/737b8e12/attachment.html From ed.tirelli at gmail.com Tue Dec 3 13:59:55 2013 From: ed.tirelli at gmail.com (Edson Tirelli) Date: Tue, 3 Dec 2013 13:59:55 -0500 Subject: [rules-users] drools 6 equivalent of addKnowledgePackages In-Reply-To: <1386059102870-4027059.post@n3.nabble.com> References: <1386005900764-4027044.post@n3.nabble.com> <0257AF0D-55E7-4C4D-996E-F1280C80E55B@codehaus.org> <1386059102870-4027059.post@n3.nabble.com> Message-ID: There are several different ways of doing it, but here is a snippet to help creating an in-memory kjar with default kbases and ksessions: public static byte[] createKJar(KieServices ks, ReleaseId releaseId, String pom, String... drls) { KieFileSystem kfs = ks.newKieFileSystem(); if( pom != null ) { kfs.write("pom.xml", pom); } else { kfs.generateAndWritePomXML(releaseId); } KieResources kr = KieServices.getResources(); for (int i = 0; i < drls.length; i++) { if (drls[i] != null) { kfs.write( kr.newByteArrayResource( drls[i].getBytes() ).setSourcePath("my/pkg/drl"+i+".drl") ); } } KieBuilder kb = ks.newKieBuilder(kfs).buildAll(); if( kb.getResults().hasMessages( org.kie.api.builder.Message.Level.ERROR ) ) { for( org.kie.api.builder.Message result : kb.getResults().getMessages() ) { System.out.println(result.getText()); } return null; } InternalKieModule kieModule = (InternalKieModule) ks.getRepository() .getKieModule(releaseId); byte[] jar = kieModule.getBytes(); return jar; } Please note that you usually don't need the byte[] back, so you can ignore everything after the last 3 lines of the code. Also, the error check in the snippet is just printing to sysout. You should handle this accordingly in your application. Hope it helps. Edson On Tue, Dec 3, 2013 at 3:25 AM, pmander wrote: > I head previously read that but didn't spot the bit that mentions creating > from a drl defined as a String. I take it this can be done from > KieFileSystem. > > String rules = ... > KieFileSystem kfs = kieServices.newKieFileSystem(); > kfs.write(kieServices.getResources().newReaderResource(new > StringReader(rules))); > > This throws an exception complaining that the resource doesn't have a > source > or target path set. > > Is there a way to push a dynamically created drl into this without writing > it to disk first? > > > > -- > View this message in context: > http://drools.46999.n3.nabble.com/drools-6-equivalent-of-addKnowledgePackages-tp4027044p4027059.html > Sent from the Drools: User forum mailing list archive at Nabble.com. > _______________________________________________ > rules-users mailing list > rules-users at lists.jboss.org > https://lists.jboss.org/mailman/listinfo/rules-users > -- Edson Tirelli Principal Software Engineer Red Hat Business Systems and Intelligence Group -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.jboss.org/pipermail/rules-users/attachments/20131203/a96bef97/attachment-0001.html From ray.hooker at gmail.com Tue Dec 3 14:17:40 2013 From: ray.hooker at gmail.com (Ray Hooker) Date: Tue, 3 Dec 2013 11:17:40 -0800 (PST) Subject: [rules-users] JRuby Objects as Drools Facts Message-ID: <1386098260788-4027079.post@n3.nabble.com> I have seen where one group in India claimed to be able to inserts JRuby objects as facts to Drools. I am very open to suggestions. The JRuby objects appear to Java to be class RubyObject. When I insert say a JRuby class named "Message", here is the message: [ObjectInsertedEventImpl: getFactHandle()=[fact 0:1:341074620:341074620:1:DEFAULT:NON_TRAIT:#], getObject()=#, getKnowledgeRuntime()=org.drools.core.impl.StatefulKnowledgeSessionImpl at 4cb91eff, getPropagationContext()=PhreakPropagationContext [entryPoint=EntryPoint::DEFAULT, factHandle=[fact 0:1:341074620:341074620:1:DEFAULT:NON_TRAIT:#], leftTuple=null, originOffset=-1, propagationNumber=2, rule=null, type=0]] On the other hand if I insert a Java class in the same way, it is seen as: ==>[ObjectInsertedEventImpl: getFactHandle()=[fact 0:1:1319007734:1319007734:1:DEFAULT:NON_TRAIT:com.antelopesoftware.drools.Message at 4e9e75f6], getObject()=com.antelopesoftware.drools.Message at 4e9e75f6, getKnowledgeRuntime()=org.drools.core.impl.StatefulKnowledgeSessionImpl at 139ba1d8, getPropagationContext()=PhreakPropagationContext [entryPoint=EntryPoint::DEFAULT, factHandle=[fact 0:1:1319007734:1319007734:1:DEFAULT:NON_TRAIT:com.antelopesoftware.drools.Message at 4e9e75f6], leftTuple=null, originOffset=-1, propagationNumber=2, rule=null, type=0]] So how can I get the Drools engine to recognize the fact. BTW my real application is read from a MongoDB database using Mongoid and insert the data into Drools. I wrote wrapper Java classes to make it easier. Thanks in advance, Ray -- View this message in context: http://drools.46999.n3.nabble.com/JRuby-Objects-as-Drools-Facts-tp4027079.html Sent from the Drools: User forum mailing list archive at Nabble.com. From jordan.brown at rackspace.com Tue Dec 3 17:26:49 2013 From: jordan.brown at rackspace.com (Jordan Brown) Date: Tue, 3 Dec 2013 22:26:49 +0000 Subject: [rules-users] drools-camel-server source code? (Drools 6) Message-ID: <285C6E59F97A9B45B8757E7F6E60DA1C221A0774@ORD1EXD03.RACKSPACE.CORP> Hi, I found the WAR file (or at least one called drools-camel-server-example-6.0.0.Final.war which has example, so I am not completely sure that's it), but I was hoping to get my hands on the source code behind the Drools Camel Server. We would like to incorporate the rules created in Drools 6 Guvnor/Workbench into the knowledge base of the drools camel server. I know Phone: (x)501-5371, (c)210-289-1702 -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.jboss.org/pipermail/rules-users/attachments/20131203/6097f386/attachment.html -------------- next part -------------- A non-text attachment was scrubbed... Name: image001.jpg Type: image/jpeg Size: 11233 bytes Desc: image001.jpg Url : http://lists.jboss.org/pipermail/rules-users/attachments/20131203/6097f386/attachment.jpg From mproctor at codehaus.org Tue Dec 3 20:19:41 2013 From: mproctor at codehaus.org (Mark Proctor) Date: Wed, 4 Dec 2013 01:19:41 +0000 Subject: [rules-users] drools-camel-server source code? (Drools 6) In-Reply-To: <285C6E59F97A9B45B8757E7F6E60DA1C221A0774@ORD1EXD03.RACKSPACE.CORP> References: <285C6E59F97A9B45B8757E7F6E60DA1C221A0774@ORD1EXD03.RACKSPACE.CORP> Message-ID: <49785C0E-5869-4A1C-B1ED-DA326BD5E9C1@codehaus.org> see kie-camel: https://github.com/droolsjbpm/droolsjbpm-integration/tree/master/kie-camel Take a look at the KIE docs, on how to build jars. everything is mavenized now. Lots of examples http://docs.jboss.org/drools/release/6.0.0.Final/drools-docs/html/KIEChapter.html Example war: https://github.com/droolsjbpm/droolsjbpm-integration/tree/master/drools-camel-server-example kmodule definition using spring: https://github.com/droolsjbpm/droolsjbpm-integration/blob/master/drools-camel-server-example/src/main/resources/knowledge-services.xml camel integration: https://github.com/droolsjbpm/droolsjbpm-integration/blob/master/drools-camel-server-example/src/main/resources/camel-server.xml Mark On 3 Dec 2013, at 22:26, Jordan Brown wrote: > Hi, > > I found the WAR file (or at least one called drools-camel-server-example-6.0.0.Final.war which has example, so I am not completely sure that?s it), but I was hoping to get my hands on the source code behind the Drools Camel Server. We would like to incorporate the rules created in Drools 6 Guvnor/Workbench into the knowledge base of the drools camel server. I know > For more background, our current environment is sending messages through Glassfish JMS queue and a custom interface to translate those messages into which Drools 5.x understands. Now, we?re R&D using RabbitMQ, drools camel server, and Drools 6 Workbench for a more enterprise/scalable solution, especially concerning the message system (want to get away from Glassfish and use RabbitMQ). At this point, we?ve created a test rule in Drools 6 Workbench, but we want to try and fire that rule using drools camel server. > > I see in the documentation information concerning the Apache Camel Integration, but it?s only the WAR file (with a specific test rule/DRL already in place that is being fired). I would like to take a look at the source code, but I don?t see where it?s available. > > Best Regards, > Jordan Brown > > > > View our EBI Team Wiki at: https://one.rackspace.com/display/EBI/Enterprise+Business+Intelligence+Home > Need something from EBI? Email us at: RackerBl_Team at rackspace.com > Phone: (x)501-5371, (c)210-289-1702 > > _______________________________________________ > 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/20131204/5b60c302/attachment-0001.html From wolfgang.laun at gmail.com Wed Dec 4 00:27:49 2013 From: wolfgang.laun at gmail.com (Wolfgang Laun) Date: Wed, 4 Dec 2013 06:27:49 +0100 Subject: [rules-users] CEP accumulate unclear behavior In-Reply-To: <1386085460355-4027069.post@n3.nabble.com> References: <1386085460355-4027069.post@n3.nabble.com> Message-ID: As to the second test, what you observe is correct. All hell would break loose in most KBs if rules *not* referring to a certain fact would fire when such a fact is inserted! But you can easily achieve what you want by adding the pattern ServicePerformanceEvent() in front of the accumulate CE. The result of the third rule and test looks like a bug to me. There's no version 5.0.4. Are you using 5.4.0? Can you try with a later version? -W On 03/12/2013, ters wrote: > Hi all. Respected experts of drools, please help me to understand how > pattern > + accumulate behave. > I believe that an example is the best way to explain the problem, maybe it > will look bulky, but suppose be enough. > I use CEP and EventProcessingOption.Stream. > > Event class: > /public class ServicePerformanceEvent { > private String serviceName; > private Integer duration; > public ServicePerformanceEvent(String name, Integer duration) { > serviceName = name; > this.duration = duration; > } > }/ > > There are 2 tests, 1st - with fireAllRules invocation, 2nd - with > firwUntilHalt invocation. > / @Test > public void *test1_FireAllRules() *throws RuleGeneratorException { > System.out.println("-= 1 =-"); > ksession.insert(new ServicePerformanceEvent("MyService", 2)); > ksession.fireAllRules(); > > System.out.println("-= 2 =-"); > ksession.insert(new ServicePerformanceEvent("AnotherService", 10)); > ksession.fireAllRules(); > > System.out.println("-= 3 =-"); > ksession.insert(new ServicePerformanceEvent("MyService", 12)); > ksession.fireAllRules(); > System.out.println("---test1 end---"); > } > @Test > public void *test2_FireUntilHalt()* throws RuleGeneratorException, > InterruptedException { > System.out.println("-= 1 =-"); > ksession.insert(new ServicePerformanceEvent("MyService", 2)); > > runFireUntilHaltThread(); > Thread.sleep(1000); > > System.out.println("-= 2 =-"); > ksession.insert(new ServicePerformanceEvent("AnotherService", 10)); > Thread.sleep(1000); > > System.out.println("-= 3 =-"); > ksession.insert(new ServicePerformanceEvent("MyService", 12)); > Thread.sleep(1000); > System.out.println("---test2 end---"); > }/ > > > There are 3 simple rules for which I performing tests: > > *////First Rule:* > declare com.test.event.ServicePerformanceEvent > @role( event ) > end > rule "ServicePerformanceEvent test rule1" > dialect "mvel" > when > $event : ServicePerformanceEvent(serviceName == "MyService"); > then > System.out.println("$event.duration = " + $event.duration); > System.out.println("----------FIRED----------"); > end > > Invocation results of the test1_FireAllRules() and test2_FireUntilHalt() > the > same: > -= 1 =- > $event.duration = 2 > ----------FIRED---------- > -= 2 =- > -= 3 =- > $event.duration = 12 > ----------FIRED---------- > ---test end--- > > Actual: As expected rule fires for each new inserted event with desired > serviceName "MyService" (- behavior is clear). > > *////Second rule:* > rule "ServicePerformanceEvent test rule2" > dialect "mvel" > when > accumulate(ServicePerformanceEvent(serviceName == "MyService", > $thisDuration : duration); $avg : average($thisDuration)); > then > System.out.println("$events avg duration = " + $avg); > System.out.println("----------FIRED----------"); > end > > Invocation results of the test1_FireAllRules() and the > test2_FireUntilHalt() > the same again: > -= 1 =- > $events avg duration = 2.0 > ----------FIRED---------- > -= 2 =- > -= 3 =- > $events avg duration = 7.0 > ----------FIRED---------- > ---test end--- > > Actual: Now rule accumulates average only for events from working memory > with desired serviceName (-this is clear) but fires only for inserted > events > with expected serviceName "MyService" (- not clear) > *My expectation*: rule must fire for each currently inserted event and > average must be calculated for all events from working memory with > serviceName=="MyService". > > *////Third rule:* > /rule "ServicePerformanceEvent test rule3" > dialect "mvel" > when > $event : ServicePerformanceEvent(serviceName == "MyService"); > accumulate(ServicePerformanceEvent(serviceName == > "MyService", $thisDuration : duration); > $avg : average($thisDuration)); > then > System.out.println("$event.duration = " + $event.duration); > System.out.println("$events avg duration = " + $avg); > System.out.println("----------FIRED----------"); > end/ > > Invocation results of the test1_FireAllRules(): > -= 1 =- > $events avg duration = 2.0 > ----------FIRED---------- > -= 2 =- > -= 3 =- > $events avg duration = 7.0 > ----------FIRED---------- > $events avg duration = 7.0 > ----------FIRED---------- > ---test1 end--- > > Actual: In case -=3=- rule fires for each event into working memory during > average calculation (- not clear) > *My expectation*: firing rule only for current/last inserted event and > calculation average for all events into working memory considering > sevriceName=="MyService". > > Invocation results of the test2_FireUntilHalt(): > -= 1 =- > $events avg duration = 2.0 > ----------FIRED---------- > -= 2 =- > -= 3 =- > $events avg duration = 2.0 > ----------FIRED---------- > $events avg duration = 7.0 > ----------FIRED---------- > $events avg duration = 7.0 > ----------FIRED---------- > ---test2 end--- > > OR (with another sleep time) > -= 1 =- > $events avg duration = 2.0 > ----------FIRED---------- > -= 2 =- > -= 3 =- > $events avg duration = 7.0 > ----------FIRED---------- > $events avg duration = 7.0 > ----------FIRED---------- > $events avg duration = 7.0 > ----------FIRED---------- > ---test2 end--- > > This results I can't explain and understand. > Could anyone help me to understand this pattern + accumulate behavior. > > I spent a lot of time on my actual project task but with no result . > *The actual task is*: > Rule must fire for last inserted event if its serviceName equals to > "MyService" and > its duration greater than average duration of all events with same > serviceName from the working memory. > On the project we use fireUntilHalt strategy. > I really hope and appreciate any help. Thanks in advance. > > > > > > > -- > View this message in context: > http://drools.46999.n3.nabble.com/CEP-accumulate-unclear-behavior-tp4027069.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 nick.snels at ocmwturnhout.be Wed Dec 4 05:57:37 2013 From: nick.snels at ocmwturnhout.be (ns) Date: Wed, 4 Dec 2013 02:57:37 -0800 (PST) Subject: [rules-users] How to do continuous planning in Optaplanner Message-ID: <1386154657280-4027084.post@n3.nabble.com> Hi, I am working on a employee roster planning problem in Optaplanner. I am wondering how to do continuous planning. Do I load in historical data, before I start the planning? How do I make sure that already planned shifts in the near future do not get changed if it is not necessary? Kind regards, Nick -- View this message in context: http://drools.46999.n3.nabble.com/How-to-do-continuous-planning-in-Optaplanner-tp4027084.html Sent from the Drools: User forum mailing list archive at Nabble.com. From stephen.masters at me.com Wed Dec 4 06:59:39 2013 From: stephen.masters at me.com (Stephen Masters) Date: Wed, 04 Dec 2013 11:59:39 +0000 Subject: [rules-users] Stateless session commands and ExecutionResults (5.5.0.Final) Message-ID: Hi folks, Can anyone explain how stateless session execution results should work? Working through the docs and tracing the code, it?s getting a bit confusing. Firstly, according to the user manual, one should be able to insert a list of facts as a Command, and get an instance of ExecutionResults back, which can then be queried. Here?s the example code: StatelessKnowledgeSession ksession = kbase.newStatelessKnowledgeSession(); Command cmd = CommandFactory.newInsertElements( Arrays.asList( Object[] { new Cheese( "stilton" ), new Cheese( "brie" ), new Cheese( "cheddar" ), }); ExecutionResults bresults = ksession.execute( cmd ); That doesn?t compile, so I fixed it as follows: Command cmd = CommandFactory.newInsertElements( Arrays.asList( new Cheese( "stilton" ), new Cheese( "brie" ), new Cheese( "cheddar" ) )); ExecutionResults bresults = ksession.execute( cmd ); This does now compile, but running it throws a ClassCastException: java.lang.ClassCastException: java.util.ArrayList cannot be cast to org.drools.runtime.ExecutionResults Taking a look through the Drools code, it would appear that Command has a generic type, which in the case of an InsertElementsCommand is: GenericCommand> In turn, the execute command in StatelessKnowledgeSessionImpl casts its result to that generic type: public T execute(Command command) { Object o = ((GenericCommand) command).execute( context ); ... return (T) o; So the ClassCastException is because the execute method returns an ArrayList of FactHandle instead of an ExecutionResults. I?m assuming that I must have got the wrong end of the stick somewhere, so what should I be doing to get an ExecutionResults from a stateless session, which I can then query? Cheers, Steve -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.jboss.org/pipermail/rules-users/attachments/20131204/6c2b30f2/attachment.html From wolfgang.laun at gmail.com Wed Dec 4 07:24:15 2013 From: wolfgang.laun at gmail.com (Wolfgang Laun) Date: Wed, 4 Dec 2013 13:24:15 +0100 Subject: [rules-users] Stateless session commands and ExecutionResults (5.5.0.Final) In-Reply-To: References: Message-ID: I think you have to put your insert command into a list List> cmds = new ArrayList(); and pass this via batch execution CommandFactory.newBatchExecution( cmds ) -W On 04/12/2013, Stephen Masters wrote: > Hi folks, > > Can anyone explain how stateless session execution results should work? > Working through the docs and tracing the code, it?s getting a bit > confusing. > > Firstly, according to the user manual, one should be able to insert a list > of facts as a Command, and get an instance of ExecutionResults back, which > can then be queried. Here?s the example code: > StatelessKnowledgeSession ksession = kbase.newStatelessKnowledgeSession(); > > Command cmd = CommandFactory.newInsertElements( Arrays.asList( Object[] { > > new Cheese( "stilton" ), > > new Cheese( "brie" ), > > new Cheese( "cheddar" ), > > }); > > ExecutionResults bresults = ksession.execute( cmd ); > > That doesn?t compile, so I fixed it as follows: > > Command cmd = CommandFactory.newInsertElements( Arrays.asList( > new Cheese( "stilton" ), > new Cheese( "brie" ), > new Cheese( "cheddar" ) > )); > ExecutionResults bresults = ksession.execute( cmd ); > > This does now compile, but running it throws a ClassCastException: > java.lang.ClassCastException: java.util.ArrayList cannot be cast to > org.drools.runtime.ExecutionResults > > Taking a look through the Drools code, it would appear that Command has a > generic type, which in the case of an InsertElementsCommand is: > GenericCommand> > > In turn, the execute command in StatelessKnowledgeSessionImpl casts its > result to that generic type: > public T execute(Command command) { > Object o = ((GenericCommand) command).execute( context ); > ... > return (T) o; > > So the ClassCastException is because the execute method returns an ArrayList > of FactHandle instead of an ExecutionResults. > > I?m assuming that I must have got the wrong end of the stick somewhere, so > what should I be doing to get an ExecutionResults from a stateless session, > which I can then query? > > Cheers, > > Steve From ters at ukr.net Wed Dec 4 09:58:52 2013 From: ters at ukr.net (ters) Date: Wed, 4 Dec 2013 06:58:52 -0800 (PST) Subject: [rules-users] CEP accumulate unclear behavior In-Reply-To: References: <1386085460355-4027069.post@n3.nabble.com> Message-ID: <1386169132529-4027088.post@n3.nabble.com> laune, thanks for fast reply! So from point to point: *-- "Are you using 5.4.0?"* Yes, I'm using 5.4.0.Final. *-- "But you can easily achieve what you want by adding the pattern ServicePerformanceEvent() in front of the accumulate CE."* I've tested this, LHS is: / ServicePerformanceEvent() accumulate(ServicePerformanceEvent(serviceName == "MyService", $thisDuration : duration); $avg : average($thisDuration));/ The result is: -= 1 =- $events avg duration = 2.0 ----------FIRED---------- -= 2 =- $events avg duration = 2.0 ----------FIRED---------- -= 3 =- $events avg duration = 7.0 ----------FIRED---------- $events avg duration = 7.0 ----------FIRED---------- $events avg duration = 7.0 ----------FIRED---------- ---test end--- Now (e.g. in case -3-) rule fires on all already inserted/processed events! but I expect (in case -3-) firing only for last inserting event which is not processed before, that is: -= 1 =- $events avg duration = 2.0 ----------FIRED---------- -= 2 =- $events avg duration = 2.0 ----------FIRED---------- /-= 3 =- $events avg duration = 7.0 ----------FIRED----------/ ---test end--- *--"Can you try with a later version?"* I've just tried with 6.0.0.Final version. Now result of Third rule becomes the same for both fireAllRules and fireUntilHalt tests (good point): /////Third rule: when $event : ServicePerformanceEvent(serviceName == "MyService"); accumulate(ServicePerformanceEvent(serviceName == "MyService", $thisDuration : duration); $avg : average($thisDuration)); then System.out.println("$event.duration = " + $event.duration); System.out.println("$events avg duration = " + $avg); System.out.println("----------FIRED----------"); end / Result: -= 1 =- $event.duration = 2 $events avg duration = 2.0 ----------FIRED---------- -= 2 =- -= 3 =- $event.duration = 2 $events avg duration = 7.0 ----------FIRED---------- $event.duration = 12 $events avg duration = 7.0 ----------FIRED---------- ---test end--- As can see, in case -3-, rule fires 2 times - on already inserted and processed as fact event with duration=2 and on the event with duration=12 which inserted just now and was not processed as fact before. Actually what I want in this case - the rule should fire only on events restricted with serviceName constraint, /*which are not processed as fact/not-fact before (inserted between fireAllRules() calls)*/, but average should be calculated for all existed in wm events considering serviceName constraint. I.e. my expectation for Third rule result is: / -= 1 =- $event.duration = 2 $events avg duration = 2.0 ----------FIRED---------- -= 2 =- *-= 3 =- $event.duration = 12 $events avg duration = 7.0* ----------FIRED---------- ---test end---/ How I can achieve this behavior??? -- View this message in context: http://drools.46999.n3.nabble.com/CEP-accumulate-unclear-behavior-tp4027069p4027088.html Sent from the Drools: User forum mailing list archive at Nabble.com. From wolfgang.laun at gmail.com Wed Dec 4 10:58:15 2013 From: wolfgang.laun at gmail.com (Wolfgang Laun) Date: Wed, 4 Dec 2013 16:58:15 +0100 Subject: [rules-users] CEP accumulate unclear behavior In-Reply-To: <1386169132529-4027088.post@n3.nabble.com> References: <1386085460355-4027069.post@n3.nabble.com> <1386169132529-4027088.post@n3.nabble.com> Message-ID: Hi ters, I've run a few tests and I think that you'll have to use an entirely different approach to achieve what you want. accumulate creates a "virtual object" maintaining the accumulated value(s). This is updated with every change to its domain, i.e., the set of matching facts. Thus, for every inserted "MyService" the rule will fire. (If you add some other pattern, then all matching products result in an activation. So my advice for seeing the average for every insert was wrong.) You could write your own accumulate function (using the init/action/result paradigm) where you accumulate over all ServicePerformanceEvent events but count and sum only the "MyService" events. Alternatively, use a fact of a class that contains a count and a sum and use this to collect the average: public class Accu { private String trigger; private int sum; private int count; public Accu( String t ){ trigger = t; } public String getTrigger(){ return trigger; } public int getAverage(){ return sum/count; } public void accumulate( int value ){ sum += value; count++; } } rule a when $event : Event( $source: source, $value: value) $accu: Accu( trigger == $source ) then $accu.accumulate( $value ); System.out.println("$events avg value = " + $accu.getAverage() ); end rule b when $event : Event( $source: source, $value: value) $accu: Accu( trigger != $source ) then System.out.println("$events avg value = " + $accu.getAverage() ); end Cheers -W On 04/12/2013, ters wrote: > laune, thanks for fast reply! So from point to point: > > *-- "Are you using 5.4.0?"* > Yes, I'm using 5.4.0.Final. > > *-- "But you can easily achieve what you want by adding the pattern > ServicePerformanceEvent() in front of the accumulate CE."* > I've tested this, LHS is: > / ServicePerformanceEvent() > accumulate(ServicePerformanceEvent(serviceName == "MyService", > $thisDuration > : duration); > $avg : average($thisDuration));/ > > The result is: > -= 1 =- > $events avg duration = 2.0 > ----------FIRED---------- > -= 2 =- > $events avg duration = 2.0 > ----------FIRED---------- > -= 3 =- > $events avg duration = 7.0 > ----------FIRED---------- > $events avg duration = 7.0 > ----------FIRED---------- > $events avg duration = 7.0 > ----------FIRED---------- > ---test end--- > > Now (e.g. in case -3-) rule fires on all already inserted/processed events! > but I expect (in case -3-) firing only for last inserting event which is > not > processed before, that is: > -= 1 =- > $events avg duration = 2.0 > ----------FIRED---------- > -= 2 =- > $events avg duration = 2.0 > ----------FIRED---------- > /-= 3 =- > $events avg duration = 7.0 > ----------FIRED----------/ > ---test end--- > > *--"Can you try with a later version?"* > I've just tried with 6.0.0.Final version. Now result of Third rule becomes > the same for both fireAllRules and fireUntilHalt tests (good point): > /////Third rule: > when > $event : ServicePerformanceEvent(serviceName == "MyService"); > accumulate(ServicePerformanceEvent(serviceName == "MyService", > $thisDuration : duration); $avg : average($thisDuration)); > then > System.out.println("$event.duration = " + $event.duration); > System.out.println("$events avg duration = " + $avg); > System.out.println("----------FIRED----------"); > end / > > Result: > -= 1 =- > $event.duration = 2 > $events avg duration = 2.0 > ----------FIRED---------- > -= 2 =- > -= 3 =- > $event.duration = 2 > $events avg duration = 7.0 > ----------FIRED---------- > $event.duration = 12 > $events avg duration = 7.0 > ----------FIRED---------- > ---test end--- > > As can see, in case -3-, rule fires 2 times - on already inserted and > processed as fact event with duration=2 and > on the event with duration=12 which inserted just now and was not processed > as fact before. > > Actually what I want in this case - the rule should fire only on events > restricted with serviceName constraint, /*which are not > processed as fact/not-fact before (inserted between fireAllRules() > calls)*/, > but average should be calculated for all existed in wm events considering > serviceName constraint. > I.e. my expectation for Third rule result is: > / -= 1 =- > $event.duration = 2 > $events avg duration = 2.0 > ----------FIRED---------- > -= 2 =- > *-= 3 =- > $event.duration = 12 > $events avg duration = 7.0* > ----------FIRED---------- > ---test end---/ > > How I can achieve this behavior??? > > > > > -- > View this message in context: > http://drools.46999.n3.nabble.com/CEP-accumulate-unclear-behavior-tp4027069p4027088.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 ters at ukr.net Wed Dec 4 12:21:14 2013 From: ters at ukr.net (ters) Date: Wed, 4 Dec 2013 09:21:14 -0800 (PST) Subject: [rules-users] CEP accumulate unclear behavior In-Reply-To: References: <1386085460355-4027069.post@n3.nabble.com> <1386169132529-4027088.post@n3.nabble.com> Message-ID: <1386177674817-4027090.post@n3.nabble.com> laune, thanks for explanations. Could you please provide me with links/examples of how to /write your own accumulate function (using the init/action/result paradigm) /, and how to use this custom function instead of standard one? Regards! -- View this message in context: http://drools.46999.n3.nabble.com/CEP-accumulate-unclear-behavior-tp4027069p4027090.html Sent from the Drools: User forum mailing list archive at Nabble.com. From clickthex at yahoo.com Wed Dec 4 12:39:46 2013 From: clickthex at yahoo.com (SrjTx) Date: Wed, 4 Dec 2013 09:39:46 -0800 (PST) Subject: [rules-users] Need Help with Enumerations and Classpath Message-ID: <1386178786060-4027091.post@n3.nabble.com> I am trying to create a enumeration that uses a class to populate it, per *16.10. Data enumerations (drop down list configurations)*. I have added the jar that contains my class to the drools repository and added it as a dependency to the project. When building a guided rule, that object can be selected and the editor will add import dbAccessProto.ListAccess; But, if I create an enumeration in the gui with Fact="a", field="b", and context = "(new dbAccessProto.ListAccess()).getListOfLists()" I get the error below. Is there some other place I need to put the jar flle or specify it? [Error: unable to resolve class: dbAccessProto.ListAccess from [Module "deployment.guvnor.war:main" from Service Module Loader]] [Near : {... [ 'a.b' : (new dbAccessProto.ListAccess()).ge ....}] ^ [Line: 1, Column: 16] source: 1. | 'a.b' : (new dbAccessProto.ListAccess()).getListOfLists() -- View this message in context: http://drools.46999.n3.nabble.com/Need-Help-with-Enumerations-and-Classpath-tp4027091.html Sent from the Drools: User forum mailing list archive at Nabble.com. From michael.anstis at gmail.com Wed Dec 4 13:41:13 2013 From: michael.anstis at gmail.com (Michael Anstis) Date: Wed, 4 Dec 2013 18:41:13 +0000 Subject: [rules-users] Need Help with Enumerations and Classpath In-Reply-To: <1386178786060-4027091.post@n3.nabble.com> References: <1386178786060-4027091.post@n3.nabble.com> Message-ID: I assume this is guvnor 5.5 (or lower)? You need to add the JAR with your helper class to your container's (AS7, Tomcat) /lib folder. On 4 December 2013 17:39, SrjTx wrote: > I am trying to create a enumeration that uses a class to populate it, per > *16.10. Data enumerations (drop down list configurations)*. > > I have added the jar that contains my class to the drools repository and > added it as a dependency to the project. > When building a guided rule, that object can be selected and the editor > will > add > import dbAccessProto.ListAccess; > > But, if I create an enumeration in the gui with Fact="a", field="b", and > context = "(new dbAccessProto.ListAccess()).getListOfLists()" > > I get the error below. > > Is there some other place I need to put the jar flle or specify it? > > [Error: unable to resolve class: dbAccessProto.ListAccess from [Module > "deployment.guvnor.war:main" from Service Module Loader]] [Near : {... [ > 'a.b' : (new dbAccessProto.ListAccess()).ge ....}] ^ [Line: 1, Column: 16] > > source: > 1. | 'a.b' : (new dbAccessProto.ListAccess()).getListOfLists() > > > > > > > -- > View this message in context: > http://drools.46999.n3.nabble.com/Need-Help-with-Enumerations-and-Classpath-tp4027091.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/20131204/6582b4f4/attachment.html From wolfgang.laun at gmail.com Wed Dec 4 14:08:40 2013 From: wolfgang.laun at gmail.com (Wolfgang Laun) Date: Wed, 4 Dec 2013 20:08:40 +0100 Subject: [rules-users] CEP accumulate unclear behavior In-Reply-To: <1386177674817-4027090.post@n3.nabble.com> References: <1386085460355-4027069.post@n3.nabble.com> <1386169132529-4027088.post@n3.nabble.com> <1386177674817-4027090.post@n3.nabble.com> Message-ID: On 04/12/2013, ters wrote: > laune, thanks for explanations. > > Could you please provide me with links/examples of how to /write your own > accumulate function (using the > init/action/result paradigm) /, and how to use this custom function instead > of standard one? rule manacc when Number( $avg: intValue ) from accumulate( Event( $source: source, $value: value), init( int sum = 0; int count = 0; ) action( if( "server1".equals( $source ) ){ sum += $value; count++; } ) result( count != 0 ? sum/count : 0 ) ) then System.out.println("$events avg value = " + $avg ); end You could add a reverse( if( "server1".equals( $source ) ){ sum -= $value; count--; }) Cheers Wolfgang > > Regards! > > > > -- > View this message in context: > http://drools.46999.n3.nabble.com/CEP-accumulate-unclear-behavior-tp4027069p4027090.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 Wed Dec 4 14:12:45 2013 From: clickthex at yahoo.com (SrjTx) Date: Wed, 4 Dec 2013 11:12:45 -0800 (PST) Subject: [rules-users] Need Help with Enumerations and Classpath In-Reply-To: References: <1386178786060-4027091.post@n3.nabble.com> Message-ID: <1386184365973-4027094.post@n3.nabble.com> 6.0.0 I guess I should have said drools workbench. -- View this message in context: http://drools.46999.n3.nabble.com/Need-Help-with-Enumerations-and-Classpath-tp4027091p4027094.html Sent from the Drools: User forum mailing list archive at Nabble.com. From michael.anstis at gmail.com Wed Dec 4 14:21:52 2013 From: michael.anstis at gmail.com (Michael Anstis) Date: Wed, 4 Dec 2013 19:21:52 +0000 Subject: [rules-users] Need Help with Enumerations and Classpath In-Reply-To: <1386184365973-4027094.post@n3.nabble.com> References: <1386178786060-4027091.post@n3.nabble.com> <1386184365973-4027094.post@n3.nabble.com> Message-ID: OK, where is the error reported? In the "Problems Panel" or when you click "Validate" in the enum editor - or both! On 4 December 2013 19:12, SrjTx wrote: > 6.0.0 I guess I should have said drools workbench. > > > > -- > View this message in context: > http://drools.46999.n3.nabble.com/Need-Help-with-Enumerations-and-Classpath-tp4027091p4027094.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/20131204/9fbeeb8d/attachment.html From sterjevm at mt.net.mk Wed Dec 4 15:50:02 2013 From: sterjevm at mt.net.mk (marjan.sterjev) Date: Wed, 4 Dec 2013 12:50:02 -0800 (PST) Subject: [rules-users] Guided Rule Template globals Message-ID: <1386190201939-4027096.post@n3.nabble.com> Hi, I?m trying to implement Guided Rule Template in KIE WB (Guvnor). The logic is simple: The Condition shall check range of ages and for action call a method on a global. The global is defined in Global Variables artifact. I can see two problems with the editor: 1. I can choose the global variable (Call method on ?global variable?). However the global is not defined in the Source Code (for example: global MessageCollection $messages). 2. The editor for Call method on ?global variable? allows to choose only literal arguments. How about Template Keys? It seems natural to define Template Keys for conditions and action callbacks as well. Because of 1) when executing the rules, I have Null Pointer Exception. In short what should I do in order to insert the global variable declaration on the top of rules file (in the Guided Rule Template)? -- View this message in context: http://drools.46999.n3.nabble.com/Guided-Rule-Template-globals-tp4027096.html Sent from the Drools: User forum mailing list archive at Nabble.com. From michael.anstis at gmail.com Wed Dec 4 16:02:51 2013 From: michael.anstis at gmail.com (Michael Anstis) Date: Wed, 4 Dec 2013 21:02:51 +0000 Subject: [rules-users] Guided Rule Template globals In-Reply-To: <1386190201939-4027096.post@n3.nabble.com> References: <1386190201939-4027096.post@n3.nabble.com> Message-ID: Do you set the global to an object in *your* runtime? The global definition will exist in your project but will need initialising to an object by your code. If the editor lacks a feature you require why not roll your sleeves up and provide a pull request? We don't normally have the time to respond to feature requests as quickly as the proposer would like. Sent on the move On 4 Dec 2013 20:50, "marjan.sterjev" wrote: > Hi, > I?m trying to implement Guided Rule Template in KIE WB (Guvnor). > > The logic is simple: The Condition shall check range of ages and for action > call a method on a global. > > The global is defined in Global Variables artifact. > > I can see two problems with the editor: > > 1. I can choose the global variable (Call method on ?global > variable?). > However the global is not defined in the Source Code (for example: global > MessageCollection $messages). > > 2. The editor for Call method on ?global variable? allows to choose > only > literal arguments. How about Template Keys? It seems natural to define > Template Keys for conditions and action callbacks as well. > > Because of 1) when executing the rules, I have Null Pointer Exception. > > In short what should I do in order to insert the global variable > declaration > on the top of rules file (in the Guided Rule Template)? > > > > > -- > View this message in context: > http://drools.46999.n3.nabble.com/Guided-Rule-Template-globals-tp4027096.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/20131204/22955f98/attachment-0001.html From ml at kofler.me Wed Dec 4 18:39:02 2013 From: ml at kofler.me (IK81) Date: Thu, 05 Dec 2013 00:39:02 +0100 Subject: [rules-users] Group-by rule without using a fact for grouping purposes Message-ID: Hi, I am trying to figure out a rule for matching an incoming sequence of events, but so far I was not really successful. Basically, I want to process events from devices. Every event has a timestamp (long), an id (a UUID string), a deviceId and an error code (both are strings). What I want to have is a simple rule that fires, if a single device reports a certain error code (e.g. ABCD) 3 times within 5 minutes (i.e., getting 3 such events within 5 minutes). So far, I suceeded in counting the ABCD error codes in the time window as follows: rule "Detect 3 occurrences of code ABCD for a certain device" when Number( intValue == 3 ) from accumulate( Event( $i : id, code == "ABCD") over window:time( 5m ), count( $i ) ) then System.out.println("Raise alarm"); end This first attempt does not distinguish which device sent the error code. But how can I express to fire only if the events share the same deviceId? I found many solutions that use a fact (e.g., a device fact) to group by the device and do the accumulation. I successfully implemented the group-by using the following when-part of the rule. when Device($deviceId : id) Number( intValue == 2 ) from accumulate( Event( $i : id, deviceId == $deviceId, code == "ABCD") over window:time( 5m ), count( $i ) ) then Adding a device fact is however not practical in my case. Are there any alternatives for expressing this group-by? Thanks, Ingo From mproctor at codehaus.org Wed Dec 4 21:59:54 2013 From: mproctor at codehaus.org (Mark Proctor) Date: Thu, 5 Dec 2013 02:59:54 +0000 Subject: [rules-users] Limited Entry Guided Decision in Drools 6.0 (Full Screen 720HD) Message-ID: Following on from the workbench videos (http://tinyurl.com/pnq6497), here is a rule based limited entry decision table http://tinyurl.com/o6umx2x Mark From wolfgang.laun at gmail.com Thu Dec 5 00:52:05 2013 From: wolfgang.laun at gmail.com (Wolfgang Laun) Date: Thu, 5 Dec 2013 06:52:05 +0100 Subject: [rules-users] Group-by rule without using a fact for grouping purposes In-Reply-To: References: Message-ID: Why is it "not practical" to add a fact for a device? You don't have to do this up front; they may come and go, dynamically. -W On 05/12/2013, IK81 wrote: > Hi, > > I am trying to figure out a rule for matching an incoming sequence of > events, but so far I was not really successful. Basically, I want to > process events from devices. Every event has a timestamp (long), an id > (a UUID string), a deviceId and an error code (both are strings). > > What I want to have is a simple rule that fires, if a single device > reports a certain error code (e.g. ABCD) 3 times within 5 minutes (i.e., > getting 3 such events within 5 minutes). So far, I suceeded in counting > the ABCD error codes in the time window as follows: > > > rule "Detect 3 occurrences of code ABCD for a certain device" > when > Number( intValue == 3 ) from accumulate( > Event( $i : id, code == "ABCD") over window:time( 5m ), > count( $i ) ) > then > System.out.println("Raise alarm"); > end > > This first attempt does not distinguish which device sent the error > code. But how can I express to fire only if the events share the same > deviceId? I found many solutions that use a fact (e.g., a device fact) > to group by the device and do the accumulation. I successfully > implemented the group-by using the following when-part of the rule. > > when > Device($deviceId : id) > Number( intValue == 2 ) from accumulate( > Event( $i : id, deviceId == $deviceId, code == "ABCD") over > window:time( 5m ), > count( $i ) ) > then > > Adding a device fact is however not practical in my case. Are there any > alternatives for expressing this group-by? > > Thanks, > Ingo > _______________________________________________ > 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 Thu Dec 5 01:18:21 2013 From: plz.write.to at gmail.com (Sonata) Date: Wed, 4 Dec 2013 22:18:21 -0800 (PST) Subject: [rules-users] Any easy way to avoid inserting same id object into memory? Message-ID: <1386224301695-4027102.post@n3.nabble.com> Hi, I have a rule that on its RHS, it creates new objects with random content and inserts them. How do you check if the object already exists in drools memory? I am thinking to use kcontext.getKnowledgeRuntime().getObjects() in the RHS to loop for all the objects and stop inserting if an object with same content exists. Is there any better way? May be like using query? Drools ver is 5.5.0.Final Thank you -- View this message in context: http://drools.46999.n3.nabble.com/Any-easy-way-to-avoid-inserting-same-id-object-into-memory-tp4027102.html Sent from the Drools: User forum mailing list archive at Nabble.com. From wolfgang.laun at gmail.com Thu Dec 5 02:44:21 2013 From: wolfgang.laun at gmail.com (Wolfgang Laun) Date: Thu, 5 Dec 2013 08:44:21 +0100 Subject: [rules-users] Any easy way to avoid inserting same id object into memory? In-Reply-To: <1386224301695-4027102.post@n3.nabble.com> References: <1386224301695-4027102.post@n3.nabble.com> Message-ID: Quote from the Expert manual: "A Working Memory may operate in two assertion modes, i.e., equality or identity, with identity being the default." Search for the keyword to see all references; you'll need "equality". -W On 05/12/2013, Sonata wrote: > Hi, I have a rule that on its RHS, it creates new objects with random > content > and inserts them. > How do you check if the object already exists in drools memory? > > I am thinking to use kcontext.getKnowledgeRuntime().getObjects() in the RHS > to loop for all the objects and stop inserting if an object with same > content exists. > > Is there any better way? > > May be like using query? > > Drools ver is 5.5.0.Final > > Thank you > > > > -- > View this message in context: > http://drools.46999.n3.nabble.com/Any-easy-way-to-avoid-inserting-same-id-object-into-memory-tp4027102.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 ml at kofler.me Thu Dec 5 02:57:35 2013 From: ml at kofler.me (IK81) Date: Thu, 05 Dec 2013 08:57:35 +0100 Subject: [rules-users] Group-by rule without using a fact for grouping purposes In-Reply-To: References: Message-ID: The devices may come and go and there may be several hundreds of them. They are stored in a database. Currently, I feed the events into the knowledge session and trigger an EJB call (instead of the simple System.out.println I used in the example below) and pass the device id. The EJB does the rest and looks up the device and related information from the database. If the id is unknown, this call is just a NOOP. Currently the knowledge session and the database need no synchronization. I just wanted to avoid this in my design, but now it seems to be necessary just for this group-by issue. I can imagine that I can also insert the fact using a rule that matches if I get an event for a currently unknown device (i.e., having no fact for it in the session), but how to clean up the facts if a device disappears. This @expires annotation is only valid for events afaik. Are there really no alternatives for this group-by instead of having the fact? Ingo On 2013-12-05 06:52, Wolfgang Laun wrote: > Why is it "not practical" to add a fact for a device? You don't have > to do this up front; they may come and go, dynamically. > > -W > > > On 05/12/2013, IK81 wrote: >> Hi, >> >> I am trying to figure out a rule for matching an incoming sequence >> of >> events, but so far I was not really successful. Basically, I want to >> process events from devices. Every event has a timestamp (long), an >> id >> (a UUID string), a deviceId and an error code (both are strings). >> >> What I want to have is a simple rule that fires, if a single device >> reports a certain error code (e.g. ABCD) 3 times within 5 minutes >> (i.e., >> getting 3 such events within 5 minutes). So far, I suceeded in >> counting >> the ABCD error codes in the time window as follows: >> >> >> rule "Detect 3 occurrences of code ABCD for a certain device" >> when >> Number( intValue == 3 ) from accumulate( >> Event( $i : id, code == "ABCD") over window:time( 5m ), >> count( $i ) ) >> then >> System.out.println("Raise alarm"); >> end >> >> This first attempt does not distinguish which device sent the error >> code. But how can I express to fire only if the events share the >> same >> deviceId? I found many solutions that use a fact (e.g., a device >> fact) >> to group by the device and do the accumulation. I successfully >> implemented the group-by using the following when-part of the rule. >> >> when >> Device($deviceId : id) >> Number( intValue == 2 ) from accumulate( >> Event( $i : id, deviceId == $deviceId, code == "ABCD") over >> window:time( 5m ), >> count( $i ) ) >> then >> >> Adding a device fact is however not practical in my case. Are there >> any >> alternatives for expressing this group-by? >> >> Thanks, >> Ingo >> _______________________________________________ >> 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 wolfgang.laun at gmail.com Thu Dec 5 03:40:07 2013 From: wolfgang.laun at gmail.com (Wolfgang Laun) Date: Thu, 5 Dec 2013 09:40:07 +0100 Subject: [rules-users] Group-by rule without using a fact for grouping purposes In-Reply-To: References: Message-ID: What about rule cleanup when $d: Device( $id: id ) not Event( id == $id ) then retract( $d ); end -WL On 05/12/2013, IK81 wrote: > The devices may come and go and there may be several hundreds of them. > They are stored in a database. > > Currently, I feed the events into the knowledge session and trigger an > EJB call (instead of the simple System.out.println I used in the example > below) and pass the device id. The EJB does the rest and looks up the > device and related information from the database. If the id is unknown, > this call is just a NOOP. > > Currently the knowledge session and the database need no > synchronization. I just wanted to avoid this in my design, but now it > seems to be necessary just for this group-by issue. I can imagine that I > can also insert the fact using a rule that matches if I get an event for > a currently unknown device (i.e., having no fact for it in the session), > but how to clean up the facts if a device disappears. This @expires > annotation is only valid for events afaik. > > Are there really no alternatives for this group-by instead of having > the fact? > > Ingo > > > On 2013-12-05 06:52, Wolfgang Laun wrote: >> Why is it "not practical" to add a fact for a device? You don't have >> to do this up front; they may come and go, dynamically. >> >> -W >> >> >> On 05/12/2013, IK81 wrote: >>> Hi, >>> >>> I am trying to figure out a rule for matching an incoming sequence >>> of >>> events, but so far I was not really successful. Basically, I want to >>> process events from devices. Every event has a timestamp (long), an >>> id >>> (a UUID string), a deviceId and an error code (both are strings). >>> >>> What I want to have is a simple rule that fires, if a single device >>> reports a certain error code (e.g. ABCD) 3 times within 5 minutes >>> (i.e., >>> getting 3 such events within 5 minutes). So far, I suceeded in >>> counting >>> the ABCD error codes in the time window as follows: >>> >>> >>> rule "Detect 3 occurrences of code ABCD for a certain device" >>> when >>> Number( intValue == 3 ) from accumulate( >>> Event( $i : id, code == "ABCD") over window:time( 5m ), >>> count( $i ) ) >>> then >>> System.out.println("Raise alarm"); >>> end >>> >>> This first attempt does not distinguish which device sent the error >>> code. But how can I express to fire only if the events share the >>> same >>> deviceId? I found many solutions that use a fact (e.g., a device >>> fact) >>> to group by the device and do the accumulation. I successfully >>> implemented the group-by using the following when-part of the rule. >>> >>> when >>> Device($deviceId : id) >>> Number( intValue == 2 ) from accumulate( >>> Event( $i : id, deviceId == $deviceId, code == "ABCD") over >>> window:time( 5m ), >>> count( $i ) ) >>> then >>> >>> Adding a device fact is however not practical in my case. Are there >>> any >>> alternatives for expressing this group-by? >>> >>> Thanks, >>> Ingo >>> _______________________________________________ >>> 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 arshmand at gmail.com Thu Dec 5 06:09:27 2013 From: arshmand at gmail.com (Arshdeep Mand) Date: Thu, 5 Dec 2013 03:09:27 -0800 Subject: [rules-users] Drools hangs when running decision table Message-ID: I have the following code: function runDecisionTable() { ...Other setup code... val ksession = kbase.newStatelessKnowledgeSession() println("About to execute") ksession.execute(params) println("Done executing") } This function will execute just fine exactly 10 times. However, when the function executes for the 11th time, all I see is the message "About to execute" and the java process seems to hang at the "kession.execute" line. Anyone have any clue on how to debug this? I tried to add some logging by doing: val logger = KnowledgeRuntimeLoggerFactory.newConsoleLogger(ksession); However, I get the following error when doing this: java.lang.RuntimeException: Provider org.drools.core.audit.KnowledgeRuntimeLoggerProviderImpl could not be set. -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.jboss.org/pipermail/rules-users/attachments/20131205/946c59e8/attachment.html From ters at ukr.net Thu Dec 5 06:24:41 2013 From: ters at ukr.net (ters) Date: Thu, 5 Dec 2013 03:24:41 -0800 (PST) Subject: [rules-users] CEP accumulate unclear behavior In-Reply-To: References: <1386085460355-4027069.post@n3.nabble.com> <1386169132529-4027088.post@n3.nabble.com> <1386177674817-4027090.post@n3.nabble.com> Message-ID: <1386242681411-4027107.post@n3.nabble.com> laune, I've tried your proposed accumulate approach, the Result of test1_FireAllRules() is: -= 1 =- $events avg duration = 2.0 ----------FIRED---------- -= 2 =- $events avg duration = 2.0 ----------FIRED---------- -= 3 =- $events avg duration = 7.0 ----------FIRED---------- ---test1 end--- Ok, it fires for each new inserted event (between fireAllRules calls) and calculates avg for all events witn name "MyService". But, as I wrote in first post, I need to fire a rule if last inserting event duration greater than value which depends on average duration of all events from the wm. Lets take $avg/10(/10 - take for convenience to show issue). So I need to add pattern along with accumulate: / Number( $avg: doubleValue ) from accumulate( ServicePerformanceEvent( $name: serviceName, $thisDuration: duration), init( double sum = 0; double count = 0; ) action( if("MyService".equals($name)){ sum += $thisDuration; count++;}) result( count != 0 ? sum/count : 0 ) ); $event : ServicePerformanceEvent(serviceName == "MyService", duration > */$avg/10/*);/ Result of test1_FireAllRules(): -= 1 =- $event.duration = 2 $events avg duration = 2.0 ----------FIRED---------- -= 2 =- $event.duration = 2 $events avg duration = 2.0 ----------FIRED---------- -= 3 =- $event.duration = 12 $events avg duration = 7.0 ----------FIRED---------- $event.duration = 2 $events avg duration = 7.0 ----------FIRED---------- ---test1 end--- As can see, it fires on both for newly inserted event and for old already matched events/facts. Ok, if rule analyzes all previous events/facts I decide to check previous rule with test: / @Test public void test12_FireAllRules() throws RuleGeneratorException { System.out.println("-= 1 =-"); ksession.insert(new ServicePerformanceEvent("MyService", 2)); ksession.fireAllRules(); System.out.println("-= 2 =-"); ksession.insert(new ServicePerformanceEvent("AnotherService", 10)); ksession.fireAllRules(); System.out.println("-= 3 =-"); ksession.insert(new ServicePerformanceEvent("MyService", 12)); ksession.fireAllRules(); */ System.out.println("-= 4 =-"); ksession.fireAllRules(); // call firing without inserting event after last fire/* System.out.println("---test1 end---"); }/ Result of test12_FireAllRules(): -= 1 =- $event.duration = 2 $events avg duration = 2.0 ----------FIRED---------- -= 2 =- $event.duration = 2 $events avg duration = 2.0 ----------FIRED---------- -= 3 =- $event.duration = 12 $events avg duration = 7.0 ----------FIRED---------- $event.duration = 2 $events avg duration = 7.0 ----------FIRED---------- /-= 4 =- ---test1 end---/ And what I see, in case -3- the rule analyzed both new and old facts... but in case -4- the rule analyzed nothing! though, as in case -3-, there were potentially matched old facts. I completely don't understand such behavior... Again, what I need for last test is: -= 1 =- $event.duration = 2 $events avg duration = 2.0 ----------FIRED---------- -= 2 =- -= 3 =- /$event.duration = 12 $events avg duration = 7.0/ ----------FIRED---------- -= 4 =- ---test1 end--- -- View this message in context: http://drools.46999.n3.nabble.com/CEP-accumulate-unclear-behavior-tp4027069p4027107.html Sent from the Drools: User forum mailing list archive at Nabble.com. From wolfgang.laun at gmail.com Thu Dec 5 07:08:06 2013 From: wolfgang.laun at gmail.com (Wolfgang Laun) Date: Thu, 5 Dec 2013 13:08:06 +0100 Subject: [rules-users] CEP accumulate unclear behavior In-Reply-To: <1386242681411-4027107.post@n3.nabble.com> References: <1386085460355-4027069.post@n3.nabble.com> <1386169132529-4027088.post@n3.nabble.com> <1386177674817-4027090.post@n3.nabble.com> <1386242681411-4027107.post@n3.nabble.com> Message-ID: Try the following separation of the computation of the average from the detection of critical events. The first rule with a salience > 0 simply computes the average of all Events and update a singular Fact (Average) containing a field with the running average value. A second rule matches on Average and the kind of Event you're interested and tests the duration, e.g. Average( $v: value ) Event( name == "MyService", duration > $v ) -W On 05/12/2013, ters wrote: > laune, > I've tried your proposed accumulate approach, the Result of > test1_FireAllRules() is: > -= 1 =- > $events avg duration = 2.0 > ----------FIRED---------- > -= 2 =- > $events avg duration = 2.0 > ----------FIRED---------- > -= 3 =- > $events avg duration = 7.0 > ----------FIRED---------- > ---test1 end--- > Ok, it fires for each new inserted event (between fireAllRules calls) and > calculates avg for all events witn name "MyService". > But, as I wrote in first post, I need to fire a rule if last inserting > event > duration > greater than value which depends on average duration of all events from the > wm. Lets take $avg/10(/10 - take for convenience to show issue). > So I need to add pattern along with accumulate: > / Number( $avg: doubleValue ) from accumulate( ServicePerformanceEvent( > $name: serviceName, $thisDuration: duration), > init( double sum = 0; double count = 0; ) > action( if("MyService".equals($name)){ > sum += $thisDuration; > count++;}) > result( count != 0 ? sum/count : 0 ) ); > > $event : ServicePerformanceEvent(serviceName == "MyService", duration > > */$avg/10/*);/ > Result of test1_FireAllRules(): > -= 1 =- > $event.duration = 2 > $events avg duration = 2.0 > ----------FIRED---------- > -= 2 =- > $event.duration = 2 > $events avg duration = 2.0 > ----------FIRED---------- > -= 3 =- > $event.duration = 12 > $events avg duration = 7.0 > ----------FIRED---------- > $event.duration = 2 > $events avg duration = 7.0 > ----------FIRED---------- > ---test1 end--- > > As can see, it fires on both for newly inserted event and for old already > matched events/facts. > Ok, if rule analyzes all previous events/facts I decide to check previous > rule with test: > / @Test > public void test12_FireAllRules() throws RuleGeneratorException { > System.out.println("-= 1 =-"); > ksession.insert(new ServicePerformanceEvent("MyService", 2)); > ksession.fireAllRules(); > > System.out.println("-= 2 =-"); > ksession.insert(new ServicePerformanceEvent("AnotherService", 10)); > ksession.fireAllRules(); > > System.out.println("-= 3 =-"); > ksession.insert(new ServicePerformanceEvent("MyService", 12)); > ksession.fireAllRules(); > > */ System.out.println("-= 4 =-"); > ksession.fireAllRules(); // call firing without inserting event after > last > fire/* > System.out.println("---test1 end---"); > }/ > Result of test12_FireAllRules(): > -= 1 =- > $event.duration = 2 > $events avg duration = 2.0 > ----------FIRED---------- > -= 2 =- > $event.duration = 2 > $events avg duration = 2.0 > ----------FIRED---------- > -= 3 =- > $event.duration = 12 > $events avg duration = 7.0 > ----------FIRED---------- > $event.duration = 2 > $events avg duration = 7.0 > ----------FIRED---------- > /-= 4 =- > ---test1 end---/ > > And what I see, in case -3- the rule analyzed both new and old facts... > but in case -4- the rule analyzed nothing! though, as in case -3-, there > were potentially matched old facts. > I completely don't understand such behavior... > Again, what I need for last test is: > -= 1 =- > $event.duration = 2 > $events avg duration = 2.0 > ----------FIRED---------- > -= 2 =- > -= 3 =- > /$event.duration = 12 > $events avg duration = 7.0/ > ----------FIRED---------- > -= 4 =- > ---test1 end--- > > > > -- > View this message in context: > http://drools.46999.n3.nabble.com/CEP-accumulate-unclear-behavior-tp4027069p4027107.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 ters at ukr.net Thu Dec 5 09:40:02 2013 From: ters at ukr.net (ters) Date: Thu, 5 Dec 2013 06:40:02 -0800 (PST) Subject: [rules-users] CEP accumulate unclear behavior In-Reply-To: References: <1386085460355-4027069.post@n3.nabble.com> <1386169132529-4027088.post@n3.nabble.com> <1386177674817-4027090.post@n3.nabble.com> <1386242681411-4027107.post@n3.nabble.com> Message-ID: <1386254402303-4027109.post@n3.nabble.com> Agree with you, I also have think about such approach. I will try it later and inform here about the results. laune, thank you again for your quick and adequate responses, I'm really appreciate. -- View this message in context: http://drools.46999.n3.nabble.com/CEP-accumulate-unclear-behavior-tp4027069p4027109.html Sent from the Drools: User forum mailing list archive at Nabble.com. From ray.hooker at gmail.com Thu Dec 5 10:17:32 2013 From: ray.hooker at gmail.com (Ray Hooker) Date: Thu, 5 Dec 2013 07:17:32 -0800 (PST) Subject: [rules-users] What Class is the Fact that was inserted? - How to dump working memory? Message-ID: <1386256652033-4027110.post@n3.nabble.com> I am trying to determine precisely what class the rules engine (kie version 6) thinks the class is that was inserted. The situation is that I am inserting objects from JRuby. 1. If I pass the object to a Java program and do reflection, the class is shown to be RubyObject (i.e., "getClass().getName". 2. I did create a rule that fires on any RubyObject that is inserted but it never fires: import org.jruby.RubyObject; rule "Find any RubyObject" dialect "mvel" when RubyObject() then System.out.println("We found a RubyObject!"); end 3. When I insert an object from JRuby that is called "Message", there is what I see: [ObjectInsertedEventImpl: getFactHandle()=[fact 0:1:529888082:529888082:1:DEFAULT:NON_TRAIT:#], getObject()=#, getKnowledgeRuntime()=org.drools.core.impl.StatefulKnowledgeSessionImpl at 5719510f, getPropagationContext()=PhreakPropagationContext [entryPoint=EntryPoint::DEFAULT, factHandle=[fact 0:1:529888082:529888082:1:DEFAULT:NON_TRAIT:#], leftTuple=null, originOffset=-1, propagationNumber=2, rule=null, type=0]] How can find out exactly what are the facts in working memory and determine the precise nature of the fact I inserted? Ray Hooker -- View this message in context: http://drools.46999.n3.nabble.com/What-Class-is-the-Fact-that-was-inserted-How-to-dump-working-memory-tp4027110.html Sent from the Drools: User forum mailing list archive at Nabble.com. From brachi.w at sapiens.com Thu Dec 5 10:47:36 2013 From: brachi.w at sapiens.com (brachi) Date: Thu, 5 Dec 2013 07:47:36 -0800 (PST) Subject: [rules-users] permgen leak In-Reply-To: <1386075072321-4027066.post@n3.nabble.com> References: <1386010141468-4027045.post@n3.nabble.com> <3C5C869A-922C-41FC-A14A-3F9411EFBCDD@gmail.com> <1386011451286-4027048.post@n3.nabble.com> <0AAA15D2-979B-4369-9A05-B741239A7689@codehaus.org> <1386013302159-4027052.post@n3.nabble.com> <79CC380D-332C-4510-96E3-0C1FCF231D92@codehaus.org> <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> Message-ID: <1386258456435-4027111.post@n3.nabble.com> I got a compilation error whith MVEL dialect, on string contains ";" character. "unterminated string literal" any idea? -- View this message in context: http://drools.46999.n3.nabble.com/permgen-leak-tp4027038p4027111.html Sent from the Drools: User forum mailing list archive at Nabble.com. From wolfgang.laun at gmail.com Thu Dec 5 10:49:31 2013 From: wolfgang.laun at gmail.com (Wolfgang Laun) Date: Thu, 5 Dec 2013 16:49:31 +0100 Subject: [rules-users] What Class is the Fact that was inserted? - How to dump working memory? In-Reply-To: <1386256652033-4027110.post@n3.nabble.com> References: <1386256652033-4027110.post@n3.nabble.com> Message-ID: The session object should still have methods getObjects() and getFactHandles() returning a Collection of Object or FactHandle, respectively. The trailing part of a fact handle, i.e., [...:#], results from a call to the fact object's toString() method. -W On 05/12/2013, Ray Hooker wrote: > I am trying to determine precisely what class the rules engine (kie version > 6) thinks the class is that was inserted. The situation is that I am > inserting objects from JRuby. > > 1. If I pass the object to a Java program and do reflection, the class is > shown to be RubyObject (i.e., "getClass().getName". > 2. I did create a rule that fires on any RubyObject that is inserted but > it never fires: > import org.jruby.RubyObject; > rule "Find any RubyObject" > dialect "mvel" > when > RubyObject() > then > System.out.println("We found a RubyObject!"); > end > > 3. When I insert an object from JRuby that is called "Message", there is > what I see: > [ObjectInsertedEventImpl: getFactHandle()=[fact > 0:1:529888082:529888082:1:DEFAULT:NON_TRAIT:#], > getObject()=#, > getKnowledgeRuntime()=org.drools.core.impl.StatefulKnowledgeSessionImpl at 5719510f, > getPropagationContext()=PhreakPropagationContext > [entryPoint=EntryPoint::DEFAULT, factHandle=[fact > 0:1:529888082:529888082:1:DEFAULT:NON_TRAIT:#], > leftTuple=null, originOffset=-1, propagationNumber=2, rule=null, type=0]] > > How can find out exactly what are the facts in working memory and determine > the precise nature of the fact I inserted? > > Ray Hooker > > > > -- > View this message in context: > http://drools.46999.n3.nabble.com/What-Class-is-the-Fact-that-was-inserted-How-to-dump-working-memory-tp4027110.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 Dec 5 10:51:21 2013 From: wolfgang.laun at gmail.com (Wolfgang Laun) Date: Thu, 5 Dec 2013 16:51:21 +0100 Subject: [rules-users] permgen leak In-Reply-To: <1386258456435-4027111.post@n3.nabble.com> References: <1386010141468-4027045.post@n3.nabble.com> <3C5C869A-922C-41FC-A14A-3F9411EFBCDD@gmail.com> <1386011451286-4027048.post@n3.nabble.com> <0AAA15D2-979B-4369-9A05-B741239A7689@codehaus.org> <1386013302159-4027052.post@n3.nabble.com> <79CC380D-332C-4510-96E3-0C1FCF231D92@codehaus.org> <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> Message-ID: No crystal ball here: full example, Drools version, please. -W On 05/12/2013, brachi wrote: > I got a compilation error whith MVEL dialect, on string contains ";" > character. > "unterminated string literal" > any idea? > > > > > > -- > View this message in context: > http://drools.46999.n3.nabble.com/permgen-leak-tp4027038p4027111.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 Dec 5 10:52:25 2013 From: wolfgang.laun at gmail.com (Wolfgang Laun) Date: Thu, 5 Dec 2013 16:52:25 +0100 Subject: [rules-users] permgen leak In-Reply-To: <1386258456435-4027111.post@n3.nabble.com> References: <1386010141468-4027045.post@n3.nabble.com> <3C5C869A-922C-41FC-A14A-3F9411EFBCDD@gmail.com> <1386011451286-4027048.post@n3.nabble.com> <0AAA15D2-979B-4369-9A05-B741239A7689@codehaus.org> <1386013302159-4027052.post@n3.nabble.com> <79CC380D-332C-4510-96E3-0C1FCF231D92@codehaus.org> <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> Message-ID: permgen leak? -W On 05/12/2013, brachi wrote: > I got a compilation error whith MVEL dialect, on string contains ";" > character. > "unterminated string literal" > any idea? > > > > > > -- > View this message in context: > http://drools.46999.n3.nabble.com/permgen-leak-tp4027038p4027111.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 Thu Dec 5 10:58:15 2013 From: brachi.w at sapiens.com (brachi) Date: Thu, 5 Dec 2013 07:58:15 -0800 (PST) Subject: [rules-users] permgen leak In-Reply-To: References: <1386011451286-4027048.post@n3.nabble.com> <0AAA15D2-979B-4369-9A05-B741239A7689@codehaus.org> <1386013302159-4027052.post@n3.nabble.com> <79CC380D-332C-4510-96E3-0C1FCF231D92@codehaus.org> <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> Message-ID: <1386259095814-4027115.post@n3.nabble.com> yes because of permgen leak, see previous page... I must use mvel because only if I use it I don't have permgen. drools version: 5.4.0.Final also on 5.5.0.Final -- View this message in context: http://drools.46999.n3.nabble.com/permgen-leak-tp4027038p4027115.html Sent from the Drools: User forum mailing list archive at Nabble.com. From brachi.w at sapiens.com Thu Dec 5 11:22:55 2013 From: brachi.w at sapiens.com (brachi) Date: Thu, 5 Dec 2013 08:22:55 -0800 (PST) Subject: [rules-users] got error "unterminated string literal" only with mvel dialect Message-ID: <1386260575305-4027116.post@n3.nabble.com> That is because the ";", if I remove it, the drl is valid. drools version: 5.4.0.Final also on 5.5.0.Final any idea? example: rule "1" @RuleType(RuleRow) salience -1 agenda-group "aaa" when $conclusion: FT() then addMessage($conclusion.getMessages(), "that is ;message", "1", "Category2"); end function void addMessage(Map messages, String message, String rowId, String category) { ... } -- View this message in context: http://drools.46999.n3.nabble.com/got-error-unterminated-string-literal-only-with-mvel-dialect-tp4027116.html Sent from the Drools: User forum mailing list archive at Nabble.com. From matteo.mortari at gmail.com Thu Dec 5 11:35:04 2013 From: matteo.mortari at gmail.com (Matteo Mortari) Date: Thu, 5 Dec 2013 17:35:04 +0100 Subject: [rules-users] Drool 6.0.0.Final, 2 question re kie-maven-plugin, please? Message-ID: Ciao, with premise I'm not a Maven expert... I'm following now the new recommended version for 6.0 KIE project/module development as documented in [1] by generating a new maven archetype "quickstart" but if compared to the documentation I found, at least in my case, I had at a minimum to apply also the following in the pom.xml: A. the packaging must be changed to "kjar" B. if the project and the rules depend on an external library/maven artifact, say for instance the object model or domain model objects the rules will be based on, it is NOT enough to declare them in the pom.xml , but the exact same dependencies MUST ALSO be also declared within the kie-maven-plugin as well. Failing to do so, would imply that, respectively: A. when you run Maven with the default "mvn package" or "mvn deploy" etc, the kie-maven-plugin would not trigger B. kie-maven-plugin will fail the build because unable to resolve the "external" classes referenced in the .drl, with a message similar to [ERROR] Message [id=3, level=ERROR, path=package.drl, line=3, column=0 text=Unable to find class 'classname'] Questions are: 1. Is this correct, or I'm just complicating my life without noticing, and it is existing a simpler way, please? 2. Especially point #B, is this really the intended behavior, having to replicate the dependencies in the two parts of the pom.xml ? Thanks if somebody can feedback on this, Ciao MM I'm making reference to: [1] http://docs.jboss.org/drools/release/6.0.0.Final/drools-docs/html_single/#KIEModuleIntroductionBuildingIntroductionSection For reference, here is an example pom.xml I'm using: 4.0.0 com.acme my-rules 0.0.1 kjar com.acme object-model 0.0.1-SNAPSHOT junit junit 4.11 test my-rules maven-compiler-plugin 1.7 1.7 org.kie kie-maven-plugin 6.0.0.Final true com.acme object-model 0.0.1-SNAPSHOT org.eclipse.m2e lifecycle-mapping 1.0.0 org.kie kie-maven-plugin [6.0.0,) build -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.jboss.org/pipermail/rules-users/attachments/20131205/ddcdb5f4/attachment-0001.html From ge0ffrey.spam at gmail.com Thu Dec 5 16:20:33 2013 From: ge0ffrey.spam at gmail.com (ge0ffrey) Date: Thu, 5 Dec 2013 13:20:33 -0800 (PST) Subject: [rules-users] How to do continuous planning in Optaplanner In-Reply-To: <1386154657280-4027084.post@n3.nabble.com> References: <1386154657280-4027084.post@n3.nabble.com> Message-ID: <1386278433942-4027118.post@n3.nabble.com> Use Immovable filter (see docs chapter about continuous planning) to make sure the already planning entities don't move. See course scheduling and nurse rostering video's for 2 different approaches. You 'll want to load recent historical data because they affect constraints on the newly placed entities. See nurse rostering video. -- View this message in context: http://drools.46999.n3.nabble.com/How-to-do-continuous-planning-in-Optaplanner-tp4027084p4027118.html Sent from the Drools: User forum mailing list archive at Nabble.com. From ml at kofler.me Thu Dec 5 18:04:08 2013 From: ml at kofler.me (IK81) Date: Fri, 06 Dec 2013 00:04:08 +0100 Subject: [rules-users] Group-by rule without using a fact for grouping purposes In-Reply-To: References: Message-ID: Ahh... nice solution. Perhaps I was simply thinking too complicated. Works fine. There's however one thing that does not work with the accumulate for me. >>>> Number( intValue == 3 ) from accumulate( >>>> Event( $i : id, code == "ABCD") over window:time( 5m ), >>>> count( $i ) ) In all my other rules I retrieve the events that caused my rule to via via the kcontext.getMatch().getObjects(). In this case I just get a number object with value 3. Seems to be appropriate since I am matching against that number. But how can I get the ids of those three events that caused my rule to fire? Thanks, Ingo On 2013-12-05 09:40, Wolfgang Laun wrote: > What about > > rule cleanup > when > $d: Device( $id: id ) > not Event( id == $id ) > then > retract( $d ); > end > > -WL > > On 05/12/2013, IK81 wrote: >> The devices may come and go and there may be several hundreds of >> them. >> They are stored in a database. >> >> Currently, I feed the events into the knowledge session and trigger >> an >> EJB call (instead of the simple System.out.println I used in the >> example >> below) and pass the device id. The EJB does the rest and looks up >> the >> device and related information from the database. If the id is >> unknown, >> this call is just a NOOP. >> >> Currently the knowledge session and the database need no >> synchronization. I just wanted to avoid this in my design, but now >> it >> seems to be necessary just for this group-by issue. I can imagine >> that I >> can also insert the fact using a rule that matches if I get an event >> for >> a currently unknown device (i.e., having no fact for it in the >> session), >> but how to clean up the facts if a device disappears. This @expires >> annotation is only valid for events afaik. >> >> Are there really no alternatives for this group-by instead of having >> the fact? >> >> Ingo >> >> >> On 2013-12-05 06:52, Wolfgang Laun wrote: >>> Why is it "not practical" to add a fact for a device? You don't >>> have >>> to do this up front; they may come and go, dynamically. >>> >>> -W >>> >>> >>> On 05/12/2013, IK81 wrote: >>>> Hi, >>>> >>>> I am trying to figure out a rule for matching an incoming sequence >>>> of >>>> events, but so far I was not really successful. Basically, I want >>>> to >>>> process events from devices. Every event has a timestamp (long), >>>> an >>>> id >>>> (a UUID string), a deviceId and an error code (both are strings). >>>> >>>> What I want to have is a simple rule that fires, if a single >>>> device >>>> reports a certain error code (e.g. ABCD) 3 times within 5 minutes >>>> (i.e., >>>> getting 3 such events within 5 minutes). So far, I suceeded in >>>> counting >>>> the ABCD error codes in the time window as follows: >>>> >>>> >>>> rule "Detect 3 occurrences of code ABCD for a certain device" >>>> when >>>> Number( intValue == 3 ) from accumulate( >>>> Event( $i : id, code == "ABCD") over window:time( 5m ), >>>> count( $i ) ) >>>> then >>>> System.out.println("Raise alarm"); >>>> end >>>> >>>> This first attempt does not distinguish which device sent the >>>> error >>>> code. But how can I express to fire only if the events share the >>>> same >>>> deviceId? I found many solutions that use a fact (e.g., a device >>>> fact) >>>> to group by the device and do the accumulation. I successfully >>>> implemented the group-by using the following when-part of the >>>> rule. >>>> >>>> when >>>> Device($deviceId : id) >>>> Number( intValue == 2 ) from accumulate( >>>> Event( $i : id, deviceId == $deviceId, code == "ABCD") >>>> over >>>> window:time( 5m ), >>>> count( $i ) ) >>>> then >>>> >>>> Adding a device fact is however not practical in my case. Are >>>> there >>>> any >>>> alternatives for expressing this group-by? >>>> >>>> Thanks, >>>> Ingo >>>> _______________________________________________ >>>> 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 ml at kofler.me Thu Dec 5 18:22:25 2013 From: ml at kofler.me (IK81) Date: Fri, 06 Dec 2013 00:22:25 +0100 Subject: [rules-users] Semantic of rules with not and coincide Message-ID: Dear all, I am currently stuck with a problem concerning the use of not and conincide. I want to analyze a stream of error code events from a set of devices and detect the following situations. Every event has a timestamp (long), a device id (String) and an error code (String). What I want to detect is the following - If I get two events, one with code C1 and one with C2 from a single device within 1 minute, it represents a special event combination. The order of their appearence is not relevant. - If I just get C1 (without the C2 within the time frame), just report C1 - If I just get C2 (without the C1 within the time frame), just report C2 I can successfully detect the special event combination with the following rule rule "Detect combination" when $e1 : Event ($d: device, code == "C1") $e2 : Event (device == $d, code == "C2", this coincides [1m] $e1) then ... do some output end Then I tried to implement the detection of C1 only as follows rule "Detect code C1" when $e1 : Event ($d: device, code == "C1") not ( $e2 : Event (device == $d, code == "C2", this coincides [1m] $e1)) then ... do some other output end My understanding of the rule is that it should fire, if I get the event with code C1 and there is no other event with error code C2 for the same device that happens within one minute before and after the C1 event. To my surprise, the rule fires immediately when I insert an event with error code C1. Shouldn't the implementation wait at least 1 minute to be sure that no C2 error event will be inserted? BTW this is how I insert the events in my test case: clock.advanceTime(70, TimeUnit.SECONDS); FactHandle handle1 = ksession.insert( new Event(65000, "A", "C1") ); ksession.fireAllRules(); clock.advanceTime( 10, TimeUnit.SECONDS ); FactHandle handle2 = ksession.insert( new Event(75000, "A", "C2") ); ksession.fireAllRules(); clock.advanceTime( 2, TimeUnit.SECONDS ); And this is mainly the output I get: detected code C1 @ 70000 event id=44b895e5-7287-404b-8204-3de5690b2360 timestamp=65000 device=A code=C1 detected combination @ 80000 event id=44b895e5-7287-404b-8204-3de5690b2360 timestamp=65000 device=A code=C1 event id=fc89715b-fc30-4b12-ab31-a3884dcd4886 timestamp=75000 device=A code=C2 Any ideas concerning an alternative solution are highly welcomed. Thanks, Ingo From nkhogen at gmail.com Thu Dec 5 21:12:31 2013 From: nkhogen at gmail.com (nkhogen) Date: Thu, 5 Dec 2013 18:12:31 -0800 (PST) Subject: [rules-users] Http 401 error in drools 5.6.0.CR1 Message-ID: <1386295951338-4027121.post@n3.nabble.com> If a change set has a resource pointing to Guvnor in 5.6.0.CR1, the resource is rejected because of http 401 because basicAuthentication is enabled by default. Previously in 5.5.0.Final, in addResourceMapping(Resource resource, boolean notify), there was no check for existence of the resource as if ( notify && newMapping ) { ... } In 5.6.0.CR1, it has been changed to if ( notify && newMapping && ((InternalResource)resource).exists() ) { ..} and the the exists() method simply invokes URL.openStream() which fails with 401 (unauthorized) and the resource is not added. -- View this message in context: http://drools.46999.n3.nabble.com/Http-401-error-in-drools-5-6-0-CR1-tp4027121.html Sent from the Drools: User forum mailing list archive at Nabble.com. From nkhogen at gmail.com Thu Dec 5 21:41:53 2013 From: nkhogen at gmail.com (nkhogen) Date: Thu, 5 Dec 2013 18:41:53 -0800 (PST) Subject: [rules-users] Http 401 error in drools 5.6.0.CR1 In-Reply-To: <1386295951338-4027121.post@n3.nabble.com> References: <1386295951338-4027121.post@n3.nabble.com> Message-ID: <1386297713133-4027122.post@n3.nabble.com> Moreover, it is hard to know which resources are ignored because it is done silently. -- View this message in context: http://drools.46999.n3.nabble.com/Http-401-error-in-drools-5-6-0-CR1-tp4027121p4027122.html Sent from the Drools: User forum mailing list archive at Nabble.com. From wolfgang.laun at gmail.com Fri Dec 6 03:08:42 2013 From: wolfgang.laun at gmail.com (Wolfgang Laun) Date: Fri, 6 Dec 2013 09:08:42 +0100 Subject: [rules-users] Group-by rule without using a fact for grouping purposes In-Reply-To: References: Message-ID: There's another form of accumulate that lets you use collectList (or collectSet) to accumulate any object collection, even in parallel to count. But if you want the facts themselves, you might use "collect" in the first place. -W On 06/12/2013, IK81 wrote: > > Ahh... nice solution. Perhaps I was simply thinking too complicated. > Works fine. > > There's however one thing that does not work with the accumulate for > me. > >>>>> Number( intValue == 3 ) from accumulate( >>>>> Event( $i : id, code == "ABCD") over window:time( 5m ), >>>>> count( $i ) ) > > In all my other rules I retrieve the events that caused my rule to via > via the kcontext.getMatch().getObjects(). In this case I just get a > number object with value 3. Seems to be appropriate since I am matching > against that number. But how can I get the ids of those three events > that caused my rule to fire? > > Thanks, > Ingo > > > On 2013-12-05 09:40, Wolfgang Laun wrote: >> What about >> >> rule cleanup >> when >> $d: Device( $id: id ) >> not Event( id == $id ) >> then >> retract( $d ); >> end >> >> -WL >> >> On 05/12/2013, IK81 wrote: >>> The devices may come and go and there may be several hundreds of >>> them. >>> They are stored in a database. >>> >>> Currently, I feed the events into the knowledge session and trigger >>> an >>> EJB call (instead of the simple System.out.println I used in the >>> example >>> below) and pass the device id. The EJB does the rest and looks up >>> the >>> device and related information from the database. If the id is >>> unknown, >>> this call is just a NOOP. >>> >>> Currently the knowledge session and the database need no >>> synchronization. I just wanted to avoid this in my design, but now >>> it >>> seems to be necessary just for this group-by issue. I can imagine >>> that I >>> can also insert the fact using a rule that matches if I get an event >>> for >>> a currently unknown device (i.e., having no fact for it in the >>> session), >>> but how to clean up the facts if a device disappears. This @expires >>> annotation is only valid for events afaik. >>> >>> Are there really no alternatives for this group-by instead of having >>> the fact? >>> >>> Ingo >>> >>> >>> On 2013-12-05 06:52, Wolfgang Laun wrote: >>>> Why is it "not practical" to add a fact for a device? You don't >>>> have >>>> to do this up front; they may come and go, dynamically. >>>> >>>> -W >>>> >>>> >>>> On 05/12/2013, IK81 wrote: >>>>> Hi, >>>>> >>>>> I am trying to figure out a rule for matching an incoming sequence >>>>> of >>>>> events, but so far I was not really successful. Basically, I want >>>>> to >>>>> process events from devices. Every event has a timestamp (long), >>>>> an >>>>> id >>>>> (a UUID string), a deviceId and an error code (both are strings). >>>>> >>>>> What I want to have is a simple rule that fires, if a single >>>>> device >>>>> reports a certain error code (e.g. ABCD) 3 times within 5 minutes >>>>> (i.e., >>>>> getting 3 such events within 5 minutes). So far, I suceeded in >>>>> counting >>>>> the ABCD error codes in the time window as follows: >>>>> >>>>> >>>>> rule "Detect 3 occurrences of code ABCD for a certain device" >>>>> when >>>>> Number( intValue == 3 ) from accumulate( >>>>> Event( $i : id, code == "ABCD") over window:time( 5m ), >>>>> count( $i ) ) >>>>> then >>>>> System.out.println("Raise alarm"); >>>>> end >>>>> >>>>> This first attempt does not distinguish which device sent the >>>>> error >>>>> code. But how can I express to fire only if the events share the >>>>> same >>>>> deviceId? I found many solutions that use a fact (e.g., a device >>>>> fact) >>>>> to group by the device and do the accumulation. I successfully >>>>> implemented the group-by using the following when-part of the >>>>> rule. >>>>> >>>>> when >>>>> Device($deviceId : id) >>>>> Number( intValue == 2 ) from accumulate( >>>>> Event( $i : id, deviceId == $deviceId, code == "ABCD") >>>>> over >>>>> window:time( 5m ), >>>>> count( $i ) ) >>>>> then >>>>> >>>>> Adding a device fact is however not practical in my case. Are >>>>> there >>>>> any >>>>> alternatives for expressing this group-by? >>>>> >>>>> Thanks, >>>>> Ingo >>>>> _______________________________________________ >>>>> 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 wolfgang.laun at gmail.com Fri Dec 6 03:22:13 2013 From: wolfgang.laun at gmail.com (Wolfgang Laun) Date: Fri, 6 Dec 2013 09:22:13 +0100 Subject: [rules-users] Semantic of rules with not and coincide In-Reply-To: References: Message-ID: Coincides is symmetric in time. You might want to use before or after. -W On 06/12/2013, IK81 wrote: > Dear all, > > I am currently stuck with a problem concerning the use of not and > conincide. I want to analyze a stream of error code events from a set of > devices and detect the following situations. Every event has a timestamp > (long), a device id (String) and an error code (String). > > What I want to detect is the following > - If I get two events, one with code C1 and one with C2 from a single > device within 1 minute, it represents a special event combination. The > order of their appearence is not relevant. > - If I just get C1 (without the C2 within the time frame), just report > C1 > - If I just get C2 (without the C1 within the time frame), just report > C2 > > > I can successfully detect the special event combination with the > following rule > > rule "Detect combination" > when > $e1 : Event ($d: device, code == "C1") > $e2 : Event (device == $d, code == "C2", this coincides [1m] $e1) > then > ... do some output > end > > > Then I tried to implement the detection of C1 only as follows > > rule "Detect code C1" > when > $e1 : Event ($d: device, code == "C1") > not ( $e2 : Event (device == $d, code == "C2", this coincides [1m] > $e1)) > then > ... do some other output > end > > My understanding of the rule is that it should fire, if I get the event > with code C1 and there is no other event with error code C2 for the same > device that happens within one minute before and after the C1 event. To > my surprise, the rule fires immediately when I insert an event with > error code C1. Shouldn't the implementation wait at least 1 minute to be > sure that no C2 error event will be inserted? > > > BTW this is how I insert the events in my test case: > > clock.advanceTime(70, TimeUnit.SECONDS); > FactHandle handle1 = ksession.insert( new Event(65000, "A", "C1") ); > ksession.fireAllRules(); > clock.advanceTime( 10, TimeUnit.SECONDS ); > FactHandle handle2 = ksession.insert( new Event(75000, "A", "C2") ); > ksession.fireAllRules(); > clock.advanceTime( 2, TimeUnit.SECONDS ); > > And this is mainly the output I get: > > detected code C1 @ 70000 > event id=44b895e5-7287-404b-8204-3de5690b2360 timestamp=65000 > device=A code=C1 > detected combination @ 80000 > event id=44b895e5-7287-404b-8204-3de5690b2360 timestamp=65000 > device=A code=C1 > event id=fc89715b-fc30-4b12-ab31-a3884dcd4886 timestamp=75000 > device=A code=C2 > > Any ideas concerning an alternative solution are highly welcomed. > > Thanks, > Ingo > > > _______________________________________________ > rules-users mailing list > rules-users at lists.jboss.org > https://lists.jboss.org/mailman/listinfo/rules-users > From wolfgang.laun at gmail.com Fri Dec 6 04:00:07 2013 From: wolfgang.laun at gmail.com (Wolfgang Laun) Date: Fri, 6 Dec 2013 10:00:07 +0100 Subject: [rules-users] got error "unterminated string literal" only with mvel dialect In-Reply-To: <1386260575305-4027116.post@n3.nabble.com> References: <1386260575305-4027116.post@n3.nabble.com> Message-ID: Are you sure that you use the mvel jar that comes with these versions? I can't reproduce this particular error using similar (if not exactly identical) calls. However, the MVEL parser has been exhibiting a number of weird bugs, and I wouldn't be surprised if some particular arrangement of tokens (down to line breaks!) confuses it. FWIW, the simple DRL given below crashes MVEL (using 5.[45].0-Final). Cheers -W dialect "mvel" function String combine( String x, String y ){ return x + y; } rule findinlist when $l1: List() $l2: List( this contains $l1 ) then System.out.println( $l2 + combine( " contains ", $l1.toString() ) ); end On 05/12/2013, brachi wrote: > That is because the ";", if I remove it, the drl is valid. > drools version: 5.4.0.Final also on 5.5.0.Final > > any idea? > > example: > rule "1" > @RuleType(RuleRow) > salience -1 > agenda-group "aaa" > when > $conclusion: FT() > then > addMessage($conclusion.getMessages(), "that is ;message", "1", > "Category2"); > end > > > function void addMessage(Map messages, String message, String rowId, String > category) { > ... > > } > > > > -- > View this message in context: > http://drools.46999.n3.nabble.com/got-error-unterminated-string-literal-only-with-mvel-dialect-tp4027116.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 ml at kofler.me Fri Dec 6 05:56:33 2013 From: ml at kofler.me (IK81) Date: Fri, 06 Dec 2013 11:56:33 +0100 Subject: [rules-users] Semantic of rules with not and coincide In-Reply-To: References: Message-ID: <2850c41eaec22f08e8e23994e618b49a@webmail.kofler.me> Yes, this was my assumption and it is also what I want. I don't care if code C1 is reported before C2 or vice versa. They just have to happen within 1 minute. However, the semantic of coincide in combination with not is unclear to me. Why can the rule fire at event insertion time when the engine does not know if the second event will not happen without waiting for an additional minute? Ingo On 2013-12-06 09:22, Wolfgang Laun wrote: > Coincides is symmetric in time. You might want to use before or > after. > -W > > > On 06/12/2013, IK81 wrote: >> Dear all, >> >> I am currently stuck with a problem concerning the use of not and >> conincide. I want to analyze a stream of error code events from a >> set of >> devices and detect the following situations. Every event has a >> timestamp >> (long), a device id (String) and an error code (String). >> >> What I want to detect is the following >> - If I get two events, one with code C1 and one with C2 from a >> single >> device within 1 minute, it represents a special event combination. >> The >> order of their appearence is not relevant. >> - If I just get C1 (without the C2 within the time frame), just >> report >> C1 >> - If I just get C2 (without the C1 within the time frame), just >> report >> C2 >> >> >> I can successfully detect the special event combination with the >> following rule >> >> rule "Detect combination" >> when >> $e1 : Event ($d: device, code == "C1") >> $e2 : Event (device == $d, code == "C2", this coincides [1m] >> $e1) >> then >> ... do some output >> end >> >> >> Then I tried to implement the detection of C1 only as follows >> >> rule "Detect code C1" >> when >> $e1 : Event ($d: device, code == "C1") >> not ( $e2 : Event (device == $d, code == "C2", this coincides [1m] >> $e1)) >> then >> ... do some other output >> end >> >> My understanding of the rule is that it should fire, if I get the >> event >> with code C1 and there is no other event with error code C2 for the >> same >> device that happens within one minute before and after the C1 event. >> To >> my surprise, the rule fires immediately when I insert an event with >> error code C1. Shouldn't the implementation wait at least 1 minute >> to be >> sure that no C2 error event will be inserted? >> >> >> BTW this is how I insert the events in my test case: >> >> clock.advanceTime(70, TimeUnit.SECONDS); >> FactHandle handle1 = ksession.insert( new Event(65000, "A", "C1") >> ); >> ksession.fireAllRules(); >> clock.advanceTime( 10, TimeUnit.SECONDS ); >> FactHandle handle2 = ksession.insert( new Event(75000, "A", "C2") >> ); >> ksession.fireAllRules(); >> clock.advanceTime( 2, TimeUnit.SECONDS ); >> >> And this is mainly the output I get: >> >> detected code C1 @ 70000 >> event id=44b895e5-7287-404b-8204-3de5690b2360 timestamp=65000 >> device=A code=C1 >> detected combination @ 80000 >> event id=44b895e5-7287-404b-8204-3de5690b2360 timestamp=65000 >> device=A code=C1 >> event id=fc89715b-fc30-4b12-ab31-a3884dcd4886 timestamp=75000 >> device=A code=C2 >> >> Any ideas concerning an alternative solution are highly welcomed. >> >> Thanks, >> Ingo >> >> >> _______________________________________________ >> 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 rkgupta75 at gmail.com Fri Dec 6 07:49:41 2013 From: rkgupta75 at gmail.com (Ravi Gupta) Date: Fri, 6 Dec 2013 06:49:41 -0600 Subject: [rules-users] Semantic of rules with not and coincide In-Reply-To: References: Message-ID: Have a question using drools 6 - I am following the example: Repo looks fine, rules and artifact in: .m2/repository/org/acme/brms/acmepoc/1.0 code seems straightforward: // Install example1 in the local maven repo before to do this KieContainer kContainer = ks.newKieContainer(ks.newReleaseId("org.acme.brms", "acmepoc", "1.0")); but get: Exception in thread "main" java.lang.RuntimeException: Cannot find KieModule: org.acme.brms:acmepoc:1.0 at org.drools.compiler.kie.builder.impl.KieServicesImpl.newKieContainer(KieServicesImpl.java:86) at com.sample.KieContainerFromKieRepoExample.go(KieContainerFromKieRepoExample.java:15) at com.sample.KieContainerFromKieRepoExample.main(KieContainerFromKieRepoExample.java:26) On Thu, Dec 5, 2013 at 5:22 PM, IK81 wrote: > Dear all, > > I am currently stuck with a problem concerning the use of not and > conincide. I want to analyze a stream of error code events from a set of > devices and detect the following situations. Every event has a timestamp > (long), a device id (String) and an error code (String). > > What I want to detect is the following > - If I get two events, one with code C1 and one with C2 from a single > device within 1 minute, it represents a special event combination. The > order of their appearence is not relevant. > - If I just get C1 (without the C2 within the time frame), just report > C1 > - If I just get C2 (without the C1 within the time frame), just report > C2 > > > I can successfully detect the special event combination with the > following rule > > rule "Detect combination" > when > $e1 : Event ($d: device, code == "C1") > $e2 : Event (device == $d, code == "C2", this coincides [1m] $e1) > then > ... do some output > end > > > Then I tried to implement the detection of C1 only as follows > > rule "Detect code C1" > when > $e1 : Event ($d: device, code == "C1") > not ( $e2 : Event (device == $d, code == "C2", this coincides [1m] > $e1)) > then > ... do some other output > end > > My understanding of the rule is that it should fire, if I get the event > with code C1 and there is no other event with error code C2 for the same > device that happens within one minute before and after the C1 event. To > my surprise, the rule fires immediately when I insert an event with > error code C1. Shouldn't the implementation wait at least 1 minute to be > sure that no C2 error event will be inserted? > > > BTW this is how I insert the events in my test case: > > clock.advanceTime(70, TimeUnit.SECONDS); > FactHandle handle1 = ksession.insert( new Event(65000, "A", "C1") > ); > ksession.fireAllRules(); > clock.advanceTime( 10, TimeUnit.SECONDS ); > FactHandle handle2 = ksession.insert( new Event(75000, "A", "C2") > ); > ksession.fireAllRules(); > clock.advanceTime( 2, TimeUnit.SECONDS ); > > And this is mainly the output I get: > > detected code C1 @ 70000 > event id=44b895e5-7287-404b-8204-3de5690b2360 timestamp=65000 > device=A code=C1 > detected combination @ 80000 > event id=44b895e5-7287-404b-8204-3de5690b2360 timestamp=65000 > device=A code=C1 > event id=fc89715b-fc30-4b12-ab31-a3884dcd4886 timestamp=75000 > device=A code=C2 > > Any ideas concerning an alternative solution are highly welcomed. > > Thanks, > Ingo > > > _______________________________________________ > 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/20131206/cc068e76/attachment.html From rkgupta75 at gmail.com Fri Dec 6 08:26:14 2013 From: rkgupta75 at gmail.com (Ravi Gupta) Date: Fri, 6 Dec 2013 07:26:14 -0600 Subject: [rules-users] KieContainer kContainer = ks.newKieContaine .... Message-ID: Have a question using drools 6 - I am following the example: Repo looks fine, rules and artifact in: .m2/repository/org/acme/brms/acmepoc/1.0 code seems straightforward: // Install example1 in the local maven repo before to do this KieContainer kContainer = ks.newKieContainer(ks.newReleaseId("org.acme.brms", "acmepoc", "1.0")); but get: Exception in thread "main" java.lang.RuntimeException: Cannot find KieModule: org.acme.brms:acmepoc:1.0 at org.drools.compiler.kie. builder.impl.KieServicesImpl.newKieContainer(KieServicesImpl.java:86) at com.sample.KieContainerFromKieRepoExample.go(KieContainerFromKieRepoExample.java:15) at com.sample.KieContainerFromKieRepoExample.main(KieContainerFromKieRepoExample.java:26) -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.jboss.org/pipermail/rules-users/attachments/20131206/9e52085a/attachment.html From mproctor at codehaus.org Fri Dec 6 09:39:50 2013 From: mproctor at codehaus.org (Mark Proctor) Date: Fri, 6 Dec 2013 14:39:50 +0000 Subject: [rules-users] 6.0 issue with remote jars and dynamic modules Message-ID: There is problem, fixed in master, for remote jars. The KieRepository currently, when using kie-ci, doesn?t obey the settings.xml active profiles. This means it is not recognising the remote configured repositories. While this is fixed, and we?ll have binaries out in about 2 weeks, it means for now KieRepository can only resolve jars already in the local m2_repo. Mark From dunnlow at yahoo.com Fri Dec 6 10:56:25 2013 From: dunnlow at yahoo.com (dunnlow) Date: Fri, 6 Dec 2013 07:56:25 -0800 (PST) Subject: [rules-users] Entry Point from parameter in Guvnor Decision Table? Message-ID: <1386345385803-4027132.post@n3.nabble.com> Hi, I'm using Guvnor 5.5. I have a decision table and I would like the entry point in each rule created to be based on the value in one of the table elements. I've tried $param in the "From Entry Point" field, but it always just substitutes the string (literal string "$param") in the rule rather than using the value in the element. Is there a way to do this? Thanks, -J -- View this message in context: http://drools.46999.n3.nabble.com/Entry-Point-from-parameter-in-Guvnor-Decision-Table-tp4027132.html Sent from the Drools: User forum mailing list archive at Nabble.com. From clickthex at yahoo.com Fri Dec 6 11:43:11 2013 From: clickthex at yahoo.com (SrjTx) Date: Fri, 6 Dec 2013 08:43:11 -0800 (PST) Subject: [rules-users] Need Help with Enumerations and Classpath In-Reply-To: References: <1386178786060-4027091.post@n3.nabble.com> <1386184365973-4027094.post@n3.nabble.com> Message-ID: <1386348191163-4027133.post@n3.nabble.com> It is in problem panel and will show up in a dropdown sub-window if you validate. -- View this message in context: http://drools.46999.n3.nabble.com/Need-Help-with-Enumerations-and-Classpath-tp4027091p4027133.html Sent from the Drools: User forum mailing list archive at Nabble.com. From clickthex at yahoo.com Fri Dec 6 13:19:58 2013 From: clickthex at yahoo.com (SrjTx) Date: Fri, 6 Dec 2013 10:19:58 -0800 (PST) Subject: [rules-users] 6.0.0: Is this the right way to access DB on LHS? Message-ID: <1386353997715-4027134.post@n3.nabble.com> Before I go down the path of fleshing the rest of this out, I want to know if this is the right approach. I have a database with LOTS of data entries. I have a bean that provides access to that data (ListAccess). It has a method "iHaveOne" that returns true if the argument is contained in the list. Is the following how one should go about this? Other/better ways? package blah; import dba.ListAccess; // bean which access database import goodstuff.Thing; // fact in drools rule "qqq" when $thing:Thing() $listAccess:ListAccess() eval( $listAccess.iHaveOne($thing.id) ) then do stuff end -- View this message in context: http://drools.46999.n3.nabble.com/6-0-0-Is-this-the-right-way-to-access-DB-on-LHS-tp4027134.html Sent from the Drools: User forum mailing list archive at Nabble.com. From mproctor at codehaus.org Fri Dec 6 14:30:25 2013 From: mproctor at codehaus.org (Mark Proctor) Date: Fri, 6 Dec 2013 19:30:25 +0000 Subject: [rules-users] 6.0 issue with remote jars and dynamic modules In-Reply-To: References: Message-ID: <07E07887-A6B9-45ED-994D-15E2CB5C34B0@codehaus.org> the jira https://issues.jboss.org/browse/DROOLS-367 Mark On 6 Dec 2013, at 14:39, Mark Proctor wrote: > There is problem, fixed in master, for remote jars. The KieRepository currently, when using kie-ci, doesn?t obey the settings.xml active profiles. This means it is not recognising the remote configured repositories. > > While this is fixed, and we?ll have binaries out in about 2 weeks, it means for now KieRepository can only resolve jars already in the local m2_repo. > > Mark From martinzp at gmail.com Fri Dec 6 17:54:19 2013 From: martinzp at gmail.com (martinzp) Date: Fri, 6 Dec 2013 14:54:19 -0800 (PST) Subject: [rules-users] Problem with time sliding windows and pseudo clock in Drools Fusion 5.5.0 Message-ID: <1386370459753-4027137.post@n3.nabble.com> Hi, i am new in the forum, and a beginner user of Drools so forgive me if my question isn't quite good. I want to test the "over window:time" operand. In order to do that i use the pseudo clock, but i have noticed that it doesn't behave as i would expect. The behaviour i think i observed, is that the rule is using the real clock instead of the pseudo clock. *Here is my drl file:* rule "Fire Detected" when c : Number(intValue >= 3) from accumulate ( $tr : TemperatureRead(read > 40) over window:time ( 1s ) from entry-point entryone , count ($tr) ) then System.out.println("Fire Detected!"); end *and here is the portion of my main file that inserts the events:* TemperatureRead temp1 = new TemperatureRead(33.2); TemperatureRead temp2 = new TemperatureRead(38.7); TemperatureRead temp3 = new TemperatureRead(39.5); TemperatureRead temp4 = new TemperatureRead(42.5); TemperatureRead temp5 = new TemperatureRead(43.1); TemperatureRead temp6 = new TemperatureRead(47.8); SessionPseudoClock clock = ksession.getSessionClock(); entryPoint1.insert(temp1); clock.advanceTime((new Date()).getTime(), TimeUnit.MILLISECONDS); fireRules(); entryPoint1.insert(temp2); clock.advanceTime(1, TimeUnit.SECONDS); fireRules(); entryPoint1.insert(temp3); clock.advanceTime(1, TimeUnit.SECONDS); fireRules(); entryPoint1.insert(temp4); clock.advanceTime(1, TimeUnit.SECONDS); fireRules(); entryPoint1.insert(temp5); clock.advanceTime(1, TimeUnit.SECONDS); fireRules(); entryPoint1.insert(temp6); fireRules(); In my opinion, the rule shouldn't be fired, because as i am (supposedly) using the pseudo clock, the events shouldn't fall into the same sliding window (1 second.) In general, the rule should fire when it detects 3 or more temperature reads with a temperature over 40. Any idea about what i might be doing wrong? Thanks in advance! -- View this message in context: http://drools.46999.n3.nabble.com/Problem-with-time-sliding-windows-and-pseudo-clock-in-Drools-Fusion-5-5-0-tp4027137.html Sent from the Drools: User forum mailing list archive at Nabble.com. From wtang at kana.com Fri Dec 6 19:41:37 2013 From: wtang at kana.com (wtang) Date: Fri, 6 Dec 2013 16:41:37 -0800 (PST) Subject: [rules-users] Drools 6 support for changeset Message-ID: <1386376897778-4027138.post@n3.nabble.com> I have a requirement in which when a rule is changed, the change needs to be reflected immediately without retarting the system. In Drools 5.x we can use the changeset.xml with the knowlegde agent. Now in Drool 6.0 we have Kie API. 1) does Kie support changeset.xml? 2) Upper management don't want to use kie, they want to use jsr94. Does jsr94 support changeset.xml? -- View this message in context: http://drools.46999.n3.nabble.com/Drools-6-support-for-changeset-tp4027138.html Sent from the Drools: User forum mailing list archive at Nabble.com. From mproctor at codehaus.org Fri Dec 6 19:54:46 2013 From: mproctor at codehaus.org (Mark Proctor) Date: Sat, 7 Dec 2013 00:54:46 +0000 Subject: [rules-users] Drools 6 support for changeset In-Reply-To: <1386376897778-4027138.post@n3.nabble.com> References: <1386376897778-4027138.post@n3.nabble.com> Message-ID: On 7 Dec 2013, at 00:41, wtang wrote: > > I have a requirement in which when a rule is changed, the change needs to be > reflected immediately without retarting the system. > > In Drools 5.x we can use the changeset.xml with the knowlegde agent. Now in > Drool 6.0 we have Kie API. > > 1) does Kie support changeset.xml? > In 5.x you had to do this manually. This is now automated in 6.x, there is no need for a change set. > 2) Upper management don't want to use kie, they want to use jsr94. Does > jsr94 support changeset.xml? no Mark > > > > -- > View this message in context: http://drools.46999.n3.nabble.com/Drools-6-support-for-changeset-tp4027138.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 anjana.ackroyd at gmail.com Fri Dec 6 22:01:33 2013 From: anjana.ackroyd at gmail.com (anjana.ackroyd) Date: Fri, 6 Dec 2013 19:01:33 -0800 (PST) Subject: [rules-users] Guvnor 6.0 download and Example Code Message-ID: <1386385293208-4027140.post@n3.nabble.com> I am having a hard time finding a link to download Guvnor 6.0 . Can any please help me find it? Also I am looking for an example code where I can read drl file created in Guvnor 6.0 using KIE I can find examples for 5.5.0 KnowledgeAgent kagent = KnowledgeAgentFactory.newKnowledgeAgent( "myAgent1" ); kagent.applyChangeSet( ResourceFactory.newUrlResource("http://localhost:8080/jboss-brms/org.drools.guvnor.Guvnor/package/pop.blah.test/CAR/LATEST")); KnowledgeBase kbase = kagent.getKnowledgeBase(); StatefulKnowledgeSession ksession = kbase.newStatefulKnowledgeSession(); ResourceFactory.getResourceChangeScannerService().start(); -- View this message in context: http://drools.46999.n3.nabble.com/Guvnor-6-0-download-and-Example-Code-tp4027140.html Sent from the Drools: User forum mailing list archive at Nabble.com. From profversaggi at gmail.com Sat Dec 7 00:46:48 2013 From: profversaggi at gmail.com (profversaggi) Date: Fri, 6 Dec 2013 21:46:48 -0800 (PST) Subject: [rules-users] Drools Camel Server 6X Changes .... Message-ID: <1386395208670-4027141.post@n3.nabble.com> With the new 6X vintage the Spring API has changed a good deal. How does that impact the Drools Camel Server War? More importantly, does anyone have a working example of a 'proper' Drools Camel Server 6X integration or Spring Integration they can share. I could use a kick starter on how to get Drools working online behind a web interface. Many thanks in advance .... -- View this message in context: http://drools.46999.n3.nabble.com/Drools-Camel-Server-6X-Changes-tp4027141.html Sent from the Drools: User forum mailing list archive at Nabble.com. From nkhogen at gmail.com Sat Dec 7 03:01:43 2013 From: nkhogen at gmail.com (nkhogen) Date: Sat, 7 Dec 2013 00:01:43 -0800 (PST) Subject: [rules-users] Time and Date Picker in Guvnor 5.5.0.Final Decision Table Message-ID: <1386403303103-4027142.post@n3.nabble.com> Hi, I am trying to achieve time selection in the web guided decision table of Guvnor 5.5.0.Final. The preferences.properties files has been updated to have drools.dateformat=dd-MMM-yyyy hh:mm:ss . When the cell (of java.util.Date type) in the DT is clicked, the calendar pops up but it has only days, years and months. When a day is selected, the cell value shows time of 06-Dec-2013 12:00 and it is not editable. It does not make sense to show the time when the time cannot be modified at all. Is there a way to include time as well in the date picker? org.drools.guvnor.client.common.DatePickerPopUp.java has logic to show time but somehow it is not used in decision table. Thanks. -- View this message in context: http://drools.46999.n3.nabble.com/Time-and-Date-Picker-in-Guvnor-5-5-0-Final-Decision-Table-tp4027142.html Sent from the Drools: User forum mailing list archive at Nabble.com. From michael.anstis at gmail.com Sat Dec 7 03:29:24 2013 From: michael.anstis at gmail.com (Michael Anstis) Date: Sat, 7 Dec 2013 08:29:24 +0000 Subject: [rules-users] Time and Date Picker in Guvnor 5.5.0.Final Decision Table In-Reply-To: <1386403303103-4027142.post@n3.nabble.com> References: <1386403303103-4027142.post@n3.nabble.com> Message-ID: Support for time remains outstanding. I think we already have a JIRA for it. Why not get involved and provide a pull request completing date/time support? Sent on the move On 7 Dec 2013 08:02, "nkhogen" wrote: > Hi, > > I am trying to achieve time selection in the web guided decision table of > Guvnor 5.5.0.Final. The preferences.properties files has been updated to > have drools.dateformat=dd-MMM-yyyy hh:mm:ss . When the cell (of > java.util.Date type) in the DT is clicked, the calendar pops up but it has > only days, years and months. When a day is selected, the cell value shows > time of 06-Dec-2013 12:00 and it is not editable. It does not make sense to > show the time when the time cannot be modified at all. > > Is there a way to include time as well in the date picker? > org.drools.guvnor.client.common.DatePickerPopUp.java has logic to show time > but somehow it is not used in decision table. > > Thanks. > > > > -- > View this message in context: > http://drools.46999.n3.nabble.com/Time-and-Date-Picker-in-Guvnor-5-5-0-Final-Decision-Table-tp4027142.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/20131207/5a30804e/attachment.html From michael.anstis at gmail.com Sat Dec 7 03:31:34 2013 From: michael.anstis at gmail.com (Michael Anstis) Date: Sat, 7 Dec 2013 08:31:34 +0000 Subject: [rules-users] Guvnor 6.0 download and Example Code In-Reply-To: <1386385293208-4027140.post@n3.nabble.com> References: <1386385293208-4027140.post@n3.nabble.com> Message-ID: You need to use KieScanner now. There have been alot of emails about this recently; more details should not be hard to find. Sent on the move On 7 Dec 2013 03:02, "anjana.ackroyd" wrote: > I am having a hard time finding a link to download Guvnor 6.0 . Can any > please help me find it? > > Also I am looking for an example code where I can read drl file created in > Guvnor 6.0 using KIE > > I can find examples for 5.5.0 > > > KnowledgeAgent kagent = KnowledgeAgentFactory.newKnowledgeAgent( > "myAgent1" > ); > kagent.applyChangeSet( > ResourceFactory.newUrlResource(" > http://localhost:8080/jboss-brms/org.drools.guvnor.Guvnor/package/pop.blah.test/CAR/LATEST > ")); > KnowledgeBase kbase = kagent.getKnowledgeBase(); > StatefulKnowledgeSession ksession = > kbase.newStatefulKnowledgeSession(); > ResourceFactory.getResourceChangeScannerService().start(); > > > > -- > View this message in context: > http://drools.46999.n3.nabble.com/Guvnor-6-0-download-and-Example-Code-tp4027140.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/20131207/88957a87/attachment.html From michael.anstis at gmail.com Sat Dec 7 06:51:38 2013 From: michael.anstis at gmail.com (Michael Anstis) Date: Sat, 7 Dec 2013 11:51:38 +0000 Subject: [rules-users] Need Help with Enumerations and Classpath In-Reply-To: <1386348191163-4027133.post@n3.nabble.com> References: <1386178786060-4027091.post@n3.nabble.com> <1386184365973-4027094.post@n3.nabble.com> <1386348191163-4027133.post@n3.nabble.com> Message-ID: Can you try the "old" way? (Adding the JAR to the web servers classpath, i.e. add to /lib). This looks like a classpath issue. Can you raise a JIRA too (for GUVNOR) as it should work too if the JAR containing your helper is a project dependency. Thanks Sent on the move On 6 Dec 2013 16:43, "SrjTx" wrote: > It is in problem panel and will show up in a dropdown sub-window if you > validate. > > > > -- > View this message in context: > http://drools.46999.n3.nabble.com/Need-Help-with-Enumerations-and-Classpath-tp4027091p4027133.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/20131207/1356da0d/attachment.html From nelson.wan at hotmail.com Sat Dec 7 11:16:54 2013 From: nelson.wan at hotmail.com (nelson.wan) Date: Sat, 7 Dec 2013 08:16:54 -0800 (PST) Subject: [rules-users] Drools 6 - "kie-config-cli" seems not working with "kie-drools-wb" Message-ID: <1386433014001-4027146.post@n3.nabble.com> I downloaded kie-config-cli from below link, and built without issue: https://github.com/droolsjbpm/kie-wb-distributions I used EAP 6.1, with add-user.bat, added: username: developer role: developer With kie-config-cli, performed: - Add role "developer" to my project, repository and organization unit Now, logon to kie-drools-wb 6.1.0.snapshot using user "developer", error is shown below: Login failed: Not Authorized Hope to see if I missed any step or this is a possible bug. Many thanks. -- View this message in context: http://drools.46999.n3.nabble.com/Drools-6-kie-config-cli-seems-not-working-with-kie-drools-wb-tp4027146.html Sent from the Drools: User forum mailing list archive at Nabble.com. From michael.anstis at gmail.com Sat Dec 7 11:22:39 2013 From: michael.anstis at gmail.com (Michael Anstis) Date: Sat, 7 Dec 2013 16:22:39 +0000 Subject: [rules-users] Drools 6 - "kie-config-cli" seems not working with "kie-drools-wb" In-Reply-To: <1386433014001-4027146.post@n3.nabble.com> References: <1386433014001-4027146.post@n3.nabble.com> Message-ID: There are 2 predefined roles one of which your user needs to have; admin or analyst (there are more predefined roles for kie-wb). Adding role "developer" to your OU, Repository and Project provides a way to restrict further access of the predefined roles. Sent on the move On 7 Dec 2013 16:17, "nelson.wan" wrote: > > I downloaded kie-config-cli from below link, and built without issue: > https://github.com/droolsjbpm/kie-wb-distributions > > I used EAP 6.1, with add-user.bat, added: > username: developer > role: developer > > With kie-config-cli, performed: > - Add role "developer" to my project, repository and organization unit > > Now, logon to kie-drools-wb 6.1.0.snapshot using user "developer", error is > shown below: > Login failed: Not Authorized > > Hope to see if I missed any step or this is a possible bug. Many thanks. > > > > > > -- > View this message in context: > http://drools.46999.n3.nabble.com/Drools-6-kie-config-cli-seems-not-working-with-kie-drools-wb-tp4027146.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/20131207/97343220/attachment-0001.html From brachi.w at sapiens.com Sun Dec 8 05:00:50 2013 From: brachi.w at sapiens.com (brachi) Date: Sun, 8 Dec 2013 02:00:50 -0800 (PST) Subject: [rules-users] got error "unterminated string literal" only with mvel dialect In-Reply-To: References: <1386260575305-4027116.post@n3.nabble.com> Message-ID: <1386496850842-4027148.post@n3.nabble.com> this solve it: ... then String message="that is ;message"; addMessage($conclusion.getMessages(), message, "1", "Category2"); end -- View this message in context: http://drools.46999.n3.nabble.com/got-error-unterminated-string-literal-only-with-mvel-dialect-tp4027116p4027148.html Sent from the Drools: User forum mailing list archive at Nabble.com. From wolfgang.laun at gmail.com Sun Dec 8 13:29:40 2013 From: wolfgang.laun at gmail.com (Wolfgang Laun) Date: Sun, 8 Dec 2013 19:29:40 +0100 Subject: [rules-users] Semantic of rules with not and coincide In-Reply-To: <2850c41eaec22f08e8e23994e618b49a@webmail.kofler.me> References: <2850c41eaec22f08e8e23994e618b49a@webmail.kofler.me> Message-ID: The "second" event hasn't happened at the time the first has happened. Thus, the negation (no Event coincides) *is* true. Perhaps it helps to read "not" as "does not exist" (which is what it actually stands for) when looking at the rule. Indeed, there *is* no coinciding event at the time the Event is inserted. -W On 06/12/2013, IK81 wrote: > Yes, this was my assumption and it is also what I want. I don't care if > code C1 is reported before C2 or vice versa. They just have to happen > within 1 minute. > > However, the semantic of coincide in combination with not is unclear to > me. Why can the rule fire > at event insertion time when the engine does not know if the second > event will not happen without > waiting for an additional minute? > > Ingo > > On 2013-12-06 09:22, Wolfgang Laun wrote: >> Coincides is symmetric in time. You might want to use before or >> after. >> -W >> >> >> On 06/12/2013, IK81 wrote: >>> Dear all, >>> >>> I am currently stuck with a problem concerning the use of not and >>> conincide. I want to analyze a stream of error code events from a >>> set of >>> devices and detect the following situations. Every event has a >>> timestamp >>> (long), a device id (String) and an error code (String). >>> >>> What I want to detect is the following >>> - If I get two events, one with code C1 and one with C2 from a >>> single >>> device within 1 minute, it represents a special event combination. >>> The >>> order of their appearence is not relevant. >>> - If I just get C1 (without the C2 within the time frame), just >>> report >>> C1 >>> - If I just get C2 (without the C1 within the time frame), just >>> report >>> C2 >>> >>> >>> I can successfully detect the special event combination with the >>> following rule >>> >>> rule "Detect combination" >>> when >>> $e1 : Event ($d: device, code == "C1") >>> $e2 : Event (device == $d, code == "C2", this coincides [1m] >>> $e1) >>> then >>> ... do some output >>> end >>> >>> >>> Then I tried to implement the detection of C1 only as follows >>> >>> rule "Detect code C1" >>> when >>> $e1 : Event ($d: device, code == "C1") >>> not ( $e2 : Event (device == $d, code == "C2", this coincides [1m] >>> $e1)) >>> then >>> ... do some other output >>> end >>> >>> My understanding of the rule is that it should fire, if I get the >>> event >>> with code C1 and there is no other event with error code C2 for the >>> same >>> device that happens within one minute before and after the C1 event. >>> To >>> my surprise, the rule fires immediately when I insert an event with >>> error code C1. Shouldn't the implementation wait at least 1 minute >>> to be >>> sure that no C2 error event will be inserted? >>> >>> >>> BTW this is how I insert the events in my test case: >>> >>> clock.advanceTime(70, TimeUnit.SECONDS); >>> FactHandle handle1 = ksession.insert( new Event(65000, "A", "C1") >>> ); >>> ksession.fireAllRules(); >>> clock.advanceTime( 10, TimeUnit.SECONDS ); >>> FactHandle handle2 = ksession.insert( new Event(75000, "A", "C2") >>> ); >>> ksession.fireAllRules(); >>> clock.advanceTime( 2, TimeUnit.SECONDS ); >>> >>> And this is mainly the output I get: >>> >>> detected code C1 @ 70000 >>> event id=44b895e5-7287-404b-8204-3de5690b2360 timestamp=65000 >>> device=A code=C1 >>> detected combination @ 80000 >>> event id=44b895e5-7287-404b-8204-3de5690b2360 timestamp=65000 >>> device=A code=C1 >>> event id=fc89715b-fc30-4b12-ab31-a3884dcd4886 timestamp=75000 >>> device=A code=C2 >>> >>> Any ideas concerning an alternative solution are highly welcomed. >>> >>> Thanks, >>> Ingo >>> >>> >>> _______________________________________________ >>> 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 matteo.mortari at gmail.com Sun Dec 8 14:00:58 2013 From: matteo.mortari at gmail.com (Matteo Mortari) Date: Sun, 8 Dec 2013 20:00:58 +0100 Subject: [rules-users] Problem with time sliding windows and pseudo clock in Drools Fusion 5.5.0 In-Reply-To: <1386370459753-4027137.post@n3.nabble.com> References: <1386370459753-4027137.post@n3.nabble.com> Message-ID: Ciao, not really sure where is your problem exactly, but as I use often similar use-case of yours, thought worthy to share what I usually find useful: 1. check STREAM mode is activated 2. check in the .drl is clearly defined what is a Fact, and what is an Event. In your case I would check TemperatureRead is declared as Event? 3. activate Audit log / runtime logger. I find especially useful point #3 because you will see, as the session clock advances, what is still in working memory and when rule is activated you will see against which Event/Facts. Hope this is helpful Ciao MM On Fri, Dec 6, 2013 at 11:54 PM, martinzp wrote: > Hi, i am new in the forum, and a beginner user of Drools so forgive me if > my > question isn't quite good. > > I want to test the "over window:time" operand. > > In order to do that i use the pseudo clock, but i have noticed that it > doesn't behave as i would expect. > > The behaviour i think i observed, is that the rule is using the real clock > instead of the pseudo clock. > > *Here is my drl file:* > > rule "Fire Detected" > when > c : Number(intValue >= 3) from accumulate ( > $tr : TemperatureRead(read > 40) > over window:time ( 1s ) > from entry-point entryone , > count ($tr) > ) > then > System.out.println("Fire Detected!"); > end > > > > *and here is the portion of my main file that inserts the events:* > > TemperatureRead temp1 = new TemperatureRead(33.2); > TemperatureRead temp2 = new TemperatureRead(38.7); > TemperatureRead temp3 = new TemperatureRead(39.5); > TemperatureRead temp4 = new TemperatureRead(42.5); > TemperatureRead temp5 = new TemperatureRead(43.1); > TemperatureRead temp6 = new TemperatureRead(47.8); > > SessionPseudoClock clock = ksession.getSessionClock(); > > entryPoint1.insert(temp1); > > clock.advanceTime((new Date()).getTime(), TimeUnit.MILLISECONDS); > > fireRules(); > > entryPoint1.insert(temp2); > > clock.advanceTime(1, TimeUnit.SECONDS); > > fireRules(); > > entryPoint1.insert(temp3); > > clock.advanceTime(1, TimeUnit.SECONDS); > > fireRules(); > > entryPoint1.insert(temp4); > > clock.advanceTime(1, TimeUnit.SECONDS); > > fireRules(); > > entryPoint1.insert(temp5); > > clock.advanceTime(1, TimeUnit.SECONDS); > > fireRules(); > > entryPoint1.insert(temp6); > > fireRules(); > > > > > > In my opinion, the rule shouldn't be fired, because as i am (supposedly) > using the pseudo clock, the events shouldn't fall into the same sliding > window (1 second.) > > In general, the rule should fire when it detects 3 or more temperature > reads > with a temperature over 40. > > Any idea about what i might be doing wrong? > > Thanks in advance! > > > > > > > > -- > View this message in context: > http://drools.46999.n3.nabble.com/Problem-with-time-sliding-windows-and-pseudo-clock-in-Drools-Fusion-5-5-0-tp4027137.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/20131208/47e98e65/attachment.html From anjana.ackroyd at gmail.com Sun Dec 8 15:51:22 2013 From: anjana.ackroyd at gmail.com (anjana.ackroyd) Date: Sun, 8 Dec 2013 12:51:22 -0800 (PST) Subject: [rules-users] How to insert values into drl Message-ID: <1386535882621-4027151.post@n3.nabble.com> Hi, I am new to drools and trying to figure out how to get this simple example working. I have intellij IDE . I am trying to compare two numbers using drools 6.x and dont know how to insert numberone and numbertwo after I get my drl file into my file system Here is my code RuleRunner.java package com.cambiahealth.enterprise.service.droolsrule; import org.kie.api.KieServices; import org.kie.api.builder.KieBuilder; import org.kie.api.builder.KieFileSystem; import org.kie.api.builder.KieRepository; import org.kie.api.builder.Message.Level; import org.kie.api.io.KieResources; import org.kie.api.io.Resource; import org.kie.api.runtime.KieContainer; import org.kie.api.runtime.KieSession; public class RuleRunner { private KieServices kieServices; private KieContainer kieContainer; private KieSession kieSession; private KieResources kieResources; private KieFileSystem kieFileSystem; private KieRepository kieRepository; public RuleRunner() { this.kieServices = KieServices.Factory.get(); this.kieResources = kieServices.getResources(); this.kieFileSystem = kieServices.newKieFileSystem(); this.kieRepository = kieServices.getRepository(); } public void addRuleFile(String packagename, String rulefile) { Resource resource = kieResources.newClassPathResource(rulefile); packagename = packagename.replace(".","/"); String resourcepath = "src/main/resources/"+packagename+"/"+rulefile; kieFileSystem.write(resourcepath, resource); } public KieSession buildKnowledgeSession() { KieBuilder kb = kieServices.newKieBuilder(kieFileSystem); kb.buildAll(); if (kb.getResults().hasMessages(Level.ERROR)) { throw new RuntimeException("Build Errors:\n" + kb.getResults().toString()); } kieContainer = kieServices.newKieContainer(kieRepository.getDefaultReleaseId()); kieSession = this.kieContainer.newKieSession(); return kieSession; } public KieSession fireAllRules() { kieSession.fireAllRules(); return kieSession; } public void dispose() { this.kieSession.dispose(); } } My numbercompare.drl 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 My DroolsService.java where I want to pass in values 1 and 2 to the drl file runner.addRuleFile("drools", "compareNumberRule.drl"); KieSession kieSession = runner.buildKnowledgeSession(); //How do I pass 1 as numberone and 2 as numbertwo values ????? before firerules runner.fireAllRules(); runner.dispose(); return number.getMessage(); //To change body of implemented methods use File | Settings | File Templates. } } -- View this message in context: http://drools.46999.n3.nabble.com/How-to-insert-values-into-drl-tp4027151.html Sent from the Drools: User forum mailing list archive at Nabble.com. From michael.anstis at gmail.com Sun Dec 8 16:30:47 2013 From: michael.anstis at gmail.com (Michael Anstis) Date: Sun, 8 Dec 2013 21:30:47 +0000 Subject: [rules-users] How to insert values into drl In-Reply-To: <1386535882621-4027151.post@n3.nabble.com> References: <1386535882621-4027151.post@n3.nabble.com> Message-ID: You need to use kiesession.insert( object ). Sent on the move On 8 Dec 2013 20:52, "anjana.ackroyd" wrote: > Hi, > I am new to drools and trying to figure out how to get this simple example > working. > I have intellij IDE . > I am trying to compare two numbers using drools 6.x and dont know how to > insert numberone and numbertwo after I get my drl file into my file system > > Here is my code > > RuleRunner.java > package com.cambiahealth.enterprise.service.droolsrule; > > import org.kie.api.KieServices; > import org.kie.api.builder.KieBuilder; > import org.kie.api.builder.KieFileSystem; > import org.kie.api.builder.KieRepository; > import org.kie.api.builder.Message.Level; > import org.kie.api.io.KieResources; > import org.kie.api.io.Resource; > import org.kie.api.runtime.KieContainer; > import org.kie.api.runtime.KieSession; > > public class RuleRunner > { > private KieServices kieServices; > private KieContainer kieContainer; > private KieSession kieSession; > private KieResources kieResources; > private KieFileSystem kieFileSystem; > private KieRepository kieRepository; > > public RuleRunner() > { > this.kieServices = KieServices.Factory.get(); > this.kieResources = kieServices.getResources(); > this.kieFileSystem = kieServices.newKieFileSystem(); > this.kieRepository = kieServices.getRepository(); > } > > > public void addRuleFile(String packagename, String rulefile) > { > Resource resource = kieResources.newClassPathResource(rulefile); > > packagename = packagename.replace(".","/"); > > String resourcepath = > "src/main/resources/"+packagename+"/"+rulefile; > > kieFileSystem.write(resourcepath, resource); > } > > public KieSession buildKnowledgeSession() > { > KieBuilder kb = kieServices.newKieBuilder(kieFileSystem); > > kb.buildAll(); > > if (kb.getResults().hasMessages(Level.ERROR)) > { > throw new RuntimeException("Build Errors:\n" + > kb.getResults().toString()); > } > > kieContainer = > kieServices.newKieContainer(kieRepository.getDefaultReleaseId()); > > kieSession = this.kieContainer.newKieSession(); > > return kieSession; > } > > public KieSession fireAllRules() > { > kieSession.fireAllRules(); > > return kieSession; > } > > public void dispose() > { > this.kieSession.dispose(); > } > } > > > > > > > My numbercompare.drl > > > 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 > > > > > > > > > > My DroolsService.java where I want to pass in values 1 and 2 to the drl > file > > > runner.addRuleFile("drools", "compareNumberRule.drl"); > > KieSession kieSession = runner.buildKnowledgeSession(); > //How do I pass 1 as numberone and 2 as numbertwo values ????? before > firerules > runner.fireAllRules(); > runner.dispose(); > return number.getMessage(); //To change body of implemented > methods > use File | Settings | File Templates. > } > } > > > > -- > View this message in context: > http://drools.46999.n3.nabble.com/How-to-insert-values-into-drl-tp4027151.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/20131208/078be9e8/attachment-0001.html From profversaggi at gmail.com Mon Dec 9 01:09:04 2013 From: profversaggi at gmail.com (profversaggi) Date: Sun, 8 Dec 2013 22:09:04 -0800 (PST) Subject: [rules-users] Where is org.drools.server package for camel server? In-Reply-To: <1342467673147-4018720.post@n3.nabble.com> References: <1342200328759-4018668.post@n3.nabble.com> <1342463859371-4018719.post@n3.nabble.com> <1342467673147-4018720.post@n3.nabble.com> Message-ID: <1386569344287-4027153.post@n3.nabble.com> I was able to get the org.drools.server.java file but then what do you do with it? One can't just drop the file in the directory structure of the WAR on the server? What is the 'proper' thing to do? Many thanks in advance .... -- View this message in context: http://drools.46999.n3.nabble.com/Where-is-org-drools-server-package-for-camel-server-tp4018668p4027153.html Sent from the Drools: User forum mailing list archive at Nabble.com. From wolfgang.laun at gmail.com Mon Dec 9 02:03:48 2013 From: wolfgang.laun at gmail.com (Wolfgang Laun) Date: Mon, 9 Dec 2013 08:03:48 +0100 Subject: [rules-users] How to insert values into drl In-Reply-To: <1386535882621-4027151.post@n3.nabble.com> References: <1386535882621-4027151.post@n3.nabble.com> Message-ID: You'll have to something like FactType factType = kieContainer.getKieBase().getFactType( packagename, "NumberCompare" ); Now you may Object nc = factType.newInstance(); factType.set( nc, "numberone", Integer.valueOf( 42 ) ); ... kieSession.insert( nc ); Of course, declaring and instantiating a POJO causes much less headscratching, so why don't you do that? -W On 08/12/2013, anjana.ackroyd wrote: > Hi, > I am new to drools and trying to figure out how to get this simple example > working. > I have intellij IDE . > I am trying to compare two numbers using drools 6.x and dont know how to > insert numberone and numbertwo after I get my drl file into my file system > > Here is my code > > RuleRunner.java > package com.cambiahealth.enterprise.service.droolsrule; > > import org.kie.api.KieServices; > import org.kie.api.builder.KieBuilder; > import org.kie.api.builder.KieFileSystem; > import org.kie.api.builder.KieRepository; > import org.kie.api.builder.Message.Level; > import org.kie.api.io.KieResources; > import org.kie.api.io.Resource; > import org.kie.api.runtime.KieContainer; > import org.kie.api.runtime.KieSession; > > public class RuleRunner > { > private KieServices kieServices; > private KieContainer kieContainer; > private KieSession kieSession; > private KieResources kieResources; > private KieFileSystem kieFileSystem; > private KieRepository kieRepository; > > public RuleRunner() > { > this.kieServices = KieServices.Factory.get(); > this.kieResources = kieServices.getResources(); > this.kieFileSystem = kieServices.newKieFileSystem(); > this.kieRepository = kieServices.getRepository(); > } > > > public void addRuleFile(String packagename, String rulefile) > { > Resource resource = kieResources.newClassPathResource(rulefile); > > packagename = packagename.replace(".","/"); > > String resourcepath = > "src/main/resources/"+packagename+"/"+rulefile; > > kieFileSystem.write(resourcepath, resource); > } > > public KieSession buildKnowledgeSession() > { > KieBuilder kb = kieServices.newKieBuilder(kieFileSystem); > > kb.buildAll(); > > if (kb.getResults().hasMessages(Level.ERROR)) > { > throw new RuntimeException("Build Errors:\n" + > kb.getResults().toString()); > } > > kieContainer = > kieServices.newKieContainer(kieRepository.getDefaultReleaseId()); > > kieSession = this.kieContainer.newKieSession(); > > return kieSession; > } > > public KieSession fireAllRules() > { > kieSession.fireAllRules(); > > return kieSession; > } > > public void dispose() > { > this.kieSession.dispose(); > } > } > > > > > > > My numbercompare.drl > > > 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 > > > > > > > > > > My DroolsService.java where I want to pass in values 1 and 2 to the drl > file > > > runner.addRuleFile("drools", "compareNumberRule.drl"); > > KieSession kieSession = runner.buildKnowledgeSession(); > //How do I pass 1 as numberone and 2 as numbertwo values ????? before > firerules > runner.fireAllRules(); > runner.dispose(); > return number.getMessage(); //To change body of implemented > methods > use File | Settings | File Templates. > } > } > > > > -- > View this message in context: > http://drools.46999.n3.nabble.com/How-to-insert-values-into-drl-tp4027151.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 ml at kofler.me Mon Dec 9 03:19:55 2013 From: ml at kofler.me (IK81) Date: Mon, 09 Dec 2013 09:19:55 +0100 Subject: [rules-users] Semantic of rules with not and coincide In-Reply-To: References: <2850c41eaec22f08e8e23994e618b49a@webmail.kofler.me> Message-ID: Thanks a lot for clarification. My naive interpretation was that coincide with a is a combination of before and after. Best regards, Ingo On 2013-12-08 19:29, Wolfgang Laun wrote: > The "second" event hasn't happened at the time the first has > happened. > Thus, the negation (no Event coincides) *is* true. > > Perhaps it helps to read "not" as "does not exist" (which is what it > actually stands for) when looking at the rule. Indeed, there *is* no > coinciding event at the time the Event is inserted. > > -W > > > On 06/12/2013, IK81 wrote: >> Yes, this was my assumption and it is also what I want. I don't care >> if >> code C1 is reported before C2 or vice versa. They just have to >> happen >> within 1 minute. >> >> However, the semantic of coincide in combination with not is unclear >> to >> me. Why can the rule fire >> at event insertion time when the engine does not know if the second >> event will not happen without >> waiting for an additional minute? >> >> Ingo >> >> On 2013-12-06 09:22, Wolfgang Laun wrote: >>> Coincides is symmetric in time. You might want to use before or >>> after. >>> -W >>> >>> >>> On 06/12/2013, IK81 wrote: >>>> Dear all, >>>> >>>> I am currently stuck with a problem concerning the use of not and >>>> conincide. I want to analyze a stream of error code events from a >>>> set of >>>> devices and detect the following situations. Every event has a >>>> timestamp >>>> (long), a device id (String) and an error code (String). >>>> >>>> What I want to detect is the following >>>> - If I get two events, one with code C1 and one with C2 from a >>>> single >>>> device within 1 minute, it represents a special event combination. >>>> The >>>> order of their appearence is not relevant. >>>> - If I just get C1 (without the C2 within the time frame), just >>>> report >>>> C1 >>>> - If I just get C2 (without the C1 within the time frame), just >>>> report >>>> C2 >>>> >>>> >>>> I can successfully detect the special event combination with the >>>> following rule >>>> >>>> rule "Detect combination" >>>> when >>>> $e1 : Event ($d: device, code == "C1") >>>> $e2 : Event (device == $d, code == "C2", this coincides [1m] >>>> $e1) >>>> then >>>> ... do some output >>>> end >>>> >>>> >>>> Then I tried to implement the detection of C1 only as follows >>>> >>>> rule "Detect code C1" >>>> when >>>> $e1 : Event ($d: device, code == "C1") >>>> not ( $e2 : Event (device == $d, code == "C2", this coincides >>>> [1m] >>>> $e1)) >>>> then >>>> ... do some other output >>>> end >>>> >>>> My understanding of the rule is that it should fire, if I get the >>>> event >>>> with code C1 and there is no other event with error code C2 for >>>> the >>>> same >>>> device that happens within one minute before and after the C1 >>>> event. >>>> To >>>> my surprise, the rule fires immediately when I insert an event >>>> with >>>> error code C1. Shouldn't the implementation wait at least 1 minute >>>> to be >>>> sure that no C2 error event will be inserted? >>>> >>>> >>>> BTW this is how I insert the events in my test case: >>>> >>>> clock.advanceTime(70, TimeUnit.SECONDS); >>>> FactHandle handle1 = ksession.insert( new Event(65000, "A", "C1") >>>> ); >>>> ksession.fireAllRules(); >>>> clock.advanceTime( 10, TimeUnit.SECONDS ); >>>> FactHandle handle2 = ksession.insert( new Event(75000, "A", "C2") >>>> ); >>>> ksession.fireAllRules(); >>>> clock.advanceTime( 2, TimeUnit.SECONDS ); >>>> >>>> And this is mainly the output I get: >>>> >>>> detected code C1 @ 70000 >>>> event id=44b895e5-7287-404b-8204-3de5690b2360 timestamp=65000 >>>> device=A code=C1 >>>> detected combination @ 80000 >>>> event id=44b895e5-7287-404b-8204-3de5690b2360 timestamp=65000 >>>> device=A code=C1 >>>> event id=fc89715b-fc30-4b12-ab31-a3884dcd4886 timestamp=75000 >>>> device=A code=C2 >>>> >>>> Any ideas concerning an alternative solution are highly welcomed. >>>> >>>> Thanks, >>>> Ingo >>>> >>>> >>>> _______________________________________________ >>>> 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 Mon Dec 9 04:13:23 2013 From: michael.anstis at gmail.com (Michael Anstis) Date: Mon, 9 Dec 2013 09:13:23 +0000 Subject: [rules-users] Entry Point from parameter in Guvnor Decision Table? In-Reply-To: <1386345385803-4027132.post@n3.nabble.com> References: <1386345385803-4027132.post@n3.nabble.com> Message-ID: Are you using a XLS decision table or a web one? On 6 December 2013 15:56, dunnlow wrote: > Hi, I'm using Guvnor 5.5. I have a decision table and I would like the > entry > point in each rule created to be based on the value in one of the table > elements. I've tried $param in the "From Entry Point" field, but it always > just substitutes the string (literal string "$param") in the rule rather > than using the value in the element. > > Is there a way to do this? > > Thanks, > -J > > > > -- > View this message in context: > http://drools.46999.n3.nabble.com/Entry-Point-from-parameter-in-Guvnor-Decision-Table-tp4027132.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/20131209/eee3cf9e/attachment.html From igrachev at abv.bg Mon Dec 9 07:10:18 2013 From: igrachev at abv.bg (milen igrachev) Date: Mon, 9 Dec 2013 14:10:18 +0200 (EET) Subject: [rules-users] How to call Drools as a remote rules executor Message-ID: <245619576.267600.1386591018938.JavaMail.apache@nm3.abv.bg> Hello , What I want to do is use java and Drools for its nice rule engine capabilities. Currently I am not using java for my project. I have some implementation business classes and implemented logics that works fine for me, but I want to externalize the rules in BRMS. I gave Drools a try and I like it a lot. However I encounter one obsticle that I want to ask if I can skip. I read most of the Drools documentation and across the net in all the examples that are given we actually need the implementation business classes in order to instantiate facts that we want to feed to the Drools KieSession . Well what I want is not to duplicate my class model in both my (non java) project and my java Drools project. All I want to keep in my Drools project is the Rules themselves. So is that possible, or I will need to duplicate the models? If anyone knows where I can read some info on that topic links are appriciated! Technical details: I am using Drools 6.0.0 in Eclipse Juno. Big thanks for the support! Best Regards! Milen -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.jboss.org/pipermail/rules-users/attachments/20131209/df84f64c/attachment.html From wolfgang.laun at gmail.com Mon Dec 9 07:27:22 2013 From: wolfgang.laun at gmail.com (Wolfgang Laun) Date: Mon, 9 Dec 2013 13:27:22 +0100 Subject: [rules-users] How to call Drools as a remote rules executor In-Reply-To: <245619576.267600.1386591018938.JavaMail.apache@nm3.abv.bg> References: <245619576.267600.1386591018938.JavaMail.apache@nm3.abv.bg> Message-ID: I've provided one possible approach on stackoverflow. [Not knowing what "non-Java" is doesn't help.] -W On 09/12/2013, milen igrachev wrote: > Hello , > What I want to do is use java and Drools for its nice rule engine > capabilities. Currently I am not using java for my project. I have some > implementation business classes and implemented logics that works fine for > me, but I want to externalize the rules in BRMS. I gave Drools a try and I > like it a lot. However I encounter one obsticle that I want to ask if I can > skip. I read most of the Drools documentation and across the net in all the > examples that are given we actually need the implementation business classes > in order to instantiate facts that we want to feed to the Drools > KieSession . Well what I want is not to duplicate my class model in both my > (non java) project and my java Drools project. All I want to keep in my > Drools project is the Rules themselves. So is that possible, or I will need > to duplicate the models? If anyone knows where I can read some info on that > topic links are appriciated! Technical details: I am using Drools 6.0.0 in > Eclipse Juno. Big thanks for the support! Best Regards! > Milen From martinzp at gmail.com Mon Dec 9 07:35:48 2013 From: martinzp at gmail.com (=?ISO-8859-1?Q?Mart=EDn_Z=FA=F1iga?=) Date: Mon, 9 Dec 2013 10:35:48 -0200 Subject: [rules-users] Problem with time sliding windows and pseudo clock in Drools Fusion 5.5.0 In-Reply-To: References: <1386370459753-4027137.post@n3.nabble.com> Message-ID: Thank you Matteo for your answer. I will run my code with the audit log activated and see if i can find anything. Kind regards On Sun, Dec 8, 2013 at 5:00 PM, Matteo Mortari wrote: > Ciao, not really sure where is your problem exactly, but as I use often > similar use-case of yours, thought worthy to share what I usually find > useful: > > 1. check STREAM mode is activated > 2. check in the .drl is clearly defined what is a Fact, and what is an > Event. In your case I would check TemperatureRead is declared as Event? > 3. activate Audit log / runtime logger. > > I find especially useful point #3 because you will see, as the session > clock advances, what is still in working memory and when rule is activated > you will see against which Event/Facts. > > Hope this is helpful > Ciao > MM > > > On Fri, Dec 6, 2013 at 11:54 PM, martinzp wrote: > >> Hi, i am new in the forum, and a beginner user of Drools so forgive me if >> my >> question isn't quite good. >> >> I want to test the "over window:time" operand. >> >> In order to do that i use the pseudo clock, but i have noticed that it >> doesn't behave as i would expect. >> >> The behaviour i think i observed, is that the rule is using the real clock >> instead of the pseudo clock. >> >> *Here is my drl file:* >> >> rule "Fire Detected" >> when >> c : Number(intValue >= 3) from accumulate ( >> $tr : TemperatureRead(read > 40) >> over window:time ( 1s ) >> from entry-point entryone , >> count ($tr) >> ) >> then >> System.out.println("Fire Detected!"); >> end >> >> >> >> *and here is the portion of my main file that inserts the events:* >> >> TemperatureRead temp1 = new TemperatureRead(33.2); >> TemperatureRead temp2 = new TemperatureRead(38.7); >> TemperatureRead temp3 = new TemperatureRead(39.5); >> TemperatureRead temp4 = new TemperatureRead(42.5); >> TemperatureRead temp5 = new TemperatureRead(43.1); >> TemperatureRead temp6 = new TemperatureRead(47.8); >> >> SessionPseudoClock clock = ksession.getSessionClock(); >> >> entryPoint1.insert(temp1); >> >> clock.advanceTime((new Date()).getTime(), TimeUnit.MILLISECONDS); >> >> fireRules(); >> >> entryPoint1.insert(temp2); >> >> clock.advanceTime(1, TimeUnit.SECONDS); >> >> fireRules(); >> >> entryPoint1.insert(temp3); >> >> clock.advanceTime(1, TimeUnit.SECONDS); >> >> fireRules(); >> >> entryPoint1.insert(temp4); >> >> clock.advanceTime(1, TimeUnit.SECONDS); >> >> fireRules(); >> >> entryPoint1.insert(temp5); >> >> clock.advanceTime(1, TimeUnit.SECONDS); >> >> fireRules(); >> >> entryPoint1.insert(temp6); >> >> fireRules(); >> >> >> >> >> >> In my opinion, the rule shouldn't be fired, because as i am (supposedly) >> using the pseudo clock, the events shouldn't fall into the same sliding >> window (1 second.) >> >> In general, the rule should fire when it detects 3 or more temperature >> reads >> with a temperature over 40. >> >> Any idea about what i might be doing wrong? >> >> Thanks in advance! >> >> >> >> >> >> >> >> -- >> View this message in context: >> http://drools.46999.n3.nabble.com/Problem-with-time-sliding-windows-and-pseudo-clock-in-Drools-Fusion-5-5-0-tp4027137.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/20131209/96c4f02b/attachment-0001.html From loic.albertin at bull.net Mon Dec 9 08:33:47 2013 From: loic.albertin at bull.net (=?ISO-8859-1?Q?Lo=EFc_Albertin?=) Date: Mon, 9 Dec 2013 14:33:47 +0100 Subject: [rules-users] InstantiationError during condition evaluation in Drools 6.0.0.Final Message-ID: <52A5C6BB.5020100@bull.net> Hi all, I'm migrating from an old Drools 5.1 version to 6.0.0.Final. Sometimes (I don't really get under which conditions as sometimes it works), I'm facing an InstantiationError exception when I insert a fact into a stateful kie session. This exception is thrown by a generated class named ConditionEvaluator which doesn't help for debugging! ;) The inserted object is a basic POJO (named JasmineEventEB) except for an attribute named "value" which accept any "Serializable" object and which is causing the issue. The rule condition is quite simple $e : JasmineEventEB(probe == "Button:pris" && value == "1") In debugging I found that it failed when evaluating the value == "1" part. I can also confirm that the value for the actually inserted JasmineEventEB is a string. The stacktrace is: java.lang.InstantiationError: java.io.Serializable at ConditionEvaluatorae1a73837e8146bda23004a0450e2e52.evaluate(Unknown Source) at org.drools.core.rule.constraint.MvelConstraint.evaluate(MvelConstraint.java:212) at org.drools.core.rule.constraint.MvelConstraint.isAllowed(MvelConstraint.java:169) at org.drools.core.reteoo.AlphaNode.assertObject(AlphaNode.java:134) at org.drools.core.reteoo.CompositeObjectSinkAdapter.doPropagateAssertObject(CompositeObjectSinkAdapter.java:502) at org.drools.core.reteoo.CompositeObjectSinkAdapter.propagateAssertObject(CompositeObjectSinkAdapter.java:387) at org.drools.core.reteoo.AlphaNode.assertObject(AlphaNode.java:138) at org.drools.core.reteoo.CompositeObjectSinkAdapter.doPropagateAssertObject(CompositeObjectSinkAdapter.java:502) at org.drools.core.reteoo.CompositeObjectSinkAdapter.propagateAssertObject(CompositeObjectSinkAdapter.java:377) at org.drools.core.reteoo.ObjectTypeNode.assertObject(ObjectTypeNode.java:288) at org.drools.core.reteoo.EntryPointNode.assertObject(EntryPointNode.java:260) at org.drools.core.common.NamedEntryPoint.insert(NamedEntryPoint.java:360) at org.drools.core.common.NamedEntryPoint.insert(NamedEntryPoint.java:279) at org.drools.core.common.AbstractWorkingMemory.insert(AbstractWorkingMemory.java:1149) at org.drools.core.common.AbstractWorkingMemory.insert(AbstractWorkingMemory.java:1093) at org.drools.core.impl.StatefulKnowledgeSessionImpl.insert(StatefulKnowledgeSessionImpl.java:308) I tested both with the java and mvel dialect with the same result. Does someone has already encountered this kind of error? If you need more details or clarifications please let me know. Thanks & regards, Lo?c From igrachev at abv.bg Mon Dec 9 09:34:54 2013 From: igrachev at abv.bg (milen igrachev) Date: Mon, 9 Dec 2013 16:34:54 +0200 (EET) Subject: [rules-users] How to call Drools as a remote rules executor Message-ID: <1100291018.280515.1386599694462.JavaMail.apache@nm3.abv.bg> Hello again, I am sorry that i duplicated the question!. I have one last question and I will close my questions both in stackoverflow and here. Is my understanging correct? I have two options: 1. To have my business logic classes in my java Drools project. 2. Find a way to generate these classes in my java Drools project. But in any case available I do need the java classes to create and feed facts to the Drools? There is no way to feed Drools with any type of structured data that defines the fact without creating the instance? (It will be my responsibility to find the way of generation.) Once again Big thanks for your time, and sorry for the duplication of the question! Regards, Milen PS: About the language that I am using its really uncommon one, I seriously doubt that the name will help you. Offcourse here it is - GraphTalk. From: Wolfgang Laun wolfgang.laun at gmail.com About: Re: [rules-users] How to call Drools as a remote rules executor To: Rules Users List sent at: Monday, 2013, December 9 13:27:22 CET I've provided one possible approach on stackoverflow. [Not knowing what "non-Java" is doesn't help.] -W On 09/12/2013, milen igrachev igrachev at abv.bg > wrote: > Hello , > What I want to do is use java and Drools for its nice rule engine > capabilities. Currently I am not using java for my project. I have some > implementation business classes and implemented logics that works fine for > me, but I want to externalize the rules in BRMS. I gave Drools a try and I > like it a lot. However I encounter one obsticle that I want to ask if I can > skip. I read most of the Drools documentation and across the net in all the > examples that are given we actually need the implementation business classes > in order to instantiate facts that we want to feed to the Drools > KieSession . Well what I want is not to duplicate my class model in both my > (non java) project and my java Drools project. All I want to keep in my > Drools project is the Rules themselves. So is that possible, or I will need > to duplicate the models? If anyone knows where I can read some info on that > topic links are appriciated! Technical details: I am using Drools 6.0.0 in > Eclipse Juno. Big thanks for the support! Best Regards! > Milen _______________________________________________ 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/20131209/f1613ab0/attachment.html From mario.fusco at gmail.com Mon Dec 9 10:01:42 2013 From: mario.fusco at gmail.com (Mario Fusco) Date: Mon, 9 Dec 2013 07:01:42 -0800 (PST) Subject: [rules-users] InstantiationError during condition evaluation in Drools 6.0.0.Final In-Reply-To: <52A5C6BB.5020100@bull.net> References: <52A5C6BB.5020100@bull.net> Message-ID: <1386601302720-4027163.post@n3.nabble.com> Hi Lo?c, That MvelConstraint class is part of the new constraint evaluation mechanism I started developing with Drools 5.4 and further improved in the subsequent releases. However I've never had a similar problem. I'll try to reproduce this issue based on what you wrote, but it could be very helpful if you could send a reproducer (possibly opening a ticket on jira and attaching your reproducer there). Thanks a lot for your help, Mario -- View this message in context: http://drools.46999.n3.nabble.com/rules-users-InstantiationError-during-condition-evaluation-in-Drools-6-0-0-Final-tp4027161p4027163.html Sent from the Drools: User forum mailing list archive at Nabble.com. From loic.albertin at bull.net Mon Dec 9 10:06:52 2013 From: loic.albertin at bull.net (=?UTF-8?B?TG/Dr2MgQWxiZXJ0aW4=?=) Date: Mon, 9 Dec 2013 16:06:52 +0100 Subject: [rules-users] InstantiationError during condition evaluation in Drools 6.0.0.Final In-Reply-To: <1386601302720-4027163.post@n3.nabble.com> References: <52A5C6BB.5020100@bull.net> <1386601302720-4027163.post@n3.nabble.com> Message-ID: <52A5DC8C.3040508@bull.net> Hi Mario, Thanks for your quick answer, I will try to work on a reproducer asap and open a jira with it. Thanks & regards, Lo?c Le 09/12/2013 16:01, Mario Fusco a ?crit : > Hi Lo?c, > > That MvelConstraint class is part of the new constraint evaluation mechanism > I started developing with Drools 5.4 and further improved in the subsequent > releases. > > However I've never had a similar problem. I'll try to reproduce this issue > based on what you wrote, but it could be very helpful if you could send a > reproducer (possibly opening a ticket on jira and attaching your reproducer > there). > > Thanks a lot for your help, > Mario > > > > -- > View this message in context: http://drools.46999.n3.nabble.com/rules-users-InstantiationError-during-condition-evaluation-in-Drools-6-0-0-Final-tp4027161p4027163.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 Dec 9 10:11:53 2013 From: wolfgang.laun at gmail.com (Wolfgang Laun) Date: Mon, 9 Dec 2013 16:11:53 +0100 Subject: [rules-users] How to call Drools as a remote rules executor In-Reply-To: <1100291018.280515.1386599694462.JavaMail.apache@nm3.abv.bg> References: <1100291018.280515.1386599694462.JavaMail.apache@nm3.abv.bg> Message-ID: On 09/12/2013, milen igrachev wrote: > Hello again, > > I am sorry that i duplicated the question!. > I have one last question and I will close my questions both in stackoverflow > and here. > > Is my understanging correct? I have two options: > 1. To have my business logic classes in my java Drools project. Certainly. > 2. Find a way to generate these classes in my java Drools project. > But in any case available I do need the java classes to create and feed > facts to the Drools? There is no way to feed Drools with any type of > structured data that defines the fact without creating the instance? (It > will be my responsibility to find the way of generation.) Well, there's the DRL declare, which is one way of defining fact types to Drools. But you'd still have to create objects from these fact types and to inject the data (in the constructor). Which means that you'll have to have a way of creating these declares, and a way of getting the data into the Java app encapsulating the Drools session, and a way of instantiating the objects. As I said on stackoverflow, using XML as a gofer might be easier: it's simple on the Java side, but I don't know the other end. -W > > Once again Big thanks for your time, and sorry for the duplication of the > question! > > Regards, > Milen > > PS: About the language that I am using its really uncommon one, I seriously > doubt that the name will help you. Offcourse here it is - GraphTalk. > > From: Wolfgang Laun wolfgang.laun at gmail.com > > About: Re: [rules-users] How to call Drools as a remote rules executor > > To: Rules Users List > > sent at: Monday, 2013, December 9 13:27:22 CET > > > I've provided one possible approach on stackoverflow. > > > > [Not knowing what "non-Java" is doesn't help.] > > > > -W > > > > > > On 09/12/2013, milen igrachev igrachev at abv.bg > wrote: > >> Hello , > >> What I want to do is use java and Drools for its nice rule engine > >> capabilities. Currently I am not using java for my project. I have some > >> implementation business classes and implemented logics that works fine >> for > >> me, but I want to externalize the rules in BRMS. I gave Drools a try and >> I > >> like it a lot. However I encounter one obsticle that I want to ask if I >> can > >> skip. I read most of the Drools documentation and across the net in all >> the > >> examples that are given we actually need the implementation business >> classes > >> in order to instantiate facts that we want to feed to the Drools > >> KieSession . Well what I want is not to duplicate my class model in both >> my > >> (non java) project and my java Drools project. All I want to keep in my > >> Drools project is the Rules themselves. So is that possible, or I will >> need > >> to duplicate the models? If anyone knows where I can read some info on >> that > >> topic links are appriciated! Technical details: I am using Drools 6.0.0 >> in > >> Eclipse Juno. Big thanks for the support! Best Regards! > >> Milen > > _______________________________________________ > > rules-users mailing list > > rules-users at lists.jboss.org > > https://lists.jboss.org/mailman/listinfo/rules-users > > From alberto.martinez at grupoica.com Mon Dec 9 10:32:40 2013 From: alberto.martinez at grupoica.com (Alberto) Date: Mon, 9 Dec 2013 07:32:40 -0800 (PST) Subject: [rules-users] How to call Drools as a remote rules executor In-Reply-To: References: <245619576.267600.1386591018938.JavaMail.apache@nm3.abv.bg> <1100291018.280515.1386599694462.JavaMail.apache@nm3.abv.bg> Message-ID: <1386603160517-4027166.post@n3.nabble.com> I define my facts in DLR with the declare clause. The method need the values of the facts to insert it into the knwoledge base. You can try this: [my kbase is injected by spring] StatefulKnowledgeSession ksession = kbase.newStatefulKnowledgeSession(); FactType factType = kbase.getFactType("my.package(defined in the DLR)", "name_of_the_fact"); Object kFact = null; try { kFact = factType.newInstance(); } catch (InstantiationException e) { throw new ApplicationException(e); } catch (IllegalAccessException e) { throw new ApplicationException(e); } factType.set(kFact, "fact_property_name(in_DLR)" , "fact_property_value(in DLR)"); } FactHandle factHandler = ksession.insert(kFact); int numRulesFired = ksession.fireAllRules(100); I hope this help you. -- View this message in context: http://drools.46999.n3.nabble.com/rules-users-How-to-call-Drools-as-a-remote-rules-executor-tp4027157p4027166.html Sent from the Drools: User forum mailing list archive at Nabble.com. From igrachev at abv.bg Mon Dec 9 10:34:55 2013 From: igrachev at abv.bg (milen igrachev) Date: Mon, 9 Dec 2013 17:34:55 +0200 (EET) Subject: [rules-users] How to call Drools as a remote rules executor Message-ID: <1831244493.286936.1386603295964.JavaMail.apache@nm1.abv.bg> Big thanks on the answers, that was all I needed. The XML solution seems to be the best for me. Thanks for the help again. Best Regards Milen -------- ?????????? ????? -------- ??: Wolfgang Laun wolfgang.laun at gmail.com ???????: Re: [rules-users] How to call Drools as a remote rules executor ??: Rules Users List ????????? ??: ??????????, 2013, ???????? 9 17:11:53 EET On 09/12/2013, milen igrachev igrachev at abv.bg > wrote: > Hello again, > > I am sorry that i duplicated the question!. > I have one last question and I will close my questions both in stackoverflow > and here. > > Is my understanging correct? I have two options: > 1. To have my business logic classes in my java Drools project. Certainly. > 2. Find a way to generate these classes in my java Drools project. > But in any case available I do need the java classes to create and feed > facts to the Drools? There is no way to feed Drools with any type of > structured data that defines the fact without creating the instance? (It > will be my responsibility to find the way of generation.) Well, there's the DRL declare, which is one way of defining fact types to Drools. But you'd still have to create objects from these fact types and to inject the data (in the constructor). Which means that you'll have to have a way of creating these declares, and a way of getting the data into the Java app encapsulating the Drools session, and a way of instantiating the objects. As I said on stackoverflow, using XML as a gofer might be easier: it's simple on the Java side, but I don't know the other end. -W > > Once again Big thanks for your time, and sorry for the duplication of the > question! > > Regards, > Milen > > PS: About the language that I am using its really uncommon one, I seriously > doubt that the name will help you. Offcourse here it is - GraphTalk. > > From: Wolfgang Laun wolfgang.laun at gmail.com > > About: Re: [rules-users] How to call Drools as a remote rules executor > > To: Rules Users List > > sent at: Monday, 2013, December 9 13:27:22 CET > > > I've provided one possible approach on stackoverflow. > > > > [Not knowing what "non-Java" is doesn't help.] > > > > -W > > > > > > On 09/12/2013, milen igrachev igrachev at abv.bg > wrote: > >> Hello , > >> What I want to do is use java and Drools for its nice rule engine > >> capabilities. Currently I am not using java for my project. I have some > >> implementation business classes and implemented logics that works fine >> for > >> me, but I want to externalize the rules in BRMS. I gave Drools a try and >> I > >> like it a lot. However I encounter one obsticle that I want to ask if I >> can > >> skip. I read most of the Drools documentation and across the net in all >> the > >> examples that are given we actually need the implementation business >> classes > >> in order to instantiate facts that we want to feed to the Drools > >> KieSession . Well what I want is not to duplicate my class model in both >> my > >> (non java) project and my java Drools project. All I want to keep in my > >> Drools project is the Rules themselves. So is that possible, or I will >> need > >> to duplicate the models? If anyone knows where I can read some info on >> that > >> topic links are appriciated! Technical details: I am using Drools 6.0.0 >> in > >> Eclipse Juno. Big thanks for the support! Best Regards! > >> 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/20131209/1b54d965/attachment-0001.html From wolfgang.laun at gmail.com Mon Dec 9 11:07:02 2013 From: wolfgang.laun at gmail.com (Wolfgang Laun) Date: Mon, 9 Dec 2013 17:07:02 +0100 Subject: [rules-users] How to call Drools as a remote rules executor In-Reply-To: <1831244493.286936.1386603295964.JavaMail.apache@nm1.abv.bg> References: <1831244493.286936.1386603295964.JavaMail.apache@nm1.abv.bg> Message-ID: One last piece of advice: Be careful with the XML design. Not all complex types you can build with XML Schema result in "good" Java classes, and not all Java classes are well suited as fact classes. -W On 09/12/2013, milen igrachev wrote: > > Big thanks on the answers, that was all I needed. > The XML solution seems to be the best for me. > Thanks for the help again. Best Regards > Milen > > > > > > > > -------- ?????????? ????? -------- > > ??: Wolfgang Laun wolfgang.laun at gmail.com > > ???????: Re: [rules-users] How to call Drools as a remote rules executor > > ??: Rules Users List > > ????????? ??: ??????????, 2013, ???????? 9 17:11:53 EET > > > On 09/12/2013, milen igrachev igrachev at abv.bg > wrote: > >> Hello again, > >> > >> I am sorry that i duplicated the question!. > >> I have one last question and I will close my questions both in >> stackoverflow > >> and here. > >> > >> Is my understanging correct? I have two options: > >> 1. To have my business logic classes in my java Drools project. > > > > Certainly. > > > >> 2. Find a way to generate these classes in my java Drools project. > >> But in any case available I do need the java classes to create and feed > >> facts to the Drools? There is no way to feed Drools with any type of > >> structured data that defines the fact without creating the instance? (It > >> will be my responsibility to find the way of generation.) > > > > Well, there's the DRL declare, which is one way of defining fact types > > to Drools. > > But you'd still have to create objects from these fact types and to inject > the > > data (in the constructor). Which means that you'll have to have a way > > of creating these declares, and a way of getting the data into the > > Java app encapsulating the Drools session, and a way of instantiating > > the objects. > > > > As I said on stackoverflow, using XML as a gofer might be easier: it's > > simple on the Java side, but I don't know the other end. > > > > -W > > > >> > >> Once again Big thanks for your time, and sorry for the duplication of the > >> question! > >> > >> Regards, > >> Milen > >> > >> PS: About the language that I am using its really uncommon one, I >> seriously > >> doubt that the name will help you. Offcourse here it is - GraphTalk. > >> > >> From: Wolfgang Laun wolfgang.laun at gmail.com > >> > >> About: Re: [rules-users] How to call Drools as a remote rules executor > >> > >> To: Rules Users List > >> > >> sent at: Monday, 2013, December 9 13:27:22 CET > >> > >> > >> I've provided one possible approach on stackoverflow. > >> > >> > >> > >> [Not knowing what "non-Java" is doesn't help.] > >> > >> > >> > >> -W > >> > >> > >> > >> > >> > >> On 09/12/2013, milen igrachev igrachev at abv.bg > wrote: > >> > >>> Hello , > >> > >>> What I want to do is use java and Drools for its nice rule engine > >> > >>> capabilities. Currently I am not using java for my project. I have some > >> > >>> implementation business classes and implemented logics that works fine > >>> for > >> > >>> me, but I want to externalize the rules in BRMS. I gave Drools a try and > >>> I > >> > >>> like it a lot. However I encounter one obsticle that I want to ask if I > >>> can > >> > >>> skip. I read most of the Drools documentation and across the net in all > >>> the > >> > >>> examples that are given we actually need the implementation business > >>> classes > >> > >>> in order to instantiate facts that we want to feed to the Drools > >> > >>> KieSession . Well what I want is not to duplicate my class model in >>> both > >>> my > >> > >>> (non java) project and my java Drools project. All I want to keep in my > >> > >>> Drools project is the Rules themselves. So is that possible, or I will > >>> need > >> > >>> to duplicate the models? If anyone knows where I can read some info on > >>> that > >> > >>> topic links are appriciated! Technical details: I am using Drools 6.0.0 > >>> in > >> > >>> Eclipse Juno. Big thanks for the support! Best Regards! > >> > >>> 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 loic.albertin at bull.net Mon Dec 9 11:32:19 2013 From: loic.albertin at bull.net (=?UTF-8?B?TG/Dr2MgQWxiZXJ0aW4=?=) Date: Mon, 9 Dec 2013 17:32:19 +0100 Subject: [rules-users] InstantiationError during condition evaluation in Drools 6.0.0.Final In-Reply-To: <52A5DC8C.3040508@bull.net> References: <52A5C6BB.5020100@bull.net> <1386601302720-4027163.post@n3.nabble.com> <52A5DC8C.3040508@bull.net> Message-ID: <52A5F093.5040301@bull.net> Hi Mario, I opened a ticket with a reproducer: https://issues.jboss.org/browse/DROOLS-372 Thanks & regards, Lo?c Le 09/12/2013 16:06, Lo?c Albertin a ?crit : > Hi Mario, > > Thanks for your quick answer, I will try to work on a reproducer asap > and open a jira with it. > > Thanks & regards, > Lo?c > > Le 09/12/2013 16:01, Mario Fusco a ?crit : >> Hi Lo?c, >> >> That MvelConstraint class is part of the new constraint evaluation mechanism >> I started developing with Drools 5.4 and further improved in the subsequent >> releases. >> >> However I've never had a similar problem. I'll try to reproduce this issue >> based on what you wrote, but it could be very helpful if you could send a >> reproducer (possibly opening a ticket on jira and attaching your reproducer >> there). >> >> Thanks a lot for your help, >> Mario >> >> >> >> -- >> View this message in context: http://drools.46999.n3.nabble.com/rules-users-InstantiationError-during-condition-evaluation-in-Drools-6-0-0-Final-tp4027161p4027163.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/20131209/39e23431/attachment.html From anjana.ackroyd at gmail.com Mon Dec 9 12:28:36 2013 From: anjana.ackroyd at gmail.com (anjana.ackroyd) Date: Mon, 9 Dec 2013 09:28:36 -0800 (PST) Subject: [rules-users] 'org.jboss.dashboard-builder:dashboard-builder-bom' not found in repository: Message-ID: <1386610116253-4027170.post@n3.nabble.com> When I try to build my drools project I get Reason: POM 'org.jboss.dashboard-builder:dashboard-builder-bom' not found in repository: Unable to download the artifact from any repository org.jboss.dashboard-builder:dashboard-builder-bom:pom:6.0.0.Final My pom has org.drools drools-compiler 6.0.0.Final org.drools drools-core 6.0.0.Final junit junit 4.11 org.slf4j slf4j-api 1.7.5 org.slf4j slf4j-log4j12 1.7.5 -- View this message in context: http://drools.46999.n3.nabble.com/org-jboss-dashboard-builder-dashboard-builder-bom-not-found-in-repository-tp4027170.html Sent from the Drools: User forum mailing list archive at Nabble.com. From sumantp at yahoo.com Mon Dec 9 12:59:12 2013 From: sumantp at yahoo.com (sumantp) Date: Mon, 9 Dec 2013 09:59:12 -0800 (PST) Subject: [rules-users] Prevent re-evaluation of events in stream mode Message-ID: <1386611952239-4027171.post@n3.nabble.com> Hi, I've written a simple rule to illustrate the issue I'm running into. Transaction events representing amounts deposited into a bank account are inserted sequentially. The goal is to detect a transaction that is higher than the average from a rolling window. What I'm expecting is that only the most recent insertion is compared with the average from the window. However, I'm observing that all previous events in the window are re-evaluated each time a new event is inserted. So events that previously were below the average (at that point in time) may now be above the average since subsequent events brought the average down. I don't want those transactions to be re-evaluated. Here's my rule: declare Transaction @role(event) end rule "Higher than average amount" when $transaction : Transaction($account : getAccount(), $amount : getAmount()) Number($avg : doubleValue, $amount > $avg) from accumulate(Transaction(getAccount() == $account, $amt : getAmount()) over window:length(100), average($amt)) then System.out.println("\t***ALERT***: Higher than average transaction amount (Average = " + $avg + "): " + $transaction.toString()); end Here's a snippet from my Java class: public static final void main(String[] args) { try { // Load the knowledge base KieServices ks = KieServices.Factory.get(); KieContainer kContainer = ks.getKieClasspathContainer(); KieSession kSession = kContainer.newKieSession("ksession-rules"); // Insert events List list = getEvents(); for (Transaction event : list) { printEvent(event); kSession.insert(event); kSession.fireAllRules(); } } catch (Throwable t) { t.printStackTrace(); } } private static List getEvents() { List list = new Vector(); list.add(new Transaction(1, 600)); list.add(new Transaction(1, 600)); list.add(new Transaction(1, 800)); // This should trigger an alert list.add(new Transaction(1, 100)); // This should NOT re-evaluate previous transactions return list; } This is my kmodule.xml: I'm using 6.0.0.Final. Any help is appreciated! -- View this message in context: http://drools.46999.n3.nabble.com/Prevent-re-evaluation-of-events-in-stream-mode-tp4027171.html Sent from the Drools: User forum mailing list archive at Nabble.com. From sumantp at yahoo.com Mon Dec 9 13:07:38 2013 From: sumantp at yahoo.com (sumantp) Date: Mon, 9 Dec 2013 10:07:38 -0800 (PST) Subject: [rules-users] Prevent re-evaluation of events in stream mode In-Reply-To: <1386611952239-4027171.post@n3.nabble.com> References: <1386611952239-4027171.post@n3.nabble.com> Message-ID: <1386612458386-4027172.post@n3.nabble.com> I forgot to include some output from my test. It shows that the two $600 transactions do not initially trigger alerts (as expected), the $800 one triggers an alert (as expected), but the $100 one results in alerts for the first 3 transaction (not expected). Inserting Account = 1, Amount = 600.0, current average = 600.0 Inserting Account = 1, Amount = 600.0, current average = 600.0 Inserting Account = 1, Amount = 800.0, current average = 666.6666666666666 ***ALERT***: Higher than average transaction amount (Average = 666.6666666666666): Account = 1, Amount = 800.0 Inserting Account = 1, Amount = 100.0, current average = 525.0 ***ALERT***: Higher than average transaction amount (Average = 525.0): Account = 1, Amount = 800.0 ***ALERT***: Higher than average transaction amount (Average = 525.0): Account = 1, Amount = 600.0 ***ALERT***: Higher than average transaction amount (Average = 525.0): Account = 1, Amount = 600.0 -- View this message in context: http://drools.46999.n3.nabble.com/Prevent-re-evaluation-of-events-in-stream-mode-tp4027171p4027172.html Sent from the Drools: User forum mailing list archive at Nabble.com. From ters at ukr.net Mon Dec 9 13:19:59 2013 From: ters at ukr.net (ters) Date: Mon, 9 Dec 2013 10:19:59 -0800 (PST) Subject: [rules-users] CEP accumulate unclear behavior In-Reply-To: References: <1386085460355-4027069.post@n3.nabble.com> <1386169132529-4027088.post@n3.nabble.com> <1386177674817-4027090.post@n3.nabble.com> <1386242681411-4027107.post@n3.nabble.com> Message-ID: <1386613199634-4027173.post@n3.nabble.com> Wolfgang, hi again. I've tried your suggestion of the computation separation. But I tried to use global variable instead of additional fact-accumulator: / @Test public void test1_FireAllRules() throws RuleGeneratorException { ksession.setGlobal("globalAccum", new ArrayList(Arrays.asList(0))); ksession.insert(new ServicePerformanceEvent("MyService", 100)); ksession.fireAllRules(); }/ .................................................................... /global java.util.ArrayList *globalAccum*; rule "HELPER rule to calculate value and put into global variable" dialect "mvel" *salience 10* when Number( $avg: doubleValue ) from accumulate( $e: ServicePerformanceEvent( $name: serviceName, $thisDuration: duration), init( double sum = 0; double count = 0;) action( if("MyService".equals($name)){sum += $thisDuration; count++;}) result( count != 0 ? sum/count : 0 ) ); then globalAccum.set(0, *$avg + 100*); System.out.println("--------------------- HELPER RULE salience 10--------------------------------" ); System.out.println("RHS: HELPER RULE: globalAccum = " + globalAccum.get(0)); end rule "MAIN rule" dialect "mvel" when $event : ServicePerformanceEvent(*duration > globalAccum.get(0)*); then System.out.println("---------------------- MAIN RULE--------------------------------" ); System.out.println("RHS: MAIN RULE: $event.duration = " + $event.duration); System.out.println("RHS: MAIN RULE: globalAccum = " + globalAccum.get(0)); end/ The output of invocation was unexpected for me: --------------------- HELPER RULE salience 10-------------------------------- RHS: HELPER RULE: globalAccum = *200.0* ---------------------- MAIN RULE-------------------------------- RHS: MAIN RULE: $event.duration = *100* RHS: MAIN RULE: globalAccum = *200.0* I've found that the order of invocation is: 1 - HELPER rule LHS (calculating avg) 2 - MAIN rule LHS (comparison duration(100) > globalAccum(0))! 3 - HELPER rule RHS (assigning globalAccum with value 200)! 4 - MAIN rule RHS It was surprise for me, I've expected invocation of Main rule LHS after Helper rule RHS. So, as I understand, the only way to achieve desired behavior is insert helper Fact (insert(new Average($avg))) in the HELPER rule RHS and then matching this fact into MAIN rule LHS, use avg from it and further retract it. -- View this message in context: http://drools.46999.n3.nabble.com/CEP-accumulate-unclear-behavior-tp4027069p4027173.html Sent from the Drools: User forum mailing list archive at Nabble.com. From mario.fusco at gmail.com Mon Dec 9 13:53:55 2013 From: mario.fusco at gmail.com (Mario Fusco) Date: Mon, 9 Dec 2013 10:53:55 -0800 (PST) Subject: [rules-users] Drool 6.0.0.Final, 2 question re kie-maven-plugin, please? In-Reply-To: References: Message-ID: <1386615234991-4027174.post@n3.nabble.com> 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. From anjana.ackroyd at gmail.com Mon Dec 9 17:24:37 2013 From: anjana.ackroyd at gmail.com (anjana.ackroyd) Date: Mon, 9 Dec 2013 14:24:37 -0800 (PST) Subject: [rules-users] How to insert values into drl In-Reply-To: References: <1386535882621-4027151.post@n3.nabble.com> Message-ID: <1386627877481-4027176.post@n3.nabble.com> Thanks. Now when I do a get on Message I get a null value. I was under the assumption that the drl n.setMessage is setting the value for message FactType factType = runner.buildFactType("org.drools.test","NumberCompare") ; Object nc = factType.newInstance(); factType.set( nc, "numberone",Integer.valueOf( 42 )); factType.set( nc, "numbertwo", Integer.valueOf( 42 ) ); kieSession.insert(nc); runner.fireAllRules(); System.out.println(factType.get(nc,"message"));--------------> is null In the DRL rule "numberone is equals to numbertwo" when n: NumberCompare(numberone == numbertwo); then n.setMessage("numberone is equals to numbertwo"); end -- View this message in context: http://drools.46999.n3.nabble.com/How-to-insert-values-into-drl-tp4027151p4027176.html Sent from the Drools: User forum mailing list archive at Nabble.com. From anjana.ackroyd at gmail.com Mon Dec 9 17:26:03 2013 From: anjana.ackroyd at gmail.com (anjana.ackroyd) Date: Mon, 9 Dec 2013 14:26:03 -0800 (PST) Subject: [rules-users] How to insert values into drl In-Reply-To: <1386627877481-4027176.post@n3.nabble.com> References: <1386535882621-4027151.post@n3.nabble.com> <1386627877481-4027176.post@n3.nabble.com> Message-ID: <1386627963175-4027177.post@n3.nabble.com> Thanks. Now when I do a get on Message I get a null value. I was under the assumption that the drl n.setMessage is setting the value for message FactType factType = runner.buildFactType("org.drools.test","NumberCompare") ; Object nc = factType.newInstance(); factType.set( nc, "numberone",Integer.valueOf( 42 )); factType.set( nc, "numbertwo", Integer.valueOf( 42 ) ); kieSession.insert(nc); runner.fireAllRules(); System.out.println(factType.get(nc,"message"));--------------> is null In the DRL 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 -- View this message in context: http://drools.46999.n3.nabble.com/How-to-insert-values-into-drl-tp4027151p4027177.html Sent from the Drools: User forum mailing list archive at Nabble.com. From demirel.suleyman at gmail.com Mon Dec 9 17:47:20 2013 From: demirel.suleyman at gmail.com (Suleyman Demirel) Date: Mon, 9 Dec 2013 14:47:20 -0800 Subject: [rules-users] Optaplanner (V6.0.0) / Vehicle Routing / Speed of a Vehicle Message-ID: Hello everyone, I have just found out about optaplanner and have been testing the vehicle routing problem on the examples provided. I am not able to see how we can change the speed of a vehicle using the data files provided. If my calculations are not wrong, the current assumption looks like a vehicle's speed is 30 kmh (or miles per hour, whichever is assumed to be used). Does anyone know how that can be modified? Thanks. -- Suleyman Demirel -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.jboss.org/pipermail/rules-users/attachments/20131209/73a7cc73/attachment.html From dunnlow at yahoo.com Mon Dec 9 18:41:17 2013 From: dunnlow at yahoo.com (dunnlow) Date: Mon, 9 Dec 2013 15:41:17 -0800 (PST) Subject: [rules-users] Entry Point from parameter in Guvnor Decision Table? In-Reply-To: References: <1386345385803-4027132.post@n3.nabble.com> Message-ID: <1386632477582-4027179.post@n3.nabble.com> manstis wrote > Are you using a XLS decision table or a web one? I'm using the Guvnor web-guided editor to build the decision table. Thanks, -J -- View this message in context: http://drools.46999.n3.nabble.com/Entry-Point-from-parameter-in-Guvnor-Decision-Table-tp4027132p4027179.html Sent from the Drools: User forum mailing list archive at Nabble.com. From mproctor at codehaus.org Mon Dec 9 19:41:26 2013 From: mproctor at codehaus.org (Mark Proctor) Date: Tue, 10 Dec 2013 00:41:26 +0000 Subject: [rules-users] Drools Camel Server 6X Changes .... In-Reply-To: <1386395208670-4027141.post@n3.nabble.com> References: <1386395208670-4027141.post@n3.nabble.com> Message-ID: <1CA7A9A6-16FF-4B1A-888D-F46C8A8FD7CE@codehaus.org> https://github.com/droolsjbpm/droolsjbpm-integration/tree/master/drools-camel-server-example kmoduel at work, inside of a springs beans file: https://github.com/droolsjbpm/droolsjbpm-integration/blob/master/drools-camel-server-example/src/main/resources/knowledge-services.xml typica camel rout definition in spring: https://github.com/droolsjbpm/droolsjbpm-integration/blob/master/drools-camel-server-example/src/main/resources/camel-server.xml Mark On 7 Dec 2013, at 05:46, profversaggi wrote: > With the new 6X vintage the Spring API has changed a good deal. How does that > impact the Drools Camel Server War? > > More importantly, does anyone have a working example of a 'proper' Drools > Camel Server 6X integration or Spring Integration they can share. I could > use a kick starter on how to get Drools working online behind a web > interface. > > Many thanks in advance .... > > > > -- > View this message in context: http://drools.46999.n3.nabble.com/Drools-Camel-Server-6X-Changes-tp4027141.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 Mon Dec 9 20:11:58 2013 From: dunnlow at yahoo.com (dunnlow) Date: Mon, 9 Dec 2013 17:11:58 -0800 (PST) Subject: [rules-users] Where is org.drools.server package for camel server? In-Reply-To: <1386569344287-4027153.post@n3.nabble.com> References: <1342200328759-4018668.post@n3.nabble.com> <1342463859371-4018719.post@n3.nabble.com> <1342467673147-4018720.post@n3.nabble.com> <1386569344287-4027153.post@n3.nabble.com> Message-ID: <1386637918889-4027181.post@n3.nabble.com> Not 100% sure I understand your question, but I think in eclipse I just created the correct package and then added the class - then it will be included when you run. You could of course manually compile the class and put it in your ./WEB-INF/classes folder too. hth profversaggi wrote > I was able to get the org.drools.server.java file but then what do you do > with it? One can't just drop the file in the directory structure of the > WAR on the server? > > What is the 'proper' thing to do? > > Many thanks in advance .... -- View this message in context: http://drools.46999.n3.nabble.com/Where-is-org-drools-server-package-for-camel-server-tp4018668p4027181.html Sent from the Drools: User forum mailing list archive at Nabble.com. From plz.write.to at gmail.com Mon Dec 9 20:56:48 2013 From: plz.write.to at gmail.com (Sonata) Date: Mon, 9 Dec 2013 17:56:48 -0800 (PST) Subject: [rules-users] Any easy way to avoid inserting same id object into memory? In-Reply-To: References: <1386224301695-4027102.post@n3.nabble.com> Message-ID: <1386640608937-4027182.post@n3.nabble.com> Thanks I made a search and it seems it is controlled by a config to switch between identity or equality. Since I can only write rules, I can't enjoy the advantage of that. I ended up writing a retract rule to retract the same (equal) object from memory with higher salience. So everytime some rules insert a new object, this rule will fire to remove the object if they have the same id. -- View this message in context: http://drools.46999.n3.nabble.com/Any-easy-way-to-avoid-inserting-same-id-object-into-memory-tp4027102p4027182.html Sent from the Drools: User forum mailing list archive at Nabble.com. From wolfgang.laun at gmail.com Tue Dec 10 00:53:31 2013 From: wolfgang.laun at gmail.com (Wolfgang Laun) Date: Tue, 10 Dec 2013 06:53:31 +0100 Subject: [rules-users] Prevent re-evaluation of events in stream mode In-Reply-To: <1386612458386-4027172.post@n3.nabble.com> References: <1386611952239-4027171.post@n3.nabble.com> <1386612458386-4027172.post@n3.nabble.com> Message-ID: accumulate (irrespective of its form and particular coding) is absolutely fickle and finicky in a changing fact data base. The basic caveat is that each change to the domain of the accumulat CE starts a new game. Forget accumulate, roll your own! Set up a fact type Avg that's capable of holding the running average for an account (and other data that may be useful). One rule inserts an Avg if it isn't there for a new Transactions and initializes the average. Another rule should just extend the average while the count is below 100. And for the 101st Transaction to arrive, the third rule checks the amount and modifies the average, too. Obviously, you'll have to keep 100 amounts in Avg as well in order to remove the contribution of the 1st Transaction, or you just continue to extend the average. Note that this permits you to drop Transactions from the system earlier than with accumulate, which should more than compensate for the additional memory requirements due to Avg for each observed account. Average may be a poor threshold for raising an alarm, but I suspect you haven't been showing all of your cards ;-) -W On 09/12/2013, sumantp wrote: > I forgot to include some output from my test. It shows that the two $600 > transactions do not initially trigger alerts (as expected), the $800 one > triggers an alert (as expected), but the $100 one results in alerts for the > first 3 transaction (not expected). > > Inserting Account = 1, Amount = 600.0, current average = 600.0 > Inserting Account = 1, Amount = 600.0, current average = 600.0 > Inserting Account = 1, Amount = 800.0, current average = 666.6666666666666 > ***ALERT***: Higher than average transaction amount (Average = > 666.6666666666666): Account = 1, Amount = 800.0 > Inserting Account = 1, Amount = 100.0, current average = 525.0 > ***ALERT***: Higher than average transaction amount (Average = 525.0): > Account = 1, Amount = 800.0 > ***ALERT***: Higher than average transaction amount (Average = 525.0): > Account = 1, Amount = 600.0 > ***ALERT***: Higher than average transaction amount (Average = 525.0): > Account = 1, Amount = 600.0 > > > > > -- > View this message in context: > http://drools.46999.n3.nabble.com/Prevent-re-evaluation-of-events-in-stream-mode-tp4027171p4027172.html > Sent from the Drools: User forum mailing list archive at Nabble.com. > _______________________________________________ > rules-users mailing list > rules-users at lists.jboss.org > https://lists.jboss.org/mailman/listinfo/rules-users > From wolfgang.laun at gmail.com Tue Dec 10 01:01:46 2013 From: wolfgang.laun at gmail.com (Wolfgang Laun) Date: Tue, 10 Dec 2013 07:01:46 +0100 Subject: [rules-users] CEP accumulate unclear behavior In-Reply-To: <1386613199634-4027173.post@n3.nabble.com> References: <1386085460355-4027069.post@n3.nabble.com> <1386169132529-4027088.post@n3.nabble.com> <1386177674817-4027090.post@n3.nabble.com> <1386242681411-4027107.post@n3.nabble.com> <1386613199634-4027173.post@n3.nabble.com> Message-ID: On 09/12/2013, ters wrote: > Wolfgang, hi again. I've tried your suggestion of the computation > separation. > But I tried to use global variable instead of additional fact-accumulator: The Rule Engine is very narrow-minded when it comes to evaluating globals on the LHS of a rule. Changes aren't "seen" by the engine. (Read the doc: "a global should never be used to establish conditions in rules except when it has a constant immutable value.") -W From wolfgang.laun at gmail.com Tue Dec 10 01:29:24 2013 From: wolfgang.laun at gmail.com (Wolfgang Laun) Date: Tue, 10 Dec 2013 07:29:24 +0100 Subject: [rules-users] How to insert values into drl In-Reply-To: <1386627963175-4027177.post@n3.nabble.com> References: <1386535882621-4027151.post@n3.nabble.com> <1386627877481-4027176.post@n3.nabble.com> <1386627963175-4027177.post@n3.nabble.com> Message-ID: Can we be sure that the rule fires? (println on the RHS?) -W On 09/12/2013, anjana.ackroyd wrote: > > Thanks. Now when I do a get on Message I get a null value. I was under the > assumption that the drl n.setMessage is setting the value for message > > FactType factType = > runner.buildFactType("org.drools.test","NumberCompare") ; > Object nc = factType.newInstance(); > factType.set( nc, "numberone",Integer.valueOf( 42 )); > factType.set( nc, "numbertwo", Integer.valueOf( 42 ) ); > kieSession.insert(nc); > runner.fireAllRules(); > System.out.println(factType.get(nc,"message"));--------------> is > null > > > > > In the DRL > > > 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 > > > > -- > View this message in context: > http://drools.46999.n3.nabble.com/How-to-insert-values-into-drl-tp4027151p4027177.html > Sent from the Drools: User forum mailing list archive at Nabble.com. > _______________________________________________ > rules-users mailing list > rules-users at lists.jboss.org > https://lists.jboss.org/mailman/listinfo/rules-users > From ge0ffrey.spam at gmail.com Tue Dec 10 02:36:02 2013 From: ge0ffrey.spam at gmail.com (Geoffrey De Smet) Date: Tue, 10 Dec 2013 08:36:02 +0100 Subject: [rules-users] Optaplanner (V6.0.0) / Vehicle Routing / Speed of a Vehicle In-Reply-To: References: Message-ID: <52A6C462.9070705@gmail.com> An HTML attachment was scrubbed... URL: http://lists.jboss.org/pipermail/rules-users/attachments/20131210/b6be966d/attachment-0001.html From mario.fusco at gmail.com Tue Dec 10 08:07:44 2013 From: mario.fusco at gmail.com (Mario Fusco) Date: Tue, 10 Dec 2013 05:07:44 -0800 (PST) Subject: [rules-users] InstantiationError during condition evaluation in Drools 6.0.0.Final In-Reply-To: <52A5F093.5040301@bull.net> References: <52A5C6BB.5020100@bull.net> <1386601302720-4027163.post@n3.nabble.com> <52A5DC8C.3040508@bull.net> <52A5F093.5040301@bull.net> Message-ID: <1386680864577-4027190.post@n3.nabble.com> Thanks a lot for your reproduced. I just fixed that problem. Cheers, Mario -- View this message in context: http://drools.46999.n3.nabble.com/rules-users-InstantiationError-during-condition-evaluation-in-Drools-6-0-0-Final-tp4027161p4027190.html Sent from the Drools: User forum mailing list archive at Nabble.com. From diego.alvarez.zuluaga at gmail.com Tue Dec 10 10:09:25 2013 From: diego.alvarez.zuluaga at gmail.com (Diego Alvarez Zuluaga) Date: Tue, 10 Dec 2013 10:09:25 -0500 Subject: [rules-users] Fwd: Gradle/SBT example for Drools6 In-Reply-To: References: Message-ID: Hi Anyone has a working gradle/sbt configuration for Drools6? I tried a lot to convert the "bom" unsuccessfully :( This is not supported by gradle or SBT: org.drools drools-bom pom 6.0.0.Final import -- Diego Alvarez Zuluaga http://d1egoaz.com/ -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.jboss.org/pipermail/rules-users/attachments/20131210/bbd4d150/attachment.html From mproctor at codehaus.org Tue Dec 10 10:28:32 2013 From: mproctor at codehaus.org (Mark Proctor) Date: Tue, 10 Dec 2013 15:28:32 +0000 Subject: [rules-users] Prevent re-evaluation of events in stream mode In-Reply-To: <1386611952239-4027171.post@n3.nabble.com> References: <1386611952239-4027171.post@n3.nabble.com> Message-ID: <63A5DE82-CCC4-4C39-A714-857D78E8178F@codehaus.org> Logically insert the average, in a separate rule. This will ensure there is an ?average? fact that is maintained n the TMS. As it?s logically inserted, you don?t need to delete it. After any Transaction has been evaluated, you need to set a flag on it, so it?s not processed again. Mark On 9 Dec 2013, at 17:59, sumantp wrote: > Hi, > > I've written a simple rule to illustrate the issue I'm running into. > Transaction events representing amounts deposited into a bank account are > inserted sequentially. The goal is to detect a transaction that is higher > than the average from a rolling window. What I'm expecting is that only the > most recent insertion is compared with the average from the window. However, > I'm observing that all previous events in the window are re-evaluated each > time a new event is inserted. So events that previously were below the > average (at that point in time) may now be above the average since > subsequent events brought the average down. I don't want those transactions > to be re-evaluated. > > Here's my rule: > declare Transaction > @role(event) > end > > rule "Higher than average amount" > when > $transaction : Transaction($account : getAccount(), $amount : getAmount()) > Number($avg : doubleValue, $amount > $avg) from > accumulate(Transaction(getAccount() == $account, $amt : getAmount()) over > window:length(100), average($amt)) > then > System.out.println("\t***ALERT***: Higher than average transaction amount > (Average = " + $avg + "): " + $transaction.toString()); > end > > > Here's a snippet from my Java class: > public static final void main(String[] args) { > try { > // Load the knowledge base > KieServices ks = KieServices.Factory.get(); > KieContainer kContainer = ks.getKieClasspathContainer(); > KieSession kSession = kContainer.newKieSession("ksession-rules"); > > // Insert events > List list = getEvents(); > for (Transaction event : list) { > printEvent(event); > kSession.insert(event); > kSession.fireAllRules(); > } > } catch (Throwable t) { > t.printStackTrace(); > } > } > > private static List getEvents() { > List list = new Vector(); > > list.add(new Transaction(1, 600)); > list.add(new Transaction(1, 600)); > list.add(new Transaction(1, 800)); // This should trigger an alert > list.add(new Transaction(1, 100)); // This should NOT re-evaluate previous > transactions > > return list; > } > > This is my kmodule.xml: > > > > > > > > I'm using 6.0.0.Final. > > Any help is appreciated! > > > > -- > View this message in context: http://drools.46999.n3.nabble.com/Prevent-re-evaluation-of-events-in-stream-mode-tp4027171.html > Sent from the Drools: User forum mailing list archive at Nabble.com. > _______________________________________________ > rules-users mailing list > rules-users at lists.jboss.org > https://lists.jboss.org/mailman/listinfo/rules-users From ge0ffrey.spam at gmail.com Tue Dec 10 10:39:01 2013 From: ge0ffrey.spam at gmail.com (Geoffrey De Smet) Date: Tue, 10 Dec 2013 16:39:01 +0100 Subject: [rules-users] Fwd: Gradle/SBT example for Drools6 In-Reply-To: References: Message-ID: <52A73595.6050208@gmail.com> An HTML attachment was scrubbed... URL: http://lists.jboss.org/pipermail/rules-users/attachments/20131210/a7fa8aee/attachment.html From mushtaq.khan at alstom.com Tue Dec 10 12:02:50 2013 From: mushtaq.khan at alstom.com (mkhan) Date: Tue, 10 Dec 2013 09:02:50 -0800 (PST) Subject: [rules-users] Accessing items in a list Message-ID: <1386694970567-4027194.post@n3.nabble.com> Hi, I am new to doorls so please can you help me. I am trying to access an ietm from a list in a rule like ... $data: List(this != null, size > 9) from accumulate( $obj1 : FwVehicle( notchCodingWire1 != null, lineVoltage != null ) over window:time(10s) from entry-point "DataStream", collectList($obj1) ) $first : $data.get(0) but i get an error ... [ERR 102] Line 164:19 mismatched input '0' expecting ')' in rule "test1" in pattern $data.get Does anyone have any ideas what I am doing wrong please? -- View this message in context: http://drools.46999.n3.nabble.com/Accessing-items-in-a-list-tp4027194.html Sent from the Drools: User forum mailing list archive at Nabble.com. From sumantp at yahoo.com Tue Dec 10 13:12:28 2013 From: sumantp at yahoo.com (sumantp) Date: Tue, 10 Dec 2013 10:12:28 -0800 (PST) Subject: [rules-users] Prevent re-evaluation of events in stream mode In-Reply-To: References: <1386611952239-4027171.post@n3.nabble.com> <1386612458386-4027172.post@n3.nabble.com> Message-ID: <1386699148438-4027195.post@n3.nabble.com> Thanks Wolfgang! Interesting alternative. I'll try that. Average is indeed a poor choice for the alarm and bank transactions are not really what I'm evaluating in my application ;-) I intend to use standard deviation with at least some number of data points. But it was easier to illustrate the event re-evaluation issue I was running into using a simple example. -- View this message in context: http://drools.46999.n3.nabble.com/Prevent-re-evaluation-of-events-in-stream-mode-tp4027171p4027195.html Sent from the Drools: User forum mailing list archive at Nabble.com. From sumantp at yahoo.com Tue Dec 10 13:16:55 2013 From: sumantp at yahoo.com (sumantp) Date: Tue, 10 Dec 2013 10:16:55 -0800 (PST) Subject: [rules-users] Prevent re-evaluation of events in stream mode In-Reply-To: <63A5DE82-CCC4-4C39-A714-857D78E8178F@codehaus.org> References: <1386611952239-4027171.post@n3.nabble.com> <63A5DE82-CCC4-4C39-A714-857D78E8178F@codehaus.org> Message-ID: <1386699415616-4027196.post@n3.nabble.com> Thanks Mark! It seems like there are two alternatives - either roll my own average accumulation or set a flag in the event to prevent re-evaluation. -- View this message in context: http://drools.46999.n3.nabble.com/Prevent-re-evaluation-of-events-in-stream-mode-tp4027171p4027196.html Sent from the Drools: User forum mailing list archive at Nabble.com. From anjana.ackroyd at gmail.com Tue Dec 10 13:29:19 2013 From: anjana.ackroyd at gmail.com (anjana.ackroyd) Date: Tue, 10 Dec 2013 10:29:19 -0800 (PST) Subject: [rules-users] Kie Work Bench missing repositories menu option Message-ID: <1386700159521-4027197.post@n3.nabble.com> I deployed kie-drools-wb-distribution-wars-6.0.0-20131207.033517-672-tomcat7.0.war to my tomcat. I am trying to point it to the repository I have by using the steps listed http://docs.jboss.org/jbpm/v6.0/userguide/wb.Workbench.html#wb.QuickStartAddRepository But under Administration all I see is File Explorer -- View this message in context: http://drools.46999.n3.nabble.com/Kie-Work-Bench-missing-repositories-menu-option-tp4027197.html Sent from the Drools: User forum mailing list archive at Nabble.com. From michael.anstis at gmail.com Tue Dec 10 13:38:30 2013 From: michael.anstis at gmail.com (Michael Anstis) Date: Tue, 10 Dec 2013 18:38:30 +0000 Subject: [rules-users] Kie Work Bench missing repositories menu option In-Reply-To: <1386700159521-4027197.post@n3.nabble.com> References: <1386700159521-4027197.post@n3.nabble.com> Message-ID: Was that a screen-shot of your installation? It looks fine to me.. you have one repository "uf-playground". What is missing? You can use the "Organizational Unit Manager" to show/manage OUs, or click on uf-playground in the tree-view to show it's (sparse) details. Or better still, move over to the Authoring Perspective and have a look at the "mortgages" project. On 10 December 2013 18:29, anjana.ackroyd wrote: > I deployed > kie-drools-wb-distribution-wars-6.0.0-20131207.033517-672-tomcat7.0.war to > my tomcat. I am trying to point it to the repository I have by using the > steps listed > > http://docs.jboss.org/jbpm/v6.0/userguide/wb.Workbench.html#wb.QuickStartAddRepository > > But under Administration all I see is File Explorer > > > > > > > -- > View this message in context: > http://drools.46999.n3.nabble.com/Kie-Work-Bench-missing-repositories-menu-option-tp4027197.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/20131210/1d923c1a/attachment-0001.html From michael.anstis at gmail.com Tue Dec 10 13:41:03 2013 From: michael.anstis at gmail.com (Michael Anstis) Date: Tue, 10 Dec 2013 18:41:03 +0000 Subject: [rules-users] Kie Work Bench missing repositories menu option In-Reply-To: References: <1386700159521-4027197.post@n3.nabble.com> Message-ID: I went to double-check what I'd said.. but the image is no longer available on nabble. If menus are missing, make sure your user has "admin" role. On 10 December 2013 18:38, Michael Anstis wrote: > Was that a screen-shot of your installation? > > It looks fine to me.. you have one repository "uf-playground". What is > missing? > > You can use the "Organizational Unit Manager" to show/manage OUs, or click > on uf-playground in the tree-view to show it's (sparse) details. > > Or better still, move over to the Authoring Perspective and have a look at > the "mortgages" project. > > > > > On 10 December 2013 18:29, anjana.ackroyd wrote: > >> I deployed >> kie-drools-wb-distribution-wars-6.0.0-20131207.033517-672-tomcat7.0.war to >> my tomcat. I am trying to point it to the repository I have by using the >> steps listed >> >> http://docs.jboss.org/jbpm/v6.0/userguide/wb.Workbench.html#wb.QuickStartAddRepository >> >> But under Administration all I see is File Explorer >> >> >> >> >> >> >> -- >> View this message in context: >> http://drools.46999.n3.nabble.com/Kie-Work-Bench-missing-repositories-menu-option-tp4027197.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/20131210/883624b3/attachment.html From matteo.mortari at gmail.com Tue Dec 10 13:57:19 2013 From: matteo.mortari at gmail.com (Matteo Mortari) Date: Tue, 10 Dec 2013 19:57:19 +0100 Subject: [rules-users] Drool 6.0.0.Final, 2 question re kie-maven-plugin, please? In-Reply-To: <1386615234991-4027174.post@n3.nabble.com> References: <1386615234991-4027174.post@n3.nabble.com> Message-ID: 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/20131210/5ed5e39b/attachment.html From anjana.ackroyd at gmail.com Tue Dec 10 15:20:06 2013 From: anjana.ackroyd at gmail.com (Anjana Ackroyd) Date: Tue, 10 Dec 2013 12:20:06 -0800 Subject: [rules-users] Kie Work Bench missing repositories menu option In-Reply-To: References: <1386700159521-4027197.post@n3.nabble.com> Message-ID: I went ahead and re-installed kie-drools-wb-distribution-wars-6.0.0.Final-tomcat7.0.war on tomcat 7. My server starts up with no errors. But I do see a warning 2013-12-10 13:15:52,727 [tomcat-http--30] WARN Environment variable M2_HOME is not set I am guessing I need to install Maven on my server and try it again? I am logged in as userid : admin Here is a screen shot [image: Inline image 1] On Tue, Dec 10, 2013 at 10:41 AM, Michael Anstis wrote: > I went to double-check what I'd said.. but the image is no longer > available on nabble. > > If menus are missing, make sure your user has "admin" role. > > > On 10 December 2013 18:38, Michael Anstis wrote: > >> Was that a screen-shot of your installation? >> >> It looks fine to me.. you have one repository "uf-playground". What is >> missing? >> >> You can use the "Organizational Unit Manager" to show/manage OUs, or >> click on uf-playground in the tree-view to show it's (sparse) details. >> >> Or better still, move over to the Authoring Perspective and have a look >> at the "mortgages" project. >> >> >> >> >> On 10 December 2013 18:29, anjana.ackroyd wrote: >> >>> I deployed >>> kie-drools-wb-distribution-wars-6.0.0-20131207.033517-672-tomcat7.0.war >>> to >>> my tomcat. I am trying to point it to the repository I have by using the >>> steps listed >>> >>> http://docs.jboss.org/jbpm/v6.0/userguide/wb.Workbench.html#wb.QuickStartAddRepository >>> >>> But under Administration all I see is File Explorer >>> >>> >>> >>> >>> >>> >>> -- >>> View this message in context: >>> http://drools.46999.n3.nabble.com/Kie-Work-Bench-missing-repositories-menu-option-tp4027197.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/20131210/bda6176a/attachment-0001.html -------------- next part -------------- A non-text attachment was scrubbed... Name: not available Type: image/png Size: 165547 bytes Desc: not available Url : http://lists.jboss.org/pipermail/rules-users/attachments/20131210/bda6176a/attachment-0001.png From michael.anstis at gmail.com Tue Dec 10 16:02:47 2013 From: michael.anstis at gmail.com (Michael Anstis) Date: Tue, 10 Dec 2013 21:02:47 +0000 Subject: [rules-users] Kie Work Bench missing repositories menu option In-Reply-To: References: <1386700159521-4027197.post@n3.nabble.com> Message-ID: I can't see the screen shot; it's been compressed. That said does your user have the "admin" role? I asked earlier but you did not say. Most of the administration perspective requires that role. The warning is benign and can be ignored. It definitely would not cause problems with the administration perspective. Sent on the move On 10 Dec 2013 20:21, "Anjana Ackroyd" wrote: > I went ahead and re-installed > kie-drools-wb-distribution-wars-6.0.0.Final-tomcat7.0.war on tomcat 7. My > server starts up with no errors. But I do see a warning > > 2013-12-10 13:15:52,727 [tomcat-http--30] WARN Environment variable > M2_HOME is not set > > I am guessing I need to install Maven on my server and try it again? > I am logged in as userid : admin > Here is a screen shot > [image: Inline image 1] > > > On Tue, Dec 10, 2013 at 10:41 AM, Michael Anstis > wrote: > >> I went to double-check what I'd said.. but the image is no longer >> available on nabble. >> >> If menus are missing, make sure your user has "admin" role. >> >> >> On 10 December 2013 18:38, Michael Anstis wrote: >> >>> Was that a screen-shot of your installation? >>> >>> It looks fine to me.. you have one repository "uf-playground". What is >>> missing? >>> >>> You can use the "Organizational Unit Manager" to show/manage OUs, or >>> click on uf-playground in the tree-view to show it's (sparse) details. >>> >>> Or better still, move over to the Authoring Perspective and have a look >>> at the "mortgages" project. >>> >>> >>> >>> >>> On 10 December 2013 18:29, anjana.ackroyd wrote: >>> >>>> I deployed >>>> kie-drools-wb-distribution-wars-6.0.0-20131207.033517-672-tomcat7.0.war >>>> to >>>> my tomcat. I am trying to point it to the repository I have by using the >>>> steps listed >>>> >>>> http://docs.jboss.org/jbpm/v6.0/userguide/wb.Workbench.html#wb.QuickStartAddRepository >>>> >>>> But under Administration all I see is File Explorer >>>> >>>> >>>> >>>> >>>> >>>> >>>> -- >>>> View this message in context: >>>> http://drools.46999.n3.nabble.com/Kie-Work-Bench-missing-repositories-menu-option-tp4027197.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/20131210/665c3087/attachment-0001.html -------------- next part -------------- A non-text attachment was scrubbed... Name: not available Type: image/png Size: 165547 bytes Desc: not available Url : http://lists.jboss.org/pipermail/rules-users/attachments/20131210/665c3087/attachment-0001.png From anjana.ackroyd at gmail.com Tue Dec 10 16:09:15 2013 From: anjana.ackroyd at gmail.com (Anjana Ackroyd) Date: Tue, 10 Dec 2013 13:09:15 -0800 Subject: [rules-users] Kie Work Bench missing repositories menu option In-Reply-To: References: <1386700159521-4027197.post@n3.nabble.com> Message-ID: Yes I am logged in as userid: admin password : admin. Do I have to create that role first? Or is it already defined in the WAR deployed? All I get is a blank screen. I went ahead and installed maven and defined by M2_HOME. The warning is gone now but it dint help. Here is the log output when I click on the Administration menu , I get forwarded to this http://vlslcitcat07.regence.com:38080/kie/org.kie.workbench.drools.KIEDroolsWebapp/KIEDroolsWebapp.html?#org.kie.guvnor.Problems java.lang.RuntimeException: Failed to dispatch CDI Event at org.jboss.errai.cdi.server.events.EventDispatcher.callback(EventDispatcher.java:197) at org.jboss.errai.bus.server.DeliveryPlan.deliver(DeliveryPlan.java:47) at org.jboss.errai.bus.server.ServerMessageBusImpl.sendGlobal(ServerMessageBusImpl.java:284) at org.jboss.errai.bus.server.SimpleDispatcher.dispatchGlobal(SimpleDispatcher.java:46) at org.jboss.errai.bus.server.service.ErraiServiceImpl.store(ErraiServiceImpl.java:92) at org.jboss.errai.bus.server.service.ErraiServiceImpl.store(ErraiServiceImpl.java:109) at org.jboss.errai.bus.server.servlet.DefaultBlockingServlet.doPost(DefaultBlockingServlet.java:140) at javax.servlet.http.HttpServlet.service(HttpServlet.java:641) at javax.servlet.http.HttpServlet.service(HttpServlet.java:722) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:305) Caused by: java.lang.ClassNotFoundException: org.guvnor.common.services.project.events.DeleteProjectEvent at org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1688) at org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1533) at java.lang.Class.forName0(Native Method) at java.lang.Class.forName(Class.java:169) at org.jboss.errai.cdi.server.events.EventDispatcher.callback(EventDispatcher.java:107) ... 30 more *** Message delivery failure *** Bus: org.jboss.errai.bus.server.ServerMessageBusImpl at 760663ec Message: Qualifiers=[], BeanType=org.guvnor.common.services.project.events.DeleteProjectEvent, CommandType=RemoteSubscribe, ToSubject=cdi.event:Dispatcher errorMessage: Error calling remote service: cdi.event:Dispatcher exception: java.lang.RuntimeException: Failed to dispatch CDI Event disconnect: false I am attaching the screen shot one more time On Tue, Dec 10, 2013 at 1:02 PM, Michael Anstis wrote: > I can't see the screen shot; it's been compressed. That said does your > user have the "admin" role? I asked earlier but you did not say. Most of > the administration perspective requires that role. > > The warning is benign and can be ignored. It definitely would not cause > problems with the administration perspective. > > Sent on the move > On 10 Dec 2013 20:21, "Anjana Ackroyd" wrote: > >> I went ahead and re-installed >> kie-drools-wb-distribution-wars-6.0.0.Final-tomcat7.0.war on tomcat 7. My >> server starts up with no errors. But I do see a warning >> >> 2013-12-10 13:15:52,727 [tomcat-http--30] WARN Environment variable >> M2_HOME is not set >> >> I am guessing I need to install Maven on my server and try it again? >> I am logged in as userid : admin >> Here is a screen shot >> [image: Inline image 1] >> >> >> On Tue, Dec 10, 2013 at 10:41 AM, Michael Anstis < >> michael.anstis at gmail.com> wrote: >> >>> I went to double-check what I'd said.. but the image is no longer >>> available on nabble. >>> >>> If menus are missing, make sure your user has "admin" role. >>> >>> >>> On 10 December 2013 18:38, Michael Anstis wrote: >>> >>>> Was that a screen-shot of your installation? >>>> >>>> It looks fine to me.. you have one repository "uf-playground". What is >>>> missing? >>>> >>>> You can use the "Organizational Unit Manager" to show/manage OUs, or >>>> click on uf-playground in the tree-view to show it's (sparse) details. >>>> >>>> Or better still, move over to the Authoring Perspective and have a look >>>> at the "mortgages" project. >>>> >>>> >>>> >>>> >>>> On 10 December 2013 18:29, anjana.ackroyd wrote: >>>> >>>>> I deployed >>>>> kie-drools-wb-distribution-wars-6.0.0-20131207.033517-672-tomcat7.0.war >>>>> to >>>>> my tomcat. I am trying to point it to the repository I have by using >>>>> the >>>>> steps listed >>>>> >>>>> http://docs.jboss.org/jbpm/v6.0/userguide/wb.Workbench.html#wb.QuickStartAddRepository >>>>> >>>>> But under Administration all I see is File Explorer >>>>> >>>>> >>>>> >>>>> >>>>> >>>>> >>>>> -- >>>>> View this message in context: >>>>> http://drools.46999.n3.nabble.com/Kie-Work-Bench-missing-repositories-menu-option-tp4027197.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/20131210/27a0cd86/attachment-0001.html -------------- next part -------------- A non-text attachment was scrubbed... Name: not available Type: image/png Size: 165547 bytes Desc: not available Url : http://lists.jboss.org/pipermail/rules-users/attachments/20131210/27a0cd86/attachment-0002.png -------------- next part -------------- A non-text attachment was scrubbed... Name: Untitled.png Type: image/png Size: 169971 bytes Desc: not available Url : http://lists.jboss.org/pipermail/rules-users/attachments/20131210/27a0cd86/attachment-0003.png From dunnlow at yahoo.com Tue Dec 10 16:18:25 2013 From: dunnlow at yahoo.com (dunnlow) Date: Tue, 10 Dec 2013 13:18:25 -0800 (PST) Subject: [rules-users] Insert to non-existing entry point causing NPE in drools server? Message-ID: <1386710305799-4027204.post@n3.nabble.com> I am sending events to drools integration server (5.5). I have a good number of rules so I am looking at using entry points to speed things up. My client app will send to an entry point based on the value of one of the event attributes. While I will typically know all possible attributes, I may occasionally get an event that has an attribute value that I have 1) not foreseen, and/or 2) don't need any rules for. Whenever I insert an event to an endpoint however for which I have no rules, I get a nullpointerexception from the drools server. Is there a way to handle this? I am considering having my client app do a lookup in the ksession (which is persisted to a db) to determine all of the entry points and then, if the event attribute received isn't one of them, send to the DEFAULT entry point. Is there an easier way? Here's a sample use case: I have am receiving events based on automobile models. I have rules for Ford models at the Ford entry point and Honda models at the Honda entry point. I don't care about a car if it's a Toyota, so I have no rules (/entry points) for them. However, all events go to the rule engine. If I send the Toyota event to the drools server, I get an internal server error from the drools server. Any thoughts? Thank you, -J -- View this message in context: http://drools.46999.n3.nabble.com/Insert-to-non-existing-entry-point-causing-NPE-in-drools-server-tp4027204.html Sent from the Drools: User forum mailing list archive at Nabble.com. From michael.anstis at gmail.com Tue Dec 10 16:29:25 2013 From: michael.anstis at gmail.com (Michael Anstis) Date: Tue, 10 Dec 2013 21:29:25 +0000 Subject: [rules-users] Kie Work Bench missing repositories menu option In-Reply-To: References: <1386700159521-4027197.post@n3.nabble.com> Message-ID: Ok, that's not right at all! I'll wait to hear if anybody else has any experience with the tomcat distribution... if no news I'll try to take a look tomorrow. To be honest the we've been concentrating on AS7. Sent on the move On 10 Dec 2013 21:10, "Anjana Ackroyd" wrote: > Yes I am logged in as > userid: admin > password : admin. > Do I have to create that role first? Or is it already defined in the WAR > deployed? > > All I get is a blank screen. I went ahead and installed maven and defined > by M2_HOME. The warning is gone now but it dint help. Here is the log > output when I click on the Administration menu , I get forwarded to this > http://vlslcitcat07.regence.com:38080/kie/org.kie.workbench.drools.KIEDroolsWebapp/KIEDroolsWebapp.html?#org.kie.guvnor.Problems > > > java.lang.RuntimeException: Failed to dispatch CDI Event > at > org.jboss.errai.cdi.server.events.EventDispatcher.callback(EventDispatcher.java:197) > at > org.jboss.errai.bus.server.DeliveryPlan.deliver(DeliveryPlan.java:47) > at > org.jboss.errai.bus.server.ServerMessageBusImpl.sendGlobal(ServerMessageBusImpl.java:284) > at > org.jboss.errai.bus.server.SimpleDispatcher.dispatchGlobal(SimpleDispatcher.java:46) > at > org.jboss.errai.bus.server.service.ErraiServiceImpl.store(ErraiServiceImpl.java:92) > at > org.jboss.errai.bus.server.service.ErraiServiceImpl.store(ErraiServiceImpl.java:109) > at > org.jboss.errai.bus.server.servlet.DefaultBlockingServlet.doPost(DefaultBlockingServlet.java:140) > at javax.servlet.http.HttpServlet.service(HttpServlet.java:641) > at javax.servlet.http.HttpServlet.service(HttpServlet.java:722) > at > org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:305) > Caused by: java.lang.ClassNotFoundException: > org.guvnor.common.services.project.events.DeleteProjectEvent > at > org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1688) > at > org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1533) > at java.lang.Class.forName0(Native Method) > at java.lang.Class.forName(Class.java:169) > at > org.jboss.errai.cdi.server.events.EventDispatcher.callback(EventDispatcher.java:107) > ... 30 more > *** Message delivery failure *** > Bus: org.jboss.errai.bus.server.ServerMessageBusImpl at 760663ec > Message: Qualifiers=[], > BeanType=org.guvnor.common.services.project.events.DeleteProjectEvent, > CommandType=RemoteSubscribe, ToSubject=cdi.event:Dispatcher > errorMessage: Error calling remote service: cdi.event:Dispatcher > exception: java.lang.RuntimeException: Failed to dispatch CDI Event > disconnect: false > > > I am attaching the screen shot one more time > > > On Tue, Dec 10, 2013 at 1:02 PM, Michael Anstis wrote: > >> I can't see the screen shot; it's been compressed. That said does your >> user have the "admin" role? I asked earlier but you did not say. Most of >> the administration perspective requires that role. >> >> The warning is benign and can be ignored. It definitely would not cause >> problems with the administration perspective. >> >> Sent on the move >> On 10 Dec 2013 20:21, "Anjana Ackroyd" wrote: >> >>> I went ahead and re-installed >>> kie-drools-wb-distribution-wars-6.0.0.Final-tomcat7.0.war on tomcat 7. My >>> server starts up with no errors. But I do see a warning >>> >>> 2013-12-10 13:15:52,727 [tomcat-http--30] WARN Environment variable >>> M2_HOME is not set >>> >>> I am guessing I need to install Maven on my server and try it again? >>> I am logged in as userid : admin >>> Here is a screen shot >>> [image: Inline image 1] >>> >>> >>> On Tue, Dec 10, 2013 at 10:41 AM, Michael Anstis < >>> michael.anstis at gmail.com> wrote: >>> >>>> I went to double-check what I'd said.. but the image is no longer >>>> available on nabble. >>>> >>>> If menus are missing, make sure your user has "admin" role. >>>> >>>> >>>> On 10 December 2013 18:38, Michael Anstis wrote: >>>> >>>>> Was that a screen-shot of your installation? >>>>> >>>>> It looks fine to me.. you have one repository "uf-playground". What is >>>>> missing? >>>>> >>>>> You can use the "Organizational Unit Manager" to show/manage OUs, or >>>>> click on uf-playground in the tree-view to show it's (sparse) details. >>>>> >>>>> Or better still, move over to the Authoring Perspective and have a >>>>> look at the "mortgages" project. >>>>> >>>>> >>>>> >>>>> >>>>> On 10 December 2013 18:29, anjana.ackroyd wrote: >>>>> >>>>>> I deployed >>>>>> kie-drools-wb-distribution-wars-6.0.0-20131207.033517-672-tomcat7.0.war >>>>>> to >>>>>> my tomcat. I am trying to point it to the repository I have by using >>>>>> the >>>>>> steps listed >>>>>> >>>>>> http://docs.jboss.org/jbpm/v6.0/userguide/wb.Workbench.html#wb.QuickStartAddRepository >>>>>> >>>>>> But under Administration all I see is File Explorer >>>>>> >>>>>> >>>>>> >>>>>> >>>>>> >>>>>> >>>>>> -- >>>>>> View this message in context: >>>>>> http://drools.46999.n3.nabble.com/Kie-Work-Bench-missing-repositories-menu-option-tp4027197.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 > -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.jboss.org/pipermail/rules-users/attachments/20131210/5fa82a95/attachment-0001.html -------------- next part -------------- A non-text attachment was scrubbed... Name: not available Type: image/png Size: 165547 bytes Desc: not available Url : http://lists.jboss.org/pipermail/rules-users/attachments/20131210/5fa82a95/attachment-0001.png From mproctor at codehaus.org Tue Dec 10 19:13:03 2013 From: mproctor at codehaus.org (Mark Proctor) Date: Wed, 11 Dec 2013 00:13:03 +0000 Subject: [rules-users] Kie Work Bench missing repositories menu option In-Reply-To: References: <1386700159521-4027197.post@n3.nabble.com> Message-ID: <3FB34B9E-B769-40FF-B4E3-CEF8BE869480@codehaus.org> could you try with JBossAS 7.1.1? That?s the one we all use for our day to day testing? If you look at the set of videos in the playlist, the first one shows you how to do setup and installation. Each video shows a different part of the workbench. The video?s in the playlist can be played back to back: http://blog.athico.com/2013/11/videos-showing-new-workbench.html Mark On 10 Dec 2013, at 21:09, Anjana Ackroyd wrote: > Yes I am logged in as > userid: admin > password : admin. > Do I have to create that role first? Or is it already defined in the WAR deployed? > > All I get is a blank screen. I went ahead and installed maven and defined by M2_HOME. The warning is gone now but it dint help. Here is the log output when I click on the Administration menu , I get forwarded to this http://vlslcitcat07.regence.com:38080/kie/org.kie.workbench.drools.KIEDroolsWebapp/KIEDroolsWebapp.html?#org.kie.guvnor.Problems > > java.lang.RuntimeException: Failed to dispatch CDI Event > at org.jboss.errai.cdi.server.events.EventDispatcher.callback(EventDispatcher.java:197) > at org.jboss.errai.bus.server.DeliveryPlan.deliver(DeliveryPlan.java:47) > at org.jboss.errai.bus.server.ServerMessageBusImpl.sendGlobal(ServerMessageBusImpl.java:284) > at org.jboss.errai.bus.server.SimpleDispatcher.dispatchGlobal(SimpleDispatcher.java:46) > at org.jboss.errai.bus.server.service.ErraiServiceImpl.store(ErraiServiceImpl.java:92) > at org.jboss.errai.bus.server.service.ErraiServiceImpl.store(ErraiServiceImpl.java:109) > at org.jboss.errai.bus.server.servlet.DefaultBlockingServlet.doPost(DefaultBlockingServlet.java:140) > at javax.servlet.http.HttpServlet.service(HttpServlet.java:641) > at javax.servlet.http.HttpServlet.service(HttpServlet.java:722) > at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:305) > Caused by: java.lang.ClassNotFoundException: org.guvnor.common.services.project.events.DeleteProjectEvent > at org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1688) > at org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1533) > at java.lang.Class.forName0(Native Method) > at java.lang.Class.forName(Class.java:169) > at org.jboss.errai.cdi.server.events.EventDispatcher.callback(EventDispatcher.java:107) > ... 30 more > *** Message delivery failure *** > Bus: org.jboss.errai.bus.server.ServerMessageBusImpl at 760663ec > Message: Qualifiers=[], BeanType=org.guvnor.common.services.project.events.DeleteProjectEvent, CommandType=RemoteSubscribe, ToSubject=cdi.event:Dispatcher > errorMessage: Error calling remote service: cdi.event:Dispatcher > exception: java.lang.RuntimeException: Failed to dispatch CDI Event > disconnect: false > > > I am attaching the screen shot one more time > > > On Tue, Dec 10, 2013 at 1:02 PM, Michael Anstis wrote: > I can't see the screen shot; it's been compressed. That said does your user have the "admin" role? I asked earlier but you did not say. Most of the administration perspective requires that role. > > The warning is benign and can be ignored. It definitely would not cause problems with the administration perspective. > > Sent on the move > > On 10 Dec 2013 20:21, "Anjana Ackroyd" wrote: > I went ahead and re-installed kie-drools-wb-distribution-wars-6.0.0.Final-tomcat7.0.war on tomcat 7. My server starts up with no errors. But I do see a warning > > 2013-12-10 13:15:52,727 [tomcat-http--30] WARN Environment variable M2_HOME is not set > > I am guessing I need to install Maven on my server and try it again? > I am logged in as userid : admin > Here is a screen shot > > > > On Tue, Dec 10, 2013 at 10:41 AM, Michael Anstis wrote: > I went to double-check what I'd said.. but the image is no longer available on nabble. > > If menus are missing, make sure your user has "admin" role. > > > On 10 December 2013 18:38, Michael Anstis wrote: > Was that a screen-shot of your installation? > > It looks fine to me.. you have one repository "uf-playground". What is missing? > > You can use the "Organizational Unit Manager" to show/manage OUs, or click on uf-playground in the tree-view to show it's (sparse) details. > > Or better still, move over to the Authoring Perspective and have a look at the "mortgages" project. > > > > > On 10 December 2013 18:29, anjana.ackroyd wrote: > I deployed > kie-drools-wb-distribution-wars-6.0.0-20131207.033517-672-tomcat7.0.war to > my tomcat. I am trying to point it to the repository I have by using the > steps listed > http://docs.jboss.org/jbpm/v6.0/userguide/wb.Workbench.html#wb.QuickStartAddRepository > > But under Administration all I see is File Explorer > > > > > > > -- > View this message in context: http://drools.46999.n3.nabble.com/Kie-Work-Bench-missing-repositories-menu-option-tp4027197.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 -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.jboss.org/pipermail/rules-users/attachments/20131211/762203bd/attachment.html From nelson.wan at hotmail.com Tue Dec 10 21:09:49 2013 From: nelson.wan at hotmail.com (nelson.wan) Date: Tue, 10 Dec 2013 18:09:49 -0800 (PST) Subject: [rules-users] Drools 6 - "kie-config-cli" seems not working with "kie-drools-wb" In-Reply-To: References: <1386433014001-4027146.post@n3.nabble.com> Message-ID: <1386727789547-4027207.post@n3.nabble.com> Thanks a lot. Now I understood that the config tool commands for adding role to OU, Repo and Proj are mainly to deal with new roles. In additon to admin and analyst roles, hope to see if any predefined role that can serve as a read-only user? If no such role, can I use config tool to create read-only user role? From the documentation, seems there is no such command. Thanks in advance again. -- View this message in context: http://drools.46999.n3.nabble.com/Drools-6-kie-config-cli-seems-not-working-with-kie-drools-wb-tp4027146p4027207.html Sent from the Drools: User forum mailing list archive at Nabble.com. From vimalkansal at yahoo.com Wed Dec 11 00:23:57 2013 From: vimalkansal at yahoo.com (vimalkansal) Date: Tue, 10 Dec 2013 21:23:57 -0800 (PST) Subject: [rules-users] Drools6 : Having trouble in using kie-ci Message-ID: <1386739437135-4027208.post@n3.nabble.com> Hi, I have an instance of Kie-WB running and I have started it with property "org.guvnor.m2repo.dir" set to some non default location (i.e not in /../home/.2). I am able to use the KIE WB to "build and deploy" the project to this repository. Then I have built a web application ( I have declared the dependency on org.kie/kie-ci module and I have verified that this jar is getting packaged under WEB-INF/lib folder of my .war file). So with this setup, when I have a code like this in my web application : KieServices ks = KieServices.Factory.get(); KieContainer kContainer = null; *kContainer = ks.newKieContainer(ks.newReleaseId("com.xyz", "HelloWorld", "1.0.0-SNAPSHOT"));* it seems to wait inordinately long at the highlighted line and then throws up an exception to the telling can't get the default Kie Session. My question : Do I have to tell the web application about the location of the maven repo? if yes how? Thx Vimal -- View this message in context: http://drools.46999.n3.nabble.com/Drools6-Having-trouble-in-using-kie-ci-tp4027208.html Sent from the Drools: User forum mailing list archive at Nabble.com. From anjana.ackroyd at gmail.com Wed Dec 11 00:59:26 2013 From: anjana.ackroyd at gmail.com (Anjana Ackroyd) Date: Tue, 10 Dec 2013 21:59:26 -0800 Subject: [rules-users] Kie Work Bench missing repositories menu option In-Reply-To: <3FB34B9E-B769-40FF-B4E3-CEF8BE869480@codehaus.org> References: <1386700159521-4027197.post@n3.nabble.com> <3FB34B9E-B769-40FF-B4E3-CEF8BE869480@codehaus.org> Message-ID: Ok I tried to deploy it on jboss 7.1.1 following the steps in the video My deploy fails with this error message 122:54:34,699 WARN [org.jboss.weld.Bootstrap] (MSC service thread 1-3) WELD-001440 Scope type @javax.enterprise.context.RequestScoped() used on injection point [field] @Inject @RequestScoped private org.jbpm.designer.repository.vfs.VFSRepository.descriptor 22:54:35,735 ERROR [org.uberfire.java.nio.file.api.FileSystemProviders] (MSC service thread 1-3) 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 at java.util.ServiceLoader.fail(ServiceLoader.java:224) [rt.jar:1.7.0_05] at java.util.ServiceLoader.access$100(ServiceLoader.java:181) [rt.jar:1.7.0_05] at java.util.ServiceLoader$LazyIterator.next(ServiceLoader.java:370) [rt.jar:1.7.0_05] at java.util.ServiceLoader$1.next(ServiceLoader.java:438) [rt.jar:1.7.0_05] at org.uberfire.java.nio.file.api.FileSystemProviders.buildProviders(FileSystemProviders.java:62) [uberfire-nio2-api-0.3.0.Final.jar:0.3.0.Final] at org.uberfire.java.nio.file.api.FileSystemProviders.(FileSystemProviders.java:48) [uberfire-nio2-api-0.3.0.Final.jar:0.3.0.Final] at org.uberfire.java.nio.file.FileSystems.newFileSystem(FileSystems.java:117) [uberfire-nio2-api-0.3.0.Final.jar:0.3.0.Final] at org.uberfire.java.nio.file.FileSystems.newFileSystem(FileSystems.java:83) [uberfire-nio2-api-0.3.0.Final.jar:0.3.0.Final] at org.uberfire.io.impl.AbstractIOService.newFileSystem(AbstractIOService.java:246) [uberfire-io-0.3.0.Final.jar:0.3.0.Final] at org.uberfire.backend.server.config.ConfigurationServiceImpl.setup(ConfigurationServiceImpl.java:75) [uberfire-backend-server-0.3.0.Final.jar:0.3.0.Final] I am not sure which port its trying to use, it doesnt say in the log message ?? On Tue, Dec 10, 2013 at 4:13 PM, Mark Proctor wrote: > could you try with JBossAS 7.1.1? That?s the one we all use for our day to > day testing? > > If you look at the set of videos in the playlist, the first one shows you > how to do setup and installation. Each video shows a different part of the > workbench. The video?s in the playlist can be played back to back: > http://blog.athico.com/2013/11/videos-showing-new-workbench.html > > Mark > On 10 Dec 2013, at 21:09, Anjana Ackroyd wrote: > > Yes I am logged in as > userid: admin > password : admin. > Do I have to create that role first? Or is it already defined in the WAR > deployed? > > All I get is a blank screen. I went ahead and installed maven and defined > by M2_HOME. The warning is gone now but it dint help. Here is the log > output when I click on the Administration menu , I get forwarded to this > http://vlslcitcat07.regence.com:38080/kie/org.kie.workbench.drools.KIEDroolsWebapp/KIEDroolsWebapp.html?#org.kie.guvnor.Problems > > > java.lang.RuntimeException: Failed to dispatch CDI Event > at > org.jboss.errai.cdi.server.events.EventDispatcher.callback(EventDispatcher.java:197) > at > org.jboss.errai.bus.server.DeliveryPlan.deliver(DeliveryPlan.java:47) > at > org.jboss.errai.bus.server.ServerMessageBusImpl.sendGlobal(ServerMessageBusImpl.java:284) > at > org.jboss.errai.bus.server.SimpleDispatcher.dispatchGlobal(SimpleDispatcher.java:46) > at > org.jboss.errai.bus.server.service.ErraiServiceImpl.store(ErraiServiceImpl.java:92) > at > org.jboss.errai.bus.server.service.ErraiServiceImpl.store(ErraiServiceImpl.java:109) > at > org.jboss.errai.bus.server.servlet.DefaultBlockingServlet.doPost(DefaultBlockingServlet.java:140) > at javax.servlet.http.HttpServlet.service(HttpServlet.java:641) > at javax.servlet.http.HttpServlet.service(HttpServlet.java:722) > at > org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:305) > Caused by: java.lang.ClassNotFoundException: > org.guvnor.common.services.project.events.DeleteProjectEvent > at > org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1688) > at > org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1533) > at java.lang.Class.forName0(Native Method) > at java.lang.Class.forName(Class.java:169) > at > org.jboss.errai.cdi.server.events.EventDispatcher.callback(EventDispatcher.java:107) > ... 30 more > *** Message delivery failure *** > Bus: org.jboss.errai.bus.server.ServerMessageBusImpl at 760663ec > Message: Qualifiers=[], > BeanType=org.guvnor.common.services.project.events.DeleteProjectEvent, > CommandType=RemoteSubscribe, ToSubject=cdi.event:Dispatcher > errorMessage: Error calling remote service: cdi.event:Dispatcher > exception: java.lang.RuntimeException: Failed to dispatch CDI Event > disconnect: false > > > I am attaching the screen shot one more time > > > On Tue, Dec 10, 2013 at 1:02 PM, Michael Anstis wrote: > >> I can't see the screen shot; it's been compressed. That said does your >> user have the "admin" role? I asked earlier but you did not say. Most of >> the administration perspective requires that role. >> >> The warning is benign and can be ignored. It definitely would not cause >> problems with the administration perspective. >> >> Sent on the move >> On 10 Dec 2013 20:21, "Anjana Ackroyd" wrote: >> >>> I went ahead and re-installed >>> kie-drools-wb-distribution-wars-6.0.0.Final-tomcat7.0.war on tomcat 7. My >>> server starts up with no errors. But I do see a warning >>> >>> 2013-12-10 13:15:52,727 [tomcat-http--30] WARN Environment variable >>> M2_HOME is not set >>> >>> I am guessing I need to install Maven on my server and try it again? >>> I am logged in as userid : admin >>> Here is a screen shot >>> >>> >>> >>> On Tue, Dec 10, 2013 at 10:41 AM, Michael Anstis < >>> michael.anstis at gmail.com> wrote: >>> >>>> I went to double-check what I'd said.. but the image is no longer >>>> available on nabble. >>>> >>>> If menus are missing, make sure your user has "admin" role. >>>> >>>> >>>> On 10 December 2013 18:38, Michael Anstis wrote: >>>> >>>>> Was that a screen-shot of your installation? >>>>> >>>>> It looks fine to me.. you have one repository "uf-playground". What is >>>>> missing? >>>>> >>>>> You can use the "Organizational Unit Manager" to show/manage OUs, or >>>>> click on uf-playground in the tree-view to show it's (sparse) details. >>>>> >>>>> Or better still, move over to the Authoring Perspective and have a >>>>> look at the "mortgages" project. >>>>> >>>>> >>>>> >>>>> >>>>> On 10 December 2013 18:29, anjana.ackroyd wrote: >>>>> >>>>>> I deployed >>>>>> kie-drools-wb-distribution-wars-6.0.0-20131207.033517-672-tomcat7.0.war >>>>>> to >>>>>> my tomcat. I am trying to point it to the repository I have by using >>>>>> the >>>>>> steps listed >>>>>> >>>>>> http://docs.jboss.org/jbpm/v6.0/userguide/wb.Workbench.html#wb.QuickStartAddRepository >>>>>> >>>>>> But under Administration all I see is File Explorer >>>>>> >>>>>> >>>>>> >>>>>> >>>>>> >>>>>> >>>>>> -- >>>>>> View this message in context: >>>>>> http://drools.46999.n3.nabble.com/Kie-Work-Bench-missing-repositories-menu-option-tp4027197.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 > -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.jboss.org/pipermail/rules-users/attachments/20131210/e2f1369d/attachment-0001.html From mproctor at codehaus.org Wed Dec 11 01:19:41 2013 From: mproctor at codehaus.org (Mark Proctor) Date: Wed, 11 Dec 2013 06:19:41 +0000 Subject: [rules-users] Kie Work Bench missing repositories menu option In-Reply-To: References: <1386700159521-4027197.post@n3.nabble.com> <3FB34B9E-B769-40FF-B4E3-CEF8BE869480@codehaus.org> Message-ID: http://docs.jboss.org/drools/release/6.0.0.Final/drools-docs/html/wb.Workbench.html#wb.Installation 15.1.3. System properties org.uberfire.nio.git.daemon.host: If daemon enabled, uses this property as local host identifier. Default:localhost org.uberfire.nio.git.daemon.port: If daemon enabled, uses this property as port number. Default: 9418 Do you still have your tomcat running, did you forget to shut it down? Maybe the other WB installation is still running. Mark On 11 Dec 2013, at 05:59, Anjana Ackroyd wrote: > Ok I tried to deploy it on jboss 7.1.1 following the steps in the video > > > My deploy fails with this error message > 122:54:34,699 WARN [org.jboss.weld.Bootstrap] (MSC service thread 1-3) WELD-001440 Scope type @javax.enterprise.context.RequestScoped() used on injection point [field] @Inject @RequestScoped private org.jbpm.designer.repository.vfs.VFSRepository.descriptor > 22:54:35,735 ERROR [org.uberfire.java.nio.file.api.FileSystemProviders] (MSC service thread 1-3) 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 > at java.util.ServiceLoader.fail(ServiceLoader.java:224) [rt.jar:1.7.0_05] > at java.util.ServiceLoader.access$100(ServiceLoader.java:181) [rt.jar:1.7.0_05] > at java.util.ServiceLoader$LazyIterator.next(ServiceLoader.java:370) [rt.jar:1.7.0_05] > at java.util.ServiceLoader$1.next(ServiceLoader.java:438) [rt.jar:1.7.0_05] > at org.uberfire.java.nio.file.api.FileSystemProviders.buildProviders(FileSystemProviders.java:62) [uberfire-nio2-api-0.3.0.Final.jar:0.3.0.Final] > at org.uberfire.java.nio.file.api.FileSystemProviders.(FileSystemProviders.java:48) [uberfire-nio2-api-0.3.0.Final.jar:0.3.0.Final] > at org.uberfire.java.nio.file.FileSystems.newFileSystem(FileSystems.java:117) [uberfire-nio2-api-0.3.0.Final.jar:0.3.0.Final] > at org.uberfire.java.nio.file.FileSystems.newFileSystem(FileSystems.java:83) [uberfire-nio2-api-0.3.0.Final.jar:0.3.0.Final] > at org.uberfire.io.impl.AbstractIOService.newFileSystem(AbstractIOService.java:246) [uberfire-io-0.3.0.Final.jar:0.3.0.Final] > at org.uberfire.backend.server.config.ConfigurationServiceImpl.setup(ConfigurationServiceImpl.java:75) [uberfire-backend-server-0.3.0.Final.jar:0.3.0.Final] > > > > I am not sure which port its trying to use, it doesnt say in the log message ?? > > > On Tue, Dec 10, 2013 at 4:13 PM, Mark Proctor wrote: > could you try with JBossAS 7.1.1? That?s the one we all use for our day to day testing? > > If you look at the set of videos in the playlist, the first one shows you how to do setup and installation. Each video shows a different part of the workbench. The video?s in the playlist can be played back to back: > http://blog.athico.com/2013/11/videos-showing-new-workbench.html > > Mark > On 10 Dec 2013, at 21:09, Anjana Ackroyd wrote: > >> Yes I am logged in as >> userid: admin >> password : admin. >> Do I have to create that role first? Or is it already defined in the WAR deployed? >> >> All I get is a blank screen. I went ahead and installed maven and defined by M2_HOME. The warning is gone now but it dint help. Here is the log output when I click on the Administration menu , I get forwarded to this http://vlslcitcat07.regence.com:38080/kie/org.kie.workbench.drools.KIEDroolsWebapp/KIEDroolsWebapp.html?#org.kie.guvnor.Problems >> >> java.lang.RuntimeException: Failed to dispatch CDI Event >> at org.jboss.errai.cdi.server.events.EventDispatcher.callback(EventDispatcher.java:197) >> at org.jboss.errai.bus.server.DeliveryPlan.deliver(DeliveryPlan.java:47) >> at org.jboss.errai.bus.server.ServerMessageBusImpl.sendGlobal(ServerMessageBusImpl.java:284) >> at org.jboss.errai.bus.server.SimpleDispatcher.dispatchGlobal(SimpleDispatcher.java:46) >> at org.jboss.errai.bus.server.service.ErraiServiceImpl.store(ErraiServiceImpl.java:92) >> at org.jboss.errai.bus.server.service.ErraiServiceImpl.store(ErraiServiceImpl.java:109) >> at org.jboss.errai.bus.server.servlet.DefaultBlockingServlet.doPost(DefaultBlockingServlet.java:140) >> at javax.servlet.http.HttpServlet.service(HttpServlet.java:641) >> at javax.servlet.http.HttpServlet.service(HttpServlet.java:722) >> at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:305) >> Caused by: java.lang.ClassNotFoundException: org.guvnor.common.services.project.events.DeleteProjectEvent >> at org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1688) >> at org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1533) >> at java.lang.Class.forName0(Native Method) >> at java.lang.Class.forName(Class.java:169) >> at org.jboss.errai.cdi.server.events.EventDispatcher.callback(EventDispatcher.java:107) >> ... 30 more >> *** Message delivery failure *** >> Bus: org.jboss.errai.bus.server.ServerMessageBusImpl at 760663ec >> Message: Qualifiers=[], BeanType=org.guvnor.common.services.project.events.DeleteProjectEvent, CommandType=RemoteSubscribe, ToSubject=cdi.event:Dispatcher >> errorMessage: Error calling remote service: cdi.event:Dispatcher >> exception: java.lang.RuntimeException: Failed to dispatch CDI Event >> disconnect: false >> >> >> I am attaching the screen shot one more time >> >> >> On Tue, Dec 10, 2013 at 1:02 PM, Michael Anstis wrote: >> I can't see the screen shot; it's been compressed. That said does your user have the "admin" role? I asked earlier but you did not say. Most of the administration perspective requires that role. >> >> The warning is benign and can be ignored. It definitely would not cause problems with the administration perspective. >> >> Sent on the move >> >> On 10 Dec 2013 20:21, "Anjana Ackroyd" wrote: >> I went ahead and re-installed kie-drools-wb-distribution-wars-6.0.0.Final-tomcat7.0.war on tomcat 7. My server starts up with no errors. But I do see a warning >> >> 2013-12-10 13:15:52,727 [tomcat-http--30] WARN Environment variable M2_HOME is not set >> >> I am guessing I need to install Maven on my server and try it again? >> I am logged in as userid : admin >> Here is a screen shot >> >> >> >> On Tue, Dec 10, 2013 at 10:41 AM, Michael Anstis wrote: >> I went to double-check what I'd said.. but the image is no longer available on nabble. >> >> If menus are missing, make sure your user has "admin" role. >> >> >> On 10 December 2013 18:38, Michael Anstis wrote: >> Was that a screen-shot of your installation? >> >> It looks fine to me.. you have one repository "uf-playground". What is missing? >> >> You can use the "Organizational Unit Manager" to show/manage OUs, or click on uf-playground in the tree-view to show it's (sparse) details. >> >> Or better still, move over to the Authoring Perspective and have a look at the "mortgages" project. >> >> >> >> >> On 10 December 2013 18:29, anjana.ackroyd wrote: >> I deployed >> kie-drools-wb-distribution-wars-6.0.0-20131207.033517-672-tomcat7.0.war to >> my tomcat. I am trying to point it to the repository I have by using the >> steps listed >> http://docs.jboss.org/jbpm/v6.0/userguide/wb.Workbench.html#wb.QuickStartAddRepository >> >> But under Administration all I see is File Explorer >> >> >> >> >> >> >> -- >> View this message in context: http://drools.46999.n3.nabble.com/Kie-Work-Bench-missing-repositories-menu-option-tp4027197.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 > > _______________________________________________ > 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/20131211/421a3245/attachment.html From michael.anstis at gmail.com Wed Dec 11 01:36:15 2013 From: michael.anstis at gmail.com (Michael Anstis) Date: Wed, 11 Dec 2013 06:36:15 +0000 Subject: [rules-users] Drools 6 - "kie-config-cli" seems not working with "kie-drools-wb" In-Reply-To: <1386727789547-4027207.post@n3.nabble.com> References: <1386433014001-4027146.post@n3.nabble.com> <1386727789547-4027207.post@n3.nabble.com> Message-ID: We don't provide for read-only roles at present in 6.0. Sent on the move On 11 Dec 2013 02:10, "nelson.wan" wrote: > > Thanks a lot. Now I understood that the config tool commands for adding > role > to OU, Repo and Proj are mainly to deal with new roles. > > In additon to admin and analyst roles, hope to see if any predefined role > that can serve as a read-only user? > > If no such role, can I use config tool to create read-only user role? From > the documentation, seems there is no such command. > > Thanks in advance again. > > > > > -- > View this message in context: > http://drools.46999.n3.nabble.com/Drools-6-kie-config-cli-seems-not-working-with-kie-drools-wb-tp4027146p4027207.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/20131211/105d7630/attachment-0001.html From wolfgang.laun at gmail.com Wed Dec 11 01:37:13 2013 From: wolfgang.laun at gmail.com (Wolfgang Laun) Date: Wed, 11 Dec 2013 07:37:13 +0100 Subject: [rules-users] Insert to non-existing entry point causing NPE in drools server? In-Reply-To: <1386710305799-4027204.post@n3.nabble.com> References: <1386710305799-4027204.post@n3.nabble.com> Message-ID: What makes you think that using entry points "speeds things up"? The Engine still has to evaluate the entry-point attribute of a fact (handle), just like any other attribute. Or do you have conclusive evidence based on solid benchmarks? -W On 10/12/2013, dunnlow wrote: > I am sending events to drools integration server (5.5). I have a good > number > of rules so I am looking at using entry points to speed things up. My > client app will send to an entry point based on the value of one of the > event attributes. While I will typically know all possible attributes, I > may occasionally get an event that has an attribute value that I have 1) > not > foreseen, and/or 2) don't need any rules for. Whenever I insert an event > to > an endpoint however for which I have no rules, I get a nullpointerexception > from the drools server. > > Is there a way to handle this? I am considering having my client app do a > lookup in the ksession (which is persisted to a db) to determine all of the > entry points and then, if the event attribute received isn't one of them, > send to the DEFAULT entry point. Is there an easier way? > > Here's a sample use case: I have am receiving events based on automobile > models. I have rules for Ford models at the Ford entry point and Honda > models at the Honda entry point. I don't care about a car if it's a > Toyota, > so I have no rules (/entry points) for them. However, all events go to the > rule engine. If I send the Toyota event to the drools server, I get an > internal server error from the drools server. > > Any thoughts? > > Thank you, > -J > > > > -- > View this message in context: > http://drools.46999.n3.nabble.com/Insert-to-non-existing-entry-point-causing-NPE-in-drools-server-tp4027204.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 Wed Dec 11 01:45:56 2013 From: michael.anstis at gmail.com (Michael Anstis) Date: Wed, 11 Dec 2013 06:45:56 +0000 Subject: [rules-users] Drools 6 - "kie-config-cli" seems not working with "kie-drools-wb" In-Reply-To: References: <1386433014001-4027146.post@n3.nabble.com> <1386727789547-4027207.post@n3.nabble.com> Message-ID: I should elaborate a little. In 5.5 (and lower) we used JCR to authenticate but had our own authorization implementation. In 6.0 we use JACC for authentication and authorization driven by requests to use authentication and authorization provided by application-servers/containers. Subject to feedback we may need to look into provision of permissions integrated with JACC. Sent on the move We don't provide for read-only roles at present in 6.0. Sent on the move On 11 Dec 2013 02:10, "nelson.wan" wrote: > > Thanks a lot. Now I understood that the config tool commands for adding > role > to OU, Repo and Proj are mainly to deal with new roles. > > In additon to admin and analyst roles, hope to see if any predefined role > that can serve as a read-only user? > > If no such role, can I use config tool to create read-only user role? From > the documentation, seems there is no such command. > > Thanks in advance again. > > > > > -- > View this message in context: > http://drools.46999.n3.nabble.com/Drools-6-kie-config-cli-seems-not-working-with-kie-drools-wb-tp4027146p4027207.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/20131211/683934bc/attachment.html From michael.anstis at gmail.com Wed Dec 11 01:49:45 2013 From: michael.anstis at gmail.com (Michael Anstis) Date: Wed, 11 Dec 2013 06:49:45 +0000 Subject: [rules-users] Drools6 : Having trouble in using kie-ci In-Reply-To: <1386739437135-4027208.post@n3.nabble.com> References: <1386739437135-4027208.post@n3.nabble.com> Message-ID: Have you add the workbench maven repository to your web-app's pom and the project you've compiled in the workbench as a decency? Have you disabled security for the maven repository or have you configured maven preemptive authentication in settings.xml? There were a number of emails last week with exactly the same question - and solutions given. Sent on the move On 11 Dec 2013 05:24, "vimalkansal" wrote: > Hi, > > I have an instance of Kie-WB running and I have started it with property > "org.guvnor.m2repo.dir" set to some non default location (i.e not in > /../home/.2). I am able to use the KIE WB to "build and deploy" the > project > to this repository. Then I have built a web application ( I have declared > the dependency on org.kie/kie-ci module and I have verified that this jar > is > getting packaged under WEB-INF/lib folder of my .war file). So with this > setup, when I have a code like this in my web application : > > KieServices ks = KieServices.Factory.get(); > KieContainer kContainer = null; > *kContainer = ks.newKieContainer(ks.newReleaseId("com.xyz", "HelloWorld", > "1.0.0-SNAPSHOT"));* > > it seems to wait inordinately long at the highlighted line and then throws > up an exception to the telling can't get the default Kie Session. My > question : > > Do I have to tell the web application about the location of the maven > repo? if yes how? > > Thx > > Vimal > > > > -- > View this message in context: > http://drools.46999.n3.nabble.com/Drools6-Having-trouble-in-using-kie-ci-tp4027208.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/20131211/28ad4e78/attachment.html From vimalkansal at yahoo.com Wed Dec 11 02:11:48 2013 From: vimalkansal at yahoo.com (vimalkansal) Date: Tue, 10 Dec 2013 23:11:48 -0800 (PST) Subject: [rules-users] Drools6 : Having trouble in using kie-ci In-Reply-To: References: <1386739437135-4027208.post@n3.nabble.com> Message-ID: <1386745908017-4027215.post@n3.nabble.com> Yup, I think that must be the issue, I simply forgot to do that. Thx a lot Vimal -- View this message in context: http://drools.46999.n3.nabble.com/Drools6-Having-trouble-in-using-kie-ci-tp4027208p4027215.html Sent from the Drools: User forum mailing list archive at Nabble.com. From wolfgang.laun at gmail.com Wed Dec 11 02:15:08 2013 From: wolfgang.laun at gmail.com (Wolfgang Laun) Date: Wed, 11 Dec 2013 08:15:08 +0100 Subject: [rules-users] Accessing items in a list In-Reply-To: <1386694970567-4027194.post@n3.nabble.com> References: <1386694970567-4027194.post@n3.nabble.com> Message-ID: On 10/12/2013, mkhan wrote: > Hi, > I am new to doorls so please can you help me. > I am trying to access an ietm from a list in a rule like ... > > $data: List(this != null, size > 9) from accumulate( > $obj1 : FwVehicle( > notchCodingWire1 != null, > lineVoltage != null > ) > over window:time(10s) > from entry-point "DataStream", > collectList($obj1) > ) > > $first : $data.get(0) > > but i get an error ... > [ERR 102] Line 164:19 mismatched input '0' expecting ')' in rule "test1" in > pattern $data.get > > Does anyone have any ideas what I am doing wrong please? It's a case of incorrect syntax. "xxx.yyy(zzz)" looks like a pattern for a fact of type xxx.yyy to the engine, and zzz can't be an integer literal. You can use $data.get(0) in a (Java) expression, though, but there's Not enough context shown for more constructive and conclusive advice. -W > > > > > -- > View this message in context: > http://drools.46999.n3.nabble.com/Accessing-items-in-a-list-tp4027194.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 Wed Dec 11 04:37:06 2013 From: michael.anstis at gmail.com (Michael Anstis) Date: Wed, 11 Dec 2013 09:37:06 +0000 Subject: [rules-users] Entry Point from parameter in Guvnor Decision Table? In-Reply-To: <1386632477582-4027179.post@n3.nabble.com> References: <1386345385803-4027132.post@n3.nabble.com> <1386632477582-4027179.post@n3.nabble.com> Message-ID: Your best option would be to add a BRL Fragment column. You'd then have to add a "Free Form Text" condition, enter plain DRL using @{a-variable-name} as the entry-point in the DRL. With kind regards, Mike On 9 December 2013 23:41, dunnlow wrote: > manstis wrote > > Are you using a XLS decision table or a web one? > > I'm using the Guvnor web-guided editor to build the decision table. > > Thanks, > -J > > > > -- > View this message in context: > http://drools.46999.n3.nabble.com/Entry-Point-from-parameter-in-Guvnor-Decision-Table-tp4027132p4027179.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/20131211/228f191f/attachment.html From stephen.masters at me.com Wed Dec 11 05:38:15 2013 From: stephen.masters at me.com (Stephen Masters) Date: Wed, 11 Dec 2013 10:38:15 +0000 Subject: [rules-users] Stateless session commands and ExecutionResults (5.5.0.Final) In-Reply-To: References: Message-ID: <08BB9E59-C9D6-4663-A738-882D9154B619@me.com> Thanks for that, Wolfgang. I have been working on something else for a few days, but just switched over to batch execution, and that is giving me some appropriate results (my tests are passing). Which leads me to the question ... Given that Example 3.4.1 in the Drools 5.5.0.Final user guide does not compile, is that because there is a bug in the implementation of command execution? Or is it a bug in the example. i.e. The results should just not be assigned to anything? The results (an ArrayList containing the facts which were just inserted) should be assigned to a List of Object? The example should just be removed from the user guide, as it is no longer a valid/recommended approach? Anybody with thoughts on that? Assuming that the answer is a documentation fix, I?ll be happy to correct it appropriately and submit a pull request. Cheers, Steve On 4 Dec 2013, at 12:24, Wolfgang Laun wrote: > I think you have to put your insert command into a list > List> cmds = new ArrayList(); > and pass this via batch execution > CommandFactory.newBatchExecution( cmds ) > > -W > > On 04/12/2013, Stephen Masters wrote: >> Hi folks, >> >> Can anyone explain how stateless session execution results should work? >> Working through the docs and tracing the code, it?s getting a bit >> confusing. >> >> Firstly, according to the user manual, one should be able to insert a list >> of facts as a Command, and get an instance of ExecutionResults back, which >> can then be queried. Here?s the example code: >> StatelessKnowledgeSession ksession = kbase.newStatelessKnowledgeSession(); >> >> Command cmd = CommandFactory.newInsertElements( Arrays.asList( Object[] { >> >> new Cheese( "stilton" ), >> >> new Cheese( "brie" ), >> >> new Cheese( "cheddar" ), >> >> }); >> >> ExecutionResults bresults = ksession.execute( cmd ); >> >> That doesn?t compile, so I fixed it as follows: >> >> Command cmd = CommandFactory.newInsertElements( Arrays.asList( >> new Cheese( "stilton" ), >> new Cheese( "brie" ), >> new Cheese( "cheddar" ) >> )); >> ExecutionResults bresults = ksession.execute( cmd ); >> >> This does now compile, but running it throws a ClassCastException: >> java.lang.ClassCastException: java.util.ArrayList cannot be cast to >> org.drools.runtime.ExecutionResults >> >> Taking a look through the Drools code, it would appear that Command has a >> generic type, which in the case of an InsertElementsCommand is: >> GenericCommand> >> >> In turn, the execute command in StatelessKnowledgeSessionImpl casts its >> result to that generic type: >> public T execute(Command command) { >> Object o = ((GenericCommand) command).execute( context ); >> ... >> return (T) o; >> >> So the ClassCastException is because the execute method returns an ArrayList >> of FactHandle instead of an ExecutionResults. >> >> I?m assuming that I must have got the wrong end of the stick somewhere, so >> what should I be doing to get an ExecutionResults from a stateless session, >> which I can then query? >> >> Cheers, >> >> Steve > > _______________________________________________ > 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/20131211/47ef3dee/attachment-0001.html From wolfgang.laun at gmail.com Wed Dec 11 06:49:17 2013 From: wolfgang.laun at gmail.com (Wolfgang Laun) Date: Wed, 11 Dec 2013 12:49:17 +0100 Subject: [rules-users] Stateless session commands and ExecutionResults (5.5.0.Final) In-Reply-To: <08BB9E59-C9D6-4663-A738-882D9154B619@me.com> References: <08BB9E59-C9D6-4663-A738-882D9154B619@me.com> Message-ID: The mean thing is that the code org.drools.command.CommandFactory uses the generic interface org.drools.command.Command for all commands without specifying the generic parameter with the many newXyz methods. If it were written well, it would tell you what to expect from the command execution, since interface org.drools.runtime.CommandExecutor has the generic T execute(Command command) So you dig around in the code and may detect that ksession.execute( cmd ) with cmd being made by newInsertElements(...) returns a Collection. Mighty helpful. Fixing the Experts would help a little, avoiding utter stupefaction. Cheers -W On 11/12/2013, Stephen Masters wrote: > Thanks for that, Wolfgang. I have been working on something else for a few > days, but just switched over to batch execution, and that is giving me some > appropriate results (my tests are passing). > > Which leads me to the question ... > > Given that Example 3.4.1 in the Drools 5.5.0.Final user guide does not > compile, is that because there is a bug in the implementation of command > execution? Or is it a bug in the example. i.e. > The results should just not be assigned to anything? > The results (an ArrayList containing the facts which were just inserted) > should be assigned to a List of Object? > The example should just be removed from the user guide, as it is no longer a > valid/recommended approach? > > Anybody with thoughts on that? Assuming that the answer is a documentation > fix, I?ll be happy to correct it appropriately and submit a pull request. > > Cheers, > > Steve > > > > > On 4 Dec 2013, at 12:24, Wolfgang Laun wrote: > >> I think you have to put your insert command into a list >> List> cmds = new ArrayList(); >> and pass this via batch execution >> CommandFactory.newBatchExecution( cmds ) >> >> -W >> >> On 04/12/2013, Stephen Masters wrote: >>> Hi folks, >>> >>> Can anyone explain how stateless session execution results should work? >>> Working through the docs and tracing the code, it?s getting a bit >>> confusing. >>> >>> Firstly, according to the user manual, one should be able to insert a >>> list >>> of facts as a Command, and get an instance of ExecutionResults back, >>> which >>> can then be queried. Here?s the example code: >>> StatelessKnowledgeSession ksession = >>> kbase.newStatelessKnowledgeSession(); >>> >>> Command cmd = CommandFactory.newInsertElements( Arrays.asList( Object[] >>> { >>> >>> new Cheese( "stilton" ), >>> >>> new Cheese( "brie" ), >>> >>> new Cheese( "cheddar" ), >>> >>> }); >>> >>> ExecutionResults bresults = ksession.execute( cmd ); >>> >>> That doesn?t compile, so I fixed it as follows: >>> >>> Command cmd = CommandFactory.newInsertElements( Arrays.asList( >>> new Cheese( "stilton" ), >>> new Cheese( "brie" ), >>> new Cheese( "cheddar" ) >>> )); >>> ExecutionResults bresults = ksession.execute( cmd ); >>> >>> This does now compile, but running it throws a ClassCastException: >>> java.lang.ClassCastException: java.util.ArrayList cannot be cast to >>> org.drools.runtime.ExecutionResults >>> >>> Taking a look through the Drools code, it would appear that Command has >>> a >>> generic type, which in the case of an InsertElementsCommand is: >>> GenericCommand> >>> >>> In turn, the execute command in StatelessKnowledgeSessionImpl casts its >>> result to that generic type: >>> public T execute(Command command) { >>> Object o = ((GenericCommand) command).execute( context ); >>> ... >>> return (T) o; >>> >>> So the ClassCastException is because the execute method returns an >>> ArrayList >>> of FactHandle instead of an ExecutionResults. >>> >>> I?m assuming that I must have got the wrong end of the stick somewhere, >>> so >>> what should I be doing to get an ExecutionResults from a stateless >>> session, >>> which I can then query? >>> >>> Cheers, >>> >>> Steve >> >> _______________________________________________ >> rules-users mailing list >> rules-users at lists.jboss.org >> https://lists.jboss.org/mailman/listinfo/rules-users > > From stephen.masters at me.com Wed Dec 11 11:51:34 2013 From: stephen.masters at me.com (Stephen Masters) Date: Wed, 11 Dec 2013 16:51:34 +0000 Subject: [rules-users] Stateless session commands and ExecutionResults (5.5.0.Final) In-Reply-To: References: <08BB9E59-C9D6-4663-A738-882D9154B619@me.com> Message-ID: <5C3B507D-F025-402C-A0B9-D40831521458@me.com> Hmm ? so the use of batch execution instead of InsertObjectCommand improved things. However I have noticed that although rules are activating as expected, and facts are being inserted, my queries don?t seem to get any results. For instance with the following code: Based on a stateless session: List cmds = new ArrayList(); cmds.add(CommandFactory.newInsert(new IbanValidationRequest(iban), "request")); cmds.add(CommandFactory.newQuery("annotations", "annotations")); ExecutionResults results = ksession.execute(CommandFactory.newBatchExecution(cmds)); QueryResults queryResults = ( QueryResults ) results.getValue( "annotations" ); System.out.println("Found [" + queryResults.size() + "]"); Based on a stateful session: statefulSession.insert(new IbanValidationRequest(iban)); statefulSession.fireAllRules(); QueryResults queryResults = statefulSession.getQueryResults("annotations"); System.out.println("Found [" + queryResults.size() + "]"); What I?m finding is that if I invoke a query against a stateful session, I get a result. However, with stateless sessions, I am examining the ExecutionResults, and finding that they do contain a reference to an ?annotations? QueryResults. However that collection of query results is empty. btw - I?m also noticing that the code example in the user guide for batch executions with queries doesn?t use the current syntax for adding a query command. I?m guessing this syntax changed without an associated update to the user guide. Steve On 11 Dec 2013, at 11:49, Wolfgang Laun wrote: > The mean thing is that the code > org.drools.command.CommandFactory > uses the generic interface > org.drools.command.Command > for all commands without specifying the generic parameter with the many > newXyz methods. If it were written well, it would tell you what to > expect from the command execution, since interface > org.drools.runtime.CommandExecutor > has the generic > T execute(Command command) > > So you dig around in the code and may detect that ksession.execute( > cmd ) with cmd being made by newInsertElements(...) returns a > Collection. Mighty helpful. > > Fixing the Experts would help a little, avoiding utter stupefaction. > > Cheers > -W > > > > On 11/12/2013, Stephen Masters wrote: >> Thanks for that, Wolfgang. I have been working on something else for a few >> days, but just switched over to batch execution, and that is giving me some >> appropriate results (my tests are passing). >> >> Which leads me to the question ... >> >> Given that Example 3.4.1 in the Drools 5.5.0.Final user guide does not >> compile, is that because there is a bug in the implementation of command >> execution? Or is it a bug in the example. i.e. >> The results should just not be assigned to anything? >> The results (an ArrayList containing the facts which were just inserted) >> should be assigned to a List of Object? >> The example should just be removed from the user guide, as it is no longer a >> valid/recommended approach? >> >> Anybody with thoughts on that? Assuming that the answer is a documentation >> fix, I?ll be happy to correct it appropriately and submit a pull request. >> >> Cheers, >> >> Steve >> >> >> >> >> On 4 Dec 2013, at 12:24, Wolfgang Laun wrote: >> >>> I think you have to put your insert command into a list >>> List> cmds = new ArrayList(); >>> and pass this via batch execution >>> CommandFactory.newBatchExecution( cmds ) >>> >>> -W >>> >>> On 04/12/2013, Stephen Masters wrote: >>>> Hi folks, >>>> >>>> Can anyone explain how stateless session execution results should work? >>>> Working through the docs and tracing the code, it?s getting a bit >>>> confusing. >>>> >>>> Firstly, according to the user manual, one should be able to insert a >>>> list >>>> of facts as a Command, and get an instance of ExecutionResults back, >>>> which >>>> can then be queried. Here?s the example code: >>>> StatelessKnowledgeSession ksession = >>>> kbase.newStatelessKnowledgeSession(); >>>> >>>> Command cmd = CommandFactory.newInsertElements( Arrays.asList( Object[] >>>> { >>>> >>>> new Cheese( "stilton" ), >>>> >>>> new Cheese( "brie" ), >>>> >>>> new Cheese( "cheddar" ), >>>> >>>> }); >>>> >>>> ExecutionResults bresults = ksession.execute( cmd ); >>>> >>>> That doesn?t compile, so I fixed it as follows: >>>> >>>> Command cmd = CommandFactory.newInsertElements( Arrays.asList( >>>> new Cheese( "stilton" ), >>>> new Cheese( "brie" ), >>>> new Cheese( "cheddar" ) >>>> )); >>>> ExecutionResults bresults = ksession.execute( cmd ); >>>> >>>> This does now compile, but running it throws a ClassCastException: >>>> java.lang.ClassCastException: java.util.ArrayList cannot be cast to >>>> org.drools.runtime.ExecutionResults >>>> >>>> Taking a look through the Drools code, it would appear that Command has >>>> a >>>> generic type, which in the case of an InsertElementsCommand is: >>>> GenericCommand> >>>> >>>> In turn, the execute command in StatelessKnowledgeSessionImpl casts its >>>> result to that generic type: >>>> public T execute(Command command) { >>>> Object o = ((GenericCommand) command).execute( context ); >>>> ... >>>> return (T) o; >>>> >>>> So the ClassCastException is because the execute method returns an >>>> ArrayList >>>> of FactHandle instead of an ExecutionResults. >>>> >>>> I?m assuming that I must have got the wrong end of the stick somewhere, >>>> so >>>> what should I be doing to get an ExecutionResults from a stateless >>>> session, >>>> which I can then query? >>>> >>>> Cheers, >>>> >>>> Steve >>> >>> _______________________________________________ >>> 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/20131211/b9cbf93e/attachment-0001.html From anjana.ackroyd at gmail.com Wed Dec 11 11:54:46 2013 From: anjana.ackroyd at gmail.com (anjana.ackroyd) Date: Wed, 11 Dec 2013 08:54:46 -0800 (PST) Subject: [rules-users] Kie Work Bench missing repositories menu option In-Reply-To: References: <3FB34B9E-B769-40FF-B4E3-CEF8BE869480@codehaus.org> Message-ID: <1386780886798-4027222.post@n3.nabble.com> Yay! I found the conflicting process using that port and now its all golden . I see all the menu options. Although it would be nice to have it working on tomcat as well because thats the JVM we use enterprise wide. But for now I am going to go ahead and play with the work bench in jboss! Thanks a lot ! -- View this message in context: http://drools.46999.n3.nabble.com/Re-rules-users-Kie-Work-Bench-missing-repositories-menu-option-tp4027198p4027222.html Sent from the Drools: User forum mailing list archive at Nabble.com. From mproctor at codehaus.org Wed Dec 11 12:33:09 2013 From: mproctor at codehaus.org (Mark Proctor) Date: Wed, 11 Dec 2013 17:33:09 +0000 Subject: [rules-users] Kie Work Bench missing repositories menu option In-Reply-To: <1386780886798-4027222.post@n3.nabble.com> References: <3FB34B9E-B769-40FF-B4E3-CEF8BE869480@codehaus.org> <1386780886798-4027222.post@n3.nabble.com> Message-ID: <92C96A26-CAD1-4694-86F8-2DDF3822E228@codehaus.org> On 11 Dec 2013, at 16:54, anjana.ackroyd wrote: > Yay! I found the conflicting process using that port and now its all golden . > I see all the menu options. great :) > Although it would be nice to have it working on tomcat as well because thats > the JVM we use enterprise wide. But for now I am going to go ahead and play > with the work bench in jboss! We?ll try and look into it. Any tomcat experts? Help would be appreciated. Mark > > > Thanks a lot ! > > > > -- > View this message in context: http://drools.46999.n3.nabble.com/Re-rules-users-Kie-Work-Bench-missing-repositories-menu-option-tp4027198p4027222.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 anjana.ackroyd at gmail.com Wed Dec 11 13:12:18 2013 From: anjana.ackroyd at gmail.com (anjana.ackroyd) Date: Wed, 11 Dec 2013 10:12:18 -0800 (PST) Subject: [rules-users] Kie Work Bench missing repositories menu option In-Reply-To: <92C96A26-CAD1-4694-86F8-2DDF3822E228@codehaus.org> References: <3FB34B9E-B769-40FF-B4E3-CEF8BE869480@codehaus.org> <1386780886798-4027222.post@n3.nabble.com> <92C96A26-CAD1-4694-86F8-2DDF3822E228@codehaus.org> Message-ID: <1386785538070-4027224.post@n3.nabble.com> Sorry one last question hopefully To clone a repository on my machine I run git clone gitolite at vlslcdapp01:com.enterprise.service/service-rules-dsl In the Kie-wb I am trying to clone a repository , if I put the URL as git://gitolite at vlslcdapp01:com.enterprise.service/service-rules-dsl it doesnt like it I cant just put git://com.enterprise.service/service-rules-dsl because my repo is hosted on a remote machine -- View this message in context: http://drools.46999.n3.nabble.com/Re-rules-users-Kie-Work-Bench-missing-repositories-menu-option-tp4027198p4027224.html Sent from the Drools: User forum mailing list archive at Nabble.com. From wtang at kana.com Wed Dec 11 13:20:40 2013 From: wtang at kana.com (wtang) Date: Wed, 11 Dec 2013 10:20:40 -0800 (PST) Subject: [rules-users] Drools 6 support for changeset In-Reply-To: References: <1386376897778-4027138.post@n3.nabble.com> Message-ID: <1386786040515-4027225.post@n3.nabble.com> Hi just tried a simple example in which I loop and then I change the rule but I did not see my changes taking place. Please advice. while(true) { Thread.sleep(100); Message message = new Message(); message.setMessage("Hello World"); message.setStatus(Message.HELLO); kSession.insert(message); kSession.fireAllRules(); } // I change hello world rule while this loop is running but did not see my changes getting pick up. -- View this message in context: http://drools.46999.n3.nabble.com/Drools-6-support-for-changeset-tp4027138p4027225.html Sent from the Drools: User forum mailing list archive at Nabble.com. From dunnlow at yahoo.com Wed Dec 11 15:41:10 2013 From: dunnlow at yahoo.com (dunnlow) Date: Wed, 11 Dec 2013 12:41:10 -0800 (PST) Subject: [rules-users] Insert to non-existing entry point causing NPE in drools server? In-Reply-To: References: <1386710305799-4027204.post@n3.nabble.com> Message-ID: <1386794470353-4027226.post@n3.nabble.com> Hmm, whelp, no, nothing empirical. I think in my head I am combining a few things I've read. In the Developers Cookbook (pg130) there is a comment that entry points can help reduce cross products and can be used to partition memory. I remember reading that the entry points are built during compile time, so I read that to mean that if I have 1000 rules, but only 1 rule with entry point "ep1" that if I insert a fact to ep1, the engine has already built the structure to only evaluate that 1 rule. I thought that was the main reasoning behind entry points :-/ You are saying that my thinking here is incorrect? So, in the manual (http://docs.jboss.org/drools/release/6.0.0.Final/drools-docs/html/DroolsComplexEventProcessingChapter.html#d0e9947) during the banking example for entry points, there is little difference between having an "ATM Stream" and "Branch Stream" as shown and adding a "stream" attribute to the WithdrawRequest object and adding the constraint, stream=="Branch"? Thanks again laune wrote > What makes you think that using entry points "speeds things up"? The > Engine still has to evaluate the entry-point attribute of a fact (handle), > just like any other attribute. > > Or do you have conclusive evidence based on solid benchmarks? > > -W -- View this message in context: http://drools.46999.n3.nabble.com/Insert-to-non-existing-entry-point-causing-NPE-in-drools-server-tp4027204p4027226.html Sent from the Drools: User forum mailing list archive at Nabble.com. From mproctor at codehaus.org Wed Dec 11 16:08:40 2013 From: mproctor at codehaus.org (Mark Proctor) Date: Wed, 11 Dec 2013 21:08:40 +0000 Subject: [rules-users] Drools 6 support for changeset In-Reply-To: <1386786040515-4027225.post@n3.nabble.com> References: <1386376897778-4027138.post@n3.nabble.com> <1386786040515-4027225.post@n3.nabble.com> Message-ID: <74902C81-F522-47ED-B3FB-DA201C1EE355@codehaus.org> we have unit tests that say otherwise: https://github.com/sotty/drools/blob/master/drools-compiler/src/test/java/org/drools/compiler/integrationtests/IncrementalCompilationTest.java You?ll need to provide more information, or better still copy one of those unit tests to try and create a failed assertion that shows any issues. Mark On 11 Dec 2013, at 18:20, wtang wrote: > Hi just tried a simple example in which I loop and then I change the rule but > I did not see my changes taking place. Please advice. > > while(true) { > Thread.sleep(100); > Message message = new Message(); > message.setMessage("Hello World"); > message.setStatus(Message.HELLO); > kSession.insert(message); > kSession.fireAllRules(); > } > > // I change hello world rule while this loop is running but did not see my > changes getting pick up. > > > > -- > View this message in context: http://drools.46999.n3.nabble.com/Drools-6-support-for-changeset-tp4027138p4027225.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 Wed Dec 11 16:55:46 2013 From: clickthex at yahoo.com (SrjTx) Date: Wed, 11 Dec 2013 13:55:46 -0800 (PST) Subject: [rules-users] Drools 6.0.0: Please clarify: rdrl vs rdslr and what you can do with each Message-ID: <1386798946212-4027228.post@n3.nabble.com> Drools 6.0.0 I have searched doc and google, but have not found what I am looking for - if you have link that would be great too. I am creating my first .dsl file and using them in a guided rule. I notice that when you select this, the file extension is rdslr versus rdrl. Also, you can access any .dsl (that is in the project? directory? - not clear where all it searches) I also notice that you can add "regular" rule parts just like a rdrl file, but they are prefixed with a > My question is, if you wanted, could you write only rdslr files and do everything you could in a rdrl even if you didn't use any dsl? Rephrased, is rdrl a subset of rdslr functionality? -- View this message in context: http://drools.46999.n3.nabble.com/Drools-6-0-0-Please-clarify-rdrl-vs-rdslr-and-what-you-can-do-with-each-tp4027228.html Sent from the Drools: User forum mailing list archive at Nabble.com. From vimalkansal at yahoo.com Wed Dec 11 17:01:27 2013 From: vimalkansal at yahoo.com (vimalkansal) Date: Wed, 11 Dec 2013 14:01:27 -0800 (PST) Subject: [rules-users] Drools6 : Having trouble in using kie-ci In-Reply-To: <1386745908017-4027215.post@n3.nabble.com> References: <1386739437135-4027208.post@n3.nabble.com> <1386745908017-4027215.post@n3.nabble.com> Message-ID: <1386799287488-4027229.post@n3.nabble.com> Hi Manstis, I am going to try out what you have suggested, but I have the following questions : In the first instance this answer looked alright, but then how is it a dynamic module? I was under the impression (as mentioned in the doco also) that by having kie-ci on the classpath, it can pull down the jars dynamically from maven repo with a statement like "kContainer = ks.newKieContainer(ks.newReleaseId("com.xyz", "HelloWorld", "1.0.0-SNAPSHOT"));" Can you please correct me if my understanding is wrong. And, if my understanding is correct, how does kie-ci know about my maven repo? -- View this message in context: http://drools.46999.n3.nabble.com/Drools6-Having-trouble-in-using-kie-ci-tp4027208p4027229.html Sent from the Drools: User forum mailing list archive at Nabble.com. From vimalkansal at yahoo.com Wed Dec 11 17:27:57 2013 From: vimalkansal at yahoo.com (vimalkansal) Date: Wed, 11 Dec 2013 14:27:57 -0800 (PST) Subject: [rules-users] Drools6 : Having trouble in using kie-ci In-Reply-To: <1386799287488-4027229.post@n3.nabble.com> References: <1386739437135-4027208.post@n3.nabble.com> <1386745908017-4027215.post@n3.nabble.com> <1386799287488-4027229.post@n3.nabble.com> Message-ID: <1386800877918-4027230.post@n3.nabble.com> Hi Manstis, Also, I am running another instane of KIE-WB which points to the default M2_REPO i.e /home/user/.m2 and I I have done "build and deploy" to push the built jar to this repo. Then I have written a Java SE application and I am able to successfully dynamically download the jar and run the rule without having the above changes you mentioned, please see my pom.xml attached pom.xml -- View this message in context: http://drools.46999.n3.nabble.com/Drools6-Having-trouble-in-using-kie-ci-tp4027208p4027230.html Sent from the Drools: User forum mailing list archive at Nabble.com. From wtang at kana.com Wed Dec 11 17:31:51 2013 From: wtang at kana.com (wtang) Date: Wed, 11 Dec 2013 14:31:51 -0800 (PST) Subject: [rules-users] Drools 6 support for changeset In-Reply-To: <74902C81-F522-47ED-B3FB-DA201C1EE355@codehaus.org> References: <1386376897778-4027138.post@n3.nabble.com> <1386786040515-4027225.post@n3.nabble.com> <74902C81-F522-47ED-B3FB-DA201C1EE355@codehaus.org> Message-ID: <1386801111365-4027231.post@n3.nabble.com> Oh, I don't doubt for a moment that it is working. I know it is working. What I am trying to figure out is what step am I missing. I installed drool 6.0 Eclipse plugin and simply added a loop in the out of the box hello word example. while the loop is running, I went into the eclipse editor, modify and saved the hello word example in Sample.drl to print out instead of "Hello World" "Hello World!!!!". The loop just keeps on printing out "Hello World" and not my changes which is "Hello World!!!!". Here is the hello world program, I just modified it to add the loop: 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 ! while(true) { Thread.sleep(100); Message message = new Message(); message.setMessage("Hello World"); message.setStatus(Message.HELLO); kSession.insert(message); kSession.fireAllRules(); } } catch (Throwable t) { t.printStackTrace(); } } -- View this message in context: http://drools.46999.n3.nabble.com/Drools-6-support-for-changeset-tp4027138p4027231.html Sent from the Drools: User forum mailing list archive at Nabble.com. From vimalkansal at yahoo.com Wed Dec 11 17:32:09 2013 From: vimalkansal at yahoo.com (vimalkansal) Date: Wed, 11 Dec 2013 14:32:09 -0800 (PST) Subject: [rules-users] Drools6 : Having trouble in using kie-ci In-Reply-To: <1386800877918-4027230.post@n3.nabble.com> References: <1386739437135-4027208.post@n3.nabble.com> <1386745908017-4027215.post@n3.nabble.com> <1386799287488-4027229.post@n3.nabble.com> <1386800877918-4027230.post@n3.nabble.com> Message-ID: <1386801129527-4027232.post@n3.nabble.com> And here is how my Java code looks like : public class HelloWorldRuleExecutor { public static void main(String[] args) { // TODO Auto-generated method stub String msg = "xxx"; KieServices ks = KieServices.Factory.get(); KieContainer kContainer = null; kContainer = ks.newKieContainer(ks.newReleaseId("au.com.xyz", "HelloWorld", "1.0.0-SNAPSHOT")); if (kContainer == null) System.out.println("Null"); KieSession kSession = kContainer.newKieSession(); //kSession.addEventListener( new DebugRuleRuntimeEventListener()); //kSession.setGlobal("message",msg); //defaultStatelessKieSession kSession.fireAllRules(); // System.out.println(msg); } } -- View this message in context: http://drools.46999.n3.nabble.com/Drools6-Having-trouble-in-using-kie-ci-tp4027208p4027232.html Sent from the Drools: User forum mailing list archive at Nabble.com. From michael.anstis at gmail.com Wed Dec 11 17:38:12 2013 From: michael.anstis at gmail.com (Michael Anstis) Date: Wed, 11 Dec 2013 22:38:12 +0000 Subject: [rules-users] Drools6 : Having trouble in using kie-ci In-Reply-To: <1386800877918-4027230.post@n3.nabble.com> References: <1386739437135-4027208.post@n3.nabble.com> <1386745908017-4027215.post@n3.nabble.com> <1386799287488-4027229.post@n3.nabble.com> <1386800877918-4027230.post@n3.nabble.com> Message-ID: I assume .m2, kie-wb and your application are all running on the same computer? Delete from your .m2 and try again (without having the repository in your pom). It should fail. When everything is in the same computer it is harder (for you) to replicate a remote maven repository. Deleting from .m2 can help achieve this. That said this thread is becoming a general catch all for multiple issues. Can you please clearly state what the problem now is? Sent on the move On 11 Dec 2013 22:28, "vimalkansal" wrote: > Hi Manstis, > > Also, I am running another instane of KIE-WB which points to the default > M2_REPO i.e /home/user/.m2 and I I have done "build and deploy" to push the > built jar to this repo. > > Then I have written a Java SE application and I am able to successfully > dynamically download the jar and run the rule without having the above > changes you mentioned, please see my pom.xml attached pom.xml > > > > > -- > View this message in context: > http://drools.46999.n3.nabble.com/Drools6-Having-trouble-in-using-kie-ci-tp4027208p4027230.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/20131211/452fb08e/attachment.html From vimalkansal at yahoo.com Wed Dec 11 19:04:29 2013 From: vimalkansal at yahoo.com (vimalkansal) Date: Wed, 11 Dec 2013 16:04:29 -0800 (PST) Subject: [rules-users] Drools6 : Having trouble in using kie-ci In-Reply-To: References: <1386739437135-4027208.post@n3.nabble.com> <1386745908017-4027215.post@n3.nabble.com> <1386799287488-4027229.post@n3.nabble.com> <1386800877918-4027230.post@n3.nabble.com> Message-ID: <1386806669975-4027234.post@n3.nabble.com> Yes, you are correct, my application, .m2 and kie-wb are running on the same machine., and I can see your point. But in the different instance(the scenario that I originally described) I have a web application, .m2 and kie-web running on the same machine and my code is not able to download the jar file from local .m2 repo. I may also add that these 2 scenarios are on different machines : Machine 1: Java SE App, .m2, Kie-wb with M2_HOME env variable setup -- this works Machine 2: Java Web app, maven repo, Kie-wb (I am not sure if M2_HOME is setup, as this is different developers machine) I had a brief look at org.kie.scanner.embedder.MavenSettings.java and I have the feeling that on machine 2 (M2_HOME) is not set up, so basically the embedded maven is not pointing to the same maven repo to which Kie-wb is. I will try that when the developer is back. So as you can see, I am still working with local maven repo scenario. Now coming back to what you have suggested(for remote repo), i.e include the remote repo and the dependency on artifact (containing rules) in my applications POM file. Now this is confusing : Isn't the pom file used only at build stage when it will download any dependencies from the repositories specified in pom.xml, settings.xml? So in a way when I declare the dependency on my rule artifact in my applications's pom.xml, I am downloading the artifact at compile time. In other words when my application starts running, by that time it already has that artifact(i.e rules). After reading the doc I had the impression that by having kie-ci on classpath of the web app, web app should be able to download the artifact at run time rather than compile time. Thx Vimal -- View this message in context: http://drools.46999.n3.nabble.com/Drools6-Having-trouble-in-using-kie-ci-tp4027208p4027234.html Sent from the Drools: User forum mailing list archive at Nabble.com. From mproctor at codehaus.org Wed Dec 11 19:18:29 2013 From: mproctor at codehaus.org (Mark Proctor) Date: Thu, 12 Dec 2013 00:18:29 +0000 Subject: [rules-users] Drools 6 support for changeset In-Reply-To: <1386801111365-4027231.post@n3.nabble.com> References: <1386376897778-4027138.post@n3.nabble.com> <1386786040515-4027225.post@n3.nabble.com> <74902C81-F522-47ED-B3FB-DA201C1EE355@codehaus.org> <1386801111365-4027231.post@n3.nabble.com> Message-ID: <798B7F28-27EC-4BA4-9157-3F415C987DCE@codehaus.org> it?s not quite that automatic. You can only do updates vis the dynamic modules system. you have to build jars and update to the latest jar. Go through the KIE examples docs, and the unit tests I showed you. Mark On 11 Dec 2013, at 22:31, wtang wrote: > Oh, I don't doubt for a moment that it is working. I know it is working. > What I am trying to figure out is what step am I missing. > > I installed drool 6.0 Eclipse plugin and simply added a loop in the out of > the box hello word example. > > while the loop is running, I went into the eclipse editor, modify and saved > the hello word example in Sample.drl to print out instead of "Hello World" > "Hello World!!!!". > > The loop just keeps on printing out "Hello World" and not my changes which > is "Hello World!!!!". > > Here is the hello world program, I just modified it to add the loop: > > 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 ! > while(true) { > Thread.sleep(100); > Message message = new Message(); > message.setMessage("Hello World"); > message.setStatus(Message.HELLO); > kSession.insert(message); > kSession.fireAllRules(); > } > } catch (Throwable t) { > t.printStackTrace(); > } > } > > > > -- > View this message in context: http://drools.46999.n3.nabble.com/Drools-6-support-for-changeset-tp4027138p4027231.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 Dec 12 01:58:40 2013 From: wolfgang.laun at gmail.com (Wolfgang Laun) Date: Thu, 12 Dec 2013 07:58:40 +0100 Subject: [rules-users] Insert to non-existing entry point causing NPE in drools server? In-Reply-To: <1386794470353-4027226.post@n3.nabble.com> References: <1386710305799-4027204.post@n3.nabble.com> <1386794470353-4027226.post@n3.nabble.com> Message-ID: On 11/12/2013, dunnlow wrote: > Hmm, whelp, no, nothing empirical. I think in my head I am combining a few > things I've read. > > In the Developers Cookbook (pg130) there is a comment that entry points can > help reduce cross products and can be used to partition memory. I remember > reading that the entry points are built during compile time, so I read that > to mean that if I have 1000 rules, but only 1 rule with entry point "ep1" > that if I insert a fact to ep1, the engine has already built the structure > to only evaluate that 1 rule. I thought that was the main reasoning behind > entry points :-/ You are saying that my thinking here is incorrect? Entry points (or streams) have been added for representing different event data sources. I would not think highly of such a feature if its foremost intent would be memory optimization, i.e., passing the implementor's buck to the user. Now entry points may have the effect you have concluded from these statements - your reasoning may very well be correct. But there's no doubt that entry points are a static, compile time issue, and you are reporting a problem due to dynamic variations in the data. Using an iffy optimisation and trying to come to grips with it illustrates Michael A Jackson's pair of rules for optimisation ;-) To summarize: I wouldn't go up this alley unless I had data that would show it's worth the effort. > > So, in the manual > (http://docs.jboss.org/drools/release/6.0.0.Final/drools-docs/html/DroolsComplexEventProcessingChapter.html#d0e9947) > during the banking example for entry points, there is little difference > between having an "ATM Stream" and "Branch Stream" as shown and adding a > "stream" attribute to the WithdrawRequest object and adding the constraint, > stream=="Branch"? Given the problems arising from changing the SW at the *source* of these streams to accomodate the additional property: there is a big difference. As for the efficiency of the rules, I'd hold my judgment until after the benchmark :-) Cheers Wolfgang > > Thanks again > > > > laune wrote >> What makes you think that using entry points "speeds things up"? The >> Engine still has to evaluate the entry-point attribute of a fact >> (handle), >> just like any other attribute. >> >> Or do you have conclusive evidence based on solid benchmarks? >> >> -W > > > > > > -- > View this message in context: > http://drools.46999.n3.nabble.com/Insert-to-non-existing-entry-point-causing-NPE-in-drools-server-tp4027204p4027226.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 Dec 12 02:19:51 2013 From: michael.anstis at gmail.com (Michael Anstis) Date: Thu, 12 Dec 2013 07:19:51 +0000 Subject: [rules-users] Drools6 : Having trouble in using kie-ci In-Reply-To: <1386806669975-4027234.post@n3.nabble.com> References: <1386739437135-4027208.post@n3.nabble.com> <1386745908017-4027215.post@n3.nabble.com> <1386799287488-4027229.post@n3.nabble.com> <1386800877918-4027230.post@n3.nabble.com> <1386806669975-4027234.post@n3.nabble.com> Message-ID: You don't need to run on 2 machines; I was trying to explain why the dependency could be resolved in kie-wb without the additional element in your consuming projects pom. You are correct that the pom is used at build time. There were lots of emails recently about your enquiry that showed the solution. I'll ask a colleague to forward to this list. Sent on the move On 12 Dec 2013 00:05, "vimalkansal" wrote: > Yes, you are correct, my application, .m2 and kie-wb are running on the > same > machine., and I can see your point. But in the different instance(the > scenario that I originally described) I have a web application, .m2 and > kie-web running on the same machine and my code is not able to download the > jar file from local .m2 repo. I may also add that these 2 scenarios are on > different machines : > > Machine 1: Java SE App, .m2, Kie-wb with M2_HOME env variable setup -- > this > works > > Machine 2: Java Web app, maven repo, Kie-wb (I am not sure if M2_HOME is > setup, as this is different developers machine) > > I had a brief look at org.kie.scanner.embedder.MavenSettings.java and I > have > the feeling that on machine 2 (M2_HOME) is not set up, so basically the > embedded maven is not pointing to the same maven repo to which Kie-wb is. I > will try that when the developer is back. > > So as you can see, I am still working with local maven repo scenario. Now > coming back to what you have suggested(for remote repo), i.e include the > remote repo and the dependency on artifact (containing rules) in my > applications POM file. Now this is confusing : Isn't the pom file used only > at build stage when it will download any dependencies from the repositories > specified in pom.xml, settings.xml? So in a way when I declare the > dependency on my rule artifact in my applications's pom.xml, I am > downloading the artifact at compile time. In other words when my > application > starts running, by that time it already has that artifact(i.e rules). After > reading the doc I had the impression that by having kie-ci on classpath of > the web app, web app should be able to download the artifact at run time > rather than compile time. > > Thx > > Vimal > > > > > > > -- > View this message in context: > http://drools.46999.n3.nabble.com/Drools6-Having-trouble-in-using-kie-ci-tp4027208p4027234.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/20131212/86a5fe75/attachment.html From vimalkansal at yahoo.com Thu Dec 12 02:26:23 2013 From: vimalkansal at yahoo.com (vimalkansal) Date: Wed, 11 Dec 2013 23:26:23 -0800 (PST) Subject: [rules-users] Drools6 : Having trouble in using kie-ci In-Reply-To: References: <1386739437135-4027208.post@n3.nabble.com> <1386745908017-4027215.post@n3.nabble.com> <1386799287488-4027229.post@n3.nabble.com> <1386800877918-4027230.post@n3.nabble.com> <1386806669975-4027234.post@n3.nabble.com> Message-ID: <1386833183817-4027238.post@n3.nabble.com> Thanks manstis. I will be eagerly looking forward to the solution. Vimal -- View this message in context: http://drools.46999.n3.nabble.com/Drools6-Having-trouble-in-using-kie-ci-tp4027208p4027238.html Sent from the Drools: User forum mailing list archive at Nabble.com. From michael.anstis at gmail.com Thu Dec 12 02:31:29 2013 From: michael.anstis at gmail.com (Michael Anstis) Date: Thu, 12 Dec 2013 07:31:29 +0000 Subject: [rules-users] Fwd: Re: [rules-dev] 6.0 issue with remote jars and dynamic modules In-Reply-To: <07E07887-A6B9-45ED-994D-15E2CB5C34B0@codehaus.org> References: <07E07887-A6B9-45ED-994D-15E2CB5C34B0@codehaus.org> Message-ID: Sent on the move ---------- Forwarded message ---------- From: "Mark Proctor" Date: 6 Dec 2013 19:30 Subject: Re: [rules-dev] 6.0 issue with remote jars and dynamic modules To: "Rules Dev List" , "Rules Users List" < rules-users at lists.jboss.org> Cc: the jira https://issues.jboss.org/browse/DROOLS-367 Mark On 6 Dec 2013, at 14:39, Mark Proctor wrote: > There is problem, fixed in master, for remote jars. The KieRepository currently, when using kie-ci, doesn?t obey the settings.xml active profiles. This means it is not recognising the remote configured repositories. > > While this is fixed, and we?ll have binaries out in about 2 weeks, it means for now KieRepository can only resolve jars already in the local m2_repo. > > Mark _______________________________________________ rules-dev mailing list rules-dev at lists.jboss.org https://lists.jboss.org/mailman/listinfo/rules-dev -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.jboss.org/pipermail/rules-users/attachments/20131212/7db4c935/attachment-0001.html From michael.anstis at gmail.com Thu Dec 12 02:32:17 2013 From: michael.anstis at gmail.com (Michael Anstis) Date: Thu, 12 Dec 2013 07:32:17 +0000 Subject: [rules-users] Drools6 : Having trouble in using kie-ci In-Reply-To: <1386833183817-4027238.post@n3.nabble.com> References: <1386739437135-4027208.post@n3.nabble.com> <1386745908017-4027215.post@n3.nabble.com> <1386799287488-4027229.post@n3.nabble.com> <1386800877918-4027230.post@n3.nabble.com> <1386806669975-4027234.post@n3.nabble.com> <1386833183817-4027238.post@n3.nabble.com> Message-ID: Sent.. email titled something like "remote jars and dynamic modules". Sent on the move On 12 Dec 2013 07:26, "vimalkansal" wrote: > Thanks manstis. I will be eagerly looking forward to the solution. > > Vimal > > > > -- > View this message in context: > http://drools.46999.n3.nabble.com/Drools6-Having-trouble-in-using-kie-ci-tp4027208p4027238.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/20131212/cd281700/attachment.html From michael.anstis at gmail.com Thu Dec 12 02:37:36 2013 From: michael.anstis at gmail.com (Michael Anstis) Date: Thu, 12 Dec 2013 07:37:36 +0000 Subject: [rules-users] Drools6 : Having trouble in using kie-ci In-Reply-To: References: <1386739437135-4027208.post@n3.nabble.com> <1386745908017-4027215.post@n3.nabble.com> <1386799287488-4027229.post@n3.nabble.com> <1386800877918-4027230.post@n3.nabble.com> <1386806669975-4027234.post@n3.nabble.com> <1386833183817-4027238.post@n3.nabble.com> Message-ID: Please note this relates to remote maven repositories; I.e. where kie-wb (and it's maven repo) are on one machine; and your consuming application on another machine. If everything is on a single machine use of settings.xml is not needed as artifacts should be resolved against .m2. There is a thread asking about dynamic rules with .m2 running on this mailing list in parallel to this one! I recommend reading those too. Sent on the move On 12 Dec 2013 07:32, "Michael Anstis" wrote: > Sent.. email titled something like "remote jars and dynamic modules". > > Sent on the move > On 12 Dec 2013 07:26, "vimalkansal" wrote: > >> Thanks manstis. I will be eagerly looking forward to the solution. >> >> Vimal >> >> >> >> -- >> View this message in context: >> http://drools.46999.n3.nabble.com/Drools6-Having-trouble-in-using-kie-ci-tp4027208p4027238.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/20131212/6957d7d9/attachment.html From michael.anstis at gmail.com Thu Dec 12 03:21:51 2013 From: michael.anstis at gmail.com (Michael Anstis) Date: Thu, 12 Dec 2013 08:21:51 +0000 Subject: [rules-users] Kie Work Bench missing repositories menu option In-Reply-To: <1386785538070-4027224.post@n3.nabble.com> References: <3FB34B9E-B769-40FF-B4E3-CEF8BE869480@codehaus.org> <1386780886798-4027222.post@n3.nabble.com> <92C96A26-CAD1-4694-86F8-2DDF3822E228@codehaus.org> <1386785538070-4027224.post@n3.nabble.com> Message-ID: "Doesn't like it" is a bit vague. You should be able to use any URL from within kie-wb as you could from the CLI. An indication of the error and your some details about your network would help. Are any proxies involved? Have you tried google'ing for git and the error I assume receive for "not being liked". Sent on the move On 11 Dec 2013 18:12, "anjana.ackroyd" wrote: > Sorry one last question hopefully > > To clone a repository on my machine I run > > git clone gitolite at vlslcdapp01:com.enterprise.service/service-rules-dsl > > > In the Kie-wb I am trying to clone a repository , if I put the URL as > > git://gitolite at vlslcdapp01:com.enterprise.service/service-rules-dsl it > doesnt like it > > I cant just put git://com.enterprise.service/service-rules-dsl because my > repo is hosted on a remote machine > > > > > -- > View this message in context: > http://drools.46999.n3.nabble.com/Re-rules-users-Kie-Work-Bench-missing-repositories-menu-option-tp4027198p4027224.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/20131212/f6f7791f/attachment.html From zahid.ahmed at emirates.com Thu Dec 12 03:36:31 2013 From: zahid.ahmed at emirates.com (Zahid Ahmed) Date: Thu, 12 Dec 2013 08:36:31 +0000 Subject: [rules-users] Drools 5.5.0.Final : Rule Trigger Issue Message-ID: Hi, I am new to Rules and having following issues in different rules. Rule 1 : Issue I have a process definition in which I create and insert into Session a REQUEST.java object before the rule-flow node. Insert is done using script node. In rule condition section I am filtering the same request object but my rule is not firing. My rule FIRES if I REMOVE this == $process.getVariable("piRequest"). rule "Go to President" ruleflow-group "DesigSkip" dialect "java" when $process: WorkflowProcessInstance() $r: Request(this == $process.getVariable("piRequest"), VD == "N", UB == "N", CC not in ( "A", "B") , DP not in ( "X", "Y", "Z") ); then $process.setVariable("piToPres","y"); end Rule 2 : I am getting error for eval statement. globa Request $r; rule "Go to President" ruleflow-group "DesigSkip" dialect "java" when $process: WorkflowProcessInstance($request:getVariable("piRequest")) $r : $request $r(eval(ADV == "N")) then System.out.println("--------------------*******************--------IN GUIDED RULE--------**********************---------------"); $process.setVariable("piToPres","y"); end globa Request $r; rule "Go to President" ruleflow-group "DesigSkip" dialect "java" when $process: WorkflowProcessInstance($request:getVariable("piRequest")) $r : $request eval($r.getADV() == "N") then System.out.println("--------------------*******************--------IN GUIDED RULE--------**********************---------------"); $process.setVariable("piToPres","y"); end Zahid Ahmed Senior Software Engineer | Emirates Group IT P.O. Box 686 | Dubai, United Arab Emirates T +971 4 203 3912 | M +971 55 1249171 [http://cdn.ek.aero/email/e_signatures/ekg2013.jpg] -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.jboss.org/pipermail/rules-users/attachments/20131212/d66a7bd5/attachment-0001.html -------------- next part -------------- A non-text attachment was scrubbed... Name: image001.jpg Type: image/jpeg Size: 8518 bytes Desc: image001.jpg Url : http://lists.jboss.org/pipermail/rules-users/attachments/20131212/d66a7bd5/attachment-0001.jpg From wolfgang.laun at gmail.com Thu Dec 12 03:59:56 2013 From: wolfgang.laun at gmail.com (Wolfgang Laun) Date: Thu, 12 Dec 2013 09:59:56 +0100 Subject: [rules-users] Drools 5.5.0.Final : Rule Trigger Issue In-Reply-To: References: Message-ID: Rule 1: This could result from not updating the WorkflowProcessInstance after creating the Variable "piRequest". Hard to tell without seeing all of the code... Rule 2: Simply incorrect syntax. Either use $r: Request( ADV == "N" ) or $r: Request() eval( $r.getADV().equals( "N" ) ) Make sure to use Java code inside eval. -W On 12/12/2013, Zahid Ahmed wrote: > Hi, > > > > I am new to Rules and having following issues in different rules. > > > > > > Rule 1 : > > Issue > > I have a process definition in which I create and insert into > Session a REQUEST.java object before the rule-flow node. Insert is done > using script node. In rule condition section I am filtering the same > request object but my rule is not firing. My rule FIRES if I REMOVE this == > $process.getVariable("piRequest"). > > > > > > rule "Go to President" > > ruleflow-group "DesigSkip" > > dialect "java" > > when > > $process: WorkflowProcessInstance() > > $r: Request(this == $process.getVariable("piRequest"), > VD == "N", UB == "N", CC not in ( "A", "B") , DP not in ( "X", "Y", "Z") > ); > > then > > $process.setVariable("piToPres","y"); > > end > > > > Rule 2 : > > I am getting error for eval statement. > > > > globa Request $r; > > > > rule "Go to President" > > ruleflow-group "DesigSkip" > > dialect "java" > > when > > $process: WorkflowProcessInstance($request:getVariable("piRequest")) > > $r : $request > > $r(eval(ADV == "N")) > > > > then > > > System.out.println("--------------------*******************--------IN GUIDED > RULE--------**********************---------------"); > > > > $process.setVariable("piToPres","y"); > > > > end > > > > globa Request $r; > > > > rule "Go to President" > > ruleflow-group "DesigSkip" > > dialect "java" > > when > > $process: WorkflowProcessInstance($request:getVariable("piRequest")) > > $r : $request > > > > eval($r.getADV() == "N") > > > > then > > > System.out.println("--------------------*******************--------IN GUIDED > RULE--------**********************---------------"); > > > > $process.setVariable("piToPres","y"); > > > > end > > > Zahid Ahmed > Senior Software Engineer | Emirates Group IT > P.O. Box 686 | Dubai, United Arab Emirates > T +971 4 203 3912 | M +971 55 1249171 > > [http://cdn.ek.aero/email/e_signatures/ekg2013.jpg] > > > > > From vimalkansal at yahoo.com Thu Dec 12 04:08:14 2013 From: vimalkansal at yahoo.com (vimalkansal) Date: Thu, 12 Dec 2013 01:08:14 -0800 (PST) Subject: [rules-users] Drools6 : Having trouble in using kie-ci In-Reply-To: References: <1386745908017-4027215.post@n3.nabble.com> <1386799287488-4027229.post@n3.nabble.com> <1386800877918-4027230.post@n3.nabble.com> <1386806669975-4027234.post@n3.nabble.com> <1386833183817-4027238.post@n3.nabble.com> Message-ID: <1386839294837-4027245.post@n3.nabble.com> Thanks manstis. Also can you please clarify that how does consuming application come to know of settings.xml file? By looking at org.kie.scanner.embedder.MAvenSettings.java, I believe either M2_HOME environment variable needs to be setup or "kie.maven.settings.custom" ? Is that a correct understanding? Thx Vimal -- View this message in context: http://drools.46999.n3.nabble.com/Drools6-Having-trouble-in-using-kie-ci-tp4027208p4027245.html Sent from the Drools: User forum mailing list archive at Nabble.com. From mario.fusco at gmail.com Thu Dec 12 04:26:04 2013 From: mario.fusco at gmail.com (Mario Fusco) Date: Thu, 12 Dec 2013 01:26:04 -0800 (PST) Subject: [rules-users] Drools6 : Having trouble in using kie-ci In-Reply-To: <1386839294837-4027245.post@n3.nabble.com> References: <1386745908017-4027215.post@n3.nabble.com> <1386799287488-4027229.post@n3.nabble.com> <1386800877918-4027230.post@n3.nabble.com> <1386806669975-4027234.post@n3.nabble.com> <1386833183817-4027238.post@n3.nabble.com> <1386839294837-4027245.post@n3.nabble.com> Message-ID: <1386840364139-4027246.post@n3.nabble.com> Hi Vimal, By default maven reads 2 settings.xml files: the one located in your M2_HOME and the one in your local repository that usually is under ${user_home}/.m2, so yes, to make this works you should set the M2_HOME environment variable. However you can override this default using the kie.maven.settings.custom system property. In other words you can point at any xml file in your file system by starting the JVM with a flag like -Dkie.maven.settings.custom=/home/myuser/myfolder/mysettings.xml I hope this helps, Mario -- View this message in context: http://drools.46999.n3.nabble.com/Drools6-Having-trouble-in-using-kie-ci-tp4027208p4027246.html Sent from the Drools: User forum mailing list archive at Nabble.com. From vimalkansal at yahoo.com Thu Dec 12 04:46:55 2013 From: vimalkansal at yahoo.com (vimalkansal) Date: Thu, 12 Dec 2013 01:46:55 -0800 (PST) Subject: [rules-users] Drools6 : Having trouble in using kie-ci In-Reply-To: <1386840364139-4027246.post@n3.nabble.com> References: <1386799287488-4027229.post@n3.nabble.com> <1386800877918-4027230.post@n3.nabble.com> <1386806669975-4027234.post@n3.nabble.com> <1386833183817-4027238.post@n3.nabble.com> <1386839294837-4027245.post@n3.nabble.com> <1386840364139-4027246.post@n3.nabble.com> Message-ID: <1386841615588-4027247.post@n3.nabble.com> Thanks a lot Marion, that is exactly what I was looking for. Vimal -- View this message in context: http://drools.46999.n3.nabble.com/Drools6-Having-trouble-in-using-kie-ci-tp4027208p4027247.html Sent from the Drools: User forum mailing list archive at Nabble.com. From mproctor at codehaus.org Thu Dec 12 08:15:55 2013 From: mproctor at codehaus.org (Mark Proctor) Date: Thu, 12 Dec 2013 13:15:55 +0000 Subject: [rules-users] Drools6 : Having trouble in using kie-ci In-Reply-To: <1386841615588-4027247.post@n3.nabble.com> References: <1386799287488-4027229.post@n3.nabble.com> <1386800877918-4027230.post@n3.nabble.com> <1386806669975-4027234.post@n3.nabble.com> <1386833183817-4027238.post@n3.nabble.com> <1386839294837-4027245.post@n3.nabble.com> <1386840364139-4027246.post@n3.nabble.com> <1386841615588-4027247.post@n3.nabble.com> Message-ID: just a reminder ?? There is problem, fixed in master, for remote jars. The KieRepository currently, when using kie-ci, doesn?t obey the settings.xml active profiles. This means it is not recognising the remote configured repositories. While this is fixed, and we?ll have binaries out in about 2 weeks, it means for now KieRepository can only resolve jars already in the local m2_repo. the jira https://issues.jboss.org/browse/DROOLS-367 Mark On 12 Dec 2013, at 09:46, vimalkansal wrote: > Thanks a lot Marion, that is exactly what I was looking for. > > Vimal > > > > -- > View this message in context: http://drools.46999.n3.nabble.com/Drools6-Having-trouble-in-using-kie-ci-tp4027208p4027247.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/20131212/2287df80/attachment.html From anders.henriksson at knowit.se Thu Dec 12 09:34:26 2013 From: anders.henriksson at knowit.se (Anders Henriksson) Date: Thu, 12 Dec 2013 14:34:26 +0000 Subject: [rules-users] Null pointer when inserting data (5.5.0.Final) Message-ID: Hi! We're running drools in a multi-server setup, with a pretty basic scenario: 1. When the first session is needed, we load the rulebase once. The rulebase is never changed after this (no rule removal or addition). 2. Each call spawns a new StatefulKnowledgeSession which is used for firing the rules once and then disposed. These calls are heavily multi-threaded, but each session is only used in a single method call from a single thread. 3. We use the resource scanner to check for updated packages. When an updated knowledge package is available, the knowledgebase is discarded and a new one constructed from the updated package. The knowledge package affected is somewhat large - about 25 MB in size. (There are other, smaller knowledge packages which do not appear to have this issue.) This setup has been working fine, but somewhat slow. After upgrading to 5.5.0.Final and adding some speedups in the surrounding code we get a spurious null pointer. The trail of events is: 1. After start all servers work fine. 2. Sometime after a couple of hours to a couple of days, the null pointer error occurs on one or more servers (but generally not all of them). 3. Once the null pointer occurs, it happens on all further calls using that knowledgebase. No other knowledgebases are effected. (You can load the same package in a new knowledgebase, and sessions using the new, identical, knowledgebase work just fine.) 4. Restarting the java process makes the server work fine again. Calls always fail with the same stack trace: org.drools.RuntimeDroolsException: Unexpected exception executing action org.drools.reteoo.ReteooWorkingMemory$WorkingMemoryReteAssertAction at 5db53f 24 at org.drools.common.AbstractWorkingMemory.executeQueuedActions(AbstractWorkingMemory.java:995) 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) Caused by: java.lang.NullPointerException at org.drools.rule.EvalCondition.createContext(EvalCondition.java:107) at org.drools.reteoo.EvalConditionNode.createMemory(EvalConditionNode.java:261) at org.drools.common.ConcurrentNodeMemories.createNodeMemory(ConcurrentNodeMemories.java:90) at org.drools.common.ConcurrentNodeMemories.getNodeMemory(ConcurrentNodeMemories.java:69) at org.drools.common.AbstractWorkingMemory.getNodeMemory(AbstractWorkingMemory.java:1034) at org.drools.reteoo.EvalConditionNode.assertLeftTuple(EvalConditionNode.java:174) at org.drools.reteoo.SingleLeftTupleSinkAdapter.doPropagateAssertLeftTuple(SingleLeftTupleSinkAdapter.java:196) at org.drools.reteoo.SingleLeftTupleSinkAdapter.createAndPropagateAssertLeftTuple(SingleLeftTupleSinkAdapter.java:145) at org.drools.reteoo.LeftInputAdapterNode.assertObject(LeftInputAdapterNode.java:154) at org.drools.reteoo.SingleObjectSinkAdapter.propagateAssertObject(SingleObjectSinkAdapter.java:59) at org.drools.reteoo.ObjectTypeNode.assertObject(ObjectTypeNode.java:235) at org.drools.reteoo.EntryPointNode.assertObject(EntryPointNode.java:240) at org.drools.reteoo.Rete.assertObject(Rete.java:109) 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) ... 93 more Unfortunately we don't have the remaining rows in the wrapped exception. >From this trace, it looks like the problem is in EvalCondition: public Object createContext() { return this.expression.createContext(); } which should only be able to produce a null pointer if expression is missing. Looking at the constructors for this class, having a null expression seems like a valid use case - but if this is a valid use case, why doesn't createContext() handle this case? Considering that running drools with the same package and the same inputs can either fail with the above error (if knowledgebase has been used enough) or work just as intended (using a newly minted knowledgebase), it feels like something is corrupting the knowledgebase. Does this make sense? (I noticed in the issue tracker ( https://issues.jboss.org/browse/DROOLS-156 ) that memory for eval nodes are 'created "too lazily"' - might this be a related issue?) Best regards, Anders -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.jboss.org/pipermail/rules-users/attachments/20131212/790800c5/attachment-0001.html From loic.albertin at bull.net Thu Dec 12 10:00:06 2013 From: loic.albertin at bull.net (=?ISO-8859-1?Q?Lo=EFc_Albertin?=) Date: Thu, 12 Dec 2013 16:00:06 +0100 Subject: [rules-users] InstantiationError during condition evaluation in Drools 6.0.0.Final In-Reply-To: <1386680864577-4027190.post@n3.nabble.com> References: <52A5C6BB.5020100@bull.net> <1386601302720-4027163.post@n3.nabble.com> <52A5DC8C.3040508@bull.net> <52A5F093.5040301@bull.net> <1386680864577-4027190.post@n3.nabble.com> Message-ID: <52A9CF76.9000203@bull.net> Hi Mario, Thank you a lot for your reactivity. Regards, Lo?c Le 10/12/2013 14:07, Mario Fusco a ?crit : > Thanks a lot for your reproduced. I just fixed that problem. > > Cheers, > Mario > > > > -- > View this message in context: http://drools.46999.n3.nabble.com/rules-users-InstantiationError-during-condition-evaluation-in-Drools-6-0-0-Final-tp4027161p4027190.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 anjana.ackroyd at gmail.com Thu Dec 12 10:35:48 2013 From: anjana.ackroyd at gmail.com (anjana.ackroyd) Date: Thu, 12 Dec 2013 07:35:48 -0800 (PST) Subject: [rules-users] Kie Work Bench missing repositories menu option In-Reply-To: References: <3FB34B9E-B769-40FF-B4E3-CEF8BE869480@codehaus.org> <1386780886798-4027222.post@n3.nabble.com> <92C96A26-CAD1-4694-86F8-2DDF3822E228@codehaus.org> <1386785538070-4027224.post@n3.nabble.com> Message-ID: <1386862548904-4027253.post@n3.nabble.com> Sorry for not giving the exact error . Here is what I see on the console as a pop-up . Although no logs get written to server.log Can't clone repository. java.lang.RuntimeException:Exception caught during execution of fetch command Here is how I know my GIT URL $* git config --get remote.origin.url* gitolite at vlslcdapp01:com.enterprise.service/service-rules-dsl In the console -> Clone Repository -> When I put in * Git URL git://gitolite at vlslcdapp01:com.enterprise.service/service-rules-dsl I get Can't clone repository. java.lang.RuntimeException:Exception caught during execution of fetch command I tried it with http:// and also ssh:// get the same error . Here are the formats for GIT URL The following syntaxes may be used with them: ssh://[user@]host.xz[:port]/path/to/repo.git/ git://host.xz[:port]/path/to/repo.git/ http[s]://host.xz[:port]/path/to/repo.git/ ftp[s]://host.xz[:port]/path/to/repo.git/ rsync://host.xz/path/to/repo.git/ But When I remove gitolite at vlslcdapp01 and add my URL like * Git URL git://com.enterprise.service/service-rules-dsl or ssh://com.enterprise.service/service-rules-dsl it starts cloning, but is in loading mode for ever I assuming thats because its not the right URL The servers are on the same network so no proxy involved. I said it doesnt like it because the error returns right when I hit Clone button no logs are being written which is not helpful -- View this message in context: http://drools.46999.n3.nabble.com/Re-rules-users-Kie-Work-Bench-missing-repositories-menu-option-tp4027198p4027253.html Sent from the Drools: User forum mailing list archive at Nabble.com. From porcelli at redhat.com Thu Dec 12 11:16:49 2013 From: porcelli at redhat.com (Alexandre Porcelli) Date: Thu, 12 Dec 2013 14:16:49 -0200 Subject: [rules-users] Kie Work Bench missing repositories menu option In-Reply-To: <1386862548904-4027253.post@n3.nabble.com> References: <3FB34B9E-B769-40FF-B4E3-CEF8BE869480@codehaus.org> <1386780886798-4027222.post@n3.nabble.com> <92C96A26-CAD1-4694-86F8-2DDF3822E228@codehaus.org> <1386785538070-4027224.post@n3.nabble.com> <1386862548904-4027253.post@n3.nabble.com> Message-ID: Your git URL seems to have username on it, try to remove it from your URL and use the proper field on form. Other thing that I notice is that your `port` points to "com.enterprise.service" is it correct? Here is a quick reference of GIT URL: http://www.pushok.com/help/gitscc/basic/git.html Regards, --- Alexandre Porcelli Principal Software Engineer Red Hat Business Systems and Intelligence Group On Dec 12, 2013, at 1:35 PM, anjana.ackroyd wrote: > Sorry for not giving the exact error . > > Here is what I see on the console as a pop-up . Although no logs get written > to server.log > Can't clone repository. java.lang.RuntimeException:Exception caught during > execution of fetch command > > > > Here is how I know my GIT URL > $* git config --get remote.origin.url* > gitolite at vlslcdapp01:com.enterprise.service/service-rules-dsl > > In the console -> Clone Repository -> When I put in > * Git URL > git://gitolite at vlslcdapp01:com.enterprise.service/service-rules-dsl > > I get > Can't clone repository. java.lang.RuntimeException:Exception caught during > execution of fetch command > > > I tried it with http:// and also ssh:// get the same error . > > Here are the formats for GIT URL > The following syntaxes may be used with them: > > ssh://[user@]host.xz[:port]/path/to/repo.git/ > > git://host.xz[:port]/path/to/repo.git/ > > http[s]://host.xz[:port]/path/to/repo.git/ > > ftp[s]://host.xz[:port]/path/to/repo.git/ > > rsync://host.xz/path/to/repo.git/ > > But When I remove gitolite at vlslcdapp01 and add my URL like > * Git URL > git://com.enterprise.service/service-rules-dsl > > or ssh://com.enterprise.service/service-rules-dsl > it starts cloning, but is in loading mode for ever I assuming thats because > its not the right URL > > The servers are on the same network so no proxy involved. I said it doesnt > like it because the error returns right when I hit Clone button no logs are > being written which is not helpful > > > > > > -- > View this message in context: http://drools.46999.n3.nabble.com/Re-rules-users-Kie-Work-Bench-missing-repositories-menu-option-tp4027198p4027253.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 mats.noren at gmail.com Thu Dec 12 12:11:20 2013 From: mats.noren at gmail.com (=?ISO-8859-1?Q?Mats_Nor=E9n?=) Date: Thu, 12 Dec 2013 18:11:20 +0100 Subject: [rules-users] [Optaplanner] Filter values Message-ID: Hi, I've got a domain with the following entities: - Person (planning entity) - Desk (planning variable) - DeskAssignment (solution) 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. I looked at 14.3.1 Immovable planning entities but couldn't really see how I would apply it to my use case. 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. Regards, Mats -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.jboss.org/pipermail/rules-users/attachments/20131212/65cb6031/attachment.html From jordan.brown at rackspace.com Thu Dec 12 12:50:28 2013 From: jordan.brown at rackspace.com (jordan.brown) Date: Thu, 12 Dec 2013 09:50:28 -0800 (PST) Subject: [rules-users] Sending Java Objects Through Camel, received by Drools 6 Message-ID: <1386870628271-4027256.post@n3.nabble.com> Hi, We're currently testing sending XML/JSON (including a message and drools commands) through Camel and Drools receiving it (using the documentation given--Part IV Drools Integration in the Doc), but we're curious if it's possible to just send a Java Object (e.g., Person Object) through Camel and have Drools pick it up--whereby the object will be received by drools and then the actual insert and firing of rules will occur on the other side (i.e., we wouldn't send the drools commands to Camel). Out-of-the-box, is this possible? Anybody doing this? As of now, we're continuing the approach in the Drools documentation (Part IV Drools Integration). -Jordan -- View this message in context: http://drools.46999.n3.nabble.com/Sending-Java-Objects-Through-Camel-received-by-Drools-6-tp4027256.html Sent from the Drools: User forum mailing list archive at Nabble.com. From anjana.ackroyd at gmail.com Thu Dec 12 13:41:42 2013 From: anjana.ackroyd at gmail.com (anjana.ackroyd) Date: Thu, 12 Dec 2013 10:41:42 -0800 (PST) Subject: [rules-users] Kie Work Bench missing repositories menu option In-Reply-To: References: <3FB34B9E-B769-40FF-B4E3-CEF8BE869480@codehaus.org> <1386780886798-4027222.post@n3.nabble.com> <92C96A26-CAD1-4694-86F8-2DDF3822E228@codehaus.org> <1386785538070-4027224.post@n3.nabble.com> <1386862548904-4027253.post@n3.nabble.com> Message-ID: <1386873702149-4027257.post@n3.nabble.com> Thanks adding port 22 helped! GIT URL I used ssh://gitolite at vlslcdapp01:22/com.enterprise.service/service-rules-dsl -- View this message in context: http://drools.46999.n3.nabble.com/Re-rules-users-Kie-Work-Bench-missing-repositories-menu-option-tp4027198p4027257.html Sent from the Drools: User forum mailing list archive at Nabble.com. From vimalkansal at yahoo.com Thu Dec 12 14:08:49 2013 From: vimalkansal at yahoo.com (vimalkansal) Date: Thu, 12 Dec 2013 11:08:49 -0800 (PST) Subject: [rules-users] Drools6 : Having trouble in using kie-ci In-Reply-To: References: <1386806669975-4027234.post@n3.nabble.com> <1386833183817-4027238.post@n3.nabble.com> <1386839294837-4027245.post@n3.nabble.com> <1386840364139-4027246.post@n3.nabble.com> <1386841615588-4027247.post@n3.nabble.com> Message-ID: <1386875329104-4027258.post@n3.nabble.com> Thanks a lot Mark. -- View this message in context: http://drools.46999.n3.nabble.com/Drools6-Having-trouble-in-using-kie-ci-tp4027208p4027258.html Sent from the Drools: User forum mailing list archive at Nabble.com. From mproctor at codehaus.org Thu Dec 12 15:22:57 2013 From: mproctor at codehaus.org (Mark Proctor) Date: Thu, 12 Dec 2013 20:22:57 +0000 Subject: [rules-users] daily builds available Message-ID: <31A5E1BB-77E0-4D54-BAD2-02DEEE39178D@codehaus.org> Daily builds can currently be found here, http://download.jboss.org/drools/release/snapshot/6.0.x/ Anyone wanting to try 6.0, but meeting some issues already discussed - such as remote repositories, and settings.xml not working - should try the snapshots builds there. Mark From mproctor at codehaus.org Thu Dec 12 15:38:38 2013 From: mproctor at codehaus.org (Mark Proctor) Date: Thu, 12 Dec 2013 20:38:38 +0000 Subject: [rules-users] Drools6 : Having trouble in using kie-ci In-Reply-To: <1386875329104-4027258.post@n3.nabble.com> References: <1386806669975-4027234.post@n3.nabble.com> <1386833183817-4027238.post@n3.nabble.com> <1386839294837-4027245.post@n3.nabble.com> <1386840364139-4027246.post@n3.nabble.com> <1386841615588-4027247.post@n3.nabble.com> <1386875329104-4027258.post@n3.nabble.com> Message-ID: <3A8DBCAF-343B-4BEA-82E4-7CF289C6F1AA@codehaus.org> all fixed in the daily build, give it a try please. http://download.jboss.org/drools/release/snapshot/6.0.x/ Mark On 12 Dec 2013, at 19:08, vimalkansal wrote: > Thanks a lot Mark. > > > > -- > View this message in context: http://drools.46999.n3.nabble.com/Drools6-Having-trouble-in-using-kie-ci-tp4027208p4027258.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/20131212/64f22952/attachment.html From vimalkansal at yahoo.com Thu Dec 12 15:49:36 2013 From: vimalkansal at yahoo.com (vimalkansal) Date: Thu, 12 Dec 2013 12:49:36 -0800 (PST) Subject: [rules-users] Drools6 : Having trouble in using kie-ci In-Reply-To: <3A8DBCAF-343B-4BEA-82E4-7CF289C6F1AA@codehaus.org> References: <1386833183817-4027238.post@n3.nabble.com> <1386839294837-4027245.post@n3.nabble.com> <1386840364139-4027246.post@n3.nabble.com> <1386841615588-4027247.post@n3.nabble.com> <1386875329104-4027258.post@n3.nabble.com> <3A8DBCAF-343B-4BEA-82E4-7CF289C6F1AA@codehaus.org> Message-ID: <1386881376502-4027262.post@n3.nabble.com> Thanks Mark. -- View this message in context: http://drools.46999.n3.nabble.com/Drools6-Having-trouble-in-using-kie-ci-tp4027208p4027262.html Sent from the Drools: User forum mailing list archive at Nabble.com. From mproctor at codehaus.org Thu Dec 12 17:03:40 2013 From: mproctor at codehaus.org (Mark Proctor) Date: Thu, 12 Dec 2013 22:03:40 +0000 Subject: [rules-users] Sending Java Objects Through Camel, received by Drools 6 In-Reply-To: <1386870628271-4027256.post@n3.nabble.com> References: <1386870628271-4027256.post@n3.nabble.com> Message-ID: <3A43085B-CF2B-488A-A619-1433E45E16DE@codehaus.org> At the moment it requires command wrapper objects, which map the object to the method. This allows batch interactions. There was some work for more RPC type interactions, i.e. maps camel route only to ?insert? and doesn?t need a command wrapper. But I don?t think that made 6.0. If you know that all objects in the camel rout and just for insertion, you can add a camel transformer. The transforms the object into a wrapper command object, wrapping the original object http://camel.apache.org/message-translator.html Mark On 12 Dec 2013, at 17:50, jordan.brown wrote: > Hi, > > We're currently testing sending XML/JSON (including a message and drools > commands) through Camel and Drools receiving it (using the documentation > given--Part IV Drools Integration in the Doc), but we're curious if it's > possible to just send a Java Object (e.g., Person Object) through Camel and > have Drools pick it up--whereby the object will be received by drools and > then the actual insert and firing of rules will occur on the other side > (i.e., we wouldn't send the drools commands to Camel). > > Out-of-the-box, is this possible? Anybody doing this? As of now, we're > continuing the approach in the Drools documentation (Part IV Drools > Integration). > > -Jordan > > > > > > -- > View this message in context: http://drools.46999.n3.nabble.com/Sending-Java-Objects-Through-Camel-received-by-Drools-6-tp4027256.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 anjana.ackroyd at gmail.com Thu Dec 12 18:34:37 2013 From: anjana.ackroyd at gmail.com (anjana.ackroyd) Date: Thu, 12 Dec 2013 15:34:37 -0800 (PST) Subject: [rules-users] How to push changes to cloned repo on Kie-Workbench Message-ID: <1386891277333-4027264.post@n3.nabble.com> I was able to do all my steps successfully on the work bench , Cloned my repository, added a new project, package,drl file, build and deployed it. I see wb created the repositories on my local machine which is good but I dont see a way to push those changes to my cloned reposity Git Push? I am not even sure what branch of the cloned repository the work bench is using I noticed on this URL below there is recommendation to use the ./kie-config-cli.sh script to push changes http://docs.jboss.org/drools/release/6.0.0.Final/drools-docs/html/wb.Workbench.html I downloaded the zip file from https://github.com/droolsjbpm/kie-wb-distributions/tree/6.0.x Ran the script from \kie-config-cli\src\main\dist but I get a error message Exception in thread "main" java.lang.NoClassDefFoundError: org/kie/config/cli/CmdMain Caused by: java.lang.ClassNotFoundException: org.kie.config.cli.CmdMain at java.net.URLClassLoader$1.run(URLClassLoader.java:202) at java.security.AccessController.doPrivileged(Native Method) at java.net.URLClassLoader.findClass(URLClassLoader.java:190) at java.lang.ClassLoader.loadClass(ClassLoader.java:306) at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:301) at java.lang.ClassLoader.loadClass(ClassLoader.java:247) Could not find the main class: org.kie.config.cli.CmdMain. Program will exit. I was hoping there would be a way to push my changes from the Workbench UI itself. -- View this message in context: http://drools.46999.n3.nabble.com/How-to-push-changes-to-cloned-repo-on-Kie-Workbench-tp4027264.html Sent from the Drools: User forum mailing list archive at Nabble.com. From dsotty at gmail.com Thu Dec 12 19:18:00 2013 From: dsotty at gmail.com (Davide Sottara) Date: Thu, 12 Dec 2013 17:18:00 -0700 Subject: [rules-users] Null pointer when inserting data (5.5.0.Final) In-Reply-To: References: Message-ID: <52AA5238.5040306@gmail.com> Could you please try version 5.6.CR1 ? It's not available for download on the main web site, but maven will be able to retrieve it. It has many fixes, including some multi threading issues. If you still experience the problem, we'll try and find a way to fix it in 5.6.Final, or test it with 6.x Thanks Davide On 12/12/2013 07:34 AM, Anders Henriksson wrote: > Hi! > > We're running drools in a multi-server setup, with a pretty basic > scenario: > > 1. When the first session is needed, we load the rulebase once. The > rulebase is never changed after this (no rule removal or addition). > 2. Each call spawns a new StatefulKnowledgeSession which is used for > firing the rules once and then disposed. These calls are heavily > multi-threaded, but each session is only used in a single method call > from a single thread. > 3. We use the resource scanner to check for updated packages. When an > updated knowledge package is available, the knowledgebase is discarded > and a new one constructed from the updated package. > > The knowledge package affected is somewhat large - about 25 MB in > size. (There are other, smaller knowledge packages which do not appear > to have this issue.) > > > This setup has been working fine, but somewhat slow. After upgrading > to 5.5.0.Final and adding some speedups in the surrounding code we get > a spurious null pointer. The trail of events is: > > 1. After start all servers work fine. > 2. Sometime after a couple of hours to a couple of days, the null > pointer error occurs on one or more servers (but generally not all of > them). > 3. Once the null pointer occurs, it happens on all further calls using > that knowledgebase. No other knowledgebases are effected. (You can > load the same package in a new knowledgebase, and sessions using the > new, identical, knowledgebase work just fine.) > 4. Restarting the java process makes the server work fine again. > > > Calls always fail with the same stack trace: > > org.drools.RuntimeDroolsException: Unexpected exception executing > action > org.drools.reteoo.ReteooWorkingMemory$WorkingMemoryReteAssertAction at 5db53f > 24 > at > org.drools.common.AbstractWorkingMemory.executeQueuedActions(AbstractWorkingMemory.java:995) > 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) > > Caused by: java.lang.NullPointerException > at > org.drools.rule.EvalCondition.createContext(EvalCondition.java:107) > at > org.drools.reteoo.EvalConditionNode.createMemory(EvalConditionNode.java:261) > at > org.drools.common.ConcurrentNodeMemories.createNodeMemory(ConcurrentNodeMemories.java:90) > at > org.drools.common.ConcurrentNodeMemories.getNodeMemory(ConcurrentNodeMemories.java:69) > at > org.drools.common.AbstractWorkingMemory.getNodeMemory(AbstractWorkingMemory.java:1034) > at > org.drools.reteoo.EvalConditionNode.assertLeftTuple(EvalConditionNode.java:174) > at > org.drools.reteoo.SingleLeftTupleSinkAdapter.doPropagateAssertLeftTuple(SingleLeftTupleSinkAdapter.java:196) > at > org.drools.reteoo.SingleLeftTupleSinkAdapter.createAndPropagateAssertLeftTuple(SingleLeftTupleSinkAdapter.java:145) > at > org.drools.reteoo.LeftInputAdapterNode.assertObject(LeftInputAdapterNode.java:154) > at > org.drools.reteoo.SingleObjectSinkAdapter.propagateAssertObject(SingleObjectSinkAdapter.java:59) > at > org.drools.reteoo.ObjectTypeNode.assertObject(ObjectTypeNode.java:235) > at > org.drools.reteoo.EntryPointNode.assertObject(EntryPointNode.java:240) > at org.drools.reteoo.Rete.assertObject(Rete.java:109) > 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) > ... 93 more > > Unfortunately we don't have the remaining rows in the wrapped exception. > > > From this trace, it looks like the problem is in EvalCondition: > > public Object createContext() { > return this.expression.createContext(); > } > > which should only be able to produce a null pointer if expression is > missing. Looking at the constructors for this class, having a null > expression seems like a valid use case - but if this is a valid use > case, why doesn't createContext() handle this case? > > Considering that running drools with the same package and the same > inputs can either fail with the above error (if knowledgebase has been > used enough) or work just as intended (using a newly minted > knowledgebase), it feels like something is corrupting the > knowledgebase. Does this make sense? > > (I noticed in the issue tracker ( > https://issues.jboss.org/browse/DROOLS-156 ) that memory for eval > nodes are 'created "too lazily"' - might this be a related issue?) > > Best regards, > Anders > > > _______________________________________________ > 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/20131212/8fdbf887/attachment.html From mproctor at codehaus.org Thu Dec 12 19:54:18 2013 From: mproctor at codehaus.org (Mark Proctor) Date: Fri, 13 Dec 2013 00:54:18 +0000 Subject: [rules-users] How to push changes to cloned repo on Kie-Workbench In-Reply-To: <1386891277333-4027264.post@n3.nabble.com> References: <1386891277333-4027264.post@n3.nabble.com> Message-ID: <1621E84B-8F8A-4642-8D1B-A3CA982B3996@codehaus.org> You want to sync the changes you?ve done with a remote git repo? The WB has a git server. What you?ll need to do from command line is clone, so that you have a local copy you can play with. That local copy you can then push to your remote repo, you might need to reconfigure origin, in order to do so. Mark On 12 Dec 2013, at 23:34, anjana.ackroyd wrote: > I was able to do all my steps successfully on the work bench , Cloned my > repository, added a new project, package,drl file, build and deployed it. > > I see wb created the repositories on my local machine which is good but I > dont see a way to push those changes to my cloned reposity > > Git Push? > I am not even sure what branch of the cloned repository the work bench is > using > > > I noticed on this URL below there is recommendation to use the > ./kie-config-cli.sh script to push changes > http://docs.jboss.org/drools/release/6.0.0.Final/drools-docs/html/wb.Workbench.html > > I downloaded the zip file from > https://github.com/droolsjbpm/kie-wb-distributions/tree/6.0.x > > Ran the script from \kie-config-cli\src\main\dist but I get a error message > > > Exception in thread "main" java.lang.NoClassDefFoundError: > org/kie/config/cli/CmdMain > Caused by: java.lang.ClassNotFoundException: org.kie.config.cli.CmdMain > at java.net.URLClassLoader$1.run(URLClassLoader.java:202) > at java.security.AccessController.doPrivileged(Native Method) > at java.net.URLClassLoader.findClass(URLClassLoader.java:190) > at java.lang.ClassLoader.loadClass(ClassLoader.java:306) > at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:301) > at java.lang.ClassLoader.loadClass(ClassLoader.java:247) > Could not find the main class: org.kie.config.cli.CmdMain. Program will > exit. > > > > I was hoping there would be a way to push my changes from the Workbench UI > itself. > > > > > > > > -- > View this message in context: http://drools.46999.n3.nabble.com/How-to-push-changes-to-cloned-repo-on-Kie-Workbench-tp4027264.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 sumantp at yahoo.com Thu Dec 12 20:02:31 2013 From: sumantp at yahoo.com (sumantp) Date: Thu, 12 Dec 2013 17:02:31 -0800 (PST) Subject: [rules-users] NPE when combining rules Message-ID: <1386896551888-4027267.post@n3.nabble.com> Hi again, I had previously posted an issue with event re-evaluation when using accumulate - http://drools.46999.n3.nabble.com/Prevent-re-evaluation-of-events-in-stream-mode-tp4027171.html I resolved the issue by using a flag to ensure that an event is evaluated just once. I used two rules, one that would match the condition I'm interested in and the second to set the flag on all events that did not match the condition. I used salience to control the order. Here are the rules: rule "Rule 1: Amount exceeds average" salience 2 when $event : Transaction(!isProcessed(), $sequence : sequence, $account : account, $amount : amount) Number($avg : doubleValue, $amount > $avg) from accumulate(Transaction(account == $account, $amount_ : amount) over window:length(100), average($amount_)) then System.out.println("\t***ALERT***: Amount exceeds average = " + $avg + ", Amount = " + $amount + ", Sequence = " + $sequence); $event.setProcessed(); update($event) end rule "(Prune rule 1) Amount exceeds average" salience 1 when $event : Transaction(!isProcessed()) then $event.setProcessed(); update($event) end These rules work great! Next, I created another rule that checks if a metric exceeds a threshold but suppresses consecutive repeating violations. Here's the rule: rule "Rule 2: Suppress repeating violations" when $prevevent : Transaction($account : account, !(amount > 150)) $thisevent : Transaction($sequence : sequence, account == $account, this after $prevevent, $amount : amount, $amount > 150) not (Transaction(account == $account, this after $prevevent, this before $thisevent)) then System.out.println("\t***ALERT***: Amount exceeds threshold (non-repeating) = " + $amount + ", Sequence = " + $sequence); end This rule, when used by itself (the only rule in the drl), works great! The problem happens when I include all 3 rules in the drl file. I get a NPE. Here's the output: Inserting: (Average = 100.0) : Sequence = 1, Account = 1, Amount = 100.0 Inserting: (Average = 100.0) : Sequence = 2, Account = 1, Amount = 100.0 Inserting: (Average = 133.33333333333334) : Sequence = 3, Account = 1, Amount = 200.0 ***ALERT***: Amount exceeds average = 133.33333333333334, Amount = 200.0, Sequence = 3 java.lang.NullPointerException at org.drools.core.time.impl.JDKTimerService.removeJob(JDKTimerService.java:132) at org.drools.core.phreak.PhreakTimerNode.doLeftUpdates(PhreakTimerNode.java:124) at org.drools.core.phreak.PhreakTimerNode.doNode(PhreakTimerNode.java:65) 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:194) at org.drools.core.phreak.RuleExecutor.evaluateNetworkAndFire(RuleExecutor.java:67) at org.drools.core.common.DefaultAgenda.fireNextItem(DefaultAgenda.java:937) at org.drools.core.common.DefaultAgenda.fireAllRules(DefaultAgenda.java:1201) at org.drools.core.common.AbstractWorkingMemory.fireAllRules(AbstractWorkingMemory.java:958) at org.drools.core.common.AbstractWorkingMemory.fireAllRules(AbstractWorkingMemory.java:932) at org.drools.core.impl.StatefulKnowledgeSessionImpl.fireAllRules(StatefulKnowledgeSessionImpl.java:256) at com.sample.BankRules.main(BankRules.java:26) The sequence of amounts I'm inserting is: 100, 100, 200, 200, 200, 100, 200, 200, 200, 100 I'm using 6.0.0.Final. The java code is essentially the same as in the link above. Help! -- View this message in context: http://drools.46999.n3.nabble.com/NPE-when-combining-rules-tp4027267.html Sent from the Drools: User forum mailing list archive at Nabble.com. From vimalkansal at yahoo.com Thu Dec 12 20:02:37 2013 From: vimalkansal at yahoo.com (vimalkansal) Date: Thu, 12 Dec 2013 17:02:37 -0800 (PST) Subject: [rules-users] How to push changes to cloned repo on Kie-Workbench In-Reply-To: <1621E84B-8F8A-4642-8D1B-A3CA982B3996@codehaus.org> References: <1386891277333-4027264.post@n3.nabble.com> <1621E84B-8F8A-4642-8D1B-A3CA982B3996@codehaus.org> Message-ID: <1386896557897-4027268.post@n3.nabble.com> Hi Mark, What is the URL for git server in WB? Thx Vimal -- View this message in context: http://drools.46999.n3.nabble.com/How-to-push-changes-to-cloned-repo-on-Kie-Workbench-tp4027264p4027268.html Sent from the Drools: User forum mailing list archive at Nabble.com. From vimalkansal at yahoo.com Thu Dec 12 20:34:36 2013 From: vimalkansal at yahoo.com (vimalkansal) Date: Thu, 12 Dec 2013 17:34:36 -0800 (PST) Subject: [rules-users] How to push changes to cloned repo on Kie-Workbench In-Reply-To: <1386896557897-4027268.post@n3.nabble.com> References: <1386891277333-4027264.post@n3.nabble.com> <1621E84B-8F8A-4642-8D1B-A3CA982B3996@codehaus.org> <1386896557897-4027268.post@n3.nabble.com> Message-ID: <1386898476942-4027269.post@n3.nabble.com> Never mind, figured it out. Vimal -- View this message in context: http://drools.46999.n3.nabble.com/How-to-push-changes-to-cloned-repo-on-Kie-Workbench-tp4027264p4027269.html Sent from the Drools: User forum mailing list archive at Nabble.com. From anjana.ackroyd at gmail.com Thu Dec 12 20:37:59 2013 From: anjana.ackroyd at gmail.com (anjana.ackroyd) Date: Thu, 12 Dec 2013 17:37:59 -0800 (PST) Subject: [rules-users] How to push changes to cloned repo on Kie-Workbench In-Reply-To: <1621E84B-8F8A-4642-8D1B-A3CA982B3996@codehaus.org> References: <1386891277333-4027264.post@n3.nabble.com> <1621E84B-8F8A-4642-8D1B-A3CA982B3996@codehaus.org> Message-ID: <1386898679546-4027270.post@n3.nabble.com> I was under the impression that under Authoring->Administration-> Repositories->Clone Repository is actually making a local copy for me to put my jar files into? I cloned my repository GIT URL I used ssh://gitolite at vlslcdapp01:22/ com.enterprise.service/service-rules-dsl After I wrote my DRL etc I went Tools->Project Explorer -> Build and Deploy Then Project Settings -> Add From repository and added the jar I just created When I look at Administration I see my repo listed with my package and drl files in it. Now if I dont get to push these changes to the service-rules-dsl repo then how will my Java code access the drl file from it? -- View this message in context: http://drools.46999.n3.nabble.com/How-to-push-changes-to-cloned-repo-on-Kie-Workbench-tp4027264p4027270.html Sent from the Drools: User forum mailing list archive at Nabble.com. From wtang at kana.com Fri Dec 13 00:11:52 2013 From: wtang at kana.com (wtang) Date: Thu, 12 Dec 2013 21:11:52 -0800 (PST) Subject: [rules-users] Drools 6 support for changeset In-Reply-To: <798B7F28-27EC-4BA4-9157-3F415C987DCE@codehaus.org> References: <1386376897778-4027138.post@n3.nabble.com> <1386786040515-4027225.post@n3.nabble.com> <74902C81-F522-47ED-B3FB-DA201C1EE355@codehaus.org> <1386801111365-4027231.post@n3.nabble.com> <798B7F28-27EC-4BA4-9157-3F415C987DCE@codehaus.org> Message-ID: <1386911512297-4027271.post@n3.nabble.com> you mentioned that I have to: "build jars and update to the latest jar". My question is do I have to write code to detect the changes in the rule first or Drool 6.0 can detect this for me? It seems that nothing is automatic. Again my goal is change a rule and be able to have the rule change take effect almost immediately. In 5.x, I can use change-set and start the scanner service to accomplish this goal. But in Drools 6.0, it seems I need to: 1) write code to detect that a rule has changed 2) write code using the KIE API to build the jar and update to this lastest jar Please confirm. Please give link to Drools documentation. -- View this message in context: http://drools.46999.n3.nabble.com/Drools-6-support-for-changeset-tp4027138p4027271.html Sent from the Drools: User forum mailing list archive at Nabble.com. From michael.anstis at gmail.com Fri Dec 13 01:59:15 2013 From: michael.anstis at gmail.com (Michael Anstis) Date: Fri, 13 Dec 2013 06:59:15 +0000 Subject: [rules-users] How to push changes to cloned repo on Kie-Workbench In-Reply-To: <1386891277333-4027264.post@n3.nabble.com> References: <1386891277333-4027264.post@n3.nabble.com> Message-ID: You'd need to build kie-cli-config and use the distribution (or download from the drools downloads page - it's part of the workbench download). Furthermore; in response to your other questions, once you've built a project containing rules etc in the workbench a consuming application should use the generated JAR (that is deployed to the workbench's maven repository). There have been lots of emails recently about how to achieve that. If however you truely do need push the workbench clone of your repository you should be able to use kie-cli-config. Push is not exposed in the UI at present. Sent on the move On 12 Dec 2013 23:35, "anjana.ackroyd" wrote: > I was able to do all my steps successfully on the work bench , Cloned my > repository, added a new project, package,drl file, build and deployed it. > > I see wb created the repositories on my local machine which is good but I > dont see a way to push those changes to my cloned reposity > > Git Push? > I am not even sure what branch of the cloned repository the work bench is > using > > > I noticed on this URL below there is recommendation to use the > ./kie-config-cli.sh script to push changes > > http://docs.jboss.org/drools/release/6.0.0.Final/drools-docs/html/wb.Workbench.html > > I downloaded the zip file from > https://github.com/droolsjbpm/kie-wb-distributions/tree/6.0.x > > Ran the script from \kie-config-cli\src\main\dist but I get a error > message > > > Exception in thread "main" java.lang.NoClassDefFoundError: > org/kie/config/cli/CmdMain > Caused by: java.lang.ClassNotFoundException: org.kie.config.cli.CmdMain > at java.net.URLClassLoader$1.run(URLClassLoader.java:202) > at java.security.AccessController.doPrivileged(Native Method) > at java.net.URLClassLoader.findClass(URLClassLoader.java:190) > at java.lang.ClassLoader.loadClass(ClassLoader.java:306) > at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:301) > at java.lang.ClassLoader.loadClass(ClassLoader.java:247) > Could not find the main class: org.kie.config.cli.CmdMain. Program will > exit. > > > > I was hoping there would be a way to push my changes from the Workbench UI > itself. > > > > > > > > -- > View this message in context: > http://drools.46999.n3.nabble.com/How-to-push-changes-to-cloned-repo-on-Kie-Workbench-tp4027264.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/20131213/3d5eb712/attachment.html From ge0ffrey.spam at gmail.com Fri Dec 13 03:32:21 2013 From: ge0ffrey.spam at gmail.com (Geoffrey De Smet) Date: Fri, 13 Dec 2013 09:32:21 +0100 Subject: [rules-users] [Optaplanner] Filter values => immovable planning entities In-Reply-To: References: Message-ID: <52AAC615.3020509@gmail.com> An HTML attachment was scrubbed... URL: http://lists.jboss.org/pipermail/rules-users/attachments/20131213/0760656c/attachment.html From mats.noren at gmail.com Fri Dec 13 04:39:53 2013 From: mats.noren at gmail.com (=?ISO-8859-1?Q?Mats_Nor=E9n?=) Date: Fri, 13 Dec 2013 10:39:53 +0100 Subject: [rules-users] [Optaplanner] Filter values => immovable planning entities In-Reply-To: <52AAC615.3020509@gmail.com> References: <52AAC615.3020509@gmail.com> Message-ID: 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. 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 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/20131213/cd0eaeb7/attachment-0001.html From mproctor at codehaus.org Fri Dec 13 05:41:49 2013 From: mproctor at codehaus.org (Mark Proctor) Date: Fri, 13 Dec 2013 10:41:49 +0000 Subject: [rules-users] Drools 6 support for changeset In-Reply-To: <1386911512297-4027271.post@n3.nabble.com> References: <1386376897778-4027138.post@n3.nabble.com> <1386786040515-4027225.post@n3.nabble.com> <74902C81-F522-47ED-B3FB-DA201C1EE355@codehaus.org> <1386801111365-4027231.post@n3.nabble.com> <798B7F28-27EC-4BA4-9157-3F415C987DCE@codehaus.org> <1386911512297-4027271.post@n3.nabble.com> Message-ID: <1A4ACBD1-DE44-4007-BBCF-3A86AC0169B9@codehaus.org> We do not have any file change listeners. You, or the workbench, needs to build the jar. What is automatic is the role of change sets before. You no longer need to compute them, build the jar, have the client consume the jar (with different ReleaseID) - that?s it. Drools diffs the current and target jar, and upgrades accordingly. Mark On 13 Dec 2013, at 05:11, wtang wrote: > you mentioned that I have to: > > "build jars and update to the latest jar". > > My question is do I have to write code to detect the changes in the rule > first or Drool 6.0 can detect this for me? It seems that nothing is > automatic. > > Again my goal is change a rule and be able to have the rule change take > effect almost immediately. In 5.x, I can use change-set and start the > scanner service to accomplish this goal. But in Drools 6.0, it seems I need > to: > > 1) write code to detect that a rule has changed > 2) write code using the KIE API to build the jar and update to this lastest > jar > > Please confirm. Please give link to Drools documentation. > > > > > > > > -- > View this message in context: http://drools.46999.n3.nabble.com/Drools-6-support-for-changeset-tp4027138p4027271.html > Sent from the Drools: User forum mailing list archive at Nabble.com. > _______________________________________________ > rules-users mailing list > rules-users at lists.jboss.org > https://lists.jboss.org/mailman/listinfo/rules-users From ge0ffrey.spam at gmail.com Fri Dec 13 05:51:30 2013 From: ge0ffrey.spam at gmail.com (Geoffrey De Smet) Date: Fri, 13 Dec 2013 11:51:30 +0100 Subject: [rules-users] [Optaplanner] Filter values => immovable planning entities In-Reply-To: References: <52AAC615.3020509@gmail.com> Message-ID: <52AAE6B2.50208@gmail.com> An HTML attachment was scrubbed... URL: http://lists.jboss.org/pipermail/rules-users/attachments/20131213/4316a4c7/attachment.html From mproctor at codehaus.org Fri Dec 13 08:47:13 2013 From: mproctor at codehaus.org (Mark Proctor) Date: Fri, 13 Dec 2013 13:47:13 +0000 Subject: [rules-users] How to push changes to cloned repo on Kie-Workbench In-Reply-To: <1386898679546-4027270.post@n3.nabble.com> References: <1386891277333-4027264.post@n3.nabble.com> <1621E84B-8F8A-4642-8D1B-A3CA982B3996@codehaus.org> <1386898679546-4027270.post@n3.nabble.com> Message-ID: <0138DE6E-4EE9-4F9C-808C-42C4DC227787@codehaus.org> Neither the build jar files from projects, or uploaded jars, are placed in GIT. There is a separate maven folder location for those, on the file system. See docs for workbench configuration, that location is configurable. Mark On 13 Dec 2013, at 01:37, anjana.ackroyd wrote: > I was under the impression that under Authoring->Administration-> > Repositories->Clone Repository is actually making a local copy for me to put > my jar files into? > I cloned my repository > > GIT URL I used > ssh://gitolite at vlslcdapp01:22/ > com.enterprise.service/service-rules-dsl > After I wrote my DRL etc I went Tools->Project Explorer -> Build and Deploy > Then Project Settings -> Add From repository and added the jar I just > created > > When I look at Administration I see my repo listed with my package and drl > files in it. > > Now if I dont get to push these changes to the service-rules-dsl repo then > how will my Java code access the drl file from it? > > > > -- > View this message in context: http://drools.46999.n3.nabble.com/How-to-push-changes-to-cloned-repo-on-Kie-Workbench-tp4027264p4027270.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 lars.bilger at lhsystems.com Fri Dec 13 08:51:18 2013 From: lars.bilger at lhsystems.com (lbilger) Date: Fri, 13 Dec 2013 05:51:18 -0800 (PST) Subject: [rules-users] Drools 6 support for changeset In-Reply-To: <1A4ACBD1-DE44-4007-BBCF-3A86AC0169B9@codehaus.org> References: <1386376897778-4027138.post@n3.nabble.com> <1386786040515-4027225.post@n3.nabble.com> <74902C81-F522-47ED-B3FB-DA201C1EE355@codehaus.org> <1386801111365-4027231.post@n3.nabble.com> <798B7F28-27EC-4BA4-9157-3F415C987DCE@codehaus.org> <1386911512297-4027271.post@n3.nabble.com> <1A4ACBD1-DE44-4007-BBCF-3A86AC0169B9@codehaus.org> Message-ID: <1386942678320-4027279.post@n3.nabble.com> I thought that was what the KieScanner did? I spent some time trying to get it to work as I would expect it to, but ran into several problems that made me go back to 5.5 for now. Here's what I did: I created two maven projects, one to contain the rules ("drools6:rules") and one to use them ("drools6:drools6"). In "drools6:drools6" I created a Main class and method in which I initialize the KieContainer and KieScanner as follows: KieServices kieServices = KieServices.Factory.get(); ReleaseId releaseId = kieServices.newReleaseId("drools6", "rules", "1.0.0-SNAPSHOT"); final KieContainer kieContainer = kieServices.newKieContainer(releaseId); KieScanner kieScanner = kieServices.newKieScanner(kieContainer); kieScanner.start(1000); // Some code to see when rules were changed System.in.read(); // Keep the VM running while waiting for rule changes Now I would expect the rules to be automatically picked up if I change them in "drools6:rules" and "mvn install" it. But no changes are detected. I debugged the KieScanner and it seems that it compares the version number of the releaseId to the one from the repository, which is "1.0.0-SNAPSHOT" in both cases, so the new jar is not considered newer. So I thought, "OK, so I need to change the version number". I changed the version of the "drools6:rules" project to 1.0.1-SNAPSHOT. This didn't help either, because the releaseId explicitly requests 1.0.0-SNAPSHOT, so the newer version is never loaded. My next idea was to use "LATEST" in the releaseId instead of an explicit version. At first this did not work for my local repository, but after manually editing the maven metadata file and adding a tag, it found the new version. But now, the KieScanner found a change every time it looked because it compared the version string "LATEST" to "1.0.1-SNAPSHOT" and always considered the "real" version newer. With a certain amount of rules and a short polling interval this caused the KieContainer to be busy rebuilding all the time and a very high CPU load. I also tried deploying to a real maven repository instead of just installing to local, but with no success. What am I missing here? Or isn't this how the KieScanner is supposed to work? Thanks Lars Mark Proctor wrote > We do not have any file change listeners. You, or the workbench, needs to > build the jar. > > What is automatic is the role of change sets before. You no longer need to > compute them, build the jar, have the client consume the jar (with > different ReleaseID) - that?s it. Drools diffs the current and target jar, > and upgrades accordingly. > > Mark -- View this message in context: http://drools.46999.n3.nabble.com/Drools-6-support-for-changeset-tp4027138p4027279.html Sent from the Drools: User forum mailing list archive at Nabble.com. From mproctor at codehaus.org Fri Dec 13 09:56:49 2013 From: mproctor at codehaus.org (Mark Proctor) Date: Fri, 13 Dec 2013 14:56:49 +0000 Subject: [rules-users] Drools 6 support for changeset In-Reply-To: <1386942678320-4027279.post@n3.nabble.com> References: <1386376897778-4027138.post@n3.nabble.com> <1386786040515-4027225.post@n3.nabble.com> <74902C81-F522-47ED-B3FB-DA201C1EE355@codehaus.org> <1386801111365-4027231.post@n3.nabble.com> <798B7F28-27EC-4BA4-9157-3F415C987DCE@codehaus.org> <1386911512297-4027271.post@n3.nabble.com> <1A4ACBD1-DE44-4007-BBCF-3A86AC0169B9@codehaus.org> <1386942678320-4027279.post@n3.nabble.com> Message-ID: <35F0717C-E781-4D1A-A9B0-5CB6467C2840@codehaus.org> On 13 Dec 2013, at 13:51, lbilger wrote: > I thought that was what the KieScanner did? KieScanner re-resolves the pom and it?s dependencies, and checks against what is currently deployed. If any of the versions have changed, it updates the current KieContainer. > I spent some time trying to get > it to work as I would expect it to, but ran into several problems that made > me go back to 5.5 for now. > > Here's what I did: > I created two maven projects, one to contain the rules ("drools6:rules") and > one to use them ("drools6:drools6"). > In "drools6:drools6" I created a Main class and method in which I initialize > the KieContainer and KieScanner as follows: > > KieServices kieServices = KieServices.Factory.get(); > ReleaseId releaseId = kieServices.newReleaseId("drools6", "rules", > "1.0.0-SNAPSHOT"); > final KieContainer kieContainer = > kieServices.newKieContainer(releaseId); > KieScanner kieScanner = kieServices.newKieScanner(kieContainer); > kieScanner.start(1000); > // Some code to see when rules were changed > System.in.read(); // Keep the VM running while waiting for rule > changes > > Now I would expect the rules to be automatically picked up if I change them > in "drools6:rules" and "mvn install" it. But no changes are detected. There is a limitation in 6.0.0 - fixed in master. Once you pass in the initial root releaseId - it resolves it to real version, and uses that for all scanNows. So only dependencies in the pom.xml will have their -SNAPSHOT re-resolved. The work around was to create a wrapper project. A previous email "Re: [rules-users] Drools 6 and dynamic update?: "On a side note, on master, there is a change to ensure that the Maven syntax for scanNow (with using the KieScanner) is obeyed. see https://issues.jboss.org/browse/DROOLS-356" > I > debugged the KieScanner and it seems that it compares the version number of > the releaseId to the one from the repository, which is "1.0.0-SNAPSHOT" in > both cases, so the new jar is not considered newer. > > So I thought, "OK, so I need to change the version number". I changed the > version of the "drools6:rules" project to 1.0.1-SNAPSHOT. This didn't help > either, because the releaseId explicitly requests 1.0.0-SNAPSHOT, so the > newer version is never loaded. > > My next idea was to use "LATEST" in the releaseId instead of an explicit > version. At first this did not work for my local repository, but after > manually editing the maven metadata file and adding a tag, it found > the new version. But now, the KieScanner found a change every time it looked > because it compared the version string "LATEST" to "1.0.1-SNAPSHOT" and > always considered the "real" version newer. With a certain amount of rules > and a short polling interval this caused the KieContainer to be busy > rebuilding all the time and a very high CPU load. > > I also tried deploying to a real maven repository instead of just installing > to local, but with no success. > > > What am I missing here? Or isn't this how the KieScanner is supposed to > work? Try the latest snapshot, that has the above issue, in 356, fixed. http://downloads.jboss.org/drools/release/snapshot/6.0.x/ > > Thanks > Lars > > > Mark Proctor wrote >> We do not have any file change listeners. You, or the workbench, needs to >> build the jar. >> >> What is automatic is the role of change sets before. You no longer need to >> compute them, build the jar, have the client consume the jar (with >> different ReleaseID) - that?s it. Drools diffs the current and target jar, >> and upgrades accordingly. >> >> Mark > > > > > > -- > View this message in context: http://drools.46999.n3.nabble.com/Drools-6-support-for-changeset-tp4027138p4027279.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/20131213/5d0a52c9/attachment-0001.html From anjana.ackroyd at gmail.com Fri Dec 13 10:30:33 2013 From: anjana.ackroyd at gmail.com (Anjana Ackroyd) Date: Fri, 13 Dec 2013 07:30:33 -0800 Subject: [rules-users] How to push changes to cloned repo on Kie-Workbench In-Reply-To: <0138DE6E-4EE9-4F9C-808C-42C4DC227787@codehaus.org> References: <1386891277333-4027264.post@n3.nabble.com> <1621E84B-8F8A-4642-8D1B-A3CA982B3996@codehaus.org> <1386898679546-4027270.post@n3.nabble.com> <0138DE6E-4EE9-4F9C-808C-42C4DC227787@codehaus.org> Message-ID: Thanks that makes sense On Fri, Dec 13, 2013 at 5:47 AM, Mark Proctor wrote: > Neither the build jar files from projects, or uploaded jars, are placed in > GIT. There is a separate maven folder location for those, on the file > system. See docs for workbench configuration, that location is configurable. > > Mark > On 13 Dec 2013, at 01:37, anjana.ackroyd wrote: > > > I was under the impression that under Authoring->Administration-> > > Repositories->Clone Repository is actually making a local copy for me to > put > > my jar files into? > > I cloned my repository > > > > GIT URL I used > > ssh://gitolite at vlslcdapp01:22/ > > com.enterprise.service/service-rules-dsl > > After I wrote my DRL etc I went Tools->Project Explorer -> Build and > Deploy > > Then Project Settings -> Add From repository and added the jar I just > > created > > > > When I look at Administration I see my repo listed with my package and > drl > > files in it. > > > > Now if I dont get to push these changes to the service-rules-dsl repo > then > > how will my Java code access the drl file from it? > > > > > > > > -- > > View this message in context: > http://drools.46999.n3.nabble.com/How-to-push-changes-to-cloned-repo-on-Kie-Workbench-tp4027264p4027270.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/20131213/8e3e6979/attachment.html From jordan.brown at rackspace.com Fri Dec 13 13:13:08 2013 From: jordan.brown at rackspace.com (jordan.brown) Date: Fri, 13 Dec 2013 10:13:08 -0800 (PST) Subject: [rules-users] Using a DRL file on Guvnor/Workbench while using Drools Camel Server Message-ID: <1386958388734-4027283.post@n3.nabble.com> So far in my attempts, I am unable to use a DRL file that exists on Drools Workbench/Guvnor while using Drools Integration with Apache Camel. I would like to be able to use a rule file that can be managed from the UI, along with KIE scanner, monitoring the maven repository for changes. I'm sourcing from the JAR coming from the remote repository of Guvnor, where the DRL lies, but it's not picking it up in the server so far in my testing. I have the Drools Camel Server up sending messages and executing rules against the knowledge session, but as of right now, the DRL file is created locally. I'm not seeing anything on the documentation concerning my question. -- View this message in context: http://drools.46999.n3.nabble.com/Using-a-DRL-file-on-Guvnor-Workbench-while-using-Drools-Camel-Server-tp4027283.html Sent from the Drools: User forum mailing list archive at Nabble.com. From michael.anstis at gmail.com Fri Dec 13 14:14:19 2013 From: michael.anstis at gmail.com (Michael Anstis) Date: Fri, 13 Dec 2013 19:14:19 +0000 Subject: [rules-users] Using a DRL file on Guvnor/Workbench while using Drools Camel Server In-Reply-To: <1386958388734-4027283.post@n3.nabble.com> References: <1386958388734-4027283.post@n3.nabble.com> Message-ID: Please clarify: "I'm sourcing from the JAR coming from the remote repository of Guvnor" how? and "but it's not picking it up in the server so far in my testing" what happens? any errors? There is a bug in 6.0.0.Final that means you need to remove the authentication control from the Workbench's Maven repository, otherwise the best you'll get is the JAR cached in your local .m2; or an HTTP401. On 13 December 2013 18:13, jordan.brown wrote: > So far in my attempts, I am unable to use a DRL file that exists on Drools > Workbench/Guvnor while using Drools Integration with Apache Camel. I would > like to be able to use a rule file that can be managed from the UI, along > with KIE scanner, monitoring the maven repository for changes. I'm sourcing > from the JAR coming from the remote repository of Guvnor, where the DRL > lies, but it's not picking it up in the server so far in my testing. > > I have the Drools Camel Server up sending messages and executing rules > against the knowledge session, but as of right now, the DRL file is created > locally. > > I'm not seeing anything on the documentation concerning my question. > > > > -- > View this message in context: > http://drools.46999.n3.nabble.com/Using-a-DRL-file-on-Guvnor-Workbench-while-using-Drools-Camel-Server-tp4027283.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/20131213/bcc2124b/attachment.html From adarsh.chaini at hsbcib.com Fri Dec 13 14:39:55 2013 From: adarsh.chaini at hsbcib.com (adarsh.chaini at hsbcib.com) Date: Fri, 13 Dec 2013 19:39:55 +0000 Subject: [rules-users] Drools KB Object hierarchy Serilisation and Deserialisation thread safety issue Message-ID: 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. -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.jboss.org/pipermail/rules-users/attachments/20131213/ff4eaea8/attachment-0001.html From anjana.ackroyd at gmail.com Fri Dec 13 18:34:30 2013 From: anjana.ackroyd at gmail.com (anjana.ackroyd) Date: Fri, 13 Dec 2013 15:34:30 -0800 (PST) Subject: [rules-users] Drools 5.5.0 - Runtime Exception java.lang.RuntimeException: Provider org.drools.agent.impl.KnowledgeAgentProviderImpl could not be set Message-ID: <1386977670803-4027288.post@n3.nabble.com> Here is my snippet of my code in 5.5.0.Final import org.drools.KnowledgeBase; import org.drools.agent.KnowledgeAgent; import org.drools.agent.KnowledgeAgentFactory; import org.drools.definition.type.FactType; import org.drools.io.ResourceFactory; import org.drools.runtime.StatelessKnowledgeSession; KnowledgeAgent ka = KnowledgeAgentFactory.newKnowledgeAgent("MyAgent"); ka.applyChangeSet( ResourceFactory.newClassPathResource("src/main/resources/ChangeSet.xml") ); KnowledgeBase kb = ka.getKnowledgeBase(); FactType factType = kb.getFactType("org.numbercompare","NumberCompare"); Object nc = factType.newInstance(); factType.set( nc, "numberone",numberone ); factType.set( nc, "numbertwo", numbertwo ); StatelessKnowledgeSession ks = kb.newStatelessKnowledgeSession(); ks.execute(nc); I get the following error java.lang.RuntimeException: Provider org.drools.agent.impl.KnowledgeAgentProviderImpl could not be set Here are my dependencies in pom.xml org.drools drools-compiler 5.5.0.Final org.drools drools-core 5.5.0.Final org.drools knowledge-api 5.5.0.Final -- View this message in context: http://drools.46999.n3.nabble.com/Drools-5-5-0-Runtime-Exception-java-lang-RuntimeException-Provider-org-drools-agent-impl-KnowledgeAgt-tp4027288.html Sent from the Drools: User forum mailing list archive at Nabble.com. From wtang at kana.com Fri Dec 13 18:39:21 2013 From: wtang at kana.com (wtang) Date: Fri, 13 Dec 2013 15:39:21 -0800 (PST) Subject: [rules-users] Drools 6 support for changeset In-Reply-To: <35F0717C-E781-4D1A-A9B0-5CB6467C2840@codehaus.org> References: <1386376897778-4027138.post@n3.nabble.com> <1386786040515-4027225.post@n3.nabble.com> <74902C81-F522-47ED-B3FB-DA201C1EE355@codehaus.org> <1386801111365-4027231.post@n3.nabble.com> <798B7F28-27EC-4BA4-9157-3F415C987DCE@codehaus.org> <1386911512297-4027271.post@n3.nabble.com> <1A4ACBD1-DE44-4007-BBCF-3A86AC0169B9@codehaus.org> <1386942678320-4027279.post@n3.nabble.com> <35F0717C-E781-4D1A-A9B0-5CB6467C2840@codehaus.org> Message-ID: <1386977961813-4027289.post@n3.nabble.com> Can I forget all this and just use KieFileSystem? Again my requirement is when a rule changed, I need to run with the lastest changes WITHOUT bringing down the server and rebuild jar and redeploy. I have the following code and getRule() is just reading the .drl rule as a string stored as a CLOB in the database: KieServices ks = KieServices.Factory.get(); KieRepository kr = ks.getRepository(); KieFileSystem kfs = ks.newKieFileSystem(); kfs.write("src/main/resources/org/kie/example5/HAL5.drl", getRule()); if (ruleHasChanged()) { KieBuilder kb = ks.newKieBuilder(kfs); kb.buildAll(); // kieModule is automatically deployed to KieRepository if successfully built. } KieContainer kContainer = ks.newKieContainer(kr.getDefaultReleaseId()); KieSession kSession = kContainer.newKieSession(); kSession.inserFact(); KSession.fireAllRules(); So I will do: 1) write my own logic to detect any rule changes in ruleHasChanged() 2) if any rules have changed, I will do buildAll() to build a new KieBase; otherwise, I don't call buildAll() and use the old KieBase. Would this approach work per my requirement? -- View this message in context: http://drools.46999.n3.nabble.com/Drools-6-support-for-changeset-tp4027138p4027289.html Sent from the Drools: User forum mailing list archive at Nabble.com. From mproctor at codehaus.org Fri Dec 13 20:40:18 2013 From: mproctor at codehaus.org (Mark Proctor) Date: Sat, 14 Dec 2013 01:40:18 +0000 Subject: [rules-users] Drools 6 support for changeset In-Reply-To: <1386977961813-4027289.post@n3.nabble.com> References: <1386376897778-4027138.post@n3.nabble.com> <1386786040515-4027225.post@n3.nabble.com> <74902C81-F522-47ED-B3FB-DA201C1EE355@codehaus.org> <1386801111365-4027231.post@n3.nabble.com> <798B7F28-27EC-4BA4-9157-3F415C987DCE@codehaus.org> <1386911512297-4027271.post@n3.nabble.com> <1A4ACBD1-DE44-4007-BBCF-3A86AC0169B9@codehaus.org> <1386942678320-4027279.post@n3.nabble.com> <35F0717C-E781-4D1A-A9B0-5CB6467C2840@codehaus.org> <1386977961813-4027289.post@n3.nabble.com> Message-ID: update the releaseID in the meta model, build it (it?ll be added to KieRepository). Then on the KieContainer do updatetoVersion(String releaseId) giving it the release ID you wish to update to, and it will update at runtime. Mark On 13 Dec 2013, at 23:39, wtang wrote: > Can I forget all this and just use KieFileSystem? > > Again my requirement is when a rule changed, I need to run with the lastest > changes WITHOUT bringing down the server and rebuild jar and redeploy. > > I have the following code and getRule() is just reading the .drl rule as a > string stored as a CLOB in the database: > > KieServices ks = KieServices.Factory.get(); > KieRepository kr = ks.getRepository(); > KieFileSystem kfs = ks.newKieFileSystem(); > > kfs.write("src/main/resources/org/kie/example5/HAL5.drl", getRule()); > > if (ruleHasChanged()) { > KieBuilder kb = ks.newKieBuilder(kfs); > kb.buildAll(); // kieModule is automatically deployed to KieRepository > if successfully built. > } > > KieContainer kContainer = ks.newKieContainer(kr.getDefaultReleaseId()); > KieSession kSession = kContainer.newKieSession(); > kSession.inserFact(); > KSession.fireAllRules(); > > So I will do: > > 1) write my own logic to detect any rule changes in ruleHasChanged() > 2) if any rules have changed, I will do buildAll() to build a new KieBase; > otherwise, I don't call buildAll() and use the old KieBase. > > Would this approach work per my requirement? > > > > -- > View this message in context: http://drools.46999.n3.nabble.com/Drools-6-support-for-changeset-tp4027138p4027289.html > Sent from the Drools: User forum mailing list archive at Nabble.com. > _______________________________________________ > rules-users mailing list > rules-users at lists.jboss.org > https://lists.jboss.org/mailman/listinfo/rules-users From mproctor at codehaus.org Fri Dec 13 20:43:02 2013 From: mproctor at codehaus.org (Mark Proctor) Date: Sat, 14 Dec 2013 01:43:02 +0000 Subject: [rules-users] Using a DRL file on Guvnor/Workbench while using Drools Camel Server In-Reply-To: <1386958388734-4027283.post@n3.nabble.com> References: <1386958388734-4027283.post@n3.nabble.com> Message-ID: <4C48F4FB-5D62-4271-B909-A30FEAC60A05@codehaus.org> see previous emails in the list: Begin forwarded message: > From: Mark Proctor > Subject: 6.0 issue with remote jars and dynamic modules > Date: 6 December 2013 14:39:50 GMT > To: Rules Dev List , Rules Users List > > There is problem, fixed in master, for remote jars. The KieRepository currently, when using kie-ci, doesn?t obey the settings.xml active profiles. This means it is not recognising the remote configured repositories. > > While this is fixed, and we?ll have binaries out in about 2 weeks, it means for now KieRepository can only resolve jars already in the local m2_repo. > the jira > https://issues.jboss.org/browse/DROOLS-367 > > Mark Try latest snapshot, it fixes a number of issues: http://downloads.jboss.org/drools/release/snapshot/6.0.x/ Mark On 13 Dec 2013, at 18:13, jordan.brown wrote: > So far in my attempts, I am unable to use a DRL file that exists on Drools > Workbench/Guvnor while using Drools Integration with Apache Camel. I would > like to be able to use a rule file that can be managed from the UI, along > with KIE scanner, monitoring the maven repository for changes. I'm sourcing > from the JAR coming from the remote repository of Guvnor, where the DRL > lies, but it's not picking it up in the server so far in my testing. > > I have the Drools Camel Server up sending messages and executing rules > against the knowledge session, but as of right now, the DRL file is created > locally. > > I'm not seeing anything on the documentation concerning my question. > > > > -- > View this message in context: http://drools.46999.n3.nabble.com/Using-a-DRL-file-on-Guvnor-Workbench-while-using-Drools-Camel-Server-tp4027283.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/20131214/9e838005/attachment.html From anjana.ackroyd at gmail.com Sat Dec 14 01:41:42 2013 From: anjana.ackroyd at gmail.com (anjana.ackroyd) Date: Fri, 13 Dec 2013 22:41:42 -0800 (PST) Subject: [rules-users] Drools 5.5 java.lang.ClassCastException: org.drools.compiler.rule.builder.dialect.mvel.MVELDialectConfiguration cannot be cast to org.drools.compiler.DialectConfiguration Message-ID: <1387003302758-4027293.post@n3.nabble.com> I am stuck with this error java.lang.ClassCastException: org.drools.compiler.rule.builder.dialect.mvel.MVELDialectConfiguration cannot be cast to org.drools.compiler.DialectConfiguration I am using Intellij IDE. I have googled the error and tried all options but nothing seems to work Here is my pom dependencies org.drools drools-compiler 5.5.0.Final org.drools drools-core 5.5.0.Final org.drools knowledge-api 5.5.0.Final org.mvel mvel2 2.0.10 org.codehaus.janino janino 2.5.16 org.apache.servicemix.bundles org.apache.servicemix.bundles.drools 5.1.1_1 Here is my Code //I added the Properties after reading that someone solved the problem using those lines private KnowledgeBase readKnowledgeBase() throws Exception { Properties props = new Properties(); props.setProperty("drools.dialect.java.compiler", "JANINO"); KnowledgeBuilderConfiguration config = KnowledgeBuilderFactory.newKnowledgeBuilderConfiguration(props, null); KnowledgeBuilder kbuilder = KnowledgeBuilderFactory.newKnowledgeBuilder(config); kbuilder.add(ResourceFactory.newUrlResource("http://vlslcitcat07.abc.com:38083/guvnor/org.drools.guvnor.Guvnor/package/org.numbercompare/LATEST/ChangeSet.xml"), ResourceType.CHANGE_SET); 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; here is my DRL file in Guvnor 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"); -- View this message in context: http://drools.46999.n3.nabble.com/Drools-5-5-java-lang-ClassCastException-org-drools-compiler-rule-builder-dialect-mvel-MVELDialectConn-tp4027293.html Sent from the Drools: User forum mailing list archive at Nabble.com. From anjana.ackroyd at gmail.com Sat Dec 14 01:42:02 2013 From: anjana.ackroyd at gmail.com (anjana.ackroyd) Date: Fri, 13 Dec 2013 22:42:02 -0800 (PST) Subject: [rules-users] Drools 5.5 java.lang.ClassCastException: org.drools.compiler.rule.builder.dialect.mvel.MVELDialectConfiguration cannot be cast to org.drools.compiler.DialectConfiguration In-Reply-To: <1387003302758-4027293.post@n3.nabble.com> References: <1387003302758-4027293.post@n3.nabble.com> Message-ID: <1387003322226-4027294.post@n3.nabble.com> Here is the complete error message SEVERE: The RuntimeException could not be mapped to a response, re-throwing to the HTTP container org.drools.RuntimeDroolsException: Unable to load dialect 'org.drools.compiler.rule.builder.dialect.mvel.MVELDialectConfiguration:mvel:org.drools.compiler.rule.builder.dialect.mvel.MVELDialectConfiguration' at org.drools.compiler.PackageBuilderConfiguration.addDialect(PackageBuilderConfiguration.java:283) at org.drools.compiler.PackageBuilderConfiguration.buildDialectConfigurationMap(PackageBuilderConfiguration.java:268) at org.drools.compiler.PackageBuilderConfiguration.init(PackageBuilderConfiguration.java:181) at org.drools.compiler.PackageBuilderConfiguration.(PackageBuilderConfiguration.java:154) at org.drools.builder.impl.KnowledgeBuilderFactoryServiceImpl.newKnowledgeBuilderConfiguration(KnowledgeBuilderFactoryServiceImpl.java:26) at org.drools.builder.KnowledgeBuilderFactory.newKnowledgeBuilderConfiguration(KnowledgeBuilderFactory.java:85) at com.cambiahealth.enterprise.service.rules.EnterpriseDroolsService.readKnowledgeBase(EnterpriseDroolsService.java:66) at com.cambiahealth.enterprise.service.rules.EnterpriseDroolsService.getDroolsDTO(EnterpriseDroolsService.java:38) at com.cambiahealth.enterprise.service.delegate.EnterpriseDroolsDelegate.compareNumbers(EnterpriseDroolsDelegate.java:22) at com.cambiahealth.enterprise.service.endpoint.DroolsEndPoint.compareNumbers(DroolsEndPoint.java:45) 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 com.sun.jersey.spi.container.JavaMethodInvokerFactory$1.invoke(JavaMethodInvokerFactory.java:60) at com.sun.jersey.server.impl.model.method.dispatch.AbstractResourceMethodDispatchProvider$ResponseOutInvoker._dispatch(AbstractResourceMethodDispatchProvider.java:205) at com.sun.jersey.server.impl.model.method.dispatch.ResourceJavaMethodDispatcher.dispatch(ResourceJavaMethodDispatcher.java:75) at com.sun.jersey.server.impl.uri.rules.HttpMethodRule.accept(HttpMethodRule.java:302) at com.sun.jersey.server.impl.uri.rules.ResourceClassRule.accept(ResourceClassRule.java:108) at com.sun.jersey.server.impl.uri.rules.RightHandPathRule.accept(RightHandPathRule.java:147) at com.sun.jersey.server.impl.uri.rules.RootResourceClassesRule.accept(RootResourceClassesRule.java:84) at com.sun.jersey.server.impl.application.WebApplicationImpl._handleRequest(WebApplicationImpl.java:1511) at com.sun.jersey.server.impl.application.WebApplicationImpl._handleRequest(WebApplicationImpl.java:1442) at com.sun.jersey.server.impl.application.WebApplicationImpl.handleRequest(WebApplicationImpl.java:1391) at com.sun.jersey.server.impl.application.WebApplicationImpl.handleRequest(WebApplicationImpl.java:1381) at com.sun.jersey.spi.container.servlet.WebComponent.service(WebComponent.java:416) at com.sun.jersey.spi.container.servlet.ServletContainer.service(ServletContainer.java:538) at com.sun.jersey.spi.container.servlet.ServletContainer.doFilter(ServletContainer.java:910) at com.sun.jersey.spi.container.servlet.ServletContainer.doFilter(ServletContainer.java:858) at com.sun.jersey.spi.container.servlet.ServletContainer.doFilter(ServletContainer.java:812) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206) at com.cambiahealth.enterprise.service.common.filter.LoggerFilter.doFilter(LoggerFilter.java:32) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206) at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:233) at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:191) at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:127) at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:102) at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109) at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:298) at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:852) at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:588) at org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:489) at java.lang.Thread.run(Thread.java:722) Caused by: java.lang.ClassCastException: org.drools.compiler.rule.builder.dialect.mvel.MVELDialectConfiguration cannot be cast to org.drools.compiler.DialectConfiguration at org.drools.compiler.PackageBuilderConfiguration.addDialect(PackageBuilderConfiguration.java:278) ... 44 more -- View this message in context: http://drools.46999.n3.nabble.com/Drools-5-5-java-lang-ClassCastException-org-drools-compiler-rule-builder-dialect-mvel-MVELDialectConn-tp4027293p4027294.html Sent from the Drools: User forum mailing list archive at Nabble.com. From wtang at kana.com Sat Dec 14 03:16:11 2013 From: wtang at kana.com (wtang) Date: Sat, 14 Dec 2013 00:16:11 -0800 (PST) Subject: [rules-users] Drools 6 support for changeset In-Reply-To: References: <1386786040515-4027225.post@n3.nabble.com> <74902C81-F522-47ED-B3FB-DA201C1EE355@codehaus.org> <1386801111365-4027231.post@n3.nabble.com> <798B7F28-27EC-4BA4-9157-3F415C987DCE@codehaus.org> <1386911512297-4027271.post@n3.nabble.com> <1A4ACBD1-DE44-4007-BBCF-3A86AC0169B9@codehaus.org> <1386942678320-4027279.post@n3.nabble.com> <35F0717C-E781-4D1A-A9B0-5CB6467C2840@codehaus.org> <1386977961813-4027289.post@n3.nabble.com> Message-ID: <1387008971085-4027295.post@n3.nabble.com> please cut and paste code example -- View this message in context: http://drools.46999.n3.nabble.com/Drools-6-support-for-changeset-tp4027138p4027295.html Sent from the Drools: User forum mailing list archive at Nabble.com. From sterjevm at mt.net.mk Sat Dec 14 03:47:09 2013 From: sterjevm at mt.net.mk (marjan.sterjev) Date: Sat, 14 Dec 2013 00:47:09 -0800 (PST) Subject: [rules-users] Drools WB does not generate correct kmodule.xml Message-ID: <1387010829226-4027296.post@n3.nabble.com> I?m defining in Drools WB several Knowledge Bases and Sessions therein. After that the project is saved, built and deployed. There are no exceptions. However, the kmodule.xml in the jar does not contain the knowledge bases and session created. It contains the default knowledge base and session (it is always 674 bytes long). Any clue what is going wrong? Can I debug somehow what is the problem? -- View this message in context: http://drools.46999.n3.nabble.com/Drools-WB-does-not-generate-correct-kmodule-xml-tp4027296.html Sent from the Drools: User forum mailing list archive at Nabble.com. From michael.anstis at gmail.com Sat Dec 14 03:52:46 2013 From: michael.anstis at gmail.com (Michael Anstis) Date: Sat, 14 Dec 2013 08:52:46 +0000 Subject: [rules-users] Drools WB does not generate correct kmodule.xml In-Reply-To: <1387010829226-4027296.post@n3.nabble.com> References: <1387010829226-4027296.post@n3.nabble.com> Message-ID: It was a bug that has been fixed. It is available in github sources and will be in the forthcoming release. You can work around it by changing anything in the pom (e.g. name, description) and saving. Sent on the move On 14 Dec 2013 08:47, "marjan.sterjev" wrote: > I?m defining in Drools WB several Knowledge Bases and Sessions therein. > After > that the project is saved, built and deployed. There are no exceptions. > However, the kmodule.xml in the jar does not contain the knowledge bases > and > session created. It contains the default knowledge base and session (it is > always 674 bytes long). > > Any clue what is going wrong? Can I debug somehow what is the problem? > > > > > -- > View this message in context: > http://drools.46999.n3.nabble.com/Drools-WB-does-not-generate-correct-kmodule-xml-tp4027296.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/20131214/cf5832e0/attachment.html From marianbuenosayres at gmail.com Sat Dec 14 06:19:06 2013 From: marianbuenosayres at gmail.com (marianbuenosayres) Date: Sat, 14 Dec 2013 03:19:06 -0800 (PST) Subject: [rules-users] Drools 5.5 java.lang.ClassCastException: org.drools.compiler.rule.builder.dialect.mvel.MVELDialectConfiguration cannot be cast to org.drools.compiler.DialectConfiguration In-Reply-To: <1387003322226-4027294.post@n3.nabble.com> References: <1387003302758-4027293.post@n3.nabble.com> <1387003322226-4027294.post@n3.nabble.com> Message-ID: <1387019946880-4027298.post@n3.nabble.com> I had a similar problem once related to having two sets of drools dependencies in the classpath. Have you tried removing the org.apache.servicemix.bundles.drools dependency from your pom file? if this is a servicemix Service and you can't remove that from the actual runtim e, you might try a PARENT_LAST class loader configuration -- View this message in context: http://drools.46999.n3.nabble.com/Drools-5-5-java-lang-ClassCastException-org-drools-compiler-rule-builder-dialect-mvel-MVELDialectConn-tp4027293p4027298.html Sent from the Drools: User forum mailing list archive at Nabble.com. From mproctor at codehaus.org Sat Dec 14 09:58:57 2013 From: mproctor at codehaus.org (Mark Proctor) Date: Sat, 14 Dec 2013 14:58:57 +0000 Subject: [rules-users] Drools WB does not generate correct kmodule.xml In-Reply-To: References: <1387010829226-4027296.post@n3.nabble.com> Message-ID: <7065BC5F-F6CD-49A9-96C4-77C67A02568C@codehaus.org> daily snapshot builds are here for you to test: http://downloads.jboss.org/drools/release/snapshot/6.0.x/ Mark On 14 Dec 2013, at 08:52, Michael Anstis wrote: > It was a bug that has been fixed. It is available in github sources and will be in the forthcoming release. > > You can work around it by changing anything in the pom (e.g. name, description) and saving. > > Sent on the move > > On 14 Dec 2013 08:47, "marjan.sterjev" wrote: > I?m defining in Drools WB several Knowledge Bases and Sessions therein. After > that the project is saved, built and deployed. There are no exceptions. > However, the kmodule.xml in the jar does not contain the knowledge bases and > session created. It contains the default knowledge base and session (it is > always 674 bytes long). > > Any clue what is going wrong? Can I debug somehow what is the problem? > > > > > -- > View this message in context: http://drools.46999.n3.nabble.com/Drools-WB-does-not-generate-correct-kmodule-xml-tp4027296.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/20131214/9480ac81/attachment.html From anjana.ackroyd at gmail.com Sat Dec 14 10:14:08 2013 From: anjana.ackroyd at gmail.com (anjana.ackroyd) Date: Sat, 14 Dec 2013 07:14:08 -0800 (PST) Subject: [rules-users] Drools 5.5 java.lang.ClassCastException: org.drools.compiler.rule.builder.dialect.mvel.MVELDialectConfiguration cannot be cast to org.drools.compiler.DialectConfiguration In-Reply-To: <1387019946880-4027298.post@n3.nabble.com> References: <1387003302758-4027293.post@n3.nabble.com> <1387003322226-4027294.post@n3.nabble.com> <1387019946880-4027298.post@n3.nabble.com> Message-ID: <1387034048109-4027301.post@n3.nabble.com> If I take that dependency out I get java.lang.IllegalArgumentException: Unable to instantiate service for Class 'org.drools.builder.KnowledgeBuilderFactoryService' at org.drools.util.ServiceRegistryImpl.get(ServiceRegistryImpl.java:166) at org.drools.builder.KnowledgeBuilderFactory.loadServiceFactory(KnowledgeBuilderFactory.java:130) at org.drools.builder.KnowledgeBuilderFactory.getKnowledgeBuilderServiceFactory(KnowledgeBuilderFactory.java:124) at org.drools.builder.KnowledgeBuilderFactory.newKnowledgeBuilderConfiguration(KnowledgeBuilderFactory.java:85) at com.cambiahealth.enterprise.service.rules.EnterpriseDroolsService.readKnowledgeBase(EnterpriseDroolsService.java:66) at com.cambiahealth.enterprise.service.rules.EnterpriseDroolsService.getDroolsDTO(EnterpriseDroolsService.java:38) at com.cambiahealth.enterprise.service.delegate.EnterpriseDroolsDelegate.compareNumbers(EnterpriseDroolsDelegate.java:22) at com.cambiahealth.enterprise.service.endpoint.DroolsEndPoint.compareNumbers(DroolsEndPoint.java:45) 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 com.sun.jersey.spi.container.JavaMethodInvokerFactory$1.invoke(JavaMethodInvokerFactory.java:60) at com.sun.jersey.server.impl.model.method.dispatch.AbstractResourceMethodDispatchProvider$ResponseOutInvoker._dispatch(AbstractResourceMethodDispatchProvider.java:205) at com.sun.jersey.server.impl.model.method.dispatch.ResourceJavaMethodDispatcher.dispatch(ResourceJavaMethodDispatcher.java:75) at com.sun.jersey.server.impl.uri.rules.HttpMethodRule.accept(HttpMethodRule.java:302) at com.sun.jersey.server.impl.uri.rules.ResourceClassRule.accept(ResourceClassRule.java:108) at com.sun.jersey.server.impl.uri.rules.RightHandPathRule.accept(RightHandPathRule.java:147) at com.sun.jersey.server.impl.uri.rules.RootResourceClassesRule.accept(RootResourceClassesRule.java:84) at com.sun.jersey.server.impl.application.WebApplicationImpl._handleRequest(WebApplicationImpl.java:1511) at com.sun.jersey.server.impl.application.WebApplicationImpl._handleRequest(WebApplicationImpl.java:1442) at com.sun.jersey.server.impl.application.WebApplicationImpl.handleRequest(WebApplicationImpl.java:1391) at com.sun.jersey.server.impl.application.WebApplicationImpl.handleRequest(WebApplicationImpl.java:1381) at com.sun.jersey.spi.container.servlet.WebComponent.service(WebComponent.java:416) at com.sun.jersey.spi.container.servlet.ServletContainer.service(ServletContainer.java:538) at com.sun.jersey.spi.container.servlet.ServletContainer.doFilter(ServletContainer.java:910) at com.sun.jersey.spi.container.servlet.ServletContainer.doFilter(ServletContainer.java:858) at com.sun.jersey.spi.container.servlet.ServletContainer.doFilter(ServletContainer.java:812) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206) at com.cambiahealth.enterprise.service.common.filter.LoggerFilter.doFilter(LoggerFilter.java:32) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206) at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:233) at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:191) at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:127) at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:102) at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109) at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:298) at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:852) at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:588) at org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:489) at java.lang.Thread.run(Thread.java:722) Caused by: java.lang.IllegalArgumentException: Unable to instantiate 'org.drools.builder.impl.KnowledgeBuilderFactoryServiceImpl' at org.drools.util.ServiceRegistryImpl$ReflectionInstantiator.newInstance(ServiceRegistryImpl.java:217) at org.drools.util.ServiceRegistryImpl$ReflectionInstantiator.call(ServiceRegistryImpl.java:209) at org.drools.util.ServiceRegistryImpl.get(ServiceRegistryImpl.java:164) ... 42 more Caused by: java.lang.ClassNotFoundException: org.drools.builder.impl.KnowledgeBuilderFactoryServiceImpl at org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1484) at org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1329) at java.lang.Class.forName0(Native Method) at java.lang.Class.forName(Class.java:188) at org.drools.util.ServiceRegistryImpl$ReflectionInstantiator.newInstance(ServiceRegistryImpl.java:214) ... 44 more -- View this message in context: http://drools.46999.n3.nabble.com/Drools-5-5-java-lang-ClassCastException-org-drools-compiler-rule-builder-dialect-mvel-MVELDialectConn-tp4027293p4027301.html Sent from the Drools: User forum mailing list archive at Nabble.com. From dsotty at gmail.com Sat Dec 14 14:54:30 2013 From: dsotty at gmail.com (Davide Sottara) Date: Sat, 14 Dec 2013 12:54:30 -0700 Subject: [rules-users] Drools KB Object hierarchy Serilisation and Deserialisation thread safety issue In-Reply-To: References: Message-ID: <52ACB776.1040503@gmail.com> 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 -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.jboss.org/pipermail/rules-users/attachments/20131214/aeb87c62/attachment-0001.html From dsotty at gmail.com Sat Dec 14 15:21:25 2013 From: dsotty at gmail.com (Davide Sottara) Date: Sat, 14 Dec 2013 13:21:25 -0700 Subject: [rules-users] Drools 5.5 java.lang.ClassCastException: org.drools.compiler.rule.builder.dialect.mvel.MVELDialectConfiguration cannot be cast to org.drools.compiler.DialectConfiguration In-Reply-To: <1387034048109-4027301.post@n3.nabble.com> References: <1387003302758-4027293.post@n3.nabble.com> <1387003322226-4027294.post@n3.nabble.com> <1387019946880-4027298.post@n3.nabble.com> <1387034048109-4027301.post@n3.nabble.com> Message-ID: <52ACBDC5.4070105@gmail.com> The class org.drools.builder.impl.KnowledgeBuilderFactoryServiceImpl is in drools-compiler. It is very likely that there is still some configuration issue.. even if you removed the explicit dependencies, are the servicemix jars still on the classpath? Moreover, using servicemix-drools 5.1.1 seems to suggest that it would include/reference drools 5.1... Can you try servicemix-drools 5.5.0? http://mvnrepository.com/artifact/org.apache.servicemix.bundles/org.apache.servicemix.bundles.drools/5.5.0.Final_2 afaik, this integration piece is not maintained by the drools community directly Davide On 12/14/2013 08:14 AM, anjana.ackroyd wrote: > If I take that dependency out I get > java.lang.IllegalArgumentException: Unable to instantiate service for Class > 'org.drools.builder.KnowledgeBuilderFactoryService' > at org.drools.util.ServiceRegistryImpl.get(ServiceRegistryImpl.java:166) > at > org.drools.builder.KnowledgeBuilderFactory.loadServiceFactory(KnowledgeBuilderFactory.java:130) > at > org.drools.builder.KnowledgeBuilderFactory.getKnowledgeBuilderServiceFactory(KnowledgeBuilderFactory.java:124) > at > org.drools.builder.KnowledgeBuilderFactory.newKnowledgeBuilderConfiguration(KnowledgeBuilderFactory.java:85) > at > com.cambiahealth.enterprise.service.rules.EnterpriseDroolsService.readKnowledgeBase(EnterpriseDroolsService.java:66) > at > com.cambiahealth.enterprise.service.rules.EnterpriseDroolsService.getDroolsDTO(EnterpriseDroolsService.java:38) > at > com.cambiahealth.enterprise.service.delegate.EnterpriseDroolsDelegate.compareNumbers(EnterpriseDroolsDelegate.java:22) > at > com.cambiahealth.enterprise.service.endpoint.DroolsEndPoint.compareNumbers(DroolsEndPoint.java:45) > 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 > com.sun.jersey.spi.container.JavaMethodInvokerFactory$1.invoke(JavaMethodInvokerFactory.java:60) > at > com.sun.jersey.server.impl.model.method.dispatch.AbstractResourceMethodDispatchProvider$ResponseOutInvoker._dispatch(AbstractResourceMethodDispatchProvider.java:205) > at > com.sun.jersey.server.impl.model.method.dispatch.ResourceJavaMethodDispatcher.dispatch(ResourceJavaMethodDispatcher.java:75) > at > com.sun.jersey.server.impl.uri.rules.HttpMethodRule.accept(HttpMethodRule.java:302) > at > com.sun.jersey.server.impl.uri.rules.ResourceClassRule.accept(ResourceClassRule.java:108) > at > com.sun.jersey.server.impl.uri.rules.RightHandPathRule.accept(RightHandPathRule.java:147) > at > com.sun.jersey.server.impl.uri.rules.RootResourceClassesRule.accept(RootResourceClassesRule.java:84) > at > com.sun.jersey.server.impl.application.WebApplicationImpl._handleRequest(WebApplicationImpl.java:1511) > at > com.sun.jersey.server.impl.application.WebApplicationImpl._handleRequest(WebApplicationImpl.java:1442) > at > com.sun.jersey.server.impl.application.WebApplicationImpl.handleRequest(WebApplicationImpl.java:1391) > at > com.sun.jersey.server.impl.application.WebApplicationImpl.handleRequest(WebApplicationImpl.java:1381) > at > com.sun.jersey.spi.container.servlet.WebComponent.service(WebComponent.java:416) > at > com.sun.jersey.spi.container.servlet.ServletContainer.service(ServletContainer.java:538) > at > com.sun.jersey.spi.container.servlet.ServletContainer.doFilter(ServletContainer.java:910) > at > com.sun.jersey.spi.container.servlet.ServletContainer.doFilter(ServletContainer.java:858) > at > com.sun.jersey.spi.container.servlet.ServletContainer.doFilter(ServletContainer.java:812) > at > org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235) > at > org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206) > at > com.cambiahealth.enterprise.service.common.filter.LoggerFilter.doFilter(LoggerFilter.java:32) > at > org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235) > at > org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206) > at > org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:233) > at > org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:191) > at > org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:127) > at > org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:102) > at > org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109) > at > org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:298) > at > org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:852) > at > org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:588) > at org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:489) > at java.lang.Thread.run(Thread.java:722) > Caused by: java.lang.IllegalArgumentException: Unable to instantiate > 'org.drools.builder.impl.KnowledgeBuilderFactoryServiceImpl' > at > org.drools.util.ServiceRegistryImpl$ReflectionInstantiator.newInstance(ServiceRegistryImpl.java:217) > at > org.drools.util.ServiceRegistryImpl$ReflectionInstantiator.call(ServiceRegistryImpl.java:209) > at org.drools.util.ServiceRegistryImpl.get(ServiceRegistryImpl.java:164) > ... 42 more > Caused by: java.lang.ClassNotFoundException: > org.drools.builder.impl.KnowledgeBuilderFactoryServiceImpl > at > org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1484) > at > org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1329) > at java.lang.Class.forName0(Native Method) > at java.lang.Class.forName(Class.java:188) > at > org.drools.util.ServiceRegistryImpl$ReflectionInstantiator.newInstance(ServiceRegistryImpl.java:214) > ... 44 more > > > > > -- > View this message in context: http://drools.46999.n3.nabble.com/Drools-5-5-java-lang-ClassCastException-org-drools-compiler-rule-builder-dialect-mvel-MVELDialectConn-tp4027293p4027301.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 Sun Dec 15 01:56:29 2013 From: dsotty at gmail.com (Davide Sottara) Date: Sat, 14 Dec 2013 23:56:29 -0700 Subject: [rules-users] permgen leak In-Reply-To: <1386259095814-4027115.post@n3.nabble.com> References: <1386011451286-4027048.post@n3.nabble.com> <0AAA15D2-979B-4369-9A05-B741239A7689@codehaus.org> <1386013302159-4027052.post@n3.nabble.com> <79CC380D-332C-4510-96E3-0C1FCF231D92@codehaus.org> <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> Message-ID: <52AD529D.8040504@gmail.com> Thanks, I have reproduced the issue using the provided test case. Indeed there are two relatively independent ways to hit the permgen : jitted constraints and rule consequences (when the java dialect is used). In the test, with the default values a permgen of ~300MB is needed to accomodate the 15000 rules and their constraints. The problem is that, for each oneIteration, a brand new Knowledge Base is rebuilt from scratch, requiring additional ~300MB of permgen. I guess that this is done to simulate the multiple deployments.. disposing the session, obviously, does not dispose the knowledge base - there might be other sessions - and at the moment there is no way to "dispose" a KB: the classes generated for that KB are referenced indirectly by the main classloader (through drools 5.x's composite classloader), which is shared between the KBs. I'll make some experiments and see what can be done about it. Of course, if one can avoid multiple KBs and just work with one KB and multiple sessions, the problem is less likely to arise. Davide On 12/05/2013 08:58 AM, brachi wrote: > yes because of permgen leak, see previous page... > I must use mvel because only if I use it I don't have permgen. > drools version: 5.4.0.Final also on 5.5.0.Final > > > > -- > View this message in context: http://drools.46999.n3.nabble.com/permgen-leak-tp4027038p4027115.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 Sun Dec 15 03:55:57 2013 From: m1e1r1r1y at 163.com (merry0900) Date: Sun, 15 Dec 2013 00:55:57 -0800 (PST) Subject: [rules-users] how to use dynamic drl file in drools 6 Message-ID: <1387097757223-4027306.post@n3.nabble.com> drools 6 has a great advance from drools5. I am a begginer of both drools 5 and drools6. My question is that I don't know how to impliment dynamic drl which means my drl?rule? file may change during the running of my app since in drools 6 target a drl file like this: .................... this file is located in src/main/resources/META-INF/kmodule.xml. And then the drl file will be packaged in the jar file. when i want to change my drl file, how can i do. note:i don't want to rebuild my java source to jar. for any help? thank you all, from china. -- View this message in context: http://drools.46999.n3.nabble.com/how-to-use-dynamic-drl-file-in-drools-6-tp4027306.html Sent from the Drools: User forum mailing list archive at Nabble.com. From eliane.maalouf at hevs.ch Sun Dec 15 13:10:58 2013 From: eliane.maalouf at hevs.ch (eliane.maalouf) Date: Sun, 15 Dec 2013 10:10:58 -0800 (PST) Subject: [rules-users] Kie Work Bench missing repositories menu option In-Reply-To: <1386780886798-4027222.post@n3.nabble.com> References: <3FB34B9E-B769-40FF-B4E3-CEF8BE869480@codehaus.org> <1386780886798-4027222.post@n3.nabble.com> Message-ID: <1387131058660-4027307.post@n3.nabble.com> " Re: [rules-users] Kie Work Bench missing repositories menu option Dec 11, 2013; 5:54pm ? by anjana.ackroyd anjana.ackroyd Yay! I found the conflicting process using that port and now its all golden . I see all the menu options. Although it would be nice to have it working on tomcat as well because thats the JVM we use enterprise wide. But for now I am going to go ahead and play with the work bench in jboss! " Hello. What was the conflicting service and on which port was it ? I am facing a comparable behavior on tomcat7. I am trying to deploy jbpm-designer standalone on tomcat7. The deployment fails with the same error about VFSRepository and address already in use. Port 9418 is used by default by tomcat (localhost:git), and uberfire needs it as well ... Is there a way to solve this conflict? Where can I change Uberfire port configurations? thank you in advance for your help. -- View this message in context: http://drools.46999.n3.nabble.com/Re-rules-users-Kie-Work-Bench-missing-repositories-menu-option-tp4027198p4027307.html Sent from the Drools: User forum mailing list archive at Nabble.com. From michael.anstis at gmail.com Sun Dec 15 13:25:32 2013 From: michael.anstis at gmail.com (Michael Anstis) Date: Sun, 15 Dec 2013 18:25:32 +0000 Subject: [rules-users] Kie Work Bench missing repositories menu option In-Reply-To: <1387131058660-4027307.post@n3.nabble.com> References: <3FB34B9E-B769-40FF-B4E3-CEF8BE869480@codehaus.org> <1386780886798-4027222.post@n3.nabble.com> <1387131058660-4027307.post@n3.nabble.com> Message-ID: Are you deploying Designer standalone and KIE Workbench in the same application server? Both Designer standalone and KIE Workbench use Uberfire and the VFS provided therein; hence the port conflict. On 15 December 2013 18:10, eliane.maalouf wrote: > " Re: [rules-users] Kie Work Bench missing repositories menu option > Dec 11, 2013; 5:54pm ? by anjana.ackroyd anjana.ackroyd > Yay! I found the conflicting process using that port and now its all golden > . I see all the menu options. > Although it would be nice to have it working on tomcat as well because > thats > the JVM we use enterprise wide. But for now I am going to go ahead and play > with the work bench in jboss! " > > Hello. What was the conflicting service and on which port was it ? I am > facing a comparable behavior on tomcat7. I am trying to deploy > jbpm-designer > standalone on tomcat7. The deployment fails with the same error about > VFSRepository and address already in use. Port 9418 is used by default by > tomcat (localhost:git), and uberfire needs it as well ... Is there a way to > solve this conflict? Where can I change Uberfire port configurations? > thank you in advance for your help. > > > > > > -- > View this message in context: > http://drools.46999.n3.nabble.com/Re-rules-users-Kie-Work-Bench-missing-repositories-menu-option-tp4027198p4027307.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/20131215/2fd80698/attachment.html From eliane.maalouf at hevs.ch Sun Dec 15 13:35:43 2013 From: eliane.maalouf at hevs.ch (eliane.maalouf) Date: Sun, 15 Dec 2013 10:35:43 -0800 (PST) Subject: [rules-users] Kie Work Bench missing repositories menu option In-Reply-To: References: <3FB34B9E-B769-40FF-B4E3-CEF8BE869480@codehaus.org> <1386780886798-4027222.post@n3.nabble.com> <1387131058660-4027307.post@n3.nabble.com> Message-ID: <52AE045B.4D31.00BF.1@hevs.ch> I am only deploying Designer standalone. I did not install KIE workbench. I have the conflict on a tomcat clean installation without any other applications installed. Eliane Maalouf Assistante de Recherche Institut Informatique de Gestion Email : eliane.maalouf at hevs.ch T?l. / Tel. : +41 (0)27 606 90 02 http://www.hevs.ch HES-SO Valais-Wallis ? Techno-P?le 3 ? 3960 Sierre +41 27 606 90 01 ? info.iig at hevs.ch ? www.hevs.ch >>> "manstis [via Drools]" 15.12.2013 19:27 >>> Are you deploying Designer standalone and KIE Workbench in the same application server? Both Designer standalone and KIE Workbench use Uberfire and the VFS provided therein; hence the port conflict. On 15 December 2013 18:10, eliane.maalouf <[hidden email]> wrote: " Re: [rules-users] Kie Work Bench missing repositories menu option Dec 11, 2013; 5:54pm ? by anjana.ackroyd anjana.ackroyd Yay! I found the conflicting process using that port and now its all golden . I see all the menu options. Although it would be nice to have it working on tomcat as well because thats the JVM we use enterprise wide. But for now I am going to go ahead and play with the work bench in jboss! " Hello. What was the conflicting service and on which port was it ? I am facing a comparable behavior on tomcat7. I am trying to deploy jbpm-designer standalone on tomcat7. The deployment fails with the same error about VFSRepository and address already in use. Port 9418 is used by default by tomcat (localhost:git), and uberfire needs it as well ... Is there a way to solve this conflict? Where can I change Uberfire port configurations? thank you in advance for your help. -- View this message in context: http://drools.46999.n3.nabble.com/Re-rules-users-Kie-Work-Bench-missing-repositories-menu-option-tp4027198p4027307.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/Re-rules-users-Kie-Work-Bench-missing-repositories-menu-option-tp4027198p4027308.html To unsubscribe from Re: [rules-users] Kie Work Bench missing repositories menu option, click here. NAML UKEHUPZCVPWZ.IMAGE_87.png (32K) FTAHSJGQFYWC.IMAGE_88.png (2K) IZVWHJJBBEFE.IMAGE_89.png (3K) -- View this message in context: http://drools.46999.n3.nabble.com/Re-rules-users-Kie-Work-Bench-missing-repositories-menu-option-tp4027198p4027309.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/20131215/9333fa3d/attachment-0001.html From michael.anstis at gmail.com Sun Dec 15 13:40:52 2013 From: michael.anstis at gmail.com (Michael Anstis) Date: Sun, 15 Dec 2013 18:40:52 +0000 Subject: [rules-users] Kie Work Bench missing repositories menu option In-Reply-To: <52AE045B.4D31.00BF.1@hevs.ch> References: <3FB34B9E-B769-40FF-B4E3-CEF8BE869480@codehaus.org> <1386780886798-4027222.post@n3.nabble.com> <1387131058660-4027307.post@n3.nabble.com> <52AE045B.4D31.00BF.1@hevs.ch> Message-ID: OK, then the Workbench documentation has details of how to change the port number. http://docs.jboss.org/drools/release/6.0.0.Final/drools-docs/html/wb.Workbench.html#wb.systemProperties On 15 December 2013 18:35, eliane.maalouf wrote: > I am only deploying Designer standalone. I did not install KIE workbench. > I have the conflict on a tomcat clean installation without any other > applications installed. > > > > ------------------------------ > *Eliane Maalouf* > > *Assistante de RechercheInstitut Informatique de Gestion* > > Email : [hidden email] T?l. > / Tel. : +41 (0)27 606 90 02 http://www.hevs.ch > ------------------------------ > *HES-SO Valais-Wallis* ? Techno-P?le 3 ? 3960 Sierre > +41 27 606 90 01 ? [hidden email]? > www.hevs.ch [image: Valais excellence] > >>> "manstis [via Drools]" <[hidden email]> > 15.12.2013 19:27 >>> > Are you deploying Designer standalone and KIE Workbench in the same > application server? > > Both Designer standalone and KIE Workbench use Uberfire and the VFS > provided therein; hence the port conflict. > > > > On 15 December 2013 18:10, eliane.maalouf <[hidden email] > > wrote: > >> " Re: [rules-users] Kie Work Bench missing repositories menu option >> Dec 11, 2013; 5:54pm ? by anjana.ackroyd anjana.ackroyd >> Yay! I found the conflicting process using that port and now its all >> golden >> . I see all the menu options. >> Although it would be nice to have it working on tomcat as well because >> thats >> the JVM we use enterprise wide. But for now I am going to go ahead and >> play >> with the work bench in jboss! " >> >> Hello. What was the conflicting service and on which port was it ? I am >> facing a comparable behavior on tomcat7. I am trying to deploy >> jbpm-designer >> standalone on tomcat7. The deployment fails with the same error about >> VFSRepository and address already in use. Port 9418 is used by default by >> tomcat (localhost:git), and uberfire needs it as well ... Is there a way >> to >> solve this conflict? Where can I change Uberfire port configurations? >> thank you in advance for your help. >> >> >> >> >> >> -- >> View this message in context: >> http://drools.46999.n3.nabble.com/Re-rules-users-Kie-Work-Bench-missing-repositories-menu-option-tp4027198p4027307.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/Re-rules-users-Kie-Work-Bench-missing-repositories-menu-option-tp4027198p4027308.html > To unsubscribe from Re: [rules-users] Kie Work Bench missing repositories > menu option, click here. > NAML > > ------------------------------ > View this message in context: Re: [rules-users] Kie Work Bench missing > repositories menu option > > Sent from the Drools: User forum mailing list archiveat Nabble.com. > > _______________________________________________ > rules-users mailing list > rules-users at lists.jboss.org > https://lists.jboss.org/mailman/listinfo/rules-users > -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.jboss.org/pipermail/rules-users/attachments/20131215/b664c243/attachment.html From mproctor at codehaus.org Sun Dec 15 14:51:05 2013 From: mproctor at codehaus.org (Mark Proctor) Date: Sun, 15 Dec 2013 19:51:05 +0000 Subject: [rules-users] how to use dynamic drl file in drools 6 In-Reply-To: <1387097757223-4027306.post@n3.nabble.com> References: <1387097757223-4027306.post@n3.nabble.com> Message-ID: Each update must be rebuilt and repackaged in a JAR - the JAR is our unit of deployment, and unit of update. You can either rebuild that using the maven plugin, or you can rebuild it at runtime using the programmatic api. Either way make sure you remember to increase the version. http://docs.jboss.org/drools/release/6.0.0.Final/drools-docs/html/KIEChapter.html#KIEExamplesSection 4.2.5.10. Programaticaly build a KieModule using Meta Models (how to build the jar) 4.2.5.6. Default KieSession from File (how to load the jar at runtime) One you have the jar, add it to the KieRepository. And then you can call KieContainer.updateToVersion( String ReleaseID ) If you are using kie-ci the jar can be placed in your local m2_repo, where it will be resolved automatically. Note you cannot put jars on the class path, that you then want to dynamically update at runtime. Mark On 15 Dec 2013, at 08:55, merry0900 wrote: > drools 6 has a great advance from drools5. > I am a begginer of both drools 5 and drools6. > My question is that I don't know how to impliment dynamic drl which means > my drl?rule? file may change during the running of my app since in drools 6 > target a drl file like this: > > xmlns="http://jboss.org/kie/6.0.0/kmodule"> > > > > > .................... > > this file is located in src/main/resources/META-INF/kmodule.xml. > And then the drl file will be packaged in the jar file. > > when i want to change my drl file, how can i do. note:i don't want to > rebuild my java source to jar. > > for any help? thank you all, from china. > > > > -- > View this message in context: http://drools.46999.n3.nabble.com/how-to-use-dynamic-drl-file-in-drools-6-tp4027306.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 Dec 16 02:09:36 2013 From: wolfgang.laun at gmail.com (Wolfgang Laun) Date: Mon, 16 Dec 2013 08:09:36 +0100 Subject: [rules-users] Refence manual Message-ID: Reading drools-distribution-6.0.0.Final/reference_manual/html_single/index.html, section 4.2.5., Build, Deploy and Utilize Examples, I get the improssion that you have to use the incantation mvn install in *any* case as it occurs with each and every example. Surely that can't be right...? -W From rupesh.gopinathan at ibsplc.com Mon Dec 16 03:47:14 2013 From: rupesh.gopinathan at ibsplc.com (Rupesh M G) Date: Mon, 16 Dec 2013 08:47:14 +0000 Subject: [rules-users] Drools 6 MBeans not getting listed in Oracle JConsole Message-ID: <85C0DCE544FC0948BCF39A3CB17CF1C760906146@PBOX2.ibsplc.com> Hi, JConsole (of Oracle JDK 1.7) is not listing the drools expert 6 mbeans. I tried the following Drools 6 sample KieContainerFromKieRepoExample. I set the JVM option -Ddrools.mbeans=enabled, but JConsole did not list the mbeans. When I tried the same in a Drools 5.5 sample, the mbeans were listed in JConsole. Is it a bug in Drools expert 6? Or did I miss any required step for 6? Please help. public void go(PrintStream out) { KieServices ks = KieServices.Factory.get(); // Install example1 in the local maven repo before to do this KieContainer kContainer = ks.newKieContainer(ks.newReleaseId("org.drools", "named-kiesession", "6.0.0-SNAPSHOT")); KieSession kSession = kContainer.newKieSession("ksession1"); kSession.setGlobal("out", out); Object msg1 = createMessage(kContainer, "Dave", "Hello, HAL. Do you read me, HAL?"); kSession.insert(msg1); kSession.fireAllRules(); } Thanks & Regards, Rupesh DISCLAIMER: "The information in this e-mail and any attachment is intended only for the person to whom it is addressed and may contain confidential and/or privileged material. If you have received this e-mail in error, kindly contact the sender and destroy all copies of the original communication. IBS makes no warranty, express or implied, nor guarantees the accuracy, adequacy or completeness of the information contained in this email or any attachment and is not liable for any errors, defects, omissions, viruses or for resultant loss or damage, if any, direct or indirect." -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.jboss.org/pipermail/rules-users/attachments/20131216/e9241cb1/attachment-0001.html From peter.j.troelsen at gmail.com Mon Dec 16 05:14:58 2013 From: peter.j.troelsen at gmail.com (Peter Troelsen) Date: Mon, 16 Dec 2013 11:14:58 +0100 Subject: [rules-users] Drools and StatefulKnowledgeSession performance Message-ID: Hi, I have implemented a small amount (around a 100) rules. Then I made some performance tests for my implementation to see how fast my implementation is. However I have noticed a tends whenever running tests for a long time. It seems that every time i insert an object, validate it, and then remove it from the ksession using .retract(t), the following insertion gets slower and slower. This doesn't really show in the beginning, but after the first couple of million objects, i really starts to escalate.. Have anyone noticed the same kind of thing? I am positive the i retract *all *my objects after validating, but still, it seems to get slower. Is the any way to do an extra clean, without retracting the rules or do I simply need to reinitialize the ksession occasionally? Thanks in advance! -- Peter Troelsen -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.jboss.org/pipermail/rules-users/attachments/20131216/aff89e1d/attachment.html From paul.s.mander at gmail.com Mon Dec 16 05:27:06 2013 From: paul.s.mander at gmail.com (pmander) Date: Mon, 16 Dec 2013 02:27:06 -0800 (PST) Subject: [rules-users] permgen leak In-Reply-To: <52AD529D.8040504@gmail.com> References: <1386013302159-4027052.post@n3.nabble.com> <79CC380D-332C-4510-96E3-0C1FCF231D92@codehaus.org> <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> Message-ID: <1387189626968-4027321.post@n3.nabble.com> Hi, You mention that the brand new kbase evertime could be a problem and you may get this from "re-deployments". In my situation I am not in an app server and so do not have a re-deployment issue but I am creating a new kbase every time I run through the system. The system dynamically creates the drl from database definitions and this is done for each "run" of the application. Is there an alternative for this? -- View this message in context: http://drools.46999.n3.nabble.com/permgen-leak-tp4027038p4027321.html Sent from the Drools: User forum mailing list archive at Nabble.com. From wolfgang.laun at gmail.com Mon Dec 16 06:25:40 2013 From: wolfgang.laun at gmail.com (Wolfgang Laun) Date: Mon, 16 Dec 2013 12:25:40 +0100 Subject: [rules-users] Drools and StatefulKnowledgeSession performance In-Reply-To: References: Message-ID: And you have made sure that you are not accumulating any objects, not necessarily fact object. Have you tried to see whether the effect occurs with a single rule, too? Which Drools version are you using? -W On 16/12/2013, Peter Troelsen wrote: > Hi, > > I have implemented a small amount (around a 100) rules. Then I made some > performance tests for my implementation to see how fast my implementation > is. However I have noticed a tends whenever running tests for a long time. > It seems that every time i insert an object, validate it, and then remove > it from the ksession using .retract(t), the following insertion gets > slower and slower. This doesn't really show in the beginning, but after the > first couple of million objects, i really starts to escalate.. > > Have anyone noticed the same kind of thing? I am positive the i retract > *all > *my objects after validating, but still, it seems to get slower. Is the any > way to do an extra clean, without retracting the rules or do I simply need > to reinitialize the ksession occasionally? > > Thanks in advance! > > -- > Peter Troelsen > From dsotty at gmail.com Mon Dec 16 06:40:44 2013 From: dsotty at gmail.com (Davide Sottara) Date: Mon, 16 Dec 2013 04:40:44 -0700 Subject: [rules-users] permgen leak In-Reply-To: <1387189626968-4027321.post@n3.nabble.com> References: <1386013302159-4027052.post@n3.nabble.com> <79CC380D-332C-4510-96E3-0C1FCF231D92@codehaus.org> <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> Message-ID: <52AEE6BC.6050004@gmail.com> No, there is indeed a very subtle leak.. apparently due to some static references held by MVEL which do not 'work well' with the CompositeClassLoader. I am working on some "dispose" methods that allow to release the resources and solve the problem (I'll follow up with another email later). They will be available in 5.6.0.Final this week. Version 6.x is not affected instead since it does not rely on the CCL anymore. Davide On 12/16/2013 03:27 AM, pmander wrote: > Hi, > > You mention that the brand new kbase evertime could be a problem and you may > get this from "re-deployments". In my situation I am not in an app server > and so do not have a re-deployment issue but I am creating a new kbase every > time I run through the system. > > The system dynamically creates the drl from database definitions and this is > done for each "run" of the application. Is there an alternative for this? > > > > -- > View this message in context: http://drools.46999.n3.nabble.com/permgen-leak-tp4027038p4027321.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 Mon Dec 16 12:53:46 2013 From: mproctor at codehaus.org (Mark Proctor) Date: Mon, 16 Dec 2013 17:53:46 +0000 Subject: [rules-users] Refence manual In-Reply-To: References: Message-ID: ?mvn install? builds the JAR, and in the case of the KIE Examples runs the unit test demonstrating the JAR being used. ?mvn compile? would probably be enough too. Whether you use Maven, or the in memory builder api, it always results in a JAR as the deployable unit. Updates are always done via a JAR. Mark On 16 Dec 2013, at 07:09, Wolfgang Laun wrote: > Reading drools-distribution-6.0.0.Final/reference_manual/html_single/index.html, > section 4.2.5., Build, Deploy and Utilize Examples, I get the > improssion that you have to use the incantation > > mvn install > > in *any* case as it occurs with each and every example. Surely that > can't be right...? > > -W > _______________________________________________ > rules-users mailing list > rules-users at lists.jboss.org > https://lists.jboss.org/mailman/listinfo/rules-users From ed.tirelli at gmail.com Mon Dec 16 13:27:42 2013 From: ed.tirelli at gmail.com (Edson Tirelli) Date: Mon, 16 Dec 2013 13:27:42 -0500 Subject: [rules-users] Drools 6 MBeans not getting listed in Oracle JConsole In-Reply-To: <85C0DCE544FC0948BCF39A3CB17CF1C760906146@PBOX2.ibsplc.com> References: <85C0DCE544FC0948BCF39A3CB17CF1C760906146@PBOX2.ibsplc.com> Message-ID: Rupesh, This should be working. Can you provide me with a self-contained project in eclipse or a test case that I can reproduce/verify here? We have another cut tomorrow, so if you read this and can provide me with a test case before tomorrow EOD, I can check and make sure it is working. Thanks, Edson On Mon, Dec 16, 2013 at 3:47 AM, Rupesh M G wrote: > Hi, > > > > JConsole (of Oracle JDK 1.7) is not listing the drools > expert 6 mbeans. > > I tried the following Drools 6 sample KieContainerFromKieRepoExample. > > I set the JVM option -Ddrools.mbeans=enabled, but JConsole did not list > the mbeans. > > When I tried the same in a Drools 5.5 sample, the mbeans were listed in > JConsole. > > > > Is it a bug in Drools expert 6? Or did I miss any required step for 6? > Please help. > > > > > > public void go(PrintStream out) { > > KieServices ks = KieServices.Factory.get(); > > > > // Install example1 in the local maven repo before to do this > > KieContainer kContainer = > ks.newKieContainer(ks.newReleaseId("org.drools", "named-kiesession", > "6.0.0-SNAPSHOT")); > > > > KieSession kSession = kContainer.newKieSession("ksession1"); > > kSession.setGlobal("out", out); > > > > Object msg1 = createMessage(kContainer, "Dave", "Hello, HAL. Do > you read me, HAL?"); > > kSession.insert(msg1); > > kSession.fireAllRules(); > > } > > > > Thanks & Regards, > > Rupesh > > > DISCLAIMER: "The information in this e-mail and any attachment is > intended only for the person to whom it is addressed and may contain > confidential and/or privileged material. If you have received this e-mail > in error, kindly contact the sender and destroy all copies of the original > communication. IBS makes no warranty, express or implied, nor guarantees > the accuracy, adequacy or completeness of the information contained in this > email or any attachment and is not liable for any errors, defects, > omissions, viruses or for resultant loss or damage, if any, direct or > indirect." > > _______________________________________________ > rules-users mailing list > rules-users at lists.jboss.org > https://lists.jboss.org/mailman/listinfo/rules-users > -- Edson Tirelli Principal Software Engineer Red Hat Business Systems and Intelligence Group -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.jboss.org/pipermail/rules-users/attachments/20131216/d95d0149/attachment.html From dsotty at gmail.com Mon Dec 16 14:36:25 2013 From: dsotty at gmail.com (Davide Sottara) Date: Mon, 16 Dec 2013 12:36:25 -0700 Subject: [rules-users] permgen leak In-Reply-To: <1387189626968-4027321.post@n3.nabble.com> References: <1386013302159-4027052.post@n3.nabble.com> <79CC380D-332C-4510-96E3-0C1FCF231D92@codehaus.org> <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> Message-ID: <52AF5639.5060507@gmail.com> The fix was merged this morning in 5.6.0-SNAPSHOT. It requires an explicit disposal of both the KnowledgeBuilder and the KnowledgeBase once you are done with them: KnowledgeBuilder builder = ... KnowledgeBase kBase = ... ... ( (KnowledgeBuilderImpl) builder ).dispose(); ... // create, use and dispose sessions here ( (KnowledgeBaseImpl) kBase ).dispose(); Of course you need appropriate initial/max permgen to allocate at least the largest KB. I didn't have time to check the combinations, but based on your JVM you may also need to enable the following options: -XX:+CMSClassUnloadingEnabled -XX:+UseConcMarkSweepGC With these explicit calls, the permgen test that was posted in this thread works as expected, as class(loaders) are released and the permgen is GC-ed. As anticipated, 6.x does not have this problem. Davide On 12/16/2013 03:27 AM, pmander wrote: > Hi, > > You mention that the brand new kbase evertime could be a problem and you may > get this from "re-deployments". In my situation I am not in an app server > and so do not have a re-deployment issue but I am creating a new kbase every > time I run through the system. > > The system dynamically creates the drl from database definitions and this is > done for each "run" of the application. Is there an alternative for this? > > > > -- > View this message in context: http://drools.46999.n3.nabble.com/permgen-leak-tp4027038p4027321.html > Sent from the Drools: User forum mailing list archive at Nabble.com. > _______________________________________________ > rules-users mailing list > rules-users at lists.jboss.org > https://lists.jboss.org/mailman/listinfo/rules-users > From rupesh.gopinathan at ibsplc.com Tue Dec 17 00:30:09 2013 From: rupesh.gopinathan at ibsplc.com (Rupesh M G) Date: Tue, 17 Dec 2013 05:30:09 +0000 Subject: [rules-users] Drools 6 MBeans not getting listed in Oracle JConsole Message-ID: <85C0DCE544FC0948BCF39A3CB17CF1C76090646D@PBOX2.ibsplc.com> Hi Edson, Thanks for the reply. I'm attaching two maven projects from the drools 6 samples. The named-kiesession project should be first installed to maven. The kiecontainer-from-kierepo project will fetch the module from the local maven repository. The class KieContainerFromKieRepoExample loops inserting facts to the working memory, at an interval of 3 seconds. My expectation is to see the org.drools hierarchy in the MBeans tab of JConsole. The JVM arguments are as follows. JConsole was started locally. -Ddrools.mbeans=enabled -Dcom.sun.management.jmxremote.port=19988 -Dcom.sun.management.jmxremote.ssl=false -Dcom.sun.management.jmxremote.authenticate=false Regards, Rupesh DISCLAIMER: "The information in this e-mail and any attachment is intended only for the person to whom it is addressed and may contain confidential and/or privileged material. If you have received this e-mail in error, kindly contact the sender and destroy all copies of the original communication. IBS makes no warranty, express or implied, nor guarantees the accuracy, adequacy or completeness of the information contained in this email or any attachment and is not liable for any errors, defects, omissions, viruses or for resultant loss or damage, if any, direct or indirect." -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.jboss.org/pipermail/rules-users/attachments/20131217/f835eedf/attachment-0001.html -------------- next part -------------- A non-text attachment was scrubbed... Name: jconsole-tester.zip Type: application/x-zip-compressed Size: 11704 bytes Desc: jconsole-tester.zip Url : http://lists.jboss.org/pipermail/rules-users/attachments/20131217/f835eedf/attachment-0001.bin From m1e1r1r1y at 163.com Tue Dec 17 01:34:38 2013 From: m1e1r1r1y at 163.com (merry0900) Date: Mon, 16 Dec 2013 22:34:38 -0800 (PST) Subject: [rules-users] how to use dynamic drl file in drools 6 In-Reply-To: References: <1387097757223-4027306.post@n3.nabble.com> Message-ID: <17235b85.9eec.142ff4328e1.Coremail.m1e1r1r1y@163.com> 3q,verymuch At 2013-12-16 03:52:08,"Mark Proctor [via Drools]" wrote: Each update must be rebuilt and repackaged in a JAR - the JAR is our unit of deployment, and unit of update. You can either rebuild that using the maven plugin, or you can rebuild it at runtime using the programmatic api. Either way make sure you remember to increase the version. http://docs.jboss.org/drools/release/6.0.0.Final/drools-docs/html/KIEChapter.html#KIEExamplesSection 4.2.5.10. Programaticaly build a KieModule using Meta Models (how to build the jar) 4.2.5.6. Default KieSession from File (how to load the jar at runtime) One you have the jar, add it to the KieRepository. And then you can call KieContainer.updateToVersion( String ReleaseID ) If you are using kie-ci the jar can be placed in your local m2_repo, where it will be resolved automatically. Note you cannot put jars on the class path, that you then want to dynamically update at runtime. Mark On 15 Dec 2013, at 08:55, merry0900 <[hidden email]> wrote: > drools 6 has a great advance from drools5. > I am a begginer of both drools 5 and drools6. > My question is that I don't know how to impliment dynamic drl which means > my drl?rule? file may change during the running of my app since in drools 6 > target a drl file like this: > > xmlns="http://jboss.org/kie/6.0.0/kmodule"> > > > > > .................... > > this file is located in src/main/resources/META-INF/kmodule.xml. > And then the drl file will be packaged in the jar file. > > when i want to change my drl file, how can i do. note:i don't want to > rebuild my java source to jar. > > for any help? thank you all, from china. > > > > -- > View this message in context: http://drools.46999.n3.nabble.com/how-to-use-dynamic-drl-file-in-drools-6-tp4027306.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/how-to-use-dynamic-drl-file-in-drools-6-tp4027306p4027311.html To unsubscribe from how to use dynamic drl file in drools 6, click here. NAML -- View this message in context: http://drools.46999.n3.nabble.com/how-to-use-dynamic-drl-file-in-drools-6-tp4027306p4027328.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/20131216/2ad3d379/attachment.html From wolfgang.laun at gmail.com Tue Dec 17 01:58:33 2013 From: wolfgang.laun at gmail.com (Wolfgang Laun) Date: Tue, 17 Dec 2013 07:58:33 +0100 Subject: [rules-users] Refence manual In-Reply-To: References: Message-ID: If I understand this correctly then my confusion was caused by the appearance of a command that's required to run an example in the Drools distribution environment along with the discussion of the (more or less) generic code to use for, say, the programmatic build and run of a KieSession, which I managed to do, without Maven. - It seems that it is necessary to use Maven for using one of the more sophisticated build and deploy scenarios, but this is currently covered by the indistinctive "mvn install". Thanks for the explanation -W On 16/12/2013, Mark Proctor wrote: > ?mvn install? builds the JAR, and in the case of the KIE Examples runs the > unit test demonstrating the JAR being used. ?mvn compile? would probably be > enough too. > > Whether you use Maven, or the in memory builder api, it always results in a > JAR as the deployable unit. Updates are always done via a JAR. > > Mark > On 16 Dec 2013, at 07:09, Wolfgang Laun wrote: > >> Reading >> drools-distribution-6.0.0.Final/reference_manual/html_single/index.html, >> section 4.2.5., Build, Deploy and Utilize Examples, I get the >> improssion that you have to use the incantation >> >> mvn install >> >> in *any* case as it occurs with each and every example. Surely that >> can't be right...? >> >> -W >> _______________________________________________ >> 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 anijit.sarkar at gmail.com Tue Dec 17 07:37:19 2013 From: anijit.sarkar at gmail.com (anij) Date: Tue, 17 Dec 2013 04:37:19 -0800 (PST) Subject: [rules-users] Drools 6 : unable to login to kie-drools-wb-distribution-wars-6.0.0.Final-jboss-as7.0 Message-ID: <1387283839514-4027334.post@n3.nabble.com> I download the *kie-drools-wb-distribution-6.0.0.Final.zip* and deployed the *kie-drools-wb-distribution-wars-6.0.0.Final-jboss-as7.0.war* in *jboss-as-7.1.1.Final* in standalone mode. Now, when I'm tring to login using default username : admin password: admin. It's saying Login failed: Invalid UserName or Password Log is showing this error message. 17:38:30,683 ERROR [org.jboss.security.authentication.JBossCachedAuthenticationManager] (http--127.0.0.1-8080-1) Login failure: javax.security.auth.login.FailedLoginException: Password Incorrect/Password Required at org.jboss.security.auth.spi.UsernamePasswordLoginModule.login(UsernamePasswordLoginModule.java:270) [picketbox-4.0.7.Final.jar:4.0.7.Final] at org.jboss.security.auth.spi.UsersRolesLoginModule.login(UsersRolesLoginModule.java:155) [picketbox-4.0.7.Final.jar:4.0.7.Final] at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) [rt.jar:1.7.0_21] at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57) [rt.jar:1.7.0_21] at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) [rt.jar:1.7.0_21] at java.lang.reflect.Method.invoke(Method.java:601) [rt.jar:1.7.0_21] at javax.security.auth.login.LoginContext.invoke(LoginContext.java:784) [rt.jar:1.7.0_21] at javax.security.auth.login.LoginContext.access$000(LoginContext.java:203) [rt.jar:1.7.0_21] at javax.security.auth.login.LoginContext$4.run(LoginContext.java:698) [rt.jar:1.7.0_21] at javax.security.auth.login.LoginContext$4.run(LoginContext.java:696) [rt.jar:1.7.0_21] at java.security.AccessController.doPrivileged(Native Method) [rt.jar:1.7.0_21] at javax.security.auth.login.LoginContext.invokePriv(LoginContext.java:695) [rt.jar:1.7.0_21] at javax.security.auth.login.LoginContext.login(LoginContext.java:594) [rt.jar:1.7.0_21] at org.jboss.security.authentication.JBossCachedAuthenticationManager.defaultLogin(JBossCachedAuthenticationManager.java:449) [picketbox-infinispan-4.0.7.Final.jar:4.0.7.Final] at org.jboss.security.authentication.JBossCachedAuthenticationManager.proceedWithJaasLogin(JBossCachedAuthenticationManager.java:383) [picketbox-infinispan-4.0.7.Final.jar:4.0.7.Final] at org.jboss.security.authentication.JBossCachedAuthenticationManager.authenticate(JBossCachedAuthenticationManager.java:371) [picketbox-infinispan-4.0.7.Final.jar:4.0.7.Final] at org.jboss.security.authentication.JBossCachedAuthenticationManager.isValid(JBossCachedAuthenticationManager.java:160) [picketbox-infinispan-4.0.7.Final.jar:4.0.7.Final] at org.jboss.as.web.security.JBossWebRealm.authenticate(JBossWebRealm.java:214) [jboss-as-web-7.1.1.Final.jar:7.1.1.Final] at org.apache.catalina.authenticator.FormAuthenticator.authenticate(FormAuthenticator.java:280) [jbossweb-7.0.13.Final.jar:] at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:381) [jbossweb-7.0.13.Final.jar:] at org.jboss.as.web.security.SecurityContextAssociationValve.invoke(SecurityContextAssociationValve.java:153) [jboss-as-web-7.1.1.Final.jar:7.1.1.Final] at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:155) [jbossweb-7.0.13.Final.jar:] at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:102) [jbossweb-7.0.13.Final.jar:] at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109) [jbossweb-7.0.13.Final.jar:] at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:368) [jbossweb-7.0.13.Final.jar:] at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:877) [jbossweb-7.0.13.Final.jar:] at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:671) [jbossweb-7.0.13.Final.jar:] at org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:930) [jbossweb-7.0.13.Final.jar:] at java.lang.Thread.run(Thread.java:722) [rt.jar:1.7.0_21] -- View this message in context: http://drools.46999.n3.nabble.com/Drools-6-unable-to-login-to-kie-drools-wb-distribution-wars-6-0-0-Final-jboss-as7-0-tp4027334.html Sent from the Drools: User forum mailing list archive at Nabble.com. From michael.anstis at gmail.com Tue Dec 17 08:24:14 2013 From: michael.anstis at gmail.com (Michael Anstis) Date: Tue, 17 Dec 2013 13:24:14 +0000 Subject: [rules-users] Drools 6 : unable to login to kie-drools-wb-distribution-wars-6.0.0.Final-jboss-as7.0 In-Reply-To: <1387283839514-4027334.post@n3.nabble.com> References: <1387283839514-4027334.post@n3.nabble.com> Message-ID: Did you create a user with add-user.sh? Realm = application User Name = admin Password = whatever you like Role = admin or analyst On 17 December 2013 12:37, anij wrote: > I download the *kie-drools-wb-distribution-6.0.0.Final.zip* and deployed > the > *kie-drools-wb-distribution-wars-6.0.0.Final-jboss-as7.0.war* in > *jboss-as-7.1.1.Final* in standalone mode. Now, when I'm tring to login > using default username : admin password: admin. It's saying Login failed: > Invalid UserName or Password > > Log is showing this error message. > > 17:38:30,683 ERROR > [org.jboss.security.authentication.JBossCachedAuthenticationManager] > (http--127.0.0.1-8080-1) Login failure: > javax.security.auth.login.FailedLoginException: Password Incorrect/Password > Required > at > > org.jboss.security.auth.spi.UsernamePasswordLoginModule.login(UsernamePasswordLoginModule.java:270) > [picketbox-4.0.7.Final.jar:4.0.7.Final] > at > > org.jboss.security.auth.spi.UsersRolesLoginModule.login(UsersRolesLoginModule.java:155) > [picketbox-4.0.7.Final.jar:4.0.7.Final] > at > sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) > [rt.jar:1.7.0_21] > at > > sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57) > [rt.jar:1.7.0_21] > at > > sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) > [rt.jar:1.7.0_21] > at > java.lang.reflect.Method.invoke(Method.java:601) [rt.jar:1.7.0_21] > at > javax.security.auth.login.LoginContext.invoke(LoginContext.java:784) > [rt.jar:1.7.0_21] > at > javax.security.auth.login.LoginContext.access$000(LoginContext.java:203) > [rt.jar:1.7.0_21] > at > javax.security.auth.login.LoginContext$4.run(LoginContext.java:698) > [rt.jar:1.7.0_21] > at > javax.security.auth.login.LoginContext$4.run(LoginContext.java:696) > [rt.jar:1.7.0_21] > at > java.security.AccessController.doPrivileged(Native Method) > [rt.jar:1.7.0_21] > at > javax.security.auth.login.LoginContext.invokePriv(LoginContext.java:695) > [rt.jar:1.7.0_21] > at > javax.security.auth.login.LoginContext.login(LoginContext.java:594) > [rt.jar:1.7.0_21] > at > > org.jboss.security.authentication.JBossCachedAuthenticationManager.defaultLogin(JBossCachedAuthenticationManager.java:449) > [picketbox-infinispan-4.0.7.Final.jar:4.0.7.Final] > at > > org.jboss.security.authentication.JBossCachedAuthenticationManager.proceedWithJaasLogin(JBossCachedAuthenticationManager.java:383) > [picketbox-infinispan-4.0.7.Final.jar:4.0.7.Final] > at > > org.jboss.security.authentication.JBossCachedAuthenticationManager.authenticate(JBossCachedAuthenticationManager.java:371) > [picketbox-infinispan-4.0.7.Final.jar:4.0.7.Final] > at > > org.jboss.security.authentication.JBossCachedAuthenticationManager.isValid(JBossCachedAuthenticationManager.java:160) > [picketbox-infinispan-4.0.7.Final.jar:4.0.7.Final] > at > > org.jboss.as.web.security.JBossWebRealm.authenticate(JBossWebRealm.java:214) > [jboss-as-web-7.1.1.Final.jar:7.1.1.Final] > at > > org.apache.catalina.authenticator.FormAuthenticator.authenticate(FormAuthenticator.java:280) > [jbossweb-7.0.13.Final.jar:] > at > > org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:381) > [jbossweb-7.0.13.Final.jar:] > at > > org.jboss.as.web.security.SecurityContextAssociationValve.invoke(SecurityContextAssociationValve.java:153) > [jboss-as-web-7.1.1.Final.jar:7.1.1.Final] > at > > org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:155) > [jbossweb-7.0.13.Final.jar:] > at > > org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:102) > [jbossweb-7.0.13.Final.jar:] > at > > org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109) > [jbossweb-7.0.13.Final.jar:] > at > org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:368) > [jbossweb-7.0.13.Final.jar:] > at > org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:877) > [jbossweb-7.0.13.Final.jar:] > at > > org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:671) > [jbossweb-7.0.13.Final.jar:] > at > org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:930) > [jbossweb-7.0.13.Final.jar:] > at java.lang.Thread.run(Thread.java:722) > [rt.jar:1.7.0_21] > > > > > -- > View this message in context: > http://drools.46999.n3.nabble.com/Drools-6-unable-to-login-to-kie-drools-wb-distribution-wars-6-0-0-Final-jboss-as7-0-tp4027334.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/20131217/9826a34a/attachment-0001.html From ge0ffrey.spam at gmail.com Tue Dec 17 08:26:39 2013 From: ge0ffrey.spam at gmail.com (Geoffrey De Smet) Date: Tue, 17 Dec 2013 14:26:39 +0100 Subject: [rules-users] Drools 6 : unable to login to kie-drools-wb-distribution-wars-6.0.0.Final-jboss-as7.0 In-Reply-To: <1387283839514-4027334.post@n3.nabble.com> References: <1387283839514-4027334.post@n3.nabble.com> Message-ID: <52B0510F.5010306@gmail.com> Duplicates http://stackoverflow.com/questions/20633908/unable-to-login-to-kie-drools-wb-distribution-wars-6-0-0-final-jboss-as7-0 On 17-12-13 13:37, anij wrote: > I download the *kie-drools-wb-distribution-6.0.0.Final.zip* and deployed the > *kie-drools-wb-distribution-wars-6.0.0.Final-jboss-as7.0.war* in > *jboss-as-7.1.1.Final* in standalone mode. Now, when I'm tring to login > using default username : admin password: admin. It's saying Login failed: > Invalid UserName or Password > > Log is showing this error message. > > 17:38:30,683 ERROR > [org.jboss.security.authentication.JBossCachedAuthenticationManager] > (http--127.0.0.1-8080-1) Login failure: > javax.security.auth.login.FailedLoginException: Password Incorrect/Password > Required > at > org.jboss.security.auth.spi.UsernamePasswordLoginModule.login(UsernamePasswordLoginModule.java:270) > [picketbox-4.0.7.Final.jar:4.0.7.Final] > at > org.jboss.security.auth.spi.UsersRolesLoginModule.login(UsersRolesLoginModule.java:155) > [picketbox-4.0.7.Final.jar:4.0.7.Final] > at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) > [rt.jar:1.7.0_21] > at > sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57) > [rt.jar:1.7.0_21] > at > sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) > [rt.jar:1.7.0_21] > at java.lang.reflect.Method.invoke(Method.java:601) [rt.jar:1.7.0_21] > at javax.security.auth.login.LoginContext.invoke(LoginContext.java:784) > [rt.jar:1.7.0_21] > at > javax.security.auth.login.LoginContext.access$000(LoginContext.java:203) > [rt.jar:1.7.0_21] > at javax.security.auth.login.LoginContext$4.run(LoginContext.java:698) > [rt.jar:1.7.0_21] > at javax.security.auth.login.LoginContext$4.run(LoginContext.java:696) > [rt.jar:1.7.0_21] > at java.security.AccessController.doPrivileged(Native Method) > [rt.jar:1.7.0_21] > at > javax.security.auth.login.LoginContext.invokePriv(LoginContext.java:695) > [rt.jar:1.7.0_21] > at javax.security.auth.login.LoginContext.login(LoginContext.java:594) > [rt.jar:1.7.0_21] > at > org.jboss.security.authentication.JBossCachedAuthenticationManager.defaultLogin(JBossCachedAuthenticationManager.java:449) > [picketbox-infinispan-4.0.7.Final.jar:4.0.7.Final] > at > org.jboss.security.authentication.JBossCachedAuthenticationManager.proceedWithJaasLogin(JBossCachedAuthenticationManager.java:383) > [picketbox-infinispan-4.0.7.Final.jar:4.0.7.Final] > at > org.jboss.security.authentication.JBossCachedAuthenticationManager.authenticate(JBossCachedAuthenticationManager.java:371) > [picketbox-infinispan-4.0.7.Final.jar:4.0.7.Final] > at > org.jboss.security.authentication.JBossCachedAuthenticationManager.isValid(JBossCachedAuthenticationManager.java:160) > [picketbox-infinispan-4.0.7.Final.jar:4.0.7.Final] > at > org.jboss.as.web.security.JBossWebRealm.authenticate(JBossWebRealm.java:214) > [jboss-as-web-7.1.1.Final.jar:7.1.1.Final] > at > org.apache.catalina.authenticator.FormAuthenticator.authenticate(FormAuthenticator.java:280) > [jbossweb-7.0.13.Final.jar:] > at > org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:381) > [jbossweb-7.0.13.Final.jar:] > at > org.jboss.as.web.security.SecurityContextAssociationValve.invoke(SecurityContextAssociationValve.java:153) > [jboss-as-web-7.1.1.Final.jar:7.1.1.Final] > at > org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:155) > [jbossweb-7.0.13.Final.jar:] > at > org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:102) > [jbossweb-7.0.13.Final.jar:] > at > org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109) > [jbossweb-7.0.13.Final.jar:] > at > org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:368) > [jbossweb-7.0.13.Final.jar:] > at > org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:877) > [jbossweb-7.0.13.Final.jar:] > at > org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:671) > [jbossweb-7.0.13.Final.jar:] > at > org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:930) > [jbossweb-7.0.13.Final.jar:] > at java.lang.Thread.run(Thread.java:722) [rt.jar:1.7.0_21] > > > > > -- > View this message in context: http://drools.46999.n3.nabble.com/Drools-6-unable-to-login-to-kie-drools-wb-distribution-wars-6-0-0-Final-jboss-as7-0-tp4027334.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 Tue Dec 17 09:00:38 2013 From: adarsh.chaini at hsbcib.com (adarsh.chaini at hsbcib.com) Date: Tue, 17 Dec 2013 14:00:38 +0000 Subject: [rules-users] Drools KB Object hierarchy Serilisation and Deserialisation thread safety issue In-Reply-To: <52ACB776.1040503@gmail.com> References: <52ACB776.1040503@gmail.com> Message-ID: 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 ************************************************************ -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.jboss.org/pipermail/rules-users/attachments/20131217/80ff9f0f/attachment-0001.html From jguenth at co.pierce.wa.us Tue Dec 17 18:31:21 2013 From: jguenth at co.pierce.wa.us (jguenth) Date: Tue, 17 Dec 2013 15:31:21 -0800 (PST) Subject: [rules-users] kie-wb 6.0.0 tomcat7: Error uploading maven jar that is part of a multi-module maven project Message-ID: <1387323081497-4027338.post@n3.nabble.com> I'm trying to upload a maven jar artifact using the Artifact Repository and getting the parse error below. Here is my maven project structure... parent_pom (packaging: pom) |_module1_parent_pom (packaging: pom) | |_module1a (packaging: jar) | |_module1b (packaging: jar) | |_module1c (packaging: jar) |_module2_parent_pom (packaging: pom) |_module2a (packaging: jar) |_module2b (packaging: jar) |_module2c (packaging: jar) For example, I'm trying to upload the module1a jar. This project is built using Apache Maven 3.0.4. Is this type of multi-module project supported in kie-wb 6.0.0? Dec 17, 2013 11:27:56 AM org.apache.catalina.core.StandardWrapperValve invoke SEVERE: Servlet.service() for servlet [M2RepoFileServlet] in context with path [/kie-drools-wb] threw exception java.lang.RuntimeException: Unable to parse File 'pom.xml' at org.drools.compiler.kproject.xml.MinimalPomParser.parse(MinimalPomParser.java:44) at org.drools.compiler.kproject.xml.PomModel$Parser.parse(PomModel.java:65) at org.guvnor.m2repo.backend.server.FileServlet.uploadFile(FileServlet.java:154) at org.guvnor.m2repo.backend.server.FileServlet.processUpload(FileServlet.java:84) at org.guvnor.m2repo.backend.server.FileServlet.doPost(FileServlet.java:70) at javax.servlet.http.HttpServlet.service(HttpServlet.java:647) at javax.servlet.http.HttpServlet.service(HttpServlet.java:728) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:305) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:210) at org.jboss.solder.servlet.exception.CatchExceptionFilter.doFilter(CatchExceptionFilter.java:65) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:243) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:210) at org.jboss.solder.servlet.event.ServletEventBridgeFilter.doFilter(ServletEventBridgeFilter.java:74) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:243) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:210) at org.jbpm.designer.web.filter.impl.PluggableFilter.doFilter(PluggableFilter.java:70) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:243) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:210) at org.uberfire.security.server.UberFireSecurityFilter.doFilter(UberFireSecurityFilter.java:266) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:243) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:210) at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:222) at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:123) at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:472) at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:171) at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:99) at org.kie.integration.tomcat.JACCValve.invoke(JACCValve.java:93) at org.apache.catalina.valves.AccessLogValve.invoke(AccessLogValve.java:936) at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:118) at org.apache.catalina.valves.RemoteIpValve.invoke(RemoteIpValve.java:680) at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:407) at org.apache.coyote.http11.AbstractHttp11Processor.process(AbstractHttp11Processor.java:1004) at org.apache.coyote.AbstractProtocol$AbstractConnectionHandler.process(AbstractProtocol.java:589) at org.apache.tomcat.util.net.JIoEndpoint$SocketProcessor.run(JIoEndpoint.java:312) at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145) at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615) at java.lang.Thread.run(Thread.java:724) Caused by: org.xml.sax.SAXParseException; Premature end of file. at org.apache.xerces.util.ErrorHandlerWrapper.createSAXParseException(Unknown Source) at org.apache.xerces.util.ErrorHandlerWrapper.fatalError(Unknown Source) at org.apache.xerces.impl.XMLErrorReporter.reportError(Unknown Source) at org.apache.xerces.impl.XMLErrorReporter.reportError(Unknown Source) at org.apache.xerces.impl.XMLErrorReporter.reportError(Unknown Source) at org.apache.xerces.impl.XMLVersionDetector.determineDocVersion(Unknown Source) at org.apache.xerces.parsers.XML11Configuration.parse(Unknown Source) at org.apache.xerces.parsers.XML11Configuration.parse(Unknown Source) at org.apache.xerces.parsers.XMLParser.parse(Unknown Source) at org.apache.xerces.parsers.AbstractSAXParser.parse(Unknown Source) at org.apache.xerces.jaxp.SAXParserImpl$JAXPSAXParser.parse(Unknown Source) at org.apache.xerces.jaxp.SAXParserImpl.parse(Unknown Source) at javax.xml.parsers.SAXParser.parse(SAXParser.java:195) at org.drools.compiler.kproject.xml.MinimalPomParser.parse(MinimalPomParser.java:42) ... 36 more -- View this message in context: http://drools.46999.n3.nabble.com/kie-wb-6-0-0-tomcat7-Error-uploading-maven-jar-that-is-part-of-a-multi-module-maven-project-tp4027338.html Sent from the Drools: User forum mailing list archive at Nabble.com. From mproctor at codehaus.org Tue Dec 17 20:49:04 2013 From: mproctor at codehaus.org (Mark Proctor) Date: Wed, 18 Dec 2013 01:49:04 +0000 Subject: [rules-users] kie-wb 6.0.0 tomcat7: Error uploading maven jar that is part of a multi-module maven project In-Reply-To: <1387323081497-4027338.post@n3.nabble.com> References: <1387323081497-4027338.post@n3.nabble.com> Message-ID: <22E6CB21-48D6-4B34-A3E3-21B70E9A29B4@codehaus.org> it?s hard to see what the problem is. The parser is failing, but it?s now showing where a bouts - i.e. inside of the wrapped exception. Here is the MinimalPomParser: https://github.com/droolsjbpm/drools/blob/master/drools-compiler/src/main/java/org/drools/compiler/kproject/xml/MinimalPomParser.java We?d need to know which part o the parser is causing it to break. A copy of the pom.xml might help. It could potentially be that the minimal pom parser does not work with multi project jars (not sure). The work around for now should deb to place kie-ci on the class path, and then it?ll use the full maven parser instead.. Mark On 17 Dec 2013, at 23:31, jguenth wrote: > I'm trying to upload a maven jar artifact using the Artifact Repository and > getting the parse error below. > > Here is my maven project structure... > > parent_pom (packaging: pom) > |_module1_parent_pom (packaging: pom) > | |_module1a (packaging: jar) > | |_module1b (packaging: jar) > | |_module1c (packaging: jar) > |_module2_parent_pom (packaging: pom) > |_module2a (packaging: jar) > |_module2b (packaging: jar) > |_module2c (packaging: jar) > > For example, I'm trying to upload the module1a jar. This project is built > using Apache Maven 3.0.4. Is this type of multi-module project supported in > kie-wb 6.0.0? > > Dec 17, 2013 11:27:56 AM org.apache.catalina.core.StandardWrapperValve > invoke > SEVERE: Servlet.service() for servlet [M2RepoFileServlet] in context with > path [/kie-drools-wb] threw exception > java.lang.RuntimeException: Unable to parse File 'pom.xml' > at > org.drools.compiler.kproject.xml.MinimalPomParser.parse(MinimalPomParser.java:44) > at org.drools.compiler.kproject.xml.PomModel$Parser.parse(PomModel.java:65) > at > org.guvnor.m2repo.backend.server.FileServlet.uploadFile(FileServlet.java:154) > at > org.guvnor.m2repo.backend.server.FileServlet.processUpload(FileServlet.java:84) > at org.guvnor.m2repo.backend.server.FileServlet.doPost(FileServlet.java:70) > at javax.servlet.http.HttpServlet.service(HttpServlet.java:647) > at javax.servlet.http.HttpServlet.service(HttpServlet.java:728) > at > org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:305) > at > org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:210) > at > org.jboss.solder.servlet.exception.CatchExceptionFilter.doFilter(CatchExceptionFilter.java:65) > at > org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:243) > at > org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:210) > at > org.jboss.solder.servlet.event.ServletEventBridgeFilter.doFilter(ServletEventBridgeFilter.java:74) > at > org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:243) > at > org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:210) > at > org.jbpm.designer.web.filter.impl.PluggableFilter.doFilter(PluggableFilter.java:70) > at > org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:243) > at > org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:210) > at > org.uberfire.security.server.UberFireSecurityFilter.doFilter(UberFireSecurityFilter.java:266) > at > org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:243) > at > org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:210) > at > org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:222) > at > org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:123) > at > org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:472) > at > org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:171) > at > org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:99) > at org.kie.integration.tomcat.JACCValve.invoke(JACCValve.java:93) > at > org.apache.catalina.valves.AccessLogValve.invoke(AccessLogValve.java:936) > at > org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:118) > at org.apache.catalina.valves.RemoteIpValve.invoke(RemoteIpValve.java:680) > at > org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:407) > at > org.apache.coyote.http11.AbstractHttp11Processor.process(AbstractHttp11Processor.java:1004) > at > org.apache.coyote.AbstractProtocol$AbstractConnectionHandler.process(AbstractProtocol.java:589) > at > org.apache.tomcat.util.net.JIoEndpoint$SocketProcessor.run(JIoEndpoint.java:312) > at > java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145) > at > java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615) > at java.lang.Thread.run(Thread.java:724) > Caused by: org.xml.sax.SAXParseException; Premature end of file. > at > org.apache.xerces.util.ErrorHandlerWrapper.createSAXParseException(Unknown > Source) > at org.apache.xerces.util.ErrorHandlerWrapper.fatalError(Unknown Source) > at org.apache.xerces.impl.XMLErrorReporter.reportError(Unknown Source) > at org.apache.xerces.impl.XMLErrorReporter.reportError(Unknown Source) > at org.apache.xerces.impl.XMLErrorReporter.reportError(Unknown Source) > at org.apache.xerces.impl.XMLVersionDetector.determineDocVersion(Unknown > Source) > at org.apache.xerces.parsers.XML11Configuration.parse(Unknown Source) > at org.apache.xerces.parsers.XML11Configuration.parse(Unknown Source) > at org.apache.xerces.parsers.XMLParser.parse(Unknown Source) > at org.apache.xerces.parsers.AbstractSAXParser.parse(Unknown Source) > at org.apache.xerces.jaxp.SAXParserImpl$JAXPSAXParser.parse(Unknown Source) > at org.apache.xerces.jaxp.SAXParserImpl.parse(Unknown Source) > at javax.xml.parsers.SAXParser.parse(SAXParser.java:195) > at > org.drools.compiler.kproject.xml.MinimalPomParser.parse(MinimalPomParser.java:42) > ... 36 more > > > > > -- > View this message in context: http://drools.46999.n3.nabble.com/kie-wb-6-0-0-tomcat7-Error-uploading-maven-jar-that-is-part-of-a-multi-module-maven-project-tp4027338.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 Wed Dec 18 01:03:10 2013 From: anijit.sarkar at gmail.com (anij) Date: Tue, 17 Dec 2013 22:03:10 -0800 (PST) Subject: [rules-users] Drools 6 : unable to login to kie-drools-wb-distribution-wars-6.0.0.Final-jboss-as7.0 In-Reply-To: References: <1387283839514-4027334.post@n3.nabble.com> Message-ID: <1387346590919-4027340.post@n3.nabble.com> Thanks manstis, Its working fine after adding user. -- View this message in context: http://drools.46999.n3.nabble.com/Drools-6-unable-to-login-to-kie-drools-wb-distribution-wars-6-0-0-Final-jboss-as7-0-tp4027334p4027340.html Sent from the Drools: User forum mailing list archive at Nabble.com. From nelson.wan at hotmail.com Wed Dec 18 02:03:51 2013 From: nelson.wan at hotmail.com (nelson.wan) Date: Tue, 17 Dec 2013 23:03:51 -0800 (PST) Subject: [rules-users] Exception when executing drools-wb-jcr2vfs-migration Message-ID: <1387350230991-4027341.post@n3.nabble.com> We defined a lot of rules using Drools 5.5.0. Since Drools 6 has been released, we used "drools-wb-jcr2vfs-migration" script to migrate the repository from 5.5.0 to 6. The script generated exception during execution. It said modules migrated. But when migrating categories, it fails. Hope to seek advice. Below is the output with errors: D:\Austin\drools-wb-jcr2vfs-migration-core-6.0.0.Final\bin>runMigration.bat Migration started. Reading from inputJcrRepository ({D:\Austin\drools-wb-jcr2vfs-migration-core-6.0.0.Final\bin\inputJcr}). Module migration started =============== session-guest-4 Module [ForrestGumpSample] migrated. Module [com.austin.callmethod] migrated. Module [com.austin.complex] migrated. Module [com.austin.scorecard] migrated. Module [com.austin.test] migrated. Module [com.austin.testRep] migrated. Module [com.austin.workitem] migrated. Module [com.boc.demo] migrated. Module [com.boc.riskmgmt.drools.florence] migrated. Module [com.boc.riskmgmt.drools.florence2] migrated. Module [com.boc.riskmgmt.nelson] migrated. Module [com.declarative.test] migrated. Module [com.demo.strata] migrated. Module [com.philip] migrated. Module [defaultPackage] migrated. =============== session-guest-4 Global migrated. Module migration ended Category migration started =============== session-guest-4 =============== session-guest-4 =============== session-guest-4 =============== session-guest-4 =============== session-guest-4 org.drools.repository.RulesRepositoryException: Unable to load the category : [M_Model] does not exist. at org.drools.repository.RulesRepository.loadCategory(RulesRepository.java:1098) at org.drools.repository.RulesRepository$Proxy$_$$_WeldClientProxy.loadCategory(RulesRepository$Proxy$_$$_WeldClientProxy.java) at org.drools.guvnor.server.RepositoryCategoryOperations.loadChildCategories(RepositoryCategoryOperations.java:64) 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 org.jboss.weld.bean.proxy.AbstractBeanInstance.invoke(AbstractBeanInstance.java:45) at org.jboss.weld.bean.proxy.ProxyMethodHandler.invoke(ProxyMethodHandler.java:105) at org.drools.guvnor.server.RepositoryCategoryOperations$Proxy$_$$_WeldClientProxy.loadChildCategories(RepositoryCategoryOperations$Proxy$_$$_WeldClientProxy.java) at org.drools.guvnor.server.RepositoryCategoryService.loadChildCategories(RepositoryCategoryService.java:54) at org.drools.guvnor.server.RepositoryCategoryService$Proxy$_$$_WeldClientProxy.loadChildCategories(RepositoryCategoryService$Proxy$_$$_WeldClientProxy.java) at org.drools.workbench.jcr2vfsmigration.migrater.CategoryMigrater.loadChildCategories(CategoryMigrater.java:42) at org.drools.workbench.jcr2vfsmigration.migrater.CategoryMigrater.loadChildCategories(CategoryMigrater.java:49) at org.drools.workbench.jcr2vfsmigration.migrater.CategoryMigrater.loadChildCategories(CategoryMigrater.java:49) at org.drools.workbench.jcr2vfsmigration.migrater.CategoryMigrater.migrateAll(CategoryMigrater.java:34) at org.drools.workbench.jcr2vfsmigration.migrater.CategoryMigrater$Proxy$_$$_WeldClientProxy.migrateAll(CategoryMigrater$Proxy$_$$_WeldClientProxy.java) at org.drools.workbench.jcr2vfsmigration.Jcr2VfsMigrater.migrateAll(Jcr2VfsMigrater.java:90) at org.drools.workbench.jcr2vfsmigration.Jcr2VfsMigrater$Proxy$_$$_WeldClientProxy.migrateAll(Jcr2VfsMigrater$Proxy$_$$_WeldClientProxy.java) at org.drools.workbench.jcr2vfsmigration.Jcr2VfsMigrationApp.migrate(Jcr2VfsMigrationApp.java:64) at org.drools.workbench.jcr2vfsmigration.Jcr2VfsMigrationApp.run(Jcr2VfsMigrationApp.java:52) at org.drools.workbench.jcr2vfsmigration.Jcr2VfsMigrationApp.main(Jcr2VfsMigrationApp.java:37) Caused by: javax.jcr.PathNotFoundException: M_Model at org.apache.jackrabbit.core.NodeImpl$8.perform(NodeImpl.java:2135) at org.apache.jackrabbit.core.NodeImpl$8.perform(NodeImpl.java:2129) at org.apache.jackrabbit.core.session.SessionState.perform(SessionState.java:200) at org.apache.jackrabbit.core.ItemImpl.perform(ItemImpl.java:91) at org.apache.jackrabbit.core.NodeImpl.getNode(NodeImpl.java:2129) at org.drools.repository.RulesRepository.loadCategory(RulesRepository.java:1088) ... 21 more Migration ended with errors. Written into outputVfsRepository ({D:\Austin\drools-wb-jcr2vfs-migration-core-6.0.0.Final\bin\outputVfs}). -- View this message in context: http://drools.46999.n3.nabble.com/Exception-when-executing-drools-wb-jcr2vfs-migration-tp4027341.html Sent from the Drools: User forum mailing list archive at Nabble.com. From michael.anstis at gmail.com Wed Dec 18 02:16:57 2013 From: michael.anstis at gmail.com (Michael Anstis) Date: Wed, 18 Dec 2013 07:16:57 +0000 Subject: [rules-users] Exception when executing drools-wb-jcr2vfs-migration In-Reply-To: <1387350230991-4027341.post@n3.nabble.com> References: <1387350230991-4027341.post@n3.nabble.com> Message-ID: That'll be a bug. Can you raise a JIRA for GUVNOR and attach your JCR repository? Sent on the move On 18 Dec 2013 07:04, "nelson.wan" wrote: > > We defined a lot of rules using Drools 5.5.0. > > Since Drools 6 has been released, we used "drools-wb-jcr2vfs-migration" > script to migrate the repository from 5.5.0 to 6. > > The script generated exception during execution. > It said modules migrated. But when migrating categories, it fails. > Hope to seek advice. Below is the output with errors: > > D:\Austin\drools-wb-jcr2vfs-migration-core-6.0.0.Final\bin>runMigration.bat > > Migration started. Reading from inputJcrRepository > ({D:\Austin\drools-wb-jcr2vfs-migration-core-6.0.0.Final\bin\inputJcr}). > Module migration started > =============== session-guest-4 > Module [ForrestGumpSample] migrated. > Module [com.austin.callmethod] migrated. > Module [com.austin.complex] migrated. > Module [com.austin.scorecard] migrated. > Module [com.austin.test] migrated. > Module [com.austin.testRep] migrated. > Module [com.austin.workitem] migrated. > Module [com.boc.demo] migrated. > Module [com.boc.riskmgmt.drools.florence] migrated. > Module [com.boc.riskmgmt.drools.florence2] migrated. > Module [com.boc.riskmgmt.nelson] migrated. > Module [com.declarative.test] migrated. > Module [com.demo.strata] migrated. > Module [com.philip] migrated. > Module [defaultPackage] migrated. > =============== session-guest-4 > Global migrated. > Module migration ended > Category migration started > =============== session-guest-4 > =============== session-guest-4 > =============== session-guest-4 > =============== session-guest-4 > =============== session-guest-4 > org.drools.repository.RulesRepositoryException: Unable to load the category > : [M_Model] does not exist. > at > > org.drools.repository.RulesRepository.loadCategory(RulesRepository.java:1098) > at > > org.drools.repository.RulesRepository$Proxy$_$$_WeldClientProxy.loadCategory(RulesRepository$Proxy$_$$_WeldClientProxy.java) > at > > org.drools.guvnor.server.RepositoryCategoryOperations.loadChildCategories(RepositoryCategoryOperations.java:64) > 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 > > org.jboss.weld.bean.proxy.AbstractBeanInstance.invoke(AbstractBeanInstance.java:45) > at > > org.jboss.weld.bean.proxy.ProxyMethodHandler.invoke(ProxyMethodHandler.java:105) > at > > org.drools.guvnor.server.RepositoryCategoryOperations$Proxy$_$$_WeldClientProxy.loadChildCategories(RepositoryCategoryOperations$Proxy$_$$_WeldClientProxy.java) > at > > org.drools.guvnor.server.RepositoryCategoryService.loadChildCategories(RepositoryCategoryService.java:54) > at > > org.drools.guvnor.server.RepositoryCategoryService$Proxy$_$$_WeldClientProxy.loadChildCategories(RepositoryCategoryService$Proxy$_$$_WeldClientProxy.java) > at > > org.drools.workbench.jcr2vfsmigration.migrater.CategoryMigrater.loadChildCategories(CategoryMigrater.java:42) > at > > org.drools.workbench.jcr2vfsmigration.migrater.CategoryMigrater.loadChildCategories(CategoryMigrater.java:49) > at > > org.drools.workbench.jcr2vfsmigration.migrater.CategoryMigrater.loadChildCategories(CategoryMigrater.java:49) > at > > org.drools.workbench.jcr2vfsmigration.migrater.CategoryMigrater.migrateAll(CategoryMigrater.java:34) > at > > org.drools.workbench.jcr2vfsmigration.migrater.CategoryMigrater$Proxy$_$$_WeldClientProxy.migrateAll(CategoryMigrater$Proxy$_$$_WeldClientProxy.java) > > at > > org.drools.workbench.jcr2vfsmigration.Jcr2VfsMigrater.migrateAll(Jcr2VfsMigrater.java:90) > at > > org.drools.workbench.jcr2vfsmigration.Jcr2VfsMigrater$Proxy$_$$_WeldClientProxy.migrateAll(Jcr2VfsMigrater$Proxy$_$$_WeldClientProxy.java) > at > > org.drools.workbench.jcr2vfsmigration.Jcr2VfsMigrationApp.migrate(Jcr2VfsMigrationApp.java:64) > at > > org.drools.workbench.jcr2vfsmigration.Jcr2VfsMigrationApp.run(Jcr2VfsMigrationApp.java:52) > at > > org.drools.workbench.jcr2vfsmigration.Jcr2VfsMigrationApp.main(Jcr2VfsMigrationApp.java:37) > Caused by: javax.jcr.PathNotFoundException: M_Model > at > org.apache.jackrabbit.core.NodeImpl$8.perform(NodeImpl.java:2135) > at > org.apache.jackrabbit.core.NodeImpl$8.perform(NodeImpl.java:2129) > at > > org.apache.jackrabbit.core.session.SessionState.perform(SessionState.java:200) > at org.apache.jackrabbit.core.ItemImpl.perform(ItemImpl.java:91) > at org.apache.jackrabbit.core.NodeImpl.getNode(NodeImpl.java:2129) > at > > org.drools.repository.RulesRepository.loadCategory(RulesRepository.java:1088) > ... 21 more > Migration ended with errors. Written into outputVfsRepository > ({D:\Austin\drools-wb-jcr2vfs-migration-core-6.0.0.Final\bin\outputVfs}). > > > > > -- > View this message in context: > http://drools.46999.n3.nabble.com/Exception-when-executing-drools-wb-jcr2vfs-migration-tp4027341.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/20131218/b9b89be0/attachment-0001.html From dsotty at gmail.com Wed Dec 18 02:41:54 2013 From: dsotty at gmail.com (Davide Sottara) Date: Wed, 18 Dec 2013 00:41:54 -0700 Subject: [rules-users] Drools KB Object hierarchy Serilisation and Deserialisation thread safety issue In-Reply-To: References: <52ACB776.1040503@gmail.com> Message-ID: <52B151C2.7030301@gmail.com> 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 CR1stands for in 5.6.0.CR1and > can someone point me to the release life cycle timelines?. > Also the important aspect is are 5.6.0.CR1and *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 -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.jboss.org/pipermail/rules-users/attachments/20131218/a7af9147/attachment-0001.html From stephen.masters at me.com Wed Dec 18 04:18:43 2013 From: stephen.masters at me.com (Stephen Masters) Date: Wed, 18 Dec 2013 09:18:43 +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: My experience switching a small project from 5.5.0.Final to 5.6.0.CR1 a few days ago, was that the only thing I had to do was change the Drools version number in my Maven pom.xml. It is a fairly simple project though, so it doesn?t exercise a great deal of the platform. On 18 Dec 2013, at 07:41, Davide Sottara wrote: > 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 -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.jboss.org/pipermail/rules-users/attachments/20131218/4e7798cc/attachment-0001.html From rich.j.riley at gmail.com Wed Dec 18 05:52:50 2013 From: rich.j.riley at gmail.com (rjr201) Date: Wed, 18 Dec 2013 02:52:50 -0800 (PST) Subject: [rules-users] drools.package ResourceType? Message-ID: <1387363970897-4027345.post@n3.nabble.com> Hi, I'm embedding Guvnor using the BRL Edition Mode. I'm then grabbing the BRL code and adding it to the KnowledgeBuilder. I'm also loading the object model jar using a class loader. This works fine if all the classes the rule is using are at the root of the object model jar. My question is, can I add the class imports (what the package.drools file does in guvnor) programmatically using KnowledgeBuilder, so my object model doesn't have to be flat? I was hoping there would be a ResourceType for drools.package, so I could do something like kbuilder.add("import package.classname", ResourceType.?), but can't seem to find one. Hopefully that makes some kind of sense to someone.. Any help on this would be greatly appreciated. Rich. -- View this message in context: http://drools.46999.n3.nabble.com/drools-package-ResourceType-tp4027345.html Sent from the Drools: User forum mailing list archive at Nabble.com. From michael.anstis at gmail.com Wed Dec 18 05:56:08 2013 From: michael.anstis at gmail.com (Michael Anstis) Date: Wed, 18 Dec 2013 10:56:08 +0000 Subject: [rules-users] drools.package ResourceType? In-Reply-To: <1387363970897-4027345.post@n3.nabble.com> References: <1387363970897-4027345.post@n3.nabble.com> Message-ID: HI, drools.package was a Guvnor 5.5 (and prior) specific file used to add imports to rules etc generated inside the application. It has no analogy within drools-core itself. Drools Workbench 6.0 adds imports to the files themselves so does not need this additional helper file. With kind regards, Mike On 18 December 2013 10:52, rjr201 wrote: > Hi, > > I'm embedding Guvnor using the BRL Edition Mode. I'm then grabbing the BRL > code and adding it to the KnowledgeBuilder. I'm also loading the object > model jar using a class loader. This works fine if all the classes the rule > is using are at the root of the object model jar. > > My question is, can I add the class imports (what the package.drools file > does in guvnor) programmatically using KnowledgeBuilder, so my object model > doesn't have to be flat? I was hoping there would be a ResourceType for > drools.package, so I could do something like kbuilder.add("import > package.classname", ResourceType.?), but can't seem to find one. > > Hopefully that makes some kind of sense to someone.. > > Any help on this would be greatly appreciated. > Rich. > > > > > -- > View this message in context: > http://drools.46999.n3.nabble.com/drools-package-ResourceType-tp4027345.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/20131218/4cfeba31/attachment.html From adarsh.chaini at hsbcib.com Wed Dec 18 06:04:36 2013 From: adarsh.chaini at hsbcib.com (adarsh.chaini at hsbcib.com) Date: Wed, 18 Dec 2013 11:04:36 +0000 Subject: [rules-users] Drools KB Object hierarchy Serialisation and Deserialisation thread safety issue In-Reply-To: <52B151C2.7030301@gmail.com> References: <52ACB776.1040503@gmail.com> <52B151C2.7030301@gmail.com> Message-ID: Also remember that even 5.6, while a bit more robust from that perspective, is not guaranteed to be 100% thread safe. Is there a document that details this robustness and what has changed ?. 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. On above , what is the time line from deprecation to complete removal in future versions?. How easy it is to migrate from the rule flow to the jbpmn? .Is there a quick migration procedure/tool. 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 ************************************************************ ************************************************************ 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 ************************************************************ -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.jboss.org/pipermail/rules-users/attachments/20131218/9098b033/attachment-0001.html From rich.j.riley at gmail.com Wed Dec 18 06:14:04 2013 From: rich.j.riley at gmail.com (rjr201) Date: Wed, 18 Dec 2013 03:14:04 -0800 (PST) Subject: [rules-users] drools.package ResourceType? In-Reply-To: References: <1387363970897-4027345.post@n3.nabble.com> Message-ID: <1387365244392-4027348.post@n3.nabble.com> Hi Mantis, thanks for your response. I'm using kbuilder.add(ruleResource, ResourceType.BRL); The BRL source code I grabbed from the embedded guvnor window doesn't have explicit path names on the classes that it's using. For example, if the class was packagename.Person it just has Person. Which means it tells me it doesn't recognise the class when I add it to class builder. I was wondering if there was a way round this? If not, it's not necessarily the end of the world to have to put everything in the root of the objectmodel jar. PS I realise that messing around with BRL stuff outside of Guvnor is not a nice way to have to do things, but I've got my hands tied a bit with what I can do (I'd much rather be using all the cool stuff I've been reading about in 6!) -- View this message in context: http://drools.46999.n3.nabble.com/drools-package-ResourceType-tp4027345p4027348.html Sent from the Drools: User forum mailing list archive at Nabble.com. From michael.anstis at gmail.com Wed Dec 18 06:32:36 2013 From: michael.anstis at gmail.com (Michael Anstis) Date: Wed, 18 Dec 2013 11:32:36 +0000 Subject: [rules-users] drools.package ResourceType? In-Reply-To: <1387365244392-4027348.post@n3.nabble.com> References: <1387363970897-4027345.post@n3.nabble.com> <1387365244392-4027348.post@n3.nabble.com> Message-ID: Hello, Unfortunately Guvnor 5.5 (and prior) only uses that file when (1) building the package and creating the PKG file, and (2) when validating a rule. More unfortunately (for you) there is no direct means to retrieve the drools.package file either with REST (that I assume you're using for the BRL rule). You could retrieve the whole package source (IIRC something like /package/{packageName}/source) and parse it for imports, but it's a long winded way especially if the package is large. That said it's only a one-off need; once you've parsed the imports you can keep them locally. With kind regards, Mike On 18 December 2013 11:14, rjr201 wrote: > Hi Mantis, thanks for your response. > > I'm using kbuilder.add(ruleResource, ResourceType.BRL); > > The BRL source code I grabbed from the embedded guvnor window doesn't have > explicit path names on the classes that it's using. For example, if the > class was packagename.Person it just has Person. Which means it tells me it > doesn't recognise the class when I add it to class builder. I was wondering > if there was a way round this? If not, it's not necessarily the end of the > world to have to put everything in the root of the objectmodel jar. > > PS I realise that messing around with BRL stuff outside of Guvnor is not a > nice way to have to do things, but I've got my hands tied a bit with what I > can do (I'd much rather be using all the cool stuff I've been reading about > in 6!) > > > > -- > View this message in context: > http://drools.46999.n3.nabble.com/drools-package-ResourceType-tp4027345p4027348.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/20131218/0ed9d60f/attachment.html From wolfgang.laun at gmail.com Wed Dec 18 06:44:30 2013 From: wolfgang.laun at gmail.com (Wolfgang Laun) Date: Wed, 18 Dec 2013 12:44:30 +0100 Subject: [rules-users] drools.package ResourceType? In-Reply-To: <1387365244392-4027348.post@n3.nabble.com> References: <1387363970897-4027345.post@n3.nabble.com> <1387365244392-4027348.post@n3.nabble.com> Message-ID: If this "BRL source code" is more or less the same as DRL, it should be possible to prepend a few lines containing import statements. -W On 18/12/2013, rjr201 wrote: > Hi Mantis, thanks for your response. > > I'm using kbuilder.add(ruleResource, ResourceType.BRL); > > The BRL source code I grabbed from the embedded guvnor window doesn't have > explicit path names on the classes that it's using. For example, if the > class was packagename.Person it just has Person. Which means it tells me it > doesn't recognise the class when I add it to class builder. I was wondering > if there was a way round this? If not, it's not necessarily the end of the > world to have to put everything in the root of the objectmodel jar. > > PS I realise that messing around with BRL stuff outside of Guvnor is not a > nice way to have to do things, but I've got my hands tied a bit with what I > can do (I'd much rather be using all the cool stuff I've been reading about > in 6!) > > > > -- > View this message in context: > http://drools.46999.n3.nabble.com/drools-package-ResourceType-tp4027345p4027348.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 rich.j.riley at gmail.com Wed Dec 18 06:58:45 2013 From: rich.j.riley at gmail.com (rjr201) Date: Wed, 18 Dec 2013 03:58:45 -0800 (PST) Subject: [rules-users] drools.package ResourceType? In-Reply-To: References: <1387363970897-4027345.post@n3.nabble.com> <1387365244392-4027348.post@n3.nabble.com> Message-ID: <1387367925182-4027351.post@n3.nabble.com> Thanks very much for both your responses. I've realised that I can add a DRL file to the kbuilder that just has the imports in it. These imports are then picked up by any BRL resources that are added. It's a bit of a hack, but this seems to be working. Thanks again for your responses. -- View this message in context: http://drools.46999.n3.nabble.com/drools-package-ResourceType-tp4027345p4027351.html Sent from the Drools: User forum mailing list archive at Nabble.com. From rupesh.gopinathan at ibsplc.com Wed Dec 18 07:41:07 2013 From: rupesh.gopinathan at ibsplc.com (Rupesh M G) Date: Wed, 18 Dec 2013 12:41:07 +0000 Subject: [rules-users] FW: Drools 6 MBeans not getting listed in Oracle JConsole In-Reply-To: <85C0DCE544FC0948BCF39A3CB17CF1C76090646D@PBOX2.ibsplc.com> References: <85C0DCE544FC0948BCF39A3CB17CF1C76090646D@PBOX2.ibsplc.com> Message-ID: <85C0DCE544FC0948BCF39A3CB17CF1C7609066DB@PBOX2.ibsplc.com> Hi Edson, Were you able to check and reproduce the issue? The maven projects are attached. Regards, Rupesh From: rules-users-bounces at lists.jboss.org [mailto:rules-users-bounces at lists.jboss.org] On Behalf Of Rupesh M G Sent: 17 December 2013 11:00 To: rules-users at lists.jboss.org Subject: Re: [rules-users] Drools 6 MBeans not getting listed in Oracle JConsole Hi Edson, Thanks for the reply. I'm attaching two maven projects from the drools 6 samples. The named-kiesession project should be first installed to maven. The kiecontainer-from-kierepo project will fetch the module from the local maven repository. The class KieContainerFromKieRepoExample loops inserting facts to the working memory, at an interval of 3 seconds. My expectation is to see the org.drools hierarchy in the MBeans tab of JConsole. The JVM arguments are as follows. JConsole was started locally. -Ddrools.mbeans=enabled -Dcom.sun.management.jmxremote.port=19988 -Dcom.sun.management.jmxremote.ssl=false -Dcom.sun.management.jmxremote.authenticate=false Regards, Rupesh DISCLAIMER: "The information in this e-mail and any attachment is intended only for the person to whom it is addressed and may contain confidential and/or privileged material. If you have received this e-mail in error, kindly contact the sender and destroy all copies of the original communication. IBS makes no warranty, express or implied, nor guarantees the accuracy, adequacy or completeness of the information contained in this email or any attachment and is not liable for any errors, defects, omissions, viruses or for resultant loss or damage, if any, direct or indirect." Rupesh, This should be working. Can you provide me with a self-contained project in eclipse or a test case that I can reproduce/verify here? We have another cut tomorrow, so if you read this and can provide me with a test case before tomorrow EOD, I can check and make sure it is working. Thanks, Edson On Mon, Dec 16, 2013 at 3:47 AM, Rupesh M G > wrote: Hi, JConsole (of Oracle JDK 1.7) is not listing the drools expert 6 mbeans. I tried the following Drools 6 sample KieContainerFromKieRepoExample. I set the JVM option -Ddrools.mbeans=enabled, but JConsole did not list the mbeans. When I tried the same in a Drools 5.5 sample, the mbeans were listed in JConsole. Is it a bug in Drools expert 6? Or did I miss any required step for 6? Please help. public void go(PrintStream out) { KieServices ks = KieServices.Factory.get(); // Install example1 in the local maven repo before to do this KieContainer kContainer = ks.newKieContainer(ks.newReleaseId("org.drools", "named-kiesession", "6.0.0-SNAPSHOT")); KieSession kSession = kContainer.newKieSession("ksession1"); kSession.setGlobal("out", out); Object msg1 = createMessage(kContainer, "Dave", "Hello, HAL. Do you read me, HAL?"); kSession.insert(msg1); kSession.fireAllRules(); } Thanks & Regards, Rupesh DISCLAIMER: "The information in this e-mail and any attachment is intended only for the person to whom it is addressed and may contain confidential and/or privileged material. If you have received this e-mail in error, kindly contact the sender and destroy all copies of the original communication. IBS makes no warranty, express or implied, nor guarantees the accuracy, adequacy or completeness of the information contained in this email or any attachment and is not liable for any errors, defects, omissions, viruses or for resultant loss or damage, if any, direct or indirect." _______________________________________________ rules-users mailing list rules-users at lists.jboss.org https://lists.jboss.org/mailman/listinfo/rules-users -- Edson Tirelli Principal Software Engineer Red Hat Business Systems and Intelligence Group DISCLAIMER: "The information in this e-mail and any attachment is intended only for the person to whom it is addressed and may contain confidential and/or privileged material. If you have received this e-mail in error, kindly contact the sender and destroy all copies of the original communication. IBS makes no warranty, express or implied, nor guarantees the accuracy, adequacy or completeness of the information contained in this email or any attachment and is not liable for any errors, defects, omissions, viruses or for resultant loss or damage, if any, direct or indirect." -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.jboss.org/pipermail/rules-users/attachments/20131218/c40f935b/attachment-0001.html -------------- next part -------------- A non-text attachment was scrubbed... Name: jconsole-tester.zip Type: application/x-zip-compressed Size: 11704 bytes Desc: jconsole-tester.zip Url : http://lists.jboss.org/pipermail/rules-users/attachments/20131218/c40f935b/attachment-0001.bin -------------- next part -------------- An embedded and charset-unspecified text was scrubbed... Name: ATT00002.txt Url: http://lists.jboss.org/pipermail/rules-users/attachments/20131218/c40f935b/attachment-0001.txt From mario.fusco at gmail.com Wed Dec 18 10:51:22 2013 From: mario.fusco at gmail.com (Mario Fusco) Date: Wed, 18 Dec 2013 07:51:22 -0800 (PST) Subject: [rules-users] kie-wb 6.0.0 tomcat7: Error uploading maven jar that is part of a multi-module maven project In-Reply-To: <1387323081497-4027338.post@n3.nabble.com> References: <1387323081497-4027338.post@n3.nabble.com> Message-ID: <1387381882320-4027353.post@n3.nabble.com> Hi, the MinimalPomParser is an xml parser we developed internally to cover the most common and straightforward cases, but very likely it is unable to parse the multi-module pom you're using. However adding the kie-ci module to your dependencies ( https://github.com/droolsjbpm/drools/tree/master/kie-ci ) automatically allows drools to use the native maven pom parser that should support your use case. To cut it short adding this to your dependencies should resolve your problem. org.kie kie-ci I hope this helps, Mario -- View this message in context: http://drools.46999.n3.nabble.com/kie-wb-6-0-0-tomcat7-Error-uploading-maven-jar-that-is-part-of-a-multi-module-maven-project-tp4027338p4027353.html Sent from the Drools: User forum mailing list archive at Nabble.com. From michael.anstis at gmail.com Wed Dec 18 11:32:25 2013 From: michael.anstis at gmail.com (Michael Anstis) Date: Wed, 18 Dec 2013 16:32:25 +0000 Subject: [rules-users] kie-wb 6.0.0 tomcat7: Error uploading maven jar that is part of a multi-module maven project In-Reply-To: <1387381882320-4027353.post@n3.nabble.com> References: <1387323081497-4027338.post@n3.nabble.com> <1387381882320-4027353.post@n3.nabble.com> Message-ID: The problem is that the OP is uploading the JAR to kie-wb. This is where the error is thrown: https://github.com/droolsjbpm/guvnor/blob/master/guvnor-m2repo-editor/guvnor-m2repo-editor-backend/src/main/java/org/guvnor/m2repo/backend/server/FileServlet.java#L154 Would this use the Maven Native Parser if on the classpath? We have kie-ci as a dependency of guvnor-m2repo-editor-backend already. With kind regards, Mike On 18 December 2013 15:51, Mario Fusco wrote: > Hi, > > the MinimalPomParser is an xml parser we developed internally to cover the > most common and straightforward cases, but very likely it is unable to > parse > the multi-module pom you're using. > > However adding the kie-ci module to your dependencies ( > https://github.com/droolsjbpm/drools/tree/master/kie-ci ) automatically > allows drools to use the native maven pom parser that should support your > use case. > > To cut it short adding this to your dependencies should resolve your > problem. > > org.kie > kie-ci > > I hope this helps, > Mario > > > > > -- > View this message in context: > http://drools.46999.n3.nabble.com/kie-wb-6-0-0-tomcat7-Error-uploading-maven-jar-that-is-part-of-a-multi-module-maven-project-tp4027338p4027353.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/20131218/19a11faf/attachment.html From jguenth at co.pierce.wa.us Wed Dec 18 17:23:20 2013 From: jguenth at co.pierce.wa.us (jguenth) Date: Wed, 18 Dec 2013 14:23:20 -0800 (PST) Subject: [rules-users] kie-wb 6.0.0 tomcat7: Error uploading maven jar that is part of a multi-module maven project In-Reply-To: References: <1387323081497-4027338.post@n3.nabble.com> <1387381882320-4027353.post@n3.nabble.com> Message-ID: <1387405400333-4027356.post@n3.nabble.com> Yes, I'm trying to upload the JAR to the kie-wb maven repository via the kie-wb Artifact Repository page. Since the kie-ci module is already on the webapps classpath, I assume there are no other work-arounds to try. I debugged the MinimalPomParser method below and found the InputStream passed in was a ByteArrayInputStream with a count of 10038 and it's position was also 10038; as if it had already been read to end of file. While in debug, I set the position to zero and let it continue. Sure enough, it uploaded succesfully! static PomModel parse(String path, InputStream is) { MinimalPomParser handler = new MinimalPomParser(); try { SAXParserFactory factory = SAXParserFactory.newInstance(); factory.setValidating( false ); factory.setNamespaceAware( false ); SAXParser parser = factory.newSAXParser(); parser.parse( is, handler ); } catch (Exception e) { throw new RuntimeException("Unable to parse File '" + path + "'", e); } Perhaps something is reading the InputStream before calling the parse method and not creating a new InputStream to parse. Unfortunately, I keep getting the error below when I try to add a drools rule to my project. It is also failing in the MinimalPomParser because of the same problem above. "Unable to complete your request. The following exception occurred: org.kie.scanner.embedder.MavenEmbedderException: Failed to read artifact descriptor for org.piercecountywa.linx.core:domain:jar:1.8.0-SNAPSHOT." Regards, Jay -- View this message in context: http://drools.46999.n3.nabble.com/kie-wb-6-0-0-tomcat7-Error-uploading-maven-jar-that-is-part-of-a-multi-module-maven-project-tp4027338p4027356.html Sent from the Drools: User forum mailing list archive at Nabble.com. From michael.anstis at gmail.com Wed Dec 18 17:28:16 2013 From: michael.anstis at gmail.com (Michael Anstis) Date: Wed, 18 Dec 2013 22:28:16 +0000 Subject: [rules-users] kie-wb 6.0.0 tomcat7: Error uploading maven jar that is part of a multi-module maven project In-Reply-To: <1387405400333-4027356.post@n3.nabble.com> References: <1387323081497-4027338.post@n3.nabble.com> <1387381882320-4027353.post@n3.nabble.com> <1387405400333-4027356.post@n3.nabble.com> Message-ID: Can you provide your JAR? On 18 December 2013 22:23, jguenth wrote: > Yes, I'm trying to upload the JAR to the kie-wb maven repository via the > kie-wb Artifact Repository page. Since the kie-ci module is already on the > webapps classpath, I assume there are no other work-arounds to try. > > I debugged the MinimalPomParser method below and found the InputStream > passed in was a ByteArrayInputStream with a count of 10038 and it's > position > was also 10038; as if it had already been read to end of file. While in > debug, I set the position to zero and let it continue. Sure enough, it > uploaded succesfully! > > static PomModel parse(String path, InputStream is) { > MinimalPomParser handler = new MinimalPomParser(); > try { > SAXParserFactory factory = SAXParserFactory.newInstance(); > factory.setValidating( false ); > factory.setNamespaceAware( false ); > > SAXParser parser = factory.newSAXParser(); > parser.parse( is, handler ); > } catch (Exception e) { > throw new RuntimeException("Unable to parse File '" + path + > "'", e); > } > > Perhaps something is reading the InputStream before calling the parse > method > and not creating a new InputStream to parse. > > Unfortunately, I keep getting the error below when I try to add a drools > rule to my project. It is also failing in the MinimalPomParser because of > the same problem above. > > "Unable to complete your request. The following exception occurred: > org.kie.scanner.embedder.MavenEmbedderException: Failed to read artifact > descriptor for org.piercecountywa.linx.core:domain:jar:1.8.0-SNAPSHOT." > > Regards, > Jay > > > > -- > View this message in context: > http://drools.46999.n3.nabble.com/kie-wb-6-0-0-tomcat7-Error-uploading-maven-jar-that-is-part-of-a-multi-module-maven-project-tp4027338p4027356.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/20131218/b15c13fc/attachment.html From jguenth at co.pierce.wa.us Wed Dec 18 17:44:06 2013 From: jguenth at co.pierce.wa.us (Jay Guenthard) Date: Wed, 18 Dec 2013 14:44:06 -0800 Subject: [rules-users] kie-wb 6.0.0 tomcat7: Error uploading maven jar that is part of a multi-module maven project In-Reply-To: References: <1387323081497-4027338.post@n3.nabble.com> <1387381882320-4027353.post@n3.nabble.com> <1387405400333-4027356.post@n3.nabble.com> Message-ID: <5771C3609AD364488FB327B129E663FC0F6E5474B8@MBVCMS1.ad.co.pierce.wa.us> Unfortunately, I cannot. I will try to create a bogus multi-module project to replicate the problem and send it instead. From: rules-users-bounces at lists.jboss.org [mailto:rules-users-bounces at lists.jboss.org] On Behalf Of Michael Anstis Sent: Wednesday, December 18, 2013 2:28 PM To: Rules Users List Subject: Re: [rules-users] kie-wb 6.0.0 tomcat7: Error uploading maven jar that is part of a multi-module maven project Can you provide your JAR? -- View this message in context: http://drools.46999.n3.nabble.com/kie-wb-6-0-0-tomcat7-Error-uploading-maven-jar-that-is-part-of-a-multi-module-maven-project-tp4027338p4027356.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/20131218/9230c1ea/attachment.html From wtang at kana.com Wed Dec 18 19:40:52 2013 From: wtang at kana.com (wtang) Date: Wed, 18 Dec 2013 16:40:52 -0800 (PST) Subject: [rules-users] separating .drl declare type from actual .drl rule into each own file Message-ID: <1387413651817-4027359.post@n3.nabble.com> I have a .drl rule file with many declare in it to define my own types. I compile this file every time. I want to separate the declare types out of its own file since the types don't change and just leave the rules in the original .drl file. I create my own declares.drl and pulled all the declare from the rule.drl file and inside the rule.drl file I just did import. While my declares.drl file compile with no errors, I am getting types not resolve error from my .drl file event thought I have the import. Does drool support the separation of types into its own file and rule file just refer to those declared types? -- View this message in context: http://drools.46999.n3.nabble.com/separating-drl-declare-type-from-actual-drl-rule-into-each-own-file-tp4027359.html Sent from the Drools: User forum mailing list archive at Nabble.com. From jguenth at co.pierce.wa.us Wed Dec 18 19:44:19 2013 From: jguenth at co.pierce.wa.us (jguenth) Date: Wed, 18 Dec 2013 16:44:19 -0800 (PST) Subject: [rules-users] kie-wb 6.0.0 tomcat7: Error uploading maven jar that is part of a multi-module maven project In-Reply-To: <5771C3609AD364488FB327B129E663FC0F6E5474B8@MBVCMS1.ad.co.pierce.wa.us> References: <1387323081497-4027338.post@n3.nabble.com> <1387381882320-4027353.post@n3.nabble.com> <1387405400333-4027356.post@n3.nabble.com> <5771C3609AD364488FB327B129E663FC0F6E5474B8@MBVCMS1.ad.co.pierce.wa.us> Message-ID: <1387413859893-4027360.post@n3.nabble.com> Here is a simple multi-module maven project that causes the error. test-import.tar.gz Do a mvn clean install in the test-import directory and then try to upload the test-import-domain-0.0.1-SNAPSHOT.jar from your local maven repository. It will be at /org/piercecountywa/test/test-import-domain/0.0.1-SNAPSHOT Thanks, Jay -- View this message in context: http://drools.46999.n3.nabble.com/kie-wb-6-0-0-tomcat7-Error-uploading-maven-jar-that-is-part-of-a-multi-module-maven-project-tp4027338p4027360.html Sent from the Drools: User forum mailing list archive at Nabble.com. From dsotty at gmail.com Wed Dec 18 20:22:04 2013 From: dsotty at gmail.com (Davide Sottara) Date: Wed, 18 Dec 2013 18:22:04 -0700 Subject: [rules-users] separating .drl declare type from actual .drl rule into each own file In-Reply-To: <1387413651817-4027359.post@n3.nabble.com> References: <1387413651817-4027359.post@n3.nabble.com> Message-ID: <52B24A3C.7040707@gmail.com> It is supported, but you must be careful when you compile the DRL resources. You will have to compile the declares first and ensure that the classloader is set correctly. The easiest way to achieve this is to use the CompositeKnowledgeBuilder: KnowledgeBuilder kbuilder = KnowledgeBuilderFactory.newKnowledgeBuilder(); kbuilder.batch() .add( ResourceFactory.newByteArrayResource( declares.getBytes() ), ResourceType.DRL ) .add( ResourceFactory.newByteArrayResource( rules.getBytes() ), ResourceType.DRL ) .build(); KnowledgeBase kbase = KnowledgeBaseFactory.newKnowledgeBase(); kbase.addKnowledgePackages( kbuilder.getKnowledgePackages() ); Adjust the number and type of resources as needed. Notice that this feature is only available in more recent versions. If you want/need to use an older one, could you please specify which version and post the snippet of code you are using to build the KB? Thanks! Davide On 12/18/2013 05:40 PM, wtang wrote: > I have a .drl rule file with many declare in it to define my own types. I > compile this file every time. I want to separate the declare types out of > its own file since the types don't change and just leave the rules in the > original .drl file. > > I create my own declares.drl and pulled all the declare from the rule.drl > file and inside the rule.drl file I just did import. While my declares.drl > file compile with no errors, I am getting types not resolve error from my > .drl file event thought I have the import. > > Does drool support the separation of types into its own file and rule file > just refer to those declared types? > > > > -- > View this message in context: http://drools.46999.n3.nabble.com/separating-drl-declare-type-from-actual-drl-rule-into-each-own-file-tp4027359.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/20131218/c07f313a/attachment.html From bhochhi at aol.com Thu Dec 19 00:39:18 2013 From: bhochhi at aol.com (bhochhi) Date: Wed, 18 Dec 2013 21:39:18 -0800 (PST) Subject: [rules-users] how to check error using knowledgeAgent when rules has error or doesn't compile In-Reply-To: <1386780846350-4027221.post@n3.nabble.com> References: <1386780846350-4027221.post@n3.nabble.com> Message-ID: <1387431558616-4027362.post@n3.nabble.com> Got this working. I was adding the listener at wrong place. thanks -- View this message in context: http://drools.46999.n3.nabble.com/how-to-check-error-using-knowledgeAgent-when-rules-has-error-or-doesn-t-compile-tp4027221p4027362.html Sent from the Drools: User forum mailing list archive at Nabble.com. From wtang at kana.com Thu Dec 19 02:54:51 2013 From: wtang at kana.com (wtang) Date: Wed, 18 Dec 2013 23:54:51 -0800 (PST) Subject: [rules-users] separating .drl declare type from actual .drl rule into each own file In-Reply-To: <52B24A3C.7040707@gmail.com> References: <1387413651817-4027359.post@n3.nabble.com> <52B24A3C.7040707@gmail.com> Message-ID: <1387439691316-4027363.post@n3.nabble.com> Thanks David, but I am not at the code level yet. I am using latest version 6.0. In the declares.drl I have: package com.sample declare Person first : String; last : String; address: Address end in the userDeclare.drl I have a rule using Person in the when clause but it does not compile on the drools Ecliple plugin saying it can no resolve the person object. import com.sample.* rule "Hello World" when Person(first == "Wing") then System.out.println("hello"); end -- View this message in context: http://drools.46999.n3.nabble.com/separating-drl-declare-type-from-actual-drl-rule-into-each-own-file-tp4027359p4027363.html Sent from the Drools: User forum mailing list archive at Nabble.com. From michael.anstis at gmail.com Thu Dec 19 03:16:07 2013 From: michael.anstis at gmail.com (Michael Anstis) Date: Thu, 19 Dec 2013 08:16:07 +0000 Subject: [rules-users] separating .drl declare type from actual .drl rule into each own file In-Reply-To: <1387439691316-4027363.post@n3.nabble.com> References: <1387413651817-4027359.post@n3.nabble.com> <52B24A3C.7040707@gmail.com> <1387439691316-4027363.post@n3.nabble.com> Message-ID: You'd need the include the package header in the rule file. On 19 December 2013 07:54, wtang wrote: > Thanks David, but I am not at the code level yet. I am using latest > version > 6.0. > > In the declares.drl I have: > > package com.sample > > declare Person > first : String; > last : String; > address: Address > end > > in the userDeclare.drl I have a rule using Person in the when clause but it > does not compile on the drools Ecliple plugin saying it can no resolve the > person object. > > import com.sample.* > > rule "Hello World" > when > Person(first == "Wing") > then > System.out.println("hello"); > end > > > > > > -- > View this message in context: > http://drools.46999.n3.nabble.com/separating-drl-declare-type-from-actual-drl-rule-into-each-own-file-tp4027359p4027363.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/20131219/17dacc4b/attachment.html From rich.j.riley at gmail.com Thu Dec 19 06:58:48 2013 From: rich.j.riley at gmail.com (rjr201) Date: Thu, 19 Dec 2013 03:58:48 -0800 (PST) Subject: [rules-users] Drools performance In-Reply-To: <1387401089537-4027355.post@n3.nabble.com> References: <1387401089537-4027355.post@n3.nabble.com> Message-ID: <1387454328399-4027366.post@n3.nabble.com> tsi42013 wrote > "If drools is set to read 1000 events per second, it will lose a few in > the way" Where did you read that? -- View this message in context: http://drools.46999.n3.nabble.com/Drools-performance-tp4027355p4027366.html Sent from the Drools: User forum mailing list archive at Nabble.com. From wolfgang.laun at gmail.com Thu Dec 19 07:07:21 2013 From: wolfgang.laun at gmail.com (laune) Date: Thu, 19 Dec 2013 04:07:21 -0800 (PST) Subject: [rules-users] Drools performance In-Reply-To: <1387401089537-4027355.post@n3.nabble.com> References: <1387401089537-4027355.post@n3.nabble.com> Message-ID: <1387454841265-4027367.post@n3.nabble.com> You can't "set Drools to read N events per second". Performance depends on several factors, so asking for "how many events" doesn't make sense. Benchmark. Who should "admit" a delay? -W -- View this message in context: http://drools.46999.n3.nabble.com/Drools-performance-tp4027355p4027367.html Sent from the Drools: User forum mailing list archive at Nabble.com. From wtang at kana.com Thu Dec 19 13:16:44 2013 From: wtang at kana.com (wtang) Date: Thu, 19 Dec 2013 10:16:44 -0800 (PST) Subject: [rules-users] separating .drl declare type from actual .drl rule into each own file In-Reply-To: References: <1387413651817-4027359.post@n3.nabble.com> <52B24A3C.7040707@gmail.com> <1387439691316-4027363.post@n3.nabble.com> Message-ID: <1387477004804-4027370.post@n3.nabble.com> I do have the package header but it is not compiling and complain that it can't resolve Person type. Here is the complete rule file: package com.sample import com.sample.*; import java.util.* rule "Hello World" when Person(first == "Wing") then System.out.println("hello"); end -- View this message in context: http://drools.46999.n3.nabble.com/separating-drl-declare-type-from-actual-drl-rule-into-each-own-file-tp4027359p4027370.html Sent from the Drools: User forum mailing list archive at Nabble.com. From jguenth at co.pierce.wa.us Thu Dec 19 19:06:32 2013 From: jguenth at co.pierce.wa.us (jguenth) Date: Thu, 19 Dec 2013 16:06:32 -0800 (PST) Subject: [rules-users] kie-wb 6.0.0 tomcat7: Error uploading maven jar that is part of a multi-module maven project In-Reply-To: <1387413859893-4027360.post@n3.nabble.com> References: <1387323081497-4027338.post@n3.nabble.com> <1387381882320-4027353.post@n3.nabble.com> <1387405400333-4027356.post@n3.nabble.com> <5771C3609AD364488FB327B129E663FC0F6E5474B8@MBVCMS1.ad.co.pierce.wa.us> <1387413859893-4027360.post@n3.nabble.com> Message-ID: <1387497992989-4027371.post@n3.nabble.com> I fixed the MinimalPomParser by resetting the InputStream as follows: static PomModel parse(String path, InputStream is) { MinimalPomParser handler = new MinimalPomParser(); try { * if(is.markSupported()){ is.reset(); }* SAXParserFactory factory = SAXParserFactory.newInstance(); factory.setValidating( false ); factory.setNamespaceAware( false ); SAXParser parser = factory.newSAXParser(); parser.parse( is, handler ); } catch (Exception e) { throw new RuntimeException("Unable to parse File '" + path + "'", e); } return handler.getPomModel(); } However, now I'm getting the following security exception when navigating around in the workbench: Caused by: org.sonatype.aether.transfer.ArtifactTransferException: Failure to transfer org.piercecountywa.commons:commons:pom:4.1.0 from https://vm-desktop.co.pierce.wa.us/kie-wb/maven2/ was cached in the local repository, resolution will not be reattempted until the update interval of guvnor-m2-repo has elapsed or updates are forced. Original error: Could not transfer artifact org.piercecountywa.commons:commons:pom:4.1.0 from/to guvnor-m2-repo (https://vm-desktop.co.pierce.wa.us/kie-wb/maven2/): Access denied to: https://vm-desktop.co.pierce.wa.us/kie-wb/maven2/org/piercecountywa/commons/commons/4.1.0/commons-4.1.0.pom (401) at org.sonatype.aether.impl.internal.DefaultUpdateCheckManager.newException(DefaultUpdateCheckManager.java:237) ~[aether-impl-1.13.1.jar:na] at org.sonatype.aether.impl.internal.DefaultUpdateCheckManager.checkArtifact(DefaultUpdateCheckManager.java:216) ~[aether-impl-1.13.1.jar:na] at org.sonatype.aether.impl.internal.DefaultArtifactResolver.resolve(DefaultArtifactResolver.java:427) ~[aether-impl-1.13.1.jar:na] ... 75 common frames omitted I setup tomcat7 security per the following: https://github.com/droolsjbpm/kie-wb-distributions/blob/master/kie-wb/kie-wb-distribution-wars/src/main/tomcat7/README.txt Any suggestions on how to get around this security exception? Regards, Jay -- View this message in context: http://drools.46999.n3.nabble.com/kie-wb-6-0-0-tomcat7-Error-uploading-maven-jar-that-is-part-of-a-multi-module-maven-project-tp4027338p4027371.html Sent from the Drools: User forum mailing list archive at Nabble.com. From plz.write.to at gmail.com Fri Dec 20 01:14:04 2013 From: plz.write.to at gmail.com (Sonata) Date: Thu, 19 Dec 2013 22:14:04 -0800 (PST) Subject: [rules-users] Adding @PropertyReactive causes the other rules removed from the stack Message-ID: <1387520044752-4027374.post@n3.nabble.com> So I have a few rules for example, the rules are fired from bottom to top and I reckon once a rule in between calls modify, the rules above it will not be fired, although they should be. This happens when I add @PropertyReactive to my class. Drools version is 5.5.0.Final. Please advise if this has been fixed in 5.5.1? Thank you -- View this message in context: http://drools.46999.n3.nabble.com/Adding-PropertyReactive-causes-the-other-rules-removed-from-the-stack-tp4027374.html Sent from the Drools: User forum mailing list archive at Nabble.com. From dsotty at gmail.com Fri Dec 20 02:22:58 2013 From: dsotty at gmail.com (Davide Sottara) Date: Fri, 20 Dec 2013 00:22:58 -0700 Subject: [rules-users] Adding @PropertyReactive causes the other rules removed from the stack In-Reply-To: <1387520044752-4027374.post@n3.nabble.com> References: <1387520044752-4027374.post@n3.nabble.com> Message-ID: <52B3F052.6060709@gmail.com> The goal of @propertyReactive is exactly to prevent rules from refiring on a modify, based on what properties are constrained or @watched. This is irrelevant with respect to the order of the rules. This may or may not be a bug, we'd need to see the rules. Davide On 12/19/2013 11:14 PM, Sonata wrote: > So I have a few rules for example, the rules are fired from bottom to top and > I reckon once a rule in between calls modify, the rules above it will not be > fired, although they should be. This happens when I add @PropertyReactive to > my class. > > Drools version is 5.5.0.Final. Please advise if this has been fixed in > 5.5.1? > Thank you > > > > > -- > View this message in context: http://drools.46999.n3.nabble.com/Adding-PropertyReactive-causes-the-other-rules-removed-from-the-stack-tp4027374.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 Fri Dec 20 04:14:00 2013 From: plz.write.to at gmail.com (Sonata) Date: Fri, 20 Dec 2013 01:14:00 -0800 (PST) Subject: [rules-users] Adding @PropertyReactive causes the other rules removed from the stack In-Reply-To: <52B3F052.6060709@gmail.com> References: <1387520044752-4027374.post@n3.nabble.com> <52B3F052.6060709@gmail.com> Message-ID: <1387530840344-4027382.post@n3.nabble.com> Davide Sottara wrote > The goal of @propertyReactive is exactly to prevent rules from refiring > on a modify, based on what properties are constrained or @watched. > This is irrelevant with respect to the order of the rules. > This may or may not be a bug, we'd need to see the rules. > Davide Example attached ReactiveTest.java package com.sample; import org.drools.KnowledgeBase; import org.drools.KnowledgeBaseFactory; import org.drools.builder.KnowledgeBuilder; import org.drools.builder.KnowledgeBuilderFactory; import org.drools.builder.ResourceType; import org.drools.io.ResourceFactory; import org.drools.logger.KnowledgeRuntimeLogger; import org.drools.logger.KnowledgeRuntimeLoggerFactory; import org.drools.runtime.StatefulKnowledgeSession; public class ReactiveTest { public static final void main(String[] args) { KnowledgeBuilder kbuilder = KnowledgeBuilderFactory.newKnowledgeBuilder(); kbuilder.add(ResourceFactory.newClassPathResource("Sample.drl"), ResourceType.DRL); KnowledgeBase kbase = KnowledgeBaseFactory.newKnowledgeBase(); kbase.addKnowledgePackages(kbuilder.getKnowledgePackages()); StatefulKnowledgeSession ksession = kbase.newStatefulKnowledgeSession(); ksession.insert(new MyClass()); ksession.fireAllRules(); } } MyClass.java package com.sample; import org.drools.definition.type.PropertyReactive; @PropertyReactive public class MyClass { private String value; public String getValue() { return value; } public void setValue(String value) { this.value = value; } } Sample.drl package com.sample; rule "1" when MyClass(value == null) then System.out.println("Rule 1 fired"); end rule "2" when m : MyClass(value == null) then modify(m) { setData("test") } end rule "3" when MyClass(value == null) then System.out.println("Rule 3 fired"); end So you can see from the example, rule "1", rule "2" and rule "3" are all added to the stack ready to be fired. Rules are then fired starting from the bottom, where rule "3" fired and then rule "2" fired. But rule "1" is being removed from the stack after rule "2" has fired, which is a mystery to me. Try to remove modify(m) to just m.setData("test") in rule "2", all three rules fired. So I agree to your "prevent rules from refiring", but this case is not even fired yet. -- View this message in context: http://drools.46999.n3.nabble.com/Adding-PropertyReactive-causes-the-other-rules-removed-from-the-stack-tp4027374p4027382.html Sent from the Drools: User forum mailing list archive at Nabble.com. From plz.write.to at gmail.com Fri Dec 20 04:23:46 2013 From: plz.write.to at gmail.com (Sonata) Date: Fri, 20 Dec 2013 01:23:46 -0800 (PST) Subject: [rules-users] Adding @PropertyReactive causes the other rules removed from the stack In-Reply-To: <1387530840344-4027382.post@n3.nabble.com> References: <1387520044752-4027374.post@n3.nabble.com> <52B3F052.6060709@gmail.com> <1387530840344-4027382.post@n3.nabble.com> Message-ID: <1387531426923-4027383.post@n3.nabble.com> Of course, a workaround is to add @watch(value) to rule "1", but thats really weird. -- View this message in context: http://drools.46999.n3.nabble.com/Adding-PropertyReactive-causes-the-other-rules-removed-from-the-stack-tp4027374p4027383.html Sent from the Drools: User forum mailing list archive at Nabble.com. From mproctor at codehaus.org Fri Dec 20 10:14:45 2013 From: mproctor at codehaus.org (Mark Proctor) Date: Fri, 20 Dec 2013 15:14:45 +0000 Subject: [rules-users] Adding @PropertyReactive causes the other rules removed from the stack In-Reply-To: <1387530840344-4027382.post@n3.nabble.com> References: <1387520044752-4027374.post@n3.nabble.com> <52B3F052.6060709@gmail.com> <1387530840344-4027382.post@n3.nabble.com> Message-ID: <9AE644C8-9ADC-455E-B130-282E1CF8C5D4@codehaus.org> I turned your code into a unit test and added it to the 6.0 codebase. see the method ?testModifyAfterInsertWithPropertyReactive? in the commit: https://github.com/droolsjbpm/drools/commit/53ca46d3b It works for PHREAK and RETE mode. Everything works for 6.0, we?ll try it against 5.6.CR1 soon Mark On 20 Dec 2013, at 09:14, Sonata wrote: > Davide Sottara wrote >> The goal of @propertyReactive is exactly to prevent rules from refiring >> on a modify, based on what properties are constrained or @watched. >> This is irrelevant with respect to the order of the rules. >> This may or may not be a bug, we'd need to see the rules. >> Davide > > Example attached > > ReactiveTest.java > package com.sample; > import org.drools.KnowledgeBase; > import org.drools.KnowledgeBaseFactory; > import org.drools.builder.KnowledgeBuilder; > import org.drools.builder.KnowledgeBuilderFactory; > import org.drools.builder.ResourceType; > import org.drools.io.ResourceFactory; > import org.drools.logger.KnowledgeRuntimeLogger; > import org.drools.logger.KnowledgeRuntimeLoggerFactory; > import org.drools.runtime.StatefulKnowledgeSession; > public class ReactiveTest { > public static final void main(String[] args) { > KnowledgeBuilder kbuilder = KnowledgeBuilderFactory.newKnowledgeBuilder(); > kbuilder.add(ResourceFactory.newClassPathResource("Sample.drl"), > ResourceType.DRL); > KnowledgeBase kbase = KnowledgeBaseFactory.newKnowledgeBase(); > kbase.addKnowledgePackages(kbuilder.getKnowledgePackages()); > StatefulKnowledgeSession ksession = kbase.newStatefulKnowledgeSession(); > ksession.insert(new MyClass()); > ksession.fireAllRules(); > } > } > > MyClass.java > package com.sample; > import org.drools.definition.type.PropertyReactive; > @PropertyReactive > public class MyClass { > private String value; > public String getValue() { return value; } > public void setValue(String value) { this.value = value; } > } > > Sample.drl > package com.sample; > rule "1" > when MyClass(value == null) > then System.out.println("Rule 1 fired"); > end > > rule "2" > when m : MyClass(value == null) > then modify(m) { setData("test") } > end > > rule "3" > when MyClass(value == null) > then System.out.println("Rule 3 fired"); > end > > So you can see from the example, rule "1", rule "2" and rule "3" are all > added to the stack ready to be fired. > Rules are then fired starting from the bottom, where rule "3" fired and then > rule "2" fired. But rule "1" is being removed from the stack after rule "2" > has fired, which is a mystery to me. > > Try to remove modify(m) to just m.setData("test") in rule "2", all three > rules fired. > > So I agree to your "prevent rules from refiring", but this case is not even > fired yet. > > > > -- > View this message in context: http://drools.46999.n3.nabble.com/Adding-PropertyReactive-causes-the-other-rules-removed-from-the-stack-tp4027374p4027382.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/20131220/238654db/attachment.html From mproctor at codehaus.org Fri Dec 20 10:22:13 2013 From: mproctor at codehaus.org (Mark Proctor) Date: Fri, 20 Dec 2013 15:22:13 +0000 Subject: [rules-users] Adding @PropertyReactive causes the other rules removed from the stack In-Reply-To: <9AE644C8-9ADC-455E-B130-282E1CF8C5D4@codehaus.org> References: <1387520044752-4027374.post@n3.nabble.com> <52B3F052.6060709@gmail.com> <1387530840344-4027382.post@n3.nabble.com> <9AE644C8-9ADC-455E-B130-282E1CF8C5D4@codehaus.org> Message-ID: <516132EC-F26D-4341-B21C-574B6AD9555B@codehaus.org> small correction to the unit test, which I paste in full below: @Test public void testModifyAfterInsertWithPropertyReactive() { String rule1 = "\n" + "package com.sample;\n" + "import " + MyClass.class.getCanonicalName() + ";\n" + "global java.util.List list;\n" + "rule r0\n" + "then insert( new MyClass() );\n" + "end\n" + "rule r1 salience 1\n" + "when " + " MyClass(value == null)\n" + "then " + " list.add( 1 );\n" + "end\n" + "\n" + "rule r2 salience 2\n" + "when " + " m : MyClass(value == null)\n" + "then " + " modify(m) { setData(\"test\") }\n" + " list.add( 2 );\n" + "end\n" + "\n" + "rule r3 salience 3\n" + "when " + " MyClass(value == null)\n" + "then " + " list.add( 3 );\n" + "end"; KnowledgeBuilder kbuilder = KnowledgeBuilderFactory.newKnowledgeBuilder(); kbuilder.add( ResourceFactory.newByteArrayResource(rule1.getBytes()), ResourceType.DRL ); if ( kbuilder.hasErrors() ) { fail( kbuilder.getErrors().toString() ); } KnowledgeBase kbase = KnowledgeBaseFactory.newKnowledgeBase(); kbase.addKnowledgePackages( kbuilder.getKnowledgePackages() ); StatefulKnowledgeSession ksession = kbase.newStatefulKnowledgeSession(); List list = new ArrayList(); ksession.setGlobal("list", list); assertEquals(4, ksession.fireAllRules()); assertEquals(3, list.size()); assertEquals(3, list.get(0)); assertEquals(2, list.get(1)); assertEquals(1, list.get(2)); } On 20 Dec 2013, at 15:14, Mark Proctor wrote: > I turned your code into a unit test and added it to the 6.0 codebase. see the method ?testModifyAfterInsertWithPropertyReactive? in the commit: > https://github.com/droolsjbpm/drools/commit/53ca46d3b > > It works for PHREAK and RETE mode. Everything works for 6.0, we?ll try it against 5.6.CR1 soon > > Mark > > On 20 Dec 2013, at 09:14, Sonata wrote: > >> Davide Sottara wrote >>> The goal of @propertyReactive is exactly to prevent rules from refiring >>> on a modify, based on what properties are constrained or @watched. >>> This is irrelevant with respect to the order of the rules. >>> This may or may not be a bug, we'd need to see the rules. >>> Davide >> >> Example attached >> >> ReactiveTest.java >> package com.sample; >> import org.drools.KnowledgeBase; >> import org.drools.KnowledgeBaseFactory; >> import org.drools.builder.KnowledgeBuilder; >> import org.drools.builder.KnowledgeBuilderFactory; >> import org.drools.builder.ResourceType; >> import org.drools.io.ResourceFactory; >> import org.drools.logger.KnowledgeRuntimeLogger; >> import org.drools.logger.KnowledgeRuntimeLoggerFactory; >> import org.drools.runtime.StatefulKnowledgeSession; >> public class ReactiveTest { >> public static final void main(String[] args) { >> KnowledgeBuilder kbuilder = KnowledgeBuilderFactory.newKnowledgeBuilder(); >> kbuilder.add(ResourceFactory.newClassPathResource("Sample.drl"), >> ResourceType.DRL); >> KnowledgeBase kbase = KnowledgeBaseFactory.newKnowledgeBase(); >> kbase.addKnowledgePackages(kbuilder.getKnowledgePackages()); >> StatefulKnowledgeSession ksession = kbase.newStatefulKnowledgeSession(); >> ksession.insert(new MyClass()); >> ksession.fireAllRules(); >> } >> } >> >> MyClass.java >> package com.sample; >> import org.drools.definition.type.PropertyReactive; >> @PropertyReactive >> public class MyClass { >> private String value; >> public String getValue() { return value; } >> public void setValue(String value) { this.value = value; } >> } >> >> Sample.drl >> package com.sample; >> rule "1" >> when MyClass(value == null) >> then System.out.println("Rule 1 fired"); >> end >> >> rule "2" >> when m : MyClass(value == null) >> then modify(m) { setData("test") } >> end >> >> rule "3" >> when MyClass(value == null) >> then System.out.println("Rule 3 fired"); >> end >> >> So you can see from the example, rule "1", rule "2" and rule "3" are all >> added to the stack ready to be fired. >> Rules are then fired starting from the bottom, where rule "3" fired and then >> rule "2" fired. But rule "1" is being removed from the stack after rule "2" >> has fired, which is a mystery to me. >> >> Try to remove modify(m) to just m.setData("test") in rule "2", all three >> rules fired. >> >> So I agree to your "prevent rules from refiring", but this case is not even >> fired yet. >> >> >> >> -- >> View this message in context: http://drools.46999.n3.nabble.com/Adding-PropertyReactive-causes-the-other-rules-removed-from-the-stack-tp4027374p4027382.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/20131220/6ec35c74/attachment-0001.html From bhochhi at aol.com Fri Dec 20 13:27:25 2013 From: bhochhi at aol.com (bhochhi) Date: Fri, 20 Dec 2013 10:27:25 -0800 (PST) Subject: [rules-users] how to restore the knowledgeBase when newly created kb has compilationFailed error Message-ID: <1387564045306-4027387.post@n3.nabble.com> Hi there, I am using KnowledgeAgent to get the knowledgeBase and have notifierService started to monitor the rules resource. New knowledgeBase is being created when kAgent finds changes on the rules. However, I don't want to replace the old knowledgebase if newly created knowledgebase has some rules with compilation error. Is this something possible? I am using KnowledgeAgentEventListener to detect the compilation error and using drools 5.3 version. thanks in advance. -- View this message in context: http://drools.46999.n3.nabble.com/how-to-restore-the-knowledgeBase-when-newly-created-kb-has-compilationFailed-error-tp4027387.html Sent from the Drools: User forum mailing list archive at Nabble.com. From dsotty at gmail.com Fri Dec 20 13:41:40 2013 From: dsotty at gmail.com (Davide Sottara) Date: Fri, 20 Dec 2013 11:41:40 -0700 Subject: [rules-users] how to restore the knowledgeBase when newly created kb has compilationFailed error In-Reply-To: <1387564045306-4027387.post@n3.nabble.com> References: <1387564045306-4027387.post@n3.nabble.com> Message-ID: <52B48F64.1050607@gmail.com> There is a "newInstance" option in the KA configuration that determines whether the changes are applied to the existing KB, or a new one is to be created. Please see the documentation for more details. As a side note, the KA was refactored and improved in 5.5 and 5.6 to fix some bugs and missing features. Let me know if you have more questions Best Davide On 12/20/2013 11:27 AM, bhochhi wrote: > Hi there, > > I am using KnowledgeAgent to get the knowledgeBase and have notifierService > started to monitor the rules resource. New knowledgeBase is being created > when kAgent finds changes on the rules. However, I don't want to replace the > old knowledgebase if newly created knowledgebase has some rules with > compilation error. Is this something possible? I am using > KnowledgeAgentEventListener to detect the compilation error and using drools > 5.3 version. > > thanks in advance. > > > > > -- > View this message in context: http://drools.46999.n3.nabble.com/how-to-restore-the-knowledgeBase-when-newly-created-kb-has-compilationFailed-error-tp4027387.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 bhochhi at aol.com Fri Dec 20 14:35:24 2013 From: bhochhi at aol.com (bhochhi) Date: Fri, 20 Dec 2013 11:35:24 -0800 (PST) Subject: [rules-users] how to restore the knowledgeBase when newly created kb has compilationFailed error In-Reply-To: <52B48F64.1050607@gmail.com> References: <1387564045306-4027387.post@n3.nabble.com> <52B48F64.1050607@gmail.com> Message-ID: <1387568124190-4027389.post@n3.nabble.com> Thanks for the reply, so far from documentation, I believe "newInstance"=true(default) replaces the old kb as a whole and =false will update the existing kb. But I didn't see anywhere explaining that if there is a compilation error on rules, it will not update the kb. And I verified. It updates the kb. I don't know if that is expected or bugs in this version. Anyway, I found the workthrough by assigning the kb to the variable and update it only if there is not resourceCompilationFailed using knowledgeBaseUpdated event on KnowledgeAgentEventListener. Anyway, thanks for your help. -- View this message in context: http://drools.46999.n3.nabble.com/how-to-restore-the-knowledgeBase-when-newly-created-kb-has-compilationFailed-error-tp4027387p4027389.html Sent from the Drools: User forum mailing list archive at Nabble.com. From dsotty at gmail.com Fri Dec 20 14:51:22 2013 From: dsotty at gmail.com (Davide Sottara) Date: Fri, 20 Dec 2013 12:51:22 -0700 Subject: [rules-users] how to restore the knowledgeBase when newly created kb has compilationFailed error In-Reply-To: <1387568124190-4027389.post@n3.nabble.com> References: <1387564045306-4027387.post@n3.nabble.com> <52B48F64.1050607@gmail.com> <1387568124190-4027389.post@n3.nabble.com> Message-ID: <52B49FBA.1090107@gmail.com> That feature was definitely not available in 5.3... I would have to check in 5.6, and I agree that it would be a nice feature to have. I'll see if we are still in time to add it. Davide On 12/20/2013 12:35 PM, bhochhi wrote: > Thanks for the reply, so far from documentation, I believe > "newInstance"=true(default) replaces the old kb as a whole and =false will > update the existing kb. But I didn't see anywhere explaining that if there > is a compilation error on rules, it will not update the kb. And I verified. > It updates the kb. I don't know if that is expected or bugs in this version. > > Anyway, I found the workthrough by assigning the kb to the variable and > update it only if there is not resourceCompilationFailed using > knowledgeBaseUpdated event on KnowledgeAgentEventListener. > > Anyway, thanks for your help. > > > > -- > View this message in context: http://drools.46999.n3.nabble.com/how-to-restore-the-knowledgeBase-when-newly-created-kb-has-compilationFailed-error-tp4027387p4027389.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 Sat Dec 21 10:21:52 2013 From: mproctor at codehaus.org (Mark Proctor) Date: Sat, 21 Dec 2013 15:21:52 +0000 Subject: [rules-users] 6.0.1 Now Available Message-ID: We?ve uploaded 6.0.1. http://www.jboss.org/drools/downloads http://www.jboss.org/drools/documentation We have added some extra docs explaining versioning, settings.xml and remote repositories: http://docs.jboss.org/drools/release/6.0.1.Final/drools-docs/html/KIEChapter.html#KIEDeployingSection http://docs.jboss.org/drools/release/6.0.1.Final/drools-docs/html/KIEChapter.html#KIEDeployCheatSheets 5.6 CR1 is still available for testing and can be downloaded from the maven repository: http://search.maven.org/#search%7Cga%7C1%7Cg%3A%22org.drools%22%20AND%20v%3A%225.6.0.CR1%22 Daily snapshots can be found here: http://downloads.jboss.org/drools/release/snapshot/ Mark From swapnilaute at gmail.com Sun Dec 22 04:12:22 2013 From: swapnilaute at gmail.com (neal) Date: Sun, 22 Dec 2013 01:12:22 -0800 (PST) Subject: [rules-users] What are the changes do we need to do in drool 6.0 workbench war to make it run on Websphere Application Server community edition 3? Message-ID: <1387703542864-4027393.post@n3.nabble.com> What are the changes do we need to do in drool 6.0 workbench war to make it run on Websphere Application Server community edition 3? I am unable to deploy the drool 6.0 workbench war on Websphere Application Server community edition 3. I am getting exception as Jar failed validation: warERROR ... null: Cannot validate jar: org/uberfire/client/mvp/AbstractWorkbenchEditorActivity org.apache.geronimo.common.DeploymentException: Jar failed validation: warERROR ... null: Cannot validate jar: org/uberfire/client/mvp/AbstractWorkbenchEditorActivity Do i need to add additional jars in the war to make it run on WASCE 3? -- View this message in context: http://drools.46999.n3.nabble.com/What-are-the-changes-do-we-need-to-do-in-drool-6-0-workbench-war-to-make-it-run-on-Websphere-Applica-tp4027393.html Sent from the Drools: User forum mailing list archive at Nabble.com. From dsotty at gmail.com Fri Dec 20 14:12:14 2013 From: dsotty at gmail.com (Davide Sottara) Date: Fri, 20 Dec 2013 20:12:14 +0100 Subject: [rules-users] Adding @PropertyReactive causes the other rules removed from the stack In-Reply-To: <516132EC-F26D-4341-B21C-574B6AD9555B@codehaus.org> References: <1387520044752-4027374.post@n3.nabble.com> <52B3F052.6060709@gmail.com> <1387530840344-4027382.post@n3.nabble.com> <9AE644C8-9ADC-455E-B130-282E1CF8C5D4@codehaus.org> <516132EC-F26D-4341-B21C-574B6AD9555B@codehaus.org> Message-ID: <52B4968E.2010502@gmail.com> Confirmed, works as expected in 5.6.CR1 Davide On 12/20/2013 04:22 PM, Mark Proctor wrote: > small correction to the unit test, which I paste in full below: > > @Test > *public void *testModifyAfterInsertWithPropertyReactive() { > String rule1 = > *"**\n**" *+ > *"package com.sample;**\n**" *+ > *"import " *+ MyClass.*class*.getCanonicalName() + *";**\n**" *+ > *"global java.util.List list;**\n**" *+ > *"rule r0**\n**" *+ > *"then insert( new MyClass() );**\n**" *+ > *"end**\n**" *+ > *"rule r1 salience 1**\n**" *+ > *"when " *+ > *" MyClass(value == null)**\n**" *+ > *"then " *+ > *" list.add( 1 );**\n**" *+ > *"end**\n**" *+ > *"**\n**" *+ > *"rule r2 salience 2**\n**" *+ > *"when " *+ > *" m : MyClass(value == null)**\n**" *+ > *"then " *+ > *" modify(m) { setData(**\"**test**\"**) }**\n**" *+ > *" list.add( 2 );**\n**" *+ > *"end**\n**" *+ > *"**\n**" *+ > *"rule r3 salience 3**\n**" *+ > *"when " *+ > *" MyClass(value == null)**\n**" *+ > *"then " *+ > *" list.add( 3 );**\n**" *+ > *"end"*; > > KnowledgeBuilder kbuilder = KnowledgeBuilderFactory.newKnowledgeBuilder(); > kbuilder.add( ResourceFactory.newByteArrayResource(rule1.getBytes()), ResourceType.DRL ); > > *if *( kbuilder.hasErrors() ) { > fail( kbuilder.getErrors().toString() ); > } > > KnowledgeBase kbase = KnowledgeBaseFactory.newKnowledgeBase(); > kbase.addKnowledgePackages( kbuilder.getKnowledgePackages() ); > > StatefulKnowledgeSession ksession = kbase.newStatefulKnowledgeSession(); > List list = *new *ArrayList(); > ksession.setGlobal(*"list"*, list); > > assertEquals(4, ksession.fireAllRules()); > > assertEquals(3, list.size()); > > assertEquals(3, list.get(0)); > assertEquals(2, list.get(1)); > assertEquals(1, list.get(2)); > } > > > On 20 Dec 2013, at 15:14, Mark Proctor > wrote: > >> I turned your code into a unit test and added it to the 6.0 codebase. >> see the method "testModifyAfterInsertWithPropertyReactive" in the >> commit: >> https://github.com/droolsjbpm/drools/commit/53ca46d3b >> >> It works for PHREAK and RETE mode. Everything works for 6.0, we'll >> try it against 5.6.CR1 soon >> >> Mark >> >> On 20 Dec 2013, at 09:14, Sonata > > wrote: >> >>> Davide Sottara wrote >>>> The goal of @propertyReactive is exactly to prevent rules from refiring >>>> on a modify, based on what properties are constrained or @watched. >>>> This is irrelevant with respect to the order of the rules. >>>> This may or may not be a bug, we'd need to see the rules. >>>> Davide >>> >>> Example attached >>> >>> ReactiveTest.java >>> package com.sample; >>> import org.drools.KnowledgeBase; >>> import org.drools.KnowledgeBaseFactory; >>> import org.drools.builder.KnowledgeBuilder; >>> import org.drools.builder.KnowledgeBuilderFactory; >>> import org.drools.builder.ResourceType; >>> import org.drools.io.ResourceFactory; >>> import org.drools.logger.KnowledgeRuntimeLogger; >>> import org.drools.logger.KnowledgeRuntimeLoggerFactory; >>> import org.drools.runtime.StatefulKnowledgeSession; >>> public class ReactiveTest { >>> public static final void main(String[] args) { >>> KnowledgeBuilder kbuilder = >>> KnowledgeBuilderFactory.newKnowledgeBuilder(); >>> kbuilder.add(ResourceFactory.newClassPathResource("Sample.drl"), >>> ResourceType.DRL); >>> KnowledgeBase kbase = KnowledgeBaseFactory.newKnowledgeBase(); >>> kbase.addKnowledgePackages(kbuilder.getKnowledgePackages()); >>> StatefulKnowledgeSession ksession = kbase.newStatefulKnowledgeSession(); >>> ksession.insert(new MyClass()); >>> ksession.fireAllRules(); >>> } >>> } >>> >>> MyClass.java >>> package com.sample; >>> import org.drools.definition.type.PropertyReactive; >>> @PropertyReactive >>> public class MyClass { >>> private String value; >>> public String getValue() { return value; } >>> public void setValue(String value) { this.value = value; } >>> } >>> >>> Sample.drl >>> package com.sample; >>> rule "1" >>> when MyClass(value == null) >>> then System.out.println("Rule 1 fired"); >>> end >>> >>> rule "2" >>> when m : MyClass(value == null) >>> then modify(m) { setData("test") } >>> end >>> >>> rule "3" >>> when MyClass(value == null) >>> then System.out.println("Rule 3 fired"); >>> end >>> >>> So you can see from the example, rule "1", rule "2" and rule "3" are all >>> added to the stack ready to be fired. >>> Rules are then fired starting from the bottom, where rule "3" fired >>> and then >>> rule "2" fired. But rule "1" is being removed from the stack after >>> rule "2" >>> has fired, which is a mystery to me. >>> >>> Try to remove modify(m) to just m.setData("test") in rule "2", all three >>> rules fired. >>> >>> So I agree to your "prevent rules from refiring", but this case is >>> not even >>> fired yet. >>> >>> >>> >>> -- >>> View this message in context: >>> http://drools.46999.n3.nabble.com/Adding-PropertyReactive-causes-the-other-rules-removed-from-the-stack-tp4027374p4027382.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/20131220/7498e616/attachment-0001.html From mproctor at codehaus.org Mon Dec 23 20:29:19 2013 From: mproctor at codehaus.org (Mark Proctor) Date: Tue, 24 Dec 2013 01:29:19 +0000 Subject: [rules-users] 6.0.1 Now Available In-Reply-To: References: Message-ID: <526C34F8-B04C-447B-9A5A-C3F4FBAC9AAE@codehaus.org> **READ ME** The WARs in the downloads "Drools Workbench" link are incorrect and point to a development test version; it has incorrect menu's and art work. The download can still be used for the JCR2GIT migration tool. The WARs will be corrected shortly. In the mean time you can find the correct WARs at the JBoss Nexus repository: JBossAS 7.0 Tomcat 7.0 JBoss EAP 6.1 https://repository.jboss.org/nexus/content/repositories/public-jboss/org/kie/kie-drools-wb-distribution-wars/6.0.1.Final/ On 21 Dec 2013, at 15:21, Mark Proctor wrote: > We?ve uploaded 6.0.1. > http://www.jboss.org/drools/downloads > http://www.jboss.org/drools/documentation > > We have added some extra docs explaining versioning, settings.xml and remote repositories: > http://docs.jboss.org/drools/release/6.0.1.Final/drools-docs/html/KIEChapter.html#KIEDeployingSection > http://docs.jboss.org/drools/release/6.0.1.Final/drools-docs/html/KIEChapter.html#KIEDeployCheatSheets > > 5.6 CR1 is still available for testing and can be downloaded from the maven repository: > http://search.maven.org/#search%7Cga%7C1%7Cg%3A%22org.drools%22%20AND%20v%3A%225.6.0.CR1%22 > > Daily snapshots can be found here: > http://downloads.jboss.org/drools/release/snapshot/ > > Mark -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.jboss.org/pipermail/rules-users/attachments/20131224/80bd1db7/attachment.html From mproctor at codehaus.org Mon Dec 23 22:57:50 2013 From: mproctor at codehaus.org (Mark Proctor) Date: Tue, 24 Dec 2013 03:57:50 +0000 Subject: [rules-users] Drools 6.0 Workbench and Editor Videos Message-ID: http://blog.athico.com/2013/12/drools-60-workbench-and-editor-videos.html ? 6 workbench introduction videos. Watch full screen at 720HD. Press Play All. http://www.youtube.com/playlist?list=PLb9jQNHBKBRj9IJkc_F5nCJAvXaegOGW8 7 editor metaphor videos. Watch full screen at 720HD. Press Play All. http://www.youtube.com/playlist?list=PLb9jQNHBKBRipbtadRC-UaUObjwp0aBHJ KIE Workbench Drools Editor Metaphors -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.jboss.org/pipermail/rules-users/attachments/20131224/e34afd21/attachment-0001.html -------------- next part -------------- A non-text attachment was scrubbed... Name: ZGGSXTq.png Type: image/png Size: 158369 bytes Desc: not available Url : http://lists.jboss.org/pipermail/rules-users/attachments/20131224/e34afd21/attachment-0002.png -------------- next part -------------- A non-text attachment was scrubbed... Name: Hhph9Qe.png Type: image/png Size: 142781 bytes Desc: not available Url : http://lists.jboss.org/pipermail/rules-users/attachments/20131224/e34afd21/attachment-0003.png From seyfullahtikic at outlook.com Tue Dec 24 04:05:34 2013 From: seyfullahtikic at outlook.com (seyfullah) Date: Tue, 24 Dec 2013 01:05:34 -0800 (PST) Subject: [rules-users] Driving License application Message-ID: <1387875934802-4027403.post@n3.nabble.com> Hello, I am trying to implement Driving License example application in Drools Documentation Versio 6.0.0.0 Final. My main method is as below. KieServices kieServices = KieServices.Factory.get(); KieContainer kContainer = kieServices.getKieClasspathContainer(); StatelessKieSession kSession = kContainer.newStatelessKieSession(); Applicant applicant = new Applicant("Mr John Smith", 16); assertTrue( applicant.isValid() ); kSession.execute( applicant ) ; assertFalse ( applicant.isValid() ); My licenseApplication.drl file is as below: package MyPackage import MyPackage.Applicant; rule "Is of valid age" when $a : Applicant( age < 18 ) then $a.setValid ( false ); end Thanks to assertTrue and asserFalse methods, its output is It is false as not expected It is false as expected Bu when I change age parameter from 16 to 22 its output is same again. I expected that it is true. I think there is something wrong. Do you have any idea about this problem? Regards -- View this message in context: http://drools.46999.n3.nabble.com/Driving-License-application-tp4027403.html Sent from the Drools: User forum mailing list archive at Nabble.com. From salaboy at gmail.com Tue Dec 24 04:11:01 2013 From: salaboy at gmail.com (Mauricio Salatino) Date: Tue, 24 Dec 2013 10:11:01 +0100 Subject: [rules-users] Driving License application In-Reply-To: <1387875934802-4027403.post@n3.nabble.com> References: <1387875934802-4027403.post@n3.nabble.com> Message-ID: Can you share with us the Applicant class? because if you have something like: boolean valid; it will be automatically initialized to false, so the rule will not do anything just leave the Applicant as it is On Tue, Dec 24, 2013 at 10:05 AM, seyfullah wrote: > Hello, > I am trying to implement Driving License example application in Drools > Documentation Versio 6.0.0.0 Final. > My main method is as below. > KieServices kieServices = KieServices.Factory.get(); > KieContainer kContainer = > kieServices.getKieClasspathContainer(); > StatelessKieSession kSession = > kContainer.newStatelessKieSession(); > Applicant applicant = new Applicant("Mr John Smith", 16); > > assertTrue( applicant.isValid() ); > kSession.execute( applicant ) ; > assertFalse ( applicant.isValid() ); > > My licenseApplication.drl file is as below: > package MyPackage > > import MyPackage.Applicant; > > rule "Is of valid age" > when > $a : Applicant( age < 18 ) > > then > $a.setValid ( false ); > end > > Thanks to assertTrue and asserFalse methods, its output is > It is false as not expected > It is false as expected > > Bu when I change age parameter from 16 to 22 its output is same again. I > expected that it is true. > > I think there is something wrong. > Do you have any idea about this problem? > > Regards > > > > -- > View this message in context: > http://drools.46999.n3.nabble.com/Driving-License-application-tp4027403.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 > -- - MyJourney @ http://salaboy.com - Co-Founder @ http://www.jugargentina.org - Co-Founder @ http://www.jbug.com.ar - Salatino "Salaboy" Mauricio - -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.jboss.org/pipermail/rules-users/attachments/20131224/046c7147/attachment.html From seyfullahtikic at outlook.com Tue Dec 24 04:15:28 2013 From: seyfullahtikic at outlook.com (seyfullah) Date: Tue, 24 Dec 2013 01:15:28 -0800 (PST) Subject: [rules-users] Driving License application In-Reply-To: References: <1387875934802-4027403.post@n3.nabble.com> Message-ID: <1387876528254-4027405.post@n3.nabble.com> package MyPackage; public class Applicant { public String getName() { return name; } public void setName(String name) { this.name = name; } public int getAge() { return age; } public void setAge(int age) { this.age = age; } public boolean isValid() { return valid; } public void setValid(boolean valid) { this.valid = valid; } private String name; private int age; private boolean valid; public Applicant(String nameP, int ageP) { // TODO Auto-generated constructor stub this.name = nameP; this.age = ageP; } } -- View this message in context: http://drools.46999.n3.nabble.com/Driving-License-application-tp4027403p4027405.html Sent from the Drools: User forum mailing list archive at Nabble.com. From salaboy at gmail.com Tue Dec 24 04:28:37 2013 From: salaboy at gmail.com (Mauricio Salatino) Date: Tue, 24 Dec 2013 10:28:37 +0100 Subject: [rules-users] Driving License application In-Reply-To: <1387876528254-4027405.post@n3.nabble.com> References: <1387875934802-4027403.post@n3.nabble.com> <1387876528254-4027405.post@n3.nabble.com> Message-ID: So, if you don't touch in some way the boolean valid, value in your rules or in your java code it will be false not true. On Tue, Dec 24, 2013 at 10:15 AM, seyfullah wrote: > package MyPackage; > public class Applicant { > > public String getName() { > return name; > } > public void setName(String name) { > this.name = name; > } > public int getAge() { > return age; > } > public void setAge(int age) { > this.age = age; > } > public boolean isValid() { > return valid; > } > public void setValid(boolean valid) { > this.valid = valid; > } > private String name; > private int age; > private boolean valid; > public Applicant(String nameP, int ageP) { > // TODO Auto-generated constructor stub > this.name = nameP; > this.age = ageP; > } > > } > > > > > -- > View this message in context: > http://drools.46999.n3.nabble.com/Driving-License-application-tp4027403p4027405.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 > -- - MyJourney @ http://salaboy.com - Co-Founder @ http://www.jugargentina.org - Co-Founder @ http://www.jbug.com.ar - Salatino "Salaboy" Mauricio - -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.jboss.org/pipermail/rules-users/attachments/20131224/bb6f9c95/attachment.html From seyfullahtikic at outlook.com Tue Dec 24 04:34:30 2013 From: seyfullahtikic at outlook.com (seyfullah) Date: Tue, 24 Dec 2013 01:34:30 -0800 (PST) Subject: [rules-users] Driving License application In-Reply-To: References: <1387875934802-4027403.post@n3.nabble.com> <1387876528254-4027405.post@n3.nabble.com> Message-ID: <1387877670936-4027407.post@n3.nabble.com> Ok, I changed my drl file and main method as follows, and it works. Thank you. package MyPackage import MyPackage.Applicant; rule "Is of not valid age" when $a : Applicant( age < 18 ) then $a.setValid ( false ); end rule "Is of valid age" when $a : Applicant( age > 17 ) then $a.setValid ( true ); end KieServices kieServices = KieServices.Factory.get(); KieContainer kContainer = kieServices.getKieClasspathContainer(); StatelessKieSession kSession = kContainer.newStatelessKieSession(); Applicant applicant = new Applicant("Mr John Smith", 16); assertFalse( applicant.isValid() ); kSession.execute( applicant ) ; assertFalse ( applicant.isValid() ); Applicant applicant2 = new Applicant("Mr Bill Wayne", 22); assertFalse( applicant2.isValid() ); kSession.execute( applicant2 ) ; assertTrue ( applicant2.isValid() ); -- View this message in context: http://drools.46999.n3.nabble.com/Driving-License-application-tp4027403p4027407.html Sent from the Drools: User forum mailing list archive at Nabble.com. From michal.kasprzyk at nobleprog.pl Tue Dec 24 05:13:11 2013 From: michal.kasprzyk at nobleprog.pl (=?ISO-8859-2?Q?Micha=B3_Kasprzyk?=) Date: Tue, 24 Dec 2013 11:13:11 +0100 Subject: [rules-users] Business Rules webinar - includes Drools 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* * 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/20131224/10086312/attachment.html From salaboy at gmail.com Tue Dec 24 05:13:48 2013 From: salaboy at gmail.com (Mauricio Salatino) Date: Tue, 24 Dec 2013 11:13:48 +0100 Subject: [rules-users] Driving License application In-Reply-To: <1387877670936-4027407.post@n3.nabble.com> References: <1387875934802-4027403.post@n3.nabble.com> <1387876528254-4027405.post@n3.nabble.com> <1387877670936-4027407.post@n3.nabble.com> Message-ID: Yeah, that will do the work. On Tue, Dec 24, 2013 at 10:34 AM, seyfullah wrote: > Ok, I changed my drl file and main method as follows, and it works. Thank > you. > > package MyPackage > > import MyPackage.Applicant; > > rule "Is of not valid age" > when > $a : Applicant( age < 18 ) > then > $a.setValid ( false ); > end > > rule "Is of valid age" > when > $a : Applicant( age > 17 ) > then > $a.setValid ( true ); > end > > > KieServices kieServices = KieServices.Factory.get(); > KieContainer kContainer = > kieServices.getKieClasspathContainer(); > StatelessKieSession kSession = > kContainer.newStatelessKieSession(); > > Applicant applicant = new Applicant("Mr John Smith", 16); > assertFalse( applicant.isValid() ); > kSession.execute( applicant ) ; > assertFalse ( applicant.isValid() ); > > Applicant applicant2 = new Applicant("Mr Bill Wayne", 22); > assertFalse( applicant2.isValid() ); > kSession.execute( applicant2 ) ; > assertTrue ( applicant2.isValid() ); > > > > > -- > View this message in context: > http://drools.46999.n3.nabble.com/Driving-License-application-tp4027403p4027407.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 > -- - MyJourney @ http://salaboy.com - Co-Founder @ http://www.jugargentina.org - Co-Founder @ http://www.jbug.com.ar - Salatino "Salaboy" Mauricio - -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.jboss.org/pipermail/rules-users/attachments/20131224/8407d141/attachment-0001.html From wolfgang.laun at gmail.com Tue Dec 24 10:14:34 2013 From: wolfgang.laun at gmail.com (Wolfgang Laun) Date: Tue, 24 Dec 2013 16:14:34 +0100 Subject: [rules-users] Driving License application In-Reply-To: <1387876528254-4027405.post@n3.nabble.com> References: <1387875934802-4027403.post@n3.nabble.com> <1387876528254-4027405.post@n3.nabble.com> Message-ID: If you have a property (such as valid) that has N possible values (2 in this case) you should have at least N-1 rules, setting values 1 to N-1 (as you have) and a default by initialisation equal to the N-th value (which is missing from your code). Alternatively, consider using N rules, one for each possible value, and then you don't have to worry about initialisation. -W On 24/12/2013, seyfullah wrote: > package MyPackage; > public class Applicant { > > public String getName() { > return name; > } > public void setName(String name) { > this.name = name; > } > public int getAge() { > return age; > } > public void setAge(int age) { > this.age = age; > } > public boolean isValid() { > return valid; > } > public void setValid(boolean valid) { > this.valid = valid; > } > private String name; > private int age; > private boolean valid; > public Applicant(String nameP, int ageP) { > // TODO Auto-generated constructor stub > this.name = nameP; > this.age = ageP; > } > > } > > > > > -- > View this message in context: > http://drools.46999.n3.nabble.com/Driving-License-application-tp4027403p4027405.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 Dec 24 21:15:37 2013 From: wtang at kana.com (wtang) Date: Tue, 24 Dec 2013 18:15:37 -0800 (PST) Subject: [rules-users] condition operator "||" give NPE in 6.0 but 5.x is fine Message-ID: <1387937737529-4027416.post@n3.nabble.com> I have a rule below and the "||" operator is giving me null pointer exception (NPE) when the rule is invoked. This NPE problem is only happening is 6.0. This NPE problem does not happen in 5.x and runs without and issues in 5.x Is this a bug in Drools 6.0? Below is my simple rule: rule "rule using Map" dialect "mvel" when $map: Map( this["id"] == "1000" || // "||" operator works fine in 5.x but gives NPE in 6.0 this["first"] == "Johna" ) then System.out.println("customer is: " + $map["first"] + " " + $map["last"]); end Please let me know if this is a bug in 6.0x. thanks! -- View this message in context: http://drools.46999.n3.nabble.com/condition-operator-give-NPE-in-6-0-but-5-x-is-fine-tp4027416.html Sent from the Drools: User forum mailing list archive at Nabble.com. From wolfgang.laun at gmail.com Wed Dec 25 02:50:15 2013 From: wolfgang.laun at gmail.com (Wolfgang Laun) Date: Wed, 25 Dec 2013 08:50:15 +0100 Subject: [rules-users] condition operator "||" give NPE in 6.0 but 5.x is fine In-Reply-To: <1387937737529-4027416.post@n3.nabble.com> References: <1387937737529-4027416.post@n3.nabble.com> Message-ID: Works fine in 6.0.0. -W On 25/12/2013, wtang wrote: > I have a rule below and the "||" operator is giving me null pointer > exception > (NPE) when the rule is invoked. This NPE problem is only happening is 6.0. > > This NPE problem does not happen in 5.x and runs without and issues in 5.x > > Is this a bug in Drools 6.0? > > Below is my simple rule: > > rule "rule using Map" > dialect "mvel" > when > $map: Map( > this["id"] == "1000" || // "||" operator works fine > in 5.x but gives NPE in 6.0 > this["first"] == "Johna" > ) > then > System.out.println("customer is: " + $map["first"] + " " + > $map["last"]); > end > > Please let me know if this is a bug in 6.0x. thanks! > > > > -- > View this message in context: > http://drools.46999.n3.nabble.com/condition-operator-give-NPE-in-6-0-but-5-x-is-fine-tp4027416.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 Dec 26 01:59:37 2013 From: swapnilaute at gmail.com (Swapnil Aute) Date: Thu, 26 Dec 2013 12:29:37 +0530 Subject: [rules-users] 6.0.1 Now Available In-Reply-To: <526C34F8-B04C-447B-9A5A-C3F4FBAC9AAE@codehaus.org> References: <526C34F8-B04C-447B-9A5A-C3F4FBAC9AAE@codehaus.org> Message-ID: <6BF8EA4A-040A-4565-80D2-BFC133554EE7@gmail.com> With new wars too, i am getting the same error. Cannot validate jar : org/uberfire/client/mvp/AbstractWorkbenchEditorActivity Regards, Swapnil Aute PH:+919652538632 > On 24-Dec-2013, at 6:59 am, Mark Proctor wrote: > > **READ ME** > > The WARs in the downloads "Drools Workbench" link are incorrect and point to a development test version; it has incorrect menu's and art work. The download can still be used for the JCR2GIT migration tool. The WARs will be corrected shortly. In the mean time you can find the correct WARs at the JBoss Nexus repository: > > JBossAS 7.0 > > Tomcat 7.0 > > JBoss EAP 6.1 > > https://repository.jboss.org/nexus/content/repositories/public-jboss/org/kie/kie-drools-wb-distribution-wars/6.0.1.Final/ > >> On 21 Dec 2013, at 15:21, Mark Proctor wrote: >> >> We?ve uploaded 6.0.1. >> http://www.jboss.org/drools/downloads >> http://www.jboss.org/drools/documentation >> >> We have added some extra docs explaining versioning, settings.xml and remote repositories: >> http://docs.jboss.org/drools/release/6.0.1.Final/drools-docs/html/KIEChapter.html#KIEDeployingSection >> http://docs.jboss.org/drools/release/6.0.1.Final/drools-docs/html/KIEChapter.html#KIEDeployCheatSheets >> >> 5.6 CR1 is still available for testing and can be downloaded from the maven repository: >> http://search.maven.org/#search%7Cga%7C1%7Cg%3A%22org.drools%22%20AND%20v%3A%225.6.0.CR1%22 >> >> Daily snapshots can be found here: >> http://downloads.jboss.org/drools/release/snapshot/ >> >> Mark > > _______________________________________________ > 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/20131226/cca405a6/attachment.html From mproctor at codehaus.org Thu Dec 26 06:41:10 2013 From: mproctor at codehaus.org (Mark Proctor) Date: Thu, 26 Dec 2013 11:41:10 +0000 Subject: [rules-users] 6.0.1 Now Available In-Reply-To: <6BF8EA4A-040A-4565-80D2-BFC133554EE7@gmail.com> References: <526C34F8-B04C-447B-9A5A-C3F4FBAC9AAE@codehaus.org> <6BF8EA4A-040A-4565-80D2-BFC133554EE7@gmail.com> Message-ID: <9B2577C9-79C8-4A62-AF0A-8711BE047347@codehaus.org> try using JBossAS 7.1.1 for now. Mark On 26 Dec 2013, at 06:59, Swapnil Aute wrote: > With new wars too, i am getting the same error. > > Cannot validate jar : org/uberfire/client/mvp/AbstractWorkbenchEditorActivity > > Regards, > Swapnil Aute > PH:+919652538632 > > > On 24-Dec-2013, at 6:59 am, Mark Proctor wrote: > >> **READ ME** >> >> The WARs in the downloads "Drools Workbench" link are incorrect and point to a development test version; it has incorrect menu's and art work. The download can still be used for the JCR2GIT migration tool. The WARs will be corrected shortly. In the mean time you can find the correct WARs at the JBoss Nexus repository: >> >> JBossAS 7.0 >> >> Tomcat 7.0 >> >> JBoss EAP 6.1 >> >> https://repository.jboss.org/nexus/content/repositories/public-jboss/org/kie/kie-drools-wb-distribution-wars/6.0.1.Final/ >> >> On 21 Dec 2013, at 15:21, Mark Proctor wrote: >> >>> We?ve uploaded 6.0.1. >>> http://www.jboss.org/drools/downloads >>> http://www.jboss.org/drools/documentation >>> >>> We have added some extra docs explaining versioning, settings.xml and remote repositories: >>> http://docs.jboss.org/drools/release/6.0.1.Final/drools-docs/html/KIEChapter.html#KIEDeployingSection >>> http://docs.jboss.org/drools/release/6.0.1.Final/drools-docs/html/KIEChapter.html#KIEDeployCheatSheets >>> >>> 5.6 CR1 is still available for testing and can be downloaded from the maven repository: >>> http://search.maven.org/#search%7Cga%7C1%7Cg%3A%22org.drools%22%20AND%20v%3A%225.6.0.CR1%22 >>> >>> Daily snapshots can be found here: >>> http://downloads.jboss.org/drools/release/snapshot/ >>> >>> Mark >> >> _______________________________________________ >> rules-users mailing list >> rules-users at lists.jboss.org >> https://lists.jboss.org/mailman/listinfo/rules-users > _______________________________________________ > rules-users mailing list > rules-users at lists.jboss.org > https://lists.jboss.org/mailman/listinfo/rules-users -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.jboss.org/pipermail/rules-users/attachments/20131226/2d02725f/attachment.html From soumya.bose at plavaga.in Thu Dec 26 09:10:51 2013 From: soumya.bose at plavaga.in (Soumya.plavaga) Date: Thu, 26 Dec 2013 06:10:51 -0800 (PST) Subject: [rules-users] Drools 6.0.0.Final - importing rules from multiple maven projects Message-ID: <1388067051025-4027425.post@n3.nabble.com> We want to keep separate the client specific rules & common set of rules. We have created two different maven projects. one project having the common drls say 'A'. Another project having the client specific drls say 'B'. 'B' having dependency on 'A'. We want to load the rules in run time. We have tried the below approach - Tried to retrieve the kieSession using release id of project 'B' and fired all rules in that kieSession. But only the rules of project 'B' is getting executed but the rules within project 'A' are not getting loaded. What can be the possible approach to import rules from multiple projects. -- View this message in context: http://drools.46999.n3.nabble.com/Drools-6-0-0-Final-importing-rules-from-multiple-maven-projects-tp4027425.html Sent from the Drools: User forum mailing list archive at Nabble.com. From mproctor at codehaus.org Thu Dec 26 09:24:42 2013 From: mproctor at codehaus.org (Mark Proctor) Date: Thu, 26 Dec 2013 14:24:42 +0000 Subject: [rules-users] Drools 6.0.0.Final - importing rules from multiple maven projects In-Reply-To: <1388067051025-4027425.post@n3.nabble.com> References: <1388067051025-4027425.post@n3.nabble.com> Message-ID: look at the ?includes? example. You can include the resources from any KieBase, that has an ID. IF those are in another Maven module, as it as a dependency. http://docs.jboss.org/drools/release/6.0.0.Final/drools-docs/html/KIEChapter.html#KIEExamplesSection Mark On 26 Dec 2013, at 14:10, Soumya.plavaga wrote: > We want to keep separate the client specific rules & common set of rules. We > have created two different maven projects. one project having the common > drls say 'A'. Another project having the client specific drls say 'B'. 'B' > having dependency on 'A'. We want to load the rules in run time. We have > tried the below approach - > > Tried to retrieve the kieSession using release id of project 'B' and fired > all rules in that kieSession. But only the rules of project 'B' is getting > executed but the rules within project 'A' are not getting loaded. > > What can be the possible approach to import rules from multiple projects. > > > > -- > View this message in context: http://drools.46999.n3.nabble.com/Drools-6-0-0-Final-importing-rules-from-multiple-maven-projects-tp4027425.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 Thu Dec 26 21:31:05 2013 From: plz.write.to at gmail.com (Sonata) Date: Thu, 26 Dec 2013 18:31:05 -0800 (PST) Subject: [rules-users] Adding @PropertyReactive causes the other rules removed from the stack In-Reply-To: <52B4968E.2010502@gmail.com> References: <1387520044752-4027374.post@n3.nabble.com> <52B3F052.6060709@gmail.com> <1387530840344-4027382.post@n3.nabble.com> <9AE644C8-9ADC-455E-B130-282E1CF8C5D4@codehaus.org> <516132EC-F26D-4341-B21C-574B6AD9555B@codehaus.org> <52B4968E.2010502@gmail.com> Message-ID: <1388111464998-4027428.post@n3.nabble.com> Davide Sottara wrote > Confirmed, works as expected in 5.6.CR1 > Davide Thanks, but does that mean that it is bugged in 5.5.0 and is not going to be patched in 5.5.x? -- View this message in context: http://drools.46999.n3.nabble.com/Adding-PropertyReactive-causes-the-other-rules-removed-from-the-stack-tp4027374p4027428.html Sent from the Drools: User forum mailing list archive at Nabble.com. From mayank.kumar at gmail.com Thu Dec 26 21:50:59 2013 From: mayank.kumar at gmail.com (Mayank) Date: Fri, 27 Dec 2013 08:20:59 +0530 Subject: [rules-users] Unable to have KBase recognize our DRL files Message-ID: Hi, We are in the process of upgrading Drools in our application. Until 5.x the following spring configuration used to work well for us: With an inejection of this KnowledgeBase, we would create a stateless session and fire all rules after inserting appropriate facts and globals. After upgrading to Drools 6, our DRL files don't seem to be getting picked up in the knowledge base - we are using the following spring configuration: This KnowledgeBase gets injected in our code but it doesn't seem to pick up the DRL files in the specified package. We have ensure that the drl files are under src/main/resources/*com/acme/rules *and that package is specified in each DRL file at the top. Am I missing something in this new configuration? thnx, -mayank -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.jboss.org/pipermail/rules-users/attachments/20131227/006ad1f5/attachment.html From dejielin at dbs.com Thu Dec 26 21:53:43 2013 From: dejielin at dbs.com (dejie) Date: Thu, 26 Dec 2013 18:53:43 -0800 (PST) Subject: [rules-users] Active-Active setup on Drools Message-ID: <1388112823978-4027430.post@n3.nabble.com> Hi, Would like to find out how to setup two Drools instances with both Active-Active for HA purpose? Is there a way to ensure the knowledge bases are in sync? As part of my company policy, critical applications should have redundancy locally on top of the disaster recovery requirement. Therefore, am posting the question here. Thanks dejie -- View this message in context: http://drools.46999.n3.nabble.com/Active-Active-setup-on-Drools-tp4027430.html Sent from the Drools: User forum mailing list archive at Nabble.com. From mproctor at codehaus.org Thu Dec 26 22:33:39 2013 From: mproctor at codehaus.org (Mark Proctor) Date: Fri, 27 Dec 2013 03:33:39 +0000 Subject: [rules-users] Adding @PropertyReactive causes the other rules removed from the stack In-Reply-To: <1388111464998-4027428.post@n3.nabble.com> References: <1387520044752-4027374.post@n3.nabble.com> <52B3F052.6060709@gmail.com> <1387530840344-4027382.post@n3.nabble.com> <9AE644C8-9ADC-455E-B130-282E1CF8C5D4@codehaus.org> <516132EC-F26D-4341-B21C-574B6AD9555B@codehaus.org> <52B4968E.2010502@gmail.com> <1388111464998-4027428.post@n3.nabble.com> Message-ID: <14DA4A22-348D-4B21-AA41-FB5807438D14@codehaus.org> We do not do maintenance ?patch? releases of older community releases, only product releases. http://blog.athico.com/2011/04/drools-jbpm-community-versus-product.html Did you check if the unit test fails on 5.5? Mark On 27 Dec 2013, at 02:31, Sonata wrote: > Davide Sottara wrote >> Confirmed, works as expected in 5.6.CR1 >> Davide > > Thanks, but does that mean that it is bugged in 5.5.0 and is not going to be > patched in 5.5.x? > > > > > -- > View this message in context: http://drools.46999.n3.nabble.com/Adding-PropertyReactive-causes-the-other-rules-removed-from-the-stack-tp4027374p4027428.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 Dec 27 00:39:57 2013 From: vinodkiran at usa.net (P. Vinod Kiran) Date: Fri, 27 Dec 2013 11:29:57 +0550 Subject: [rules-users] Unable to have KBase recognize our DRL files Message-ID: <671RLAF762848S03.1388123997@web03.cms.usa.net> Mayank, Can you try adding the ksession tag? Also, can you post the relevant sections of the console log? - Vinod > From: Mayank > Subject: [rules-users] Unable to have KBase recognize our DRL files > Date: 27 December 2013 02:50:59 GMT > To: rules-users at lists.jboss.org > Reply-To: Rules Users List > > Hi, > > We are in the process of upgrading Drools in our application. Until 5.x the following spring configuration used to work well for us: > > > > > > > > > With an inejection of this KnowledgeBase, we would create a stateless session and fire all rules after inserting appropriate facts and globals. > > After upgrading to Drools 6, our DRL files don't seem to be getting picked up in the knowledge base - we are using the following spring configuration: > > > > > > > > This KnowledgeBase gets injected in our code but it doesn't seem to pick up the DRL files in the specified package. We have ensure that the drl files are under src/main/resources/com/acme/rules and that package is specified in each DRL file at the top. > > Am I missing something in this new configuration? > > thnx, > -mayank > _______________________________________________ > rules-users mailing list > rules-users at lists.jboss.org > https://lists.jboss.org/mailman/listinfo/rules-users From 18922445710 at 189.cn Fri Dec 27 04:19:58 2013 From: 18922445710 at 189.cn (18922445710) Date: Fri, 27 Dec 2013 17:19:58 +0800 Subject: [rules-users] Drools6.0 Security Issues Message-ID: <201312271713219674365@189.cn> Hello, everyone, Greetings! I want to use Drools6.0 in my project,but I found a security issue. The Drools6.0 automatically import the java.lang.* packages. As we all know, thess packages including some package such as Process class,which can damage the application's security. So, I want know how to prohibit some package from executing in rule configure file(including drl,decistion tablea) or program code. Thank you everyone . With my best wishes! Sincerely yours, philip -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.jboss.org/pipermail/rules-users/attachments/20131227/25ef3bd6/attachment.html From xu_han_zi at 163.com Fri Dec 27 05:25:25 2013 From: xu_han_zi at 163.com (scarlettxu) Date: Fri, 27 Dec 2013 02:25:25 -0800 (PST) Subject: [rules-users] rule condition problem in drools 5.5.0 Final Message-ID: <1388139925629-4027434.post@n3.nabble.com> Hi expert, expect you can have a look of our problem and give any suggestions we are using drools 5.2.0 Final now, but we want to change to 5.5.0 Final in order to use some new features. while in the testing of 5.5.0 Final version, we find a problem below we have a simple testing rule as below rule "single todoitem_31" salience 65503 activation-group "filter" when $list : List(size==1) from collect(ToDoItemTO() over window : length(2)) todo:ToDoItemTO(status in ('DELAY')) then transToDoItems.add($list.get(0)); logger.debug('rule1, size is '+$list.size()+', '+$list.get(0)); end when we insert 1 fact into working memory, this rule can be fired. it is correct when we insert 2 facts into working memory, this rule cannot be fired. as the size in sliding window is 2 now. it is correct. then we test insert 3 facts, while this rule is fired. This is the problem, currently there should be 2 facts in the sliding window, we can print the size, the size is indeed 2. but why this rule will be fired? we test the same case in version 5.2.0 Final, there is no problem. Anyone know if this is a bug of 5.5.0 Final or we have wrong practice in writing the condition? -- View this message in context: http://drools.46999.n3.nabble.com/rule-condition-problem-in-drools-5-5-0-Final-tp4027434.html Sent from the Drools: User forum mailing list archive at Nabble.com. From anijit.sarkar at gmail.com Fri Dec 27 05:46:47 2013 From: anijit.sarkar at gmail.com (anij) Date: Fri, 27 Dec 2013 02:46:47 -0800 (PST) Subject: [rules-users] Drools 5.4 : DRL : Issues using java.util.Map and > operator in Condition Message-ID: <1388141207085-4027435.post@n3.nabble.com> Hi, I'm facing problem when I'm using Map and > Operator in condition section. I'm using version 5.4. this is my RULE: :::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::: package resouces.rules import java.util.*; rule "Valid Age_BNG" agenda-group "Check user Eligibility_BNG" salience 1 no-loop true when map : Map() eval(map.get("Age") > 18 ) then map.put("Age_Validation",true); update(map); System.out.println("RULE : "+drools.getRule().getName() ); end :::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::: And error message : :::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::: Rule Compilation error : [Rule name='Valid Age_BNG'] resouces/rules/Rule_Valid_Age_BNG_d2a9c84690ba457b900a0578788bdd23.java (8:313) : The operator > is undefined for the argument type(s) Object, int :::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::: -- View this message in context: http://drools.46999.n3.nabble.com/Drools-5-4-DRL-Issues-using-java-util-Map-and-operator-in-Condition-tp4027435.html Sent from the Drools: User forum mailing list archive at Nabble.com. From wolfgang.laun at gmail.com Fri Dec 27 06:17:57 2013 From: wolfgang.laun at gmail.com (Wolfgang Laun) Date: Fri, 27 Dec 2013 12:17:57 +0100 Subject: [rules-users] Active-Active setup on Drools In-Reply-To: <1388112823978-4027430.post@n3.nabble.com> References: <1388112823978-4027430.post@n3.nabble.com> Message-ID: On 27/12/2013, dejie wrote: > Hi, > > Would like to find out how to setup two Drools instances with both > Active-Active for HA purpose? Hilarious Assertions? Hideous Accidents? Holistic Acquisitions? Why is it that everybody thinks that everybody can interpret their MOA? > Is there a way to ensure the knowledge bases > are in sync? Yes. Use event listeners to track firing rules. To compare participating facts, you'll have to make sure they have some serializable identification. All in all, not too difficult. -W PS: MOA = Most Obscure Acronym. > > As part of my company policy, critical applications should have redundancy > locally on top of the disaster recovery requirement. Therefore, am posting > the question here. > > Thanks > dejie > > > > -- > View this message in context: > http://drools.46999.n3.nabble.com/Active-Active-setup-on-Drools-tp4027430.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 Fri Dec 27 06:24:52 2013 From: wolfgang.laun at gmail.com (Wolfgang Laun) Date: Fri, 27 Dec 2013 12:24:52 +0100 Subject: [rules-users] Drools 5.4 : DRL : Issues using java.util.Map and > operator in Condition In-Reply-To: <1388141207085-4027435.post@n3.nabble.com> References: <1388141207085-4027435.post@n3.nabble.com> Message-ID: See inline. On 27/12/2013, anij wrote: > > Hi, > I'm facing problem when I'm using Map and > Operator in condition section. > I'm using version 5.4. > > this is my RULE: > :::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::: > package resouces.rules > > import java.util.*; > > rule "Valid Age_BNG" > agenda-group "Check user Eligibility_BNG" > salience 1 > no-loop true > when > map : Map() > eval(map.get("Age") > 18 ) This should work if map is Map, but... > then > map.put("Age_Validation",true); ...this statement indicates that Boolean is acceptable as an entry type of Map map, too... > update(map); > System.out.println("RULE : "+drools.getRule().getName() ); > end > :::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::: > > And error message : > :::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::: > Rule Compilation error : [Rule name='Valid Age_BNG'] > resouces/rules/Rule_Valid_Age_BNG_d2a9c84690ba457b900a0578788bdd23.java > (8:313) : The operator > is undefined for the argument type(s) Object, int ...and the error message even indicates that some compiler thinks that the left hand side of the comparison has type java.Object. Therefore, it is reasonable to assume that the Map map is not Map but Map. Try a plain old Java-style cast where you are sure that the map element is an Integer. -W > :::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::: > > > > -- > View this message in context: > http://drools.46999.n3.nabble.com/Drools-5-4-DRL-Issues-using-java-util-Map-and-operator-in-Condition-tp4027435.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 Fri Dec 27 06:33:57 2013 From: dsotty at gmail.com (Davide Sottara) Date: Fri, 27 Dec 2013 12:33:57 +0100 Subject: [rules-users] Drools 5.4 : DRL : Issues using java.util.Map and > operator in Condition In-Reply-To: References: <1388141207085-4027435.post@n3.nabble.com> Message-ID: <52BD65A5.8010808@gmail.com> I haven't checked 5.4, but in later versions you should be able to write: when Map( this[ "age" ] > 18 ) Davide On 12/27/2013 12:24 PM, Wolfgang Laun wrote: > See inline. > > On 27/12/2013, anij wrote: >> Hi, >> I'm facing problem when I'm using Map and > Operator in condition section. >> I'm using version 5.4. >> >> this is my RULE: >> :::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::: >> package resouces.rules >> >> import java.util.*; >> >> rule "Valid Age_BNG" >> agenda-group "Check user Eligibility_BNG" >> salience 1 >> no-loop true >> when >> map : Map() >> eval(map.get("Age") > 18 ) > This should work if map is Map, but... > >> then >> map.put("Age_Validation",true); > ...this statement indicates that Boolean is acceptable as an entry > type of Map map, too... > >> update(map); >> System.out.println("RULE : "+drools.getRule().getName() ); >> end >> :::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::: >> >> And error message : >> :::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::: >> Rule Compilation error : [Rule name='Valid Age_BNG'] >> resouces/rules/Rule_Valid_Age_BNG_d2a9c84690ba457b900a0578788bdd23.java >> (8:313) : The operator > is undefined for the argument type(s) Object, int > ...and the error message even indicates that some compiler thinks that > the left hand side of the comparison has type java.Object. Therefore, > it is reasonable to assume that the Map map is not Map > but Map. > > Try a plain old Java-style cast where you are sure that the map > element is an Integer. > > -W > >> :::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::: >> >> >> >> -- >> View this message in context: >> http://drools.46999.n3.nabble.com/Drools-5-4-DRL-Issues-using-java-util-Map-and-operator-in-Condition-tp4027435.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 anijit.sarkar at gmail.com Fri Dec 27 07:07:28 2013 From: anijit.sarkar at gmail.com (anij) Date: Fri, 27 Dec 2013 04:07:28 -0800 (PST) Subject: [rules-users] Drools 5.4 : DRL : Issues using java.util.Map and > operator in Condition In-Reply-To: References: <1388141207085-4027435.post@n3.nabble.com> Message-ID: <1388146048312-4027439.post@n3.nabble.com> Thanks laune!! This type cast save me for the day!! *eval((Integer) map.get("Age") > 18 )* Cheers!! Happy week End!! -- View this message in context: http://drools.46999.n3.nabble.com/Drools-5-4-DRL-Issues-using-java-util-Map-and-operator-in-Condition-tp4027435p4027439.html Sent from the Drools: User forum mailing list archive at Nabble.com. From wolfgang.laun at gmail.com Fri Dec 27 07:41:21 2013 From: wolfgang.laun at gmail.com (Wolfgang Laun) Date: Fri, 27 Dec 2013 13:41:21 +0100 Subject: [rules-users] Drools6.0 Security Issues In-Reply-To: <201312271713219674365@189.cn> References: <201312271713219674365@189.cn> Message-ID: An automatic import of java.lang.* isn't a Drools feature - it is a Java feature, and, ultimately, RHS code needs to be passed to a Java compiler. Moreover, even when Java itself would not automatically import java.lang.Process, using the full-blown class name in the code still gives you access to that class. -W On 27/12/2013, 18922445710 <18922445710 at 189.cn> wrote: > Hello, everyone, > Greetings! > > I want to use Drools6.0 in my project,but I found a security issue. The > Drools6.0 automatically import the java.lang.* packages. > As we all know, thess packages including some package such as Process > class,which can damage the application's security. > So, I want know how to prohibit some package from executing in rule > configure file(including drl,decistion tablea) or program code. > Thank you everyone . > > With my best wishes! > > Sincerely yours, philip From wolfgang.laun at gmail.com Fri Dec 27 07:48:51 2013 From: wolfgang.laun at gmail.com (Wolfgang Laun) Date: Fri, 27 Dec 2013 13:48:51 +0100 Subject: [rules-users] rule condition problem in drools 5.5.0 Final In-Reply-To: <1388139925629-4027434.post@n3.nabble.com> References: <1388139925629-4027434.post@n3.nabble.com> Message-ID: Looks like a bug, try 5.6.0. But I wonder about the strange way of writing this rule. A much simpler way would be when todo: ToDoItemTO(status in ('DELAY')) not ToDoItemTO( this != todo ) then -W On 27/12/2013, scarlettxu wrote: > Hi expert, > > expect you can have a look of our problem and give any suggestions > > we are using drools 5.2.0 Final now, but we want to change to 5.5.0 Final > in > order to use some new features. > > while in the testing of 5.5.0 Final version, we find a problem below > > we have a simple testing rule as below > rule "single todoitem_31" > salience 65503 > activation-group "filter" > when > $list : List(size==1) from collect(ToDoItemTO() over window : length(2)) > todo:ToDoItemTO(status in ('DELAY')) > then > transToDoItems.add($list.get(0)); > logger.debug('rule1, size is '+$list.size()+', '+$list.get(0)); > end > > when we insert 1 fact into working memory, this rule can be fired. it is > correct > when we insert 2 facts into working memory, this rule cannot be fired. as > the size in sliding window is 2 now. it is correct. > then we test insert 3 facts, while this rule is fired. This is the problem, > currently there should be 2 facts in the sliding window, we can print the > size, the size is indeed 2. but why this rule will be fired? > > we test the same case in version 5.2.0 Final, there is no problem. > > Anyone know if this is a bug of 5.5.0 Final or we have wrong practice in > writing the condition? > > > > -- > View this message in context: > http://drools.46999.n3.nabble.com/rule-condition-problem-in-drools-5-5-0-Final-tp4027434.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 Fri Dec 27 08:05:19 2013 From: wolfgang.laun at gmail.com (Wolfgang Laun) Date: Fri, 27 Dec 2013 14:05:19 +0100 Subject: [rules-users] Drools 5.4 : DRL : Issues using java.util.Map and > operator in Condition In-Reply-To: <1388146048312-4027439.post@n3.nabble.com> References: <1388141207085-4027435.post@n3.nabble.com> <1388146048312-4027439.post@n3.nabble.com> Message-ID: Davide's suggestion also works in 5.4.0. -W On 27/12/2013, anij wrote: > Thanks laune!! > This type cast save me for the day!! > > *eval((Integer) map.get("Age") > 18 )* > > > Cheers!! > Happy week End!! > > > > -- > View this message in context: > http://drools.46999.n3.nabble.com/Drools-5-4-DRL-Issues-using-java-util-Map-and-operator-in-Condition-tp4027435p4027439.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 18922445710 at 189.cn Fri Dec 27 08:24:44 2013 From: 18922445710 at 189.cn (philip) Date: Fri, 27 Dec 2013 05:24:44 -0800 (PST) Subject: [rules-users] Drools6.0 Security Issues In-Reply-To: References: <201312271713219674365@189.cn> Message-ID: <1388150684315-4027445.post@n3.nabble.com> Thank you for your reply. If existing some package or class on the rule 's RHS ,How to filter them ,and forbid execute this rule. -- View this message in context: http://drools.46999.n3.nabble.com/rules-users-Drools6-0-Security-Issues-tp4027433p4027445.html Sent from the Drools: User forum mailing list archive at Nabble.com. From dsotty at gmail.com Fri Dec 27 13:18:43 2013 From: dsotty at gmail.com (Davide Sottara) Date: Fri, 27 Dec 2013 19:18:43 +0100 Subject: [rules-users] rule condition problem in drools 5.5.0 Final In-Reply-To: References: <1388139925629-4027434.post@n3.nabble.com> Message-ID: <52BDC483.3070605@gmail.com> I could not reproduce the problem in 5.6 either. Please try 5.6.0-CR1 and consider upgrading, 5.6.Final will be released - I guess - just after the holidays and will not have substantial differences from CR1. On the other hand, if the test fails in 5.6 too, please submit a reproducer. Thanks Davide On 12/27/2013 01:48 PM, Wolfgang Laun wrote: > Looks like a bug, try 5.6.0. > > But I wonder about the strange way of writing this rule. A much > simpler way would be > when > todo: ToDoItemTO(status in ('DELAY')) > not ToDoItemTO( this != todo ) > then > > -W > > > On 27/12/2013, scarlettxu wrote: >> Hi expert, >> >> expect you can have a look of our problem and give any suggestions >> >> we are using drools 5.2.0 Final now, but we want to change to 5.5.0 Final >> in >> order to use some new features. >> >> while in the testing of 5.5.0 Final version, we find a problem below >> >> we have a simple testing rule as below >> rule "single todoitem_31" >> salience 65503 >> activation-group "filter" >> when >> $list : List(size==1) from collect(ToDoItemTO() over window : length(2)) >> todo:ToDoItemTO(status in ('DELAY')) >> then >> transToDoItems.add($list.get(0)); >> logger.debug('rule1, size is '+$list.size()+', '+$list.get(0)); >> end >> >> when we insert 1 fact into working memory, this rule can be fired. it is >> correct >> when we insert 2 facts into working memory, this rule cannot be fired. as >> the size in sliding window is 2 now. it is correct. >> then we test insert 3 facts, while this rule is fired. This is the problem, >> currently there should be 2 facts in the sliding window, we can print the >> size, the size is indeed 2. but why this rule will be fired? >> >> we test the same case in version 5.2.0 Final, there is no problem. >> >> Anyone know if this is a bug of 5.5.0 Final or we have wrong practice in >> writing the condition? >> >> >> >> -- >> View this message in context: >> http://drools.46999.n3.nabble.com/rule-condition-problem-in-drools-5-5-0-Final-tp4027434.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 wolfgang.laun at gmail.com Fri Dec 27 14:50:15 2013 From: wolfgang.laun at gmail.com (Wolfgang Laun) Date: Fri, 27 Dec 2013 20:50:15 +0100 Subject: [rules-users] Drools6.0 Security Issues In-Reply-To: <1388150684315-4027445.post@n3.nabble.com> References: <201312271713219674365@189.cn> <1388150684315-4027445.post@n3.nabble.com> Message-ID: You might want to look into the topic of the Java platform's security manager, which provides features for running untrusted SW. This list may not be the best place to ask about details w.r.t. this topic. The idea of inspecting DRL source code to detect the (malicious) usage of some class or other is, most certainly, not a good idea. -W On 27/12/2013, philip <18922445710 at 189.cn> wrote: > Thank you for your reply. > If existing some package or class on the rule 's RHS ,How to filter > them > ,and forbid execute this rule. > > > > -- > View this message in context: > http://drools.46999.n3.nabble.com/rules-users-Drools6-0-Security-Issues-tp4027433p4027445.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 Govind.Parashar at mastek.com Fri Dec 27 18:36:07 2013 From: Govind.Parashar at mastek.com (Govind J. Parashar) Date: Sat, 28 Dec 2013 05:06:07 +0530 Subject: [rules-users] Repositry deployment Issues Message-ID: <3D263F3272026041925D6902769498300BE0E52DEC@IND-MHP1MCL001.mastek.com> Hi All Anyone know how to dynamic deploy or export (using programmatically or through scripting ) repository in Guvnor. Thanks & regards Govind Parashar -----Original Message----- From: rules-users-bounces at lists.jboss.org [mailto:rules-users-bounces at lists.jboss.org] On Behalf Of Wolfgang Laun Sent: 27 December 2013 19:50 To: Rules Users List Subject: Re: [rules-users] Drools6.0 Security Issues You might want to look into the topic of the Java platform's security manager, which provides features for running untrusted SW. This list may not be the best place to ask about details w.r.t. this topic. The idea of inspecting DRL source code to detect the (malicious) usage of some class or other is, most certainly, not a good idea. -W On 27/12/2013, philip <18922445710 at 189.cn> wrote: > Thank you for your reply. > If existing some package or class on the rule 's RHS ,How to > filter them ,and forbid execute this rule. > > > > -- > View this message in context: > http://drools.46999.n3.nabble.com/rules-users-Drools6-0-Security-Issue > s-tp4027433p4027445.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 MASTEK LTD. In the US, we're called MAJESCOMASTEK ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Opinions expressed in this e-mail are those of the individual and not that of Mastek Limited, unless specifically indicated to that effect. Mastek Limited does not accept any responsibility or liability for it. This e-mail and attachments (if any) transmitted with it are confidential and/or privileged and solely for the use of the intended person or entity to which it is addressed. Any review, re-transmission, dissemination or other use of or taking of any action in reliance upon this information by persons or entities other than the intended recipient is prohibited. This e-mail and its attachments have been scanned for the presence of computer viruses. It is the responsibility of the recipient to run the virus check on e-mails and attachments before opening them. If you have received this e-mail in error, kindly delete this e-mail from desktop and server. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ From mproctor at codehaus.org Sat Dec 28 08:13:44 2013 From: mproctor at codehaus.org (Mark Proctor) Date: Sat, 28 Dec 2013 13:13:44 +0000 Subject: [rules-users] Repositry deployment Issues In-Reply-To: <3D263F3272026041925D6902769498300BE0E52DEC@IND-MHP1MCL001.mastek.com> References: <3D263F3272026041925D6902769498300BE0E52DEC@IND-MHP1MCL001.mastek.com> Message-ID: <12992BB9-2714-47B5-9ADC-1AC76F496384@codehaus.org> for 5.x, there are a number of Rest interfaces documented, for CRUD and build operations. In 6.x you have the GIT, which has client in every language. We have exposed the Maven operations via Rest, which also build, test, install and deploy - see 6.x documentation. Mark On 27 Dec 2013, at 23:36, Govind J. Parashar wrote: > Hi All > > Anyone know how to dynamic deploy or export (using programmatically or through scripting ) repository in Guvnor. > > Thanks & regards > Govind Parashar > > > -----Original Message----- > From: rules-users-bounces at lists.jboss.org [mailto:rules-users-bounces at lists.jboss.org] On Behalf Of Wolfgang Laun > Sent: 27 December 2013 19:50 > To: Rules Users List > Subject: Re: [rules-users] Drools6.0 Security Issues > > You might want to look into the topic of the Java platform's security manager, which provides features for running untrusted SW. This list may not be the best place to ask about details w.r.t. this topic. > > The idea of inspecting DRL source code to detect the (malicious) usage of some class or other is, most certainly, not a good idea. > > -W > > On 27/12/2013, philip <18922445710 at 189.cn> wrote: >> Thank you for your reply. >> If existing some package or class on the rule 's RHS ,How to >> filter them ,and forbid execute this rule. >> >> >> >> -- >> View this message in context: >> http://drools.46999.n3.nabble.com/rules-users-Drools6-0-Security-Issue >> s-tp4027433p4027445.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 > MASTEK LTD. > In the US, we're called MAJESCOMASTEK > > ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ > Opinions expressed in this e-mail are those of the individual and not that of Mastek Limited, unless specifically indicated to that effect. Mastek Limited does not accept any responsibility or liability for it. This e-mail and attachments (if any) transmitted with it are confidential and/or privileged and solely for the use of the intended person or entity to which it is addressed. Any review, re-transmission, dissemination or other use of or taking of any action in reliance upon this information by persons or entities other than the intended recipient is prohibited. This e-mail and its attachments have been scanned for the presence of computer viruses. It is the responsibility of the recipient to run the virus check on e-mails and attachments before opening them. If you have received this e-mail in error, kindly delete this e-mail from desktop and server. > ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ > > > _______________________________________________ > rules-users mailing list > rules-users at lists.jboss.org > https://lists.jboss.org/mailman/listinfo/rules-users From frank at lafr.de Sun Dec 29 16:12:34 2013 From: frank at lafr.de (Frank Langelage) Date: Sun, 29 Dec 2013 22:12:34 +0100 Subject: [rules-users] Create kieBase programmatically: WARN "No files found for KieBase defaultKieBase"? Message-ID: Hello, I need your help! I'm trying to migrate from Drools 5.5.0 to 6.0.1, creating the KnowledgeBase programmatically. But buildAll gives me WARN "No files found for KieBase defaultKieBase". What's missing? My code is based on the example found in documentation. fileName is pointing to an xls file with decision table. Writing it to kieFileSystem seemed to work correct, as kieFileSystem.read( fileName ).length is showing the right number of bytes. Logging output: DEBUG [RuleBuilder#buildKieBase] Get kieServices DEBUG [RuleBuilder#buildKieBase] Get kieRepository DEBUG [RuleBuilder#buildKieBase] Get new kieFileSystem DEBUG [RuleBuilder#buildKieBase] Add /mbi/etc/MailFilter_hgm2e-langfr-sb2000-ipc.xls to kieFileSystem DEBUG [RuleBuilder#buildKieBase] Get new kieBuilder DEBUG [RuleBuilder#buildKieBase] 22016 DEBUG [RuleBuilder#buildKieBase] Build all Rules WARN [org.drools.compiler.kie.builder.impl.AbstractKieModule#buildKnowledgePackages] No files found for KieBase defaultKieBase INFO [org.drools.compiler.kie.builder.impl.KieRepositoryImpl#addKieModule] KieModule was added:MemoryKieModule[ ReleaseId=org.default:artifact:1.0.0-SNAPSHOT] DEBUG [RuleBuilder#buildKieBase] Get new kieContainer DEBUG [RuleBuilder#buildKieBase] Get kieBase Code: RuleBuilder.LOGGER.debug( "Get kieServices" ); KieServices kieServices = KieServices.Factory.get(); RuleBuilder.LOGGER.debug( "Get kieRepository" ); KieRepository kieRepository = kieServices.getRepository(); RuleBuilder.LOGGER.debug( "Get new kieFileSystem" ); KieFileSystem kieFileSystem = kieServices.newKieFileSystem(); XADiskConnection connection = null; try { connection = this.xaDisk.getConnection(); XAFileInputStream fis = connection.createXAFileInputStream( new File( fileName ) ); try ( InputStream is = new XAFileInputStreamWrapper( fis ) ) { RuleBuilder.LOGGER.debug( "Add " + fileName + " to kieFileSystem" ); kieFileSystem.write( fileName, kieServices.getResources().newInputStreamResource( is ) ); } catch ( IOException e ) { // ignore } fis.close(); } catch ( FileNotExistsException e ) { // Datei '%s' nicht gefunden ServiceStringResponse ssr = this.mbiFxtxtFacade.getTranslation( Integer.valueOf( 215421 ), locales ); throw new MbiException( e, RuleBuilder.LOGGER, String.format( ssr.getValue(), fileName ) ); } catch ( InsufficientPermissionOnFileException | LockingFailedException | NoTransactionAssociatedException e ) { throw new MbiException( e, RuleBuilder.LOGGER ); } catch ( ResourceException | InterruptedException e ) { throw new MbiException( e, RuleBuilder.LOGGER ); } finally { if ( connection != null ) { connection.close(); } } RuleBuilder.LOGGER.debug( "Get new kieBuilder" ); KieBuilder kieBuilder = kieServices.newKieBuilder( kieFileSystem ); RuleBuilder.LOGGER.debug( kieFileSystem.read( fileName ).length ); RuleBuilder.LOGGER.debug( "Build all Rules" ); kieBuilder.buildAll(); RuleBuilder.LOGGER.debug( "Get new kieContainer" ); KieContainer kieContainer = kieServices.newKieContainer( kieRepository.getDefaultReleaseId() ); RuleBuilder.LOGGER.debug( "Get kieBase" ); KieBase kieBase = kieContainer.getKieBase(); From zahid.ahmed at emirates.com Mon Dec 30 02:19:50 2013 From: zahid.ahmed at emirates.com (Zahid Ahmed) Date: Mon, 30 Dec 2013 07:19:50 +0000 Subject: [rules-users] JBPM : How to Listen Once ResourceChangeScanner Modifies the package after Changes Message-ID: Hi, I want to upgrade my process instances using WorkflowProcessInstanceUpgrader. To trigger the upgrade after any change I wanted to listen for changes completed by ResourceChangeScanner. To listen the completion of changes I was looking to configure KnowledgeBaseEventListener. I have drools-spring-integration in place which uses drools-spring.xsd to configure beans and event listeners. I am getting KBase and Ksession from spring. I was trying to register my KnowledgeBaseEventListener in my spring configurations. But, The issue is that drools-spring.xsd only registers 3 kind of listeners 1. ProcessEventListener 2. AgendaEventListener 3. WorkingMemoryEventListener Solution Required : 1. I need to know how to configure the KnowledgeBaseEventListener in my spring configurations ? Example for ksession we have following config to register listeners. 2. Is this the best place to trigger a batch process upgrade ? From within the KBaseEventListener ? 3. Shall I add KBaseEventListener using knowledgebase.addEventListener() ? Environment 1. Drools-5.5.0.Final a. Guvnor b. Jbpm -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.jboss.org/pipermail/rules-users/attachments/20131230/6e736a2e/attachment.html From mayank.kumar at gmail.com Mon Dec 30 03:15:53 2013 From: mayank.kumar at gmail.com (mayank_io) Date: Mon, 30 Dec 2013 00:15:53 -0800 (PST) Subject: [rules-users] Unable to have KBase recognize our DRL files In-Reply-To: <671RLAF762848S03.1388123997@web03.cms.usa.net> References: <671RLAF762848S03.1388123997@web03.cms.usa.net> Message-ID: <1388391353139-4027459.post@n3.nabble.com> Hi Vinod, Adding the ksession tag didn't help. I assumed, doing newStatelessKieSession() in the code would do the same thing. When I was trying to extract the console log as requested by you I noticed this in the log file: 13:35:31.046[main] WARN ClasspathKieProject : Unable to load pom.properties tried recursing down from/.../target/test-classes/ Taking this further, I added a pom.properties under META-INF/maven under the resources folder of this project with the following content: version=${project.version} groupId=${project.groupId} artifactId=${project.artifactId} Once this pom.properties is placed, it runs like a charm! I wonder though why this file is required and why it cannot be placed generated automatically if not found? Thanks, Mayank -- View this message in context: http://drools.46999.n3.nabble.com/rules-users-Unable-to-have-KBase-recognize-our-DRL-files-tp4027429p4027459.html Sent from the Drools: User forum mailing list archive at Nabble.com. From dwipin.c at tcs.com Mon Dec 30 03:55:47 2013 From: dwipin.c at tcs.com (dwipin) Date: Mon, 30 Dec 2013 00:55:47 -0800 (PST) Subject: [rules-users] help with drools 6 Message-ID: <1388393747403-4027460.post@n3.nabble.com> Hi, I am trying to create a project using Drools 6 with Spring. I have drools-spring-6.0.0.Beta2 as the dependency as drools-spring-6.0.0.Final is not available. I am unable to get the tag to bind in the spring application-context file. Can some one post a sample appCtx file with the kmodule xsd schema location specified ? Also, is there a working sample of using Spring with Drools 6 anywhere ? Thanks, Dwipin Chandran. -- View this message in context: http://drools.46999.n3.nabble.com/help-with-drools-6-tp4027460.html Sent from the Drools: User forum mailing list archive at Nabble.com. From mproctor at codehaus.org Mon Dec 30 10:12:20 2013 From: mproctor at codehaus.org (Mark Proctor) Date: Mon, 30 Dec 2013 15:12:20 +0000 Subject: [rules-users] help with drools 6 In-Reply-To: <1388393747403-4027460.post@n3.nabble.com> References: <1388393747403-4027460.post@n3.nabble.com> Message-ID: <1D15EC4F-705B-4411-819E-A9F5AF178F78@codehaus.org> the artefact name changed: https://repository.jboss.org/nexus/service/local/repositories/releases/content/org/kie/kie-spring/6.0.1.Final/kie-spring-6.0.1.Final.jar Mark On 30 Dec 2013, at 08:55, dwipin wrote: > Hi, > > I am trying to create a project using Drools 6 with Spring. > > I have drools-spring-6.0.0.Beta2 as the dependency as > drools-spring-6.0.0.Final is not available. > > I am unable to get the tag to bind in the spring > application-context file. Can some one post a sample appCtx file with the > kmodule xsd schema location specified ? > > Also, is there a working sample of using Spring with Drools 6 anywhere ? > > Thanks, > Dwipin Chandran. > > > > -- > View this message in context: http://drools.46999.n3.nabble.com/help-with-drools-6-tp4027460.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 Mon Dec 30 11:37:14 2013 From: mproctor at codehaus.org (Mark Proctor) Date: Mon, 30 Dec 2013 16:37:14 +0000 Subject: [rules-users] Unable to have KBase recognize our DRL files In-Reply-To: <1388391353139-4027459.post@n3.nabble.com> References: <671RLAF762848S03.1388123997@web03.cms.usa.net> <1388391353139-4027459.post@n3.nabble.com> Message-ID: <955C75A3-FC55-48C3-BAE8-2E4D7AD6E7F1@codehaus.org> All jars must have a pom.properties in there, for versioning and lookup. Maven built jars will place that in there for you. We will generate a generic pom.properties for you, if you are generating a kjar in memory with the programmatic api - but this has very limited use cases, related to in memory throw away stuff. If it?s a provided jar, then we can only use what is given. If we were to generate for this, it would mask other problems, and cause other problems. Such as KieContainer lookup, via ReleaseId. Mark On 30 Dec 2013, at 08:15, mayank_io wrote: > Hi Vinod, > > Adding the ksession tag didn't help. I assumed, doing > newStatelessKieSession() in the code would do the same thing. > > When I was trying to extract the console log as requested by you I noticed > this in the log file: > > 13:35:31.046[main] WARN ClasspathKieProject : Unable to load > pom.properties tried recursing down from/.../target/test-classes/ > > Taking this further, I added a pom.properties under META-INF/maven under the > resources folder of this project with the following content: > version=${project.version} > groupId=${project.groupId} > artifactId=${project.artifactId} > > Once this pom.properties is placed, it runs like a charm! > > I wonder though why this file is required and why it cannot be placed > generated automatically if not found? > > Thanks, > Mayank > > > > > -- > View this message in context: http://drools.46999.n3.nabble.com/rules-users-Unable-to-have-KBase-recognize-our-DRL-files-tp4027429p4027459.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 Mon Dec 30 13:41:57 2013 From: vinodkiran at usa.net (vinodkiran) Date: Mon, 30 Dec 2013 10:41:57 -0800 (PST) Subject: [rules-users] help with drools 6 In-Reply-To: <1388393747403-4027460.post@n3.nabble.com> References: <1388393747403-4027460.post@n3.nabble.com> Message-ID: <1388428917185-4027463.post@n3.nabble.com> take a look at 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/help-with-drools-6-tp4027460p4027463.html Sent from the Drools: User forum mailing list archive at Nabble.com. From glambe2 at hotmail.com Mon Dec 30 14:38:44 2013 From: glambe2 at hotmail.com (glambert27) Date: Mon, 30 Dec 2013 11:38:44 -0800 (PST) Subject: [rules-users] Interupting Stateful session Message-ID: <1388432324954-4027464.post@n3.nabble.com> Hi, I have a project that requires the use of stateful sessions. Upwards of 70K facts are inserted into the session. As a result the running time for the rules to run is upwards of 10-15mins. I need a way to have the user cancel the running rule process. Using a listener perhaps? I've attached my rule file sanitized to protect the innocent. sanitized_rules.drl I'd appreciate any help or incite. maybe some help in getting my rules to run faster as well. -- View this message in context: http://drools.46999.n3.nabble.com/Interupting-Stateful-session-tp4027464.html Sent from the Drools: User forum mailing list archive at Nabble.com. From wtang at kana.com Mon Dec 30 14:53:37 2013 From: wtang at kana.com (wtang) Date: Mon, 30 Dec 2013 11:53:37 -0800 (PST) Subject: [rules-users] Then part of DRL file can not use Java Generic? Message-ID: <1388433217397-4027465.post@n3.nabble.com> Does Drools DRL file support Java generic? I have the following in THEN part of the DRL rule file: import java.util.*; ..... Then List stringList = new ArrayList(); // error could not resolve class ArrayList But If I do: List stringList = new ArrayList(); // this works fine! thx! -- View this message in context: http://drools.46999.n3.nabble.com/Then-part-of-DRL-file-can-not-use-Java-Generic-tp4027465.html Sent from the Drools: User forum mailing list archive at Nabble.com. From wolfgang.laun at gmail.com Mon Dec 30 15:08:58 2013 From: wolfgang.laun at gmail.com (Wolfgang Laun) Date: Mon, 30 Dec 2013 21:08:58 +0100 Subject: [rules-users] Interupting Stateful session In-Reply-To: <1388432324954-4027464.post@n3.nabble.com> References: <1388432324954-4027464.post@n3.nabble.com> Message-ID: Why not simply interrupt the thread running the engine? -W On 30/12/2013, glambert27 wrote: > Hi, > I have a project that requires the use of stateful sessions. Upwards of 70K > facts are inserted into the session. As a result the running time for the > rules to run is upwards of 10-15mins. I need a way to have the user cancel > the running rule process. Using a listener perhaps? I've attached my rule > file sanitized to protect the innocent. sanitized_rules.drl > > > I'd appreciate any help or incite. maybe some help in getting my rules to > run faster as well. > > > > -- > View this message in context: > http://drools.46999.n3.nabble.com/Interupting-Stateful-session-tp4027464.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 Dec 30 15:12:28 2013 From: wolfgang.laun at gmail.com (Wolfgang Laun) Date: Mon, 30 Dec 2013 21:12:28 +0100 Subject: [rules-users] Then part of DRL file can not use Java Generic? In-Reply-To: <1388433217397-4027465.post@n3.nabble.com> References: <1388433217397-4027465.post@n3.nabble.com> Message-ID: Drools version? Also, details such as the setting of the "dialect" option? -W On 30/12/2013, wtang wrote: > Does Drools DRL file support Java generic? I have the following in THEN > part > of the DRL rule file: > > import java.util.*; > > ..... > > Then > > List stringList = new ArrayList(); // error could not > resolve class ArrayList > > But If I do: > > List stringList = new ArrayList(); // this works fine! > > > thx! > > > > > > -- > View this message in context: > http://drools.46999.n3.nabble.com/Then-part-of-DRL-file-can-not-use-Java-Generic-tp4027465.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 Mon Dec 30 16:34:44 2013 From: wtang at kana.com (wtang) Date: Mon, 30 Dec 2013 13:34:44 -0800 (PST) Subject: [rules-users] Then part of DRL file can not use Java Generic? In-Reply-To: References: <1388433217397-4027465.post@n3.nabble.com> Message-ID: <1388439284460-4027468.post@n3.nabble.com> Drools version 6.0, dialect "mvel": package com.sample import java.util.*; import java.util.ArrayList; rule "Internal Assignment with Map using constant and path" dialect "mvel" when $map: Map(this["EmailED.subject"] == "hello there") then ActionParam actionParam = new ActionParam(); List actionParamList = new ArrayList(); List actionList = new ArrayList(); -- View this message in context: http://drools.46999.n3.nabble.com/Then-part-of-DRL-file-can-not-use-Java-Generic-tp4027465p4027468.html Sent from the Drools: User forum mailing list archive at Nabble.com. From glambe2 at hotmail.com Mon Dec 30 21:18:58 2013 From: glambe2 at hotmail.com (glambert27) Date: Mon, 30 Dec 2013 18:18:58 -0800 (PST) Subject: [rules-users] Interupting Stateful session In-Reply-To: References: <1388432324954-4027464.post@n3.nabble.com> Message-ID: <1388456337970-4027469.post@n3.nabble.com> actually, I think session.halt() will solve my problem. I'll update shortly -- View this message in context: http://drools.46999.n3.nabble.com/Interupting-Stateful-session-tp4027464p4027469.html Sent from the Drools: User forum mailing list archive at Nabble.com. From glambe2 at hotmail.com Mon Dec 30 21:24:00 2013 From: glambe2 at hotmail.com (glambert27) Date: Mon, 30 Dec 2013 18:24:00 -0800 (PST) Subject: [rules-users] Running Feedback during drools run Message-ID: <1388456640186-4027470.post@n3.nabble.com> I have a project that requires the use of stateful sessions. Upwards of 70K facts are inserted into the session. As a result the running time for the rules to run is upwards of 10-15mins. I need a way to have the user to get feedback of running rule process. Statusbar or something of the likes? I've attached my rule file sanitized to protect the innocent. sanitized_rules.drl -- View this message in context: http://drools.46999.n3.nabble.com/Running-Feedback-during-drools-run-tp4027470.html Sent from the Drools: User forum mailing list archive at Nabble.com. From swapnilaute at gmail.com Tue Dec 31 00:53:38 2013 From: swapnilaute at gmail.com (neal) Date: Mon, 30 Dec 2013 21:53:38 -0800 (PST) Subject: [rules-users] Is there any API in drools 6.0, which creates drl file? Message-ID: <1388469218291-4027471.post@n3.nabble.com> I am looking for an API in drools 6.0, Which will create a drl file? I am aware about this thing, http://drools.46999.n3.nabble.com/How-to-create-a-drl-file-or-decision-table-dynamically-td3772708.html https://github.com/droolsjbpm/drools/blob/master/drools-compiler/src/test/java/org/drools/lang/api/DescrBuilderTest.java Old API: https://github.com/droolsjbpm/drools/tree/master/drools-compiler/src/main/java/org/drools/lang/api IS there any new API in drool 6.0? OR any better way to do it? -- View this message in context: http://drools.46999.n3.nabble.com/Is-there-any-API-in-drools-6-0-which-creates-drl-file-tp4027471.html Sent from the Drools: User forum mailing list archive at Nabble.com. From wolfgang.laun at gmail.com Tue Dec 31 01:45:03 2013 From: wolfgang.laun at gmail.com (Wolfgang Laun) Date: Tue, 31 Dec 2013 07:45:03 +0100 Subject: [rules-users] Running Feedback during drools run In-Reply-To: <1388456640186-4027470.post@n3.nabble.com> References: <1388456640186-4027470.post@n3.nabble.com> Message-ID: You can use event listeners to keep track of the pending activations, which is (sort of) a measure of the remaining work to be done until the engine has fired all rules. Also, if you know the number of facts to be inserted, displaying the number of facts that remain to be inserted is another measure of the work to be done until fireAllRules is (usually) called. -W On 31/12/2013, glambert27 wrote: > I have a project that requires the use of stateful sessions. Upwards of 70K > facts are inserted into the session. As a result the running time for the > rules to run is upwards of 10-15mins. I need a way to have the user to get > feedback of running rule process. Statusbar or something of the likes? > I've attached my rule file sanitized to protect the innocent. > sanitized_rules.drl > > > > > > > -- > View this message in context: > http://drools.46999.n3.nabble.com/Running-Feedback-during-drools-run-tp4027470.html > Sent from the Drools: User forum mailing list archive at Nabble.com. > _______________________________________________ > rules-users mailing list > rules-users at lists.jboss.org > https://lists.jboss.org/mailman/listinfo/rules-users > From wolfgang.laun at gmail.com Tue Dec 31 01:49:25 2013 From: wolfgang.laun at gmail.com (Wolfgang Laun) Date: Tue, 31 Dec 2013 07:49:25 +0100 Subject: [rules-users] Interupting Stateful session In-Reply-To: <1388456337970-4027469.post@n3.nabble.com> References: <1388432324954-4027464.post@n3.nabble.com> <1388456337970-4027469.post@n3.nabble.com> Message-ID: On 31/12/2013, glambert27 wrote: > actually, I think session.halt() will solve my problem. I'll update shortly Only if you have a good way of knowing when the work is done, to call halt() when there is no user interrupt. halt() was not invented for permitting an asynchronous interrupt of an Engine run. -W > > > > -- > View this message in context: > http://drools.46999.n3.nabble.com/Interupting-Stateful-session-tp4027464p4027469.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 sumantp at yahoo.com Tue Dec 31 02:01:37 2013 From: sumantp at yahoo.com (sumantp) Date: Mon, 30 Dec 2013 23:01:37 -0800 (PST) Subject: [rules-users] NPE when combining rules In-Reply-To: <1386896551888-4027267.post@n3.nabble.com> References: <1386896551888-4027267.post@n3.nabble.com> Message-ID: <1388473297866-4027474.post@n3.nabble.com> This seems to have been fixed in 6.0.1. I no longer get the exception. -- View this message in context: http://drools.46999.n3.nabble.com/NPE-when-combining-rules-tp4027267p4027474.html Sent from the Drools: User forum mailing list archive at Nabble.com. From wolfgang.laun at gmail.com Tue Dec 31 02:13:31 2013 From: wolfgang.laun at gmail.com (Wolfgang Laun) Date: Tue, 31 Dec 2013 08:13:31 +0100 Subject: [rules-users] Then part of DRL file can not use Java Generic? In-Reply-To: <1388439284460-4027468.post@n3.nabble.com> References: <1388433217397-4027465.post@n3.nabble.com> <1388439284460-4027468.post@n3.nabble.com> Message-ID: On 30/12/2013, wtang wrote: > Drools version 6.0, dialect "mvel": There you are. It's either generics or mvel. -W > > package com.sample > > import java.util.*; > import java.util.ArrayList; > > > rule "Internal Assignment with Map using constant and path" > dialect "mvel" > when > $map: Map(this["EmailED.subject"] == "hello there") > > then > > ActionParam actionParam = new ActionParam(); > List actionParamList = new ArrayList(); > List actionList = new ArrayList(); > > > > -- > View this message in context: > http://drools.46999.n3.nabble.com/Then-part-of-DRL-file-can-not-use-Java-Generic-tp4027465p4027468.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 Tue Dec 31 04:50:02 2013 From: dwipin.c at tcs.com (dwipin) Date: Tue, 31 Dec 2013 01:50:02 -0800 (PST) Subject: [rules-users] DRL file not getting picked Message-ID: <1388483401904-4027476.post@n3.nabble.com> Hi, I am using kie-spring.6.0.0.Final artefact to build my project. This is my app ctx data - My Rule Service -> ksession.fireAllRules(); log.debug("...finished running ."); My DRL File input -> package validation_rules rule "Test Rule" when then System.out.println("Testing..."); end I wanted to test with a sample rule without any conditions. However this never gets executed. This DRL file is present under src/main/resources/validation_rules. The KieSession gets injected properly though. Thanks and Regards, Dwipin Chandran. -- View this message in context: http://drools.46999.n3.nabble.com/DRL-file-not-getting-picked-tp4027476.html Sent from the Drools: User forum mailing list archive at Nabble.com. From frank at lafr.de Tue Dec 31 08:04:14 2013 From: frank at lafr.de (Frank Langelage) Date: Tue, 31 Dec 2013 14:04:14 +0100 Subject: [rules-users] Create kieBase programmatically: WARN "No files found for KieBase defaultKieBase"? In-Reply-To: References: Message-ID: <52C2C0CE.6010002@lafr.de> I'll answer myself: it's mandatory to use "src/main/resources/" as the base folder inside KieFilesystem. kieFileSystem.write( "src/main/resources/" + fileName, kieServices.getResources().newInputStreamResource( is ) ); with fileName = "etc/MailFilter.xls". Now Apache POI breaks down processing my xls file which works with drools 5.5 / JExcelApi: Caused by: java.lang.NullPointerException at org.apache.poi.poifs.property.PropertyTableBase.populatePropertyTree(PropertyTableBase.java:100) [poi.jar:3.9] at org.apache.poi.poifs.property.PropertyTableBase.(PropertyTableBase.java:63) [poi.jar:3.9] at org.apache.poi.poifs.property.PropertyTable.(PropertyTable.java:63) [poi.jar:3.9] at org.apache.poi.poifs.filesystem.POIFSFileSystem.(POIFSFileSystem.java:159) [poi.jar:3.9] at org.apache.poi.hssf.usermodel.HSSFWorkbook.(HSSFWorkbook.java:322) [poi.jar:3.9] at org.apache.poi.hssf.usermodel.HSSFWorkbook.(HSSFWorkbook.java:303) [poi.jar:3.9] at org.apache.poi.ss.usermodel.WorkbookFactory.create(WorkbookFactory.java:70) [poi-ooxml.jar:3.9] at org.drools.decisiontable.parser.xls.ExcelParser.parseFile(ExcelParser.java:81) [drools-decisiontables.jar:6.0.1.Final] at org.drools.decisiontable.SpreadsheetCompiler.compile(SpreadsheetCompiler.java:93) [drools-decisiontables.jar:6.0.1.Final] at org.drools.decisiontable.SpreadsheetCompiler.compile(SpreadsheetCompiler.java:72) [drools-decisiontables.jar:6.0.1.Final] at org.drools.decisiontable.DecisionTableProviderImpl.compileStream(DecisionTableProviderImpl.java:37) [drools-decisiontables.jar:6.0.1.Final] at org.drools.decisiontable.DecisionTableProviderImpl.loadFromInputStream(DecisionTableProviderImpl.java:20) [drools-decisiontables.jar:6.0.1.Final] at org.drools.compiler.compiler.DecisionTableFactory.loadFromInputStream(DecisionTableFactory.java:15) [drools-compiler.jar:6.0.1.Final] at org.drools.compiler.compiler.PackageBuilder.decisionTableToPackageDescr(PackageBuilder.java:474) [drools-compiler.jar:6.0.1.Final] at org.drools.compiler.compiler.CompositeKnowledgeBuilderImpl$4.map(CompositeKnowledgeBuilderImpl.java:422) [drools-compiler.jar:6.0.1.Final] at org.drools.compiler.compiler.CompositeKnowledgeBuilderImpl.buildResource(CompositeKnowledgeBuilderImpl.java:329) [drools-compiler.jar:6.0.1.Final] at org.drools.compiler.compiler.CompositeKnowledgeBuilderImpl.buildPackageDescr(CompositeKnowledgeBuilderImpl.java:319) [drools-compiler.jar:6.0.1.Final] at org.drools.compiler.compiler.CompositeKnowledgeBuilderImpl.buildPackages(CompositeKnowledgeBuilderImpl.java:96) [drools-compiler.jar:6.0.1.Final] at org.drools.compiler.compiler.CompositeKnowledgeBuilderImpl.build(CompositeKnowledgeBuilderImpl.java:87) [drools-compiler.jar:6.0.1.Final] at org.drools.compiler.kie.builder.impl.AbstractKieModule.buildKnowledgePackages(AbstractKieModule.java:204) [drools-compiler.jar:6.0.1.Final] at org.drools.compiler.kie.builder.impl.AbstractKieProject.verify(AbstractKieProject.java:39) [drools-compiler.jar:6.0.1.Final] at org.drools.compiler.kie.builder.impl.KieBuilderImpl.buildKieProject(KieBuilderImpl.java:323) [drools-compiler.jar:6.0.1.Final] at org.drools.compiler.kie.builder.impl.KieBuilderImpl.buildAll(KieBuilderImpl.java:193) [drools-compiler.jar:6.0.1.Final] at biz.mbisoftware.fn.ejb.session.common.RuleBuilder.buildKieBase(RuleBuilder.java:117) [ejb-session-common.jar:] On 29.12.13 22:12, Frank Langelage wrote: > Hello, > > I need your help! > I'm trying to migrate from Drools 5.5.0 to 6.0.1, creating the > KnowledgeBase programmatically. > > But buildAll gives me WARN "No files found for KieBase defaultKieBase". > What's missing? My code is based on the example found in documentation. > fileName is pointing to an xls file with decision table. > Writing it to kieFileSystem seemed to work correct, as > kieFileSystem.read( fileName ).length is showing the right number of bytes. > > Logging output: > DEBUG [RuleBuilder#buildKieBase] Get kieServices > DEBUG [RuleBuilder#buildKieBase] Get kieRepository > DEBUG [RuleBuilder#buildKieBase] Get new kieFileSystem > DEBUG [RuleBuilder#buildKieBase] Add > /mbi/etc/MailFilter_hgm2e-langfr-sb2000-ipc.xls to kieFileSystem > DEBUG [RuleBuilder#buildKieBase] Get new kieBuilder > DEBUG [RuleBuilder#buildKieBase] 22016 > DEBUG [RuleBuilder#buildKieBase] Build all Rules > WARN > [org.drools.compiler.kie.builder.impl.AbstractKieModule#buildKnowledgePackages] > No files found for KieBase defaultKieBase > INFO > [org.drools.compiler.kie.builder.impl.KieRepositoryImpl#addKieModule] > KieModule was added:MemoryKieModule[ > ReleaseId=org.default:artifact:1.0.0-SNAPSHOT] > DEBUG [RuleBuilder#buildKieBase] Get new kieContainer > DEBUG [RuleBuilder#buildKieBase] Get kieBase > > Code: > RuleBuilder.LOGGER.debug( "Get kieServices" ); > KieServices kieServices = KieServices.Factory.get(); > > RuleBuilder.LOGGER.debug( "Get kieRepository" ); > KieRepository kieRepository = kieServices.getRepository(); > > RuleBuilder.LOGGER.debug( "Get new kieFileSystem" ); > KieFileSystem kieFileSystem = kieServices.newKieFileSystem(); > > XADiskConnection connection = null; > try { > connection = this.xaDisk.getConnection(); > XAFileInputStream fis = connection.createXAFileInputStream( new File( > fileName ) ); > try ( InputStream is = new XAFileInputStreamWrapper( fis ) ) { > RuleBuilder.LOGGER.debug( "Add " + fileName + " to kieFileSystem" ); > kieFileSystem.write( fileName, > kieServices.getResources().newInputStreamResource( is ) ); > } catch ( IOException e ) { > // ignore > } > fis.close(); > } catch ( FileNotExistsException e ) { > // Datei '%s' nicht gefunden > ServiceStringResponse ssr = this.mbiFxtxtFacade.getTranslation( > Integer.valueOf( 215421 ), locales ); > throw new MbiException( e, RuleBuilder.LOGGER, String.format( > ssr.getValue(), fileName ) ); > } catch ( InsufficientPermissionOnFileException | LockingFailedException > | NoTransactionAssociatedException e ) { > throw new MbiException( e, RuleBuilder.LOGGER ); > } catch ( ResourceException | InterruptedException e ) { > throw new MbiException( e, RuleBuilder.LOGGER ); > } finally { > if ( connection != null ) { > connection.close(); > } > } > > RuleBuilder.LOGGER.debug( "Get new kieBuilder" ); > KieBuilder kieBuilder = kieServices.newKieBuilder( kieFileSystem ); > RuleBuilder.LOGGER.debug( kieFileSystem.read( fileName ).length ); > > RuleBuilder.LOGGER.debug( "Build all Rules" ); > kieBuilder.buildAll(); > > RuleBuilder.LOGGER.debug( "Get new kieContainer" ); > KieContainer kieContainer = kieServices.newKieContainer( > kieRepository.getDefaultReleaseId() ); > > RuleBuilder.LOGGER.debug( "Get kieBase" ); > KieBase kieBase = kieContainer.getKieBase(); > > _______________________________________________ > rules-users mailing list > rules-users at lists.jboss.org > https://lists.jboss.org/mailman/listinfo/rules-users > From mproctor at codehaus.org Tue Dec 31 08:51:51 2013 From: mproctor at codehaus.org (Mark Proctor) Date: Tue, 31 Dec 2013 13:51:51 +0000 Subject: [rules-users] Create kieBase programmatically: WARN "No files found for KieBase defaultKieBase"? In-Reply-To: <52C2C0CE.6010002@lafr.de> References: <52C2C0CE.6010002@lafr.de> Message-ID: <3C502F12-94E3-4CC5-9D6C-45E207126747@codehaus.org> you?ll need to write a minimal self contained unit test: http://docs.jboss.org/drools/release/6.0.1.Final/drools-docs/html/Welcome.html#gettingstarted You?ll need to submit the test to this module: https://github.com/droolsjbpm/drools/tree/master/drools-decisiontables/src/test Lots of programmatic builder tests, to follow as examples here: https://github.com/droolsjbpm/drools/blob/master/drools-compiler/src/test/java/org/drools/compiler/integrationtests/KieBuilderTest.java Also did you try doing it non-programmaticaly first? The non-api way is the preferred and recommended way. The api is there for tooling and stuff that is done purely at runtime. Mark On 31 Dec 2013, at 13:04, Frank Langelage wrote: > I'll answer myself: > it's mandatory to use "src/main/resources/" as the base folder inside > KieFilesystem. > kieFileSystem.write( "src/main/resources/" + fileName, > kieServices.getResources().newInputStreamResource( is ) ); > with fileName = "etc/MailFilter.xls". > > Now Apache POI breaks down processing my xls file which works with > drools 5.5 / JExcelApi: > Caused by: java.lang.NullPointerException > at > org.apache.poi.poifs.property.PropertyTableBase.populatePropertyTree(PropertyTableBase.java:100) > [poi.jar:3.9] > at > org.apache.poi.poifs.property.PropertyTableBase.(PropertyTableBase.java:63) > [poi.jar:3.9] > at > org.apache.poi.poifs.property.PropertyTable.(PropertyTable.java:63) [poi.jar:3.9] > at > org.apache.poi.poifs.filesystem.POIFSFileSystem.(POIFSFileSystem.java:159) > [poi.jar:3.9] > at > org.apache.poi.hssf.usermodel.HSSFWorkbook.(HSSFWorkbook.java:322) > [poi.jar:3.9] > at > org.apache.poi.hssf.usermodel.HSSFWorkbook.(HSSFWorkbook.java:303) > [poi.jar:3.9] > at > org.apache.poi.ss.usermodel.WorkbookFactory.create(WorkbookFactory.java:70) > [poi-ooxml.jar:3.9] > at > org.drools.decisiontable.parser.xls.ExcelParser.parseFile(ExcelParser.java:81) > [drools-decisiontables.jar:6.0.1.Final] > at > org.drools.decisiontable.SpreadsheetCompiler.compile(SpreadsheetCompiler.java:93) > [drools-decisiontables.jar:6.0.1.Final] > at > org.drools.decisiontable.SpreadsheetCompiler.compile(SpreadsheetCompiler.java:72) > [drools-decisiontables.jar:6.0.1.Final] > at > org.drools.decisiontable.DecisionTableProviderImpl.compileStream(DecisionTableProviderImpl.java:37) > [drools-decisiontables.jar:6.0.1.Final] > at > org.drools.decisiontable.DecisionTableProviderImpl.loadFromInputStream(DecisionTableProviderImpl.java:20) > [drools-decisiontables.jar:6.0.1.Final] > at > org.drools.compiler.compiler.DecisionTableFactory.loadFromInputStream(DecisionTableFactory.java:15) > [drools-compiler.jar:6.0.1.Final] > at > org.drools.compiler.compiler.PackageBuilder.decisionTableToPackageDescr(PackageBuilder.java:474) > [drools-compiler.jar:6.0.1.Final] > at > org.drools.compiler.compiler.CompositeKnowledgeBuilderImpl$4.map(CompositeKnowledgeBuilderImpl.java:422) > [drools-compiler.jar:6.0.1.Final] > at > org.drools.compiler.compiler.CompositeKnowledgeBuilderImpl.buildResource(CompositeKnowledgeBuilderImpl.java:329) > [drools-compiler.jar:6.0.1.Final] > at > org.drools.compiler.compiler.CompositeKnowledgeBuilderImpl.buildPackageDescr(CompositeKnowledgeBuilderImpl.java:319) > [drools-compiler.jar:6.0.1.Final] > at > org.drools.compiler.compiler.CompositeKnowledgeBuilderImpl.buildPackages(CompositeKnowledgeBuilderImpl.java:96) > [drools-compiler.jar:6.0.1.Final] > at > org.drools.compiler.compiler.CompositeKnowledgeBuilderImpl.build(CompositeKnowledgeBuilderImpl.java:87) > [drools-compiler.jar:6.0.1.Final] > at > org.drools.compiler.kie.builder.impl.AbstractKieModule.buildKnowledgePackages(AbstractKieModule.java:204) > [drools-compiler.jar:6.0.1.Final] > at > org.drools.compiler.kie.builder.impl.AbstractKieProject.verify(AbstractKieProject.java:39) > [drools-compiler.jar:6.0.1.Final] > at > org.drools.compiler.kie.builder.impl.KieBuilderImpl.buildKieProject(KieBuilderImpl.java:323) > [drools-compiler.jar:6.0.1.Final] > at > org.drools.compiler.kie.builder.impl.KieBuilderImpl.buildAll(KieBuilderImpl.java:193) > [drools-compiler.jar:6.0.1.Final] > at > biz.mbisoftware.fn.ejb.session.common.RuleBuilder.buildKieBase(RuleBuilder.java:117) > [ejb-session-common.jar:] > > > On 29.12.13 22:12, Frank Langelage wrote: >> Hello, >> >> I need your help! >> I'm trying to migrate from Drools 5.5.0 to 6.0.1, creating the >> KnowledgeBase programmatically. >> >> But buildAll gives me WARN "No files found for KieBase defaultKieBase". >> What's missing? My code is based on the example found in documentation. >> fileName is pointing to an xls file with decision table. >> Writing it to kieFileSystem seemed to work correct, as >> kieFileSystem.read( fileName ).length is showing the right number of bytes. >> >> Logging output: >> DEBUG [RuleBuilder#buildKieBase] Get kieServices >> DEBUG [RuleBuilder#buildKieBase] Get kieRepository >> DEBUG [RuleBuilder#buildKieBase] Get new kieFileSystem >> DEBUG [RuleBuilder#buildKieBase] Add >> /mbi/etc/MailFilter_hgm2e-langfr-sb2000-ipc.xls to kieFileSystem >> DEBUG [RuleBuilder#buildKieBase] Get new kieBuilder >> DEBUG [RuleBuilder#buildKieBase] 22016 >> DEBUG [RuleBuilder#buildKieBase] Build all Rules >> WARN >> [org.drools.compiler.kie.builder.impl.AbstractKieModule#buildKnowledgePackages] >> No files found for KieBase defaultKieBase >> INFO >> [org.drools.compiler.kie.builder.impl.KieRepositoryImpl#addKieModule] >> KieModule was added:MemoryKieModule[ >> ReleaseId=org.default:artifact:1.0.0-SNAPSHOT] >> DEBUG [RuleBuilder#buildKieBase] Get new kieContainer >> DEBUG [RuleBuilder#buildKieBase] Get kieBase >> >> Code: >> RuleBuilder.LOGGER.debug( "Get kieServices" ); >> KieServices kieServices = KieServices.Factory.get(); >> >> RuleBuilder.LOGGER.debug( "Get kieRepository" ); >> KieRepository kieRepository = kieServices.getRepository(); >> >> RuleBuilder.LOGGER.debug( "Get new kieFileSystem" ); >> KieFileSystem kieFileSystem = kieServices.newKieFileSystem(); >> >> XADiskConnection connection = null; >> try { >> connection = this.xaDisk.getConnection(); >> XAFileInputStream fis = connection.createXAFileInputStream( new File( >> fileName ) ); >> try ( InputStream is = new XAFileInputStreamWrapper( fis ) ) { >> RuleBuilder.LOGGER.debug( "Add " + fileName + " to kieFileSystem" ); >> kieFileSystem.write( fileName, >> kieServices.getResources().newInputStreamResource( is ) ); >> } catch ( IOException e ) { >> // ignore >> } >> fis.close(); >> } catch ( FileNotExistsException e ) { >> // Datei '%s' nicht gefunden >> ServiceStringResponse ssr = this.mbiFxtxtFacade.getTranslation( >> Integer.valueOf( 215421 ), locales ); >> throw new MbiException( e, RuleBuilder.LOGGER, String.format( >> ssr.getValue(), fileName ) ); >> } catch ( InsufficientPermissionOnFileException | LockingFailedException >> | NoTransactionAssociatedException e ) { >> throw new MbiException( e, RuleBuilder.LOGGER ); >> } catch ( ResourceException | InterruptedException e ) { >> throw new MbiException( e, RuleBuilder.LOGGER ); >> } finally { >> if ( connection != null ) { >> connection.close(); >> } >> } >> >> RuleBuilder.LOGGER.debug( "Get new kieBuilder" ); >> KieBuilder kieBuilder = kieServices.newKieBuilder( kieFileSystem ); >> RuleBuilder.LOGGER.debug( kieFileSystem.read( fileName ).length ); >> >> RuleBuilder.LOGGER.debug( "Build all Rules" ); >> kieBuilder.buildAll(); >> >> RuleBuilder.LOGGER.debug( "Get new kieContainer" ); >> KieContainer kieContainer = kieServices.newKieContainer( >> kieRepository.getDefaultReleaseId() ); >> >> RuleBuilder.LOGGER.debug( "Get kieBase" ); >> KieBase kieBase = kieContainer.getKieBase(); >> >> _______________________________________________ >> 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 Dec 31 13:08:48 2013 From: glambe2 at hotmail.com (glambert27) Date: Tue, 31 Dec 2013 10:08:48 -0800 (PST) Subject: [rules-users] Running Feedback during drools run In-Reply-To: References: <1388456640186-4027470.post@n3.nabble.com> Message-ID: <1388513328762-4027479.post@n3.nabble.com> Hi Laune, The number of facts will varying between 70-90K so i'm not sure displaying the number of facts to be inserted would be a good option. As for the event listeners where can I find good docs on implementing? My biggest concern is that rules once activated take quite some before the next rule is activated. Thus the status bar can potentially show 20% one sec then stay there for some time then jump to 70%. Not a good indication of work being taking place but if that's all I have I'll work with it. -- View this message in context: http://drools.46999.n3.nabble.com/Running-Feedback-during-drools-run-tp4027470p4027479.html Sent from the Drools: User forum mailing list archive at Nabble.com. From glambe2 at hotmail.com Tue Dec 31 13:11:06 2013 From: glambe2 at hotmail.com (glambert27) Date: Tue, 31 Dec 2013 10:11:06 -0800 (PST) Subject: [rules-users] Interupting Stateful session In-Reply-To: References: <1388432324954-4027464.post@n3.nabble.com> <1388456337970-4027469.post@n3.nabble.com> Message-ID: <1388513466656-4027480.post@n3.nabble.com> So I went with: ksession.halt(); ksession.clearAgenda(); ksession.dispose(); is this not an ideal solution? -- View this message in context: http://drools.46999.n3.nabble.com/Interupting-Stateful-session-tp4027464p4027480.html Sent from the Drools: User forum mailing list archive at Nabble.com. From wolfgang.laun at gmail.com Tue Dec 31 13:34:15 2013 From: wolfgang.laun at gmail.com (Wolfgang Laun) Date: Tue, 31 Dec 2013 19:34:15 +0100 Subject: [rules-users] Interupting Stateful session In-Reply-To: <1388513466656-4027480.post@n3.nabble.com> References: <1388432324954-4027464.post@n3.nabble.com> <1388456337970-4027469.post@n3.nabble.com> <1388513466656-4027480.post@n3.nabble.com> Message-ID: Good enough. Documentation says that the currently executing rule is terminated, but I guess that's preferable to a harsh interrupt. Still, depending on what is being done in RHS code, it doesn't guarantee a consistent end - but a more radical interrupt will even be worse. -W On 31/12/2013, glambert27 wrote: > So I went with: > ksession.halt(); > ksession.clearAgenda(); > ksession.dispose(); > > is this not an ideal solution? > > > > -- > View this message in context: > http://drools.46999.n3.nabble.com/Interupting-Stateful-session-tp4027464p4027480.html > Sent from the Drools: User forum mailing list archive at Nabble.com. > _______________________________________________ > rules-users mailing list > rules-users at lists.jboss.org > https://lists.jboss.org/mailman/listinfo/rules-users > From wolfgang.laun at gmail.com Tue Dec 31 13:48:54 2013 From: wolfgang.laun at gmail.com (Wolfgang Laun) Date: Tue, 31 Dec 2013 19:48:54 +0100 Subject: [rules-users] Running Feedback during drools run In-Reply-To: <1388513328762-4027479.post@n3.nabble.com> References: <1388456640186-4027470.post@n3.nabble.com> <1388513328762-4027479.post@n3.nabble.com> Message-ID: On 31/12/2013, glambert27 wrote: > Hi Laune, > The number of facts will varying between 70-90K so i'm not sure displaying > the number of facts to be inserted would be a good option. No, unless you know, beforehand, how many there will be. > As for the event > listeners where can I find good docs on implementing? It's not difficult. There's a couple of session methods: addEventListener(..) and you just implement the various After*Event and Before*Event methods on the object you want to register as an event. > My biggest concern is > that rules once activated take quite some before the next rule is > activated. Not clear what you mean here. If you insert one fact at a time and fireAllRules(), you won't have anything to display to the user. On the other hand, if you collect, say 1000 facts, insert them all and then fire all rules, you can show progress during insertion, and you can show progress while rules fire. > Thus the status bar can potentially show 20% one sec then stay there for > some time then jump to 70%. This would not happen during the scenario I've outlined before unless rule executions change a lot - but then it's hopeless anyway. -W > Not a good indication of work being taking > place > but if that's all I have I'll work with it. > > > > -- > View this message in context: > http://drools.46999.n3.nabble.com/Running-Feedback-during-drools-run-tp4027470p4027479.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 stephen.masters at me.com Tue Dec 31 16:06:51 2013 From: stephen.masters at me.com (Stephen Masters) Date: Tue, 31 Dec 2013 21:06:51 +0000 Subject: [rules-users] Running Feedback during drools run In-Reply-To: References: <1388456640186-4027470.post@n3.nabble.com> <1388513328762-4027479.post@n3.nabble.com> Message-ID: <029ACE6D-B780-4310-AA3D-E5188FB34847@me.com> fwiw ? a couple of examples of event listeners: Rule activations: https://github.com/gratiartis/sctrcd-payment-validation-web/blob/master/src/main/java/com/sctrcd/drools/util/TrackingAgendaEventListener.java Fact insertions, modifications and retractions: https://github.com/gratiartis/sctrcd-payment-validation-web/blob/master/src/main/java/com/sctrcd/drools/util/TrackingWorkingMemoryEventListener.java On 31 Dec 2013, at 18:48, Wolfgang Laun wrote: > On 31/12/2013, glambert27 wrote: >> Hi Laune, >> The number of facts will varying between 70-90K so i'm not sure displaying >> the number of facts to be inserted would be a good option. > > No, unless you know, beforehand, how many there will be. > >> As for the event >> listeners where can I find good docs on implementing? > > It's not difficult. There's a couple of session methods: > addEventListener(..) and you just implement the various After*Event > and Before*Event methods on the object you want to register as an > event. > >> My biggest concern is >> that rules once activated take quite some before the next rule is >> activated. > > Not clear what you mean here. If you insert one fact at a time and > fireAllRules(), you won't have anything to display to the user. On the > other hand, if you collect, say 1000 facts, insert them all and then > fire all rules, you can show progress during insertion, and you can > show progress while rules fire. > >> Thus the status bar can potentially show 20% one sec then stay there for >> some time then jump to 70%. > > This would not happen during the scenario I've outlined before unless > rule executions change a lot - but then it's hopeless anyway. > > -W > > >> Not a good indication of work being taking >> place >> but if that's all I have I'll work with it. >> >> >> >> -- >> View this message in context: >> http://drools.46999.n3.nabble.com/Running-Feedback-during-drools-run-tp4027470p4027479.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/20131231/85580a08/attachment.html From sumantp at yahoo.com Tue Dec 31 17:49:00 2013 From: sumantp at yahoo.com (sumantp) Date: Tue, 31 Dec 2013 14:49:00 -0800 (PST) Subject: [rules-users] Eclipse audit view problem in 6.0.1.Final Message-ID: <1388530140163-4027484.post@n3.nabble.com> The Eclipse audit view using the 6.0.1.Final plugin says "The selected audit log is empty" when opening a seemingly valid log file. Steps to reproduce the problem ... 1. Use Eclipse Kepler 2. Install plugin using update URL http://download.jboss.org/drools/release/6.0.1.Final/org.drools.updatesite/ 3. Create hello world project using the drools project wizard 4. Modify kmodule.xml to specify file logger 5. Ensure logger is closed before exiting 6. Open the log file in the audit view -- View this message in context: http://drools.46999.n3.nabble.com/Eclipse-audit-view-problem-in-6-0-1-Final-tp4027484.html Sent from the Drools: User forum mailing list archive at Nabble.com. From sumantp at yahoo.com Tue Dec 31 18:08:50 2013 From: sumantp at yahoo.com (sumantp) Date: Tue, 31 Dec 2013 15:08:50 -0800 (PST) Subject: [rules-users] Eclipse audit view problem in 6.0.1.Final In-Reply-To: <1388530140163-4027484.post@n3.nabble.com> References: <1388530140163-4027484.post@n3.nabble.com> Message-ID: <1388531330016-4027485.post@n3.nabble.com> Here's the log ... 6.1 PHREAK 6.1 1 1 com.sample.DroolsTest$Message at 61e090ee 4 Hello World [1] Hello World myMessage=Hello World(1); m=com.sample.DroolsTest$Message at 61e090ee(1) 1 6 Hello World [1] Hello World myMessage=Hello World(1); m=com.sample.DroolsTest$Message at 61e090ee(1) 1 PHREAK 6.1 2 1 com.sample.DroolsTest$Message at 61e090ee 7 Hello World [1] Hello World myMessage=Goodbye cruel world(1); m=com.sample.DroolsTest$Message at 61e090ee(1) 1 4 GoodBye [1] GoodBye myMessage=Goodbye cruel world(1) 1 6 GoodBye [1] GoodBye myMessage=Goodbye cruel world(1) 1 7 GoodBye [1] GoodBye myMessage=Goodbye cruel world(1) 1 PHREAK 6.1 PHREAK -- View this message in context: http://drools.46999.n3.nabble.com/Eclipse-audit-view-problem-in-6-0-1-Final-tp4027484p4027485.html Sent from the Drools: User forum mailing list archive at Nabble.com. From vinodkiran at usa.net Tue Dec 31 22:27:30 2013 From: vinodkiran at usa.net (vinodkiran) Date: Tue, 31 Dec 2013 19:27:30 -0800 (PST) Subject: [rules-users] DRL file not getting picked In-Reply-To: <1388483401904-4027476.post@n3.nabble.com> References: <1388483401904-4027476.post@n3.nabble.com> Message-ID: <1388546850555-4027486.post@n3.nabble.com> Dwipin - Can you post the contents of the log/console ? Also, is your test project a maven project? -Vinod -- View this message in context: http://drools.46999.n3.nabble.com/DRL-file-not-getting-picked-tp4027476p4027486.html Sent from the Drools: User forum mailing list archive at Nabble.com.