in src/main/java/com/amazonaws/services/simpleworkflow/flow/common/WorkflowExecutionUtils.java [326:345]
public static String getFailureCause(HistoryEvent historyEvent) {
String failureCause = null;
if (historyEvent != null) {
if (historyEvent.eventTypeAsString().equals(START_CHILD_WORKFLOW_EXECUTION_FAILED.toString())) {
failureCause = historyEvent.startChildWorkflowExecutionFailedEventAttributes().causeAsString();
} else if (historyEvent.eventTypeAsString().equals(SIGNAL_EXTERNAL_WORKFLOW_EXECUTION_FAILED.toString())) {
failureCause = historyEvent.signalExternalWorkflowExecutionFailedEventAttributes().causeAsString();
} else if (historyEvent.eventTypeAsString().equals(SCHEDULE_ACTIVITY_TASK_FAILED.toString())) {
failureCause = historyEvent.scheduleActivityTaskFailedEventAttributes().causeAsString();
} else if (historyEvent.eventTypeAsString().equals(START_TIMER_FAILED.toString())) {
failureCause = historyEvent.startTimerFailedEventAttributes().causeAsString();
} else if (historyEvent.eventTypeAsString().equals(CONTINUE_AS_NEW_WORKFLOW_EXECUTION_FAILED.toString())) {
failureCause = historyEvent.continueAsNewWorkflowExecutionFailedEventAttributes().causeAsString();
} else if (historyEvent.eventTypeAsString().equals(RECORD_MARKER_FAILED.toString())) {
failureCause = historyEvent.recordMarkerFailedEventAttributes().causeAsString();
}
}
return failureCause;
}