# Business Logic — JKKFmtcelMskmInfoTrkmCC.editResultRP() [123 LOC]

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

## 1. Role

### JKKFmtcelMskmInfoTrkmCC.editResultRP()

This method serves as the **result-post-processing and error-mapping component** called immediately after a Service Component (SC) executes within the K-Opticom customer backbone system (eo customer backbone system). It translates the raw SC return values into a structured, screen-ready format that can be presented to the user in the e-commerce portal.

The method handles **all telecom service lifecycle transaction types** managed by this component — including service contract agreement (EKK0081A010), order content reception registration (EKK0011D020), order detail inquiry/post-processing request (EKK0021C060), optional service contract ISP registration/inquiry/start/agreement (EKK0361 series), service contract cancellation/cancellation confirmation (EKK0351 series), progress registration (EKK1091D010), and billing statement inquiry (EKK0321B002). It uses a **dispatch/routing pattern** based on the template ID returned by the SC.

Its role in the larger system is as a **shared post-processor** called by 12+ `callEKKxxxxxxSC()` dispatcher methods within the same class. It normalizes status codes, resolves Japanese error messages from a configuration catalog, determines the effective status to display (taking the maximum of SC status and BP status), maps error fields from the SC response into the input map, and assembles a consolidated error list via `TemplateErrorUtil`. This allows calling screens to simply read `param` to determine success/failure and error details.

## 2. Processing Pattern (Detailed Business Logic)

