# Business Logic — JKKKapKeiInfoCancelCC.editInArrayMsg() [93 LOC]

| Field | Value |
|-------|-------|
| Fully Qualified Name | `com.fujitsu.futurity.bp.custom.common.JKKKapKeiInfoCancelCC` |
| Layer | CC/Common Component (Common component shared across screens and CBS in the K-Opticom customer backbone system) |
| Module | `common` (Package: `com.fujitsu.futurity.bp.custom.common`) |

## 1. Role

### JKKKapKeiInfoCancelCC.editInArrayMsg()

This method is a **message payload assembler** that constructs a `HashMap<String, Object>` request parameter map for invoking a Service Component (SC) via the CBS (Central Business System) framework. It acts as a **data transformation bridge** between the screen/control-layer request parameters and the CBS message template system used by the K-Opticom customer backbone system (eo customer backbone system). 

The method performs three key operations in sequence: (1) it extracts transaction-level metadata (transaction ID, usecase ID, operation ID, call type) from the incoming `IRequestParameterReadWrite` parameter object; (2) it extracts operational control data (hostname, IP address, screen ID, operator ID) from the control map; (3) it populates a `CAANMsg` template object by iterating over a `mappingData` two-dimensional array that maps field names to their values (handling empty-string cases as NULL), and then processes a child list (`inList`) of additional key-value maps, copying each into corresponding child `CAANMsg` objects. Finally, it attaches the filled template (with embedded child list) to the parameter map and returns it for the caller (`callSCArray`) to pass to `scCall.run()` for the actual SC invocation. The design follows a **delegation pattern** where `editInArrayMsg` handles message composition while `callSCArray` handles the actual SC invocation.

The Japanese comments in the code indicate two source sections: "【取得元：電文ヘッダ(ヘッダ)】" (Source: Message Header (Header)) for the transaction metadata, and "【取得元：ユーザーエリア(コントロールマップ)】" (Source: User Area (Control Map)) for the control data — reflecting the CBS message envelope structure with separate header and user data sections.

## 2. Processing Pattern (Detailed Business Logic)

```mermaid
flowchart TD
    START(["editInArrayMsg called from callSCArray"])
    START --> INIT["Initialize paramMap"]
    INIT --> EXTRACT_TXN["Extract transaction metadata from param"]
    EXTRACT_TXN --> EXTRACT_CTRL["Extract control map data"]
    EXTRACT_CTRL --> GET_SVC_IF["Extract svcIf from mappingData"]
    GET_SVC_IF --> CREATE_TPL["Create CAANMsg template"]
    CREATE_TPL --> SET_CTRL["Set operator ID, operate date, operate datetime on template"]
    SET_CTRL --> LOOP_MAP["Loop: for each row in mappingData"]
    LOOP_MAP --> CHECK_EMPTY{"mappingData[i][1] is empty?"}
    CHECK_EMPTY -->|Yes| SET_NULL_MAP["template.setNull mappingData key"]
    CHECK_EMPTY -->|No| SET_MAP["template.set mappingData key-value"]
    SET_NULL_MAP --> LOOP_MAP_NEXT["i++"]
    SET_MAP --> LOOP_MAP_NEXT
    LOOP_MAP_NEXT --> LOOP_MAP_END{"i < mappingData.length?"}
    LOOP_MAP_END -->|Yes| LOOP_MAP
    LOOP_MAP_END -->|No| GET_CHILD_LIST["template.getCAANMsgList inListMsgName"]
    GET_CHILD_LIST --> ARR_NULL{"templateArray == null?"}
    ARR_NULL -->|Yes| INIT_ARR["templateArray = new CAANMsg array"]
    ARR_NULL -->|No| LOOP_CHILD["Loop: for each child in inList"]
    INIT_ARR --> LOOP_CHILD
    LOOP_CHILD --> GET_CHILD_MAP["childMap = inList.get i"]
    GET_CHILD_MAP --> GET_EXISTING_TPL["childTemplate = templateArray[i]"]
    GET_EXISTING_TPL --> CHK_TPL{"childTemplate == null?"}
    CHK_TPL -->|Yes| CREATE_CHILD_TPL["Create new CAANMsg childTemplate"]
    CHK_TPL -->|No| ITERATE_KEYS["Iterate childMap.keySet"]
    CREATE_CHILD_TPL --> ITERATE_KEYS
    ITERATE_KEYS --> CHK_KEY{"has next key?"}
    CHK_KEY -->|Yes| GET_KEY_VAL["key = it.next val = childMap.get key"]
    CHK_KEY -->|No| ARR_CHILD["templateArray[i] = childTemplate"]
    GET_KEY_VAL --> CHK_VAL_EMPTY{"val is empty?"}
    CHK_VAL_EMPTY -->|Yes| SET_NULL_CHILD["childTemplate.setNull key"]
    CHK_VAL_EMPTY -->|No| SET_CHILD["childTemplate.set key, val"]
    SET_NULL_CHILD --> ITERATE_KEYS
    SET_CHILD --> ITERATE_KEYS
    ARR_CHILD --> LOOP_CHILD_NEXT["i++"]
    LOOP_CHILD_NEXT --> LOOP_CHILD_END{"i < inList.size?"}
    LOOP_CHILD_END -->|Yes| LOOP_CHILD
    LOOP_CHILD_END -->|No| SET_LIST["template.set inListMsgName templateArray"]
    SET_LIST --> WRAP_TPL["Wrap template in CAANMsg array"]
    WRAP_TPL --> PUT_TPL["paramMap.put TEMPLATE_LIST_KEY"]
    PUT_TPL --> RETURN["Return paramMap"]
```

