@Atomic public static void run(final String studentCurricularPlanId) throws DomainException, NonExistingServiceException { final StudentCurricularPlan studentCurricularPlan = FenixFramework.getDomainObject(studentCurricularPlanId); if (studentCurricularPlan != null) { for (Enrolment enrolment : studentCurricularPlan.getEnrolmentsSet()) { for (EnrolmentEvaluation evaluation : enrolment.getEvaluationsSet()) { evaluation.setEnrolmentEvaluationState(EnrolmentEvaluationState.TEMPORARY_OBJ); } } studentCurricularPlan.delete(); } else { throw new NonExistingServiceException(); } }