8:33 AM
To: 'Rules Users List'
Subject: RE: [rules-users] LHS Dao Calls
Has anyone in the users list tested any DAO calls from condition side
without using from keyword .. something like this .. i know i am
supposed to test this in trunk but is there anyone who has actually done
it
]
[mailto:[EMAIL PROTECTED] On Behalf Of Edson Tirelli
Sent: Friday, April 06, 2007 1:50 PM
To: Rules Users List
Subject: Re: [rules-users] LHS Dao Calls
Sanjay,
Are you trying with trunk? there was an issue using globals inside
predicates that was fixed after M1...
Let me know
, April 06, 2007 1:50 PM
To: Rules Users List
Subject: Re: [rules-users] LHS Dao Calls
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 PROTEC
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
== ItemVo.STATUS_ACTIVE | ==
ItemVo.STATUS_DELETE )
while this still works :
item : ItemVo(itemStatusCode == ItemVo.STATUS_INACTIVE) or
ItemVo(itemStatusCode == ItemVo.STATUS_DELETE)
--
*From:* [EMAIL PROTECTED] [mailto:
[EMAIL PROTECTED] *On Behalf Of *Edson Tirelli
*Sent:* Friday, Ap
iate status codes in them
.. But i did not assert them as facts ..i was asserting maintvo anyway ..
thanks
--
*From:* [EMAIL PROTECTED] [mailto:
[EMAIL PROTECTED] *On Behalf Of *Edson Tirelli
*Sent:* Friday, April 06, 2007 10:45 AM
*To:* Rules Users List
*Subject:* Re: [ru
> 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
Of Edson Tirelli
Sent: Friday, April 06, 2007 10:45 AM
To: Rules Users List
Subject: Re: [rules-users] LHS Dao Calls / Accessing Diff instances of
sameclass in drl files
Sanjay
I already answered question number 1. Plz see my other e-mail.
For question number 2, try:
rule "Item s
-- i have 3.1.0 M1 version ..
item : ItemVo ( itemStatusCode == ItemVo.STATUS_ACTIVE | ==
ItemVo.STATUS_DELETE )
while this still works :
item : ItemVo(itemStatusCode == ItemVo.STATUS_INACTIVE) or
ItemVo(itemStatusCode == ItemVo.STATUS_DELETE)
From: [EMAIL PROTE
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
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
Here is a quick test i was trying to do for calling the dao in LHS but
it fails .. what am i missing ..
global com.itemfile.item.dao.ItemValidationDao itemValidationDao;
global com.itemfile.rules.ValidationErrorMap errors;
rule "Item should have a valid status"
when
ItemVo( statusCode : item
13 matches
Mail list logo