Adding a New Table

Add a new table to your RAPStore and RAPCache database schemas if the standard schemas do not suit your needs, or to use custom messages.

  1. Modify the RAPStore and RAPCache database schemas:
    1. In PowerDesigner, modify both the RAPStore and RAPCache physical data models (PDMs), and generate data definition language (DDL) scripts for the new table.
    2. Run the scripts to update the database. See Data Model and Queries > DDL Script Generation.
  2. Create a new RDS message template:
    1. Create a new RDS message definition, specifying the new table as the destination table.
    2. Ensure that the message type has a unique value across all RDS message definitions.
    3. For each column in the new database table, add a field definition block to the message definition.
    4. If you create message definitions in the RAP Messages model, export them to a message_name.xml template file.
    5. Ensure that all publishers and subscribers are updated with the new RDS message templates by copying the new information to all subscribers.
  3. Modify the publisher code:
    1. Make a call to the pub_beginMessage API method specifying the new message definition's message type.
    2. For each field in the message, call the appropriate pub_set<type>Field API method to pass in the field data.
    3. For fields that can be null, test for null and call pub_SetNullField.
    4. Call the pub_sendMessage API to send the data.
  4. Stop, shut down, and restart subscribers and publishers for the changes to take effect.
Related tasks
Adding a New Column
Related reference
pub_beginMessage
Set Field Methods
pub_sendMessage
RDS Template and Element Descriptions
Related information
Data Model and Queries