
# Business Logic — JKKWribSvcKeiOperateCC.editErrorInfo() [2891 LOC]

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

## 1. Role

### JKKWribSvcKeiOperateCC.editErrorInfo()

This method serves as the **centralized error-response mapper** between service component processing and the business parameter layer. After a business process component (BPC) invokes a Service Component (SC) or Business Component Server (CBS), this method reads error information from the SC's CAANMsg template array and writes it into the caller's IRequestParameterReadWrite data map, so that screen-level code can display appropriate error messages.

It implements a **routing/dispatch pattern** — a single method with 20+ conditional branches that select which CBS message class to use based on the service type identifier (`svcIf`). This allows many different screens (KKSV0004, KKSV0229, KKSV0231, etc. — over 80 screen-level BP checks) to reuse one consistent error-mapping mechanism regardless of which specific CBS was executed.

The method performs three responsibilities in sequence: (1) determining the highest-priority status level between the template and the business process, (2) initializing the inMap work area from the param's data store, and (3) dispatching to the appropriate CBS-specific error-field mapper based on the service type. Each CBS branch maps between 2 and 30+ individual error fields from the CBS message template into the param's data map, including support for nested child-list mappings (array-type error details).

The method is a **shared utility** called by CBS check methods (`invokeCheck()`) across 15+ screen-specific BP check classes (KKSV0229 through KKSV0240, KKSV0910 through KKSV0916) and is also called internally by `JKKWribSvcKeiOperateCC.editResultRP()`. It is a critical integration point in the telecom service contract order fulfillment domain.

## 2. Processing Pattern (Detailed Business Logic)

```mermaid
flowchart TD
    START(["editErrorInfo param templates returnCode mapName"])
    STEP1["Extract template from templates 0
Extract templateStatus from template"]
    STEP2{returnCode != 0?}
    STEP3["Set templateStatus = 9000"]
    STEP4{Is RETURN_MESSAGE_ formatStatus
known in constants?}
    STEP5["Set templateStatus = 0"]
    STEP6["Get bpStatus from param control map
Get RETURN_CODE"]
    STEP7{templateStatus > bpStatus?}
    STEP8["Format status as 4-digit string
Get message from constants
Set RETURN_CODE and RETURN_MESSAGE
on control map"]
    STEP9["Initialize inMap from param.getData mapName"]
    STEP10{svcIf == EKK0011D020?
Submitted Content Acceptance Registration}
    STEP11["Map 30+ error fields from EKK0011D020CBSMsg
Process nested EKK0011D020CBSMsg1List 20+ fields"]
    STEP12{svcIf == EKK0021A010?
Submission Detail Consent}
    STEP13["Map 2 error fields from EKK0021A010CBSMsg"]
    STEP14{svcIf == EKK0021C060?
Submission Detail Verification}
    STEP15["Map 12 error fields from EKK0021C060CBSMsg"]
    STEP16{svcIf == EKK0081A010?
Service Contract Consent}
    STEP17["Map 8 error fields from EKK0081A010CBSMsg"]
    STEP18{svcIf == EKK0451C020?
Discount Service Contract Cancellation}
    STEP19["Map 13 error fields from EKK0451C020CBSMsg"]
    STEP20{svcIf == EKK0451D010?
Discount Service Contract Registration}
    STEP21["Map 12 error fields from EKK0451D010CBSMsg
Process nested EKK0451D010CBSMsg1List 9 fields"]
    STEP22{svcIf == EKK1091D010?
Advancement Registration}
    STEP23["Map 18 error fields from EKK1091D010CBSMsg
Process nested EKK1091D010CBSMsg1List 2 fields"]
    STEP24{svcIf == EKK1351A010?
Data Extraction Item Consent}
    STEP25["Map 6 error fields from EKK1351A010CBSMsg"]
    STEP26{svcIf == EKK1391D010?
Data Extraction Item Setting Registration}
    STEP27["Map 14 error fields from EKK1391D010CBSMsg"]
    STEP28{svcIf == EKK0451C050?
Discount Service Contract Recovery}
    STEP29["Map 5 error fields from EKK0451C050CBSMsg"]
    STEP30{svcIf == EKK1681B001?
Disadvantaged Reservation List}
    STEP31["Map 8 error fields from EKK1681B001CBSMsg"]
    STEP32["Return param IRequestParameterReadWrite"]
    END([End])
    START --> STEP1 --> STEP2
    STEP2 -->|Yes| STEP3 --> STEP4
    STEP2 -->|No| STEP4
    STEP4 -->|Yes| STEP6
    STEP4 -->|No| STEP5 --> STEP6
    STEP6 --> STEP7
    STEP7 -->|Yes| STEP8 --> STEP9
    STEP7 -->|No| STEP9
    STEP9 --> STEP10
    STEP10 -->|Yes| STEP11 --> STEP32
    STEP10 -->|No| STEP12
    STEP12 -->|Yes| STEP13 --> STEP32
    STEP12 -->|No| STEP14
    STEP14 -->|Yes| STEP15 --> STEP32
    STEP14 -->|No| STEP16
    STEP16 -->|Yes| STEP17 --> STEP32
    STEP16 -->|No| STEP18
    STEP18 -->|Yes| STEP19 --> STEP32
    STEP18 -->|No| STEP20
    STEP20 -->|Yes| STEP21 --> STEP32
    STEP20 -->|No| STEP22
    STEP22 -->|Yes| STEP23 --> STEP32
    STEP22 -->|No| STEP24
    STEP24 -->|Yes| STEP25 --> STEP32
    STEP24 -->|No| STEP26
    STEP26 -->|Yes| STEP27 --> STEP32
    STEP26 -->|No| STEP28
    STEP28 -->|Yes| STEP29 --> STEP32
    STEP28 -->|No| STEP30
    STEP30 -->|Yes| STEP31 --> STEP32
    STEP30 -->|No| STEP32
    STEP32 --> END
```

