# Business Logic — JKKKikiIchiranKkUpdCC.isKikiInfoServerChkCC() [128 LOC]

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

## 1. Role

### JKKKikiIchiranKkUpdCC.isKikiInfoServerChkCC()

This method orchestrates a comprehensive equipment-provided service contract server validation check before updating equipment information on the equipment list screen (KKW108). Its primary business responsibility is to prepare all necessary data — including service contract agreement details (EKK0081A010) and equipment provider service contract information (EKK0341A010) — and delegate to the dedicated `JKKKikiInfoServerChkCC.checkKktkSvcInfo()` server-check component to validate equipment data integrity. The method acts as a data aggregation and routing layer: it gathers legacy service contract messages and pre-update equipment data from the temporary data map, extracts warehouse/stock assignment codes via `getSokoAndSelf()`, and populates an output map with over 20 fields covering device model codes, manufacturing serial numbers, MAC addresses, delivery status, sales subtype, management location codes, and service status. After the server-check component performs its validation logic (including MAC address existence checks, model-number-to-MAC consistency verification, and pre/post-update device data cross-referencing), this method extracts the UQ equipment serial number (when applicable), consolidates the error flag and message list back into the calling component's message map, and returns a boolean — `true` if the validation passed and the equipment update may proceed, `false` if an error condition was flagged.

The method implements a **data aggregation + delegation pattern**, collecting all required context from multiple sources (temporary data, CBS messages, request parameters, helper lookups) into a unified transfer map, then handing off to a specialized validation component. It serves as a shared utility called by the `execKikiIchiranKikiUpd()` method during the equipment update flow on the KKW108 screen, and is a critical gatekeeper that prevents invalid equipment data changes from being persisted.

## 2. Processing Pattern (Detailed Business Logic)

```mermaid
flowchart TD
    START(["isKikiInfoServerChkCC call"])
    STEP1["Get service contract data from temporaryData"]
    STEP2["Get equipment service contract data from temporaryData"]
    STEP3["Create work map and output map"]
    STEP4["Get warehouse code and stock code from getSokoAndSelf"]
    STEP5["Copy 20+ fields to outMap from ccMsg and CBS data"]
    STEP6["Instantiate JKKKikiInfoServerChkCC"]
    STEP7["Execute checkKktkSvcInfo"]
    STEP8["Re-read updated outMap from param"]
    STEP9["Get UQ equipment serial number from getUqKikiSeizoNo"]
    STEP10["Put UQ serial number into ccMsg"]
    STEP11["Read err_flg from outMap"]
    STEP12["Put err_flg and message_list into ccMsg"]
    STEP13["Remove work map from param"]
    COND{err_flg == ERR_FLG_ERR?}
    STEP14["Return false -- error occurred"]
    STEP15["Return true -- success"]
    END(["End"])

    START --> STEP1
    STEP1 --> STEP2
    STEP2 --> STEP3
    STEP3 --> STEP4
    STEP4 --> STEP5
    STEP5 --> STEP6
    STEP6 --> STEP7
    STEP7 --> STEP8
    STEP8 --> STEP9
    STEP9 --> STEP10
    STEP10 --> STEP11
    STEP11 --> STEP12
    STEP12 --> STEP13
    STEP13 --> COND
    COND -->|err_flg equals E| STEP14
    STEP14 --> END
    COND -->|else| STEP15
    STEP15 --> END
```

**CRITICAL -- Constant Resolution:**

| Constant | Value | Business Meaning |
|----------|-------|-----------------|
| `TEMPLATE_ID_EKK0081A010` | `"EKK0081A010"` | Service Contract Agreement Inquiry template ID |
| `TEMPLATE_ID_EKK0341A010` | `"EKK0341A010"` | Equipment Provider Service Contract Information template ID |
| `ERR_FLG_ERR` | `"E"` | Error flag value — indicates validation failure |
| `UQ_KK_SEIZO_NO` | `"uq_kiki_seizo_no"` | UQ Equipment Serial Number output key |
| `TMP_KIKI_HKAT_SHITEI_SOKO_CD` | `"kiki_hkat_shitei_soko_cd"` | Equipment Assignment Designated Warehouse Code key |
| `TMP_KIKI_HKAT_SHITEI_SKDN_CD` | `"kiki_hkat_shitei_skdn_cd"` | Equipment Assignment Designated Stock Code key |

