use of com.uber.cadence.workflow.SignalExternalWorkflowException in project cadence-client by uber-java.
the class WorkflowDecisionContext method handleSignalExternalWorkflowExecutionFailed.
void handleSignalExternalWorkflowExecutionFailed(HistoryEvent event) {
SignalExternalWorkflowExecutionFailedEventAttributes attributes = event.getSignalExternalWorkflowExecutionFailedEventAttributes();
String signalId = new String(attributes.getControl(), StandardCharsets.UTF_8);
if (decisions.handleSignalExternalWorkflowExecutionFailed(signalId)) {
OpenRequestInfo<Void, Void> signalContextAndResult = scheduledSignals.remove(signalId);
if (signalContextAndResult != null) {
WorkflowExecution signaledExecution = new WorkflowExecution();
signaledExecution.setWorkflowId(attributes.getWorkflowExecution().getWorkflowId());
signaledExecution.setRunId(attributes.getWorkflowExecution().getRunId());
RuntimeException failure = new SignalExternalWorkflowException(event.getEventId(), signaledExecution, attributes.getCause());
signalContextAndResult.getCompletionCallback().accept(null, failure);
}
}
}
Aggregations