How to insert data into DB in case of nested cdt?

Certified Senior Developer

There is a requirement where i have to insert nested CDT(one to many) data into table and then read in another process model.

Parent CDT : policyDetails

policynumber

customerId

actiontype

nomineeDetails

Child CDT= nomineeDetails

{

title: "Mr",
forename: "abc",
surname: "Test One",
dateOfBirth: "01/01/2000",
percentage: 80,
relationship: "Brother",
addressLine1: "Hall Road"

}

{

title: "Mr",
forename: "xyz",
surname: "Test two",
dateOfBirth: "01/01/2006",
percentage: 50,
relationship: "sister",
addressLine1: "aaaaa",

}

My Approach : 

  1. Create two tables policyDetails & nomineeDetails with foreign key = policynumber
  2. Insert policy details into first tables without nomineedetails.
  3. Insert nominee details into second table using MNI in process model.
  4. Create 2 expression rules to read data from both tables and use it.

Do you guys feel that there should be better approach?

  Discussion posts and replies are publicly visible