# Business Logic — JKKKikiDslAddCC.editErrorInfo_EKK1551D010CBS() [279 LOC]

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

## 1. Role

### JKKKikiDslAddCC.editErrorInfo_EKK1551D010CBS()

This method is an error-information extraction and propagation utility that runs within the **Order Information Creation Work Registration** service flow (オーダ情報作成ワーク登録). Its primary responsibility is to capture the processing results — specifically error status codes and associated error messages — returned from the CBS (Circuit Build Service) call `EKK1551D010CBS`, and store them into the business data parameter map so that the calling screen can display them to the user.

The method implements a **priority-based status override pattern**: if the CBS returned a non-zero return code, the method forces the template status to `9000` (error), and it cross-references the status against the centralized message constant store (`JCMAPLConstMgr`) to validate the error message. Only if the template's status code is numerically higher than the BP's existing return code does it overwrite the BP's return code and message — ensuring that the most severe error takes precedence.

The method also extracts **27 distinct error fields** from the CBS template response. These fields cover every service identifier and its associated timestamp across multiple service hierarchy levels (Service Contract, Service Contract Detail, Equipment Provisioning Service, Option Service, Sub-Option Service, Billing Option Service, and Additional Information Contract), plus a "pre-change" (変更前) snapshot set that records the prior-state values for audit/debugging purposes. Each field is extracted only if the CBS returns a non-null value and only if the key has not already been populated in the work map — preventing accidental overwrites from subsequent processing.

Its role in the larger system is that of a **shared CBS error-handling bridge**: it is called by multiple order-creation CBS wrapper methods (e.g., in `JKKKikiDslAddCC.editResultRP_EKK1551D010CBS`, `JKKHakkoSODCC`, `JKKAdchgHakkoSODCC`, `JKKAdchgCancelHakkoSODCC`), making it a central convergence point for error propagation across the order creation and modification workflows.

## 2. Processing Pattern (Detailed Business Logic)

```mermaid
flowchart TD
    START(["editErrorInfo_EKK1551D010CBS(param, templates, returnCode)"])
    GET_TEMPLATE["Extract first template from templates array"]
    GET_STATUS["Read template.status field
into templateStatus"]
    CHECK_RETURN{"returnCode != 0?"}
    SET_STATUS_9000["Set templateStatus = 9000
(non-zero return code = error)"]
    VALIDATE_MSG{"Does JCMAPLConstMgr
have RETURN_MESSAGE_<status>?"}
    RESET_STATUS["Set templateStatus = 0
(no message for this status)"]
    GET_BP_STATUS["Read param.return_code
Default -1 if null"]
    COMPARE{"templateStatus > bpStatus?"}
    SET_TEMPLATE_STATUS["Format status as %04d
Get message from JCMAPLConstMgr
Set param.return_code and
param.return_message"]
    INIT_WORKMAP{"HAKKOSODCCWORKMAP
in param data?"}
    CREATE_WORKMAP["Create new HashMap
Store as HAKKOSODCCWORKMAP"]
    PROCESS_ERROR{"Next error field
(not null and key not in map)?"}
    PUT_ERROR["Put error value into workMap
under field_err key"]
    ALL_DONE["All 27 error fields processed"]
    RETURN_PARAM["Return param"]

    START --> GET_TEMPLATE --> GET_STATUS
    GET_STATUS --> CHECK_RETURN
    CHECK_RETURN -->|Yes| SET_STATUS_9000
    CHECK_RETURN -->|No| VALIDATE_MSG
    SET_STATUS_9000 --> VALIDATE_MSG
    VALIDATE_MSG -->|No| RESET_STATUS
    VALIDATE_MSG -->|Yes| GET_BP_STATUS
    RESET_STATUS --> GET_BP_STATUS
    GET_BP_STATUS --> COMPARE
    COMPARE -->|Yes| SET_TEMPLATE_STATUS
    COMPARE -->|No| INIT_WORKMAP
    SET_TEMPLATE_STATUS --> INIT_WORKMAP
    INIT_WORKMAP -->|No| PROCESS_ERROR
    INIT_WORKMAP -->|Yes| CREATE_WORKMAP --> PROCESS_ERROR
    PROCESS_ERROR -->|Yes| PUT_ERROR --> PROCESS_ERROR
    PROCESS_ERROR -->|No| ALL_DONE --> RETURN_PARAM
```

**Processing Steps:**

1. **Extract status from template**: Reads the first `CAANMsg` from the `templates` array and retrieves its `STATUS` field. If the CBS `returnCode` is non-zero (indicating an error), overrides `templateStatus` to `9000`.

2. **Validate message existence**: Checks whether the centralized constant manager (`JCMAPLConstMgr`) contains a message constant for `RETURN_MESSAGE_<status>`. If not found, resets `templateStatus` to `0` (no valid error mapping).

