}
}
}
void handleStartChildWorkflowExecutionFailed(HistoryEvent event) {
StartChildWorkflowExecutionFailedEventAttributes attributes = event.getStartChildWorkflowExecutionFailedEventAttributes();
String workflowId = attributes.getWorkflowId();
if (decisions.handleStartChildWorkflowExecutionFailed(event)) {
OpenRequestInfo<StartChildWorkflowReply, WorkflowType> scheduled = scheduledExternalWorkflows.remove(workflowId);
if (scheduled != null) {
WorkflowExecution workflowExecution = new WorkflowExecution();
workflowExecution.setWorkflowId(workflowId);
WorkflowType workflowType = attributes.getWorkflowType();
String cause = attributes.getCause();
Exception failure = new StartChildWorkflowFailedException(event.getEventId(), workflowExecution, workflowType,
cause);
ExternalTaskCompletionHandle context = scheduled.getCompletionHandle();
context.fail(failure);
}