How ActiveMatrix BPM Maps a Case Data Model to Case Data Tables

An object model and a relational database have fundamentally different objectives and requirements, so when a business object model is converted to a set of database tables, the result is seldom a simple 1:1 mapping of classes to tables. The domain designer needs to understand the resulting mappings and table relationships and their significance for the domain design.

When a business object model has been deployed to the ActiveMatrix BPM runtime, you can access the Create script used to install the case data from the Openspace Data Admin tab. The comments at the beginning of the Create script identify which business object model classes have been mapped to which database tables. The following example shows the (SQL Server) Create script for the example Claim model:

---------------------------------------- TIBCO HEADER ------------------------------
-- BOM Name           : ClaimModel.bom
--                      ClaimBusinessDataModel.bom
-- BOM Namespace      : com.example.claimmodel
--                      com.example.claimbusinessdatamodel
-- Namespace Tag      : CLMMDL
--                      CLMBSNSSDTMD
-- BOM Major Version  : 2
-- Table Mappings     : (BOM Class -> DB Table)
--    com.example.claimmodel.DisasterDetails             BDS_2_CLMMDL_DISASTERDETAILS
--    com.example.claimbusinessdatamodel.IncidentNotifications BDS_2_CLMBSNSSDTMD_NCDNTNTFCT1
--    com.example.claimbusinessdatamodel.IncidentNotification BDS_2_CLMBSNSSDTMD_NCDNTNTFCTN
--    com.example.claimmodel.Address                     BDS_2_CLMMDL_ADDRESS
--    com.example.claimmodel.ContactInfo                 BDS_2_CLMMDL_CONTACTINFO
--    com.example.claimmodel.Claim                       BDS_2_CLMMDL_CLAIM
--    com.example.claimmodel.IncidentDetails             BDS_2_CLMMDL_INCIDENTDETAILS
--    com.example.claimmodel.Vehicle                     BDS_2_CLMMDL_VEHICLE
--    com.example.claimmodel.Policy                      BDS_2_CLMMDL_POLICY
--    com.example.claimmodel.DisasterData                BDS_2_CLMMDL_DISASTERDATA
--    com.example.claimmodel.DisasterData.disasterStateList BDS_2_CLMMDL_DSSTRDTDSSTRSTTLS
--    com.example.claimmodel.Claimant                    BDS_2_CLMMDL_PERSON
--    com.example.claimmodel.Driver                      BDS_2_CLMMDL_PERSON
--    com.example.claimmodel.Witness                     BDS_2_CLMMDL_PERSON
--    com.example.claimmodel.Notifier                    BDS_2_CLMMDL_PERSON
--    com.example.claimmodel.Person                      BDS_2_CLMMDL_PERSON
--    com.example.claimmodel.DisasterState               BDS_2_CLMMDL_DISASTERSTATE
------------------------------------------------------------------------------------

You can examine the script to see the foreign keys that have been created to enforce the class relationships defined in the business object model. For example, the following foreign keys allow the identification of the driver, notifier, witness and claimant associated with a claim.

alter table [BDS_2_CLMMDL_PERSON] add constraint FKD5E018085F92DAC4 foreign key ([VEHICLE_DRIVER_BDSID]) references [BDS_2_CLMMDL_VEHICLE];
alter table [BDS_2_CLMMDL_PERSON] add constraint FKD5E01808BF71D702 foreign key ([CLAIM_NOTIFIER_BDSID]) references [BDS_2_CLMMDL_CLAIM];
alter table [BDS_2_CLMMDL_PERSON] add constraint FKD5E01808F340137D foreign key ([CLAIM_WITNESSES_BDSID]) references [BDS_2_CLMMDL_CLAIM];
alter table [BDS_2_CLMMDL_PERSON] add constraint FKD5E01808645A84BE foreign key ([CLAIM_CLAIMANTS_BDSID]) references [BDS_2_CLMMDL_CLAIM];

You may also find it useful to generate a database diagram or chart so that you can more easily see the created relationships. For example, the following diagram shows part of the (SQL Server) database diagram for the Claim model case data tables.