final StartTimerDecisionAttributes timer = new StartTimerDecisionAttributes();
timer.setStartToFireTimeout(FlowHelpers.secondsToDuration(delaySeconds));
final String timerId = decisions.getNextId();
timer.setTimerId(timerId);
String taskName = "timerId=" + timer.getTimerId() + ", delaySeconds=" + timer.getStartToFireTimeout();
new ExternalTask() {
@Override
protected ExternalTaskCancellationHandler doExecute(ExternalTaskCompletionHandle handle) throws Throwable {
decisions.startTimer(timer, userContext);