**Processing flow detail:**

1. **Template extraction** (L12046-12048): Extracts the first element from the `templates` CAANMsg array. The method assumes `templates[0]` always exists (no bounds check).

2. **Status code resolution** (L12048-12060): The template's STATUS is read. If `returnCode != 0` (non-zero = error path), status is overridden to 9000. Then the method checks if `RETURN_MESSAGE_<status>` is registered in the constant manager (`JCMAPLConstMgr`); if not, status is reset to 0. This ensures only valid, configured status codes propagate.

3. **Return code propagation** (L12062-12074): The business process status (`bpStatus`) is retrieved from the param's control map. If the template's status is higher (worse) than the bpStatus, the template's formatted 4-digit status and its human-readable message are written to the control map, overriding the business process status.

4. **inMap initialization** (L12076-12082): The data map identified by `mapName` is obtained from the param. If null, a fresh HashMap is created and registered. This is the destination for all error field mappings.

5. **Service-type dispatch** (L12084-L14933): The method contains 25+ `else if` branches, each comparing `svcIf` against a constant-defined service type string. Each branch maps CBS-specific error fields from the CAANMsg template into the inMap. Some branches (EKK0011D020, EKK0451D010, EKK1091D010) also process nested child-list arrays (`getCAANMsgList`) for multi-record error details.

## 3. Parameter Analysis

| No | Parameter Name | Type | Business Description |
|----|---------------|------|---------------------|
| 1 | `param` | `IRequestParameterReadWrite` | The business data context object that carries both input parameters and output results between screens and business logic. Contains a control map (for return codes/messages), a mapping work area, and named data maps (`mapName`) for CBS-specific fields. |
| 2 | `templates` | `CAANMsg[]` | Array of CBS message templates populated by the service component after processing. Each CAANMsg contains error fields (accessed via `getString`, `isNull`, `getInt`) that represent field-level error information from the CBS. `templates[0]` is always used. |
| 3 | `returnCode` | `int` | The return code from the service component execution. A value of 0 indicates success; any non-zero value signals an error condition that should override the template's status to 9000 (general error). |
| 4 | `mapName` | `String` | The key identifying which data map within `param` to use for storing error fields. This is typically the CBS short name or screen-specific data map identifier. |

**External/instance state read:**
- `JCMAPLConstMgr.getString(...)` — reads message constants from the application's internationalization/constant management system
- Static constants `WRIBSVK_OPERATE_CC_EKK*` — 20+ service-type identifier constants defined within the same class (e.g., `WRIBSVK_OPERATE_CC_EKK0011D020 = "EKK0011D020"`)

## 4. CRUD Operations / Called Services

This method does not perform any direct database CRUD. All data operations are performed through **CAANMsg template access** (Read-like operations) — extracting string/integer data from the CBS response templates and writing them into the parameter map.

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

| CRUD | SC / CBS | SC Code | Entity / DB | Operation Description |
|------|----------|---------|-------------|----------------------|
| - | `template.getInt(EKK0451B005CBSMsg.STATUS)` | EKK0451B005CBSMsg | - | Reads STATUS field from CAANMsg template to determine error severity level |
| - | `JCMAPLConstMgr.getString("RETURN_MESSAGE_" + ...)` | JCMAPLConstMgr | - | Reads return message text from constant manager for human-readable error messages |
| - | `param.getControlMapData(SCControlMapKeys.RETURN_CODE)` | SCControlMapKeys | - | Reads existing BP-level return code from control map for status comparison |
| - | `param.setControlMapData(...)` | SCControlMapKeys | - | Writes formatted status code and human-readable message to control map |
| - | `param.getMappingWorkArea()` | param | - | Retrieves the mapping work area; creates new HashMap if null |
| - | `param.setData(mapName, inMap)` | param | - | Writes/initializes the data map if it was null |
| - | `param.getData(mapName)` | param | - | Reads data map from param by mapName key |
| - | `template.getString(EKK0011D020CBSMsg.SYSID_ERR)` | EKK0011D020CBSMsg | - | Reads SYSID error field from CBS response template |
| - | `template.getString(EKK0011D020CBSMsg.MSKM_SBT_CD_ERR)` | EKK0011D020CBSMsg | - | Reads submission type code error from CBS template |
| - | `template.getString(EKK0011D020CBSMsg.MSKMSHO_ARIV_YMD_ERR)` | EKK0011D020CBSMsg | - | Reads submission arrival date error from CBS template |
| - | `template.getCAANMsgList(EKK0011D020CBSMsg.EKK0011D020CBSMSG1LIST)` | EKK0011D020CBSMsg | - | Reads nested child list array for detail-level error fields |
| - | `childTemplate.getString(EKK0011D020CBSMsg1List.MSKMSHO_NO_ERR)` | EKK0011D020CBSMsg1List | - | Reads submission document number error from nested child template |
| - | `template.getString(EKK0451D010CBSMsg.SYSID_ERR)` | EKK0451D010CBSMsg | - | Reads SYSID error field from discount service contract registration template |
| - | `template.getCAANMsgList(EKK0451D010CBSMsg.EKK0451D010CBSMSG1LIST)` | EKK0451D010CBSMsg | - | Reads nested child list for discount contract detail items |
| - | `childTemplate.getString(EKK0451D010CBSMsg1List.TG_KEI_SKBT_CD_ERR)` | EKK0451D010CBSMsg1List | - | Reads target contract type code from nested discount contract detail |
| - | `template.getString(EKK1091D010CBSMsg.MSKM_DTL_NO_ERR)` | EKK1091D010CBSMsg | - | Reads advancement registration detail number error |
| - | `template.getCAANMsgList(EKK1091D010CBSMsg.EKK1091D010CBSMSG1LIST)` | EKK1091D010CBSMsg | - | Reads nested child list for advancement error detail reasons |
| - | `childTemplate.getString(EKK1091D010CBSMsg1List.IDO_RSN_CD_ERR)` | EKK1091D010CBSMsg1List | - | Reads error reason code from nested advancement detail |
| - | `template.getString(EKK0451C020CBSMsg.WRIB_SVC_KEI_NO_ERR)` | EKK0451C020CBSMsg | - | Reads discount service contract number for cancellation |
| - | `template.getString(EKK0451C020CBSMsg.SVC_ENDYMD_ERR)` | EKK0451C020CBSMsg | - | Reads service end date for cancellation |
| - | `template.getString(EKK0451C020CBSMsg.PNLTY_HASSEI_CD_ERR)` | EKK0451C020CBSMsg | - | Reads penalty occurrence code from cancellation response |
| - | `template.getString(EKK1391D010CBSMsg.DCHSKM_CD_ERR)` | EKK1391D010CBSMsg | - | Reads data extraction item code from setting registration template |