3. **Read existing BP return code**: Retrieves the current `RETURN_CODE` from the parameter's control map. If the key does not exist (null), defaults the BP status to `-1`.

4. **Status priority comparison**: If the template's status code is numerically higher than the BP's existing status, overwrites the BP's `RETURN_CODE` and `RETURN_MESSAGE` with the template's formatted 4-digit status and corresponding message from the constant manager.

5. **Initialize work map**: Retrieves (or creates) the `HakkoSODCCWORK` HashMap from `param` data. This work map is the persistent error store for the order creation workflow.

6. **Extract error fields (27 sequential checks)**: For each of the 27 error fields returned by the CBS template, checks if the field is not null in the template and not already present in the work map. If both conditions are met, extracts the string value and stores it in the work map under the corresponding `_err` key. The fields cover three categories:
   - Order-level identifiers and codes (order release condition number, order content code)
   - Service hierarchy identifiers with timestamps (standard, equipment provisioning, option, sub-option, billing option)
   - Additional information contract identifiers
   - Pre-change (変更前) snapshot fields for audit trails
   - Equipment option service identifiers (versions 1 and 2)

7. **Return param**: The method returns the enriched `param` object, now containing the error status, message, and all extracted error field values in its work map and control map.

## 3. Parameter Analysis

| No | Parameter Name | Type | Business Description |
|----|---------------|------|---------------------|
| 1 | `param` | `IRequestParameterReadWrite` | The business data transfer object carrying the work context for the Order Information Creation Work Registration screen. Contains a control map (for return codes, return messages, error info) and a data map (for the HakkoSODCCWORK HashMap). Modified in-place to inject error status and error field values extracted from the CBS response. |
| 2 | `templates` | `CAANMsg[]` | Array of CAANMsg objects representing the CBS response message templates. Each template holds structured field-value pairs returned from the `EKK1551D010CBS` call, including status codes, service identifiers, timestamps, and error-specific fields. The first element (`templates[0]`) is the primary template analyzed. |
| 3 | `returnCode` | `int` | The integer return code from the CBS invocation. A value of `0` indicates success; any non-zero value signals an error condition, triggering the method to force the template status to `9000` (error override). This is the primary determinant of whether the CBS call succeeded or failed. |

**Instance fields / external state read:**

| Source | Description |
|--------|-------------|
| `JCMAPLConstMgr` | Centralized message constant manager — queried for `RETURN_MESSAGE_<status>` strings. Provides human-readable error messages mapped to status codes. |
| `JKKHakkoSODConstCC.HAKKOSODCCWORKMAP` | Constant key `"HakkoSODCCWORK"` — the data map key in `param` used to store/retrieve the order-creation work HashMap where error field values accumulate. |
| `SCControlMapKeys.RETURN_CODE` | Control map key for the existing BP return code — read to determine whether the new error status should override the current one. |
| `SCControlMapKeys.RETURN_MESSAGE` | Control map key for the existing BP return message — written alongside RETURN_CODE when the template status wins the priority comparison. |

## 4. CRUD Operations / Called Services

The method does not directly access any database tables or invoke service component (SC) / CBS business logic itself. All operations are **parameter manipulation** (Read/Write of in-memory objects). However, the following external methods/constants are called:

| CRUD | SC / CBS | SC Code | Entity / DB | Operation Description |
|------|----------|---------|-------------|----------------------|
| R | `JCMAPLConstMgr.getString` | - | - | Reads localized error message text from the constant/message store for `RETURN_MESSAGE_<status>` |
| R | `param.getControlMapData` | - | - | Reads the existing BP return code from the control map |
| W | `param.setControlMapData` | - | - | Writes the return code and return message into the control map (when template status > BP status) |
| R | `param.getData` | - | - | Reads the HakkoSODCCWORK HashMap from the param data map |
| W | `param.setData` | - | - | Writes a newly created HashMap into the param data map under `HakkoSODCCWORK` key |
| R | `template.getInt` | - | - | Reads the STATUS field integer value from the CAANMsg template |
| R | `template.isNull` | - | - | Checks each of the 27 error fields for null (non-null means error value present) |
| R | `template.getString` | - | - | Extracts the string value of each non-null error field to store in the work map |

**Note on pre-computed evidence:** The pre-computed call graph lists numerous `isNull`/`getData`/`setData` calls from other classes. Those are terminal operations propagated from downstream calls in the broader execution path. Within this specific method's 279 LOC, the method exclusively manipulates the `param` and `templates` objects in-memory — it is a pure data-extraction and propagation method with no SC/CBS invocations or database operations of its own.

## 5. Dependency Trace

