[rules-users] drools5.3.0 rule time error with osgi environment

2012-05-04 Thread Zhao Yi
I am using drools 5.3.0 and work in osgi environment. i have installed drools-core, drools-api, drools-compiler and drools-tempalte in osgi context. I have no problem to load knowledgebase but get error when fire rules, please see below error message. Does anyone know how to fix it?

Re: [rules-users] drools5.3.0 rule time error with osgi environment

2012-05-04 Thread Zhao Yi
I found more information on this case, if I am using update(obj) in my rule files, I will get this error but if I am not using update(obj), then everthing works fine. -- View this message in context:

[rules-users] working memory error

2012-05-04 Thread Zhao Yi
I have two knowledge bases,one is drl file the other is pkg file. My application creates knowledge base from drl files first then create knowledge base from pkg file. There is nothing wrong when I create drl file knowledge base and fire rules, but I got below error when I create pkg file

Re: [rules-users] working memory error

2012-05-04 Thread Zhao Yi
and using it. -W On 04/05/2012, Zhao Yi lt;zhaoyi0113@gt; wrote: I have two knowledge bases,one is drl file the other is pkg file. My application creates knowledge base from drl files first then create knowledge base from pkg file. There is nothing wrong when I create drl file knowledge base

[rules-users] PermGen space error

2012-02-08 Thread Zhao Yi
When I load many rule files in a knowledge base, I always get PermGen space error. Does this relate to drools issue? Any one have this issue before? -- View this message in context: http://drools.46999.n3.nabble.com/PermGen-space-error-tp3728264p3728264.html Sent from the Drools: User forum

Re: [rules-users] PermGen space error

2012-02-08 Thread Zhao Yi
I have use -Xmx -XX:PermSize to increase memory. But it does not help. Does drools have some limitation about the rules? When I delete some drl files, the error is gone. -- View this message in context: http://drools.46999.n3.nabble.com/PermGen-space-error-tp3728264p3728331.html Sent from the

Re: [rules-users] PermGen space error

2012-02-08 Thread Zhao Yi
Thanks for reply. I have set the value to -Xmx1024m -XX:PermSize=512m -XX:MaxPermSize=1024m, but it still gets that error. -- View this message in context: http://drools.46999.n3.nabble.com/PermGen-space-error-tp3728264p3728630.html Sent from the Drools: User forum mailing list archive at

Re: [rules-users] How to combine different drl files

2012-01-18 Thread Zhao Yi
I have about 100 drl files. If I load them in knowledge base, it will be very slow. So I want to combine them into one big drl file then compile it. laune wrote On 18/01/2012, Zhao Yi lt;zhaoyi0113@gt; wrote: I have a bunch of drl files and they are in same package. How can I combine

[rules-users] How to combine drl files to one binary file

2012-01-18 Thread Zhao Yi
I have some drl rule files in different packages. How can I combine them into one binary file? Thanks, Zhao Yi -- View this message in context: http://drools.46999.n3.nabble.com/How-to-combine-drl-files-to-one-binary-file-tp3671606p3671606.html Sent from the Drools: User forum mailing list

[rules-users] How to combine different drl files

2012-01-17 Thread Zhao Yi
I have a bunch of drl files and they are in same package. How can I combine these drl files to one big drl files? I am looking for a drools API to generate the big drl file automatically? -- View this message in context:

[rules-users] How to generate drl files from knowledge builder or knowledge base?

2012-01-17 Thread Zhao Yi
I am getting a knowledge base and knowledge builder. How can I generate drl file from them? -- View this message in context: http://drools.46999.n3.nabble.com/How-to-generate-drl-files-from-knowledge-builder-or-knowledge-base-tp3668202p3668202.html Sent from the Drools: User forum mailing list

[rules-users] Can I put java code in dslr file?

2011-12-11 Thread Zhao Yi
I want to convert my drl to dsl and dslr. I found that if I choose using dsl, I couldn't write java code in rules any more. I must translate everything in dsl file. Can I combine dsl and drl in dslr file, like below rule. when I am using dsl, I will get an error: [10] Unable to expand:

Re: [rules-users] How to let a rule run only one time