## 5. Dependency Trace

### Direct callers:

| # | Caller (Screen/Batch) | Call Chain (Full Path to this Method) | Terminal (SC / CRUD / Entity) |
|---|----------------------|--------------------------------------|-------------------------------|
| 1 | Screen:KKSV0229 | `KKSV0229_KKSV0229OPBPCheck.invokeCheck()` -> `JKKWribSvcKeiOperateCC.editErrorInfo()` | `template.getString [*] error fields` |
| 2 | Screen:KKSV0231 | `KKSV0231_KKSV0231OPBPCheck.invokeCheck()` -> `JKKWribSvcKeiOperateCC.editErrorInfo()` | `template.getString [*] error fields` |
| 3 | Screen:KKSV0233 | `KKSV0233_KKSV0233OPBPCheck.invokeCheck()` -> `JKKWribSvcKeiOperateCC.editErrorInfo()` | `template.getString [*] error fields` |
| 4 | Screen:KKSV0234 | `KKSV0234_KKSV0234OPBPCheck.invokeCheck()` -> `JKKWribSvcKeiOperateCC.editErrorInfo()` | `template.getString [*] error fields` |
| 5 | Screen:KKSV0237 | `KKSV0237_KKSV0237OPBPCheck.invokeCheck()` -> `JKKWribSvcKeiOperateCC.editErrorInfo()` | `template.getString [*] error fields` |
| 6 | Screen:KKSV0238 | `KKSV0238_KKSV0238OPBPCheck.invokeCheck()` -> `JKKWribSvcKeiOperateCC.editErrorInfo()` | `template.getString [*] error fields` |
| 7 | Screen:KKSV0239 | `KKSV0239_KKSV0239OPBPCheck.invokeCheck()` -> `JKKWribSvcKeiOperateCC.editErrorInfo()` | `template.getString [*] error fields` |
| 8 | Screen:KKSV0240 | `KKSV0240_KKSV0240OPBPCheck.invokeCheck()` -> `JKKWribSvcKeiOperateCC.editErrorInfo()` | `template.getString [*] error fields` |
| 9 | Screen:KKSV0910 | `KKSV0910_KKSV0910OPBPCheck.invokeCheck()` -> `JKKWribSvcKeiOperateCC.editErrorInfo()` | `template.getString [*] error fields` |
| 10 | Screen:KKSV0912 | `KKSV0912_KKSV0912OPBPCheck.invokeCheck()` -> `JKKWribSvcKeiOperateCC.editErrorInfo()` | `template.getString [*] error fields` |
| 11 | Screen:KKSV0913 | `KKSV0913_KKSV0913OPBPCheck.invokeCheck()` -> `JKKWribSvcKeiOperateCC.editErrorInfo()` | `template.getString [*] error fields` |
| 12 | Screen:KKSV0914 | `KKSV0914_KKSV0914OPBPCheck.invokeCheck()` -> `JKKWribSvcKeiOperateCC.editErrorInfo()` | `template.getString [*] error fields` |
| 13 | Screen:KKSV0915 | `KKSV0915_KKSV0915OPBPCheck.invokeCheck()` -> `JKKWribSvcKeiOperateCC.editErrorInfo()` | `template.getString [*] error fields` |
| 14 | Screen:KKSV0916 | `KKSV0916_KKSV0916OPBPCheck.invokeCheck()` -> `JKKWribSvcKeiOperateCC.editErrorInfo()` | `template.getString [*] error fields` |
| 15 | Internal:JKKWribSvcKeiOperateCC | `editResultRP()` -> `JKKWribSvcKeiOperateCC.editErrorInfo()` | `template.getString [*] error fields` |

**Terminal operations from this method:** `template.getString` [R] for each error field, `template.getInt` [R] for STATUS, `template.getCAANMsgList` [R] for nested arrays, `template.isNull` [R] for null checks, `JCMAPLConstMgr.getString` [-] for message lookup, `param.setData` [-] for map assignment, `param.setControlMapData` [-] for return code setting.

## 6. Per-Branch Detail Blocks

**Block 1** — INITIALIZATION `(template extraction & status resolution)` (L12046)

> Extracts the template and resolves the status code. If returnCode is non-zero, overrides to 9000. Validates status against constant manager.

