[rules-users] accumulate Functions with self coded classes as result type

Andre morpheusandre at web.de
Tue Jul 12 10:30:26 EDT 2011


i implemented  an accumulate function which uses Datatypes, which i coded my
self  , see example 
the function return a list of ResourceMatch Objects, but when i try access
that objects i get an NullPointerrException (nothing more) (yes i imported
that class in the DRL)
so it seems that there has to be some kind of registration, so drools, can
handle these objectsm right ? 
or what did i forget? 

rule "Request counting analysed Resources By Id"
when
    $list: List()
            from accumulate($neu : RequestCtx() over
window:time(1m),countMatchingAnalysedResourcesInRequest($neu) )
    ResourceMatch( $id: uri.toString(), count > 1 ) from $list
then
    System.out.println( "Id " + $id + ": " );
    System.out.println("Request counting Resources By Id Rule Workss");
    channels["AuthZBlocking"].send(new ItemCacheEntry(new Item((String)$id),
new Date(System.currentTimeMillis()+ 8000)));
end


--
View this message in context: http://drools.46999.n3.nabble.com/accumulate-Functions-with-self-coded-classes-as-result-type-tp3162593p3162593.html
Sent from the Drools: User forum mailing list archive at Nabble.com.



More information about the rules-users mailing list