I have a drl that only contains a declare statement. When I load a drl
containing rules I also load that drl. But when the rule executes I get an
error which is the same as if I didn't have the declare.
When I debug and check the PackageDescr for the drl containing the 'declare'
the TypeDeclarationDescr is in the package and seems to have the correct
values.
Both the rule and the drl with the 'declare' are in the same package:
declartions.drl:
-----------
package memelet.droolsesper
import memelet.droolsesper.MarketDataEvent
declare MarketDataEvent
@role(event)
@expires(10s)
end
-----------
rule.drl:
-----------
package memelet.droolsesper
import memelet.droolsesper.ArrivalRate
global ArrivalRate arrivalRate
rule "How do I measure the rate of arrival of events in a given time
period?"
/*
select count(*) as cnt from MarketDataEvent.win:time_batch(1 second)
*/
/*
5.0.1 does not support 'time_batch', so the best we can do is capture the
continous count.
*/
when
$rate : Long() from accumulate (
$e: MarketDataEvent() over window:time(1s) from entry-point
"stream", count($e))
then
arrivalRate.value = $rate;
end
-----------
--
View this message in context:
http://www.nabble.com/Share-%27declare%27-by-adding-drl-to-KnowledgeBuild...
Sent from the drools - user mailing list archive at
Nabble.com.