use of com.uber.cadence.workflow.ChildWorkflowTimedOutException in project cadence-client by uber-java.
the class WorkflowDecisionContext method handleChildWorkflowExecutionTimedOut.
void handleChildWorkflowExecutionTimedOut(HistoryEvent event) {
ChildWorkflowExecutionTimedOutEventAttributes attributes = event.getChildWorkflowExecutionTimedOutEventAttributes();
WorkflowExecution execution = attributes.getWorkflowExecution();
String workflowId = execution.getWorkflowId();
if (decisions.handleChildWorkflowExecutionClosed(workflowId)) {
OpenChildWorkflowRequestInfo scheduled = scheduledExternalWorkflows.remove(workflowId);
if (scheduled != null) {
RuntimeException failure = new ChildWorkflowTimedOutException(event.getEventId(), execution, attributes.getWorkflowType());
BiConsumer<byte[], Exception> completionCallback = scheduled.getCompletionCallback();
completionCallback.accept(null, failure);
}
}
}
Aggregations