ExecutionPeriod currentExecutionPeriod = ExecutionPeriod.readActualExecutionPeriod(); currentExecutionPeriod.setState(PeriodState.OPEN);
final ExecutionPeriod currentExecutionPeriod = ExecutionPeriod.readActualExecutionPeriod(); if (currentExecutionPeriod != null) { currentExecutionPeriod.setState(PeriodState.OPEN); currentExecutionPeriod.getExecutionYear().setState(PeriodState.OPEN); }
    public void run(InfoExecutionPeriod infoExecutionPeriod, PeriodState periodState)            throws FenixServiceException {        final ExecutionPeriod executionPeriod = ExecutionYear.readExecutionYearByName(                infoExecutionPeriod.getInfoExecutionYear().getYear()).readExecutionPeriodForSemester(infoExecutionPeriod.getSemester());         if (executionPeriod == null) {            throw new InvalidExecutionPeriod();        }        if (periodState.getStateCode().equals(PeriodState.CURRENT.getStateCode())) {            // Deactivate the current            ExecutionPeriod currentExecutionPeriod = ExecutionPeriod.readActualExecutionPeriod();            currentExecutionPeriod.setState(PeriodState.OPEN);        }        executionPeriod.setState(periodState);    }