Kony Synchronization is a comprehensive data synchronization platform that enables developers to add synchronization capabilities to mobile applications. Fundamental to Sync Framework is the ability to support offline and collaboration of data between devices and the backend systems.
To enable synchronization capability for an app, you need to define a Sync Configuration file.
A Sync Configuration captures details of the data synchronization characteristics of an application. These details are captured in a file typically referred to SyncConfig.xml (the name really does not matter) adhering to the SyncConfig.xsd schema. A SyncConfig.xml represents the below structure.
The two most important elements of this schema are:
A Sync Scope groups together the Sync Objects that share common synchronization characteristics like Sync Strategy, Datasource and so on.
A Sync Configuration can have multiple Sync Scopes. It is not possible to define relationships between Sync Objects belonging to different Sync Scopes.
Conceptually, you can consider a Sync Object as a business object that has some public attributes and some methods. The public attributes correspond to the fields visible to client devices, and they are used for synchronization. The methods correspond to the CRUD operations that map to the backend services exposed for the object. The parameter values methods /operations based on both public attribute values.
A Sync Object is meta-data:
A Sync Object is data:
Sync Object data is a business object instance exchanged between client and server.
Note: The following section explains setting up a Sync scope for Salesforce account.
To add a new Synchronization scope, follow these steps:
Specify a Namespace for the Sync scope. The Namespace should follow a prescribed format such as com.kony.
Note: To understand which strategy to use for your sync scope, refer section Appendix - Sync Strategy.
Select a Change Tracking Policy (CTP) if you want to track the changes happening in the server database. Select Provided by data source, if you have a provision to track changes in the data source. For database this would be like a timestamp column which updates for any changes made to the row. Set CTP as Kony Sync Server, if you want SyncServer to track the changes. This option will be available only if you had selected Persistent Sync as Sync Strategy.
In case of conflicts between the data at the client and server end, specify any of the following under Conflict Resolution Policy:
Select the Last Updated Timestamp check box when you have column that represents the latest edited values.
Select the Soft Delete Flag check box when the database has the column that represents soft deletes. Soft delete field in a record represents that a particular record is deleted by changing the status to deleted. This record will exist in the database. Thus by selecting this field Kony Sync server does not sync records whose status is set as deleted.
Under Data Source Type, select one of the following:
To use an Integration service or Orchestration service as the data source, follow these steps:
Click in the Select the service field. A drop-down menu appears. Select the service from the menu.
To use a database as the data source, specify the following connection details of the backend database:
Database Type
Database Connection URL
User ID
Password
Click Test Connection to verify the connection to the database.
Note that a persistent sync strategy is not supported for a Sync scope that uses an object service as the data source type.
To use an object service as the data source:
Note: The list of operations available for a new Sync object depends on the Integration Service selected in the Sync Scope.
Note: You need to select TimeStamp Attribute for Change Tracking, only if you have selected Last Update Timestamp check box under the Change Tracking Columns respectively.
Note: You need to select Attribute for Identifying a soft delete only if you have selected Soft Delete Flag check box under the Change Tracking Columns.
For non Boolean attributes, enter additional values that will be considered for soft deleting. For example, from the list if you select BillingCity, the system displays the following fields.
Click the Plus button to open Add New Relationship dialog.
Note: Input mapping is generated only for Create, Update and Delete operations.
Note: Output mapping is generated for all the operations: Create, Update, Delete, get, getUpdated, getDeleted and getBatch.
Note: Header Mapping needs to be added manually.
Kony Fabric allows you to validate the Sync configuration before you can utilize the scope in your application.
To validate the your Sync configuration, on the Synchronization page, click Validate Sync Configuration.
You receive the following message if your scope is valid:
To download the file, click Download. This file is useful when the Sync Scope is invalid, and you wanted to know the details of the errors encountered while validating the Sync Scope.
Click Download Sync Configuration to download the Sync configuration file Syncconfig.xml file on your computer.
Note: The details of your sync scope will be available in Sync Services after you publish the app.
Kony Sync Management Console provides a single point of control for monitoring and configuring the Kony sync console creation process.
To view your Sync Console, click Sync Services from your cloud account.
For more details on Sync Console, refer to the following document: http://docs.kony.com/konylibrary/sync/kony_sync_console_user_guide/Default.htm
Copyright © 2014 Kony, Inc. All rights reserved. |