MVEL expression
by Femke De Backere
Hi,
The following expression keeps returning the error [112,32]: [ERR 103]
Line 112:32 no viable alternative at input '+' in rule "RuleFlow-Split-
masterproef.ruleflows.shortsedation-18-22" in pattern Patient:
Patient(sedation.ultiva+0.02 > 0.1)
with sedation.ultiva returning a double
What am I doing wrong?
Thx,
Femke
14 years, 4 months
facts custom sort
by Syargey
Hello all,
I experienced a problem I can't solve.
After rules firing I got a number of facts of certain type.
I would like to get a collection of facts sorted by custom field with a
query.
Drools guide proposes to sort facts by a rule like:
rule "Rule 03"
when
$number : Number( )
not Number( intValue < $number.intValue )
then
System.out.println("Number found with value: "+$number.intValue() );
retract( $number );
end
But it doesn't suit me:
1) I can't retract facts from session
2) I need to get sorted collection with a query which doesn't have 'then'
part.
Is there any method to get custom sorted collection with a query?
--
View this message in context: http://drools.46999.n3.nabble.com/facts-custom-sort-tp3538410p3538410.html
Sent from the Drools: User forum mailing list archive at Nabble.com.
14 years, 4 months
removing reference to Global Data Model from Drools Package in Guvnor
by Welsh, Armand
Hello community,
I have noticed in interesting paradox in Guvnor.
If I promote my data model to the Global package, I can then import the model from global into my individual packages, so that I can update the model once, and all packages that use the model automatically have the new model.
However, I have a need to remove the imported model from one of my packages.
If I select the Model view, I have three buttons, Refresh List, Open Selected, and Open Selected to Single Tab.
If I open the model, and select the Attributes tab, it show the model comes from Global. If I archive the model, the global model is archived, and removed from all packages. If I restore the model, it is restored to all the packages that referenced it prior to archiving the model.
So my question: how to I remove a model, that was imported into a package from the Global Area, from my package, without remove the global model from the global area?
Regards,
Armand Welsh
14 years, 4 months
Re: [rules-users] Guvnor hates me
by Ronald Albury
Thanks Michael ... you've been very helpful.
Yes, I am considering helping out on the documentation (my undergrad is in
Instructional Technology) ... if I can ever figure out how all of this
works. I have also read thru some of the 3rd party books on the subject,
and I find them quite lacking also. I am not a dumb person, and I am not
inexperienced (been programming since 1980) ... so either I am just having
issues with the writing style of the manuals/books, or other people are
having trouble with them as well.
While we're waiting for an eclipse person to speak up, I have another
eclipse question. If I do a Project->Build All, I can see the errors in my
rule files. How can I configure eclipse to see the drl errors when I save
the files (as happens with my Java files).
Thanks.
14 years, 4 months
CDI Integration
by Robert Morse
I was asking the Seam 3 guys about Drools support, and Shane Bryzak replied:
"We need to update that page - Seam will not be providing a Drools module, rather the Drools team will be providing native CDI integration instead."
Any idea when there will be CDI support?
The human mind is an iterative processor, it never does anything right the first time. What it does well is to make improvements on every iteration (deMarco)
14 years, 4 months
Re: [rules-users] Firing Mulitple packages
by Esteban Aliverti
Could you post the way you are using to add kassets to kbase?
El ago 13, 2010 12:20 p.m., "Vignesh" <viki.ccc(a)gmail.com> escribió:
Hi Esteban,
I have tried the same logic by adding all the packages in my application in
to the kbase and executed the same, but only the drl file got loaded in it,
other kassets like dsl, ruleflow present in it were not added to the same.
Do we need to add everything separetly?
Kindly let me know whether im missing something here.
Thanks,
Vignesh
--
View this message in context:
http://drools-java-rules-engine.46999.n3.nabble.com/Firing-Mulitple-packa...
Sent from the Drools - User mailing list archive at Nabble.com.
____________________________________...
14 years, 4 months
Drools Activation Group
by Java Bean
Hello Drools Experts,
I have a question on activation group and trying to understand the
mechanism.
I have the following rules in a .drl file :
import function com.test.utils.StringUtil.isEmpty;
import function com.test.utils.Logger.log;
rule "r1"
salience 10
activation-group "fireOnlyOnce"
when
SomeObject($s: someStringKey)
eval(isEmpty($s) // static java method imported as function
then
log("doSomething");
end
rule "r2"
activation-group "fireOnlyOnce"
when
SomeObject($s: someStringKey)
eval(checkWithDB($s) // Make a call to the DB to validate
someStringKeyis valid
then
log("doSomething");
end
In "r1" I am checking for 'someStringKey' is not null or empty. In "r2" , I
am making a call to the DB to check 'someStringKey' is a valid id. During
the debug, I found out that both "r1" and "r2" is fired but only one
consequence is executed depending on the outcome of the r1. I want "r2" to
fire only when "r1" evaluates to false. How can I achieve this in Drools?
Thanks for your time and appreciate your help.
14 years, 4 months
Call query from other query
by Syargey
I read in Drools guide, that queries can now call other queries.
But the guide doesn't give much details, mostly paying attention to a rather
specific case.
I have two queries having common parts and try to figure out how to get rid
of duplicate code.
Here is the simplified form of queries I'd like to have:
---------
query query1
$facts: List()
from collect( Fact( name == "name1" ) )
end
query query2
$l: List()
from collect( Fact( value == "1" ) from ?query1() )
end
---------
query2 syntax is invalid and and it is not clear for me how $facts from
query1 can be accessed in query2.
--
View this message in context: http://drools.46999.n3.nabble.com/Call-query-from-other-query-tp3542082p3...
Sent from the Drools: User forum mailing list archive at Nabble.com.
14 years, 4 months