---
# Business Logic — JKKKisnUwHmdkAddCC.editInMsg() [226 LOC]

| Field | Value |
|-------|-------|
| Fully Qualified Name | `com.fujitsu.futurity.bp.custom.common.JKKKisnUwHmdkAddCC` |
| Layer | CC / Common Component (Package: `com.fujitsu.futurity.bp.custom.common`) |
| Module | `common` (Package: `com.fujitsu.futurity.bp.custom.common`) |

## 1. Role

### JKKKisnUwHmdkAddCC.editInMsg()

This method is a **message template factory and router** for the e-Opticom (eo) Customer Base System, responsible for constructing CAANMsg template structures that serve as input envelopes for downstream Service Component (SC) calls. It performs two core responsibilities: (1) gathering transaction-level metadata (tranzaction ID, usecase ID, operation ID, call type, client hostname, client IP, screen ID, operator ID) from the `IRequestParameterReadWrite` parameter and the control map, and embedding them into a return HashMap; and (2) building a structured CAANMsg template based on a service interface discriminator (`svcIf`), then routing into one of five processing branches depending on the target SC template.

The method handles **six distinct service types** (EKK0011D020, EKK0251C050, EKK1091D010, EKKA0020003, EKKA0020004, and a default catch-all), each representing a different telecom business operation: FTTH authorization registration with post-processing requests, service contract line usage suspension, progress/advance registration, home device agreement confirmation, and device location number changes. It implements a **dispatch/routing design pattern**, using the `svcIf` string as a discriminator to select the appropriate template-building path. For most service types, the method processes a list of child records (provided as the last row of `mappingData`) by iterating over their schema keys (excluding error keys ending in `_err`) and populating a child CAANMsg array. For EKK0011D020 specifically, only a single child element is supported (fixed-size array of one), reflecting its specialized single-record nature.

Its **role in the larger system** is that of a shared common component utility (`*CC` naming convention) — it is not a screen entry point itself but is called by other CBS methods (e.g., `callSC()`) to prepare and structure the input message envelope before handing it off to the ServiceComponentRequestInvoker for remote SC invocation. The method ensures that all required control metadata, top-level template fields, and child record data are correctly assembled into the hierarchical CAANMsg structure expected by the target SC.

## 2. Processing Pattern (Detailed Business Logic)

```mermaid
flowchart TD
    START(["editInMsg params"])

    START --> SET1["Set paramMap: tranzaction ID usecase ID operation ID call type"]
    SET1 --> SET2["Set paramMap: client host IP screen ID operator ID"]
    SET2 --> EXTRACT["Extract svcIf from mappingData[0][1]"]
    EXTRACT --> CREATE_T["Create CAANMsg template from svcIf"]
    CREATE_T --> SETMSG["Call setMsgAll template"]
    SETMSG --> SETFIELDS["Set operator ID operate date operate datetime"]
    SETFIELDS --> CHECK["svcIf constant check"]

    CHECK --> BR_0011["EKK0011D020 branch"]
    CHECK --> BR_0251["EKK0251C050 branch"]
    CHECK --> BR_1091["EKK1091D010 branch"]
    CHECK --> BR_A003["EKKA0020003 branch"]
    CHECK --> BR_A004["EKKA0020004 branch"]
    CHECK --> BR_DEFAULT["Default branch"]

    BR_0011 --> L_0011["Loop mappingData for top-level setMsgVal"]
    L_0011 --> G_0011["Get CAANMsgList from template"]
    G_0011 --> C_0011["Initialize single-element templateArray"]
    C_0011 --> CHILD_0011["Process single childTemplate setMsgAll set schema keys"]
    CHILD_0011 --> S_0011["Set child template back into template"]
    S_0011 --> JOIN_0011["End branch"]

    BR_0251 --> L_0251["Loop mappingData for top-level setMsgVal"]
    L_0251 --> X_0251["Extract list from last mappingData row"]
    X_0251 --> G_0251["Get CAANMsgList from template"]
    G_0251 --> INIT_0251["Initialize templateArray sized to list"]
    INIT_0251 --> CHILD_0251["Child loop: map each list item to childTemplate schema keys"]
    CHILD_0251 --> S_0251["Set child templates back into template"]
    S_0251 --> JOIN_0251["End branch"]

    BR_1091 --> L_1091["Loop mappingData for top-level setMsgVal"]
    L_1091 --> X_1091["Extract list from last mappingData row"]
    X_1091 --> G_1091["Get CAANMsgList from template"]
    G_1091 --> CHILD_1091["Child loop: map each list item to childTemplate schema keys"]
    CHILD_1091 --> S_1091["Set child templates back into template"]
    S_1091 --> JOIN_1091["End branch"]

    BR_A003 --> L_A003["Loop mappingData for top-level setMsgVal"]
    L_A003 --> X_A003["Extract list from last mappingData row"]
    X_A003 --> G_A003["Get CAANMsgList from template"]
    G_A003 --> CHILD_A003["Child loop: map each list item to childTemplate schema keys"]
    CHILD_A003 --> S_A003["Set child templates back into template"]
    S_A003 --> JOIN_A003["End branch"]

    BR_A004 --> L_A004["Loop mappingData for top-level setMsgVal"]
    L_A004 --> X_A004["Extract list from last mappingData row"]
    X_A004 --> G_A004["Get CAANMsgList from template"]
    G_A004 --> CHILD_A004["Child loop: map each list item to childTemplate schema keys"]
    CHILD_A004 --> S_A004["Set child templates back into template"]
    S_A004 --> JOIN_A004["End branch"]

    BR_DEFAULT --> L_DEF["Loop full mappingData for setMsgVal"]
    L_DEF --> JOIN_DEF["End branch"]

    JOIN_0011 --> WRAP["Wrap template in CAANMsg array"]
    JOIN_0251 --> WRAP
    JOIN_1091 --> WRAP
    JOIN_A003 --> WRAP
    JOIN_A004 --> WRAP
    JOIN_DEF --> WRAP

    WRAP --> PUT["paramMap put TEMPLATE_LIST_KEY"]
    PUT --> RET["Return paramMap"]
    RET --> FINISH(["Return HashMap"])
```