**Processing Flow Summary:**

1. **paramMap Initialization** — Creates a new `HashMap<String, Object>` to hold all request parameters for the SC invocation.
2. **Transaction Metadata Extraction** — Populates `paramMap` with four header fields sourced from the `IRequestParameterReadWrite` object: Telegram ID, Usecase ID, Operation ID, and Call Type.
3. **Control Map Data Extraction** — Populates `paramMap` with four control fields sourced from the control map: Client Host Name, Client IP Address, Invoke Screen ID, and Operator ID.
4. **Service Interface Extraction** — Extracts the service interface name (`svcIf`) from `mappingData[0][1]`, which is used to construct the CBS message template name.
5. **CAANMsg Template Creation** — Creates a `CAANMsg` template with a message class name of the form `eo.ejb.cbs.cbsmsg.{svcIf}CBSMsg`.
6. **Control Data on Template** — Sets operator ID, operate date, and operate datetime on the `CAANMsg` template from the control map.
7. **mappingData Population Loop** — Iterates over all rows in `mappingData`. For each row, if the value (`mappingData[i][1]`) is an empty string, calls `template.setNull()` with the key (`mappingData[i][0]`); otherwise calls `template.set()` with the key-value pair.
8. **Child List Retrieval** — Calls `template.getCAANMsgList(inListMsgName)` to obtain any existing child message array. If the result is null, initializes a new `CAANMsg[]` array sized to `inList.size()`.
9. **Child List Population Loop** — For each item in `inList`, retrieves the corresponding `childMap` and existing `childTemplate`. If no existing `childTemplate`, creates a new one with the message class `eo.ejb.cbs.cbsmsg.{svcIf}CBSMsg1List`. Then iterates over all keys in `childMap`, setting each key-value pair on the `childTemplate` (using `setNull` for empty-string values).
10. **List Attachment** — Sets the populated `templateArray` onto the main `template` under the key `inListMsgName`.
11. **Template Wrapping and Return** — Wraps the main template in a single-element `CAANMsg[]` array, stores it in `paramMap` under `TEMPLATE_LIST_KEY`, and returns `paramMap`.