```mermaid
flowchart TD
    START(["editResultRP(msgList, param, inMap)"])
    
    START --> EXTRACT["Extract CAANMsg from msgList"]
    EXTRACT --> GET_TEMPLATE["Get template from templates[0]"]
    GET_TEMPLATE --> GET_RETCD["Get return code from msgList"]
    GET_RETCD --> GET_TEMPLID["Get templateId and templateStatus"]
    
    GET_TEMPLID --> CHECK_RETCD{returnCode != 0?}
    CHECK_RETCD -->|Yes| SET_ERR["Set templateStatus = 9000"]
    CHECK_RETCD -->|No| CHECK_MSG{Is RETURN_MESSAGE_<status> null?}
    SET_ERR --> CHECK_MSG
    
    CHECK_MSG -->|Yes| RESET_STATUS["Set templateStatus = 0"]
    CHECK_MSG -->|No| GET_BPSTATUS["Get bpStatus from param control map"]
    RESET_STATUS --> GET_BPSTATUS
    
    GET_BPSTATUS --> BP_NULL{bpStatus object == null?}
    BP_NULL -->|Yes| SET_BP_NEG1["Set bpStatus = -1"]
    BP_NULL -->|No| PARSE_BP["Parse bpStatus from String"]
    SET_BP_NEG1 --> COMPARE_STATUS{templateStatus > bpStatus?}
    PARSE_BP --> COMPARE_STATUS
    
    COMPARE_STATUS -->|Yes| SET_RETURN_CODE["Set RETURN_CODE and RETURN_MESSAGE in param control map"]
    COMPARE_STATUS -->|No| ROUTE_TEMPLATE["Route by templateId"]
    SET_RETURN_CODE --> ROUTE_TEMPLATE
    
    ROUTE_TEMPLATE --> ROUTE_EKK0081{templateId == EKK0081A010?}
    ROUTE_EKK0081 -->|Yes = "EKK0081A010"| SET_EKK0081["contents = EKK0081A010CBSMsg.getContents()"]
    ROUTE_EKK0081 -->|No| ROUTE_EKK0021{templateId == EKK0021C060?}
    ROUTE_EKK0021 -->|Yes = "EKK0021C060"| SET_EKK0021["contents = EKK0021C060CBSMsg.getContents()"]
    ROUTE_EKK0021 -->|No| ROUTE_EKK0361D{templateId == EKK0361D010?}
    ROUTE_EKK0361D -->|Yes = "EKK0361D010"| SET_EKK0361D["contents = EKK0361D010CBSMsg.getContents()"]
    ROUTE_EKK0361D -->|No| ROUTE_EKK0361C3{templateId == EKK0361C030?}
    ROUTE_EKK0361C3 -->|Yes = "EKK0361C030"| SET_EKK0361C3["contents = EKK0361C030CBSMsg.getContents()"]
    ROUTE_EKK0361C3 -->|No| ROUTE_EKK0361C4{templateId == EKK0361C040?}
    ROUTE_EKK0361C4 -->|Yes = "EKK0361C040"| SET_EKK0361C4["contents = EKK0361C040CBSMsg.getContents()"]
    ROUTE_EKK0361C4 -->|No| ROUTE_EKK1091{templateId == EKK1091D010?}
    ROUTE_EKK1091 -->|Yes = "EKK1091D010"| SET_EKK1091["contents = EKK1091D010CBSMsg.getContents()"]
    ROUTE_EKK1091 -->|No| ROUTE_EKK0361A{templateId == EKK0361A010?}
    ROUTE_EKK0361A -->|Yes = "EKK0361A010"| SET_EKK0361A["contents = EKK0361A010CBSMsg.getContents()"]
    ROUTE_EKK0361A -->|No| ROUTE_EKK0351C24{templateId == EKK0351C240?}
    ROUTE_EKK0351C24 -->|Yes = "EKK0351C240"| SET_EKK0351C24["contents = EKK0351C240CBSMsg.getContents()"]
    ROUTE_EKK0351C24 -->|No| ROUTE_EKK0351C25{templateId == EKK0351C250?}
    ROUTE_EKK0351C25 -->|Yes = "EKK0351C250"| SET_EKK0351C25["contents = EKK0351C250CBSMsg.getContents()"]
    ROUTE_EKK0351C25 -->|No| ROUTE_EKK0321{templateId == EKK0321B002?}
    ROUTE_EKK0321 -->|Yes = "EKK0321B002"| SET_EKK0321["contents = EKK0321B002CBSMsg.getContents()"]
    ROUTE_EKK0321 -->|No| ROUTE_EKK0351A{templateId == EKK0351A010?}
    ROUTE_EKK0351A -->|Yes = "EKK0351A010"| SET_EKK0351A["contents = EKK0351A010CBSMsg.getContents()"]
    ROUTE_EKK0351A -->|No| SKIP_CONTENTS["contents remains null"]
    
    SET_EKK0081 --> FOR_LOOP["For loop: i = 0 to contents.length"]
    SET_EKK0021 --> FOR_LOOP
    SET_EKK0361D --> FOR_LOOP
    SET_EKK0361C3 --> FOR_LOOP
    SET_EKK0361C4 --> FOR_LOOP
    SET_EKK1091 --> FOR_LOOP
    SET_EKK0361A --> FOR_LOOP
    SET_EKK0351C24 --> FOR_LOOP
    SET_EKK0351C25 --> FOR_LOOP
    SET_EKK0321 --> FOR_LOOP
    SET_EKK0351A --> FOR_LOOP
    SKIP_CONTENTS --> FOR_LOOP
    
    FOR_LOOP --> GET_ELEMENT["element = contents[i][0]"]
    GET_ELEMENT --> CHECK_ERR{element contains _err?}
    CHECK_ERR -->|No| FOR_NEXT["i++"]
    CHECK_ERR -->|Yes| CHECK_TEMPLATE_NOT_NULL{template.isNull(element)?}
    CHECK_TEMPLATE_NOT_NULL -->|Yes = isNull| FOR_NEXT
    CHECK_TEMPLATE_NOT_NULL -->|No| CHECK_MAP_CONTAINS{inMap.containsKey(element)?}
    CHECK_MAP_CONTAINS -->|Yes| FOR_NEXT
    CHECK_MAP_CONTAINS -->|No| PUT_INMAP["inMap.put(element, template.getString(element))"]
    PUT_INMAP --> FOR_NEXT
    
    FOR_NEXT --> FOR_CHECK{i < contents.length?}
    FOR_CHECK -->|Yes| GET_ELEMENT
    FOR_CHECK -->|No| GET_ERR_LIST["Get errList from param control map"]
    
    GET_ERR_LIST --> ERR_LIST_NULL{errList == null?}
    ERR_LIST_NULL -->|Yes| INIT_ERR_LIST["errList = new ArrayList<Object>()"]
    ERR_LIST_NULL -->|No| CALL_ERR_UTIL["TemplateErrorUtil.getErrorInfo(msgList, errList)"]
    INIT_ERR_LIST --> CALL_ERR_UTIL
    
    CALL_ERR_UTIL --> SET_ERR_MAP["Set ERROR_INFO in param control map"]
    SET_ERR_MAP --> RETURN["Return param"]
    RETURN --> END(["end"])
```