| # | Type | Code | Business Description |
|---|------|------|---------------------|
| 1 | SET | `CAANMsg template = templates[0]` | Extract first element from template array |
| 2 | SET | `int templateStatus = template.getInt(EKK0451B005CBSMsg.STATUS)` | Get status code from template |
| 3 | IF | `returnCode != 0` [returnCode != 0 = true means error] | Check if caller signaled an error |
| 4 | SET | `templateStatus = 9000` | Override status to generic error |
| 5 | IF | `JCMAPLConstMgr.getString("RETURN_MESSAGE_" + formatStatus) == null` | Check if status message is registered |
| 6 | SET | `templateStatus = 0` | Reset to 0 if no message exists |

**Block 2** — RETURN_CODE_PROPAGATION `(bpStatus comparison and control map update)` (L12062)

> Compares the template's status against the business process's stored status and propagates the higher (worse) one.

| # | Type | Code | Business Description |
|---|------|------|---------------------|
| 1 | SET | `Object obj = param.getControlMapData(SCControlMapKeys.RETURN_CODE)` | Read existing BP return code |
| 2 | IF | `obj == null` | Check if bpStatus not set |
| 3 | SET | `bpStatus = -1` | Default bpStatus to -1 if missing |
| 4 | ELSE | `bpStatus = Integer.parseInt(...)` | Parse stored bpStatus from string |
| 5 | IF | `templateStatus > bpStatus` | Template has higher priority error |
| 6 | SET | `String formatStatus = String.format("%1$04d", templateStatus)` | Format as 4-digit zero-padded |
| 7 | SET | `String message = JCMAPLConstMgr.getString("RETURN_MESSAGE_" + formatStatus)` | Get human-readable message |
| 8 | EXEC | `param.setControlMapData(SCControlMapKeys.RETURN_CODE, formatStatus)` | Store status code in control map |
| 9 | EXEC | `param.setControlMapData(SCControlMapKeys.RETURN_MESSAGE, message)` | Store message in control map |

**Block 3** — INMAP_INITIALIZATION `(data map preparation)` (L12076)

> Initializes the work map and the data map identified by mapName.

| # | Type | Code | Business Description |
|---|------|------|---------------------|
| 1 | SET | `Map workMap = (Map)param.getMappingWorkArea()` | Get or create mapping work area |
| 2 | IF | `workMap == null` | Check if work area is missing |
| 3 | SET | `workMap = new HashMap()` | Create new HashMap |
| 4 | EXEC | `param.setMappingWorkArea(workMap)` | Register work area |
| 5 | SET | `inMap = (HashMap)param.getData(mapName)` | Get data map by mapName |
| 6 | IF | `inMap == null` | Check if data map is missing |
| 7 | SET | `inMap = new HashMap()` | Create new HashMap |
| 8 | EXEC | `param.setData(mapName, inMap)` | Register data map |

**Block 4** — DISPATCH_BRANCH_EKK0011D020 `(Submitted Content Acceptance Registration)` (L12084)

> Service type: `WRIBSVK_OPERATE_CC_EKK0011D020 = "EKK0011D020"` (Submitted Content Acceptance Registration / 申請内容承認登録)
> Maps 30+ top-level error fields from EKK0011D020CBSMsg plus 20+ nested fields from EKK0011D020CBSMsg1List.
> This is the largest branch, handling errors for FTTH/service contract order submission content.

| # | Type | Code | Business Description |
|---|------|------|---------------------|
| 1 | IF | `svcIf == WRIBSVK_OPERATE_CC_EKK0011D020` [EKK0011D020 = "EKK0011D020"] | Match submitted content acceptance registration |
| 2 | IF | `!template.isNull(EKK0011D020CBSMsg.SYSID_ERR)` | Read SYSID error if present |
| 3 | IF | `!inMap.containsKey("sysid_err")` | Avoid overwriting existing value |
| 4 | SET | `inMap.put("sysid_err", template.getString(...))` | Map SYSID error field |
| 5-60 | ... | (Repeat for each of 30+ CBS error fields: MSKM_SBT_CD_ERR, MSKMSHO_ARIV_YMD_ERR, MSKM_UK_DTM_ERR, MSKM_UK_TNT_USER_ID_ERR, MSKM_YMD_ERR, TTL_BUSINESS_CENTER_UK_NO_ERR, TTL_BUSINESS_MSKM_OPT_CD_ERR, MSKM_RRKS_TELNO_ERR, MSKM_JSSIS_SBT_CD_ERR, CUST_YOBO_JIKO_ERR, TEL_RRK_KIBOD_SBT_CD_ERR, TEL_RRK_KIBO_TIME_CD_ERR, TAKCHO_KIBOD_SBT_CD_ERR, TAKCHO_KIBO_TIME_CD_ERR, KARI_MSKM_FLG_ERR, REFERER_ERR, KEPCO_CUSTINFO_JUJU_DOI_UM_ERR, SHOSA_BF_RRK_JIKO_YH_ERR, SHOSA_BF_RRK_JIKO_ERR, USE_SVC_KEIZK_SBT_CD_ERR, CONSMBSN_MSKM_STAT_SKBT_CD_ERR, UK_TNTSHA_SKBT_CD_ERR, KOJI_REQ_INFO_RRK_JIKO_ERR, MSKM_ROUTE_SKBT_CD_ERR) | Each maps one error field from template to inMap |
| 61 | SET | `inList = (ArrayList)inMap.get("EKK0011D020CBSMsg1List")` | Get or create nested list |
| 62 | IF | `inList == null` | Initialize nested list if absent |
| 63 | SET | `inList = new ArrayList()` | Create new ArrayList |
| 64 | EXEC | `inMap.put("EKK0011D020CBSMsg1List", inList)` | Register nested list |
| 65 | SET | `templateArray = template.getCAANMsgList(EKK0011D020CBSMsg.EKK0011D020CBSMSG1LIST)` | Get nested child message array |
| 66 | FOR | `i = 0; i < templateArray.length; i++` | Iterate over nested children |
| 67 | IF | `i >= inList.size()` | Ensure list has room for child |
| 68 | SET | `inList.add(new HashMap())` | Add empty child map |
| 69 | SET | `HashMap childMap = (HashMap)inList.get(i)` | Get child map at index i |
| 70 | SET | `CAANMsg childTemplate = templateArray[i]` | Get child template |
| 71-95 | IF | `!childTemplate.isNull(EKK0011D020CBSMsg1List.MSKMSHO_NO_ERR)` etc. | Map 20+ nested error fields |
| 96 | IF | `!template.isNull(EKK0011D020CBSMsg.EKK0011D020CBSMSG1LIST_ERR)` | Map list-level error |
| 97 | SET | `inMap.put("EKK0011D020CBSMsg1List_err", ...)` | Store list error string |

