if (duedate==null) {
duedate = businessCalendar.resolveDuedate(dueDateString);
}
TimerEntity timer = new TimerEntity(this);
timer.setDuedate(duedate);
if (executionEntity != null) {
timer.setExecution(executionEntity);
}
if (type == TimerDeclarationType.CYCLE) {
// See ACT-1427: A boundary timer with a cancelActivity='true', doesn't need to repeat itself
if (!isInterruptingTimer) {
String prepared = prepareRepeat(dueDateString);
timer.setRepeat(prepared);
}
}
return timer;
}