**Conditional Branch Summary:**

| Branch | Condition | Behavior |
|--------|-----------|----------|
| Status Override | `returnCode != 0` | Overwrites template status to 9000 (error state) |
| Message Validation | `RETURN_MESSAGE_<status>` is null | Resets template status to 0 (unknown/valid) |
| BP Status Missing | `bpStatus` object is null | Sets `bpStatus = -1` so SC status always wins |
| Status Priority | `templateStatus > bpStatus` | Updates param with SC status and message |
| Template Routing | 12 possible `templateId` values | Selects the corresponding CBSMsg class to get error field metadata |
| Error Filter | element contains `_err` | Only error fields are mapped back to `inMap` |
| Error Dedup | `!inMap.containsKey(element)` | Prevents overwriting user-entered values with SC errors |

## 3. Parameter Analysis

| No | Parameter Name | Type | Business Description |
|----|---------------|------|---------------------|
| 1 | `msgList` | `Map<?, ?>` | The raw return-value map from the Service Component execution. Contains a `CAANMsg` array under `TEMPLATE_LIST_KEY` (the SC response templates), an integer return code under `RET_CD_INT_KEY`, and per-template data (status, message keys, error field values). This is the canonical SC-to-BP bridge structure. |
| 2 | `param` | `IRequestParameterReadWrite` | The business data read/write interface carrying control map data (return code, return message, error info) and user-entered form data. This is the primary output carrier — the method mutates this object to propagate status and error information back to the calling screen. |
| 3 | `inMap` | `HashMap<String, Object>` | The input parameter map carrying user-entered field values for the current screen. Error fields from the SC response are merged into this map so that error highlights appear on the correct form fields on re-render. |

**Instance Fields Read:** None (this method is purely stateless — it reads no `this.*` fields).

## 4. CRUD Operations / Called Services