2011-12-07 Thread Zhao Yi
This is my code: session.getAgenda().getAgendaGroup(add).setFocus(); try { int rule=session.fireAllRules(); System.out.println(rule+ rules fired); } catch (Exception e) {

[rules-users] Does drools generate document from drl files?

2011-12-07 Thread Zhao Yi
I want to add some comments on drl files and get a document from that. I know that guvnor can do this for me but it simply copy all the drl file content into a pdf file. What I want is that we can write some comments in a specified format provided by drools and generate a document like, html. Can

[rules-users] newStatefuleSession take a long time to run

2011-12-07 Thread Zhao Yi
I did a test. I create a knowledge base and create a statefuleSession. Then I call newStatulSession 1000 times with 5 minutes sleep during each time. There will be some times the newStatefulSession take 5 seconds. I wander why it takes such a long time to run. -- View this message in context:

Re: [rules-users] How to use lock-on-active?

2011-12-06 Thread Zhao Yi
the agenda group A give its focus to B? Is the API setFocus? What's kind of activations is pending when A left? On 5 December 2011 03:47, Zhao Yi lt;zhaoyi0113@gt; wrote: the pending activations mean the rules in other group or this group? If a group left, all its rules will leave, right? Rules don't

Re: [rules-users] How can I get rule's agenda group name?

2011-12-06 Thread Zhao Yi
Hi, I am not successful to get the agenda name. Instead I give a pattern for the rule name. For example, my rule name matches the pattern AGENDA_NAME:RULE NAME. So when I got the rule name, I will get the agenda name from this string. I know this is now a good resolution, but this is what I can

Re: [rules-users] How to let a rule run only one time

2011-12-06 Thread Zhao Yi
when I put lock-on-active, the rule will never fire if there is only one agenda group in a stateful session. -- View this message in context: http://drools.46999.n3.nabble.com/How-to-let-a-rule-run-only-one-time-tp3550555p3563828.html Sent from the Drools: User forum mailing list archive at

Re: [rules-users] How can I get rule's agenda group name?

2011-12-06 Thread Zhao Yi
Is it your post? laune wrote for( Rule rule: knowledgePackage.getRules() ){ String ruleName = rule.getName(); org.drools.rule.Rule realRule = (org.drools.rule.Rule) ((KnowledgePackageImp)knowledgePackage).getRule( ruleName ); String agName = realRule.getAgendaGroup();

Re: [rules-users] How to use lock-on-active?

2011-12-06 Thread Zhao Yi
When group A left, why does the some activations not fire when A is active? Is it because these activations have lock-on-active attribute? If so, how about if there is only one agenda group A. Will the activations be fired with lock-on-active attribute? -- View this message in context:

Re: [rules-users] How to let a rule run only one time

2011-12-06 Thread Zhao Yi
I just tried and please look at my rule file. It is very simple, after fired the session, this rule is not fired. I am using drools 5.1.1 and statefulsession. Could you please provide your rule file to have a look at? rule add2 agenda-group add dialect java

Re: [rules-users] How to let a rule run only one time

2011-12-06 Thread Zhao Yi
Yes, I have set focus on the agenda add. I can see the push and pop event in my listener. -- View this message in context: http://drools.46999.n3.nabble.com/How-to-let-a-rule-run-only-one-time-tp3550555p3564315.html Sent from the Drools: User forum mailing list archive at Nabble.com.

Re: [rules-users] How to let a rule run only one time

2011-12-06 Thread Zhao Yi
Yes, that's exactly what I did. Could you try with my rule file? -- View this message in context: http://drools.46999.n3.nabble.com/How-to-let-a-rule-run-only-one-time-tp3550555p3564636.html Sent from the Drools: User forum mailing list archive at Nabble.com.

[rules-users] How to use lock-on-active?

2011-12-04 Thread Zhao Yi
From drools expert manual, I am not quite understand on lock-on-active attribute. When I set a rule with this attribute to true, even the agenda group is set focus, the rule is not fired. After the agenda group popped from the stack, the rule is fired. Does I understand correctly? In what

Re: [rules-users] How to let a rule run only one time

2011-12-04 Thread Zhao Yi
I am using agenda group and put no-loop in each rule. But the problem is that when one rule update the rule fact, other matched rules will be fired. no-loop will prevent fire in one rule itself not for a whole agenda group. -- View this message in context:

Re: [rules-users] How to use lock-on-active?

2011-12-04 Thread Zhao Yi
the pending activations mean the rules in other group or this group? If a group left, all its rules will leave, right? -- View this message in context: http://drools.46999.n3.nabble.com/How-to-use-lock-on-active-tp3558698p3560348.html Sent from the Drools: User forum mailing list archive at

[rules-users] How to import rules in different package?

2011-12-02 Thread Zhao Yi
I have several drl files. They are in different packages. If a rule want to call a function defined in another package. I will get an error method not defined. How can I build them into one knowledge base? -- View this message in context:

[rules-users] How to let a rule run only one time

2011-11-30 Thread Zhao Yi
I have a couple of rules and want them to run only one time in an agenda group. When I called update in a rule, all rules will be re-match. How can I let each rule in an agenda group run only one time? -- View this message in context:

Re: [rules-users] Does drools support rule doc?

2011-11-23 Thread Zhao Yi
Do you mean the Guvnor package editor? I don't use Guvnor. How can I generate the document from command line like mvn? -- View this message in context: http://drools.46999.n3.nabble.com/Does-drools-support-rule-doc-tp3529621p3530488.html Sent from the Drools: User forum mailing list archive

[rules-users] How to change Guvnor language?

2011-11-23 Thread Zhao Yi
How can I change Guvnor interface language? -- View this message in context: http://drools.46999.n3.nabble.com/How-to-change-Guvnor-language-tp3530505p3530505.html Sent from the Drools: User forum mailing list archive at Nabble.com. ___ rules-users

[rules-users] How to delete fact in Guvnor?

2011-11-23 Thread Zhao Yi
I have imported some rules and models in a package in Guvnor. How can I delete some of them from the package? -- View this message in context: http://drools.46999.n3.nabble.com/How-to-delete-fact-in-Guvnor-tp3530688p3530688.html Sent from the Drools: User forum mailing list archive at

[rules-users] How can I import a drl file in a package in duvnor?

2011-11-23 Thread Zhao Yi
I have created a package in duvnor. Can I upload other drl files to this package? -- View this message in context: http://drools.46999.n3.nabble.com/How-can-I-import-a-drl-file-in-a-package-in-duvnor-tp3530871p3530871.html Sent from the Drools: User forum mailing list archive at Nabble.com.

[rules-users] How to define static constant variable

2011-11-22 Thread Zhao Yi
I want to define some static constant variables. How can I declare them in rule? Thanks, Zhao Yi -- View this message in context: http://drools.46999.n3.nabble.com/How-to-define-static-constant-variable-tp3527416p3527416.html Sent from the Drools: User forum mailing list archive at Nabble.com

Re: [rules-users] How to define static constant variable

2011-11-22 Thread Zhao Yi
There are some constant variables will be used in rules. For example, I have a maximum and minimum value which are used to limited other values. So I need to define these values in rules. If I set global variable, I have to set these global on the session in java code. How can I set them in rules

Re: [rules-users] How to define static constant variable

2011-11-22 Thread Zhao Yi
The more fact I insert, the more performance cost, If I have more than 100 rules, when I call insert, drools will check each rule condition to get all matched rules. This will be really time cost. -- View this message in context:

[rules-users] Does drools support rule doc?

2011-11-22 Thread Zhao Yi
I am looking for a way to generate rule doc like java doc. Does drools support this functionality? Thanks, Zhao Yi -- View this message in context: http://drools.46999.n3.nabble.com/Does-drools-support-rule-doc-tp3529621p3529621.html Sent from the Drools: User forum mailing list archive

[rules-users] Whether use agenda group or rule flow

2011-11-16 Thread Zhao Yi
We have many unit fields which has dependence on each other. I want to implement a serial of rules to reflect the dependence among them. I am not sure whether I use agenda-group or rule flow. What is the different between them? -- View this message in context:

[rules-users] How to use a temp variable accorss multiple rules?

2011-11-15 Thread Zhao Yi
I write some rules to do some calculation. One rule's output is another rule's input. How can I define the output and input value? How can I let the value be transferred between rules? Thanks, Zhao Yi -- View this message in context: http://drools.46999.n3.nabble.com/How-to-use-a-temp-variable

Re: [rules-users] How to use a temp variable accorss multiple rules?

2011-11-15 Thread Zhao Yi
Where should I define the Output class, in Java code or drl file? How about if the Output is only a int or double value? Must I wrap the value into a Java class? -- View this message in context:

[rules-users] What is Entry point and Rule fact?

2011-11-15 Thread Zhao Yi
What is the different between Entry point and Rule fact? Are they the same thing? -- View this message in context: http://drools.46999.n3.nabble.com/What-is-Entry-point-and-Rule-fact-tp3509808p3509808.html Sent from the Drools: User forum mailing list archive at Nabble.com.

Re: [rules-users] What is Entry point and Rule fact?

2011-11-15 Thread Zhao Yi
For my understanding, Rule Fact is the object inserted in the session, right? How about the entry point? Thanks, Zhao Yi -- View this message in context: http://drools.46999.n3.nabble.com/What-is-Entry-point-and-Rule-fact-tp3509808p3509834.html Sent from the Drools: User forum mailing list

Re: [rules-users] How to run an agenda group multiple times?

2011-11-14 Thread Zhao Yi
setFocus() on an agenda group two times, the agenda group should be in multiple locations on the stack, why the rules in this agenda group are fired only once? Thanks, Zhao Yi -- View this message in context: http://drools.46999.n3.nabble.com/How-to-run-an-agenda-group-multiple-times

[rules-users] How can I get rule's agenda group name?

2011-11-14 Thread Zhao Yi
I add an AgendaEventListener on a statefulesession. In beforeActivationFired method, I can get a Rule object by BeforeActivationFiredEvent.getActivation().getRule(). If the rule is configured in an agenda group, how can I get the agenda group name from the Rule object? Thanks, Zhao Yi -- View

[rules-users] How to monitor drools execution time?

2011-11-13 Thread Zhao Yi
I want to check how long each rule executed. Can I add any listener on drools run time to get the rule time? Thanks, Zhao Yi -- View this message in context: http://drools.46999.n3.nabble.com/How-to-monitor-drools-execution-time-tp3505792p3505792.html Sent from the Drools: User forum mailing