}
public static TimerInstance readTimer(MarshallerReaderContext context) throws IOException {
ObjectInputStream stream = context.stream;
TimerInstance timer = new TimerInstance();
timer.setId( stream.readLong() );
timer.setTimerId( stream.readLong() );
timer.setDelay( stream.readLong() );
timer.setPeriod( stream.readLong() );
timer.setProcessInstanceId( stream.readLong() );
timer.setActivated( new Date( stream.readLong() ) );
if ( stream.readBoolean() ) {
timer.setLastTriggered( new Date( stream.readLong() ) );
}
return timer;
}