@Override
	public synchronized Message process(ClientState state, Message request) {
		System.out.println("Request:"+request);
		
		Model model = Model.getInstance(); //get the singleton model
		Node child = request.contents.getFirstChild(); //first child in message tree
		
		//get ID of Decision Line Event, access the DLE, and get a list of users.
		String dleID = child.getAttributes().getNamedItem("id").getNodeValue().toString();
		
		//check that the DLE is currently loaded in memory, aka is this a valid identifier?
		myDLE = model.getDecisionLineEvent(dleID);
		if (myDLE == null){
			myDLE = DatabaseSubsystem.readDecisionLineEvent(dleID);
			if (myDLE == null){
				reason = "DLE does not exist";
				GenerateFailureMessage(request.id());
			}
			model.getDecisionLineEvents().add(myDLE);
			
		}
		
		
		moderator = myDLE.getModerator();	
		userList = myDLE.getUsers();
		
		//Check if DLE is already closed
		if(myDLE.getEventType().equals(EventType.OPEN)){
			//set DLE to closed if open and fix success and reason
			myDLE.setType(EventType.CLOSED);
			DatabaseSubsystem.writeDecisionLineEvent(myDLE); //update the database
			isSuccess=true;
			reason="";
		}
		else if(myDLE.getEventType().equals(EventType.CLOSED)){
			//set success =false and reason for failure
			isSuccess=false;
			reason = "Event already closed";
		}
		else if(myDLE.getEventType().equals(EventType.FINISHED)){	
			//set success =false and reason for failure
			isSuccess=false;
			reason = "Event already finished";
		}
		
		// broadcast to all connected clients except self
		for (User user: userList) {
			if (!user.getUser().equals(moderator)) {
				if(isSuccess) response = GenerateSuccessMessage(user.getClientStateId());
				else response = GenerateFailureMessage(user.getClientStateId());
				Server.getState(user.getClientStateId()).sendMessage(response);
				System.out.println("Broadcast :"+response);
			}
		}
		// <turnResponse> needs to be generated and sent to various clients depending on Round Robin/Asynchronous 
		// could be an opportunity to have the turnResponse creation be controlled by a devoted controller or within the DLE instance
		if(isSuccess) response = GenerateSuccessMessage(request.id());
		else response = GenerateFailureMessage(request.id());
		
		System.out.println("Response:"+response);
			return response;
	
	}