use of com.uber.cadence.FailWorkflowExecutionDecisionAttributes in project cadence-client by uber-java.
the class DecisionsHelper method failWorkflowExecution.
void failWorkflowExecution(WorkflowExecutionException failure) {
Decision decision = new Decision();
FailWorkflowExecutionDecisionAttributes failAttributes = new FailWorkflowExecutionDecisionAttributes();
failAttributes.setReason(failure.getReason());
failAttributes.setDetails(failure.getDetails());
decision.setFailWorkflowExecutionDecisionAttributes(failAttributes);
decision.setDecisionType(DecisionType.FailWorkflowExecution);
DecisionId decisionId = new DecisionId(DecisionTarget.SELF, null);
addDecision(decisionId, new CompleteWorkflowStateMachine(decisionId, decision));
}
Aggregations