## 3. Parameter Analysis

| No | Parameter Name | Type | Business Description |
|----|---------------|------|---------------------|
| 1 | `param` | `IRequestParameterReadWrite` | The request parameter object carrying transaction context — includes the transaction ID (電文ID), usecase ID (ユースケースID), operation ID (オペレーションID), call type (サービス呼び出し区分), and a control map containing operational metadata such as hostname (依存元ホスト名), client IP (依存元IPアドレス), screen ID (依存元画面ID), operator ID (オペレータID), operate date (運用日付), and operate time (運用日時). This is the primary input that propagates through all layers of the CBS invocation. |
| 2 | `mappingData` | `Object[][]` | A two-dimensional array representing a **field-to-value mapping table**. Each row `[i]` contains `[fieldKey, fieldValue]`. Row 0, column 1 (`mappingData[0][1]`) holds the **service interface name** (`svcIf`) used to construct the CBS message template name. Subsequent rows map field names to their string values for the CBS message template. Empty-string values in column 1 are treated as NULL and set via `setNull()` rather than `set()`. This is the primary data mapping structure that defines what fields go into the parent `CAANMsg` template. |
| 3 | `inListMsgName` | `String` | The key name used to store the child message array within the parent `CAANMsg` template via `template.set(inListMsgName, templateArray)`. It acts as the child list identifier in the CBS message hierarchy — i.e., the field name under which the list of child messages is embedded. |
| 4 | `inList` | `ArrayList<HashMap<String, Object>>` | A list of child data maps. Each element is a `HashMap` whose key-value pairs will be copied into a corresponding child `CAANMsg` object. This represents **multi-row data** (e.g., list items, line items, child records) that needs to be embedded in the CBS message as a child message array. Empty-string values in the maps are treated as NULL. |

**External State / Instance Fields Read:** None. The method reads no instance fields from `JKKKapKeiInfoCancelCC` — all data is passed via parameters.

## 4. CRUD Operations / Called Services

### Pre-computed evidence from code analysis graph:

| CRUD | SC / CBS | SC Code | Entity / DB | Operation Description |
|------|----------|---------|-------------|----------------------|
| EXEC | `JCMConstants.TRANZACTION_ID_KEY` | - | - | Reference constant for transaction ID key in `paramMap` |
| EXEC | `JCMConstants.USECASE_ID_KEY` | - | - | Reference constant for usecase ID key in `paramMap` |
| EXEC | `JCMConstants.OPERATION_ID_KEY` | - | - | Reference constant for operation ID key in `paramMap` |
| EXEC | `JCMConstants.CALL_TYPE_KEY` | - | - | Reference constant for call type key in `paramMap` |
| EXEC | `JCMConstants.CLIENT_HOST_NAME_KEY` | - | - | Reference constant for client host name key in `paramMap` |
| EXEC | `JCMConstants.CLIENT_IP_ADDRESS_KEY` | - | - | Reference constant for client IP address key in `paramMap` |
| EXEC | `JCMConstants.INVOKE_GAMEN_ID_KEY` | - | - | Reference constant for invoke screen ID key in `paramMap` |
| EXEC | `JCMConstants.OPERATOR_ID_KEY` | - | - | Reference constant for operator ID key in `paramMap` |
| EXEC | `JCMConstants.OPERATE_DATE_KEY` | - | - | Reference constant for operate date key in `paramMap` |
| EXEC | `JCMConstants.OPERATE_DATETIME_KEY` | - | - | Reference constant for operate datetime key in `paramMap` |
| EXEC | `JCMConstants.TEMPLATE_LIST_KEY` | - | - | Reference constant for template list key in `paramMap` |
| EXEC | `SCControlMapKeys.REQ_HOSTNAME` | - | - | Constant for requesting hostname in control map |
| EXEC | `SCControlMapKeys.REQ_HOSTIP` | - | - | Constant for requesting host IP in control map |
| EXEC | `SCControlMapKeys.REQ_VIEWID` | - | - | Constant for requesting screen ID in control map |
| EXEC | `SCControlMapKeys.OPERATOR_ID` | - | - | Constant for operator ID in control map |
| EXEC | `SCControlMapKeys.OPE_DATE` | - | - | Constant for operate date in control map |
| EXEC | `SCControlMapKeys.OPE_TIME` | - | - | Constant for operate time in control map |
| EXEC | `JKKKapKeiInfoCancelCC.setNull` | - | - | Calls `template.setNull()` — sets a field to NULL in the `CAANMsg` template |
| EXEC | `JKKKapKeiInfoCancelCC.set` | - | - | Calls `template.set()` — sets a field value in the `CAANMsg` template |
| R | `JKKejbCallTypeChecker.getCallType` | - | - | Calls `template.getCAANMsgList()` — retrieves existing child `CAANMsg` array from template by `inListMsgName` key |

