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 servelet 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 mail inbox on the device to see if there is new mail, or if the mail message has been updated.
    3. If the operation of the request is “:delete,” verify on the device that the mail message was deleted.