use of org.jbpm.marshalling.impl.JBPMMessages.ProcessTimer.TimerInstance.Builder in project jbpm by kiegroup.
the class ProtobufProcessMarshaller method writeTimer.
public static JBPMMessages.ProcessTimer.TimerInstance writeTimer(MarshallerWriteContext context, TimerInstance timer) {
Builder _timer = JBPMMessages.ProcessTimer.TimerInstance.newBuilder().setId(timer.getId()).setTimerId(timer.getTimerId()).setSessionId(timer.getSessionId()).setDelay(timer.getDelay()).setPeriod(timer.getPeriod()).setProcessInstanceId(timer.getProcessInstanceId()).setActivatedTime(timer.getActivated().getTime());
Date lastTriggered = timer.getLastTriggered();
if (lastTriggered != null) {
_timer.setLastTriggered(lastTriggered.getTime());
}
return _timer.build();
}