**CRITICAL — Constant Resolution:**

| Constant | Resolved Value | Business Meaning |
|----------|---------------|------------------|
| `TEMPLATE_ID_EKK0011D020` | `"EKK0011D020"` | FTTH Auth Registration with post-processing service request |
| `TEMPLATE_ID_EKK0251C050` | `"EKK0251C050"` | Service Contract Line Usage Suspension |
| `TEMPLATE_ID_EKK1091D010` | `"EKK1091D010"` | Progress/Advance Registration |
| `TEMPLATE_ID_EKKA0020003` | `"EKKA0020003"` | Home Device Agreement Confirmation (4) |
| `TEMPLATE_ID_EKKA0020004` | `"EKKA0020004"` | Device Location Number Change |

## 3. Parameter Analysis

| No | Parameter Name | Type | Business Description |
|----|---------------|------|---------------------|
| 1 | `param` | `IRequestParameterReadWrite` | The request parameter envelope carrying transaction-level metadata (tranzaction ID, usecase ID, operation ID, call type) and control map data (client hostname, client IP, screen/view ID, operator ID, operation date/time). This is the standard request wrapper used throughout the eo customer base system for all CBS operations. |
| 2 | `mappingData` | `Object[][]` | A two-dimensional array that acts as a key-value mapping table for template fields. The first row `[0][1]` contains the service interface discriminator (`svcIf`). Rows `[0..length-2][0]` and `[0..length-2][1]` contain field names and their corresponding values for top-level template population. The last row `[length-1][1]` optionally contains an `ArrayList<HashMap>` of child records for multi-row service contract line data. The last row `[length-1][0]` is unused (a null key). |

**External state / instance fields read:** None directly. The method relies entirely on the input parameters and internally called helper methods (`setMsgAll`, `setMsgVal`) which may operate on instance state within `JKKKisnUwHmdkAddCC`.

## 4. CRUD Operations / Called Services

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

| CRUD | SC / CBS | SC Code | Entity / DB | Operation Description |
|------|----------|---------|-------------|----------------------|
| R | `JKKejbCallTypeChecker.getCallType` | - | - | Reads call type classification from the request parameter (Read) |
| R | `SCW00701SFLogic.getName` | - | - | Retrieves a name value from the service framework logic (Read) |

### Detailed analysis of method calls within `editInMsg`:

