Search in sources :

Example 1 with Builder

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();
}
Also used : Builder(org.jbpm.marshalling.impl.JBPMMessages.ProcessTimer.TimerInstance.Builder) Date(java.util.Date)

Aggregations

Date (java.util.Date)1 Builder (org.jbpm.marshalling.impl.JBPMMessages.ProcessTimer.TimerInstance.Builder)1