Synchronize data with an external source

Synchronization with an external source is implemented. The implementation is currently only available in the documentation of Alfabet 10.15 in the System Administration reference manual.

The synchronization command described in the following substitutes the synchronization via the deprecated ExternalSourceSynchronization.exe described in the above mentioned document under Synchronizing Data via a Batch Process.

The action performed during batch one-way synchronization of objects in the Alfabet database with data from an external data source (pool) depends on the availability of the object in both the Alfabet database and the external database. The following behavior applies:

Object Available in External Source Object Available in Alfabet  Action During Batch Synchronization
Yes Yes Values defined for all mapped properties are updated in the Alfabet database.
Yes No No action.
No Yes The object in the Alfabet database will not be deleted because dependent objects may exist. However, a property can be configured to indicate that the object in the Alfabet database is marked for deletion.

The property marking an object for deletion must be configured for the relevant object class in the configuration tool Alfabet Expand:

  • Specify a custom property of the data type "Boolean" for the relevant object class in Alfabet. A flag attribute with the name "DeletionRequested " is preconfigured for the class Person.
  • In the ExternalSourceConfiguration XML object, you must define the custom property in the XML attribute AlfaDeletedFlagProperty . The property value will be set to true if the object does not exist in the external data source.

If an external source pool is configured to map the objects in the Alfabet database to multiple external sources, the batch job for data synchronization must be configured for the external source pool. The command line to start the batch tool allows you to specify the source for the batch process. It is possible to select a single external source in the external source pool for the synchronization or to synchronize the data with all external sources in the external source pool. By default, the batch job synchronizes the mapped objects in the Alfabet database with the data of the first external source specified in the external source pool configuration.

If multiple external source pools are defined, the batch job allows you to select the external source pool used for data synchronization as well as to select one specific external source from a selected external source pool.

If you synchronize the data in the Alfabet database with the data from multiple external sources in one batch process, you must ensure that the external sources do not contain conflicting data. If you cannot ensure the integrity of data to be imported, it is recommended that you use the data import mechanisms provided by the Alfabet Data Integration Framework (ADIF) instead of batch synchronization via the ExternalSourceSynchronization.exe.

The following command line starts the batch job for the synchronization of data with an external data source:

The table below displays the command line options:

Command Line Option Mandatory/ Optional Explanation
-externalsourcesynchronization To perform data synchronization with external sources, start the console application with
  • -externalsourcesynchronization
-msalias <alias name> Mandatory Enter the alias name as specified in the AlfabetMS.xml configuration file. All other Alfabet applications with access to the Alfabet database must be stopped.
-msaliasesfile <Alfabet configuration file path> Optional If the AlfabetMS.xml configuration file that contains the specification of the alias is not located in the same directory as the executable, the path to the AlfabetMS.xml file must be specified with this parameter.
-alfaLoginName < Alfabet user name> Mandatory User name for login to the Alfabet Server.

A user can only execute a batch job if the Can Execute Batch Jobs checkbox is selected (=True) for the user.

-alfaLoginPassword < Alfabet login password> Optional Password for login to the Alfabet Server.
-source <name of external source> Optional This parameter is only needed if more than one external data source is specified in the XML object ExternalSourceConfiguration or if only one external source in an external source pool will be used for synchronization. If an external source in an external source pool is specified, the parameter-pool is also required. If the parameter -source is not specified and the parameter -pool is specified, all external sources in the external source pool are used for synchronization. If neither -source nor -pool are specified, the first external source specified in this XML object ExternalSourceConfiguration is used.
-pool <name of external source pool> Optional Name of the external source pool as specified in the XML object ExternalSourceConfiguration . This parameter is required to synchronize data from an external source pool. If the parameter -source is set in combination with the parameter -pool, only the specified external source in the external source pool is used for synchronization.
-disposeafterquery <true/false> Optional If set to true , the connection will be dropped after each search and a new connection opens. If set to false , connections are re-used for the next search. The default for this parameter is either a preconfigured value or false.