## 3. Parameter Analysis

| No | Parameter Name | Type | Business Description |
|----|---------------|------|---------------------|
| 1 | `handle` | `SessionHandle` | The database session handle used to establish and manage the connection for CBS (Central Business System) invocations. Carries transaction context and user session information needed when the delegated `checkKktkSvcInfo` method performs CBS queries. |
| 2 | `scCall` | `ServiceComponentRequestInvoker` | The service component request invoker that wraps and routes calls to backend CBS methods. Provides the mechanism for invoking CBS processes like EKK0081A010 (Service Contract Agreement Inquiry) and EDK0451A010 (Sub-order Agreement Inquiry) during the server-check process. |
| 3 | `param` | `IRequestParameterReadWrite` | The request parameter data carrier that holds the working data map (`workJKKKikiInfoServerChkCC`) where input/output data for the server-check component is placed. Also used to remove the temporary work map after processing. Acts as the primary data conduit between this method and the `checkKktkSvcInfo` service component. |
| 4 | `dataMapKey` | `String` | The key used to retrieve the calling component's message map (`ccMsg`) from `param`. This is the data map key established by the caller (`execKikiIchiranKikiUpd`), typically identifying the KKW108 update context. Used to copy fields like `func_code`, `check_scrn_id`, `svc_kei_no`, MAC address, and receive the validation results (`err_flg`, `message_list`). |
| 5 | `temporaryData` | `HashMap<String, Object>` | The temporary data map containing pre-loaded CBS response messages. Holds the `TEMPLATE_ID_EKK0081A010` key (service contract agreement CAANMsg) and `TEMPLATE_ID_EKK0341A010` key (equipment provider service contract CAANMsg) which are the primary sources of legacy/pre-update equipment and service data. |

**Instance fields read:**

| Field | Type | Business Description |
|-------|------|---------------------|
| `ERR_FLG_ERR` | `String` | Constant holding the error flag value `"E"` used to determine if the server-check returned an error condition. |
| `UQ_KK_SEIZO_NO` | `String` | Constant key `"uq_kiki_seizo_no"` for storing the UQ equipment serial number in the output map. |
| `TMP_KIKI_HKAT_SHITEI_SOKO_CD` | `String` | Constant key `"kiki_hkat_shitei_soko_cd"` for the warehouse code in the `getSokoAndSelf` result. |
| `TMP_KIKI_HKAT_SHITEI_SKDN_CD` | `String` | Constant key `"kiki_hkat_shitei_skdn_cd"` for the stock code in the `getSokoAndSelf` result. |

## 4. CRUD Operations / Called Services

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

