Integration Server 10.3 | Developing Data Synchronization Solutions with webMethods Mobile Support | Developing Solutions Using Mobile Support | Step 1: Write the Server-Side Business Logic | Writing the Flow Services | Writing the Upload Service
 
Writing the Upload Service
When writing the upload service to pass changed data from the mobile device to the backend application, include the following:
*Include a reference to the wm.mobile.datasync.specs:uploadSpec specification. This specification defines the input and output signatures of the upload service.
*Include a LOOP step to process each record received from the mobile application.
*Within the LOOP step, include branching logic to call the appropriate adapter service to insert, delete, or update data received from the mobile device based on the service’s actionId input parameter. An action ID of 0 indicates to insert the record, 1 indicates to delete the record, and 2 indicates to update the record. For example:
*For each iteration of the LOOP step, outputSyncData should contain an mDataRow entry for data being inserted or updated. Map the inserted or updated record to the mDataRow variable beneath the outputSyncData document in the pipeline’s output. For example:
Note:
The document mapped to mDataRow should match the business document type you created in Creating the Business Document Type.