use of com.uber.cadence.CancelWorkflowExecutionDecisionAttributes in project cadence-client by uber-java.
the class DecisionsHelper method cancelWorkflowExecution.
/**
* @return <code>false</code> means that cancel failed, <code>true</code> that
* CancelWorkflowExecution was created.
*/
void cancelWorkflowExecution() {
Decision decision = new Decision();
CancelWorkflowExecutionDecisionAttributes cancel = new CancelWorkflowExecutionDecisionAttributes();
cancel.setDetails((byte[]) null);
decision.setCancelWorkflowExecutionDecisionAttributes(cancel);
decision.setDecisionType(DecisionType.CancelWorkflowExecution);
DecisionId decisionId = new DecisionId(DecisionTarget.SELF, null);
addDecision(decisionId, new CompleteWorkflowStateMachine(decisionId, decision));
}
Aggregations