| # | Caller (Screen/Batch) | Call Chain (Full Path to this Method) | Terminal (SC / CRUD / Entity) |
|---|----------------------|--------------------------------------|-------------------------------|
| 1 | CBS:JKKKikiDslAddCC.editResultRP_EKK1551D010CBS | `editResultRP_EKK1551D010CBS` -> `editErrorInfo_EKK1551D010CBS` | `param.getData [R]`, `template.getString [R]` x27 |
| 2 | CBS:JKKHakkoSODCC.editResultRP_EKK1551D010CBS | `editResultRP_EKK1551D010CBS` -> `editErrorInfo_EKK1551D010CBS` | `param.getData [R]`, `template.getString [R]` x27 |
| 3 | CBS:JKKAdchgHakkoSODCC.editResultRP_EKK1551D010CBS | `editResultRP_EKK1551D010CBS` -> `editErrorInfo_EKK1551D010CBS` | `param.getData [R]`, `template.getString [R]` x27 |
| 4 | CBS:JKKAdchgCancelHakkoSODCC.editResultRP_EKK1551D010CBS | `editResultRP_EKK1551D010CBS` -> `editErrorInfo_EKK1551D010CBS` | `param.getData [R]`, `template.getString [R]` x27 |

**Terminal operations from this method:** `isNull` (27 checks), `getString` (0–27 extractions, one per non-null field), `getInt` (status read), `getControlMapData` (return code read), `setControlMapData` (return code + message write), `getData` (work map read), `setData` (work map write).

## 6. Per-Branch Detail Blocks

### Block 1 — IF `(returnCode != 0)` (L1786)

> If the CBS returned a non-zero return code, override the template status to 9000 to force error handling.

| # | Type | Code |
|---|------|------|
| 1 | SET | `template = templates[0]` // Extract first template from array [-> templates[0]] |
| 2 | SET | `templateStatus = template.getInt(EKK1551D010CBSMsg.STATUS)` // Read CBS status [-> STATUS field] |
| 3 | IF | `if (0 != returnCode)` [-> non-zero return code detected] |
| 4 | SET | `templateStatus = 9000` // Force error status [-> constant 9000, generic CBS error] |

### Block 2 — IF (`JCMAPLConstMgr.getString(...)` is null) (L1791)

> Validates that the error message constant exists for the current template status. If not, resets the status to 0 so no invalid message is displayed.

| # | Type | Code |
|---|------|------|
| 1 | IF | `if (null == JCMAPLConstMgr.getString("RETURN_MESSAGE_" + formattedStatus))` [-> formattedStatus = "%04d" of templateStatus] |
| 2 | SET | `templateStatus = 0` // No matching message constant; reset to 0 |

### Block 3 — BP STATUS CHECK (L1796-L1802)

> Reads the existing BP return code from the parameter control map. Defaults to -1 if the key does not exist, ensuring the template status always takes precedence on first encounter.

| # | Type | Code |
|---|------|------|
| 1 | SET | `bpStatus = 0` // Initialize |
| 2 | SET | `obj = param.getControlMapData(SCControlMapKeys.RETURN_CODE)` |
| 3 | IF | `if (null == obj)` |
| 4 | SET | `bpStatus = -1` // No prior return code; allow template to overwrite |
| 5 | ELSE | — |
| 6 | SET | `bpStatus = Integer.parseInt((String)param.getControlMapData(SCControlMapKeys.RETURN_CODE))` |

### Block 4 — IF (`templateStatus > bpStatus`) (L1804)

> Priority-based override: only updates the BP's return code/message if the template's error severity is higher. This allows cascading error handling where a later, more severe error can override an earlier, less severe one.

| # | Type | Code |
|---|------|------|
| 1 | IF | `if (templateStatus > bpStatus)` [-> numeric comparison] |
| 2 | SET | `formatStatus = String.format("%1$04d", templateStatus)` // Zero-padded 4-digit [-> e.g., "0001", "9000"] |
| 3 | SET | `message = JCMAPLConstMgr.getString("RETURN_MESSAGE_" + formatStatus)` // Lookup message text |
| 4 | SET | `param.setControlMapData(SCControlMapKeys.RETURN_CODE, formatStatus)` |
| 5 | SET | `param.setControlMapData(SCControlMapKeys.RETURN_MESSAGE, message)` |

### Block 5 — WORK MAP INITIALIZATION (L1808-L1812)

> Ensures the HakkoSODCCWORK HashMap exists in param data. This is the shared work area where all extracted error field values are accumulated for display on the screen.

| # | Type | Code |
|---|------|------|
| 1 | SET | `inMap = (HashMap)param.getData(JKKHakkoSODConstCC.HAKKOSODCCWORKMAP)` |
| 2 | IF | `if (null == inMap)` [-> work map not yet created] |
| 3 | SET | `inMap = new HashMap()` |
| 4 | SET | `param.setData(JKKHakkoSODConstCC.HAKKOSODCCWORKMAP, inMap)` |

