External Replication - Replication through BizAPIs

This is a functionality to read data from IFS and send a message to Connect using procedure
PLSQLAP_Server_API.Post_Outbound_BizAPI . This may either be a single-level message or  a structured message with arrays as shown here. The idea is to have a simple way of sending XML-messages.

The example below, sets up a replication job which would create an xml containing details on a particular 'Customer Info Address' record and its parent 'Customer Info' record and send it as an outbound BizAPI call whenever there is an insert or update to the Customer Info Address table.

Steps

Define Message Header

  1. There is a separate Navigator choice to maintain these jobs.
  2. From this window, only REPLIC_DATA_OUT procedure type is available.
  3. Message name may be used to address a specific Bizapi in Connect, or
    left blank like here and FNDMIG will send
    a message with a bizapi name similar to the job id. (TRAIN_REPL_OUT)
  4. Message Sender and Message Receiver may also be specified.
  5. If not specified Client_SYS.Date_Format_ would be used.



Define Structure

  1. First you specify the views that are part of the structure.
  2. Then you specify the relations between them. On has to be Master, i.e. no value added here,
    the rest must pint to their parent view (by Sequence).
  3. If the replication is of type Batch or Automatic (same as for internal replication), you
    may specify which table(s) should trigger the event, and.....
  4.  Determine whether the particular trigger should fire on insert and/or update. It also determines what should be included in the xml created in an insert or update.
  5. Custom WHERE clause for the cursor to create the xml content related to the particular view. This would replace the default WHERE clause.
  6. Control when the trigger should fire.



Define Columns of Message

RMB Define Columns... on a structure and the window Define Columns opens up. You have to do a populate to get the column list.

  1. Columns are listed in the same order as elsewhere, ordered by column_id (*10) in view ALL_TAB_COLUMNS
  2. If the column name should be different from the IFS-name on the message, enter Alias here
  3. All key-columns (Flags = P or K) must be defined with a parent-key-name, which by default is the same as Column Name.
    But in some cases, you have to change this, because primary key CUSTOMER_ID in one LU
    can correspond to primary key IDENTITY in another LU
  4. If the replication is trigger-based, you may choose which columns should be present on the message,
    depending on whether it is a Insert or a Update

 




Compile Packages

After the job setup is done, you may Compile Packages for the job (RMB).

Create_Message procedure inside a replication package may look like this, and will contain :

  1. Cursors for each entry in the Structure folder
  2. A loop for each cursor, building record for the message.
    Note: Key-values should be present on the attr-string, and are given
    value as the first step after BEGIN.
  3. A call to PlsqlAP_Server_API.Post_Outbound_BizAPI
     




Compile Triggers

Triggers are generated from RMB. (available on Mode=Automatic or Batch)
The trigger packs an attr-string that also contains key-columns, and parses this attr-string as the jobs start in background.


Execute in Debug Mode

For debug purpose, you may preview what your data is going to look like before starting a replication :

  1. Select Mode=Manual
  2. Select MessageType = DisplayTrace
  3. Define a WHERE-clause for your main select
  4. Compile packages
  5. Open Debug Console and start package from RMB.
     


 

Create XSD File

If you want to create a XSD file over your structure defined in Data Migration, follow this procedure :

  1. Select RMB Create XSD File
  2. You will be prompted with info on file size
  3. The XSD is created as a Client File, you will be sent to Execute Job Window, where you can save your file from the Detail folder