use of com.uber.cadence.RequestCancelExternalWorkflowExecutionDecisionAttributes in project cadence-client by uber-java.
the class WorkflowDecisionContext method requestCancelWorkflowExecution.
void requestCancelWorkflowExecution(WorkflowExecution execution) {
RequestCancelExternalWorkflowExecutionDecisionAttributes attributes = new RequestCancelExternalWorkflowExecutionDecisionAttributes();
String workflowId = execution.getWorkflowId();
attributes.setWorkflowId(workflowId);
attributes.setRunId(execution.getRunId());
boolean childWorkflow = scheduledExternalWorkflows.containsKey(workflowId);
// TODO: See if immediate cancellation needed
decisions.requestCancelExternalWorkflowExecution(childWorkflow, attributes, null);
}
use of com.uber.cadence.RequestCancelExternalWorkflowExecutionDecisionAttributes in project cadence-client by uber-java.
the class ChildWorkflowDecisionStateMachine method createRequestCancelExternalWorkflowExecutionDecision.
private Decision createRequestCancelExternalWorkflowExecutionDecision() {
RequestCancelExternalWorkflowExecutionDecisionAttributes tryCancel = new RequestCancelExternalWorkflowExecutionDecisionAttributes();
tryCancel.setWorkflowId(startAttributes.getWorkflowId());
tryCancel.setRunId(runId);
Decision decision = new Decision();
decision.setRequestCancelExternalWorkflowExecutionDecisionAttributes(tryCancel);
decision.setDecisionType(DecisionType.RequestCancelExternalWorkflowExecution);
return decision;
}
Aggregations