| CRUD | SC / CBS | SC Code | Entity / DB | Operation Description |
|------|----------|---------|-------------|----------------------|
| - | `JKKKisnUwHmdkAddCC.setMsgAll` | - | - | Sets all empty values on a CAANMsg template — internal helper for template initialization |
| - | `JKKKisnUwHmdkAddCC.setMsgVal` | - | - | Sets individual message values into a CAANMsg template by key-value pairs — internal helper for field population |
| R | `IRequestParameterReadWrite.getTelegramID` | - | - | Reads the transaction/tranzaction ID from the request envelope |
| R | `IRequestParameterReadWrite.getUsecaseID` | - | - | Reads the usecase ID from the request envelope |
| R | `IRequestParameterReadWrite.getOperationID` | - | - | Reads the operation ID from the request envelope |
| R | `IRequestParameterReadWrite.getCallType` | - | - | Reads the service call type discriminator from the request envelope |
| R | `IRequestParameterReadWrite.getControlMapData` | - | - | Reads control map values: client hostname, client IP, screen ID, operator ID, operation date, operation datetime |
| - | `CAANMsg.<constructor>` (String format) | - | - | Creates a new CAANMsg template instance loaded from a resource bundle keyed by the service interface string |
| R | `CAANMsg.getCAANMsgList` | - | - | Retrieves a pre-populated array of child CAANMsg objects from the template by list key |
| - | `CAANMsg.set` | - | - | Sets a field value on the CAANMsg template (operator ID, operate date, operate datetime, child template array) |
| R | `CAANMsg.getSchema().getSchemaKeySet` | - | - | Reads the schema key set from a child template to iterate over all expected fields |

## 5. Dependency Trace

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

No screen/batch entry points found within 8 hops. Direct callers found: 2 methods.
Terminal operations from this method: `setMsgVal` [-], `setMsgVal` [-], `getName` [R], `setMsgVal` [-], `setMsgVal` [-], `getName` [R], `setMsgVal` [-], `setMsgVal` [-], `getName` [R], `setMsgVal` [-], `setMsgVal` [-], `getName` [R], `setMsgVal` [-], `setMsgAll` [-], `getName` [R], `setMsgVal` [-], `setMsgAll` [-], `getCallType` [R]

| # | Caller (Screen/Batch) | Call Chain (Full Path to this Method) | Terminal (SC / CRUD / Entity) |
|---|----------------------|--------------------------------------|-------------------------------|
| 1 | CBS: JKKKisnUwHmdkAddCC.callSC() | `callSC()` -> `editInMsg(param, mappingData)` | `setMsgVal` [-], `setMsgAll` [-], `setMsgVal` [-], `getName` [R] |

The method is called internally by `callSC()` within the same class (`JKKKisnUwHmdkAddCC`), which serves as the CBS entry point for service contract line addition/modification operations. No direct screen or batch entry points were found within 8 hops.

## 6. Per-Branch Detail Blocks

**Block 1** — [SET] `(Extract transaction metadata from param)` (L1102-L1113)

> Collects transaction-level metadata from the `IRequestParameterReadWrite` parameter and populates the return HashMap with the key fields required by the SC infrastructure.

| # | Type | Code |
|---|------|------|
| 1 | SET | `paramMap.put(JCMConstants.TRANZACTION_ID_KEY, param.getTelegramID())` // Transaction/tranzaction ID from request [-> JCMConstants.TRANZACTION_ID_KEY] |
| 2 | SET | `paramMap.put(JCMConstants.USECASE_ID_KEY, param.getUsecaseID())` // Usecase ID from request [-> JCMConstants.USECASE_ID_KEY] |
| 3 | SET | `paramMap.put(JCMConstants.OPERATION_ID_KEY, param.getOperationID())` // Operation ID from request [-> JCMConstants.OPERATION_ID_KEY] |
| 4 | SET | `paramMap.put(JCMConstants.CALL_TYPE_KEY, param.getCallType())` // Service call type discriminator [-> JCMConstants.CALL_TYPE_KEY] |

**Block 2** — [SET] `(Extract control map data from param)` (L1115-L1123)

> Reads control map values from the request parameter — these carry runtime context such as client hostname, client IP address, originating screen ID, and operator ID.

