in src/main/java/com/uber/cadence/internal/testservice/TestWorkflowMutableStateImpl.java [595:624]
private void validateScheduleActivityTask(ScheduleActivityTaskDecisionAttributes a)
throws BadRequestError {
if (a == null) {
throw new BadRequestError("ScheduleActivityTaskDecisionAttributes is not set on decision.");
}
if (a.getTaskList() == null || a.getTaskList().getName().isEmpty()) {
throw new BadRequestError("TaskList is not set on decision.");
}
if (a.getActivityId() == null || a.getActivityId().isEmpty()) {
throw new BadRequestError("ActivityId is not set on decision.");
}
if (a.getActivityType() == null
|| a.getActivityType().getName() == null
|| a.getActivityType().getName().isEmpty()) {
throw new BadRequestError("ActivityType is not set on decision.");
}
if (a.getStartToCloseTimeoutSeconds() <= 0) {
throw new BadRequestError("A valid StartToCloseTimeoutSeconds is not set on decision.");
}
if (a.getScheduleToStartTimeoutSeconds() <= 0) {
throw new BadRequestError("A valid ScheduleToStartTimeoutSeconds is not set on decision.");
}
if (a.getScheduleToCloseTimeoutSeconds() <= 0) {
throw new BadRequestError("A valid ScheduleToCloseTimeoutSeconds is not set on decision.");
}
if (a.getHeartbeatTimeoutSeconds() < 0) {
throw new BadRequestError("Ac valid HeartbeatTimeoutSeconds is not set on decision.");
}
}