How to Create a Custom Replication Library
From Business Process Management, BPM and Workflow Automation Wiki | BizAgi BPMS
<keywords content="keywords"> replication library, entity library </keywords>
Applies to ENTERPRISE .NET EDITION |
Contents |
How to Create a Custom Replication Library
In order to replicate data sources other than MSSQL or Oracle, it is necessary to write an assembly that invokes the IProviderVirtualDA and IReplicationEntDA interfaces. Bizagi separates the operations for connection, disconnection and transactional management from the operations to query data from the external sources in the Provider and Entity interfaces.
Provider Interface IProviderVirtualDA
The class that invokes this interface must contain the following methods:
void Init (HybridDictionary htMetadata): In charge of taking the data supplied in the system configuration, such as server name, database name, user, password, etc. It receives a HybridDictionary object that contains the data configured as system metadata.
void OpenConnection(): This method is used to make the connection with the external system. In the case of a database, this is where you build the connection links and open a connection with the repository.
void CloseConnection(): In charge of closing the connection with the external system.
void BeginTransaction(): In charge of initiating a new transaction for the current operation in the system.
void Commit(): Commits the current transaction in the reference system.
void Rollback(): Carries out rollback of the current transaction in the reference system.
Entity Interface IReplicationEntDA
The class that invokes this interface must contain the following methods:
void Init(IProviderVirtualDA objProvider, HybridDictionary htMetadata): Initializes the connection with the system. The parameters required to establish the connection with the system are configured as metadata of the System.
PARAMETERS
objProvider: Allows the conversion towards the object that invokes the IProviderVirtualDA interface.
htMetadata: Contains the information required as metadata to establish the connection with the configured system.
DataSet GetEntity(string sEntSource, string[] arrsColList): used to query the values of the external data source. The logic is generally equivalent to making a query on the fields of the data object without applying filters.
PARAMETERS
sEntSource: Name of the table to replicate in the data source
arrsColList: Array that contains the name of the columns to query in the data source.
RETURNS - DataSet with the values of the entity.
Examples
- Class Interface IProviderVirtualDA implementation example
- Class Interface IReplicationEntDA implementation example
<comments />