**Block 5** — DISPATCH_BRANCH_EKK0021A010 `(Submission Detail Consent / 申請詳細同意照会)` (L~12810)

> Service type: `WRIBSVK_OPERATE_CC_EKK0021A010 = "EKK0021A010"`
> Maps 2 error fields: KEY_MSKM_DTL_NO_ERR and KEY_GENE_ADD_DTM_ERR.

| # | Type | Code | Business Description |
|---|------|------|---------------------|
| 1 | IF | `svcIf == WRIBSVK_OPERATE_CC_EKK0021A010` [EKK0021A010 = "EKK0021A010"] | Match submission detail consent |
| 2 | IF | `!template.isNull(EKK0021A010CBSMsg.KEY_MSKM_DTL_NO_ERR)` | Read submission detail number error |
| 3 | SET | `inMap.put("key_mskm_dtl_no_err", template.getString(...))` | Map detail number error |
| 4 | IF | `!template.isNull(EKK0021A010CBSMsg.KEY_GENE_ADD_DTM_ERR)` | Read generation timestamp error |
| 5 | SET | `inMap.put("key_gene_add_dtm_err", template.getString(...))` | Map generation timestamp error |

**Block 6** — DISPATCH_BRANCH_EKK0021C060 `(Submission Detail Verification & Post-Processing / 申請詳細照会・後続業務依頼)` (L~12836)

> Service type: `WRIBSVK_OPERATE_CC_EKK0021C060 = "EKK0021C060"`
> Maps 12 error fields: MSKM_DTL_NO_ERR, RRK_JIKO_ADD_DTM_ERR, KZKWRK_REQYMD_ERR, RRK_JIKO_ERR, UPD_DTM_BF_ERR, IDO_DIV_ERR, TELNO_ERR, DAIHYO_TELNO_ERR, TELNO_USE_PLACE_NO_ERR, SIP_USER_ID_DEL_ZUMI_FLG_ERR, TEL_BAS_HOST_ID_ERR, N_050_OP_TELNO_ERR, KIKI_NINSHO_ID_ERR, KIKI_NINSHO_ID_PWD_ERR.

| # | Type | Code | Business Description |
|---|------|------|---------------------|
| 1 | IF | `svcIf == WRIBSVK_OPERATE_CC_EKK0021C060` [EKK0021C060 = "EKK0021C060"] | Match detail verification |
| 2-23 | IF | `!template.isNull(EKK0021C060CBSMsg.*)` | Read each of 14 error fields |
| 24 | SET | `inMap.put(*_err, ...)` | Map each to inMap |

**Block 7** — DISPATCH_BRANCH_EKK0081A010 `(Service Contract Consent / サービス契約同意照会)` (L~12900)

> Service type: `WRIBSVK_OPERATE_CC_EKK0081A010 = "EKK0081A010"`
> Maps 8 error fields: SEARCH_TYPE_ERR, MAX_SEARCH_NUM_ERR, DISPLAY_NUM_ERR, DISPLAY_PAGE_NUM_ERR, KEY_SVC_KEI_NO_ERR, KEY_GENE_ADD_DTM_ERR, KEY_RSV_APLY_YMD_ERR.

| # | Type | Code | Business Description |
|---|------|------|---------------------|
| 1 | IF | `svcIf == WRIBSVK_OPERATE_CC_EKK0081A010` [EKK0081A010 = "EKK0081A010"] | Match service contract consent |
| 2-8 | IF | `!template.isNull(EKK0081A010CBSMsg.*)` | Read each error field |
| 9-15 | SET | `inMap.put(*_err, ...)` | Map each to inMap |

**Block 8** — DISPATCH_BRANCH_EKK0451C020 `(Discount Service Contract Cancellation / 割引サービス契約解約)` (L~13064)

> Service type: `WRIBSVK_OPERATE_CC_EKK0451C020 = "EKK0451C020"`
> Maps 13 error fields including WRIB_SVC_KEI_NO_ERR, RSV_TSTA_KIBO_YMD_ERR, SVC_ENDYMD_ERR, SVC_CHRG_ENDYMD_ERR, SVC_DSL_YMD_ERR, SVC_DLRE_CD_ERR, SVC_DLRE_MEMO_ERR, PNLTY_HASSEI_CD_ERR, IDO_DIV_ERR, and additional fields for discount cancellation workflow.

| # | Type | Code | Business Description |
|---|------|------|---------------------|
| 1 | IF | `svcIf == WRIBSVK_OPERATE_CC_EKK0451C020` [EKK0451C020 = "EKK0451C020"] | Match discount contract cancellation |
| 2-20 | IF | `!template.isNull(EKK0451C020CBSMsg.*)` | Read each error field |
| 21-39 | SET | `inMap.put(*_err, ...)` | Map each to inMap |