| CRUD | SC / CBS | SC Code | Entity / DB | Operation Description |
|------|----------|---------|-------------|----------------------|
| - | `JKKKikiInfoServerChkCC.checkKktkSvcInfo` | (delegated) | — | Instantiates `JKKKikiInfoServerChkCC` and calls `checkKktkSvcInfo()` which internally performs CBS calls including EKK0081A010 (Service Contract Agreement Inquiry) and EDK0451A010 (Sub-order Agreement Inquiry) for equipment-provided service data validation. |
| R | `JKKKikiIchiranKkUpdCC.getSokoAndSelf` | — | — | Retrieves warehouse code and stock assignment codes from the pre-update equipment provider service contract data (`EKK0341A010CBSMsg`). Returns a `HashMap<String, String>` with keys `kiki_hkat_shitei_soko_cd` and `kiki_hkat_shitei_skdn_cd`. |
| R | `JKKKikiIchiranKkUpdCC.getNullToStr` | — | — | Utility that safely converts a string value to a non-null representation, used for pre-update model and serial number fields. |
| R | `JKKKikiIchiranKkUpdCC.getUqKikiSeizoNo` | — | — | Extracts and returns the UQ equipment serial number from the server-check output map. Only meaningful when MAC address is set (per v5.00.01 change). |
| - | `JBSbatAKKshkmRsltInfoTukiawsday.setData` | — | — | Called internally within `checkKktkSvcInfo` — sets result data for equipment service contract sync (same-day). |
| - | `JBSbatAKKshkmRsltInfoTukiaws.setData` | — | — | Called internally within `checkKktkSvcInfo` — sets result data for equipment service contract sync. |
| - | `JBSbatAKKshkmRsltInfoTukiawsRealSkh.setData` | — | — | Called internally within `checkKktkSvcInfo` — sets result data for real schedule equipment service contract sync. |
| - | `JBSbatAKKshkmRsltInfTkCvsNCnsl.setData` | — | — | Called internally within `checkKktkSvcInfo` — sets result data for CVS/consolidated equipment service contract sync. |
| R | `JBSbatDKNyukaFinAdd.getData` | — | — | Called internally within `checkKktkSvcInfo` — reads data from the DC delivery completion addition service component. |
| R | `JBSbatFUCaseFileRnkData.getString` | — | — | Called internally within `checkKktkSvcInfo` — retrieves string data for FU case file ranking. |
| R | `JBSbatFUMoveNaviData.getString` | — | — | Called internally within `checkKktkSvcInfo` — retrieves navigation data for FU move operations. |
| R | `JESC0101B010TPMA.getString` | — | — | Called internally within `checkKktkSvcInfo` — reads TPMA data from the ESC (equipment service contract) component. |
| R | `JESC0101B020TPMA.getString` | — | — | Called internally within `checkKktkSvcInfo` — reads TPMA data from the ESC component (variant 2). |
| - | `JFUeoTelOpTransferCC.getData` | — | — | Called internally within `checkKktkSvcInfo` — retrieves data for EO TelOp transfer operations. |
| - | `JFUTransferCC.getData` | — | — | Called internally within `checkKktkSvcInfo` — retrieves transfer operation data. |
| - | `JFUTransferListToListCC.getData` | — | — | Called internally within `checkKktkSvcInfo` — retrieves list-to-list transfer data. |
| R | `JBSbatZMAdDataSet.getString` | — | — | Called internally within `checkKktkSvcInfo` — reads ZM advertisement dataset string. |
| - | `JKKKikiInfoServerChkCC.checkKktkSvcInfo` | (delegated) | — | The core server validation component that performs MAC address existence checks, model-number-to-MAC consistency verification, pre/post-update device data cross-referencing, and C-CAS guard status validation. Internally invokes CBS calls including EKK0081A010 (Service Contract Agreement Inquiry) and EDK0451A010 (Sub-order Agreement Inquiry). |
| R | `KKW12701SFLogic.getData` | — | — | Called internally within `checkKktkSvcInfo` — retrieves data from the screen logic component for equipment management. |
| R | `JKKKikiIchiranKkUpdCC.getNullToStr` | — | — | Utility method that safely converts potentially null string values to empty strings, used for pre-update model code and serial number fields to prevent NPE. |
| R | `JKKKikiIchiranKkUpdCC.getSokoAndSelf` | — | — | Retrieves warehouse and stock assignment codes from pre-update equipment provider service contract data. |
| R | `JKKKikiIchiranKkUpdCC.getUqKikiSeizoNo` | — | — | Extracts the UQ equipment serial number from the server-check output map for UQ-branded equipment. |

**How to classify (method calls made directly by `isKikiInfoServerChkCC`):**

The method primarily performs **data preparation** (SET/GET operations) and delegates the actual server validation logic to `JKKKikiInfoServerChkCC.checkKktkSvcInfo()`. The CBS-level CRUD operations are executed *inside* that delegated method, not here directly.

## 5. Dependency Trace

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

No screen/batch entry points found within 8 hops. Direct callers found: 1 method.

