Mobile Workflow Data Change Notification Development Life Cycle

To use a DCN with the Mobile Workflow package:

  1. Develop the Sybase Unwired Platform package and deploy it to Unwired Server.
  2. Develop the Mobile Workflow form associated with the back-end database.
  3. Log into Sybase Control Center and deploy the Mobile Workflow Package to Unwired Server.
  4. Assign the Mobile Workflow package to a device.
  5. Run the Mobile Workflow package on the device and subscribe.
  6. Write the DCN request to update the back-end database.
  7. Generate a Mobile Workflow request in the JavaScript Object Notation (JSON) data format. This request can include one, or many, general DCN requests.
  8. Invoke the Mobile Workflow DCN servlet in one of two ways—HTTP authentication or non HTTP authentication.
  9. Process the HTTP response. If the response code is 200, the Mobile Workflow DCN result can be read from the HTTP response, for example:
    int returnCode = con.getResponseCode();
    	     if (returnCode != 200) 
               {
    		  String rspErrorMsg = "Error getting response from the server (error code "+ returnCode + ")";
    		throw new AdminException(AdminException.Type.SERVER_ERROR,
    							rspErrorMsg);
    	  	}
                else  
                {
    		   in = new BufferedReader(new InputStreamReader(con
    					.getInputStream(), "UTF-8"));
    	         String line;
    		   while ((line = in.readLine()) != null) {
    		      xmlResponse.append(line).append("\n");
    		   }
    		   System.out.println("xmlResponse: " + xmlResponse);
    		}
  10. Verify the Mobile Workflow DCN request:
    1. Check the CDB to verify it has been refreshed.
    2. If the operation of the Mobile Workflow DCN request is "upsert,” check the device to see if there is a new notification, or if the notification has been updated.
    3. If the operation of the request is “:delete,” verify on the device that the notification was deleted.