**Block 9** — DISPATCH_BRANCH_EKK0451D010 `(Discount Service Contract Registration / 割引サービス契約登録)` (L~13374)

> Service type: `WRIBSVK_OPERATE_CC_EKK0451D010 = "EKK0451D010"`
> Maps 12 top-level error fields plus 9 nested fields from EKK0451D010CBSMsg1List (target contract details).
> This branch handles nested multi-record data for discount service contract registration.

| # | Type | Code | Business Description |
|---|------|------|---------------------|
| 1 | IF | `svcIf == WRIBSVK_OPERATE_CC_EKK0451D010` [EKK0451D010 = "EKK0451D010"] | Match discount registration |
| 2-17 | IF | `!template.isNull(EKK0451D010CBSMsg.*)` | Read top-level error fields (SYSID, WRIB_SVC_CD, PCR_S_CD, PPLAN_CD, etc.) |
| 18 | SET | `inList = (ArrayList)inMap.get("EKK0451D010CBSMsg1List")` | Initialize nested list |
| 19 | SET | `templateArray = template.getCAANMsgList(EKK0451D010CBSMsg.EKK0451D010CBSMSG1LIST)` | Get nested array |
| 20-35 | FOR | `i = 0; i < templateArray.length` | Iterate nested children |
| 36-45 | IF | `!childTemplate.isNull(EKK0451D010CBSMsg1List.TG_KEI_SKBT_CD_ERR)` etc. | Map 9 nested fields per child |
| 46 | IF | `!template.isNull(EKK0451D010CBSMsg.EKK0451D010CBSMSG1LIST_ERR)` | Map list-level error |

**Block 10** — DISPATCH_BRANCH_EKK1091D010 `(Advancement Registration / 進捗登録)` (L~13908)

> Service type: `WRIBSVK_OPERATE_CC_EKK1091D010 = "EKK1091D010"`
> Maps 18 top-level error fields plus 2 nested fields from EKK1091D010CBSMsg1List (error detail reasons).

| # | Type | Code | Business Description |
|---|------|------|---------------------|
| 1 | IF | `svcIf == WRIBSVK_OPERATE_CC_EKK1091D010` [EKK1091D010 = "EKK1091D010"] | Match advancement registration |
| 2-15 | IF | `!template.isNull(EKK1091D010CBSMsg.*)` | Read error fields (MSKM_DTL_NO, SEIKY_KEI_NO, SVC_KEI_NO, etc.) |
| 16 | SET | `inList = (ArrayList)inMap.get("EKK1091D010CBSMsg1List")` | Initialize nested list |
| 17 | SET | `templateArray = template.getCAANMsgList(EKK1091D010CBSMsg.EKK1091D010CBSMSG1LIST)` | Get nested array |
| 18-21 | IF | `!childTemplate.isNull(EKK1091D010CBSMsg1List.IDO_RSN_CD_ERR)` etc. | Map 2 nested fields per child |
| 22 | IF | `!template.isNull(EKK1091D010CBSMsg.EKK1091D010CBSMSG1LIST_ERR)` | Map list-level error |

**Block 11** — DISPATCH_BRANCHES_EKK1351A010, EKK1351B003, EKK1351C011 `(Data Extraction Items)` (L~14110)

> These branches handle the data extraction item workflow:
> - EKK1351A010 = "EKK1351A010" (Data Extraction Item Consent / データ抽出項目同意照会): 6 error fields
> - EKK1351B003 = "EKK1351B003" (Data Extraction Item List by Submission Type / データ抽出項目一覧照会（申請種別コード）): 7 error fields
> - EKK1351C011 = "EKK1351C011" (Data Extraction Item Combination Feasibility / データ抽出項目併用可否取得): 2 nested fields from child list

**Block 12** — DISPATCH_BRANCH_EKK1391D010 `(Data Extraction Item Setting Registration / データ抽出項目設定登録)` (L~14338)

> Service type: `WRIBSVK_OPERATE_CC_EKK1391D010 = "EKK1391D010"`
> Maps 14 error fields: SYSID_ERR, DCHSKM_CD_ERR, MSKM_DTL_NO_ERR, APLY_JUN_ERR, DCHSKMST_YMD_ERR, DCHSKMST_STA_YMD_ERR, DCHSKMST_END_YMD_ERR, IDO_DIV_ERR, GRP_CD_ERR, INTR_CD_ERR, MSKM_KISAN_YMD_ERR, DCHSKMST_ADD_OPTY_CD_ERR, UPD_DTM_BF_ERR.

**Block 13** — DISPATCH_BRANCH_EKK0451C050 `(Discount Service Contract Recovery / 割引サービス契約回復)` (L~14786)

> Service type: `WRIBSVK_RECOVER_CC_EKK0451C050 = "EKK0451C050"`
> Maps 5 error fields: WRIB_SVC_KEI_NO_ERR, MSKM_DTL_NO_ERR, KAIHK_YMD_ERR, IDO_DIV_ERR, UPD_DTM_BF_ERR.

**Block 14** — DISPATCH_BRANCH_EKK1681B001 `(Disadvantaged Reservation List / 差異予約一覧照会)` (L~14830)

> Service type: `WRIBSVK_OPERATE_CC_EKK1681B001 = "EKK1681B001"`
> Maps 8 error fields: KEY_IDO_DIV_ERR, KEY_IDO_RSV_DTL_CD_ERR, KEY_RSV_APLY_YMD_ERR, KEY_IDO_RSV_STAT_CD_ERR, KEY_MSKM_DTL_NO_ERR, KEY_SYSID_ERR.

**Block 15** — OTHER_BRANCHES `(Additional service type branches)` (L~12900-14786)

