return;
}
for (Task task : tasks) {
if (task == null) {
throw new TaskExeception("Task is NULL");
}
// TODO verificar outros status
if (task.getStatus().equals(TaskStatus.SUBMITTED)) {
throw new TaskExeception("The task " + task.toString()
+ " has already been submitted");
}
if (task.getStatus().equals(TaskStatus.EXECUTING)) {
throw new TaskExeception("The task " + task.toString()
+ " is executing");
}
}
if (type.equals(Type.NESTED)) {
long currentThreadId = Thread.currentThread().getId();
if (this.serialExecutor.getCurrentThreadIdExecution() == null
|| this.serialExecutor.getCurrentThreadIdExecution().longValue() != currentThreadId) {
// TODO msg
throw new TaskExeception("");
}
}
if (type.equals(Type.NESTED)) {
session = this.serialExecutor.getCurrentTaskSession();