The WS-Agreement specification defines three different types of states, namely Agreement State, Service Term States and Guarantee Term States. These states are explained below. For a complete reference of the agreement state model refer to the WS-Agreement specification.
The agreement state is the overall state of an agreement. The agreement state implements the following state model:
If an agreement is in state (a) or (b) it is not monitored, i.e. the registered monitoring handler are not invoked and guarantee states are not computed. Agreements in states (c) and (d) are monitored. Agreement in states (e) - (g) are not active anymore and therefore not monitored.
The framework automatically updates the status of an agreement to state Complete if all services related to the agreement are completed, e.g. all service term states of the agreement have reached the state Completed.
Each service description term (SDT) defined in the agreement terms has its own state. Service term states are an abstract, domain-independent representation of SDTs at runtime. They implement the following state model:
The Processing State and the Idle State are sub states of the Ready state. These predefined sub-states correspond to domain-specific extensions that can be included in a state element.
Service term states are only applicable if an agreement is either in the Observed or ObservedAndTerminating state, which means that the agreement is active and monitored.
Besides the abstract, domain independent state, a service term state can also include domain specific state information. This domain specific state information comprises for example monitoring information of a service execution, such as the minimal, maximal, and average response time of a provided service (see Agreement Monitoring Example).
For each guarantee term in an agreement there is one guarantee term state. The guarantee states follow a simple state model:
The initial state of a guarantee is NotDetermined. A guarantee remains in this state until an assessment on the fulfillment or violation can be made. When a guarantee is evaluated, its state changes either to (b) or (c). Based on these states, a penalty or a reward is issued. See section Guarantee Evaluation for further details on how guarantee terms are evaluated.