### Block 6 — Error Field Extraction Blocks (L1816–L2053)

> 27 sequential extraction checks. Each block follows the same pattern: check if the field is non-null in the template AND not already present in the work map; if so, extract and store the error value. The `!inMap.containsKey()` guard ensures that if a field has already been set (e.g., by a previous processing step), its original value is preserved.

#### Block 6.1 — ODR_HAKKO_JOKEN_NO_ERR (L1816)

> Order Release Condition Number error — extracted from template if present.

| # | Type | Code |
|---|------|------|
| 1 | IF | `if (!template.isNull(EKK1551D010CBSMsg.ODR_HAKKO_JOKEN_NO_ERR))` [-> field contains error value] |
| 2 | IF | `if (!inMap.containsKey("odr_hakko_joken_no_err"))` [-> key not yet set] |
| 3 | SET | `inMap.put("odr_hakko_joken_no_err", template.getString(EKK1551D010CBSMsg.ODR_HAKKO_JOKEN_NO_ERR))` |

#### Block 6.2 — ODR_NAIYO_CD_ERR (L1824)

> Order Content Code error — classifies the type of order (e.g., FTTH registration, mail change).

| # | Type | Code |
|---|------|------|
| 1 | IF | `if (!template.isNull(EKK1551D010CBSMsg.ODR_NAIYO_CD_ERR))` |
| 2 | IF | `if (!inMap.containsKey("odr_naiyo_cd_err"))` |
| 3 | SET | `inMap.put("odr_naiyo_cd_err", template.getString(EKK1551D010CBSMsg.ODR_NAIYO_CD_ERR))` |

#### Block 6.3 — SVC_KEI_NO_ERR (L1832)

> Service Contract Number error.

| # | Type | Code |
|---|------|------|
| 1 | IF | `if (!template.isNull(EKK1551D010CBSMsg.SVC_KEI_NO_ERR))` |
| 2 | IF | `if (!inMap.containsKey("svc_kei_no_err"))` |
| 3 | SET | `inMap.put("svc_kei_no_err", template.getString(EKK1551D010CBSMsg.SVC_KEI_NO_ERR))` |

#### Block 6.4 — SVKEI_GADTM_ERR (L1840)

> Service Contract Registration Year/Month/Day/Time/Minute/Second error.

| # | Type | Code |
|---|------|------|
| 1 | IF | `if (!template.isNull(EKK1551D010CBSMsg.SVKEI_GADTM_ERR))` |
| 2 | IF | `if (!inMap.containsKey("svkei_gadtm_err"))` |
| 3 | SET | `inMap.put("svkei_gadtm_err", template.getString(EKK1551D010CBSMsg.SVKEI_GADTM_ERR))` |

#### Block 6.5 — SVC_KEI_UCWK_NO_ERR (L1848)

> Service Contract Detail Number error.

| # | Type | Code |
|---|------|------|
| 1 | IF | `if (!template.isNull(EKK1551D010CBSMsg.SVC_KEI_UCWK_NO_ERR))` |
| 2 | IF | `if (!inMap.containsKey("svc_kei_ucwk_no_err"))` |
| 3 | SET | `inMap.put("svc_kei_ucwk_no_err", template.getString(EKK1551D010CBSMsg.SVC_KEI_UCWK_NO_ERR))` |

#### Block 6.6 — SVKEIUW_GADTM_ERR (L1856)

> Service Contract Detail Registration Timestamp error.

| # | Type | Code |
|---|------|------|
| 1 | IF | `if (!template.isNull(EKK1551D010CBSMsg.SVKEIUW_GADTM_ERR))` |
| 2 | IF | `if (!inMap.containsKey("svkeiuw_gadtm_err"))` |
| 3 | SET | `inMap.put("svkeiuw_gadtm_err", template.getString(EKK1551D010CBSMsg.SVKEIUW_GADTM_ERR))` |

#### Block 6.7 — KKTK_SVC_KEI_NO_ERR (L1864)

> Equipment Provisioning Service Contract Number error.

| # | Type | Code |
|---|------|------|
| 1 | IF | `if (!template.isNull(EKK1551D010CBSMsg.KKTK_SVC_KEI_NO_ERR))` |
| 2 | IF | `if (!inMap.containsKey("kktk_svc_kei_no_err"))` |
| 3 | SET | `inMap.put("kktk_svc_kei_no_err", template.getString(EKK1551D010CBSMsg.KKTK_SVC_KEI_NO_ERR))` |

#### Block 6.8 — KKTSVKEI_GADTM_ERR (L1872)

