12.2.2 Creating a Template – Scenario Weightage Template

This section provides a conceptual overview of configuring the Scenario Weightage template using the Template Builder framework.

The configuration includes:
  • One Cartesian Table
  • Two Single-Select Dropdowns
  • Dependency sequencing between components

For information about DML scripts for this example, see Appendix A – Scenario Weightage Template: Complete DML Configuration Example.

  1. Create the required combinations. To do so, map each component with its corresponding properties in the AF_TB_COMBINATION_MAPPING_DETAIL table.
    In this example, define the following combinations:
    • CARTESIAN_TABLE
    • VERSION_DROPDOWN
    • SQL_PROJECT_DROPDOWN

    Note:

    For each combination, ensure that you specify the following details in the mapping table: Component Type, Combination Code, Property Code, and Property Value.
  2. Map the defined combinations to logical groups. To do so, configure the mappings in the AF_TB_COMBINATION_GROUP_MAPPING table.
    In this example, create and use the following groups:
    • GROUP_DROPDOWN
    • GROUP_CARTESIAN_TABLE

    Note:

    Ensure that the relevant combinations are associated with each group and that the display order within the group is defined appropriately.
  3. Create the template entry. To do so, insert the template metadata into the AF_TB_TEMPLATE_MASTER table.
    For this example, use the following details:
    • Template Name: Scenario Weightage
    • Template Code: TEMP_SCEN

    Note:

    Ensure that all required metadata fields are populated as per your environment configuration.
  4. Each template code follows the prefix TEMP_ (for example, TEMP_SCEN). Function codes must also begin with the template code. The standard function codes are:

    Table 12-7 Standard Function Codes

    Function Code Purpose
    TEMP_SCEN_VIEW View access
    TEMP_SCEN_SUMM Summary access
    TEMP_SCEN_MOD Modify access
    TEMP_SCEN_DEL Delete access
    TEMP_SCEN_COPY Copy access
    TEMP_SCEN_ADD Add access
    User roles must be defined as follows:
    • TEMPLATE_READ — Read-only access
    • TEMPLATE_WRITE — Read and write access

    Follow the existing procedure for creating roles and functions while adhering to this naming convention.

    The following tables must be populated when configuring roles and functions for a template:

    Table 12-8 Tables to be Populated

    Table Purpose
    AAICL_SMS_USERGROUP_B User group base table
    AAICL_SMS_USERGROUP_TL User group translation table
    AAICL_SMS_USER_UGRP_MAP User to user group mapping
    AAICL_SMS_UGRP_ROLE_MAP User group to role mapping
    AAICL_SMS_ROLE_B Role base table
    AAICL_SMS_ROLE_TL Role translation table
    AAICL_SMS_FUNCTION_B Function base table
    AAICL_SMS_FUNCTION_TL Function translation table
    AAICL_SMS_ROLE_FUNCTION_MAP Role to function mapping
    Templates can be created for multiple use cases, with each template acting as a separate object in STSA. Whenever a template is created, it is mandatory to define:
    • The user group that will use it
    • The level of access assigned to that user group

    Note:

    STSA currently does not support adding User Groups through the UI, as there is a one-way mapping between STSA and OFSAA for user groups. However, functions can be created and mapped to an existing user group. To achieve this, insert the required entries using the provided SQL scripts.
  5. Register the template in the COM object type tables. To do so, insert the corresponding entries into the AAICL_OBJ_TYPE_B and AAICL_OBJ_TYPE_TL tables.

    Note:

    Ensure that the Object Type Code matches the template code (TEMP_SCEN) and that a sufficiently high sequence number (if applicable in your environment) is assigned to avoid conflicts with existing object type entries.
  6. Map the group templates to the template. To do so, configure the mappings in the AF_TB_TEMPLATE_GROUP_MAPPING table.

    Note:

    This defines the layout and rendering order.
  7. Configure the combination dependencies. To do so, define the dependency mappings in the AF_TB_COMBINATION_DEP_MAPPING table.

    Note:

    Dependencies define the execution sequence within the template in the following order:
    • Project Dropdown
    • Version Dropdown
    • Cartesian Table