| CRUD | SC / CBS | SC Code | Entity / DB | Operation Description |
|------|----------|---------|-------------|----------------------|
| R | `CAANMsg[].get` | (template extraction) | msgList | Reads the CAANMsg template array from msgList [-> TEMPLATE_LIST_KEY] |
| R | `CAANMsg.getString` | (template extraction) | msgList | Reads template ID and status from the first template [-> TEMPLATE_ID_KEY, STATUS_INT_KEY] |
| R | `CAANMsg.getInt` | (template extraction) | msgList | Reads status integer from template |
| R | `CAANMsg.isNull` | (template extraction) | msgList | Checks if an error element has a value in template |
| R | `msgList.get` | (template extraction) | msgList | Reads return code [-> RET_CD_INT_KEY] and template list [-> TEMPLATE_LIST_KEY] |
| - | `JCMAPLConstMgr.getString` | (template extraction) | - | Reads return message catalog to validate/resolve status message |
| R | `param.getControlMapData` | (status extraction) | - | Reads BP-level return code and error info from control map [-> RETURN_CODE, ERROR_INFO] |
| U | `param.setControlMapData` | (status update) | - | Writes return code and return message to control map when SC status > BP status [-> RETURN_CODE, RETURN_MESSAGE] |
| C | `EKK0081A010CBSMsg.getContents` | EKK0081A010 | Service Contract Agreement | Gets error field definitions for service contract agreement (EKK0081A010) |
| C | `EKK0021C060CBSMsg.getContents` | EKK0021C060 | Order Detail Inquiry/Post-Processing | Gets error field definitions for order detail inquiry and post-processing request |
| C | `EKK0361D010CBSMsg.getContents` | EKK0361D010 | Optional Service Contract ISP Registration | Gets error field definitions for ISP registration |
| C | `EKK0361C030CBSMsg.getContents` | EKK0361C030 | Optional Service Contract ISP Inquiry Connection | Gets error field definitions for ISP inquiry connection |
| C | `EKK0361C040CBSMsg.getContents` | EKK0361C040 | Optional Service Contract ISP Start | Gets error field definitions for ISP start |
| C | `EKK1091D010CBSMsg.getContents` | EKK1091D010 | Progress Registration | Gets error field definitions for progress registration |
| C | `EKK0361A010CBSMsg.getContents` | EKK0361A010 | Optional Service Contract ISP Agreement | Gets error field definitions for ISP agreement |
| C | `EKK0351C240CBSMsg.getContents` | EKK0351C240 | Optional Service Contract Cancellation | Gets error field definitions for ISP cancellation |
| C | `EKK0351C250CBSMsg.getContents` | EKK0351C250 | Optional Service Contract Cancellation Confirmation | Gets error field definitions for ISP cancellation confirmation |
| C | `EKK0321B002CBSMsg.getContents` | EKK0321B002 | Billing Statement Inquiry | Gets error field definitions for billing statement inquiry |
| C | `EKK0351A010CBSMsg.getContents` | EKK0351A010 | Optional Service Contract Agreement | Gets error field definitions for ISP agreement (added for internal issue 20130214) |
| U | `inMap.put` | (error mapping) | - | Maps SC error values into the input parameter map for screen display |
| R | `inMap.containsKey` | (error mapping) | - | Checks for existing values to prevent overwriting user-entered data |
| R | `TemplateErrorUtil.getErrorInfo` | (error aggregation) | - | Aggregates error info from msgList and errList |
| U | `param.setControlMapData` | (error info) | - | Sets consolidated ERROR_INFO in control map [-> ERROR_INFO] |

**Note on CRUD classification:** Methods like `EKK0361A010CBSMsg.getContents()` are classified as "C" (Create-like) because they construct a contents array from CBSMsg definitions (field metadata), not because they perform DB inserts. The actual CRUD operations on database tables (INSERT/UPDATE/SELECT/DELETE) happen inside the Service Component (SC) implementations — those are called by the `callEKKxxxxxxSC()` methods upstream, not within `editResultRP` itself. `editResultRP` is purely a post-processing/result-mapping layer.

## 5. Dependency Trace