> Equipment Provisioning Service Contract Registration Timestamp error.

| # | Type | Code |
|---|------|------|
| 1 | IF | `if (!template.isNull(EKK1551D010CBSMsg.KKTSVKEI_GADTM_ERR))` |
| 2 | IF | `if (!inMap.containsKey("kktsvkei_gadtm_err"))` |
| 3 | SET | `inMap.put("kktsvkei_gadtm_err", template.getString(EKK1551D010CBSMsg.KKTSVKEI_GADTM_ERR))` |

#### Block 6.9 — OP_SVC_KEI_NO_ERR (L1880)

> Option Service Contract Number error.

| # | Type | Code |
|---|------|------|
| 1 | IF | `if (!template.isNull(EKK1551D010CBSMsg.OP_SVC_KEI_NO_ERR))` |
| 2 | IF | `if (!inMap.containsKey("op_svc_kei_no_err"))` |
| 3 | SET | `inMap.put("op_svc_kei_no_err", template.getString(EKK1551D010CBSMsg.OP_SVC_KEI_NO_ERR))` |

#### Block 6.10 — OPSVKEI_GADTM_ERR (L1888)

> Option Service Contract Registration Timestamp error.

| # | Type | Code |
|---|------|------|
| 1 | IF | `if (!template.isNull(EKK1551D010CBSMsg.OPSVKEI_GADTM_ERR))` |
| 2 | IF | `if (!inMap.containsKey("opsvkei_gadtm_err"))` |
| 3 | SET | `inMap.put("opsvkei_gadtm_err", template.getString(EKK1551D010CBSMsg.OPSVKEI_GADTM_ERR))` |

#### Block 6.11 — SBOP_SVC_KEI_NO_ERR (L1896)

> Sub-Option Service Contract Number error.

| # | Type | Code |
|---|------|------|
| 1 | IF | `if (!template.isNull(EKK1551D010CBSMsg.SBOP_SVC_KEI_NO_ERR))` |
| 2 | IF | `if (!inMap.containsKey("sbop_svc_kei_no_err"))` |
| 3 | SET | `inMap.put("sbop_svc_kei_no_err", template.getString(EKK1551D010CBSMsg.SBOP_SVC_KEI_NO_ERR))` |

#### Block 6.12 — SBOPSVKEI_GADTM_ERR (L1904)

> Sub-Option Service Contract Registration Timestamp error.

| # | Type | Code |
|---|------|------|
| 1 | IF | `if (!template.isNull(EKK1551D010CBSMsg.SBOPSVKEI_GADTM_ERR))` |
| 2 | IF | `if (!inMap.containsKey("sbopsvkei_gadtm_err"))` |
| 3 | SET | `inMap.put("sbopsvkei_gadtm_err", template.getString(EKK1551D010CBSMsg.SBOPSVKEI_GADTM_ERR))` |

#### Block 6.13 — SEIOPSVC_KEI_NO_ERR (L1912)

> Billing Option Service Contract Number error.

| # | Type | Code |
|---|------|------|
| 1 | IF | `if (!template.isNull(EKK1551D010CBSMsg.SEIOPSVC_KEI_NO_ERR))` |
| 2 | IF | `if (!inMap.containsKey("seiopsvc_kei_no_err"))` |
| 3 | SET | `inMap.put("seiopsvc_kei_no_err", template.getString(EKK1551D010CBSMsg.SEIOPSVC_KEI_NO_ERR))` |

#### Block 6.14 — SEIOPSVKEI_GADTM_ERR (L1920)

> Billing Option Service Contract Registration Timestamp error.

| # | Type | Code |
|---|------|------|
| 1 | IF | `if (!template.isNull(EKK1551D010CBSMsg.SEIOPSVKEI_GADTM_ERR))` |
| 2 | IF | `if (!inMap.containsKey("seiopsvkei_gadtm_err"))` |
| 3 | SET | `inMap.put("seiopsvkei_gadtm_err", template.getString(EKK1551D010CBSMsg.SEIOPSVKEI_GADTM_ERR))` |

#### Block 6.15 — HUKA_INF_KEI_NO_ERR (L1928)

> Additional Information Contract Number error.

| # | Type | Code |
|---|------|------|
| 1 | IF | `if (!template.isNull(EKK1551D010CBSMsg.HUKA_INF_KEI_NO_ERR))` |
| 2 | IF | `if (!inMap.containsKey("huka_inf_kei_no_err"))` |
| 3 | SET | `inMap.put("huka_inf_kei_no_err", template.getString(EKK1551D010CBSMsg.HUKA_INF_KEI_NO_ERR))` |

#### Block 6.16 — HUKA_INF_KEI_GADTM_ERR (L1936)

> Additional Information Contract Registration Timestamp error.

