JL Livemont wrote:
>
> hi
> thanks for this quick reply
> i don't know if there is the same expression in english so i traduce word
> by word
> I draw you my hat
> 'this' is very impressive :^)
> i will try it after the week end ...
> for the rest i changed w
> my rules to avoid or in predicate
Please give a better example or some pseudo code of what you are trying
to do.
-Michael
_
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] On Behalf Of Ronald R.
DiFrango
Sent: Friday, April 06, 2007 8:15 AM
To: Rules Users List
Subject: [rules-users] Rules Design Question
All,
I ha
Edson,
I am not trying with Trunk .. i am on 3.1.0 M1 ... If i want to move to
trunk what should i be doing ? Can you point me to some documentation ?
thanks
Sanjay
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] On Behalf Of Edson Tirelli
Sent: Friday, April
Hi there,
Best to understand your needs before suggesting, but working simply on
syntax, if you are using trunk, you can do this:
rule "findRelevantResult"
when
$resultat : Resultat( ( results.size() > 0 ) )
then
end
rule "testPsaId"
when
Rahul,
Yes, this is new to 3.1M2 (trunk). You can call methods with parameters
if you use predicates. But it is important to note you must be careful when
doing it, because the return value must be time-constant, and there are perf
impacts if you abuse it.
[]s
Edson
2007/4/6, Rahul Phad
Sanjay,
Are you trying with trunk? there was an issue using globals inside
predicates that was fixed after M1...
Let me know...
[]s
Edson
2007/4/6, Sanjay Singh - s0singh <[EMAIL PROTECTED]>:
Thanks Edson .. i tried with these syntaxes but does not work .. any
other clues ? just t
Mark,
I think this is a regression, isn't it? Before integrating MVEL this was
a valid scenario, wasn't it?
[]s
Edson
2007/4/6, Sanjay Singh - s0singh <[EMAIL PROTECTED]>:
This also fails
when
itemMaint : ItemMaintWorkVo()
oldItem : ItemVo( statusCode : itemStatusCode == "oldIte
> ItemVo( statusCode : itemStatusCode != null, (*
> itemValidationDao.isValidItemStatus(statusCode)*) )
Can we call methods with arguments in the LHS? Or this
can be done for globals but not facts? Is this a new
feature of 3.1?
-Rahul
___
rules-users ma
Hi all,
i'm quiet new in drools (a french speaking so i appologise for my english
mistakes) and i'm surprise by the folowing problem
in drools example i found this code ...
Example 3.14. Return Value operator
Person( girlAge : age, sex == "F" )
Person( age == ( new Integer(girlAge.intValue() +
This also fails
when
itemMaint : ItemMaintWorkVo()
oldItem : ItemVo( statusCode : itemStatusCode == "oldItem") from
itemMaint.getCurrentItem()
newItem : ItemVo( statusCode : itemStatusCode == "oldItem" ) from
itemMaint.getNewItem()
then
System.out.println("This works");
Caused by: org.drools
Thanks Edson .. i tried with these syntaxes but does not work .. any
other clues ? just to let you know that itemValidationDao is declared
global and itemvo is asserted
when
item : ItemVo(itemStatusCode != ItemVo.STATUS_ACTIVE ,
(itemValidationDao.isValidItemStatus(itemStatusCode)))
Caused by:
Sanjay
I already answered question number 1. Plz see my other e-mail.
For question number 2, try:
rule "Item status cannot be null"
when
itemMaint : ItemMaintWorkVo()
oldItem : ItemVo( ) from itemMaint.getCurrentItem()
newItem : ItemVo( ) from itemMaint.getNewItem()
then
end
The answer to your question is not simple.
Basically, the constraint evaluation will follow a priority order, in the
following way:
1) all alpha constraints are evaluated
2) all beta indexable constraints are evaluated
3) all beta non indexable constraints are evaluated
Inside each of the
Mark,
What is the status on MVEL stuff used in core?
[]s
Edson
2007/4/6, vista2007 <[EMAIL PROTECTED]>:
I implement the following logic using 3.1M edition,
package com.software.warehouse.rules.impl;
#list any import classes here.
import com.software.warehouse.model.Item;
import com
Hello everybody,
I still have 2 of my questions pending and i would really appreciate if
somebody could get back to me and help me out.
1.Calling dao in LHS when the method calls does not return collection
and returns lets say a boolean .. Code is attached below for a quick
look.
rule "Item sh
Sunjay,
Methods called by using the "from" CE are expected to return a collection
of VO's, not boolean results. For your case, probably what you want is
something like:
ItemVo( statusCode : itemStatusCode != null, (*
itemValidationDao.isValidItemStatus(statusCode)*) )
A predicate allow yo
Jean,
Answering your questions:
1) Opinion please: Would the outlined approach work in this case given the
number of fields to process and the required sequence for processing. Seems
that rule management may be a bit difficult...
As long as you implement a "front-end" for your customer
All,
It appears as though the JBoss Rules IDE Eclipse update site does not have
the latest version [3.0.6] installed on it. Any chance of it getting
update?
Thanks,
Ron
___
rules-users mailing list
rules-users@lists.jboss.org
https://lists.jboss.org/
Is there a Role object asserted into your working memory?
Remember that adding the Role pattern to your rule will make your rule
fire once for each Role object. If you don't have any role object, the rule
obviously will not fire.
[]s
Edson
2007/4/5, fakhfakh ismail <[EMAIL PROTECTED]>
Sudipta,
I believe the problem is that you can't import classes from the default
package into your rules file, but I'm not sure.
Try making Message a top level class (not an inner class) and put it in
a package (not the default one). Import it in the DRL and you shall be fine.
We nee
Sanjay,
You almost got it right. If you are using 3.1M1 or later, you can do:
item : ItemVo ( itemStatusCode == ItemVo.STATUS_ACTIVE | ==
ItemVo.STATUS_DELETE )
field connective constraints use a single "|" or "&".
[]s
Edson
2007/4/4, Sanjay Singh - s0singh <[EMAIL PROTECTED]>:
Whil
Hi Gaminda,
What you can't do in J2EE containers is to access the filesystem
directly. Doing a getResourceAsStream() as you are doing is allowed,
specially because your drl file may be inside the application jar/war/ear.
If you are having a NPE, the problem is that the container is not findin
All,
I have a rules design question for the community. I have 3 lists of
different types of objects that I need to sum if a certain attribute is
present on each one of them. Then after the summing has taken place execute
other rules based upon the results of the summation.
Is there a way that
23 matches
Mail list logo