Mark Proctor | 4 Jul 2008 15:40

5.0 M1 is out!!!

5.0 M1 is out.

New and Noteworth 
http://blog.athico.com/2008/07/drools-50-m1-new-and-noteworthy.html

Downloads http://www.jboss.org/drools/downloads.html

Have Fun

The Drools Team.

---------------------------------------------------------------------
To unsubscribe from this list, please visit:

    http://xircles.codehaus.org/manage_email

Mark Proctor | 4 Jul 2008 15:54

[rules-dev] 5.0 M1 is out!!!

5.0 M1 is out.

New and Noteworth 
http://blog.athico.com/2008/07/drools-50-m1-new-and-noteworthy.html

Downloads http://www.jboss.org/drools/downloads.html

Have Fun

The Drools Team.
_______________________________________________
rules-dev mailing list
rules-dev <at> lists.jboss.org
https://lists.jboss.org/mailman/listinfo/rules-dev

Mark Proctor | 6 Jul 2008 17:41

[rules-dev] Smooks

Mic,

Now that we have a DroolsSmooksDataLoader for stateful and stateless 
sessions:
http://blog.athico.com/2008/07/drools-smooks-data-loader.html

We should probably think about handling smooks config files in the BRMS 
and possible add a support in the rule agent?

Mark
_______________________________________________
rules-dev mailing list
rules-dev <at> lists.jboss.org
https://lists.jboss.org/mailman/listinfo/rules-dev

Michael Neale | 7 Jul 2008 03:42
Picon
Gravatar

[rules-dev] good idea?

Someone asked about:
http://www.mail-archive.com/rules-users <at> lists.jboss.org/msg05142.html

Basically - request was for constants in DRL (effectively).

Thoughts? (ping me directly if you have a strong opinion on it).
_______________________________________________
rules-dev mailing list
rules-dev <at> lists.jboss.org
https://lists.jboss.org/mailman/listinfo/rules-dev

Mark Proctor | 7 Jul 2008 04:21

Re: [rules-dev] good idea?

Having MVEL initialisers for variables something I'd like to see happen.

global Integer i  = ... some mvel expresion....;

Would that solve all the needed use cases?

Mark

Michael Neale wrote:
> Someone asked about:
> http://www.mail-archive.com/rules-users <at> lists.jboss.org/msg05142.html
>
> Basically - request was for constants in DRL (effectively).
>
> Thoughts? (ping me directly if you have a strong opinion on it).
> _______________________________________________
> rules-dev mailing list
> rules-dev <at> lists.jboss.org
> https://lists.jboss.org/mailman/listinfo/rules-dev
>
>   

_______________________________________________
rules-dev mailing list
rules-dev <at> lists.jboss.org
https://lists.jboss.org/mailman/listinfo/rules-dev

Steven Williams | 7 Jul 2008 05:45
Picon

Re: [rules-dev] good idea?

I have a current need for constants, and Mark's idea would be a partial solution. I can see however a requirement for a constant across all DRLs, whereas I think Mark's way would require you to initialise the constant in every file in which it is used.

cheers
Steve

On Mon, Jul 7, 2008 at 12:21 PM, Mark Proctor <mproctor <at> codehaus.org> wrote:
Having MVEL initialisers for variables something I'd like to see happen.

global Integer i  = ... some mvel expresion....;

Would that solve all the needed use cases?

Mark



Michael Neale wrote:
Someone asked about:
http://www.mail-archive.com/rules-users <at> lists.jboss.org/msg05142.html

Basically - request was for constants in DRL (effectively).

Thoughts? (ping me directly if you have a strong opinion on it).
_______________________________________________
rules-dev mailing list
rules-dev <at> lists.jboss.org
https://lists.jboss.org/mailman/listinfo/rules-dev

 

_______________________________________________
rules-dev mailing list
rules-dev <at> lists.jboss.org
https://lists.jboss.org/mailman/listinfo/rules-dev



--
Steven Williams

Supervising Consultant

Object Consulting
Office: 8615 4500 Mob: 0439 898 668 Fax: 8615 4501
steven.williams <at> objectconsulting.com.au
www.objectconsulting.com.au

