@Override
	public void process(OurSim ourSim) {
		
		Peer peer = ourSim.getGrid().getObject(peerId);
		if (!peer.isUp()) {
			return;
		}
		
		PeerRequest request = peer.getRequest(requestSpec.getId());
		
		if (request == null && !repetition) {
			request = new PeerRequest(requestSpec, 
					requestSpec.getBrokerId());
			peer.addRequest(request);
		}
		
		if (request == null || request.isPaused()) {
			return;
		}
		
		if (request.isCancelled()) {
			request.setCancelled(false);
			return;
		}
		
		List<Allocation> allocables = AllocationHelper.getAllocationsForLocalRequest(peer, request);
		
		for (Allocation allocable : allocables) {
			dispatchAllocation(request, peer, allocable, requestSpec.getBrokerId(), ourSim);
		}
		
		if (request.getNeededWorkers() > 0) {
			forwardRequestToCommunity(peer, request, ourSim);
			
			request.setCancelled(false);
			Event requestWorkersEvent = ourSim.createEvent(PeerEvents.REQUEST_WORKERS, 
					getTime() + ourSim.getLongProperty(
							Configuration.PROP_REQUEST_REPETITION_INTERVAL), 
					peerId, requestSpec, true);
			ourSim.addEvent(requestWorkersEvent);
		}
	}