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).

See Extending Data Change Notification to Mobile Workflow Clients and Workflow DCN Design Approach and Sample Code for WF-DCN differences and examples.

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:
  • For timestamp values use this format: 2009-03-04T17:12:45.
    Note: Time zone information should not be included since it is ignored by the server. Convert timestamps to the corresponding UTC value before submitting them.
  • 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).