| # | Caller (Screen/Batch) | Call Chain (Full Path to this Method) | Terminal (SC / CRUD / Entity) |
|---|----------------------|--------------------------------------|-------------------------------|
| 1 | Class:JKKKikiIchiranKkUpdCC | `execKikiIchiranKikiUpd()` -> `isKikiInfoServerChkCC()` | `checkKktkSvcInfo [-]`, `getUqKikiSeizoNo [R]`, `getSokoAndSelf [R]`, `getNullToStr [R]`, `setData [-]`, `getData [R]`, `getString [R]` |

**Instructions:**

The method `isKikiInfoServerChkCC()` is called directly by `execKikiIchiranKikiUpd()`, which is a core processing method within the same class `JKKKikiIchiranKkUpdCC`. This class serves the KKW108 screen (Equipment List Update Screen) and performs equipment information update operations. The call chain leads to CBS operations through the delegated `checkKktkSvcInfo` method, which in turn calls CBS processes EKK0081A010 and EDK0451A010, as well as various data access components (JBSbat, JESC, JFU, KKW12701SFLogic) that query and update equipment, service contract, and delivery-related database tables.

## 6. Per-Branch Detail Blocks

**Block 1** — [GET/CAST] `(Service Contract Data Retrieval)` (L2636)

> Retrieves the service contract agreement CBS message from the temporary data map. This message contains the active service contract details needed by the server-check validation.

| # | Type | Code | Business Description |
|---|------|------|---------------------|
| 1 | SET | `CAANMsg ekk0081a010cbsMsg = (CAANMsg)temporaryData.get(TEMPLATE_ID_EKK0081A010)` | `[-> TEMPLATE_ID_EKK0081A010="EKK0081A010"]` Retrieves service contract agreement CAANMsg from temporary data |

**Block 2** — [GET/CAST] `(Equipment Service Contract Data Retrieval)` (L2639)

> Retrieves the pre-update equipment provider service contract CBS message. This contains the equipment data as it existed before the current update.

| # | Type | Code | Business Description |
|---|------|------|---------------------|
| 1 | SET | `CAANMsg ekk0341a010cbsMsg_bf = (CAANMsg)temporaryData.get(TEMPLATE_ID_EKK0341A010)` | `[-> TEMPLATE_ID_EKK0341A010="EKK0341A010"]` Retrieves pre-update equipment provider service contract CAANMsg |

**Block 3** — [SET] `(Work Map Initialization)` (L2643-L2645)

> Creates a new HashMap under the fixed text key "JKKKikiInfoServerChkCC" in the param data carrier. This becomes the working data map for the server-check component.

| # | Type | Code | Business Description |
|---|------|------|---------------------|
| 1 | SET | `String workJKKKikiInfoServerChkCC = "JKKKikiInfoServerChkCC"` | Fixed text key identifying the work data map |
| 2 | SET | `param.setData(workJKKKikiInfoServerChkCC, new HashMap<String, Object>())` | Initializes the work map in param for the server-check component |
| 3 | SET | `HashMap<String, Object> ccMsg = (HashMap<String, Object>)param.getData(dataMapKey)` | Retrieves the calling component's message map from param |
| 4 | SET | `HashMap<String, Object> outMap = (HashMap<String, Object>)param.getData(workJKKKikiInfoServerChkCC)` | Retrieves the work map where server-check input/output data lives |

**Block 4** — [CALL + SET] `(Warehouse/Stock Code Retrieval)` (L2648)

> Extracts warehouse code and stock assignment code from the pre-update equipment provider service contract data via `getSokoAndSelf()`. These codes identify the physical storage location assigned to the equipment.

| # | Type | Code | Business Description |
|---|------|------|---------------------|
| 1 | SET | `HashMap<String, String> mapSoko = getSokoAndSelf(ekk0341a010cbsMsg_bf)` | Gets warehouse code (`kiki_hkat_shitei_soko_cd`) and stock code (`kiki_hkat_shitei_skdn_cd`) from pre-update equipment data |