**CRUD Classification:**

This method is a **pure data transformation method** — it does not directly perform database CRUD operations or invoke Service Components. All of its operations are **E** (Execute/Manipulate) on in-memory data structures (`HashMap`, `CAANMsg`). The actual SC invocation (with real C/R/U/D operations) is performed by the **caller** `callSCArray`, which receives the `paramMap` from `editInArrayMsg` and passes it to `scCall.run(paramMap, handle)`.

- **setNull**: Sets a field in the `CAANMsg` template to NULL (used when mapping data value is empty string)
- **set**: Sets a field value in the `CAANMsg` template
- **getCAANMsgList**: Retrieves an existing child message array from the template by message name key

No SC Code or Entity/DB tables are directly accessed by this method — it operates entirely on in-memory data structures.

## 5. Dependency Trace

### Pre-computed evidence from code analysis graph:

No screen/batch entry points found within 8 hops. Direct callers found: 1 methods.
Terminal operations from this method: `setNull` [-], `set` [-], `getCAANMsgList` [R], `getTelegramID` [-], `getUsecaseID` [-], `getOperationID` [-], `getCallType` [-], `getControlMapData` [-], `keySet` [-]

| # | Caller (Screen/Batch) | Call Chain (Full Path to this Method) | Terminal (SC / CRUD / Entity) |
|---|----------------------|--------------------------------------|-------------------------------|
| 1 | CBS: `callSCArray` | `callSCArray.handle, scCall, param, dataMapKey, mappingData, inListMsgName, inList` -> `editInArrayMsg(param, mappingData, inListMsgName, inList)` | `setNull`, `set`, `getCAANMsgList` (no entity/DB — pure data manipulation; actual SC call happens in caller via `scCall.run()`) |

**Call Chain Details:**

`callSCArray` is a `private` method of `JKKKapKeiInfoCancelCC` that:
1. Calls `editInArrayMsg(param, mappingData, inListMsgName, inList)` to build the `paramMap`
2. Passes the `paramMap` to `scCall.run(paramMap, handle)` to execute the actual SC call
3. Returns a `Map<?, ?>` result

`callSCArray` serves as the **SC invocation bridge** — it combines the caller-supplied `handle` and `scCall` (the Service Component request invoker) with the message assembled by `editInArrayMsg`. The actual CRUD operations are performed by the SC that `scCall.run()` invokes, not by `editInArrayMsg` itself.

## 6. Per-Branch Detail Blocks

**Block 1** — [IF/SET] `paramMap initialization` (L2066-L2068)

> Initializes the request parameter map that will be returned to the caller. Four transaction metadata fields are extracted from the `IRequestParameterReadWrite` parameter object.