| # | Type | Code |
|---|------|------|
| 1 | IF | `if (!template.isNull(EKK1551D010CBSMsg.HUKA_INF_KEI_GADTM_ERR))` |
| 2 | IF | `if (!inMap.containsKey("huka_inf_kei_gadtm_err"))` |
| 3 | SET | `inMap.put("huka_inf_kei_gadtm_err", template.getString(EKK1551D010CBSMsg.HUKA_INF_KEI_GADTM_ERR))` |

#### Block 6.17 — CHBF_SVKEI_GADTM_ERR (L1944)

> Pre-Change Service Contract Registration Timestamp error. This captures the state *before* a modification was attempted, enabling audit trails and rollback debugging.

| # | Type | Code |
|---|------|------|
| 1 | IF | `if (!template.isNull(EKK1551D010CBSMsg.CHBF_SVKEI_GADTM_ERR))` |
| 2 | IF | `if (!inMap.containsKey("chbf_svkei_gadtm_err"))` |
| 3 | SET | `inMap.put("chbf_svkei_gadtm_err", template.getString(EKK1551D010CBSMsg.CHBF_SVKEI_GADTM_ERR))` |

#### Block 6.18 — CHBF_SVKEIUW_GADTM_ERR (L1952)

> Pre-Change Service Contract Detail Registration Timestamp error.

| # | Type | Code |
|---|------|------|
| 1 | IF | `if (!template.isNull(EKK1551D010CBSMsg.CHBF_SVKEIUW_GADTM_ERR))` |
| 2 | IF | `if (!inMap.containsKey("chbf_svkeiuw_gadtm_err"))` |
| 3 | SET | `inMap.put("chbf_svkeiuw_gadtm_err", template.getString(EKK1551D010CBSMsg.CHBF_SVKEIUW_GADTM_ERR))` |

#### Block 6.19 — CHBF_KKTSVKEI_GADTM_ERR (L1960)

> Pre-Change Equipment Provisioning Service Contract Registration Timestamp error.

| # | Type | Code |
|---|------|------|
| 1 | IF | `if (!template.isNull(EKK1551D010CBSMsg.CHBF_KKTSVKEI_GADTM_ERR))` |
| 2 | IF | `if (!inMap.containsKey("chbf_kktsvkei_gadtm_err"))` |
| 3 | SET | `inMap.put("chbf_kktsvkei_gadtm_err", template.getString(EKK1551D010CBSMsg.CHBF_KKTSVKEI_GADTM_ERR))` |

#### Block 6.20 — CHBF_OPSVKEI_GADTM_ERR (L1968)

> Pre-Change Option Service Contract Registration Timestamp error.

| # | Type | Code |
|---|------|------|
| 1 | IF | `if (!template.isNull(EKK1551D010CBSMsg.CHBF_OPSVKEI_GADTM_ERR))` |
| 2 | IF | `if (!inMap.containsKey("chbf_opsvkei_gadtm_err"))` |
| 3 | SET | `inMap.put("chbf_opsvkei_gadtm_err", template.getString(EKK1551D010CBSMsg.CHBF_OPSVKEI_GADTM_ERR))` |

#### Block 6.21 — CHBF_SBOPSVKEI_GADTM_ERR (L1976)

> Pre-Change Sub-Option Contract Registration Timestamp error.

| # | Type | Code |
|---|------|------|
| 1 | IF | `if (!template.isNull(EKK1551D010CBSMsg.CHBF_SBOPSVKEI_GADTM_ERR))` |
| 2 | IF | `if (!inMap.containsKey("chbf_sbopsvkei_gadtm_err"))` |
| 3 | SET | `inMap.put("chbf_sbopsvkei_gadtm_err", template.getString(EKK1551D010CBSMsg.CHBF_SBOPSVKEI_GADTM_ERR))` |

#### Block 6.22 — CHBF_SEIOPSVKEI_GADTM_ERR (L1984)

> Pre-Change Billing Option Contract Registration Timestamp error.

| # | Type | Code |
|---|------|------|
| 1 | IF | `if (!template.isNull(EKK1551D010CBSMsg.CHBF_SEIOPSVKEI_GADTM_ERR))` |
| 2 | IF | `if (!inMap.containsKey("chbf_seiopsvkei_gadtm_err"))` |
| 3 | SET | `inMap.put("chbf_seiopsvkei_gadtm_err", template.getString(EKK1551D010CBSMsg.CHBF_SEIOPSVKEI_GADTM_ERR))` |

#### Block 6.23 — SVKEI_GADTM_ERR (duplicate check) (L1992)

> Service Contract Registration Timestamp error (redundant — same key as Block 6.4). The second `isNull` check will not execute because the key is already present from the earlier block, making this effectively a no-op on the second pass.

