StartTimerFailedEventAttributes attributes = event.getStartTimerFailedEventAttributes();
String timerId = attributes.getTimerId();
if (decisions.handleStartTimerFailed(event)) {
OpenRequestInfo scheduled = scheduledTimers.remove(timerId);
if (scheduled != null) {
ExternalTaskCompletionHandle completionHandle = scheduled.getCompletionHandle();
Object createTimerUserContext = scheduled.getUserContext();
String cause = attributes.getCause();
Throwable failure = new StartTimerFailedException(event.getEventId(), timerId, createTimerUserContext, cause);
completionHandle.fail(failure);
}
}
else {
log.debug("handleStartTimerFailed not complete");
}