| # | Type | Code | Business Description |
|---|------|------|---------------------|
| 1 | NEW | `paramMap = new HashMap<String, Object>()` | Creates empty parameter map for SC invocation |
| 2 | EXEC | `paramMap.put(JCMConstants.TRANZACTION_ID_KEY, param.getTelegramID())` | 【取得元：電文ヘッダ(ヘッダ)】電文ID — Puts transaction ID (Telegram ID) from request parameter [-> CONSTANT: `JCMConstants.TRANZACTION_ID_KEY`] |
| 3 | EXEC | `paramMap.put(JCMConstants.USECASE_ID_KEY, param.getUsecaseID())` | 【取得元：電文ヘッダ(ヘッダ)】ユースケースID — Puts usecase ID from request parameter [-> CONSTANT: `JCMConstants.USECASE_ID_KEY`] |
| 4 | EXEC | `paramMap.put(JCMConstants.OPERATION_ID_KEY, param.getOperationID())` | 【取得元：電文ヘッダ(ヘッダ)】オペレーションID — Puts operation ID from request parameter [-> CONSTANT: `JCMConstants.OPERATION_ID_KEY`] |
| 5 | EXEC | `paramMap.put(JCMConstants.CALL_TYPE_KEY, param.getCallType())` | 【取得元：電文ヘッダ(ヘッダ)】サービス呼び出し区分 — Puts call type from request parameter [-> CONSTANT: `JCMConstants.CALL_TYPE_KEY`] |

**Block 2** — [IF/SET] `Control map data extraction` (L2070-L2077)

> Puts control map data into `paramMap`. Four operational metadata fields are extracted from the control map.

| # | Type | Code | Business Description |
|---|------|------|---------------------|
| 1 | EXEC | `paramMap.put(JCMConstants.CLIENT_HOST_NAME_KEY, param.getControlMapData(SCControlMapKeys.REQ_HOSTNAME))` | 【取得元：ユーザーエリア(コントロールマップ)】依存元ホスト名 — Client hostname [-> CONSTANT: `JCMConstants.CLIENT_HOST_NAME_KEY`, `SCControlMapKeys.REQ_HOSTNAME`] |
| 2 | EXEC | `paramMap.put(JCMConstants.CLIENT_IP_ADDRESS_KEY, param.getControlMapData(SCControlMapKeys.REQ_HOSTIP))` | 【取得元：ユーザーエリア(コントロールマップ)】依存元IPアドレス — Client IP address [-> CONSTANT: `JCMConstants.CLIENT_IP_ADDRESS_KEY`, `SCControlMapKeys.REQ_HOSTIP`] |
| 3 | EXEC | `paramMap.put(JCMConstants.INVOKE_GAMEN_ID_KEY, param.getControlMapData(SCControlMapKeys.REQ_VIEWID))` | 【取得元：ユーザーエリア(コントロールマップ)】依存元画面ID — Source screen ID [-> CONSTANT: `JCMConstants.INVOKE_GAMEN_ID_KEY`, `SCControlMapKeys.REQ_VIEWID`] |
| 4 | EXEC | `paramMap.put(JCMConstants.OPERATOR_ID_KEY, param.getControlMapData(SCControlMapKeys.OPERATOR_ID))` | 【取得元：ユーザーエリア(コントロールマップ)】オペレータID — Operator ID [-> CONSTANT: `JCMConstants.OPERATOR_ID_KEY`, `SCControlMapKeys.OPERATOR_ID`] |

**Block 3** — [IF/SET] `Service interface extraction and template creation` (L2079-L2083)

> Extracts the service interface name from `mappingData[0][1]`, then creates a `CAANMsg` template with a message class name incorporating the service interface.

| # | Type | Code | Business Description |
|---|------|------|---------------------|
| 1 | SET | `svcIf = (String)mappingData[0][1]` | Extracts service interface name from first row of mappingData — this name is used to construct the CBS message template class name |
| 2 | NEW | `template = new CAANMsg(String.format("eo.ejb.cbs.cbsmsg.%sCBSMsg", svcIf))` | Creates parent `CAANMsg` template with message class name: `eo.ejb.cbs.cbsmsg.{svcIf}CBSMsg` |