| # | Caller (Screen/Batch) | Call Chain (Full Path to this Method) | Terminal (SC / CRUD / Entity) |
|---|----------------------|--------------------------------------|-------------------------------|
| 1 | Method: `callEKK0011D020SC` | `callEKK0011D020SC()` -> `editResultRP(msgList, param, inMap)` | `getErrorInfo [R]`, `getString [R]`, `isNull [-]` |
| 2 | Method: `callEKK0021C060SC` | `callEKK0021C060SC()` -> `editResultRP(msgList, param, inMap)` | `getErrorInfo [R]`, `getString [R]`, `isNull [-]` |
| 3 | Method: `callEKK0081A010SC` | `callEKK0081A010SC()` -> `editResultRP(msgList, param, inMap)` | `getErrorInfo [R]`, `getString [R]`, `isNull [-]` |
| 4 | Method: `callEKK0321B002SC` | `callEKK0321B002SC()` -> `editResultRP(msgList, param, inMap)` | `getErrorInfo [R]`, `getString [R]`, `isNull [-]` |
| 5 | Method: `callEKK0351A010SC` | `callEKK0351A010SC()` -> `editResultRP(msgList, param, inMap)` | `getErrorInfo [R]`, `getString [R]`, `isNull [-]` |
| 6 | Method: `callEKK0351C240SC` | `callEKK0351C240SC()` -> `editResultRP(msgList, param, inMap)` | `getErrorInfo [R]`, `getString [R]`, `isNull [-]` |
| 7 | Method: `callEKK0351C250SC` | `callEKK0351C250SC()` -> `editResultRP(msgList, param, inMap)` | `getErrorInfo [R]`, `getString [R]`, `isNull [-]` |
| 8 | Method: `callEKK0361A010SC` | `callEKK0361A010SC()` -> `editResultRP(msgList, param, inMap)` | `getErrorInfo [R]`, `getString [R]`, `isNull [-]` |
| 9 | Method: `callEKK0361C030SC` | `callEKK0361C030SC()` -> `editResultRP(msgList, param, inMap)` | `getErrorInfo [R]`, `getString [R]`, `isNull [-]` |
| 10 | Method: `callEKK0361C040SC` | `callEKK0361C040SC()` -> `editResultRP(msgList, param, inMap)` | `getErrorInfo [R]`, `getString [R]`, `isNull [-]` |
| 11 | Method: `callEKK0361D010SC` | `callEKK0361D010SC()` -> `editResultRP(msgList, param, inMap)` | `getErrorInfo [R]`, `getString [R]`, `isNull [-]` |
| 12 | Method: `callEKK1091D010SC` | `callEKK1091D010SC()` -> `editResultRP(msgList, param, inMap)` | `getErrorInfo [R]`, `getString [R]`, `isNull [-]` |

**Terminal operations reached from this method:** `getErrorInfo` [R] (via `TemplateErrorUtil`), `getString` [R] (via `CAANMsg`, `JCMAPLConstMgr`), `isNull` [-] (via `CAANMsg`, `JACBatCommon`, etc.). No direct database or entity operations occur within this method — all terminal operations are data reads from the SC return map and utility classes.

## 6. Per-Branch Detail Blocks

### Block 1 — [EXTRACT] Template and Return Code Extraction (L1852)

> Extracts the CAANMsg template array and return code from the SC return map.

| # | Type | Code |
|---|------|------|
| 1 | SET | `templates = (CAANMsg[])msgList.get(JCMConstants.TEMPLATE_LIST_KEY)` // SCからの戻り値からCAANMsgを取得 [-> TEMPLATE_LIST_KEY] |
| 2 | SET | `template = templates[0]` |
| 3 | SET | `returnCode = (Integer)msgList.get(JCMConstants.RET_CD_INT_KEY)` // リターンコード取得 [-> RET_CD_INT_KEY] |
| 4 | SET | `templateId = template.getString(JCMConstants.TEMPLATE_ID_KEY)` // テンプレートID取得 [-> TEMPLATE_ID_KEY] |
| 5 | SET | `templateStatus = template.getInt(JCMConstants.STATUS_INT_KEY)` // ステータス取得 [-> STATUS_INT_KEY] |

### Block 2 — [IF] Return Code Error Override (L1863)

> If the SC return code is non-zero, force template status to 9000 (generic error).

| # | Type | Code |
|---|------|------|
| 1 | IF | `returnCode.intValue() != 0` |
| 2 | SET | `templateStatus = 9000` // リターンコードが異常時のステータス強制 |

### Block 3 — [IF] Return Message Validation (L1867)

> If no message catalog entry exists for the current template status, reset status to 0 (treat as valid/unknown).

