ActivityExecutionContext context = new ActivityExecutionContextImpl(service, domain, task);
ActivityImplementation activityImplementation = activityImplementationFactory.getActivityImplementation(activityType);
if (activityImplementation == null) {
throw new ActivityFailureException("Unknown activity type: " + activityType);
}
output = activityImplementation.execute(context);
if (!activityImplementation.getExecutionOptions().isManualActivityCompletion()) {
respondActivityTaskCompletedWithRetry(task.getTaskToken(), output);
}
}
catch (CancellationException e) {