[rules-users] Bug?

2010-08-24 Thread Pavel Tavoda
When I use latest 5.1.1 I'm getting following error when using change-set with DTABLE: Exception in thread "main" java.lang.NullPointerException at org.drools.decisiontable.DecisionTableProviderImpl.compileStr

Re: [rules-users] CPU Spike creating a StatefulKnowledgeSession using OSGi

2010-08-10 Thread Pavel Tavoda
seems to be very slow loading > up the SessionConfiguration due to all of the loading that happens in > ChainedProperties. > Thanks, > Dave > > On 10 August 2010 13:53, Pavel Tavoda wrote: >> >> Interesting. Normally it should be fast. Try to change your patter and &g

Re: [rules-users] drools in a SOA environment

2010-08-10 Thread Pavel Tavoda
Maybe this doesn't fit your needs but we are using very successfully DroolsAdvice which intercept each service call with AspectJ. It's good for auditing, generating mails for exceptional situations but also for calculation fees on invoices. Here is source code for inspiration: http://fisheye3.atlas

Re: [rules-users] CPU Spike creating a StatefulKnowledgeSession using OSGi

2010-08-10 Thread Pavel Tavoda
geSession();. > Cheers, > Dave > > On 9 August 2010 11:09, Pavel Tavoda wrote: >> >> Is it session creation or rule compilation? >> >> Pavel >> >> 2010/8/9 David Conde : >> > Good Morning, >> > I now have drools running on the Spri

Re: [rules-users] CPU Spike creating a StatefulKnowledgeSession using OSGi

2010-08-09 Thread Pavel Tavoda
Is it session creation or rule compilation? Pavel 2010/8/9 David Conde : > Good Morning, > I now have drools running on the Spring DM-Server but I am seeing a CPU > spike when creating a StatefulKnowledgeSession. I've tested this outside of > an OSGi environment and I don't see the spike. Does an

Re: [rules-users] Drool Guvnor-Accessing Rules which are expired to do back dated calculations

2010-08-02 Thread Pavel Tavoda
Hello, forget date-expires. Just make your WHEN condition to match date you specify somewhere in your object as date for which to calculate. Then you will have two rules and each will match different date. Pavel 2010/8/2 Minal Sarmokadam : > Hi, > > > > I am evaluating Drool Gunvor for to implem

Re: [rules-users] RuleAgents and containers

2010-07-25 Thread Pavel Tavoda
In default setup of many servers (which I know) and java has no prohibited reading of files outside ear. You can read changeset and rule files from specific directory e.g. (/etc/rules/...). Or you can use user.home property. We are using it without problems. However you can use other mechanisms whi

Re: [rules-users] RuleAgents and containers

2010-07-23 Thread Pavel Tavoda
You can do it with singleton pattern. File should be read with something like: ResourceFactory.newClassPathResource("/MyChangeSet.xml") RuleAgent monitor all resources which are described in change-set. Changes of change-set file aren't reflected. Pavel On Fri, Jul 23, 2010 at 3:09 AM, H.C. wr

Re: [rules-users] Problem with DRL language/ XLS decision tables.

2010-07-22 Thread Pavel Tavoda
ecution time, is for me really important. A think, that > inserting one fact at time means for me additional time to initialise engine > (when adding a new fact, and removing old one). Am I right? > > Thanks :) > > 2010/7/22 Pavel Tavoda >> >> Don't know details

Re: [rules-users] Problem with DRL language/ XLS decision tables.

