Agreement Monitoring

An agreement consists of the description of the provided service and the guarantees that are associated with this service. The service description and the associated guarantees are initially defined in the agreement template and are therefore part of the agreements that are based on such templates. When a service provider accepts an agreement offer, a new agreement instance is created and subsequently monitored. Agreement monitoring consists of the following activities:

  1. monitoring of the agreed services and update of the service term states,
  2. guarantee evaluation and update of the guarantee states, and
  3. accounting of penalties and rewards, if applicable.

The Monitorable Agreement implements the default WSAG4J agreement monitoring process. It implements the Agreement interface and is returned as a result of an agreement creation process (see service instantiation). It works on behalf of a Domain-Specific Agreement Implementation and periodically updates its service term states and guarantee term states.

The overall agreement monitoring process is shown in the figure below.

WSAG4J monitoring process.

The resource properties of an agreement are depicted in the figure above. Static properties are specified in an agreement offer and do not change once the agreement is created. Dynamic properties may change during the agreement's lifetime by the agreement monitoring handlers. They comprise the state of agreement, of the associated services and of the agreement guarantees.

It is important to clearly distinguish between the monitored agreement and a domain specific agreement implementation.

Monitored Agreement

The Monitored Agreement implements the default agreement monitoring process. Each monitored agreement has an associated Domain-Specific Agreement Implementation that stores the agreement resource properties and implements the agreement termination strategy. Each monitored agreement has a set of registered monitoring handlers. Each monitoring handler is invoked once per monitoring cycle. A monitoring handler retrieves the state of a provided service and updates the service term states of the domain-specific agreement. After updating the service term states, the overall state of the agreement is computed. If all service term states are Completed, the overall agreement state will also change to Completed. Otherwise, the agreement state will remain Observed. Next, the agreement guarantees are evaluated. The guarantee states are computed based on the updated agreement properties.

Domain-Specific Agreement Implementation

A Domain-Specific Agreement Implementation inherits from AbstractAgreementType. It stores the agreement resource properties document and implements a domain-specific agreement termination method. One such an example is SampleCreateAgreementAction and SampleAgreement.

Example

For a full guide on how to implement service monitoring go to the Agreement Monitoring Example.