| # | Type | Code |
|---|------|------|
| 1 | SET | `paramMap.put(JCMConstants.CLIENT_HOST_NAME_KEY, param.getControlMapData(SCControlMapKeys.REQ_HOSTNAME))` // Client hostname [-> JCMConstants.CLIENT_HOST_NAME_KEY] |
| 2 | SET | `paramMap.put(JCMConstants.CLIENT_IP_ADDRESS_KEY, param.getControlMapData(SCControlMapKeys.REQ_HOSTIP))` // Client IP address [-> JCMConstants.CLIENT_IP_ADDRESS_KEY] |
| 3 | SET | `paramMap.put(JCMConstants.INVOKE_GAMEN_ID_KEY, param.getControlMapData(SCControlMapKeys.REQ_VIEWID))` // Invoking screen ID [-> JCMConstants.INVOKE_GAMEN_ID_KEY] |
| 4 | SET | `paramMap.put(JCMConstants.OPERATOR_ID_KEY, param.getControlMapData(SCControlMapKeys.OPERATOR_ID))` // Operator ID [-> JCMConstants.OPERATOR_ID_KEY] |

**Block 3** — [SET] `(Extract svcIf service interface discriminator)` (L1125)

> Extracts the service interface string from the first row of `mappingData` to determine which SC template path to follow.

| # | Type | Code |
|---|------|------|
| 1 | SET | `svcIf = (String) mappingData[0][1]` // Service interface identifier, selects template and processing branch |

**Block 4** — [CREATE + CALL] `(Create and initialize CAANMsg template)` (L1127-L1128)

> Creates a new CAANMsg template instance loaded from a resource bundle using a convention-based resource key pattern `{base}.{svcIf}CBSMsg`, then initializes all its fields to empty values.

| # | Type | Code |
|---|------|------|
| 1 | CREATE | `template = new CAANMsg(String.format("eo.ejb.cbs.cbsmsg.%sCBSMsg", svcIf))` // Creates template from resource bundle |
| 2 | CALL | `setMsgAll(template)` // Internal helper: sets all fields in template to empty/null values |

**Block 5** — [SET] `(Set template metadata fields)` (L1130-L1136)

> Sets operator ID, operation date, and operation datetime on the template — standard fields required by all SC message templates.

| # | Type | Code |
|---|------|------|
| 1 | SET | `template.set(JCMConstants.OPERATOR_ID_KEY, param.getControlMapData(SCControlMapKeys.OPERATOR_ID))` // Operator ID on template |
| 2 | SET | `template.set(JCMConstants.OPERATE_DATE_KEY, param.getControlMapData(SCControlMapKeys.OPE_DATE))` // Operation date [-> JCMConstants.OPERATE_DATE_KEY] |
| 3 | SET | `template.set(JCMConstants.OPERATE_DATETIME_KEY, param.getControlMapData(SCControlMapKeys.OPE_TIME))` // Operation datetime [-> JCMConstants.OPERATE_DATETIME_KEY] |

**Block 6** — [IF] `(TEMPLATE_ID_EKK0011D020 = "EKK0011D020" — FTTH Auth Registration)` [ODR_NAIYO_CD="101"] (L1138-L1159)

> Processes the EKK0011D020 service type: FTTH Auth Registration with post-processing service requests. This branch uses a single-element child template array, reflecting that FTTH auth is a single-record operation. It populates the top-level template fields, then initializes a single child template and sets it back.

| # | Type | Code |
|---|------|------|
| 1 | IF | `TEMPLATE_ID_EKK0011D020.equals(svcIf)` // [-> "EKK0011D020"] FTTH Auth Registration |
| 2 | FOR | `for (int i = 0; i < mappingData.length - 1; i++)` // Iterate all rows except the last one |
| 3 | CALL | `setMsgVal(template, (String) mappingData[i][0], (String) mappingData[i][1])` // Populate template field |
| 4 | CALL | `template.getCAANMsgList(EKK0011D020CBSMsg.EKK0011D020CBSMSG1LIST)` // Get child message array |
| 5 | IF | `templateArray == null` |
| 6 | SET | `templateArray = new CAANMsg[1]` // Fixed single-element array for FTTH auth |
| 7 | SET | `childTemplate = templateArray[0]` |
| 8 | IF | `childTemplate == null` |
| 9 | CREATE | `childTemplate = new CAANMsg(EKK0011D020CBSMsg1List.class.getName())` // Single child template |
| 10 | CALL | `setMsgAll(childTemplate)` // Initialize all child fields to empty |
| 11 | SET | `templateArray[0] = childTemplate` |
| 12 | SET | `template.set(EKK0011D020CBSMsg.EKK0011D020CBSMSG1LIST, templateArray)` |