**Block 4** — [IF/SET] `Set control data on template` (L2086-L2090)

> Sets operator ID, operate date, and operate datetime fields on the `CAANMsg` template.

| # | Type | Code | Business Description |
|---|------|------|---------------------|
| 1 | EXEC | `template.set(JCMConstants.OPERATOR_ID_KEY, param.getControlMapData(SCControlMapKeys.OPERATOR_ID))` | 【オペレータID】Sets operator ID on template [-> CONSTANT: `JCMConstants.OPERATOR_ID_KEY`] |
| 2 | EXEC | `template.set(JCMConstants.OPERATE_DATE_KEY, param.getControlMapData(SCControlMapKeys.OPE_DATE))` | 【運用日付】Sets operate date on template [-> CONSTANT: `JCMConstants.OPERATE_DATE_KEY`, `SCControlMapKeys.OPE_DATE`] |
| 3 | EXEC | `template.set(JCMConstants.OPERATE_DATETIME_KEY, param.getControlMapData(SCControlMapKeys.OPE_TIME))` | 【運用日時】Sets operate datetime on template [-> CONSTANT: `JCMConstants.OPERATE_DATETIME_KEY`, `SCControlMapKeys.OPE_TIME`] |

**Block 5** — [FOR LOOP] `Populate template from mappingData` (L2092-L2103)

> Iterates over all rows in `mappingData`. For each row, if the value (column 1) is an empty string, calls `setNull` on the key (column 0); otherwise calls `set` with the key-value pair. This maps the field-to-value pairs from `mappingData` into the `CAANMsg` template.

| # | Type | Code | Business Description |
|---|------|------|---------------------|
| 1 | SET | `i = 0` | Loop counter initialization |
| 2 | COND | `i < mappingData.length` | Loop condition — continue while i is within mappingData bounds |
| 3 | FOR_BODY | **Block 5.1** | Loop body (Block 5.1 below) |
| 4 | INCREMENT | `i++` | Increment loop counter |

**Block 5.1** — [IF] `Row value empty check` `(i < mappingData.length)` (L2093-L2102)

> For each row in mappingData, check if the value is empty and set NULL or value accordingly.

| # | Type | Code | Business Description |
|---|------|------|---------------------|
| 1 | COND | `"".equals(mappingData[i][1])` | [CONSTANT: `""` (empty string)] — Checks if the value at column 1 is empty |
| 2 | SET (Yes branch) | `template.setNull((String)mappingData[i][0])` | Sets the field (column 0) to NULL in the template — empty values are treated as null in the CBS message |
| 3 | SET (No branch) | `template.set((String)mappingData[i][0], mappingData[i][1])` | Sets the field to its value in the template |

**Block 6** — [IF/SET] `Child list retrieval and initialization` (L2105-L2110)

> Retrieves any existing child message array from the template, or initializes a new one if none exists.

| # | Type | Code | Business Description |
|---|------|------|---------------------|
| 1 | SET | `templateArray = template.getCAANMsgList(inListMsgName)` | Retrieves existing child `CAANMsg` array by message name key from template |
| 2 | COND | `templateArray == null` | [CONSTANT: `null`] — Checks if no existing child array |
| 3 | SET (Yes branch) | `templateArray = new CAANMsg[inList.size()]` | Initializes new array sized to match `inList` count |

**Block 7** — [FOR LOOP] `Populate child templates from inList` (L2112-L2133)

> Iterates over each child data map in `inList`. For each child, gets or creates a `CAANMsg` template, copies all key-value pairs from the child map into the template (treating empty strings as NULL), and stores the populated template in the array.