> Additional branches mapped from the source:
> - EKK0081B003 = "EKK0081B003" (Non-cancelled service contract list by SYSID / 解約済以外サービス契約一覧照会（SYSID）): 6 error fields
> - EKK0081B010 = "EKK0081B010" (Service contract common info list / サービス契約共通情報一覧照会): 6 error fields
> - EKK0081B012 = "EKK0081B012" (Discount-target service contract list / 割引対象サービス契約一覧照会): 8 error fields
> - EKK0321B002 = "EKK0321B002" (Billing advance list / 課金先一覧照会): 2 error fields
> - EKK0321D010 = "EKK0321D010" (Billing advance registration / 課金先登録): 14 error fields
> - EKK0361B002 = "EKK0361B002" (Option service ISP active E-mail list / オプションサービス契約＜ISP＞利用中Eメール一覧照会): 2 error fields
> - EKK0401B001 = "EKK0401B001" (Sub-option service contract list / サブオプションサービス契約一覧照会): 1 error field
> - EKK0451A010 = "EKK0451A010" (Discount service contract consent / 割引サービス契約同意照会): 8 error fields
> - EKK0451B003 = "EKK0451B003" (Discount service contract application intermediate data / 割引サービス適用中件数取得): 6 error fields
> - EKK0451B005 = "EKK0451B005" (Discount service contract list by SYSID / 割引サービス契約一覧照会（SYSID）): 6 error fields
> - EKK0451B006 = "EKK0451B006" (Applicable discount contract list / 適用中割引サービス契約一覧照会): 6 error fields
> - EKK0451B010 = "EKK0451B010" (Discount contract list by discount designation / 割引サービス契約一覧照会（割引サービス指定）): 2 error fields
> - EKK0451C030 = "EKK0451C030" (Discount contract cancellation confirmation / 割引サービス契約解約確定): 8 error fields
> - EKK0451C070 = "EKK0451C070" (Discount contract cancellation / 割引サービス契約キャンセル): 8 error fields
> - EKK0451C170 = "EKK0451C170" (Discount contract charge start date change / 割引サービス契約課金開始日変更): 4 error fields
> - EKK0481B001 = "EKK0481B001" (Discount-target contract list / 割引サービス対象契約一覧照会): 8 error fields
> - EKK0491A010 = "EKK0491A010" (Billing contract consent / 請求契約同意照会): 2 error fields
> - EKK0841A010 = "EKK0841A010" (Discount service consent / 割引サービス同意照会): 7 error fields
> - EKK0841B003 = "EKK0841B003" (Discount service list by base date / 割引サービス一覧照会（基準年月日）): 13 error fields
> - EKK0841C011 = "EKK0841C011" (Discount/campaign combination feasibility / 割引・キャンペーン併用可否取得): 2 nested fields
> - EKK0851B001 = "EKK0851B001" (Discount-target service list / 割引サービス対象サービス一覧照会): 8 error fields
> - EKK1371B001 = "EKK1371B001" (Data extraction item target service list / データ抽出項目対象サービス一覧照会): 7 error fields
> - EKK1391A010 = "EKK1391A010" (Data extraction item setting consent / データ抽出項目設定同意照会): 6 error fields
> - EKK1391B002 = "EKK1391B002" (Data extraction item setting application intermediate / データ抽出項目設定適用中件数取得): - (present but not in source)
> - EKK1391B004 = "EKK1391B004" (Data extraction item setting list by SYSID / データ抽出項目設定一覧照会（SYSID）): 5 error fields
> - EKK1391C030 = "EKK1391C030" (Data extraction item setting change / データ抽出項目設定変更): 5 error fields
> - EKK1391C040 = "EKK1391C040" (Data extraction item setting completion / データ抽出項目設定完了): 8 error fields
> - EKK1401B001 = "EKK1401B001" (Data extraction item setting target contract list / データ抽出項目設定対象契約一覧照会): 6 error fields
> - EKK1401D010 = "EKK1401D010" (Data extraction item setting target contract registration / データ抽出項目設定対象契約登録): 11 error fields
> - EZM0171A010 = "EKK0171A010" (Code name management consent / コード名称管理同意照会): 2 error fields
> - ECH0501A010 = "EKK0501A010" (Billing schedule definition consent / 料金スケジュール定義同意照会): 3 error fields
> - EKK0341B002 = "EKK0341B002" (Device-provided service contract list / 機器提供サービス契約一覧照会): 3 error fields
> - EZM0411A010 = "EKK0411A010" (Home device type consent / 宅内機器型式同意照会): 1 error field

## 7. Glossary

