[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?

java.lang.LinkageError: loader constraint violation: when resolving
interface method
org.drools.spi.KnowledgeHelper.update(Lorg/drools/FactHandle;)V the class
loader (instance of
org/drools/rule/JavaDialectRuntimeData$PackageClassLoader) of the current
class, defaultpkg/Rule_ScanRange__startLocationCheck, and the class loader
(instance of org/eclipse/osgi/internal/baseadaptor/DefaultClassLoader) for
resolved class, org/drools/spi/KnowledgeHelper, have different Class objects
for the type org/drools/FactHandle used in the signature
java.lang.LinkageError: loader constraint violation: when resolving
interface method
org.drools.spi.KnowledgeHelper.update(Lorg/drools/FactHandle;)V the class
loader (instance of
org/drools/rule/JavaDialectRuntimeData$PackageClassLoader) of the current
class, defaultpkg/Rule_ScanRange__startLocationCheck, and the class loader
(instance of org/eclipse/osgi/internal/baseadaptor/DefaultClassLoader) for
resolved class, org/drools/spi/KnowledgeHelper, have different Class objects
for the type org/drools/FactHandle used in the signature

--
View this message in context: 
http://drools.46999.n3.nabble.com/drools5-3-0-rule-time-error-with-osgi-environment-tp3961413.html
Sent from the Drools: User forum mailing list archive at Nabble.com.
___
rules-users mailing list
rules-users@lists.jboss.org
https://lists.jboss.org/mailman/listinfo/rules-users


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: 
http://drools.46999.n3.nabble.com/drools5-3-0-rule-time-error-with-osgi-environment-tp3961413p3961508.html
Sent from the Drools: User forum mailing list archive at Nabble.com.
___
rules-users mailing list
rules-users@lists.jboss.org
https://lists.jboss.org/mailman/listinfo/rules-users


[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
knowledge and fire the rules. Does anyone know what this issue mean?

Caused by: java.lang.LinkageError: loader constraint violation: loader
(instance of org/drools/rule/JavaDialectRuntimeData$PackageClassLoader)
previously initiated loading for a different type with name
org/drools/WorkingMemory

--
View this message in context: 
http://drools.46999.n3.nabble.com/working-memory-error-tp3961517.html
Sent from the Drools: User forum mailing list archive at Nabble.com.
___
rules-users mailing list
rules-users@lists.jboss.org
https://lists.jboss.org/mailman/listinfo/rules-users


Re: [rules-users] working memory error

2012-05-04 Thread Zhao Yi
I only use drools 5.3.0. This error happens on osgi envirnonment, so I think
drools-5.3.0 doesn't work with osgi. Has anyone tried osgi environment?


laune wrote
 
 Check the javadoc for java.lang.LinkageError. Most likely, you are
 using different Drools versions for compiling the package 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 and fire rules, but I got below error when I create pkg
 file
 knowledge and fire the rules. Does anyone know what this issue mean?

 Caused by: java.lang.LinkageError: loader constraint violation: loader
 (instance of org/drools/rule/JavaDialectRuntimeData$PackageClassLoader)
 previously initiated loading for a different type with name
 org/drools/WorkingMemory

 --
 View this message in context:
 http://drools.46999.n3.nabble.com/working-memory-error-tp3961517.html
 Sent from the Drools: User forum mailing list archive at Nabble.com.
 ___
 rules-users mailing list
 rules-users@.jboss
 https://lists.jboss.org/mailman/listinfo/rules-users

 ___
 rules-users mailing list
 rules-users@.jboss
 https://lists.jboss.org/mailman/listinfo/rules-users
 


--
View this message in context: 
http://drools.46999.n3.nabble.com/working-memory-error-tp3961517p3961769.html
Sent from the Drools: User forum mailing list archive at Nabble.com.
___
rules-users mailing list
rules-users@lists.jboss.org
https://lists.jboss.org/mailman/listinfo/rules-users


[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 mailing list archive at Nabble.com.
___
rules-users mailing list
rules-users@lists.jboss.org
https://lists.jboss.org/mailman/listinfo/rules-users


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 Drools: User forum mailing list archive at Nabble.com.
___
rules-users mailing list
rules-users@lists.jboss.org
https://lists.jboss.org/mailman/listinfo/rules-users


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 Nabble.com.
___
rules-users mailing list
rules-users@lists.jboss.org
https://lists.jboss.org/mailman/listinfo/rules-users


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
 these drl files to one big drl files?
 
 Why do you want to do that? You can compile and integrate them into a
 Knowledge Base easily.
 
 I am looking for a drools API to
 generate the big drl file automatically?
 
 There is no such thing.
 -W
 

 --
 View this message in context:
 http://drools.46999.n3.nabble.com/How-to-combine-different-drl-files-tp3668184p3668184.html
 Sent from the Drools: User forum mailing list archive at Nabble.com.
 ___
 rules-users mailing list
 rules-users@.jboss
 https://lists.jboss.org/mailman/listinfo/rules-users

 ___
 rules-users mailing list
 rules-users@.jboss
 https://lists.jboss.org/mailman/listinfo/rules-users
 


--
View this message in context: 
http://drools.46999.n3.nabble.com/How-to-combine-different-drl-files-tp3668184p3671319.html
Sent from the Drools: User forum mailing list archive at Nabble.com.
___
rules-users mailing list
rules-users@lists.jboss.org
https://lists.jboss.org/mailman/listinfo/rules-users


[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 archive at Nabble.com.
___
rules-users mailing list
rules-users@lists.jboss.org
https://lists.jboss.org/mailman/listinfo/rules-users


[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: 
http://drools.46999.n3.nabble.com/How-to-combine-different-drl-files-tp3668184p3668184.html
Sent from the Drools: User forum mailing list archive at Nabble.com.
___
rules-users mailing list
rules-users@lists.jboss.org
https://lists.jboss.org/mailman/listinfo/rules-users


[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 archive at Nabble.com.
___
rules-users mailing list
rules-users@lists.jboss.org
https://lists.jboss.org/mailman/listinfo/rules-users


[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: 
System.out.println(add caculation start);

rule add caculation
agenda-group add
no-loop true
dialect java 
lock-on-active
when
$m: Whether exist event
then
System.out.println(add caculation start);
System.out.println(add caculation end);

end


--
View this message in context: 
http://drools.46999.n3.nabble.com/Can-I-put-java-code-in-dslr-file-tp3578376p3578376.html
Sent from the Drools: User forum mailing list archive at Nabble.com.
___
rules-users mailing list
rules-users@lists.jboss.org
https://lists.jboss.org/mailman/listinfo/rules-users


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) {
e.printStackTrace();
}

The rule doesn't print the message and the code print 0 rules fired. I am
using drools 5.1.1. Is this the version you are using?

My rule file is:

rule add2
agenda-group add
dialect java 
lock-on-active
when 
eval(true)
then 
System.out.println(add2);
end

--
View this message in context: 
http://drools.46999.n3.nabble.com/How-to-let-a-rule-run-only-one-time-tp3550555p356.html
Sent from the Drools: User forum mailing list archive at Nabble.com.
___
rules-users mailing list
rules-users@lists.jboss.org
https://lists.jboss.org/mailman/listinfo/rules-users


[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
I do this in drools or not?

--
View this message in context: 
http://drools.46999.n3.nabble.com/Does-drools-generate-document-from-drl-files-tp3567875p3567875.html
Sent from the Drools: User forum mailing list archive at Nabble.com.
___
rules-users mailing list
rules-users@lists.jboss.org
https://lists.jboss.org/mailman/listinfo/rules-users


[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: 
http://drools.46999.n3.nabble.com/newStatefuleSession-take-a-long-time-to-run-tp3569412p3569412.html
Sent from the Drools: User forum mailing list archive at Nabble.com.
___
rules-users mailing list
rules-users@lists.jboss.org
https://lists.jboss.org/mailman/listinfo/rules-users


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

2011-12-06 Thread Zhao Yi
There are some questions on your reply:


laune wrote
 All activations from group A have been fired. Therefore, agenda group A
 loses the focus, and the agenda group that had the focus previously
 receives the focus (becomes active) again.
When you say the agenda group becomes active again, do you mean the agenda
group A become active?


laune wrote
 Focus may be given (by an API method call) to another agenda group B while
 there still are some activations from group A pending. Eventually, A will
 receive the focus again, and rule firings from A continue as usual. 
How does 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 leave. Do you mean activations?

If an agenda group A is left, there are two cases to consider:

   1. All activations from group A have been fired. Therefore, agenda group
   A loses the focus, and the agenda group that had the focus previously
   receives the focus (becomes active) again.
   2. Focus may be given (by an API method call) to another agenda group B
   while there still are some activations from group A pending. Eventually,
A
   will receive the focus again, and rule firings from A continue as usual.

-W

 --
 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 Nabble.com.
 ___
 rules-users mailing list
 rules-users@.jboss
 https://lists.jboss.org/mailman/listinfo/rules-users

___
rules-users mailing list
rules-users@.jboss
https://lists.jboss.org/mailman/listinfo/rules-users



--
View this message in context: 
http://drools.46999.n3.nabble.com/How-to-use-lock-on-active-tp3558698p3563762.html
Sent from the Drools: User forum mailing list archive at Nabble.com.
___
rules-users mailing list
rules-users@lists.jboss.org
https://lists.jboss.org/mailman/listinfo/rules-users


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 do
right now. Don't hesitate to share your idea. 

--
View this message in context: 
http://drools.46999.n3.nabble.com/How-can-I-get-rule-s-agenda-group-name-tp3508539p3563774.html
Sent from the Drools: User forum mailing list archive at Nabble.com.
___
rules-users mailing list
rules-users@lists.jboss.org
https://lists.jboss.org/mailman/listinfo/rules-users


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 Nabble.com.
___
rules-users mailing list
rules-users@lists.jboss.org
https://lists.jboss.org/mailman/listinfo/rules-users


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();
 }
 

I wander where the knowledgePackage coming from. I am in
beforeActivationFired method, how can I get knowledgePackage in this method?

--
View this message in context: 
http://drools.46999.n3.nabble.com/How-can-I-get-rule-s-agenda-group-name-tp3508539p3563830.html
Sent from the Drools: User forum mailing list archive at Nabble.com.
___
rules-users mailing list
rules-users@lists.jboss.org
https://lists.jboss.org/mailman/listinfo/rules-users


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: 
http://drools.46999.n3.nabble.com/How-to-use-lock-on-active-tp3558698p3563860.html
Sent from the Drools: User forum mailing list archive at Nabble.com.
___
rules-users mailing list
rules-users@lists.jboss.org
https://lists.jboss.org/mailman/listinfo/rules-users


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 
lock-on-active
when 
eval(true)
then 
System.out.println(add2);
end


--
View this message in context: 
http://drools.46999.n3.nabble.com/How-to-let-a-rule-run-only-one-time-tp3550555p3563873.html
Sent from the Drools: User forum mailing list archive at Nabble.com.
___
rules-users mailing list
rules-users@lists.jboss.org
https://lists.jboss.org/mailman/listinfo/rules-users


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.
___
rules-users mailing list
rules-users@lists.jboss.org
https://lists.jboss.org/mailman/listinfo/rules-users


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 mailing list
rules-users@lists.jboss.org
https://lists.jboss.org/mailman/listinfo/rules-users


[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
situation should I use this attribute?

--
View this message in context: 
http://drools.46999.n3.nabble.com/How-to-use-lock-on-active-tp3558698p3558698.html
Sent from the Drools: User forum mailing list archive at Nabble.com.
___
rules-users mailing list
rules-users@lists.jboss.org
https://lists.jboss.org/mailman/listinfo/rules-users


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: 
http://drools.46999.n3.nabble.com/How-to-let-a-rule-run-only-one-time-tp3550555p3560343.html
Sent from the Drools: User forum mailing list archive at Nabble.com.
___
rules-users mailing list
rules-users@lists.jboss.org
https://lists.jboss.org/mailman/listinfo/rules-users


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 Nabble.com.
___
rules-users mailing list
rules-users@lists.jboss.org
https://lists.jboss.org/mailman/listinfo/rules-users


[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: 
http://drools.46999.n3.nabble.com/How-to-import-rules-in-different-package-tp3556419p3556419.html
Sent from the Drools: User forum mailing list archive at Nabble.com.
___
rules-users mailing list
rules-users@lists.jboss.org
https://lists.jboss.org/mailman/listinfo/rules-users


[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: 
http://drools.46999.n3.nabble.com/How-to-let-a-rule-run-only-one-time-tp3550555p3550555.html
Sent from the Drools: User forum mailing list archive at Nabble.com.
___
rules-users mailing list
rules-users@lists.jboss.org
https://lists.jboss.org/mailman/listinfo/rules-users


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 at Nabble.com.
___
rules-users mailing list
rules-users@lists.jboss.org
https://lists.jboss.org/mailman/listinfo/rules-users


[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 mailing list
rules-users@lists.jboss.org
https://lists.jboss.org/mailman/listinfo/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 Nabble.com.
___
rules-users mailing list
rules-users@lists.jboss.org
https://lists.jboss.org/mailman/listinfo/rules-users


[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 mailing list
rules-users@lists.jboss.org
https://lists.jboss.org/mailman/listinfo/rules-users


[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.
___
rules-users mailing list
rules-users@lists.jboss.org
https://lists.jboss.org/mailman/listinfo/rules-users


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
without change Java code?

--
View this message in context: 
http://drools.46999.n3.nabble.com/How-to-define-static-constant-variable-tp3527416p3527761.html
Sent from the Drools: User forum mailing list archive at Nabble.com.
___
rules-users mailing list
rules-users@lists.jboss.org
https://lists.jboss.org/mailman/listinfo/rules-users


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: 
http://drools.46999.n3.nabble.com/How-to-define-static-constant-variable-tp3527416p3527834.html
Sent from the Drools: User forum mailing list archive at Nabble.com.
___
rules-users mailing list
rules-users@lists.jboss.org
https://lists.jboss.org/mailman/listinfo/rules-users


[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 at Nabble.com.
___
rules-users mailing list
rules-users@lists.jboss.org
https://lists.jboss.org/mailman/listinfo/rules-users


[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: 
http://drools.46999.n3.nabble.com/Whether-use-agenda-group-or-rule-flow-tp3512486p3512486.html
Sent from the Drools: User forum mailing list archive at Nabble.com.
___
rules-users mailing list
rules-users@lists.jboss.org
https://lists.jboss.org/mailman/listinfo/rules-users


[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-accorss-multiple-rules-tp3509713p3509713.html
Sent from the Drools: User forum mailing list archive at Nabble.com.
___
rules-users mailing list
rules-users@lists.jboss.org
https://lists.jboss.org/mailman/listinfo/rules-users


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: 
http://drools.46999.n3.nabble.com/How-to-use-a-temp-variable-accorss-multiple-rules-tp3509713p3509799.html
Sent from the Drools: User forum mailing list archive at Nabble.com.
___
rules-users mailing list
rules-users@lists.jboss.org
https://lists.jboss.org/mailman/listinfo/rules-users


[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.
___
rules-users mailing list
rules-users@lists.jboss.org
https://lists.jboss.org/mailman/listinfo/rules-users


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 archive at Nabble.com.
___
rules-users mailing list
rules-users@lists.jboss.org
https://lists.jboss.org/mailman/listinfo/rules-users


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

2011-11-14 Thread Zhao Yi
According to Drools export document,

*Each time setFocus() is called it pushes that Agenda Group onto a stack.
When the focus group is empty it is popped from the stack and the focus
group that is now on top evaluates. An Agenda Group can appear in multiple
locations on the stack. *

If I run 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-tp3504139p3506610.html
Sent from the Drools: User forum mailing list archive at Nabble.com.
___
rules-users mailing list
rules-users@lists.jboss.org
https://lists.jboss.org/mailman/listinfo/rules-users


[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 this message in context: 
http://drools.46999.n3.nabble.com/How-can-I-get-rule-s-agenda-group-name-tp3508539p3508539.html
Sent from the Drools: User forum mailing list archive at Nabble.com.
___
rules-users mailing list
rules-users@lists.jboss.org
https://lists.jboss.org/mailman/listinfo/rules-users


[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 list archive at Nabble.com.
___
rules-users mailing list
rules-users@lists.jboss.org
https://lists.jboss.org/mailman/listinfo/rules-users