2010-07-22 Thread Pavel Tavoda
Don't know details of your problem but it's typical situation where you can use StatelessSession, insert one fact at time and use activation-group. Pavel 2010/7/22 tom ska : > Hello, > I have a problem with defining rules. I insert many, many objects (facts) to > ksession object (StatefulKnowledg

Re: [rules-users] Building a high-level editor for DRL-Files

2010-07-19 Thread Pavel Tavoda
Something like Guvnor? Pavel On Mon, Jul 19, 2010 at 7:14 PM, skasab2s wrote: > > Hello, > > in our company we have written many DRL-Files in the domain of medicine. Now > we want to use the Drools-IDE plugin for Eclipse in order to create a GUI > for editing DRL-Files, so that DRL-files can be

Re: [rules-users] how to debug rules in JBoss AS?

2010-07-19 Thread Pavel Tavoda
You described it well. Did you tried it? It should work. Doesn't matter where are you connected (local JVM or remote JVM). Debugging should work same way. Pavel 2010/7/16 Marina : > Hello, > I know one can debug rules (put breakpoints in .drl and ruleflow files) when > running/debugging an applic

Re: [rules-users] Rules integration with Java -need help

2010-07-14 Thread Pavel Tavoda
Just look to Properties documentation. You can set property from java too. Something like: Properties properties = new Properties(); properties.load(new FileInputStream(module2PropertiesFilePath)); properties.setProperty("url", "http://MyURL...";) RuleAgent agent = RuleAgent.newRuleAgent(properties

Re: [rules-users] Get authorized users rules only into application

2010-07-14 Thread Pavel Tavoda
But you don't need autorization details. packagename=username Pavel On Wed, Jul 14, 2010 at 6:44 AM, G3 wrote: > > Hi > Thanks for your reply. > I guess I have to use separate guvnor with a single package for each user > only. > The webdav shows only the packages and snapshots not the authorizat

Re: [rules-users] Get authorized users rules only into application

2010-07-13 Thread Pavel Tavoda
I will do following: - Create package for each user (with same name as user) - and restrict access only for specific user - Then you can very simply create URL for each user (package) which want execute his ruleset and download it from Guvnor For accessing additional information from Guvnor try We

Re: [rules-users] Get authorized users rules only into application

2010-07-12 Thread Pavel Tavoda
What about making separate instances of guvnor for each user? How many users you have? Pavel On Mon, Jul 12, 2010 at 8:57 AM, G3 wrote: > > Hi all > > I am able to get the entire LATEST package from the package URL from guvnor > into my application. > But this means any user can run all rules. I

Re: [rules-users] Drools Flow

2010-07-09 Thread Pavel Tavoda
But for this you don't need drools flow. Normal rule-set is enough. Pavel 2010/7/9 santosh mukherjee : > Sorry, > but in the documentation, it was written that an internal event can be > raised over the actions of an Action Node. > Anyways, Then when and where to raise the event. Actually I want

Re: [rules-users] Creating and deploying rules to Drools and JRules

2010-06-29 Thread Pavel Tavoda
Did you looked at drools DSL, templates and spreadsheet support? http://downloads.jboss.com/drools/docs/5.0.1.26597.FINAL/drools-expert/html_single/index.html#d0e5495 http://downloads.jboss.com/drools/docs/5.0.1.26597.FINAL/drools-expert/html_single/index.html#d0e5765 http://downloads.jboss.com/dro

Re: [rules-users] Possible bug

2010-06-28 Thread Pavel Tavoda
t; 5.0 version, do you mean the > Red Hat supported version or the community version? If you are a Red Hat > subscriber, you can ask them to provide you with a patch. >     Edson > > > 2010/6/28 Pavel Tavoda >> >> Maybe yes, advice is generic but I looked at source co

Re: [rules-users] Possible bug

2010-06-28 Thread Pavel Tavoda
@lists.jboss.org] De la part de Pavel Tavoda > Envoyé : lundi 28 juin 2010 15:29 > À : Rules Users List > Objet : [rules-users] Possible bug > > Hello, > we are using official 5.0 release and sometimes (very rarely) we get > following error: > java.util.ConcurrentModific

[rules-users] Possible bug

2010-06-28 Thread Pavel Tavoda
Hello, we are using official 5.0 release and sometimes (very rarely) we get following error: java.util.ConcurrentModificationException at java.util.HashMap$HashIterator.nextEntry(HashMap.java:793) at java.util.HashMap$ValueIterator.next(HashMap.java:822) at org.drools.reteo

Re: [rules-users] Using "in" or "not in" operator in a DSL

2010-05-12 Thread Pavel Tavoda
DSL processor work with TEXT. Try something like this: [condition][]- person is {years} years old=Age (value in ({years})) Pavel On Wed, May 12, 2010 at 2:16 PM, Joerg Herbst wrote: > Hi folks, > > I'm trying to create a DSL where the user should be able to add a bunch > of values, as when using

Re: [rules-users] Drools - Query Problem

2010-03-29 Thread Pavel Tavoda
Another "simple" way will be to declare global variable like: global List EBandRating; and in then clause you can do: EBandRating.add(r); You don't have to make queries, no-loops, lock-on-active or other tricky stuff. Pavel 2010/3/29 Esteban Aliverti : > Hi, > What Wolfgang is trying to say abo

Re: [rules-users] Inheritance-Like Design Question

2010-03-09 Thread Pavel Tavoda
an object declared in the parent rule? Thanks. > > On Tue, Mar 9, 2010 at 11:25 AM, Pavel Tavoda > wrote: >> >> Aha, misunderstanding. Yes you can't use activation group if you want >> execute more children rules. However you can use fact (Status) to >> avoid eval

Re: [rules-users] Inheritance-Like Design Question

2010-03-09 Thread Pavel Tavoda
Aha, misunderstanding. Yes you can't use activation group if you want execute more children rules. However you can use fact (Status) to avoid evaluating parent rule. My suggestion: Rule DEFAULT salience -100 if A and ! Status(done) then DEFAULT end Rule A if A and B then SOMETHINGB; update(Status

Re: [rules-users] Inheritance-Like Design Question

2010-03-09 Thread Pavel Tavoda
Sorry don't watch thread in detail but something like this should be achieved by defining "salience" on rule. Usually you define same condition withing same activation group with e.g. salience -100 which will fire as "default" when nothing match. But maybe I'm totally out of scope Pavel 2010/3/9

Re: [rules-users] Inferencing

2010-03-08 Thread Pavel Tavoda
of other helper mechanisms there, but the essence is just that: > simplify the use of stateful sessions for stateless scenarios. > >     Edson > > 2010/3/8 Pavel Tavoda >> >> It's like synchronous vs. asynchronous communication. In reality it's >> always

Re: [rules-users] Inferencing

2010-03-08 Thread Pavel Tavoda
It's like synchronous vs. asynchronous communication. In reality it's always asynchronous but from top view it appear synchronous. Similar to stateless vs. statefull. Statefull is just series of stateless session where you transfer state from one session to another. Look for Drools statefull persis

Re: [rules-users] Problem with date

2010-03-08 Thread Pavel Tavoda
How was suggested before (in other thread) you can: 1) use getTime() method of Date class which return "long" and compare 2) use some good library for example Joda time with eval() Pavel 2010/3/8 Bertrand Grottier : > Hello, > Ok, I understand the problem. dDeb is indeed a Date type. > What is t