consulting | development | training | support
our experience makes the difference
_______________________________________________
rules-dev mailing list
rules-dev <at> lists.jboss.org
https://lists.jboss.org/mailman/listinfo/rules-dev
Cosimo Birtolo | 8 Jul 2008 11:42
Picon
Favicon

[rules-dev] array property evaluation

i all,
I'm using drools rule with axis2 and tomcat 6.0.13 and i get this error

org.drools.RuntimeDroolsException: Exception executing predicate eval( stereotypeID[1] == "D1" )
    at org.drools.rule.PredicateConstraint.isAllowed(PredicateConstraint.java:216)
    at org.drools.reteoo.AlphaNode.assertObject(AlphaNode.java:137)
    at org.drools.reteoo.SingleObjectSinkAdapter.propagateAssertObject(SingleObjectSinkAdapter.java:22)
    at org.drools.reteoo.AlphaNode.assertObject(AlphaNode.java:145)
    at org.drools.reteoo.SingleObjectSinkAdapter.propagateAssertObject(SingleObjectSinkAdapter.java:22)
    at org.drools.reteoo.ObjectTypeNode.assertObject(ObjectTypeNode.java:162)
    at org.drools.reteoo.Rete.assertObject(Rete.java:175)
    at org.drools.reteoo.ReteooRuleBase.assertObject(ReteooRuleBase.java:192)
    at org.drools.reteoo.ReteooWorkingMemory.doInsert(ReteooWorkingMemory.java:71)
    at org.drools.common.AbstractWorkingMemory.insert(AbstractWorkingMemory.java:911)
    at org.drools.common.AbstractWorkingMemory.insert(AbstractWorkingMemory.java:883)
    at org.drools.common.AbstractWorkingMemory.insert(AbstractWorkingMemory.java:684)
    at sapi.adapter.ws.AdapterManager.getAdaptedEntity(AdapterManager.java:29)
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
    at java.lang.reflect.Method.invoke(Unknown Source)
    at org.apache.axis2.rpc.receivers.RPCUtil.invokeServiceClass(RPCUtil.java:194)
    at org.apache.axis2.rpc.receivers.RPCMessageReceiver.invokeBusinessLogic(RPCMessageReceiver.java:98)
    at org.apache.axis2.receivers.AbstractInOutMessageReceiver.invokeBusinessLogic(AbstractInOutMessageReceiver.java:40)
    at org.apache.axis2.receivers.AbstractMessageReceiver.receive(AbstractMessageReceiver.java:96)
    at org.apache.axis2.engine.AxisEngine.receive(AxisEngine.java:145)
    at org.apache.axis2.transport.http.HTTPTransportUtils.processHTTPPostRequest(HTTPTransportUtils.java:275)
    at org.apache.axis2.transport.http.AxisServlet.doPost(AxisServlet.java:120)
    at javax.servlet.http.HttpServlet.service(HttpServlet.java:710)
    at javax.servlet.http.HttpServlet.service(HttpServlet.java:803)
    at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:290)
    at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
    at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:230)
    at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:175)
    at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:128)
    at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:104)
    at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109)
    at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:261)
    at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:844)
    at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:581)
    at org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:447)
    at java.lang.Thread.run(Unknown Source)
Caused by: org.mvel.PropertyAccessException: unable to resolve property: stereotypeID[1]
    at org.mvel.optimizers.impl.refl.ReflectiveAccessorOptimizer.compileGetChain(ReflectiveAccessorOptimizer.java:286)
    at org.mvel.optimizers.impl.refl.ReflectiveAccessorOptimizer.optimizeAccessor(ReflectiveAccessorOptimizer.java:110)
    at org.mvel.ASTNode.getReducedValueAccelerated(ASTNode.java:186)
    at org.mvel.ast.BinaryOperation.getReducedValueAccelerated(BinaryOperation.java:21)
    at org.mvel.MVELRuntime.execute(MVELRuntime.java:90)
    at org.mvel.CompiledExpression.getValue(CompiledExpression.java:111)
    at org.mvel.MVEL.executeExpression(MVEL.java:235)
    at org.drools.base.mvel.MVELPredicateExpression.evaluate(MVELPredicateExpression.java:45)
    at org.drools.rule.PredicateConstraint.isAllowed(PredicateConstraint.java:209)
    ... 37 more
