Manifest. Application synchronization properties
Glossary Item Box
General information
The conditional property group of the manifest configuration object contains a single property used to synchronize data with the main application. Read more about the mobile application manifest and its properties in the "Mobile application manifest" article.
SyncOptions Property
Describes the options for configuring data synchronization. Contains the configuration object with properties presented in table 1.
Table 1 The configuration object properties for the synchronization setup.
Property | Value |
---|---|
ImportPageSize | The number of pages imported in the same thread. |
PagesInImportTransaction | The number of import threads. |
SysSettingsImportConfig | Imported system settings array. |
SysLookupsImportConfig | Imported system lookups array. |
ModelDataImportConfig | An array of models that will load the data during synchronization. |
In the ModelDataImportConfig model array, you can specify additional synchronization parameters, the list of available columns and filter conditions for each model. If you need to load a full model during synchronization, specify the object with the model name in the array. If the model needs to apply additional conditions for synchronization, the configuration object with properties given in table 2 is added to the ModelDataImportConfig array.
Table 2 The configuration object properties for the synchronization model setup.
Property | Value |
---|---|
Name | Model name (see Models property of the manifest configuration object). |
SyncColumns | The column models array for which data is imported. In addition to the listed columns, the system columns (CreatedOn, CreatedBy, ModifiedOn, ModifiedBy) and primary displayed columns will also be imported during synchronization. |
SyncFilter | The filter applied to the model during import |
The SyncFilter is applied to the model during import is a configuration object with properties given in table 3.
Table 3 Filter model configuration object properties.
Property | Value | ||||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
type |
Filter type. Set by the enumeration value Terrasoft.FilterTypes. Optional property. By default Terrasoft.FilterTypes.Simple. Filter types (Terrasoft.FilterTypes):
|
||||||||||||||||||||
logicalOperation |
The logical operation for combining a collection of filters (for filters with Terrasoft.FilterTypes.Group type). Set by the enumeration value Terrasoft.FilterLogicalOperations. By default - Terrasoft.FilterLogicalOperations.And. Logical operation types (Terrasoft.FilterLogicalOperations):
|
||||||||||||||||||||
subfilters | A collection of filters applied to a model. Obligatory property for the filter type Terrasoft.FilterTypes.Group. The filters are interconnected by the logical operation set in the logicalOperation property. Each filter is a configuration filter object. | ||||||||||||||||||||
property | Filtered column model name. Obligatory property for the filter type Terrasoft.FilterTypes.Simple. | ||||||||||||||||||||
valueIsMacrosType | The checkbox that defines whether the filtered value is a macro. Optional property can be: true if the filter uses a macro, and false if it doesn't. | ||||||||||||||||||||
value |
Value of the column filtration set in the property property. Obligatory property for the filter type Terrasoft.FilterTypes.Simple. Can be set directly by the filter value (including null) or a macro (the valueIsMacrosType property must be set to true). Macros that can be used as the property value are contained in the Terrasoft.ValueMacros enumeration. Value macros (Terrasoft.ValueMacros):
|
||||||||||||||||||||
macrosParams | Values transitioned to macros as parameters. Optional property. This property is now used only for the Terrasoft.ValueMacros.SysSettings macro. | ||||||||||||||||||||
isNot | Applied to the negation operator filter. Optional property. Takes the true value if the the negation operator is applied to the filter, otherwise — false. | ||||||||||||||||||||
funcType |
Function type applied to the model column set in the property property. Optional property. Takes values from the Terrasoft.FilterFunctions enumeration. Argument values for the filtration functions are set in the funcArgs property. The value to compare the result of the function is specified by the value property. Filtration functions (Terrasoft.FilterFunctions):
|
||||||||||||||||||||
funcArgs | An array of argument values for the function filter defined in the funcType property. The order of the values in the array funcArgs must match the order of parameters of the funcType function. | ||||||||||||||||||||
name | The name of a filter or group of filters. Optional property. | ||||||||||||||||||||
modelName | Filtered model name. Optional property Specifies whether the filtering is performed by the columns of the connected model. | ||||||||||||||||||||
assocProperty | Connected model column by which the main model is connected. The primary column serves as a connecting column of the main model. | ||||||||||||||||||||
operation |
Filtration operation type. Optional parameter. Takes values from the Terrasoft.FilterOperation enumeration. By default — Terrasoft.FilterOperation.General. Filtration operations (Terrasoft.FilterOperation):
|
||||||||||||||||||||
compareType |
Filter comparison operation type. Optional parameter. Takes values from the Terrasoft.ComparisonType enumeration. By default — Terrasoft.ComparisonType.Equal. Comparison operations (Terrasoft.ComparisonType):
|
Example
During synchronization, the data for the following models has to be loaded into the mobile application:
- Activity All columns are loaded. While the model is being filtered, only the activities with the current user listed as a participant are loaded.
- Activity type — a full model is loaded.
The SyncOptions property of the manifest configuration object must look like this:
// Synchronization settings "SyncOptions": { // The number of pages imported in the same thread. "ImportPageSize": 100, // The number of import threads. "PagesInImportTransaction": 5, // Imported system settings array. "SysSettingsImportConfig": [ "SchedulerDisplayTimingStart", "PrimaryCulture", "PrimaryCurrency", "MobileApplicationMode", "CollectMobileAppUsageStatistics", "CanCollectMobileUsageStatistics", "MobileAppUsageStatisticsEmail", "MobileAppUsageStatisticsStorePeriod", "MobileSectionsWithSearchOnly", "MobileShowMenuOnApplicationStart", "MobileAppCheckUpdatePeriod", "ShowMobileLocalNotifications", "UseMobileUIV2" ], // Imported system lookups array. "SysLookupsImportConfig": [ "ActivityCategory", "ActivityPriority", "ActivityResult", "ActivityResultCategory", "ActivityStatus", "ActivityType", "AddressType", "AnniversaryType", "InformationSource", "MobileApplicationMode", "OppContactInfluence", "OppContactLoyality", "OppContactRole", "OpportunityStage", "SupplyPaymentDelay", "SupplyPaymentState", "SupplyPaymentType"], // An array of models that will load the data during synchronization. "ModelDataImportConfig": [ // Activity model configuration. { "Name": "Activity", // The filter applied to the model during import "SyncFilter": { // Filtered column model name. "property": "Participant", // Filtered model name. "modelName": "ActivityParticipant", // Connected model column by which the main model is connected. "assocProperty": "Activity", // Filtration operation type. "operation": "Terrasoft.FilterOperations.Any", // A macro is used for filtration. "valueIsMacros": true, // Column filtration value — current contact ID and name. "value": "Terrasoft.ValueMacros.CurrentUserContact" }, // The column models array for which data is imported. "SyncColumns": [ "Title", "StartDate", "DueDate", "Status", "Result", "DetailedResult", "ActivityCategory", "Priority", "Owner", "Account", "Contact", "ShowInScheduler", "Author", "Type" ] }, // The ActivityType model is loaded in full. { "Name": "ActivityType", "SyncColumns": [] } ] }
The SyncOptions.ModelDataImportConfig.QueryFilter property
Available in the bpm’online application starting with version 7.12.1 and in the bpm’online mobile application starting with version 7.12.3.
The QueryFilter synchronization property enables to configure data filtering of the specific model when importing via the DataService service. Previously, the SyncFilter property was used to filter data and the import was performed via the OData (EntityDataService).
ATTENTION
Data import via the DataService service is available only for the Android and iOS platforms. The OData (EntityDataService) is used for the Windows platform.
The QueryFilter filter is a set of parameters in the form of JSON object that are sent in the request to the DataService service. Description of the DataService parameters can be found in the "DataService. Data filtering” development guide article.
Example of the exists filter is available below:
{ "SyncOptions": { "ModelDataImportConfig": [ { "Name": "ActivityParticipant", "QueryFilter": { "logicalOperation": 0, "filterType": 6, "rootSchemaName": "ActivityParticipant", "items": { "ActivityFilter": { "filterType": 5, "leftExpression": { "expressionType": 0, "columnPath": "Activity.[ActivityParticipant:Activity].Id" }, "subFilters": { "logicalOperation": 0, "filterType": 6, "rootSchemaName": "ActivityParticipant", "items": { "ParticipantFilter":{ "filterType": 1, "comparisonType": 3, "leftExpression": { "expressionType": 0, "columnPath": "Participant" }, "rightExpression": { "expressionType": 1, "functionType": 1, "macrosType": 2 } } } } } } } } ] } }