**Block 5** — [SET] `(Field Copy to outMap — ~25 fields)` (L2651-L2717)

> Copies over 20 fields from the calling component's message map (`ccMsg`) and CBS data into the work map (`outMap`). This populates all the data that the server-check component needs to validate the equipment-provided service. Fields include:

| # | Type | Code | Business Description |
|---|------|------|---------------------|
| 1 | SET | `outMap.put("func_code", ccMsg.get("func_code"))` | Function code — identifies the operation type |
| 2 | SET | `outMap.put("check_scrn_id", ccMsg.get("check_scrn_id"))` | `[-> "check_scrn_id"]` Check screen ID — identifies which screen triggers this check (e.g., KKW108) |
| 3 | SET | `outMap.put("svc_kei_no", ccMsg.get("svc_kei_no"))` | Service contract number — the contract identifier |
| 4 | SET | `outMap.put("svc_kei_data", ekk0081a010cbsMsg)` | `[-> "svc_kei_data"]` Full service contract agreement CBS message |
| 5 | SET | `outMap.put("taknkiki_model_cd", ccMsg.get("taknkiki_model_cd"))` | Home device model code |
| 6 | SET | `outMap.put("std_ymd", ccMsg.get("unyo_ymd"))` | `[-> "std_ymd"]` Standard date (operational date) |
| 7 | SET | `outMap.put("haiso_stat", ccMsg.get("haiso_stat"))` | Delivery status |
| 8 | SET | `outMap.put("haiso_div_cd", ccMsg.get("haiso_div_cd"))` | Delivery division code |
| 9 | SET | `outMap.put("haiso_way_cd", ccMsg.get("haiso_way_cd"))` | Delivery method division code |
| 10 | SET | `outMap.put("hambai_sbt", ccMsg.get("hambai_sbt"))` | Sales subtype — indicates how the service was sold |
| 11 | SET | `outMap.put("tk_mdl_cd_bf", getNullToStr(...))` | `[-> "tk_mdl_cd_bf"]` Pre-update home device model code (from EKK0341A010CBSMsg1List.TAKNKIKI_MODEL_CD) |
| 12 | SET | `outMap.put("kk_seizo_no", ccMsg.get("kk_seizo_no"))` | Equipment serial number — current serial number |
| 13 | SET | `outMap.put("kk_seizo_no_bf", getNullToStr(...))` | `[-> "kk_seizo_no_bf"]` Pre-update equipment serial number (from EKK0341A010CBSMsg1List.KIKI_SEIZO_NO) |
| 14 | SET | `outMap.put("stb_kktk_svc_cd", ccMsg.get("stb_kktk_svc_cd"))` | STB (Set-Top Box) equipment provider service code |
| 15 | SET | `outMap.put("bcas_kktk_svc_cd", ccMsg.get("bcas_kktk_svc_cd"))` | BCAS equipment provider service code |
| 16 | SET | `outMap.put("ccas_kktk_svc_cd", ccMsg.get("ccas_kktk_svc_cd"))` | CCAS equipment provider service code |
| 17 | SET | `outMap.put("key_knri_plc_cd_bf", mapSoko.get(TMP_KIKI_HKAT_SHITEI_SOKO_CD))` | `[-> "key_knri_plc_cd_bf"]` Pre-update management location code (from warehouse code) |
| 18 | SET | `outMap.put("knri_plc_slf_cd_bf", mapSoko.get(TMP_KIKI_HKAT_SHITEI_SKDN_CD))` | `[-> "knri_plc_slf_cd_bf"]` Pre-update management location stock code |
| 19 | SET | `outMap.put("key_knri_plc_cd", ccMsg.get("soko_info"))` | Current management location code |
| 20 | SET | `outMap.put("kriplace_skcd_bf", ekk0341a010cbsMsg_bf.getString(...))` | `[-> "kriplace_skcd_bf"]` Pre-update management location identification code |
| 21 | SET | `outMap.put("kriplace_skcd", ccMsg.get("kriplace_skcd"))` | Current management location identification code |
| 22 | SET | `outMap.put("mac_ad", ccMsg.get("mac_ad"))` | MAC address — network hardware address for the equipment |
| 23 | SET | `outMap.put("kktk_gene_add_dtm", "")` | `[-> "kktk_gene_add_dtm"]` Equipment provider service registration date/time (set to empty) |
| 24 | SET | `outMap.put("kojiak_no", ccMsg.get("kojiak_no"))` | Construction project number |
| 25 | SET | `outMap.put("id_tourokusho_um", ccMsg.get("id_tourokusho_um"))` | ID registration existence/non-existence flag |
| 26 | SET | `outMap.put("tk_sbt_cd", ccMsg.get("tk_sbt_cd"))` | Home device subtype code |
| 27 | SET | `outMap.put("tk_sbt_cd_bf", getNullToStr(...))` | `[-> "tk_sbt_cd_bf"]` Pre-update home device subtype code |
| 28 | SET | `outMap.put("tk_sbt_cd_ccas", ccMsg.get("tk_sbt_cd_ccas"))` | CCAS home device subtype code |
| 29 | SET | `outMap.put("tk_sbt_cd_bcas", ccMsg.get("tk_sbt_cd_bcas"))` | BCAS home device subtype code |
| 30 | SET | `outMap.put("tk_sbt_cd_stb", ccMsg.get("tk_sbt_cd_stb"))` | STB home device subtype code |
| 31 | SET | `outMap.put("kktk_sbt_cd", ccMsg.get("kktk_sbt_cd"))` | Equipment provider subtype code |
| 32 | SET | `outMap.put("haiso_saksei_zumi_flg", ccMsg.get("haiso_saksei_zumi_flg"))` | Delivery preparation completion flag |
| 33 | SET | `outMap.put("svc_kei_stat", getNullToStr(ekk0081a010cbsMsg.getString(...)))` | `[-> "svc_kei_stat"]` Service contract status (from EKK0081A010CBSMsg1List.SVC_KEI_STAT) |
| 34 | SET | `outMap.put("taknkiki_sbt_cd", ccMsg.get("tk_sbt_cd"))` | `[-> "taknkiki_sbt_cd"]` Home device subtype code (v8.00.01 addition — alias) |
| 35 | SET | `outMap.put("ruta_kino_cd", ccMsg.get("ruta_kino_cd"))` | `[-> "ruta_kino_cd"]` Route device code (v8.00.01 addition) |

