}
private static ActivityTypeRegistrationOptions createRegistrationOptions(ActivityRegistrationOptions registrationOptions,
ActivityRegistrationOptions parentRegistrationOptions) {
ActivityRegistrationOptions registrationOptionsAnnotation = registrationOptions != null ? registrationOptions
: parentRegistrationOptions;
ActivityTypeRegistrationOptions result = new ActivityTypeRegistrationOptions();
result.setDescription(emptyStringToNull(registrationOptionsAnnotation.description()));
long taskHeartbeatTimeoutSeconds = registrationOptionsAnnotation.defaultTaskHeartbeatTimeoutSeconds();
if (taskHeartbeatTimeoutSeconds > FlowConstants.USE_REGISTERED_DEFAULTS) {
result.setDefaultTaskHeartbeatTimeoutSeconds(taskHeartbeatTimeoutSeconds);
}
long taskScheduleToCloseTimeoutSeconds = registrationOptionsAnnotation.defaultTaskScheduleToCloseTimeoutSeconds();
if (taskScheduleToCloseTimeoutSeconds > FlowConstants.USE_REGISTERED_DEFAULTS) {
result.setDefaultTaskScheduleToCloseTimeoutSeconds(taskScheduleToCloseTimeoutSeconds);
}
long taskScheduleToStartTimeoutSeconds = registrationOptionsAnnotation.defaultTaskScheduleToStartTimeoutSeconds();
if (taskScheduleToStartTimeoutSeconds > FlowConstants.USE_REGISTERED_DEFAULTS) {
result.setDefaultTaskScheduleToStartTimeoutSeconds(taskScheduleToStartTimeoutSeconds);
}
long taskStartToCloseTimeoutSeconds = registrationOptionsAnnotation.defaultTaskStartToCloseTimeoutSeconds();
if (taskStartToCloseTimeoutSeconds > FlowConstants.USE_REGISTERED_DEFAULTS) {
result.setDefaultTaskStartToCloseTimeoutSeconds(taskStartToCloseTimeoutSeconds);
}
String taskList = registrationOptionsAnnotation.defaultTaskList();
if (!taskList.equals(FlowConstants.USE_WORKER_TASK_LIST)) {
result.setDefaultTaskList(taskList);
}
else if (taskList.equals(FlowConstants.NO_DEFAULT_TASK_LIST)) {
result.setDefaultTaskList(null);