| # | Type | Code |
|---|------|------|
| 1 | IF | `JCMAPLConstMgr.getString("RETURN_MESSAGE_" + format(templateStatus)) == null` [CONSTANT: RETURN_MESSAGE_<4-digit status>] |
| 2 | SET | `templateStatus = 0` // 有効なメッセージなし場合はステータス0にリセット |

### Block 4 — [IF-ELSE] BP Status Extraction (L1872-L1880)

> Reads the BP-level return code from the param control map. If absent, defaults to -1 so SC status always takes priority.

| # | Type | Code |
|---|------|------|
| 1 | SET | `bpStatus = 0` |
| 2 | SET | `obj = param.getControlMapData(SCControlMapKeys.RETURN_CODE)` [-> RETURN_CODE] |
| 3 | IF | `obj == null` |
| 4 | SET | `bpStatus = -1` // BPステータスなし→SCステータスが優先 |
| 5 | ELSE | |
| 6 | SET | `bpStatus = Integer.parseInt((String)param.getControlMapData(SCControlMapKeys.RETURN_CODE))` |

### Block 5 — [IF] Status Priority and Message Mapping (L1882)

> If the SC template status is higher than the BP status, update the param with the SC status and its associated message. This ensures the SC's authoritative status and error message are propagated.

| # | Type | Code |
|---|------|------|
| 1 | IF | `templateStatus > bpStatus` |
| 2 | SET | `formatStatus = String.format("%1$04d", templateStatus)` // ステータスを4桁文字列にフォーマット |
| 3 | SET | `message = JCMAPLConstMgr.getString("RETURN_MESSAGE_" + formatStatus)` // 対応する日本語メッセージを取得 |
| 4 | EXEC | `param.setControlMapData(SCControlMapKeys.RETURN_CODE, formatStatus)` [-> RETURN_CODE] |
| 5 | EXEC | `param.setControlMapData(SCControlMapKeys.RETURN_MESSAGE, message)` [-> RETURN_MESSAGE] |

### Block 6 — [IF-ELSE IF-ELSE IF] Template ID Dispatch (L1892-L1939)

> Dispatches to the appropriate CBSMsg class based on the template ID returned by the SC. Each CBSMsg class defines the error field names for its transaction type via `getContents()`. This is the core routing mechanism.

| # | Type | Code |
|---|------|------|
| 1 | IF-ELSE | `templateId` dispatch (12 branches, `contents` defaults to `null`) |
| 1.1 | IF | `EKK0081A010.equals(templateId)` [= "EKK0081A010" - Service Contract Agreement] |
| 1.1.1 | SET | `contents = new EKK0081A010CBSMsg().getContents()` |
| 1.2 | ELSE-IF | `EKK0021C060.equals(templateId)` [= "EKK0021C060" - Order Detail Inquiry/Post-Processing] |
| 1.2.1 | SET | `contents = new EKK0021C060CBSMsg().getContents()` |
| 1.3 | ELSE-IF | `EKK0361D010.equals(templateId)` [= "EKK0361D010" - Optional Service Contract ISP Registration] |
| 1.3.1 | SET | `contents = new EKK0361D010CBSMsg().getContents()` |
| 1.4 | ELSE-IF | `EKK0361C030.equals(templateId)` [= "EKK0361C030" - Optional Service Contract ISP Inquiry Connection] |
| 1.4.1 | SET | `contents = new EKK0361C030CBSMsg().getContents()` |
| 1.5 | ELSE-IF | `EKK0361C040.equals(templateId)` [= "EKK0361C040" - Optional Service Contract ISP Start] |
| 1.5.1 | SET | `contents = new EKK0361C040CBSMsg().getContents()` |
| 1.6 | ELSE-IF | `EKK1091D010.equals(templateId)` [= "EKK1091D010" - Progress Registration] |
| 1.6.1 | SET | `contents = new EKK1091D010CBSMsg().getContents()` |
| 1.7 | ELSE-IF | `EKK0361A010.equals(templateId)` [= "EKK0361A010" - Optional Service Contract ISP Agreement] |
| 1.7.1 | SET | `contents = new EKK0361A010CBSMsg().getContents()` |
| 1.8 | ELSE-IF | `EKK0351C240.equals(templateId)` [= "EKK0351C240" - Optional Service Contract Cancellation] |
| 1.8.1 | SET | `contents = new EKK0351C240CBSMsg().getContents()` |
| 1.9 | ELSE-IF | `EKK0351C250.equals(templateId)` [= "EKK0351C250" - Optional Service Contract Cancellation Confirmation] |
| 1.9.1 | SET | `contents = new EKK0351C250CBSMsg().getContents()` |
| 1.10 | ELSE-IF | `EKK0321B002.equals(templateId)` [= "EKK0321B002" - Billing Statement Inquiry] |
| 1.10.1 | SET | `contents = new EKK0321B002CBSMsg().getContents()` |
| 1.11 | ELSE-IF | `EKK0351A010.equals(templateId)` [= "EKK0351A010" - Optional Service Contract Agreement] |
| 1.11.1 | SET | `contents = new EKK0351A010CBSMsg().getContents()` |
| 1.12 | ELSE | contents remains `null` |

