private void handleResourceRecovery(Sim_event ev) {
		int mach_id;
		Object data = null;
		boolean success;
		boolean ifailed;
		
		if (ev == null) {
			logger.log(Level.SEVERE, super.get_name() + ".processRecovery(): "
					+ "Error - an event is null.");
			return;
		}

		// The machine status in GridSim is as follows:
		// FREE, BUSY, FAILED
		// we have to add some condition to resolve between FAILED to FREE / FAILED to BUSY
		/******************/
		data = ev.get_data(); // get the event's data
		mach_id = (Integer) data; // get the node ID
		
		// if the machine is set to FAILED status
		ifailed = resource_.getMachineList().getMachineInPos(mach_id).getFailed();
		
		// send the message for Gridlet on this machine
		// success: true means that it resumes a paused gridlet successfully 
		success = resumeGridletLists(mach_id);

		// if there is no gridlet paused for this machine
		// or if set to the failed
		// then set machine to the free
		if (!success && ifailed)
			// set machine with id, mach_id as working
			setMachineFailed(false, mach_id);

	}