| # | Type | Code | Business Description |
|---|------|------|---------------------|
| 1 | SET | `i = 0` | Loop counter initialization |
| 2 | COND | `i < inList.size()` | Loop condition — continue while i is within inList bounds |
| 3 | FOR_BODY | **Block 7.1** | Loop body (Block 7.1 below) |
| 4 | INCREMENT | `i++` | Increment loop counter |

**Block 7.1** — [IF] `Child template retrieval` `(i < inList.size())` (L2113-L2118)

> Gets the child data map and existing template (if any). If no existing template, creates a new one with message class `eo.ejb.cbs.cbsmsg.{svcIf}CBSMsg1List`.

| # | Type | Code | Business Description |
|---|------|------|---------------------|
| 1 | SET | `childMap = (HashMap)inList.get(i)` | Retrieves the i-th child data map from inList |
| 2 | SET | `childTemplate = templateArray[i]` | Gets existing child template from the array (may be null) |
| 3 | COND | `childTemplate == null` | [CONSTANT: `null`] — No existing child template |
| 4 | SET (Yes branch) | `childTemplate = new CAANMsg(String.format("eo.ejb.cbs.cbsmsg.%sCBSMsg1List", svcIf))` | Creates new child `CAANMsg` with message class: `eo.ejb.cbs.cbsmsg.{svcIf}CBSMsg1List` |

**Block 7.2** — [WHILE LOOP] `Iterate childMap keys` (L2120-L2130)

> Iterates over all keys in the childMap. For each key-value pair, checks if the value is an empty string and calls `setNull` or `set` accordingly on the childTemplate.

| # | Type | Code | Business Description |
|---|------|------|---------------------|
| 1 | SET | `it = childMap.keySet().iterator()` | Creates iterator over childMap keys |
| 2 | COND | `it.hasNext()` | While there are more keys in childMap |
| 3 | SET (body) | `key = (String)it.next()` | Gets next key from iterator |
| 4 | COND | `"".equals(childMap.get(key))` | [CONSTANT: `""` (empty string)] — Checks if value for this key is empty |
| 5 | SET (Yes branch) | `childTemplate.setNull(key)` | Sets the child template field to NULL |
| 6 | SET (No branch) | `childTemplate.set(key, (String)childMap.get(key))` | Sets the child template field to the value |

**Block 7.3** — [SET] `Store child template in array` (L2132)

| # | Type | Code | Business Description |
|---|------|------|---------------------|
| 1 | SET | `templateArray[i] = childTemplate` | Stores the populated childTemplate back into the array |

**Block 8** — [SET] `List attachment and return` (L2135-L2143)

> Attaches the child list to the main template, wraps the main template in an array, and stores it in `paramMap` for the caller.

| # | Type | Code | Business Description |
|---|------|------|---------------------|
| 1 | EXEC | `template.set(inListMsgName, templateArray)` | Sets the child message array onto the parent template under the key `inListMsgName` |
| 2 | NEW | `templates = new CAANMsg[1]` | Creates a single-element array |
| 3 | SET | `templates[0] = template` | Places the main template as the first (and only) element |
| 4 | EXEC | `paramMap.put(JCMConstants.TEMPLATE_LIST_KEY, templates)` | Stores the template array in paramMap [-> CONSTANT: `JCMConstants.TEMPLATE_LIST_KEY`] |
| 5 | RETURN | `return paramMap` | Returns the completed parameter map to the caller (`callSCArray`) |

## 7. Glossary

