Apama Documentation : Developing Apama Applications : Developing Apama Applications in EPL : Making Application Data Available to Clients : Updating DataView items
Updating DataView items
Use the following event types to update DataView definitions.
Note:  
In addition to the event types listed below, you can also use the DataViewAddOrUpdateItem event to either create new DataView items or to update existing ones. See Creating DataView items.
DataViewUpdateItem
Create and route an event of this type to update a data item by specifying a sequence of new filed values. If the update does not succeed, a response is provided by a DataViewItemException event.
Here is an example of creating and routing a DataViewUpdateItem event:
using com.apama.dataview.DataViewUpdateItem;
...
string location;
integer temp;
integer humidity;
integer visibility;
...
DataViewUpdateItem update := new DataViewUpdateItem;
update.dvName := "Weather";
update.dvItemId := -1; // Set the ID to -1 when using keyFields
update.fieldValues :=
   [location,temp.toString(),humidity.toString(),visibility.toString()];
route update;
DataViewUpdateItemDelta
Create and route an event of this type to update a data item by specifying a dictionary of field-position/field-value pairs. If the update does not succeed, a response is provided by a DataViewItemException event.
Here is an example of creating and routing a DataViewUpdateItemDelta event:
using com.apama.dataview.DataViewUpdateItemDelta;
...
string location;
integer temp;
integer humidity;
integer visibility;
...
DataViewUpdateItemDelta update := new DataViewUpdateItemDelta;
update.dvName := "Weather";
update.dvItemId := -1; // Set the ID to -1 when using keyFields.
update.fieldValues :=
   {0:location,1:temp.toString(),2:humidity.toString(),
      3:visibility.toString()};
route update;
Copyright © 2013-2017 Software AG, Darmstadt, Germany. (Innovation Release)

Product LogoContact Support   |   Community   |   Feedback