**Block 6** — [NEW + CALL] `(Server-Check Execution)` (L2720-L2721)

> Instantiates the dedicated server-check component and delegates validation. This is the core business logic — all actual validation (MAC address checks, model-number consistency, pre/post-device comparison, C-CAS guard status) happens inside this method.

| # | Type | Code | Business Description |
|---|------|------|---------------------|
| 1 | SET | `JKKKikiInfoServerChkCC jkkKikiInfoServerChkCC = new JKKKikiInfoServerChkCC()` | Creates the server-check component instance |
| 2 | CALL | `jkkKikiInfoServerChkCC.checkKktkSvcInfo(handle, param, workJKKKikiInfoServerChkCC)` | Executes server-check validation with the service contract agreement CBS call (EKK0081A010), sub-order inquiry (EDK0451A010), MAC address verification, model-number consistency check, pre/post-update device data cross-reference, and C-CAS guard status validation |

**Block 7** — [GET/CAST] `(Re-read Updated outMap)` (L2724)

> After the server-check modifies the work map, re-reads it from param to pick up any changes (e.g., updated err_flg, message_list).

| # | Type | Code | Business Description |
|---|------|------|---------------------|
| 1 | SET | `outMap = (HashMap<String, Object>)param.getData(workJKKKikiInfoServerChkCC)` | Re-reads the work map after checkKktkSvcInfo has modified it |

**Block 8** — [CALL + SET] `(UQ Equipment Serial Number Retrieval)` (L2728-L2730)

> Per v5.00.01 change: retrieves the UQ-specific equipment serial number from the server-check output. Only meaningful when MAC address is configured — UQ-branded equipment carries a distinct serial number derived from the MAC address.

