Integrating DROOLS in J2EE...
by mmquelo massi
Hi everybody!
Does anybody know where I can find good tutorials concerning DROOLS
4.0.3\J2EE integration?
I will use an Oracle DB and JBOSS Application Server (4.0.5).
Any help will be great!
I hope I will get used to DROOLS as soon as possible so that I will be able
to help someone in this ML and not only making questions on it.
Thank You anyway.
Cheers!
Massi
18 years, 1 month
Re: [rules-users] JDK version
by Xiandong Su
Do you have to download the source and build it under 1.4? I downloaded the binary files and it does not work in Eclipse 3.3 with Java 5.
----- Original Message ----
From: Markus Helbig <mhelbig81(a)googlemail.com>
To: Rules Users List <rules-users(a)lists.jboss.org>
Sent: Thursday, October 25, 2007 10:23:59 AM
Subject: Re: [rules-users] JDK version
Yes ... and it works (Except BRMS) ...
Cheers
Markus
2007/10/25, Xiandong Su <xiandongsu(a)yahoo.com>:
> Has anyone used jdk 1.4.x with the latest drools (4.0.3)? Are the
jars in 4.0.3 compiled using Java 5? Do we have options here using the old
JDK versions?
>
> Thanks
>
> Sean
>
>
>
> _______________________________________________
> rules-users mailing list
> rules-users(a)lists.jboss.org
> https://lists.jboss.org/mailman/listinfo/rules-users
>
_______________________________________________
rules-users mailing list
rules-users(a)lists.jboss.org
https://lists.jboss.org/mailman/listinfo/rules-users
18 years, 1 month
again eval
by Markus Helbig
Hi
rule
when
item : eval(Factory.getList().contains(id))
then
end
resolves into
[10/24/07 17:50:55:636 CEST] 00000030 SystemErr R
org.drools.rule.InvalidRulePackage: Rule Compilation error : [Rule
name=Rule1, agendaGroup=MAIN, salience=30, no-loop=false]
package/Rule_Rule1_0.java (13:756) : The method eval(boolean) is
undefined for the type Rule_Rule1_0
what does it mean?
Cheers
Markus
18 years, 2 months
JDK version
by Xiandong Su
Has anyone used jdk 1.4.x with the latest drools (4.0.3)? Are the jars in 4.0.3 compiled using Java 5? Do we have options here using the old JDK versions?
Thanks
Sean
18 years, 2 months
Entity-Beans with Drools 4.0.2
by Guardian
Hello,
i have a problem to use entity-beans (ejb 3.0) in a DRL-file.
If i use java-beans everything works fine, but when I use the following rule
with the "pruefungs"-entity object i get an exception. What is the problem,
can i use EJB 3.0 entitybeans with drools?
My rules are the following:
rule "Test Entity"
when
p : Pruefung( name : pruefungsName )
then
System.out.println( name )
end
rule "Hello World"
when
m : Message( status == Message.HELLO, message : message )
then
System.out.println( message );
m.setMessage( "Goodbye cruel world" );
m.setStatus( Message.GOODBYE );
update( m );
end
and the exception that occurs:
12:29:31,093 INFO [STDOUT] cannot read rule file:
/drools/rules/testRule.drl
12:29:31,093 ERROR [STDERR] org.drools.rule.InvalidRulePackage: Rule
Compilation error : [Rule name=Test Entity, agendaGroup=MAIN, salience=0,
no-loop=false]
drools/rules/Rule_Test_Entity_0.java (8:25) : File
drools/rules/Rule_Test_Entity_0.java, Line 8, Column 25: Expression
"System.out.println(name)" is not a type
12:29:31,093 ERROR [STDERR] at
org.drools.rule.Package.checkValidity(Package.java:424)
12:29:31,093 ERROR [STDERR] at
org.drools.common.AbstractRuleBase.addPackage(AbstractRuleBase.java:361)
12:29:31,093 ERROR [STDERR] at
drools.session.RuleEngineWrapper.<init>(RuleEngineWrapper.java:131)
12:29:31,093 ERROR [STDERR] at
drools.session.RuleEngineWrapper.<init>(RuleEngineWrapper.java:59)
12:29:31,093 ERROR [STDERR] at
drools.session.droolsManagementBean.startRuleEngineWrapper(droolsManagementB
ean.java:35)
12:29:31,093 ERROR [STDERR] at
sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
12:29:31,093 ERROR [STDERR] at
sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
12:29:31,093 ERROR [STDERR] at
sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
12:29:31,093 ERROR [STDERR] at java.lang.reflect.Method.invoke(Unknown
Source)
12:29:31,093 ERROR [STDERR] at
org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:11
2)
12:29:31,093 ERROR [STDERR] at
org.jboss.ejb3.interceptor.InvocationContextImpl.proceed(InvocationContextIm
pl.java:166)
12:29:31,093 ERROR [STDERR] at
org.jboss.ejb3.interceptor.EJB3InterceptorsInterceptor.invoke(EJB3Intercepto
rsInterceptor.java:63)
12:29:31,093 ERROR [STDERR] at
org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:10
1)
12:29:31,093 ERROR [STDERR] at
org.jboss.ejb3.entity.TransactionScopedEntityManagerInterceptor.invoke(Trans
actionScopedEntityManagerInterceptor.java:54)
12:29:31,093 ERROR [STDERR] at
org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:10
1)
12:29:31,093 ERROR [STDERR] at
org.jboss.ejb3.AllowedOperationsInterceptor.invoke(AllowedOperationsIntercep
tor.java:46)
12:29:31,093 ERROR [STDERR] at
org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:10
1)
12:29:31,093 ERROR [STDERR] at
org.jboss.aspects.tx.TxPolicy.invokeInOurTx(TxPolicy.java:79)
12:29:31,093 ERROR [STDERR] at
org.jboss.aspects.tx.TxInterceptor$Required.invoke(TxInterceptor.java:191)
12:29:31,093 ERROR [STDERR] at
org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:10
1)
12:29:31,093 ERROR [STDERR] at
org.jboss.aspects.tx.TxPropagationInterceptor.invoke(TxPropagationIntercepto
r.java:76)
12:29:31,093 ERROR [STDERR] at
org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:10
1)
12:29:31,093 ERROR [STDERR] at
org.jboss.ejb3.stateless.StatelessInstanceInterceptor.invoke(StatelessInstan
ceInterceptor.java:62)
12:29:31,093 ERROR [STDERR] at
org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:10
1)
12:29:31,109 ERROR [STDERR] at
org.jboss.aspects.security.AuthenticationInterceptor.invoke(AuthenticationIn
terceptor.java:77)
12:29:31,109 ERROR [STDERR] at
org.jboss.ejb3.security.Ejb3AuthenticationInterceptor.invoke(Ejb3Authenticat
ionInterceptor.java:102)
12:29:31,109 ERROR [STDERR] at
org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:10
1)
12:29:31,109 ERROR [STDERR] at
org.jboss.ejb3.ENCPropagationInterceptor.invoke(ENCPropagationInterceptor.ja
va:47)
12:29:31,109 ERROR [STDERR] at
org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:10
1)
12:29:31,109 ERROR [STDERR] at
org.jboss.ejb3.asynchronous.AsynchronousInterceptor.invoke(AsynchronousInter
ceptor.java:106)
12:29:31,109 ERROR [STDERR] at
org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:10
1)
12:29:31,109 ERROR [STDERR] at
org.jboss.ejb3.stateless.StatelessContainer.dynamicInvoke(StatelessContainer
.java:263)
12:29:31,109 ERROR [STDERR] at
org.jboss.aop.Dispatcher.invoke(Dispatcher.java:106)
12:29:31,109 ERROR [STDERR] at
org.jboss.aspects.remoting.AOPRemotingInvocationHandler.invoke(AOPRemotingIn
vocationHandler.java:82)
12:29:31,109 ERROR [STDERR] at
org.jboss.remoting.ServerInvoker.invoke(ServerInvoker.java:828)
12:29:31,109 ERROR [STDERR] at
org.jboss.remoting.ServerInvoker.invoke(ServerInvoker.java:681)
12:29:31,109 ERROR [STDERR] at
org.jboss.remoting.transport.socket.ServerThread.processInvocation(ServerThr
ead.java:358)
12:29:31,109 ERROR [STDERR] at
org.jboss.remoting.transport.socket.ServerThread.dorun(ServerThread.java:412
)
12:29:31,109 ERROR [STDERR] at
org.jboss.remoting.transport.socket.ServerThread.run(ServerThread.java:239)
12:29:31,109 INFO [STDOUT] exception in
'droolsManagementBean.startRuleEngineWrapper(String, ArrayList<Object>)',
cannot handle it...
18 years, 2 months
State of fact templates
by Michael Zimmermann
Hi,
what is the current state of the fact template implementation in Drools
4.0.x?
There are few posts on the mailing list yet no detailed information in
the current documentation. Is there any further information available?
cu, Michael
18 years, 2 months
Jboss rules: or with binding issue?
by Rahul Phadnis
I am using Jboss Rules 4.0.2 version.
I am trying to using or with binding. However the
following doesn't work
rule "RulesTest"
# the if part
activation-group "ActivationGroup1"
salience 50
when
$eventType: EventType(id ==
Constants.EVENT_DEVCOM_ID)
$result : Result()
$param : Parameter($thresh:threshold)
# difference exceeds threshold value and
it is still day time
context: (or DevContext(difference > $thresh,
dayTime == true)
DevContext(difference > $thresh, sleepy
== false, dayTime == false) )
then
# do something here
end
I get rule compilation errors:
SEVERE: CheckedDroolsException
org.drools.CheckedDroolsException: There were errors
in the rule source: [320,18]: unknown:320:18
mismatched token:
[@1949,12142:12143='or',<34>,320:18]; expecting type
ID[321,15]: unknown:321:15 mismatched token:
[@1967,12215:12227='DevContext',<7>,321:15]; expecting
type RIGHT_PAREN[321,86]: unknown:321:86 mismatched
token: [@1990,12286:12286=')',<12>,321:86]; expecting
type THEN
at
org.drools.compiler.RuleBaseLoader.makeRuleBase(RuleBaseLoader.java:6
Is this a known bug ?
I can work around by using the alternate syntax
suggested in the documentation which is:
or $context : DevContext(difference > $thresh, dayTime
== true)
$context : DevComContext(difference > $thresh,
sleepy == false, dayTime == false) )
Rahul.
18 years, 2 months
About use of function in rulebase having two packages
by prateek.katiyar@wipro.com
Hello all
I have two packages in my rulebase .I want to use one function from one package in another package.
How can I do this? Please brief me.
Thanks.
With Regards
Prateek
The information contained in this electronic message and any attachments to this message are intended for the exclusive use of the addressee(s) and may contain proprietary, confidential or privileged information. If you are not the intended recipient, you should not disseminate, distribute or copy this e-mail. Please notify the sender immediately and destroy all copies of this message and any attachments.
WARNING: Computer viruses can be transmitted via email. The recipient should check this email and any attachments for the presence of viruses. The company accepts no liability for any damage caused by any virus transmitted by this email.
www.wipro.com
18 years, 2 months
Abour removing the rules from the rulebase
by prateek.katiyar@wipro.com
Hello all
Many congratulations on the release of Drools 4.0.3
I want to remove all the rules belonging to a specific AgendaGroup from the rulebase containing only one package.
I want to use only the name of the AgendaGroup ,not the names of the rules.
Is there any method in the API that can solve this purpose.
Can I use removeProcess(String id) method from the RuleBase interface for this problem?
With Regards
Prateek
The information contained in this electronic message and any attachments to this message are intended for the exclusive use of the addressee(s) and may contain proprietary, confidential or privileged information. If you are not the intended recipient, you should not disseminate, distribute or copy this e-mail. Please notify the sender immediately and destroy all copies of this message and any attachments.
WARNING: Computer viruses can be transmitted via email. The recipient should check this email and any attachments for the presence of viruses. The company accepts no liability for any damage caused by any virus transmitted by this email.
www.wipro.com
18 years, 2 months
DSL regex support
by Adam Lewandowski
I just upgraded to 4.0.3 and want to take advantage of regex support for
my DSL. Specifically, I want to be able to use a character class at the
start of my expander expression to allow the first character to be case
insensitive. For example (in the expander definition):
[when][Ff]act value is "{value}"= SomeFact( value == "{value}")
So that the rule could be written as "Fact value is..." or "fact value
is....". But I think this conflicts with a syntax that the parser uses
to add constraints to the previous declaration (according to the
reference docs, section 6.7.4). If I try to use the same character class
construct anywhere other than the first character it works fine.
Is there some escape sequence I can use to get what I'm looking for?
Simply escaping the [ and ] with \ didn't work.
Thanks,
Adam Lewandowski
18 years, 2 months