Caused by: java.lang.ArrayIndexOutOfBoundsException: 1
    at org.mvel.optimizers.impl.refl.ReflectiveAccessorOptimizer.getCollectionProperty(ReflectiveAccessorOptimizer.java:459)
    at org.mvel.optimizers.impl.refl.ReflectiveAccessorOptimizer.compileGetChain(ReflectiveAccessorOptimizer.java:264)
    ... 45 more

import sapi.adapter.ws.EntityAdapter;
import sapi.KnowledgeManager.bean.Entity;
import sapi.KnowledgeManager.bean.UserContextStereotype;


rule "all_1.1"
    salience 10
    no-loop true
    when
        $ent : Entity();
        $ucs : UserContextStereotype(
               magnifier==true &&
               stereotypeID[1]=="D1");
    then
        $ent = EntityAdapter.resize($ent,90);
       end

I don't understand why when I start this rule under eclipse it work just fine.
If I use this application as webService I get this error.
Can anyone help me?


Thanks

Posta, news, sport, oroscopo: tutto in una sola pagina
Crea l'home page che piace a te!.

Posta, news, sport, oroscopo: tutto in una sola pagina
Crea l'home page che piace a te!.
_______________________________________________
rules-dev mailing list
rules-dev <at> lists.jboss.org
https://lists.jboss.org/mailman/listinfo/rules-dev
Mark Proctor | 8 Jul 2008 13:40

Re: [rules-dev] array property evaluation

You might get help if you ask on the user mailing list, this is for discussion on the R&D development of drools itself - but using drools. See this page on ettiquite for mailing lists:
http://www.jboss.org/drools/lists.html

Mark
Cosimo Birtolo wrote:
i all,
I'm using drools rule with axis2 and tomcat 6.0.13 and i get this error

org.drools.RuntimeDroolsException: Exception executing predicate eval( stereotypeID[1] == "D1" )
    at org.drools.rule.PredicateConstraint.isAllowed(PredicateConstraint.java:216)
    at org.drools.reteoo.AlphaNode.assertObject(AlphaNode.java:137)
    at org.drools.reteoo.SingleObjectSinkAdapter.propagateAssertObject(SingleObjectSinkAdapter.java:22)
    at org.drools.reteoo.AlphaNode.assertObject(AlphaNode.java:145)
    at org.drools.reteoo.SingleObjectSinkAdapter.propagateAssertObject(SingleObjectSinkAdapter.java:22)
    at org.drools.reteoo.ObjectTypeNode.assertObject(ObjectTypeNode.java:162)
    at org.drools.reteoo.Rete.assertObject(Rete.java:175)
    at org.drools.reteoo.ReteooRuleBase.assertObject(ReteooRuleBase.java:192)
    at org.drools.reteoo.ReteooWorkingMemory.doInsert(ReteooWorkingMemory.java:71)
    at org.drools.common.AbstractWorkingMemory.insert(AbstractWorkingMemory.java:911)
    at org.drools.common.AbstractWorkingMemory.insert(AbstractWorkingMemory.java:883)
    at org.drools.common.AbstractWorkingMemory.insert(AbstractWorkingMemory.java:684)
    at sapi.adapter.ws.AdapterManager.getAdaptedEntity(AdapterManager.java:29)
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
    at java.lang.reflect.Method.invoke(Unknown Source)
    at org.apache.axis2.rpc.receivers.RPCUtil.invokeServiceClass(RPCUtil.java:194)
    at org.apache.axis2.rpc.receivers.RPCMessageReceiver.invokeBusinessLogic(RPCMessageReceiver.java:98)
    at org.apache.axis2.receivers.AbstractInOutMessageReceiver.invokeBusinessLogic(AbstractInOutMessageReceiver.java:40)
    at org.apache.axis2.receivers.AbstractMessageReceiver.receive(AbstractMessageReceiver.java:96)
    at org.apache.axis2.engine.AxisEngine.receive(AxisEngine.java:145)
    at org.apache.axis2.transport.http.HTTPTransportUtils.processHTTPPostRequest(HTTPTransportUtils.java:275)
    at org.apache.axis2.transport.http.AxisServlet.doPost(AxisServlet.java:120)
    at javax.servlet.http.HttpServlet.service(HttpServlet.java:710)
    at javax.servlet.http.HttpServlet.service(HttpServlet.java:803)
    at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:290)
    at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
    at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:230)
    at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:175)
    at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:128)
    at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:104)
    at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109)
    at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:261)
    at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:844)
    at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:581)
    at org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:447)
    at java.lang.Thread.run(Unknown Source)