| Term | Type | Business Meaning |
|------|------|------------------|
| `IRequestParameterReadWrite` | Interface | Request parameter interface — carries transaction-level and control-level data through the CBS invocation chain |
| `CAANMsg` | Class | CBS message envelope object — represents a message to be sent to a Service Component (SC), with key-value fields and support for nested child message arrays |
| `JCMConstants` | Class | Java Constants for Message — defines constant keys used in `paramMap` and `CAANMsg` operations (transaction ID, usecase ID, operator ID, etc.) |
| `SCControlMapKeys` | Class | Service Component Control Map Keys — defines constant keys for accessing operational metadata from the control map (hostname, IP, screen ID, operator ID, operate date/time) |
| `TRANZACTION_ID_KEY` | Constant | Transaction ID key — identifies the message/transaction in the CBS framework |
| `USECASE_ID_KEY` | Constant | Usecase ID key — identifies the business usecase being executed |
| `OPERATION_ID_KEY` | Constant | Operation ID key — identifies the operation within the usecase |
| `CALL_TYPE_KEY` | Constant | Call type key — distinguishes the type of service call being made |
| `CLIENT_HOST_NAME_KEY` | Constant | Client hostname key — the hostname of the originating system/client |
| `CLIENT_IP_ADDRESS_KEY` | Constant | Client IP address key — the IP address of the originating system/client |
| `INVOKE_GAMEN_ID_KEY` | Constant | Invoke screen ID key — the screen ID from which the operation was initiated |
| `OPERATOR_ID_KEY` | Constant | Operator ID key — the ID of the operator performing the operation |
| `OPERATE_DATE_KEY` | Constant | Operate date key — the operational date for the CBS transaction |
| `OPERATE_DATETIME_KEY` | Constant | Operate datetime key — the operational datetime for the CBS transaction |
| `TEMPLATE_LIST_KEY` | Constant | Template list key — the key used to store the CAANMsg template array in the parameter map |
| `REQ_HOSTNAME` | Constant | Requested hostname control map key |
| `REQ_HOSTIP` | Constant | Requested host IP control map key |
| `REQ_VIEWID` | Constant | Requested screen/view ID control map key |
| `OPE_DATE` | Constant | Operate date control map key |
| `OPE_TIME` | Constant | Operate time control map key |
| `svcIf` | Field | Service Interface name — extracted from `mappingData[0][1]`, used to construct the CBS message template class name |
| `mappingData` | Parameter | Field-to-value mapping array — defines what fields to set in the CBS message template, with empty-string values treated as NULL |
| `inListMsgName` | Parameter | Child message list name key — the key under which the child `CAANMsg[]` array is stored in the parent template |
| `inList` | Parameter | Child data list — a list of key-value maps representing child records/line items to be embedded in the CBS message |
| 電文ID (denwa ID) | Field | Transaction ID — the unique identifier for the CBS message/transaction |
| ユースケースID (yusesukees ID) | Field | Usecase ID — identifies the business usecase context |
| オペレーションID (opereeeshon ID) | Field | Operation ID — identifies the specific operation within the usecase |
| サービス呼び出し区分 (saabisu yobidashi kubun) | Field | Service call classification — distinguishes the type of SC call being made |
| 依存元ホスト名 (izonmoto hostmei) | Field | Source/origin hostname — the hostname of the system initiating the request |
| 依存元IPアドレス (izonmoto IP address) | Field | Source/origin IP address — the IP address of the initiating system |
| 依存元画面ID (izonmoto gamen ID) | Field | Source screen ID — the screen ID of the originating user interface |
| オペレータID (operee ta ID) | Field | Operator ID — the ID of the operator performing the operation |
| 運用日付 (unyou hizuke) | Field | Operational date — the business date for the CBS transaction |
| 運用日時 (unyou nijitsu) | Field | Operational datetime — the business datetime for the CBS transaction |
| eo.ejb.cbs.cbsmsg | Package | Enterprise object EJB CBS message package — the message class naming convention for CBS message templates |
| CBS | Acronym | Central Business System — the core transaction processing system in the K-Opticom architecture |
| SC | Acronym | Service Component — a reusable business logic component invoked through the CBS framework |
| CC | Acronym | Common Component — shared utility component class that provides cross-cutting functionality |
| K-Opticom | Business term | Japanese telecommunications provider — the domain of this customer backbone system |
| eo customer backbone system | Business term | The enterprise system for customer account and contract management in the K-Opticom infrastructure |