| # | Type | Code | Business Description |
|---|------|------|---------------------|
| 1 | SET | `String uqKikiSeizoNo = getUqKikiSeizoNo(outMap)` | Extracts UQ equipment serial number from outMap |
| 2 | SET | `ccMsg.put(UQ_KK_SEIZO_NO, uqKikiSeizoNo)` | `[-> UQ_KK_SEIZO_NO="uq_kiki_seizo_no"]` Stores UQ serial number back into the calling component's message map |

**Block 9** — [GET + SET] `(Result Consolidation)` (L2733-L2737)

> Extracts the error flag and message list from the server-check output and places them back into the caller's message map. Then removes the temporary work map from param to clean up.

| # | Type | Code | Business Description |
|---|------|------|---------------------|
| 1 | SET | `String err_flg = (String)outMap.get("err_flg")` | Extracts the validation error flag |
| 2 | SET | `ccMsg.put("err_flg", outMap.get("err_flg"))` | Propagates the error flag to the calling component's message map |
| 3 | SET | `ccMsg.put("message_list", outMap.get("message_list"))` | Propagates the validation message list to the caller |
| 4 | EXEC | `param.removeData(workJKKKikiInfoServerChkCC)` | Removes the temporary work map from param |

**Block 10** — [IF/RETURN] `(Error Handling — err_flg == "E")` (L2745-L2749)

> `[-> ERR_FLG_ERR="E"]` If the server-check component flagged an error (err_flg equals "E"), returns false to indicate the equipment update should not proceed. This is the error exit path — all validation failures route here.

| # | Type | Code | Business Description |
|---|------|------|---------------------|
| 1 | IF | `if(ERR_FLG_ERR.equals(err_flg))` | `[-> ERR_FLG_ERR="E"]` Checks if validation returned an error flag |
| 2 | RETURN | `return false;` | Indicates the server-check failed — equipment update is blocked |
| 3 | ELSE | *(implicit fall-through)* | Validation passed — proceed to success return |

**Block 11** — [RETURN] `(Success Path)` (L2752)

> If no error was flagged by the server-check, returns true to indicate the equipment update may proceed.

| # | Type | Code | Business Description |
|---|------|------|---------------------|
| 1 | RETURN | `return true;` | Server-check passed — equipment update is approved |

## 7. Glossary