Caused by: org.mvel.PropertyAccessException: unable to resolve property: stereotypeID[1]
    at org.mvel.optimizers.impl.refl.ReflectiveAccessorOptimizer.compileGetChain(ReflectiveAccessorOptimizer.java:286)
    at org.mvel.optimizers.impl.refl.ReflectiveAccessorOptimizer.optimizeAccessor(ReflectiveAccessorOptimizer.java:110)
    at org.mvel.ASTNode.getReducedValueAccelerated(ASTNode.java:186)
    at org.mvel.ast.BinaryOperation.getReducedValueAccelerated(BinaryOperation.java:21)
    at org.mvel.MVELRuntime.execute(MVELRuntime.java:90)
    at org.mvel.CompiledExpression.getValue(CompiledExpression.java:111)
    at org.mvel.MVEL.executeExpression(MVEL.java:235)
    at org.drools.base.mvel.MVELPredicateExpression.evaluate(MVELPredicateExpression.java:45)
    at org.drools.rule.PredicateConstraint.isAllowed(PredicateConstraint.java:209)
    ... 37 more
Caused by: java.lang.ArrayIndexOutOfBoundsException: 1
    at org.mvel.optimizers.impl.refl.ReflectiveAccessorOptimizer.getCollectionProperty(ReflectiveAccessorOptimizer.java:459)
    at org.mvel.optimizers.impl.refl.ReflectiveAccessorOptimizer.compileGetChain(ReflectiveAccessorOptimizer.java:264)
    ... 45 more

import sapi.adapter.ws.EntityAdapter;
import sapi.KnowledgeManager.bean.Entity;
import sapi.KnowledgeManager.bean.UserContextStereotype;


rule "all_1.1"
    salience 10
    no-loop true
    when
        $ent : Entity();
        $ucs : UserContextStereotype(
               magnifier==true &&
               stereotypeID[1]=="D1");
    then
        $ent = EntityAdapter.resize($ent,90);
       end

I don't understand why when I start this rule under eclipse it work just fine.
If I use this application as webService I get this error.
Can anyone help me?


Thanks

Posta, news, sport, oroscopo: tutto in una sola pagina
Crea l'home page che piace a te!.

Posta, news, sport, oroscopo: tutto in una sola pagina
Crea l'home page che piace a te!. _______________________________________________ rules-dev mailing list rules-dev <at> lists.jboss.org https://lists.jboss.org/mailman/listinfo/rules-dev

_______________________________________________
rules-dev mailing list
rules-dev <at> lists.jboss.org
https://lists.jboss.org/mailman/listinfo/rules-dev
Yoni Mazar | 9 Jul 2008 13:51
Picon

[rules-dev] Rule Parameters/Aliases


Hi all, 

We are at the begining of a new clinical decision-support project. 
We plan using drools (using Eclipse) in order to manage and execute our
business logic. 
As part of our research, we also evaluated JRules which has a feature that
is very important to us and we could not find in Drools. 
Unless we missed it out, we will probably try and add this functionality
ourselves.

In JRules, one can define a ruleset (corresponds to a package) with
parameters. Each parameter has a datatype (a class), a direction
(in/out/inout), and an alias. 
Then, within the rules, the user can refer to the parameter alias. For
example, a user can define a ruleset with the following parameters: 

*class=LabResult, direction=in, alias=hemoglobin 
*class=LabResult, direction=in, alias=creatinin 

Then, within a rule, one can write: 
when hemoglobin.value<10 and creatinin.value>34 
then... 

Now, the application retrieves the patient data accordingly (hemoglobin and 
creatinine data separetly - even though they are of the same type) and sets
the ruleset parameters: 
ruleset.parameters.add("hemoglobin",hemoglobinFact) 
ruleset.parameters.add("creatinin",creatininFact) 

It is important that the definition of the aliases will be done outside of
the rule (and not by defining in-rule variables)

