Search in sources :

Example 1 with FailWorkflowExecutionDecisionAttributes

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));
}
Also used : FailWorkflowExecutionDecisionAttributes(com.uber.cadence.FailWorkflowExecutionDecisionAttributes) Decision(com.uber.cadence.Decision)

Aggregations

Decision (com.uber.cadence.Decision)1 FailWorkflowExecutionDecisionAttributes (com.uber.cadence.FailWorkflowExecutionDecisionAttributes)1