Example
Here is an example that creates and routes a DataViewAddItem event, and handles the DataViewItem response by logging the addition of the item:
using com.apama.dataview.DataViewAddItem; 
using com.apama.dataview.DataViewItem; 
... 
string location ; 
integer temp; 
integer humidity; 
integer visibility; 
... 
DataViewAddItem item := new DataViewAddItem; 
item.dvName := "Weather"; 
item.fieldValues := 
   [location,temp.toString(),humidity.toString(), 
   visibility.toString()]; 
route item; 
DataViewItem added; 
on DataViewItem (dvName="Weather"):added { 
   log("Weather monitor - DataViewItem: " + 
      added.dvItemId.toString()); 
}