This approach simplifies the rules since some of the filtering is being
applied externally (not in the rule itself)

Does someone has an idea how to bridge this gap using Drools? 
Are there any workarounds that can be used in order to avoid changes in
code?

And here we can use your help:
We are new to Drools (and still have to dive into the big ocean of code that
exists). 
The following features

1) defining parameters (in the package level...something like import)
2) adding in/out modifiers (can be used in LHS, RHS, or both)
3) allowing assignment of aliases to parameters 
4) adding such functionality to the rule editor (auto-complete ,type safety)

Where should we start?
Do you have any ideas that can help start this process (e.g. relevant
classes, modules)?
We would appreciate any help regarding any of the items in the list above.
Any hints, suggestions, directions, referals and so on.

Thanks a lot.

Yoni

--

-- 
View this message in context: http://www.nabble.com/Rule-Parameters-Aliases-tp18359434p18359434.html
Sent from the drools - dev mailing list archive at Nabble.com.

_______________________________________________
rules-dev mailing list
rules-dev <at> lists.jboss.org
https://lists.jboss.org/mailman/listinfo/rules-dev

Anstis, Michael (M. | 9 Jul 2008 13:56
Picon
Favicon

RE: [rules-dev] Rule Parameters/Aliases

I am not sure re-posting the same questions a couple of weeks later will
give any better responses.

I also know this would better be addressed to the users forum and not
the developers'.

With regards,

Mike

-----Original Message-----
From: rules-dev-bounces <at> lists.jboss.org
[mailto:rules-dev-bounces <at> lists.jboss.org] On Behalf Of Yoni Mazar
Sent: 09 July 2008 12:51
To: rules-dev <at> lists.jboss.org
Subject: [rules-dev] Rule Parameters/Aliases

Hi all, 

We are at the begining of a new clinical decision-support project. 
We plan using drools (using Eclipse) in order to manage and execute our
business logic. 
As part of our research, we also evaluated JRules which has a feature
that
is very important to us and we could not find in Drools. 
Unless we missed it out, we will probably try and add this functionality
ourselves.

In JRules, one can define a ruleset (corresponds to a package) with
parameters. Each parameter has a datatype (a class), a direction
(in/out/inout), and an alias. 
Then, within the rules, the user can refer to the parameter alias. For
example, a user can define a ruleset with the following parameters: 

*class=LabResult, direction=in, alias=hemoglobin 
*class=LabResult, direction=in, alias=creatinin 

Then, within a rule, one can write: 
when hemoglobin.value<10 and creatinin.value>34 
then... 

Now, the application retrieves the patient data accordingly (hemoglobin
and 
creatinine data separetly - even though they are of the same type) and
sets
the ruleset parameters: 
ruleset.parameters.add("hemoglobin",hemoglobinFact) 
ruleset.parameters.add("creatinin",creatininFact) 

It is important that the definition of the aliases will be done outside
of
the rule (and not by defining in-rule variables)

This approach simplifies the rules since some of the filtering is being
applied externally (not in the rule itself)

Does someone has an idea how to bridge this gap using Drools? 
Are there any workarounds that can be used in order to avoid changes in
code?

And here we can use your help:
We are new to Drools (and still have to dive into the big ocean of code
that
exists). 
The following features

1) defining parameters (in the package level...something like import)
2) adding in/out modifiers (can be used in LHS, RHS, or both)
3) allowing assignment of aliases to parameters 
4) adding such functionality to the rule editor (auto-complete ,type
safety)

Where should we start?
Do you have any ideas that can help start this process (e.g. relevant
classes, modules)?
We would appreciate any help regarding any of the items in the list
above.
Any hints, suggestions, directions, referals and so on.

Thanks a lot.

Yoni

--

-- 
View this message in context:
http://www.nabble.com/Rule-Parameters-Aliases-tp18359434p18359434.html
Sent from the drools - dev mailing list archive at Nabble.com.

_______________________________________________
rules-dev mailing list
rules-dev <at> lists.jboss.org
https://lists.jboss.org/mailman/listinfo/rules-dev

_______________________________________________
rules-dev mailing list
rules-dev <at> lists.jboss.org
https://lists.jboss.org/mailman/listinfo/rules-dev


Gmane