| # | Type | Code |
|---|------|------|
| 1 | IF | `if (!template.isNull(EKK1551D010CBSMsg.SVKEI_GADTM_ERR))` |
| 2 | IF | `if (!inMap.containsKey("svkei_gadtm_err"))` — will be false if Block 6.4 executed |
| 3 | SET | `inMap.put("svkei_gadtm_err", template.getString(EKK1551D010CBSMsg.SVKEI_GADTM_ERR))` |

#### Block 6.24 — HUKA_INF_KEI_NO_ERR (duplicate check) (L2000)

> Additional Information Contract Number error (redundant — same key as Block 6.15).

| # | Type | Code |
|---|------|------|
| 1 | IF | `if (!template.isNull(EKK1551D010CBSMsg.HUKA_INF_KEI_NO_ERR))` |
| 2 | IF | `if (!inMap.containsKey("huka_inf_kei_no_err"))` — will be false if Block 6.15 executed |
| 3 | SET | `inMap.put("huka_inf_kei_no_err", template.getString(EKK1551D010CBSMsg.HUKA_INF_KEI_NO_ERR))` |

#### Block 6.25 — HUKA_INF_KEI_GADTM_ERR (duplicate check) (L2008)

> Additional Information Contract Registration Timestamp error (redundant — same key as Block 6.16).

| # | Type | Code |
|---|------|------|
| 1 | IF | `if (!template.isNull(EKK1551D010CBSMsg.HUKA_INF_KEI_GADTM_ERR))` |
| 2 | IF | `if (!inMap.containsKey("huka_inf_kei_gadtm_err"))` — will be false if Block 6.16 executed |
| 3 | SET | `inMap.put("huka_inf_kei_gadtm_err", template.getString(EKK1551D010CBSMsg.HUKA_INF_KEI_GADTM_ERR))` |

#### Block 6.26 — KKOP_SVC_KEI_NO_1 (L2016)

> Equipment Option Service Contract Number 1 error.

| # | Type | Code |
|---|------|------|
| 1 | IF | `if (!template.isNull(EKK1551D010CBSMsg.KKOP_SVC_KEI_NO_1))` |
| 2 | IF | `if (!inMap.containsKey("kkop_svc_kei_no_1"))` |
| 3 | SET | `inMap.put("kkop_svc_kei_no_1", template.getString(EKK1551D010CBSMsg.KKOP_SVC_KEI_NO_1))` |

#### Block 6.27 — KKOSVKEI_GADTM_1 (L2024)

> Equipment Option Service Contract Registration Timestamp 1 error.

| # | Type | Code |
|---|------|------|
| 1 | IF | `if (!template.isNull(EKK1551D010CBSMsg.KKOSVKEI_GADTM_1))` |
| 2 | IF | `if (!inMap.containsKey("kkosvkei_gadtm_1"))` |
| 3 | SET | `inMap.put("kkosvkei_gadtm_1", template.getString(EKK1551D010CBSMsg.KKOSVKEI_GADTM_1))` |

#### Block 6.28 — KKOP_SVC_KEI_NO_2 (L2032)

> Equipment Option Service Contract Number 2 error.

| # | Type | Code |
|---|------|------|
| 1 | IF | `if (!template.isNull(EKK1551D010CBSMsg.KKOP_SVC_KEI_NO_2))` |
| 2 | IF | `if (!inMap.containsKey("kkop_svc_kei_no_2"))` |
| 3 | SET | `inMap.put("kkop_svc_kei_no_2", template.getString(EKK1551D010CBSMsg.KKOP_SVC_KEI_NO_2))` |

#### Block 6.29 — KKOSVKEI_GADTM_2 (L2040)

> Equipment Option Service Contract Registration Timestamp 2 error.

| # | Type | Code |
|---|------|------|
| 1 | IF | `if (!template.isNull(EKK1551D010CBSMsg.KKOSVKEI_GADTM_2))` |
| 2 | IF | `if (!inMap.containsKey("kkosvkei_gadtm_2"))` |
| 3 | SET | `inMap.put("kkosvkei_gadtm_2", template.getString(EKK1551D010CBSMsg.KKOSVKEI_GADTM_2))` |

### Block 7 — RETURN (L2045)

> Returns the enriched param object, now carrying the error status, message, and all extracted error field values.

| # | Type | Code |
|---|------|------|
| 1 | RETURN | `return param;` |

## 7. Glossary