### Block 7 — [FOR] Error Field Mapping (L1940-L1954)

> Iterates through the CBSMsg contents array (error field metadata). For each element whose name contains "_err", if the template has a non-null value for that element and the inMap doesn't already contain it, the error value from the template is written into inMap. This ensures that SC-reported errors are mapped back to the correct form fields for display, while not overwriting user-entered data.

| # | Type | Code |
|---|------|------|
| 1 | FOR | `i = 0; contents != null && i < contents.length; i++` |
| 2 | SET | `element = (String)contents[i][0]` // エラーフィールド名を取得 |
| 3 | IF | `element.indexOf("_err") > 0` // エラーフィールドのみ対象 |
| 3.1 | IF | `!template.isNull(element)` // テンプレートに値が存在する場合 |
| 3.1.1 | IF | `!inMap.containsKey(element)` // 既にinMapに値がない場合 (重複防止) |
| 3.1.1.1 | SET | `inMap.put(element, template.getString(element))` // エラー値をinMapに格納 |

### Block 8 — [IF-ELSE] Error List Initialization (L1956-L1960)

> Retrieves the existing error list from the param control map. If null, initializes a new empty ArrayList.

| # | Type | Code |
|---|------|------|
| 1 | SET | `errList = (ArrayList<Object>)param.getControlMapData(SCControlMapKeys.ERROR_INFO)` [-> ERROR_INFO] |
| 2 | IF | `errList == null` |
| 3 | SET | `errList = new ArrayList<Object>()` |

### Block 9 — [EXEC] Error Info Consolidation (L1963)

> Calls the `TemplateErrorUtil.getErrorInfo()` utility to merge error information from the msgList and the errList into a consolidated error info structure, then writes it back to the param control map.

| # | Type | Code |
|---|------|------|
| 1 | EXEC | `param.setControlMapData(SCControlMapKeys.ERROR_INFO, TemplateErrorUtil.getErrorInfo(msgList, errList))` [-> ERROR_INFO] |

### Block 10 — [RETURN] (L1965)

| # | Type | Code |
|---|------|------|
| 1 | RETURN | `return param` // 業務データ取得・書込用I/Fを返却 |

## 7. Glossary

