Integration Server 10.5 | Developing Data Synchronization Solutions with webMethods Mobile Support | Developing Solutions Using Mobile Support | Step 2: Create a Mobile Sync Component
 
Step 2: Create a Mobile Sync Component
Who performs: Business integration developer
Development tools needed: webMethods Integration Server Administrator
You create a mobile sync component to supply information that Mobile Support needs to process synchronization requests received from a mobile application.
Some applications use multiple datasets. For example, an inventory application may have one dataset for order entry and another dataset where product details are maintained. If your application uses more than one dataset, create one mobile sync component for each dataset, associate each mobile sync component with the appropriate mobile application, and ensure the mobile application includes the mobile sync component alias when it sends a request so that Mobile Support can route the request to the correct service.
Before you create a mobile sync component, make sure you have created the following items:
*Flow service for uploading data from the mobile device to the backend application
*Flow service for downloading data from the backend application to the mobile device
*Business document type that defines the structure of the data to be synchronized
For details about creating these items, see Step 1: Write the Server-Side Business Logic.
*To create a mobile sync component
1. Open Integration Server Administrator if it is not already open.
2. In the Solutions menu of the Navigation panel, click Mobile Support.
3. In the Navigation panel, click Mobile Sync Components.
4. Click Add Mobile Sync Component.
5. On the Add Mobile Sync Component screen, enter the following information:
For this parameter...
Specify...
Alias
A unique name for the mobile sync component.
Download Service
The fully qualified name of the flow service created to return data from the backend application to the mobile device.
Upload Service
The fully qualified name of the flow service created to send data from the mobile device to the backend application.
Business Doc Type
The fully qualified name of the IS document type to use to define the structure of the data to be synchronized. This document type was created earlier as described in Creating the Business Document Type.
Mobile Support uses this document type to construct the mDataRow variable in the wm.mobile.datasync.specs:downloadSpec and wm.mobile.datasync.specs:uploadSpec specifications implemented in the wm.mobile.datasync:synchronize service.
Row Identifiers
One or more field names from the business document type that you want to use to identify the record being synchronized. Separate field names with commas.
Mobile Support uses these fields to construct a single unique identifier for each record.
Filter
Optional. One or more keys that specify which records to return to the mobile application. Separate key names with commas.
The filter keys you specify here must be present in the business document type, and the mobile application should send these same keys in the synchronization request.
Mobile Support sends the requesting mobile application only the set of records that matches the filter, as follows:
*If more than one filter key is passed, Mobile Support returns only those records that match all of the specified filter keys.
*If a filter key contains more than one value, Mobile Support returns records that match any of the values.
Conflict Resolution Rule
The rule to use if a conflict occurs. Specify one of the following:
*Client wins: Accept data the mobile application sends, even if the corresponding backend record was changed since the device last synchronized with the server. Specify this rule when your business case permits stale data.
*Server wins: Ignore the data the mobile application sends if the corresponding backend record was changed since the device last synchronized with the server. Specify this rule when updates should only be made to current data.
For more information about conflict resolution rules, see Change Detection and Conflict Resolution.
Store Business Data
Whether to store, in the sync store, the business data to be synchronized. By default, Mobile Support does not store business data in the sync store.
Important:
If the backend data is updated by the backend application, outside of Mobile Support, as well as by mobile applications that submit synchronization requests to Mobile Support, select this check box. Doing so assists Mobile Support in detecting and resolving data conflicts.
6. Click Save Changes.
By default, mobile sync components are disabled when they are first created. You will enable this mobile sync component in a later step.