| Term | Type | Business Meaning |
|------|------|------------------|
| `svc_kei_no` | Field | Service Contract Number — the unique identifier for a service contract line item |
| `svc_kei_stat` | Field | Service Contract Status — indicates the current state of the service contract (active, completed, cancelled, etc.) |
| `svc_kei_data` | Field | Service Contract Data — the full CAANMsg message containing service contract agreement details from EKK0081A010 |
| `taknkiki_model_cd` | Field | Home Device Model Code — the model identifier for the equipment provided by the service provider |
| `tk_mdl_cd_bf` | Field | Pre-Update Home Device Model Code — the model code before the current update operation (used for change detection) |
| `kk_seizo_no` | Field | Equipment Serial Number — unique manufacturing serial number of the provided equipment |
| `kk_seizo_no_bf` | Field | Pre-Update Equipment Serial Number — the serial number before the update (used for change detection) |
| `mac_ad` | Field | MAC Address — the hardware network address of the equipment, used for device identity verification |
| `haiso_stat` | Field | Delivery Status — current status of equipment delivery (pending, delivered, installed, etc.) |
| `haiso_div_cd` | Field | Delivery Division Code — categorizes the type of delivery operation |
| `haiso_way_cd` | Field | Delivery Method Division Code — indicates how the equipment was delivered |
| `haiso_saksei_zumi_flg` | Field | Delivery Preparation Completion Flag — indicates whether delivery preparation has been completed |
| `hambai_sbt` | Field | Sales Subtype — classifies the type of sales/promotion under which the service was contracted |
| `kiki_hkat_shitei_soko_cd` | Field | Equipment Assignment Designated Warehouse Code — identifies the warehouse where assigned equipment is stored |
| `kiki_hkat_shitei_skdn_cd` | Field | Equipment Assignment Designated Stock Code — identifies the specific stock location for assigned equipment |
| `key_knri_plc_cd` | Field | Management Location Code — the code for the managed physical location where equipment is installed |
| `key_knri_plc_cd_bf` | Field | Pre-Update Management Location Code — the location code before the update |
| `kriplace_skcd` | Field | Management Location Identification Code — a detailed identification code for the management location |
| `kriplace_skcd_bf` | Field | Pre-Update Management Location Identification Code |
| `kojiak_no` | Field | Construction Project Number — the project identifier for construction/installation work |
| `id_tourokusho_um` | Field | ID Registration Existence/Non-existence — flag indicating whether ID registration exists |
| `tk_sbt_cd` | Field | Home Device Subtype Code — categorizes the type of home device (STB, BCAS, CCAS, etc.) |
| `kktk_sbt_cd` | Field | Equipment Provider Subtype Code — categorizes the type of equipment-provided service |
| `stb_kktk_svc_cd` | Field | STB Equipment Provider Service Code — service code specific to Set-Top Box equipment |
| `bcas_kktk_svc_cd` | Field | BCAS Equipment Provider Service Code — service code specific to BCAS (Broadcast Content Protection) equipment |
| `ccas_kktk_svc_cd` | Field | CCAS Equipment Provider Service Code — service code specific to CCAS (Common Control Application System) equipment |
| `kktk_gene_add_dtm` | Field | Equipment Provider Service Registration Date/Time — timestamp when the equipment-provided service was registered |
| `ruta_kino_cd` | Field | Route Device Code — identifies routing devices (v8.00.01 addition) |
| `uq_kiki_seizo_no` | Field | UQ Equipment Serial Number — a derived serial number for UQ-branded equipment based on MAC address (v5.00.01 addition) |
| `func_code` | Field | Function Code — identifies the operation function being performed |
| `check_scrn_id` | Field | Check Screen ID — identifies which screen triggers the validation (e.g., KKW108, KKW009, KKW035) |
| `err_flg` | Field | Error Flag — "E" if validation failed, empty string if passed |
| `message_list` | Field | Message List — list of validation error/warning messages returned by the server-check |
| EKK0081A010 | CBS | Service Contract Agreement Inquiry — central business system call that retrieves service contract details including service contract number, status, price group code, and registration date/time |
| EKK0341A010 | CBS | Equipment Provider Service Contract Information — CBS call that retrieves equipment-provided service contract details including model codes, serial numbers, MAC addresses, management location codes, and subtype codes |
| EDK0451A010 | CBS | Sub-order Agreement Inquiry — CBS call for sub-order (sales subtype) agreement data |
| EKKA0020003 | CBS | Home Device Agreement Inquiry (4) — CBS call that verifies home device existence by model code and serial number |
| ERCA0010002 | CBS | C-CAS Guard Status Check — CBS call that validates C-CAS guard status for CCAS devices |
| KKW108 | Screen | Equipment List Update Screen — the primary screen where equipment information is updated, triggering this server-check |
| ERR_FLG_ERR | Constant | Error flag value — `"E"` — indicates a validation error occurred during server-check |
| CCCAS | Business term | Common Control Application System — a digital rights management system used in Japanese cable television |
| BCAS | Business term | Broadcast Content Protection System — content protection technology for broadcast reception equipment |
| STB | Acronym | Set-Top Box — set-top box equipment for cable/satellite TV service |
| UQ | Business term | UQ Communications — mobile broadband service brand; UQ-branded equipment has distinct serial number handling |
| MAC | Acronym | Media Access Control — unique hardware identifier for network interfaces |
| CAANMsg | Class | Communication Asynchronous Asynchronous Network Message — the message container class for CBS request/response data |
| SC | Acronym | Service Component — a modular backend service that executes business logic and database operations |
| CBS | Acronym | Central Business System — the core backend system handling telecom service operations |
