1. Create three Document Models.
2. Create two Relationship Models. A to B with a 1:n multiplicity. One A can have many B documents, but each B belongs to exactly one A. The second relationship connects B to C with a 1:1 multiplicity. Documentation Link
3. Create the CDM. Root is DM A with repeatability 1, below the first relationship group (A→B, 1:n. To-many relationship requires a proper limit, e.g. 10. Below sits DM B followed by the second relationship group (B→C, 1:1) below sits DM C. Documentation Link
4. The critical addition is inside the B→C relationship (to-1 binding) group: add a StringType field called t_docRef and a BooleanType field called HasC. Documentation Link
5. Then add a computation rule that sets HasC to true when t_docRef is filled, and false when it is not. The t_docRef field is automatically filled by the system when a C document is linked to B. The HasC boolean will be used in the next step to control visibility in the CFM. Documentation Link
6. Create the CFM which references your CDM. Build one screen where A fields are at the top. Below that build the A→B relationship group (component type Table List). Each row represents one B document. When the user clicks a row, a detail screen opens.Inside the detail screen, there are three parts: First, a Section with the B fields, second the B→C relationship binding. This is where the user selects which C is linked to this B. You configure this as a Drop Down Selection. The dropdown shows available C documents (products) and lets the user pick one. Documentation Link
7. Third, a Section with the C fields.This section is controlled by a dependentGroup configuration that uses the HasC computed field as its masterField. When HasC is null or, the entire section is hidden. As soon as the user selects a C through the dropdown, the t_docRef gets filled, the computation sets HasC to true, and the DM C fields appear automatically.
What This Gives You
The user opens an A document and sees the request data at the top and a list of B documents below. Clicking a B row opens a detail screen showing the B data, a dropdown to select a C, and once a C is selected, the C-specific fields (risk questions) appear dynamically.
What This Does NOT Cover
The automatic creation of B documents based on a selection in A requires Camunda or custom code. The CDM and CFM handle the display and the relationship bindings, but not the automatic document creation.