Set<AdvanceAssignment> advanceAssignments = new HashSet<AdvanceAssignment>();
advanceAssignments.addAll(directAdvanceAssignments);
advanceAssignments.addAll(indirectAdvanceAssignments);
for (AdvanceAssignment advanceAssignment : advanceAssignments) {
if (advanceAssignment.getReportGlobalAdvance()) {
throw new DuplicateValueTrueReportGlobalAdvanceException(
_("Cannot spread two progress in the same task"),
this, OrderElement.class);
}
}
}