| Term | Type | Business Meaning |
|------|------|------------------|
| `svcIf` | Field | Service type identifier — string code that determines which CBS message schema to use for error mapping (e.g., "EKK0011D020") |
| `mapName` | Parameter | Data map key — identifies the named map within param that stores CBS-specific error fields |
| `inMap` | Local Variable | HashMap storing error field key-value pairs for the current CBS response |
| `bpStatus` | Local Variable | Business process status code — current error severity level stored in the control map |
| `templateStatus` | Local Variable | Status code extracted from the CBS template — reflects the CBS's assessment of error severity |
| `WRIBSVK_OPERATE_CC_EKK*` | Constant | Static service-type identifier constants — map a service type string (e.g., "EKK0011D020") to its business meaning |
| `EKK0011D020` | Service Type | Submitted Content Acceptance Registration (申請内容承認登録) — FTTH/telecom service order submission content approval workflow |
| `EKK0021A010` | Service Type | Submission Detail Consent (申請詳細同意照会) — inquiry for submission detail consent |
| `EKK0021C060` | Service Type | Submission Detail Verification & Post-Processing (申請詳細照会・後続業務依頼) — post-submission verification and follow-up task dispatch |
| `EKK0081A010` | Service Type | Service Contract Consent (サービス契約同意照会) — service contract agreement confirmation |
| `EKK0451A010` | Service Type | Discount Service Contract Consent (割引サービス契約同意照会) — discount/fee-reduction service contract agreement |
| `EKK0451C020` | Service Type | Discount Service Contract Cancellation (割引サービス契約解約) — discount service contract cancellation |
| `EKK0451D010` | Service Type | Discount Service Contract Registration (割引サービス契約登録) — discount service contract registration |
| `EKK1091D010` | Service Type | Advancement Registration (進捗登録) — progress/work status registration |
| `EKK1351A010` | Service Type | Data Extraction Item Consent (データ抽出項目同意照会) — data extraction item agreement confirmation |
| `EKK1391D010` | Service Type | Data Extraction Item Setting Registration (データ抽出項目設定登録) — data extraction item configuration registration |
| `EKK1681B001` | Service Type | Disadvantaged Reservation List (差異予約一覧照会) — inquiry for reservation error/inconsistency list |
| `KKSV*` | Screen | Screen module prefix — KKSVxxxx denotes a specific screen (e.g., KKSV0229 = FTTH service screen) |
| `CAANMsg` | Class | CBS Response Message wrapper — Fujitsu's standard message container for CBS result fields |
| `IRequestParameterReadWrite` | Interface | Business data I/F — interface for exchanging business data between screens and BP layer |
| `JCMAPLConstMgr` | Class | Constant Manager — application-wide constant/message retrieval system for localization |
| `SCControlMapKeys` | Class | Control Map Key constants — defines keys for RETURN_CODE, RETURN_MESSAGE in control map |
| `templateStatus > bpStatus` | Logic | Status priority comparison — higher numeric value = higher severity error; the template's status wins if worse |
| `_err` suffix | Convention | Error field suffix — all mapped error fields in inMap are suffixed with `_err` (e.g., `sysid_err`) |
| `RETURN_MESSAGE_*` | Constant | Human-readable message lookup key — format `RETURN_MESSAGE_<4-digit status>` to get error description text |
| `EKK*CBSMsg` | Class | CBS Message constant class — defines field name constants for a specific CBS (e.g., `EKK0011D020CBSMsg.SYSID_ERR`) |
| `*Msg1List` | Class | Nested child message list — sub-message type for multi-record detail items within a CBS response |
| `IDO_DIV_ERR` | Field | Disadvantage/Error division code — categorizes the type of error or discrepancy |
| `IDO_DTM_ERR` | Field | Disadvantage timestamp — date/time when the error/discrepancy occurred |
| `UPD_DTM_BF_ERR` | Field | Pre-update timestamp — timestamp before the last update (optimistic locking support) |
| `WRIB_SVC_KEI_NO` | Field | Discount service contract number (割引サービス契約番号) — unique identifier for a discount/fee-reduction service contract |
| `SVC_KEI_NO` | Field | Service contract number (サービス契約番号) — unique identifier for a telecom service contract |
| `MSKM_DTL_NO` | Field | Submission detail number (申請詳細番号) — unique identifier for a submission detail record |
| `KEY_SVC_KEI_NO` | Field | Key service contract number — query filter parameter for service contract inquiry screens |
| `SYSID` | Field | System ID — unique system identifier for the contract/account |
| `PRC_KMK_CD` | Field | Charge item code (料金項目コード) — categorizes billing/charge types |
| `KAKINS_TSTAYMD` | Field | Charge application start date (課金先適用開始年月日) — date when charges begin |
| `KAKINS_TENDYMD` | Field | Charge application end date (課金先適用終了年月日) — date when charges end |
| `OP_SVC_KEI_NO` | Field | Option service contract number (オプションサービス契約番号) — for optional add-on service contracts |
| `SBOP_SVC_KEI_NO` | Field | Sub-option service contract number (サブオプションサービス契約番号) — for sub-option services |
| `KKTK_SVC_KEI_NO` | Field | Device-provided service contract number (機器提供サービス契約番号) — for hardware-provided service contracts |
| `SEIOPSVC_KEI_NO` | Field | Billing option service contract number (請求オプションサービス契約番号) — billing-related option contracts |
| `OWNR_KEI_NO` | Field | Owner contract number (オーナー契約番号) — primary account holder contract identifier |
| `PRG_STAT_ERR` | Field | Progress status (進捗ステータス) — current processing stage |
| `PRG_MEMO_ERR` | Field | Progress memo (進捗メモ) — free-text notes on processing status |
| `KARI_MSKM_FLG` | Field | Temporary submission flag (仮申請フラグ) — indicates provisional/placeholder submission |
| `KEPCO_CUSTINFO_JUJU_DOI_UM` | Field | KEPCO customer info consent (関西電力お客様情報授受同意有無) — consent for power company data sharing |
| `SHOSA_BF_RRK_JIKO` | Field | Pre-consultation self-item (照会前連絡自己事項) — pre-consultation self-declared items |
| `USE_SVC_KEIZK_SBT_CD` | Field | Continuing service type code (利用サービス継続種別コード) — indicates ongoing service classification |
| `CONSMBSN_MSKM_STAT_SKBT_CD` | Field | Consomer-billing submission status sub-type code (コンサシューマ営業用申請状態識別コード) — consumer billing application status |
| `DCHSKM_CD` | Field | Data extraction item code (データ抽出項目コード) — identifies a specific data extraction configuration |
| `DCHSKMST_NO` | Field | Data extraction item setting number (データ抽出項目設定番号) — unique ID for data extraction settings |
| `IDO_RSN_CD` | Field | Error reason code (差異理由コード) — categorizes the type of data discrepancy |
