Invoking upsert and delete Operations Using Data Change Notification

Data change notifications (DCNs) with payload directly update the Unwired Server cache, either with the built-in, direct cache-affecting operations :upsert (update or insert), or with :delete.

Syntax

DCN with payload requires a JavaScript Object Notation (JSON) string (dcn_request) that contains one or more :upsert and :delete operations that are applied to the Unwired Server cache (CDB).

http://unwired_server_host:unwired_server_port(default 8000)/dcn/DCNServlet
? cmd=dcn
&username=userName
&password=password
&domain=domainName
&package=unwired_server_PackageName 
&dcn_request={"pkg":"dummy","messages":[{"id":"1","mbo":"CustomerWithParam","op":":upsert","cols":{"id":"10001","fname":"Adam"}}]}
&dcn_filter=fully_qualified_name_of_dcn_filter

Parameters

Examples

Usage

Follow these guidelines when constructing a DCN:
  • The format of non string data is the same as parameter default values in Unwired WorkSpace. For example, specify timestamp values in a format similar to 2009-03-04T17:03:00+05:30.
  • The :upsert operation requires:
    • All MBO primary key attributes to be present in the payload.
    • Any other MBO attributes used in the upsert.
    • All columns in the operation use attribute names (not the column names to which they are mapped).
  • The :delete operation requires:
    • The MBO primary key attribute be present in the payload.
    • All columns in the operation use attribute names (not the column names to which they are mapped).