Data Synchronization Development

Data synchronization is a mechanism used to synchronize business data between a central installation (hub) and a satellite installation. Read more about the concept IFS Data Synchronization.

Note: This functionality is only available with optional component FNDRPL (IFS Data Synchronization).

An entity can be enabled for synchronization by using relevant Code Generation Properties. Generated code will result in database triggers and PLSQL packages that would facilitate exchange of XML messages between IFS installations using IFS connect framework for synchronization.

Data Synchronization can be layered, meaning that they can be extended.

Contents

Modeling

 

Enable Data Synchronization

Enable data synchronization by using code generation property DbDataSync. By doing this the entity is synchronized to all the sites and both the synchronizing directions by default.

entityname DemoPart;
component DEMO;

codegenproperties {
DbDataSync "true";
}

attributes {
key		PartNo		TEXT(50) 	KMI--;
private		Description 	TEXT(50) 	A-I--;
}		

 

Site Specific Data Synchronization

Site specific data synchronization will be enabled by code generation property DbDataSyncSite. Property value for this will be a column name which represents the functional value for site.
Example: If the site value is stored in attribute named "OrderSite" then the property value should be database column name "ORDER_SITE".

Note: Entity should be enabled for data synchronization by using code generation property DbDataSync in order to use code generation property DbDataSyncSite

Note: When giving an attribute name as the value of code generation property DbDataSyncSite, it should be given in upper case.

entityname DemoOrderLine;
component DEMO;

codegenproperties {
DbDataSync	"true";
DbDataSyncSite	"ORDER_SITE";
}

attributes {
parentkey	OrderId		NUMBER		PMI--;
key		LineNo 		NUMBER 		KMI--;
private		OrderSite	TEXT(30)	AMI--;
private 	PartNo		TEXT(30)	AMI--;
private		Supplier 	TEXT(30) 	AMI--;
}		

 

Synchronizing Direction

Data synchronization direction can be handled by using code generation property DbDataSyncDirection. property values are "hub" and "sat".

hub  - Synchronization direction is from HUB environment to SATELLITE environments.
sat  -  Synchronization direction is from SATELLITE environments to HUB environment.

Note: Entity should be enabled for data synchronization by using code generation property DbDataSync in order to use code generation property DbDataSyncDirection

entityname DemoOrderBasic;
component DEMO;

codegenproperties {
DbDataSync	"true";
DbDataSyncDirection	"hub";
}

attributes {
key		Supplier 	NUMBER 		KMI--;
private		Description 	TEXT(50) 	A-I--;
}	

 

Broadcasting

Broadcasting can be enabled for an entity by using code generation property DbDataSyncBroadcasting. This will make the entity broadcast data. This means if some data alteration is done on one SATELLITE installation, that change will synchronized first at HUB then that particular change is broadcasted to all other SATELLITE Installations.

Note: Entity should be enabled for data synchronization by using code generation property DbDataSyncin order to use code generation property DbDataSyncBroadcasting

For example, in below entity, if part price changed at one particular satellite, then the price change for the part will synchronized first at hub and then the price change is broadcasted to all other satellites.

entityname PartPrice;
component DEMO;

codegenproperties {
DbDataSync		"true";
DbDataSyncBroadcasting	"true";
}

attributes {
parentkey	PartNo 		TEXT(50) 	PMI--;
public		Price 		NUMBER 		A-I--;
}

 

Working with Plsql Files

There are two Plsql files when working with Data Synchronization, One for sending logic and other for receiving logic These files can be used to override default  behavior of the data synchronization.

Core plsql files

Generated when entity is synchronized in core level. Used to write extra business logic when special need in synchronization identified.
Currently data synchronization framework specific LUs and base LUs such as quick reports are synchronized using extra logic in core level.
     -    LuNameRSP.plsql    - contain extra logic for sending the synchronization message
     -    LuNameRRP.plsql    - contain extra logic for receiving the synchronization message

Extension plsql files

Generated when entity is synchronized in extension level. Used to write extra business logic when special need in synchronization identified.
     -    LuNameRSP-Ext.plsql    - contain extra logic for sending the synchronization message
     -    LuNameRRP-Ext.plsql    - contain extra logic for receiving the synchronization message

Customization plsql files

Generated when entity is synchronized in customization level. Used to write extra business logic when special need in synchronization identified.
     -    LuNameRSP-Cust.plsql     - contain extra logic for sending the synchronization message
     -    LuNameRRP-Cust.plsql     - contain extra logic for receiving the synchronization message

 

Generated Methods

When an entity is enabled for synchronization, several methods are generated for sending and receiving the synchronization messages.

Sending methods

Receiving Methods

 

Generated Code

When an Entity is enabled for data synchronization, a separate set of codes generated to support synchronization functionality of that entity.

Following shows a list of generated files when synchronizing an Entity with logical unit name 'LuName'.

 

Deployment

Data Synchronization specific code can be generated and deployed using RMB 'Generate and Deploy Replication Code' in IFS Developer Studio.

  • Developer can view generated data synchronization specific files by using RMB 'Go to Source > Replication >'

  • Developer Studio References