I've done a bit more looking -- based upon what I've read and what I've seen via testing, you don't need to have a temporal constraint on a CE for it to be expired, provided there is an explicit one declared. Is that correct? That said... Ok, maybe there is a silly mistake here, but I'm seeing the following expire and retract objects (note no temporal constraint)
imports....
declare CheeseTime
@role(event)
@expires(10s)
@timestamp(timeStamp)
end
rule "Print Objects"
when
$m:Object( )
from entry-point "stat-stream"
then
logger.warn( "------------CheeseTime--------------" );
logger.warn( "--"+$m);
end
(note the Object() ) but not this
(same declarations except replacing the rule)
rule "Print CheeseTime"
when
$m:CheeseTime()
from entry-point "stat-stream"
then
logger.warn( "------------Object--------------" );
logger.warn( "--"+$m);
end
For CheeseTime
public class CheeseTime {
private String type;
private long cost;
private Date timeStamp;
:
}
Clearly, I'm missing something...