Processing Responses From the Server

There are a couple of approaches for handling callback functions.

If you want to use the JavaScript APIs generated by the wizard, for online request functions, you must implement the function:
hwc.processDataMessage = function processDataMessage (incomingDataMessageValue, noUI, loading, fromActivationFlow, dataType) {

   // for example, 
   // var workflowMessage = new WorkflowMessage(incomingWorkflowMessage);
            		
   //if ( workflowMessage.getRequestAction() == Customer.findByPrimaryKeyAction ){
   //so this workflow message is returned by calling    customer_findByPrimaryKey function 

   //TODO; do whatever you want to do with the return data....


}

You can choose, instead, to take advantage of the other functions in the SUP_HOME\UnwiredPlatform\MobileSDK<version>\ folder, specifically the files under the AppFramework folder. In these, the incoming and outgoing messages, how they are bound to the UI, and how navigation works are handled by the functions defined in the API.js and Utils.js files. You can add your custom code into your own JavaScript file. You must still create the UI and do so in a way that is compatible with the AppFramework.