decision.cancel(immediateCancellationCallback);
return decision.isDone();
}
void handleRequestCancelExternalWorkflowExecutionInitiated(HistoryEvent event) {
RequestCancelExternalWorkflowExecutionInitiatedEventAttributes attributes = event.getRequestCancelExternalWorkflowExecutionInitiatedEventAttributes();
String workflowId = attributes.getWorkflowId();
DecisionStateMachine decision = getDecision(new DecisionId(DecisionTarget.EXTERNAL_WORKFLOW, workflowId));
decision.handleCancellationInitiatedEvent();
}