Show TOC

Pulling the Notifications Stored: EnhancementsLocate this document in the navigation structure

The service document, NOTIFICATIONSTORE is enhanced to store all the notifications irrespective of whether persistent flag is set while subscribing or not. It also supports Delta Token Handling and Server Side Paging.

Delta Token Handling

With Delta token handling in NOTIFICATIONSTORE, when a query operation is performed, the user gets notifications which contains only the updated information as compared to the previous call. To get the updated information (delta), you should pass the delta link in the subsequent query.

The data returned by the feed for the query would look exactly like any other dataset for an OData query but with delta link at the end. Use this delta link to get the updated information. Here is a sample feed.

Note

Currently, deleted entries are not supported in delta token handling.

<feed xml:base="http://<host>:<port>/sap/opu/odata/IWFND/NOTIFICATIONSTORE/">
<id> http://<host>:<port>/sap/opu/odata/IWFND/NOTIFICATIONSTORE/NotificationCollection</id>
<title type="text">NotificationCollection</title>
<updated>2012-09-10T12:50:38Z</updated>
<author>
<name/>
</author>
<link href= "NotificationCollection" rel="self" title="NotificationCollection"/>
<entry>
<id> http://<host>:<port>/sap/opu/odata/IWFND/NOTIFICATIONSTORE/NotificationCollection('005056A509B31EE1BEE58CE5A1C90DB0')</id>
<title type="text">CUD OF FLIGHT E</title><updated>2012-09-07T09:59:37Z</updated><category term="NOTIFICATIONSTORE.Notification" 
scheme="http://schemas.microsoft.com/ado/2007/08/dataservices/scheme"/>
<link href= "NotificationCollection('005056A509B31EE1BEE58CE5A1C90DB0')" rel="self" title="Notification"/>
<link href= "http://<host>:<port>/sap/opu/odata/IWFND/RMTSAMPLEFLIGHT;
mo/FlightCollection(SAP__Origin='LOCAL',carrid='AA',connid='0017',
fldate=datetime'2012-02-15T00%3A00%3A00')" rel="http://schemas.microsoft.com/ado/2007/08/dataservices/related/via" type="application/atom+xml;type=entry" 
title="via"/>
<content type="application/xml">
<m:properties>
 <d:NotificationID>005056A509B31EE1BEE58CE5A1C90DB0</d:NotificationID>
 <d:Recipient>USER</d:Recipient>
 <d:ChangeType>Created</d:ChangeType>
 <d:SAPOrigin>LOCAL</d:SAPOrigin>
 <d:TechnicalServiceID>/IWFND/SG_SAMPLE_RMT_SFLIGHT_0001</d:TechnicalServiceID>
 <d:Collection>FlightCollection</d:Collection>
 <d:ExternalServiceName>RMTSAMPLEFLIGHT</d:ExternalServiceName>
 <d:EntriesOfInterest>0</d:EntriesOfInterest>
</m:properties>
</content>
</entry>
<link rel="delta" href="NotificationCollection?$filter=Recipient eq '*'&!deltatoken='20120910125038'" />
</feed>
 
Server Side Paging

Server side paging ensures that when a user does a query, a limited number of records as per max paging concept and a link to navigate to the next set of entries is sent. With server side paging, data provider can decide to limit the amount of data which is sent back to the client in order to ensure performance. Server-side paging is achieved by setting a skip token.

The data returned by the feed for the query would look exactly like any other dataset for an OData query but with skip token link at the end. Here is a sample feed.

<feed xml:base="http://<host>:<port>/sap/opu/odata/IWFND/NOTIFICATIONSTORE/"
xmlns="http://www.w3.org/2005/Atom" xmlns:m="http://schemas.microsoft.com/ado/2007/08/dataservices/metadata"
 xmlns:d="http://schemas.microsoft.com/ado/2007/08/dataservices">
