public static void registerActivityTypes(AmazonSimpleWorkflow service, String domain, String defaultTaskList,
ActivityImplementationFactory activityImplementationFactory) {
for (ActivityType activityType : activityImplementationFactory.getActivityTypesToRegister()) {
try {
ActivityImplementation implementation = activityImplementationFactory.getActivityImplementation(activityType);
if (implementation == null) {
throw new IllegalStateException("No implementation found for type needed registration: " + activityType);
}
ActivityTypeRegistrationOptions registrationOptions = implementation.getRegistrationOptions();
if (registrationOptions != null) {
registerActivityType(service, domain, activityType, registrationOptions, defaultTaskList);
}
}
catch (TypeAlreadyExistsException ex) {