**Block 7** — [ELSE-IF] `(TEMPLATE_ID_EKK0251C050 = "EKK0251C050" — Service Contract Line Usage Suspension)` (L1161-L1198)

> Processes the EKK0251C050 service type: Service Contract Line Usage Suspension. This branch handles a variable-length list of child records (service contract lines to suspend). The last row of `mappingData` contains an ArrayList of HashMaps, each representing a child record with schema keys as field names.

| # | Type | Code |
|---|------|------|
| 1 | ELSE-IF | `TEMPLATE_ID_EKK0251C050.equals(svcIf)` // [-> "EKK0251C050"] Service Contract Line Usage Suspension |
| 2 | FOR | `for (int i = 0; i < mappingData.length - 1; i++)` // Iterate top-level fields |
| 3 | CALL | `setMsgVal(template, (String) mappingData[i][0], (String) mappingData[i][1])` |
| 4 | SET | `list = (ArrayList) mappingData[mappingData.length - 1][1]` // Child record list from last row |
| 5 | CALL | `template.getCAANMsgList(EKK0251C050CBSMsg.EKK0251C050CBSMSG1LIST)` |
| 6 | IF | `templateArray == null` |
| 7 | SET | `templateArray = new CAANMsg[list.size()]` // Sized to child list |
| 8 | FOR | `for (int i = 0; i < list.size(); i++)` // Iterate child records |
| 9 | SET | `map = (HashMap) list.get(i)` |
| 10 | SET | `childTemplate = templateArray[i]` |
| 11 | IF | `childTemplate == null` |
| 12 | CREATE | `childTemplate = new CAANMsg(EKK0251C050CBSMsg1List.class.getName())` |
| 13 | FOR | `Iterator<String> msgKey = childTemplate.getSchema().getSchemaKeySet().iterator()` |
| 14 | WHILE | `msgKey.hasNext()` |
| 15 | SET | `key = msgKey.next()` |
| 16 | IF | `!key.endsWith("_err")` // Skip error keys |
| 17 | CALL | `setMsgVal(childTemplate, key, (String) map.get(key))` |
| 18 | SET | `templateArray[i] = childTemplate` |
| 19 | SET | `template.set(EKK0251C050CBSMsg.EKK0251C050CBSMSG1LIST, templateArray)` |

**Block 8** — [ELSE-IF] `(TEMPLATE_ID_EKK1091D010 = "EKK1091D010" — Progress/Advance Registration)` (L1200-L1237)

> Processes the EKK1091D010 service type: Progress/Advance Registration (shinpen touroku). Identical structural pattern to the EKK0251C050 branch — iterates over a variable-length child list, populates child templates from schema keys, and excludes error keys.

| # | Type | Code |
|---|------|------|
| 1 | ELSE-IF | `TEMPLATE_ID_EKK1091D010.equals(svcIf)` // [-> "EKK1091D010"] Progress Registration |
| 2 | FOR | `for (int i = 0; i < mappingData.length - 1; i++)` |
| 3 | CALL | `setMsgVal(template, (String) mappingData[i][0], (String) mappingData[i][1])` |
| 4 | SET | `list = (ArrayList) mappingData[mappingData.length - 1][1]` |
| 5 | CALL | `template.getCAANMsgList(EKK1091D010CBSMsg.EKK1091D010CBSMSG1LIST)` |
| 6 | IF | `templateArray == null` |
| 7 | SET | `templateArray = new CAANMsg[list.size()]` |
| 8 | FOR | `for (int i = 0; i < list.size(); i++)` |
| 9 | SET | `map = (HashMap) list.get(i)` |
| 10 | SET | `childTemplate = templateArray[i]` |
| 11 | IF | `childTemplate == null` |
| 12 | CREATE | `childTemplate = new CAANMsg(EKK1091D010CBSMsg1List.class.getName())` |
| 13 | FOR | `Iterator<String> msgKey = childTemplate.getSchema().getSchemaKeySet().iterator()` |
| 14 | WHILE | `msgKey.hasNext()` |
| 15 | SET | `key = msgKey.next()` |
| 16 | IF | `!key.endsWith("_err")` |
| 17 | CALL | `setMsgVal(childTemplate, key, (String) map.get(key))` |
| 18 | SET | `templateArray[i] = childTemplate` |
| 19 | SET | `template.set(EKK1091D010CBSMsg.EKK1091D010CBSMSG1LIST, templateArray)` |

