Search in sources :

Example 1 with CancelWorkflowExecutionDecisionAttributes

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

Aggregations

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