| Term | Type | Business Meaning |
|------|------|------------------|
| `editResultRP` | Method | Result Post-processing — maps SC return data to IRequestParameterReadWrite |
| CAANMsg | Class | Fujitsu's message object base class holding key-value pairs from SC responses |
| SC | Acronym | Service Component — a pluggable business service unit (e.g., EKK0081A010SC) that executes core telecom operations |
| CBS | Acronym | Common Business Service — the layer containing message classes (CBSMsg) that define field structures for SC I/O |
| BP | Acronym | Business Process / Backbone — the e-commerce application layer orchestrating SC calls |
| msgList | Field | Return-value map from SC execution containing templates and return codes |
| param | Field | IRequestParameterReadWrite — the business data read/write interface carrying screen data and control map |
| inMap | Field | Input parameter HashMap carrying user-entered values for the current form |
| TEMPLATE_LIST_KEY | Constant | Key in msgList holding the CAANMsg array from the SC |
| RET_CD_INT_KEY | Constant | Key in msgList holding the integer return code from the SC |
| TEMPLATE_ID_KEY | Constant | Key in CAANMsg holding the template identifier (e.g., "EKK0081A010") |
| STATUS_INT_KEY | Constant | Key in CAANMsg holding the status integer from the SC |
| RETURN_CODE | Constant | Control map key for storing the return code in param |
| RETURN_MESSAGE | Constant | Control map key for storing the human-readable status message in param |
| ERROR_INFO | Constant | Control map key for storing the consolidated error info list in param |
| RETURN_MESSAGE_NNNN | Constant | Configuration key prefix for status-to-message mapping (e.g., RETURN_MESSAGE_0000, RETURN_MESSAGE_9000) |
| EKK0081A010 | Constant | Service Contract Agreement — customer signs/accepts a telecom service contract |
| EKK0011D020 | Constant | Order Content Reception Registration — registers the details of a service order |
| EKK0021C060 | Constant | Order Detail Inquiry/Post-Processing Request — queries order details or requests post-order processing |
| EKK0361D010 | Constant | Optional Service Contract <ISP> Registration — registers an optional ISP service contract |
| EKK0361C030 | Constant | Optional Service Contract <ISP> Inquiry Connection — connects an ISP inquiry session |
| EKK0361C040 | Constant | Optional Service Contract <ISP> Start — starts the ISP service |
| EKK0361A010 | Constant | Optional Service Contract <ISP> Agreement — customer agrees to an ISP contract |
| EKK0351C240 | Constant | Optional Service Contract Cancellation — initiates cancellation of an ISP service contract |
| EKK0351C250 | Constant | Optional Service Contract Cancellation Confirmation — confirms a previously initiated cancellation |
| EKK0321B002 | Constant | Billing Statement Inquiry (Contract Number/Service Contract Number) — queries billing statements |
| EKK0351A010 | Constant | Optional Service Contract Agreement — customer agrees to an optional service contract |
| EKK1091D010 | Constant | Progress Registration — registers the progress/status of a service order |
| `_err` | Field suffix | Naming convention for error fields in CBSMsg contents arrays (e.g., `field_name_err`) |
| `JCMAPLConstMgr.getString` | Utility | Reads a localized message string from the application constant catalog by key |
| `TemplateErrorUtil.getErrorInfo` | Utility | Aggregates error information from SC response templates into a consolidated error list |
| `IRequestParameterReadWrite` | Interface | Business data read/write interface — carries form data, control map, and error state between BP and screens |
| `AbstractCommonComponent` | Class | Base class for common components in the Fujitsu BPM framework (x21.cc package) |
| eo | Acronym | e-Opticom — the K-Opticom e-commerce customer backbone system |
| K-Opticom | Business term | Japanese telecommunications provider (subsidary of KDDI) offering fiber, DSL, and mobile services |
| FTTH | Business term | Fiber To The Home — fiber-optic broadband internet service offered by K-Opticom |
| ISP | Business term | Internet Service Provider — optional internet access service |
| DSL | Business term | Digital Subscriber Line — copper-line broadband internet service |
| 課金判定 | Business term | Billing determination — the `runHiChrgJdgUtil` method (adjacent in source) performs non-standard billing judgment |
| ファセット情報 | Business term | Facet/element registration info — the class JKKFmtcelMskmInfoTrkmCC handles facet information registration |