Re: [rules-users] Drools memory usage issue

2010-03-02 Thread Pavel Tavoda
At first start with tuning JVM. Xms, Xmx parameters. How much physical memory you have? If above 3.xx GB you need 64 bit JVM. If this is not enough just kick Profiler. Pavel 2010/3/2 Shah, Malay : > Hi, > > We have an drools 5.0.1 application that uses StatelessSession and high > volume of object

Re: [rules-users] Rule Templates and null values

2010-02-26 Thread Pavel Tavoda
Enlighten us. Where is this method and how to use it? I'm also interested. Palo 2010/2/26 Bernd Rücker : > Okay, digging more into the source code I found the method > “replaceOptionals” which does exactly what I need. So despite the missing > docs, a line IS skipped if the according parameter us

Re: [rules-users] Comparing Date with || OR operator

2010-02-24 Thread Pavel Tavoda
I just read you condition. You are building $endDate to Segment.endDate and than comparing Segment.startDate with $endDate what is same as comparing Segment.startDate with Segment.endDate -> transition principle. Pavel 2010/2/24 Shabbir Dhari : > Hi Pavel > > I really don’t understand what do yo

[rules-users] soundslike crash on 5.0.1

2010-02-24 Thread Pavel Tavoda
Maybe it's already fixed in 5.1 trunk but: ":-)" soundslike "smile" crashes Pavel ___ rules-users mailing list rules-users@lists.jboss.org https://lists.jboss.org/mailman/listinfo/rules-users

Re: [rules-users] Comparing Date with || OR operator

2010-02-24 Thread Pavel Tavoda
What about:     Membership ( $regDate : regDate)     Segment ($endDate : endDate, startDate < $regDate || startDate > endDate ) Logically startDate > endDate doesn't make sense but it should work ;-) Pavel 2010/2/24 Shabbir Dhari : > I tried with some thing different and it worked but I don’t

Re: [rules-users] AGE problem

2010-02-23 Thread Pavel Tavoda
Try to do this in bank application. People come 1 hour after they date expired and try to charge them for sooner withdrawal because you calculate with 365.25 not 365 days. You will be kicked, believe me. Pavel 2010/2/23 Wolfgang Laun : > On Tue, Feb 23, 2010 at 8:07 AM, djb wrote: >> >> I think

Re: [rules-users] Disable rules at runtime to make sure they get executed only once

2010-02-19 Thread Pavel Tavoda
; If I get your answer correct, this is similar to what you suggest. > However, that solution seems bit ugly. It makes the other business logic very > difficult to read. That's why I wanted to find a proper way to do that, uding > drools API. > Cheers, > Malinda > > > >

Re: [rules-users] How many KnowledgeBases?

2010-02-19 Thread Pavel Tavoda
I will show you our approach. We have rules in rule base like: rule "start calculate" when RULE TO START CALCULATION than insert(new CalculateFee("firstFee,secondFee".split(","))) end rule "END calculate" salience -100 when RULE TO START CALCULATION $fee:CalculateFee() than CALCU

Re: [rules-users] Disable rules at runtime to make sure they get executed only once

2010-02-19 Thread Pavel Tavoda
Maybe here is some complex support for this but if you use ruleflows than it's complicated however what about (noob idea): rule "first - only once" when not RuleXor( name == "first") ... than insert (new RuleXor("first")); end On Fri, Feb 19, 2010 at 2:01 PM, Malinda Kaus

[rules-users] AGE problem

2010-02-18 Thread Pavel Tavoda
Hello, I would like to calculate AGE of object based on Date inside object, I can use eval but I hope it's so basic functionality that Drools should have it. It's also performance problem if I need to use EVAL in many rules (let's say 100 in XLS). I'm playing with some FUSION features like: $n