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
17 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
17 years, 1 month
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
17 years, 1 month
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...
17 years, 1 month
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
17 years, 1 month
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.
17 years, 1 month
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
17 years, 1 month
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
17 years, 1 month
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
17 years, 1 month
Re: Drools 4.0.3 Released
by J Michael Dean
Does 4.0.3 take care of the jdt inclusion problem? Or does this wait
for 4.1?
- Mike Dean
On Oct 24, 2007, at 12:51 AM, rules-users-request(a)lists.jboss.org wrote:
> Send rules-users mailing list submissions to
> rules-users(a)lists.jboss.org
>
> To subscribe or unsubscribe via the World Wide Web, visit
> https://lists.jboss.org/mailman/listinfo/rules-users
> or, via email, send a message with subject or body 'help' to
> rules-users-request(a)lists.jboss.org
>
> You can reach the person managing the list at
> rules-users-owner(a)lists.jboss.org
>
> When replying, please edit your Subject line so it is more specific
> than "Re: Contents of rules-users digest..."
>
>
> Today's Topics:
>
> 1. Rules firing with an update of another object (Fabrice
> Granzotto)
> 2. Re: [rules-dev] Drools 4.0.3 Released (Mark Proctor)
> 3. Re: Rules firing with an update of another object (Edson
> Tirelli)
> 4. RE: Rules firing with an update of another object
> (Anstis, Michael (M.))
>
>
> ----------------------------------------------------------------------
>
> Message: 1
> Date: Tue, 23 Oct 2007 18:11:54 -0400
> From: Fabrice Granzotto <granz(a)MIT.EDU>
> Subject: [rules-users] Rules firing with an update of another object
> To: rules-users(a)lists.jboss.org
> Message-ID: <20071023181154.mn0tbxwq1yw0k8kw(a)webmail.mit.edu>
> Content-Type: text/plain; charset=ISO-8859-1
>
> Hi everybody!
>
> Here is my code and my rule. The problem is that the rule doesn?t
> detect that
> my item ?chocolate? contained in the container has moved to the
> ?office?.
>
> I know that if I update the item instead the container it?s
> working, but I was
> wondering if there is a solution to detect this movement by this
> way? Do you
> have a solution?
>
> Thanks!
>
> *******CODE *******
> session = ruleBase.newStatefulSession();
> Location kitchen=new Location("kitchen");
> Location office=new Location("office");
> Container container1=new Container("container1",kitchen);
> session.insert(container1);
> Item chocolate=new Item("chocolate", container1);
> session.insert(chocolate);
> session.fireAllRules();
> //No rules fired => OK
> container1.setLocation(office);
> session.update(session.getFactHandle(container1), container1);
> session.fireAllRules();
> //Once again, no rules fired => Not OK... I want detect this movement
>
> *******RULE *******
> rule "An item is in the office"
> salience 0
> when
> $itemA : Item($cont : container,
> $cont.location.name=="office")
> then
> System.out.println("item in office");
> end
>
>
> ------------------------------
>
> Message: 2
> Date: Wed, 24 Oct 2007 00:47:41 +0100
> From: Mark Proctor <mproctor(a)codehaus.org>
> Subject: [rules-users] Re: [rules-dev] Drools 4.0.3 Released
> To: Rules Dev List <rules-dev(a)lists.jboss.org>
> Cc: Rules Users List <rules-users(a)lists.jboss.org>
> Message-ID: <471E881D.1090900(a)codehaus.org>
> Content-Type: text/plain; charset="iso-8859-1"
>
> Fernando Meyer wrote:
>>
>>
>>
>> <http://blog.athico.com/2007/10/drools-403-released.html>
>>
>>
>> We just released Drools v4.0.3
>> <http://labs.jboss.com/drools/downloads.html>. This is a minor
>> release
>> with a few improvements on existing features and some bug fixes.
>>
>> Release Notes - JBoss Drools - Version 4.0.3
>>
>> We would like to really thanks all the contributors that helped on
>> getting this release out. From those contributing patches and
>> docs, to
>> those testing and reporting bugs and providing feedback. The list
>> is a
>> bit long to post all names here and I may incur in a mistake
>> forgetting someone, so our open public thank you to you all!
>>
>> Follows the release notes.
>>
>> Happy Drooling
>> Drools Team
>>
>>
>> Bug
>>
>>
>> * [JBRULES-1264 <http://jira.jboss.com/jira/browse/JBRULES-1264>]
>> - NPE at BaseObjectClassFieldExtractor.getLongValue with
>> null fields
>>
>> * [ JBRULES-1266 <http://jira.jboss.com/jira/browse/
>> JBRULES-1266>]
>> - Composite facts types (OR, AND) not rendering correctly
>>
>> * [JBRULES-1272 <http://jira.jboss.com/jira/browse/JBRULES-1272>]
>> - DSL : String index out of range: -1
>>
>> * [ JBRULES-1279 <http://jira.jboss.com/jira/browse/
>> JBRULES-1279>]
>> - Memory leak in release 4.0.2
>>
>> * [JBRULES-1281 <http://jira.jboss.com/jira/browse/JBRULES-1281>]
>> - ExecutorService cannot be shared
>>
>> * [ JBRULES-1282 <http://jira.jboss.com/jira/browse/
>> JBRULES-1282>]
>> - Problems uploading models etc. into the BRMS
>>
>> * [JBRULES-1283 <http://jira.jboss.com/jira/browse/JBRULES-1283>]
>> - Unable to serialize rule base ( NotSerializableException:
>> org.drools.base.FireAllRulesRuleBaseUpdateListener )
>>
>> * [JBRULES-1295 <http://jira.jboss.com/jira/browse/JBRULES-1295>]
>> - DSL Mapping files does not support comments and empty lines
>>
>>
>> Feature Request
>>
>> * [JBRULES-1252 <http://jira.jboss.com/jira/browse/JBRULES-1252>]
>> - DrlDumper does not dump import functions
>>
>>
>> Task
>>
>> * [JBRULES-1260 <http://jira.jboss.com/jira/browse/JBRULES-1260>]
>> - Include eclipse JDT library in drools-eclipse IDE plugin
>>
> Should not that this was a "not fix". heh annoying the way that JIRA
> still includes rejected items in its reporting.
>>
>>
>> * [ JBRULES-1293 <http://jira.jboss.com/jira/browse/
>> JBRULES-1293>]
>> - Backport for Eclipse 3.3
>>
>> * [JBRULES-1294 <http://jira.jboss.com/jira/browse/JBRULES-1294>]
>> - Upgrade to MVEL 1.2.10
>>
>>
>>
>> --
>> Fernando Meyer http://fmeyer.org
>> JBoss Rules Core Developer
>> fernando(a)fmeyer.org <mailto:fernando@fmeyer.org>
>> ---------------------------------------------------------------------
>> ---
>>
>> _______________________________________________
>> rules-dev mailing list
>> rules-dev(a)lists.jboss.org
>> https://lists.jboss.org/mailman/listinfo/rules-dev
>>
>
>
17 years, 1 month