[Download] | [Documentation Home] | [Release Note]

Eventing

Introduction

WSO2 Data Services Server features eventing support using the WS-Eventing web services standard. When a specific event is triggered from a data service request or response, a notification can be sent out for the subscribers that were listening to those events. For a data service, "event-trigger" sections can be specified. Which defines the criteria for the event to be triggered, and also the destination topic the event notifications will be sent to. Also, a data service event-trigger contains the subscriptions which represents the interested subscribers, in receiving the notifications sent to the given topic. So effectively, if a certain data service event-trigger is activated, its respective subscribers will be notified.

Data Service "event-trigger" Definition

An event-trigger can be created in the query editing section, there select "Manage Events". The user is presented with the following fields for defining an event-trigger.

How an event-trigger is executed

An event-trigger can be set as an input event trigger or an ouput event trigger in a data service query. The following section explain the use of the two approaches.

Contents of Event Notification

In the event notification messages, additional information about the event is added to the SOAP Envelope/Body element. The following section illustrates this.

   <data-services-event>          
       <service-name>$SERVICE_NAME</service-name>
       <query-id>$QUERY_ID</query-id>
       <time>$TIME</time>
       <content>
         $CONTENT
       </content>
   </data-services-event>     

Demo

For a demonstration of the usage of eventing, refer to the Eventing Sample.