| Term | Type | Business Meaning |
|------|------|------------------|
| `editErrorInfo_EKK1551D010CBS` | Method | Error info extraction method for the Order Information Creation Work Registration CBS (EKK1551D010CBS) |
| `EKK1551D010CBS` | CBS Code | Order Information Creation Work Registration Circuit Build Service — the backend CBS that performs the actual order creation work registration |
| `HAKKOSODCCWORKMAP` | Constant | Work map key `"HakkoSODCCWORK"` — the in-memory HashMap that accumulates error field values across the order creation workflow |
| `STATUS` | Field | CBS response status code — indicates success (0) or failure (non-zero) of the CBS operation |
| `returnCode` | Parameter | CBS return code — 0 = success, non-zero = error |
| `ODR_HAKKO_JOKEN_NO` | Field | Order Release Condition Number — identifies the conditions under which an order was released |
| `ODR_NAIYO_CD` | Field | Order Content Code — classifies the type of order (e.g., FTTH registration, mail change, portability) |
| `SVC_KEI_NO` | Field | Service Contract Number — the unique identifier for a service contractline item |
| `SVKEI_GADTM` | Field | Service Contract Registration Timestamp — year/month/day/hour/minute/second when the service contract was registered |
| `SVC_KEI_UCWK_NO` | Field | Service Contract Detail Number — the unique identifier for a service contract detail/sub-line item |
| `SVKEIUW_GADTM` | Field | Service Contract Detail Registration Timestamp |
| `KKTK_SVC_KEI_NO` | Field | Equipment Provisioning Service Contract Number — contract number for equipment-related service provisioning |
| `KKTSVKEI_GADTM` | Field | Equipment Provisioning Service Contract Registration Timestamp |
| `OP_SVC_KEI_NO` | Field | Option Service Contract Number — contract number for optional add-on services |
| `OPSVKEI_GADTM` | Field | Option Service Contract Registration Timestamp |
| `SBOP_SVC_KEI_NO` | Field | Sub-Option Service Contract Number — contract number for sub-option services beneath an option |
| `SBOPSVKEI_GADTM` | Field | Sub-Option Service Contract Registration Timestamp |
| `SEIOPSVC_KEI_NO` | Field | Billing Option Service Contract Number — contract number for billing-related optional services |
| `SEIOPSVKEI_GADTM` | Field | Billing Option Service Contract Registration Timestamp |
| `HUKA_INF_KEI_NO` | Field | Additional Information Contract Number — contract number for supplementary/additional information services |
| `HUKA_INF_KEI_GADTM` | Field | Additional Information Contract Registration Timestamp |
| `CHBF_SVKEI_GADTM` | Field | Pre-Change Service Contract Registration Timestamp — snapshot of the registration timestamp before a modification, used for audit trail and rollback debugging |
| `CHBF_SVKEIUW_GADTM` | Field | Pre-Change Service Contract Detail Registration Timestamp |
| `CHBF_KKTSVKEI_GADTM` | Field | Pre-Change Equipment Provisioning Service Contract Registration Timestamp |
| `CHBF_OPSVKEI_GADTM` | Field | Pre-Change Option Service Contract Registration Timestamp |
| `CHBF_SBOPSVKEI_GADTM` | Field | Pre-Change Sub-Option Contract Registration Timestamp |
| `CHBF_SEIOPSVKEI_GADTM` | Field | Pre-Change Billing Option Contract Registration Timestamp |
| `KKOP_SVC_KEI_NO_1` | Field | Equipment Option Service Contract Number 1 — first variant of equipment option contract number |
| `KKOSVKEI_GADTM_1` | Field | Equipment Option Service Contract Registration Timestamp 1 |
| `KKOP_SVC_KEI_NO_2` | Field | Equipment Option Service Contract Number 2 — second variant of equipment option contract number |
| `KKOSVKEI_GADTM_2` | Field | Equipment Option Service Contract Registration Timestamp 2 |
| `CAANMsg` | Class | Fujitsu's CAAN message framework class — a structured message container holding field-value pairs for CBS communication |
| `IRequestParameterReadWrite` | Interface | Business data read/write interface — the primary data transfer object carrying work context between CBS callers and screens |
| `JCMAPLConstMgr` | Class | Centralized message constant manager — provides localized error/success messages keyed by `RETURN_MESSAGE_<status>` pattern |
| `SCControlMapKeys` | Class | Control map key constants — provides standard keys like `RETURN_CODE`, `RETURN_MESSAGE`, `ERROR_INFO` for param control map access |
| `JAKKO` / `Order Creation Work` | Business term | The overall workflow of creating orders in the K-Opticom system, where orders are registered into a "work" (work registration) for subsequent processing |
| FTTH | Business term | Fiber To The Home — fiber-optic broadband internet service type |
| `_err` suffix | Naming convention | Indicates an error value — these keys in the work map store error-specific field values returned by the CBS |
| `bpStatus` | Variable | BP (Business Process) return status — the current error severity level tracked in the param control map |
| `templateStatus` | Variable | CBS template status — the status code from the CBS response, potentially overridden to 9000 on non-zero return code |