**Block 9** — [ELSE-IF] `(TEMPLATE_ID_EKKA0020003 = "EKKA0020003" — Home Device Agreement Confirmation)` (L1239-L1276)

> Processes the EKKA0020003 service type: Home Device Agreement Confirmation (taken). Same structural pattern as Block 8 — variable-length child records from the last row of `mappingData`.

| # | Type | Code |
|---|------|------|
| 1 | ELSE-IF | `TEMPLATE_ID_EKKA0020003.equals(svcIf)` // [-> "EKKA0020003"] Home Device Agreement Confirmation (4) |
| 2 | FOR | `for (int i = 0; i < mappingData.length - 1; i++)` |
| 3 | CALL | `setMsgVal(template, (String) mappingData[i][0], (String) mappingData[i][1])` |
| 4 | SET | `list = (ArrayList) mappingData[mappingData.length - 1][1]` |
| 5 | CALL | `template.getCAANMsgList(EKKA0020003CBSMsg.EKKA0020003CBSMSG1LIST)` |
| 6 | IF | `templateArray == null` |
| 7 | SET | `templateArray = new CAANMsg[list.size()]` |
| 8 | FOR | `for (int i = 0; i < list.size(); i++)` |
| 9 | SET | `map = (HashMap) list.get(i)` |
| 10 | SET | `childTemplate = templateArray[i]` |
| 11 | IF | `childTemplate == null` |
| 12 | CREATE | `childTemplate = new CAANMsg(EKKA0020003CBSMsg1List.class.getName())` |
| 13 | FOR | `Iterator<String> msgKey = childTemplate.getSchema().getSchemaKeySet().iterator()` |
| 14 | WHILE | `msgKey.hasNext()` |
| 15 | SET | `key = msgKey.next()` |
| 16 | IF | `!key.endsWith("_err")` |
| 17 | CALL | `setMsgVal(childTemplate, key, (String) map.get(key))` |
| 18 | SET | `templateArray[i] = childTemplate` |
| 19 | SET | `template.set(EKKA0020003CBSMsg.EKKA0020003CBSMSG1LIST, templateArray)` |

**Block 10** — [ELSE-IF] `(TEMPLATE_ID_EKKA0020004 = "EKKA0020004" — Device Location Number Change)` (L1278-L1315)

> Processes the EKKA0020004 service type: Device Location Number Change (kiki basho bangou henkou). Identical structural pattern to Blocks 8 and 9.

| # | Type | Code |
|---|------|------|
| 1 | ELSE-IF | `TEMPLATE_ID_EKKA0020004.equals(svcIf)` // [-> "EKKA0020004"] Device Location Number Change |
| 2 | FOR | `for (int i = 0; i < mappingData.length - 1; i++)` |
| 3 | CALL | `setMsgVal(template, (String) mappingData[i][0], (String) mappingData[i][1])` |
| 4 | SET | `list = (ArrayList) mappingData[mappingData.length - 1][1]` |
| 5 | CALL | `template.getCAANMsgList(EKKA0020004CBSMsg.EKKA0020004CBSMSG1LIST)` |
| 6 | IF | `templateArray == null` |
| 7 | SET | `templateArray = new CAANMsg[list.size()]` |
| 8 | FOR | `for (int i = 0; i < list.size(); i++)` |
| 9 | SET | `map = (HashMap) list.get(i)` |
| 10 | SET | `childTemplate = templateArray[i]` |
| 11 | IF | `childTemplate == null` |
| 12 | CREATE | `childTemplate = new CAANMsg(EKKA0020004CBSMsg1List.class.getName())` |
| 13 | FOR | `Iterator<String> msgKey = childTemplate.getSchema().getSchemaKeySet().iterator()` |
| 14 | WHILE | `msgKey.hasNext()` |
| 15 | SET | `key = msgKey.next()` |
| 16 | IF | `!key.endsWith("_err")` |
| 17 | CALL | `setMsgVal(childTemplate, key, (String) map.get(key))` |
| 18 | SET | `templateArray[i] = childTemplate` |
| 19 | SET | `template.set(EKKA0020004CBSMsg.EKKA0020004CBSMSG1LIST, templateArray)` |

