Life cycle of an agent

The following state diagram illustrates the life cycle of an agent.

Diagram of the life cycle of an agent Stand-alone state Deregistered state Monitored state Running state Attached state Registered state

Figure 1:
State icon State
stand-alone icon Stand-alone
running icon Running
registered icon Registered
attached icon Attached
monitor icon Monitored
stop icon (deregistered) Deregistered

The states and the transitions between states (which are represented by numbers both in the diagram and in the explanation that follows), in the life cycle of the agent are described below:

  1. Stand-alone
    The agent cannot connect to the Agent Controller. This could happen if the agent is bootstrapped by the host process but the Agent Controller is not currently running on the machine.
  2. Stand-alone to registered
    The agent connects to the Agent Controller. Normally this would happen immediately when the host process bootstraps the agent.  However, if the Agent Controller is not presently running it will be registered only when the Agent Controller is started.
  3. Registered to stand-alone
    The Agent Controller is stopped while the agent is still active.  This takes the agent back to the stand-alone state.
    Note: The agent may transition between the stand-alone state and the registered state as a result of the Agent Controller being started or stopped at any point in the agent's lifetime. These two states are together referred to as the running state.
  4. Registered to attached
    The test client attaches to the registered agent for the purpose of collecting data or sending control messages to the agent.
  5. Attached to registered
    The test client detaches from the agent even though the agent is still being hosted by the host process. However, the test client has finished collecting data from the agent and interacting with it.
  6. Attached to monitored
    After having attached to the agent, the test client starts monitoring the agent, which is connected to the Agent Controller.
    Note: You can only start monitoring an agent that is still running, or one that is not attached to a client (all agents except those that are identified by the Stop symbol Stop icon, and the Monitor symbol Monitor icon). Furthermore, only one client at a time can be attached to each agent. 
  7. Monitored to attached
    The test client, though still attached to the agent (which is connected to the Agent Controller) stops monitoring the agent.
  8. Deregistered
    The application exits or explicitly deregisters the agent. The agent is no longer connected to the Agent Controller, the test client is not attached to the agent, and therefore all monitoring stops. This state can be reached from any of the states running, attached, or monitored.

Related tasks
Administering the Agent Controller
 


(C) Copyright IBM Corporation 2000, 2006. All Rights Reserved.