Developing Apama Applications > Developing Apama Applications in EPL > Making Application Data Available to Clients > Deleting DataView Items > Example
Example
Here is an example that creates and routes a DataViewDeleteItem event and handles the DataViewItemDeleted response by logging the deletion of the item:
using com.apama.dataview.DataViewDeleteItem;
using com.apama.dataview.DataViewItemDeleted;
string location;
...
DataViewDeleteItem delete := new DataViewDeleteItem;
delete.dvName := "Weather";
delete.dvItemId := -1; // Set the ID to -1 when using keyFields
delete.keyFields := [location];
route delete;
DataViewItemDeleted deleted;
on DataViewItemDeleted (dvName="Weather"):deleted {
   log("Weather monitor - DataViewItemDeleted:
      "+deleted.dvItemId.toString());
}
Copyright © 2013-2015 Software AG, Darmstadt, Germany and/or Software AG USA Inc., Reston, VA, USA, and/or its subsidiaries and/or its affiliates and/or their licensors.
Use, reproduction, transfer, publication or disclosure is prohibited except as specifically provided for in your License Agreement with Software AG.