[rules-users] sliding time in lhs

2009-08-31 Thread Francesco Chiarelli
Hi!
i'm new to use a drools-fusion, i've a next lhs condition in rule:
$o: Order(status!="EU_C_R1_INIT")
SystemConfig(value:value) from hbnSession.createQuery("from
SystemConfig where name=:name").setString("name","nRicMax").uniqueResult()
$nRic : Number(intValue  < value) from accumulate($n:
Order(this==$o) over window:time(1d),count($n))
Data:
1) Order 1 date 28 aug 2009 EU_C_INIT
2) Order 1 date 31 aug 2009 EU_A_INIT
3) Order 1 date 31 aug 2009 EU_B_INIT
4) Order 1 date 30 aug 2009 EU_B_INIT
5) Order 1 date 28 aug 2009 EU_A_INIT
6) Order 1 date 01 aug 2009 EU_A_INIT
7) Order 1 date 28 aug 2009 EU_C_INIT
8) Order 1 date 28 aug 2009 EU_C_INIT

Only the first condition is verified [  Order(status!="EU_C_R1_INIT") ]
altough there are facts that verify Order(this==$o) over window:time(24h) ]
There are n-k facts that don't verify a previous condition but them come
count also:
I espect that drools count a 2-3-4 but it count also 5-6-7: i'm confused
P.S. i did set a stream mode, i' had set a timestamp attribute in event fact
@timestamp(myTimestampLong), i tried with pseudo clock (making it advance
for new Date().getTime() or at origin, therefore 01 jan 1970 [without event
@timestamp attribute] )
Regards
Francesco
___
rules-users mailing list
rules-users@lists.jboss.org
https://lists.jboss.org/mailman/listinfo/rules-users


[rules-users] drools-[SplitConstraint]

2009-08-25 Thread Francesco Chiarelli
Hi!
In a split constraint i've:
$bool:Boolean(booleanValue==true) from hbnSession.createQuery("select active
from Euristic where name=:name").setString("name","C").uniqueResult()
eval($bool)
but the result is:
XOR split could not find at least one valid outgoing connection for split
C_isActive?
hbnSession is an active hibernateSession
In a simple drl rule, this works fine.
unfortunately, the previous post (slidingTime) is yet unresolved. :(
Thanks in advance.
*Francesco*
___
rules-users mailing list
rules-users@lists.jboss.org
https://lists.jboss.org/mailman/listinfo/rules-users


[rules-users] drools-[slidingTimeCount]

2009-08-25 Thread Francesco Chiarelli
Hi!
I'm trying to use a sliding time fro count a facts with a condition.
I'have set a stream mode.
In test, with pseudo clock active, set this to current Time (it's correct?),
declare a fact type in drl with

declare MyFact (i've a javabean)
@role(event)
@timestamp(myTimestamp)
end

attribute type of myTimestamp must be long or Date? I've tried with both but
nothing, engine count all fact
ex: n fact in x days ago from now, the statement over window:time(1s) result
always n fact. why?
in when:
 // $o : Order()
$nRic : Number(intValue___
rules-users mailing list
rules-users@lists.jboss.org
https://lists.jboss.org/mailman/listinfo/rules-users