Where the provisions of article 132-25 of the Penal Code, the sentence enforcement judge shall set the terms and conditions for the execution of the semi-liberty or work release by an order that is not subject to appeal, within a maximum period of four months from the date on which the sentence becomes enforceable and within a period of five working days when the sentencing court has ordered the placement or continued detention of the offender and declared its decision provisionally enforceable. If the conditions that enabled the court to decide that the sentence would be served under the regime of semi-liberty or work release are no longer met, if the sentenced person does not meet the obligations imposed on him or if he demonstrates misconduct, the benefit of the measure may be withdrawn by the sentence enforcement judge by a decision taken in accordance with the provisions of article 712-6. If the personality of the sentenced person or the means available justify it, the sentence enforcement judge may also, under the same terms and conditions, substitute the semi-liberty measure for the work release measure and vice versa, or substitute one of these measures for that of home detention under electronic monitoring.