actionsInProcess.put(request.agentName.toString(), request);
actionsInProcess.put(request.agent, request);
  private void doNextAction() {    if ((!localActionQueue.isEmpty()) &&        (actionsInProcess.size() < MAX_CONCURRENT_ACTIONS)) {      LocalRequest request = (LocalRequest)localActionQueue.remove(0);      if (logger.isDebugEnabled()) {        logger.debug("doNextAction: " +                     " next=[" + request + "]" +                     " localActionQueue=" + localActionQueue.size() +                     " actionsInProcess=" + actionsInProcess.size());      }      request.expiration = now() + ACTION_TIMEOUT;      actionsInProcess.put(request.agentName.toString(), request);      try {        UID acUID = uidService.nextUID();        myUIDs.add(acUID);        Object ticketId = mobilityFactory.createTicketIdentifier();        AbstractTicket ticket = new MoveTicket(ticketId,                                    request.agentName, // agent to move                                    request.origNode, //current node                                    request.destNode, //destination node                                    false); // forced restart        AgentControl ac =            mobilityFactory.createAgentControl(acUID, agentId, ticket);        moveInitiated(request.agentName, request.origNode, request.destNode);        event("Moving agent: agent=" + request.agentName + " orig=" + request.origNode +              " dest=" + request.destNode);        blackboard.publishAdd(ac);        if (logger.isDebugEnabled()) {          logger.debug("Publishing AgentControl:" +                       " myUid=" + myUIDs.contains(ac.getOwnerUID()) +                       " status=" + ac.getStatusCodeAsString());        }      } catch (Exception ex) {        if (logger.isErrorEnabled()) {          logger.error("Exception in agent move", ex);        }      }    }  }