<id> http://<host>:<port>/sap/opu/odata/IWFND/NOTIFICATIONSTORE/NotificationCollection</id>
<title type="text">NotificationCollection</title>
<updated>2012-11-28T06:32:42Z</updated>
<author>
<name/>
</author>
<link href= "NotificationCollection" rel="self" title="NotificationCollection"/>
<entry>
<id> http://<host>:<port>/sap/opu/odata/IWFND/NOTIFICATIONSTORE/NotificationCollection('005056A509B31ED28BC06FB04AEE9986')</id>
<title type="text">TEST USER PUSH E</title>
<updated>2012-11-14T02:32:10Z</updated>
<category term="NOTIFICATIONSTORE.Notification" scheme="http://schemas.microsoft.com/ado/2007/08/dataservices/scheme"/>
<link href= "NotificationCollection('005056A509B31ED28BC06FB04AEE9986')" rel="self" title="Notification"/>
<link href= "http://<host>:<port>/sap/opu/odata/sap/ZPUSHDEMOSRV;
mo/UserCollection(SAP__Origin='LOCAL',UserName='AAA')" rel="http://schemas.microsoft.com/ado/2007/08/dataservices/related/via" 
type="application/atom+xml;type=entry" title="via"/>
<content type="application/xml">
<m:properties>
 <d:NotificationID>005056A509B31ED28BC06FB04AEE9986</d:NotificationID>
 <d:Recipient>USER</d:Recipient>
 <d:ChangeType>Created</d:ChangeType>
 <d:SAPOrigin>LOCAL</d:SAPOrigin>
 <d:TechnicalServiceID>ZPUSHDEMOSRV_0001</d:TechnicalServiceID>
 <d:Collection>UserCollection</d:Collection>
 <d:ExternalServiceName>ZPUSHDEMOSRV</d:ExternalServiceName>
 <d:EntriesOfInterest>0</d:EntriesOfInterest>
</m:properties>
</content>
</entry>
+<entry>
+<entry>
+<entry>
+<entry>
+<entry>
+<entry>
+<entry>
+<entry>
<link rel="next" href="NotificationCollection?$skiptoken=71"/>
</feed>
 
Delta Token Handling with Server Side Paging

It is important that the server calculates the delta token the moment a query is executed, considering the instance data could change while a client is paging through results using a series of next links. This allows the client to use a delta link to fetch the changes occurred for a set of data since the query was first executed. This is achieved by holding the delta token in the next link.

The data returned by the feed for the query would look exactly like any other dataset for an OData query but with a delta token and a skip token link at the end. Here is a sample feed.

<feed xml:base="http://<host>:<port>/sap/opu/odata/IWFND/NOTIFICATIONSTORE/"
xmlns="http://www.w3.org/2005/Atom" xmlns:m="http://schemas.microsoft.com/ado/2007/08/dataservices/metadata"
 xmlns:d="http://schemas.microsoft.com/ado/2007/08/dataservices">
<id> http://<host>:<port>/sap/opu/odata/IWFND/NOTIFICATIONSTORE/NotificationCollection?!deltatoken='20120928063142'</id>
<title type="text">NotificationCollection</title>
<updated>2012-11-28T06:35:14Z</updated>
<author>
<name/>
</author>
<link href= "NotificationCollection" rel="self" title="NotificationCollection"/>
<entry>
<id> http://<host>:<port>/sap/opu/odata/IWFND/NOTIFICATIONSTORE/NotificationCollection('005056A509B31ED28BA74845D8A54DE5')</id>
<title type="text">TEST USER PUSH E</title>
<updated>2012-11-13T02:31:41Z</updated>
<category term="NOTIFICATIONSTORE.Notification" scheme="http://schemas.microsoft.com/ado/2007/08/dataservices/scheme"/>
<link href= "NotificationCollection('005056A509B31ED28BA74845D8A54DE5')" rel="self" title="Notification"/>
<link href= "http://<host>:<port>/sap/opu/odata/sap/ZPUSHDEMOSRV;
mo/UserCollection(SAP__Origin='LOCAL',UserName='AAA')" rel="http://schemas.microsoft.com/ado/2007/08/dataservices/related/via" 
type="application/atom+xml;type=entry" title="via"/>
<content type="application/xml">
<m:properties>
 <d:NotificationID>005056A509B31ED28BA74845D8A54DE5</d:NotificationID>
 <d:Recipient>USER</d:Recipient>
 <d:ChangeType>Created</d:ChangeType>
 <d:SAPOrigin>LOCAL</d:SAPOrigin>
 <d:TechnicalServiceID>ZPUSHDEMOSRV_0001</d:TechnicalServiceID>
 <d:Collection>UserCollection</d:Collection>
 <d:ExternalServiceName>ZPUSHDEMOSRV</d:ExternalServiceName>
 <d:EntriesOfInterest>0</d:EntriesOfInterest>
</m:properties>
</content>
</entry>
+<entry>
+<entry>
+<entry>
+<entry>
+<entry>
+<entry>
+<entry>
+<entry>
+<entry>
<link rel="next" href= "NotificationCollection?!deltatoken='20120928063142'&$skiptoken=11">
</feed>