in src/main/java/com/uber/cadence/internal/replay/ReplayDecider.java [142:268]
private void processEvent(HistoryEvent event) {
EventType eventType = event.getEventType();
switch (eventType) {
case ActivityTaskCanceled:
context.handleActivityTaskCanceled(event);
break;
case ActivityTaskCompleted:
context.handleActivityTaskCompleted(event);
break;
case ActivityTaskFailed:
context.handleActivityTaskFailed(event);
break;
case ActivityTaskStarted:
decisionsHelper.handleActivityTaskStarted(event);
break;
case ActivityTaskTimedOut:
context.handleActivityTaskTimedOut(event);
break;
case ExternalWorkflowExecutionCancelRequested:
context.handleChildWorkflowExecutionCancelRequested(event);
decisionsHelper.handleExternalWorkflowExecutionCancelRequested(event);
break;
case ChildWorkflowExecutionCanceled:
context.handleChildWorkflowExecutionCanceled(event);
break;
case ChildWorkflowExecutionCompleted:
context.handleChildWorkflowExecutionCompleted(event);
break;
case ChildWorkflowExecutionFailed:
context.handleChildWorkflowExecutionFailed(event);
break;
case ChildWorkflowExecutionStarted:
context.handleChildWorkflowExecutionStarted(event);
break;
case ChildWorkflowExecutionTerminated:
context.handleChildWorkflowExecutionTerminated(event);
break;
case ChildWorkflowExecutionTimedOut:
context.handleChildWorkflowExecutionTimedOut(event);
break;
case DecisionTaskCompleted:
// NOOP
break;
case DecisionTaskScheduled:
// NOOP
break;
case DecisionTaskStarted:
throw new IllegalArgumentException("not expected");
case DecisionTaskTimedOut:
// Handled in the processEvent(event)
break;
case ExternalWorkflowExecutionSignaled:
context.handleExternalWorkflowExecutionSignaled(event);
break;
case StartChildWorkflowExecutionFailed:
context.handleStartChildWorkflowExecutionFailed(event);
break;
case TimerFired:
handleTimerFired(event);
break;
case WorkflowExecutionCancelRequested:
handleWorkflowExecutionCancelRequested(event);
break;
case WorkflowExecutionSignaled:
handleWorkflowExecutionSignaled(event);
break;
case WorkflowExecutionStarted:
handleWorkflowExecutionStarted(event);
break;
case WorkflowExecutionTerminated:
// NOOP
break;
case WorkflowExecutionTimedOut:
// NOOP
break;
case ActivityTaskScheduled:
decisionsHelper.handleActivityTaskScheduled(event);
break;
case ActivityTaskCancelRequested:
decisionsHelper.handleActivityTaskCancelRequested(event);
break;
case RequestCancelActivityTaskFailed:
decisionsHelper.handleRequestCancelActivityTaskFailed(event);
break;
case MarkerRecorded:
context.handleMarkerRecorded(event);
break;
case WorkflowExecutionCompleted:
break;
case WorkflowExecutionFailed:
break;
case WorkflowExecutionCanceled:
break;
case WorkflowExecutionContinuedAsNew:
break;
case TimerStarted:
decisionsHelper.handleTimerStarted(event);
break;
case TimerCanceled:
context.handleTimerCanceled(event);
break;
case SignalExternalWorkflowExecutionInitiated:
decisionsHelper.handleSignalExternalWorkflowExecutionInitiated(event);
break;
case SignalExternalWorkflowExecutionFailed:
context.handleSignalExternalWorkflowExecutionFailed(event);
break;
case RequestCancelExternalWorkflowExecutionInitiated:
decisionsHelper.handleRequestCancelExternalWorkflowExecutionInitiated(event);
break;
case RequestCancelExternalWorkflowExecutionFailed:
decisionsHelper.handleRequestCancelExternalWorkflowExecutionFailed(event);
break;
case StartChildWorkflowExecutionInitiated:
decisionsHelper.handleStartChildWorkflowExecutionInitiated(event);
break;
case CancelTimerFailed:
decisionsHelper.handleCancelTimerFailed(event);
break;
case DecisionTaskFailed:
context.handleDecisionTaskFailed(event);
break;
case UpsertWorkflowSearchAttributes:
context.handleUpsertSearchAttributes(event);
break;
}
}