**Block 11** — [ELSE] `(Default: catch-all branch)` (L1317-L1322)

> The default branch handles any service interface that does not match the five specific types. It processes ALL rows of `mappingData` (including the last row) with `setMsgVal`, treating them as simple key-value pairs without child template array creation. This is the simplest path — no child template arrays, no list extraction.

| # | Type | Code |
|---|------|------|
| 1 | ELSE | Catch-all for unmatched svcIf values |
| 2 | FOR | `for (int i = 0; i < mappingData.length; i++)` // Iterates ALL rows (no -1 offset) |
| 3 | CALL | `setMsgVal(template, (String) mappingData[i][0], (String) mappingData[i][1])` |

**Block 12** — [SET + RETURN] `(Wrap and return result)` (L1324-L1326)

> After all branches converge, the template is wrapped in a single-element `CAANMsg[]` array and placed into `paramMap` under the template list key, then the complete parameter map is returned for downstream use.

| # | Type | Code |
|---|------|------|
| 1 | SET | `templates = new CAANMsg[1]` |
| 2 | SET | `templates[0] = template` |
| 3 | SET | `paramMap.put(JCMConstants.TEMPLATE_LIST_KEY, templates)` [-> JCMConstants.TEMPLATE_LIST_KEY] |
| 4 | RETURN | `return paramMap` // HashMap<String, Object> containing all metadata and the structured template array |

## 7. Glossary

| Term | Type | Business Meaning |
|------|------|------------------|
| `svcIf` | Field | Service Interface discriminator — a string key that identifies the target SC service type and determines which template-building path to follow |
| `mappingData` | Field | Two-dimensional mapping array carrying key-value pairs for template field population; first row contains the service interface, last row may contain child records |
| CAANMsg | Technical | Fujitsu's canonical message abstraction — a hierarchical key-value message object with schema support, used as the standardized input/output format for SC (Service Component) calls in the eo customer base system |
| EKK0011D020 | SC Code | FTTH Auth Registration — Service Component for registering fiber-to-the-home authentication with optional post-processing service requests |
| EKK0251C050 | SC Code | Service Contract Line Usage Suspension — handles suspending usage of one or more service contract lines |
| EKK1091D010 | SC Code | Progress/Advance Registration (shinpen touroku) — registers progress/advance order information |
| EKKA0020003 | SC Code | Home Device Agreement Confirmation (4) — confirms agreement for home devices |
| EKKA0020004 | SC Code | Device Location Number Change (kiki basho bangou henkou) — changes the location number assigned to a device |
| `EKK*_CBSMSG*LIST` | Constant | CAANMsg list key constants used to get/set child message arrays in the template hierarchy |
| tranzaction ID | Field | Transaction identifier from the request envelope (note: spelled "tranzaction" in JCMConstants) |
| usecase ID | Field | Usecase identifier for routing and tracking within the BPM framework |
| operation ID | Field | Operation identifier for the specific business operation being performed |
| call type | Field | Service call type discriminator (e.g., synchronous/asynchronous, service category) |
| REQ_HOSTNAME | Constant | Control map key for client hostname |
| REQ_HOSTIP | Constant | Control map key for client IP address |
| REQ_VIEWID | Constant | Control map key for originating screen/view ID |
| OPERATOR_ID | Constant | Control map key for the operator ID |
| OPE_DATE | Constant | Control map key for operation date |
| OPE_TIME | Constant | Control map key for operation datetime |
| `_err` suffix | Convention | Schema key naming convention indicating error fields; these keys are excluded from child template population |
| SC | Abbreviation | Service Component — a backend business logic module invoked via the ServiceComponentRequestInvoker |
| CBS | Abbreviation | Call Back Service / CBS Message — the service component message infrastructure in the eo system |
| eo | Abbreviation | e-Opticom — Fujitsu's telecom customer base management system |
| FTTH | Business term | Fiber To The Home — fiber-optic broadband internet service |
| Template ID | Business term | A string identifier that determines which resource bundle and CAANMsg schema to load for a given SC |
