# Business Logic — JKKCancelSvcKeiCC.getOpSbopKeiData() [187 LOC]

| Field | Value |
|-------|-------|
| Fully Qualified Name | `com.fujitsu.futurity.bp.custom.common.JKKCancelSvcKeiCC` |
| Layer | CC / Common Component (Business Logic Component — shared utility class) |
| Module | `common` (Package: `com.fujitsu.futurity.bp.custom.common`) |

## 1. Role

### JKKCancelSvcKeiCC.getOpSbopKeiData()

This method retrieves the complete hierarchy of **option service contracts** (オプション契約) and **sub-option service contracts** (サブオプション契約) associated with a given main service contract, preparing the data for cancellation-screen display. It acts as a **data aggregation and routing hub** within the service contract cancellation workflow.

The method iterates over each option service agreement found for the target service, and for every option contract, it retrieves detailed agreement information, then branches its processing based on the service type code (`svcSbtCd`). For **network-type services** (eo Hikari Net, eo ADSL, eo Mobile — codes 1, 3, 2), it additionally fetches ISP-specific agreement data and extracts POP ID and WEB ID information needed for instruction document registration. For **phone-type services** (eo Hikari Telephone — code 4), it fetches telephone agreement data. For every option agreement, it recursively retrieves all associated sub-option agreements and, for network-type services, the sub-option ISP data as well.

The method implements a **nested iteration dispatch pattern**: outer loop over option agreements, inner loop over sub-option agreements, with conditional branching on service type at both levels. All gathered data is stored in the `workField` HashMap for downstream processing by the cancellation screen.

This method is called directly from the `cancelSvcKei` (service contract cancellation main processing) method, making it a **shared utility** used exclusively within the service contract cancellation flow. It was added in 2012-08-17 as part of the IT1-2012-0000943 / TAI-2012-0000087対応 (countermeasure) response.

## 2. Processing Pattern (Detailed Business Logic)

```mermaid
flowchart TD
    START(["getOpSbopKeiData"])
    INIT["Initialize statusCode = 0 and 18 data structures"]
    CALL1["callEKK0351B010SC - Fetch Option Service Agreement List"]
    LOOP1["Loop: For each Option Service Agreement"]
    NEW1["Create eKK0351A010Hash"]
    CALL2["callEKK0351A010SC - Fetch Option Service Agreement Details"]
    GETSTAT["Get tmpSvcKeiStat, tmpOpSvcCd from result"]
    COND_RMT["tmpOpSvcCd != B021 (Remote Support Plus)"]
    COND_NET["svcSbtCd == 1, 3, or 2 (Net/ADSL/Mobile)"]
    CALL3["callEKK0361A010SC - Fetch Option ISP Agreement"]
    COND_ISP["eKK0361A010Hash not empty"]
    STAT_CHECK["Stat in 020, 030, 100, 210, or 220"]
    EXTRACT_POPWEB["Extract tmpPopId, tmpWebId"]
    POP_CHECK["tmpPopId not empty"]
    WEB_CHECK["tmpWebId not empty"]
    ADD_SVCKEI_ISP["Add to OPSVKEI_ISP list"]
    ADD_POP["Add to POP instruction lists"]
    ADD_WEB["Add to WEB instruction lists"]
    COND_TEL["svcSbtCd == 4 (Phone)"]
    CALL4["callEKK0371A010SC - Fetch Option Telephone Agreement"]
    ADD_TEL["Add to OPSVKEI_TEL list"]
    CALL5["callEKK0401B001SC - Fetch Sub-Option List"]
    SUB_LOOP["Loop: For each Sub-Option Agreement"]
    NEW2["Create eKK0401A010Hash"]
    CALL6["callEKK0401A010SC - Fetch Sub-Option Details"]
    ADD_SUB["Add to SBOP_SVC_KEI list"]
    GET_SUBSTAT["Get tmpSbOpStat"]
    SUB_NET["svcSbtCd == 1, 3, or 2 (Net/ADSL/Mobile)"]
    CALL7["callEKK0411A010SC - Fetch Sub-Option ISP Agreement"]
    ADD_SUB_ISP["Add to SBOPSVKEI_ISP list"]
    ADD_MAIN["Add to OP_SVC_KEI list"]
    SET_WORK["Set all results in workField (10 keys)"]
    RETURN("Return statusCode")

    START --> INIT --> CALL1 --> LOOP1
    LOOP1 --> NEW1 --> CALL2 --> GETSTAT --> COND_RMT
    COND_RMT -- Yes --> COND_NET
    COND_NET -- Yes --> CALL3 --> COND_ISP
    COND_ISP -- Yes --> STAT_CHECK
    STAT_CHECK -- Yes --> EXTRACT_POPWEB
    EXTRACT_POPWEB --> POP_CHECK
    POP_CHECK -- Yes --> ADD_POP
    POP_CHECK -- No --> WEB_CHECK
    WEB_CHECK -- Yes --> ADD_WEB
    WEB_CHECK -- No --> ADD_SVCKEI_ISP
    ADD_WEB --> ADD_SVCKEI_ISP
    ADD_POP --> ADD_SVCKEI_ISP
    COND_ISP -- No --> CALL5
    ADD_SVCKEI_ISP --> CALL5
    COND_NET -- No --> COND_TEL
    COND_TEL -- Yes --> CALL4 --> ADD_TEL --> CALL5
    COND_RMT -- No --> CALL5
    CALL5 --> SUB_LOOP
    SUB_LOOP --> NEW2 --> CALL6 --> ADD_SUB --> GET_SUBSTAT
    GET_SUBSTAT --> SUB_NET
    SUB_NET -- Yes --> CALL7 --> ADD_SUB_ISP --> ADD_MAIN
    SUB_NET -- No --> ADD_MAIN
    ADD_MAIN --> LOOP1
    LOOP1 --> SET_WORK --> RETURN
```

## 3. Parameter Analysis

| No | Parameter Name | Type | Business Description |
|----|---------------|------|---------------------|
| 1 | `param` | `IRequestParameterReadWrite` | Request parameter object carrying the cancellation request context — includes control maps and data maps shared across the service contract cancellation workflow. |
| 2 | `handle` | `SessionHandle` | Session handle providing database connection and transaction context. Passed through to all called SC methods. |
| 3 | `svcSbtCd` | `int` | Service subtype code that determines which agreement branches to execute. Values: `1` = eo Hikari Net (eo光ネット), `3` = eo ADSL, `2` = eo Mobile (eoモバイル), `4` = eo Hikari Telephone (eo光電話). Directs whether ISP, telephone, or both agreement types are retrieved. |
| 4 | `trgt_data` | `HashMap<String, Object>` | Application-specific input parameter map containing the target service contract identifier and search criteria used to query option and sub-option agreements. |
| 5 | `workField` | `HashMap<String, Object>` | Result storage area — the method populates 10 keys with the aggregated option/sub-option agreement data for the caller to consume. See block below for key names. |

**WorkField output keys (populated via `workField.put()`):**

| Key | Value | Business Description |
|-----|-------|---------------------|
| `OP_SVC_KEI` (key: `"op_svc_kei"`) | `ArrayList<HashMap>` | All option service agreement detail list |
| `OPSVKEI_ISP` (key: `"opsvkei_isp"`) | `ArrayList<HashMap>` | All option ISP agreement list |
| `OPSVKEI_TEL` (key: `"opsvkei_tel"`) | `ArrayList<HashMap>` | All option telephone agreement list |
| `SBOP_SVC_KEI` (key: `"sbop_svc_kei"`) | `ArrayList<HashMap>` | All sub-option service agreement list |
| `SBOPSVKEI_ISP` (key: `"sbopsvkei_isp"`) | `ArrayList<HashMap>` | All sub-option ISP agreement list |
| `OP_SVC_KEI_POP` (key: `"op_svc_kei_pop"`) | `ArrayList<HashMap>` | Option agreement data for POP ID instruction document registration |
| `OPSVKEI_ISP_POP` (key: `"opsvkei_isp_pop"`) | `ArrayList<HashMap>` | Option ISP data for POP ID instruction document registration |
| `OP_SVC_KEI_WEB` (key: `"op_svc_kei_web"`) | `ArrayList<HashMap>` | Option agreement data for WEB ID instruction document registration |
| `OPSVKEI_ISP_WEB` (key: `"opsvkei_isp_web"`) | `ArrayList<HashMap>` | Option ISP data for WEB ID instruction document registration |

## 4. CRUD Operations / Called Services

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

| CRUD | SC / CBS | SC Code | Entity / DB | Operation Description |
|------|----------|---------|-------------|----------------------|
| R | `JKKCancelSvcKeiCC.callEKK0351B010SC` | EKK0351B010SC | KK_T_OP_SVC_KEI (option service agreement header) | Fetches the list of option service agreements for the target service contract |
| R | `JKKCancelSvcKeiCC.callEKK0351A010SC` | EKK0351A010SC | KK_T_OP_SVC_KEI (option service agreement details) | Fetches detailed option service agreement information for each contract line item |
| R | `JKKCancelSvcKeiCC.callEKK0361A010SC` | EKK0361A010SC | KK_T_OP_SVKEI_ISP (option ISP agreement) | Fetches ISP-specific agreement data (POP_ID, WEB_ID) for option service agreements |
| R | `JKKCancelSvcKeiCC.callEKK0371A010SC` | EKK0371A010SC | KK_T_OP_SVKEI_TEL (option telephone agreement) | Fetches telephone-specific agreement data for option service agreements |
| R | `JKKCancelSvcKeiCC.callEKK0401B001SC` | EKK0401B001SC | KK_T_SBOP_SVC_KEI (sub-option service agreement header) | Fetches the list of sub-option service agreements associated with an option agreement |
| R | `JKKCancelSvcKeiCC.callEKK0401A010SC` | EKK0401A010SC | KK_T_SBOP_SVC_KEI (sub-option service agreement details) | Fetches detailed sub-option service agreement information for each line item |
| R | `JKKCancelSvcKeiCC.callEKK0411A010SC` | EKK0411A010SC | KK_T_SBOP_SVKEI_ISP (sub-option ISP agreement) | Fetches ISP-specific agreement data for sub-option service agreements |

All 7 calls are **Read (R)** operations — this method exclusively queries data without creating, updating, or deleting any records. It is a pure data retrieval and aggregation method.

## 5. Dependency Trace

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

No screen/batch entry points found within 8 hops. Direct callers found: 1 method.
Terminal operations from this method: `callEKK0411A010SC` [R], `callEKK0401A010SC` [R], `callEKK0401B001SC` [R], `callEKK0371A010SC` [R], `callEKK0361A010SC` [R], `callEKK0351A010SC` [R], `callEKK0351B010SC` [R]

| # | Caller (Screen/Batch) | Call Chain (Full Path to this Method) | Terminal (SC / CRUD / Entity) |
|---|----------------------|--------------------------------------|-------------------------------|
| 1 | CC: `cancelSvcKei` | `JKKCancelSvcKeiCC.cancelSvcKei` → `ctlCancelData` → `getOpSbopKeiData` | `callEKK0351B010SC [R] KK_T_OP_SVC_KEI`, `callEKK0351A010SC [R] KK_T_OP_SVC_KEI`, `callEKK0361A010SC [R] KK_T_OP_SVKEI_ISP`, `callEKK0371A010SC [R] KK_T_OP_SVKEI_TEL`, `callEKK0401B001SC [R] KK_T_SBOP_SVC_KEI`, `callEKK0401A010SC [R] KK_T_SBOP_SVC_KEI`, `callEKK0411A010SC [R] KK_T_SBOP_SVKEI_ISP` |

The sole caller is the `cancelSvcKei` method within the same class (`JKKCancelSvcKeiCC`), which serves as the main entry point for the **service contract cancellation execution control processing** (サービス契約キャンセル実行制御処理). This method is called as part of the cancellation workflow after data extraction control (`ctlChshtData`) and cancellation data control (`ctlCancelData`) are invoked.

## 6. Per-Branch Detail Blocks

**Block 1** — [VARIABLE DECLARATIONS] (L1998)

> Initialize return status code and declare all 18 local data structures (HashMaps and ArrayLists) for storing option and sub-option agreement results.

| # | Type | Code |
|---|------|------|
| 1 | SET | `statusCode = STAT_NORMAL` [-> STAT_NORMAL="0"] |
| 2 | SET | `eKK0351A010Hash = new HashMap` — Option service agreement detail result (オプションサービス契約一覧照会結果) |
| 3 | SET | `eKK0351B010HashList = new ArrayList` — Option service agreement list result (オプションサービス契約一覧照会結果) |
| 4 | SET | `eKK0351A010HashListAll = new ArrayList` — All option service agreement detail results (オプションサービス契約一覧照会結果（全結果）) |
| 5 | SET | `eKK0361A010Hash = new HashMap` — Option ISP agreement detail result (オプションサービス契約<ISP>照会結果) |
| 6 | SET | `eKK0361A010HashListAll = new ArrayList` — All option ISP agreement results (オプションサービス契約<ISP>照会結果（全結果）) |
| 7 | SET | `eKK0371A010Hash = new HashMap` — Option telephone agreement detail result (オプションサービス契約<電話>照会結果) |
| 8 | SET | `eKK0371A010HashListAll = new ArrayList` — All option telephone agreement results (オプションサービス契約<電話>照会結果（全結果）) |
| 9 | SET | `eKK0401B001HashList = new ArrayList` — Sub-option service agreement list result (サブオプションサービス契約一覧照会結果) |
| 10 | SET | `eKK0401A010Hash = new HashMap` — Sub-option service agreement detail result (サブオプションサービス契約照会結果) |
| 11 | SET | `eKK0401A010HashList = new ArrayList` — Sub-option service agreement detail list (サブオプションサービス契約一覧照会結果) |
| 12 | SET | `eKK0411A010Hash = new HashMap` — Sub-option ISP agreement detail result (サブオプションサービス契約<ISP>照会結果) |
| 13 | SET | `eKK0411A010HashAll = new ArrayList` — All sub-option ISP agreement results (サブオプションサービス契約<ISP>照会結果（全結果）) |
| 14 | SET | `shijisyoPopHashList = new ArrayList` — Option agreement data for POP ID instruction document registration (POPID_指示書登録用) |
| 15 | SET | `shijisyoPopChildHashList = new ArrayList` — Option ISP data for POP ID instruction document registration |
| 16 | SET | `shijisyoWebHashList = new ArrayList` — Option agreement data for WEB ID instruction document registration (WEBID_指示書登録用) |
| 17 | SET | `shijisyoWebChildHashList = new ArrayList` — Option ISP data for WEB ID instruction document registration |

**Block 2** — [CALL] Outer service: Fetch option agreement list (L2033)

> Query the database for all option service agreements associated with the target service contract. This is the outer-level data fetch.

| # | Type | Code |
|---|------|------|
| 1 | CALL | `callEKK0351B010SC(param, handle, trgt_data, eKK0351B010HashList)` — Fetch option service agreement list (オプションサービス契約一覧照会) |

**Block 3** — [FOR LOOP] Iterate over option service agreements (L2035)

> Outer loop: process each option service agreement found. For each, fetch details, branch on service type, then fetch sub-option agreements.

| # | Type | Code |
|---|------|------|
| 1 | SET | `i = 0` ; condition `i < eKK0351B010HashList.size()` ; increment `i++` |

**Block 3.1** — [CALL] Fetch option service agreement details (L2038)

> For each option in the list, fetch its detailed agreement information.

| # | Type | Code |
|---|------|------|
| 1 | SET | `eKK0351A010Hash = new HashMap` |
| 2 | CALL | `callEKK0351A010SC(param, handle, eKK0351B010HashList.get(i), eKK0351A010Hash)` — Fetch option service agreement details (オプションサービス契約照会) |

**Block 3.2** — [CALL] Extract status and option service code (L2041)

> Retrieve the agreement status and option service code from the detail result for conditional branching.

| # | Type | Code |
|---|------|------|
| 1 | SET | `tmpSvcKeiStat = (String)eKK0351A010Hash.get(OP_SVC_KEI_STAT)` [-> "op_svc_kei_stat"] |
| 2 | SET | `tmpOpSvcCd = (String)eKK0351A010Hash.get(OP_SVC_CD)` [-> "op_svc_cd"] |

**Block 4** — [IF] Skip Remote Support Plus agreements (L2048)

> Option service code "B021" corresponds to Remote Support Plus (リモートサポートプラス), a specialty service that is excluded from standard option/sub-option agreement processing.

| # | Type | Code |
|---|------|------|
| 1 | IF | `!OP_SVC_CD_RMTSPRTPLUS.equals(tmpOpSvcCd)` [OP_SVC_CD_RMTSPRTPLUS = "B021"] (Skip this branch if option service code is Remote Support Plus) |

**Block 4.1** — [IF] Network-type service processing (L2051)

> When the service subtype is eo Hikari Net (1), eo ADSL (3), or eo Mobile (2), fetch ISP-specific agreement data.

| # | Type | Code |
|---|------|------|
| 1 | IF | `svcSbtCd == SVC_SBT_CD_HNET` [1] `|| svcSbtCd == SVC_SBT_CD_ADSL` [3] `|| svcSbtCd == SVC_SBT_CD_MOBA` [2] (eo Net/ADSL/Mobile) |

**Block 4.1.1** — [CALL] Fetch option ISP agreement (L2056)

> Query ISP-specific agreement data (POP_ID, WEB_ID, etc.) for the option service agreement.

| # | Type | Code |
|---|------|------|
| 1 | SET | `eKK0361A010Hash = new HashMap` |
| 2 | CALL | `callEKK0361A010SC(param, handle, eKK0351A010Hash, eKK0361A010Hash)` — Fetch option ISP agreement (オプションサービス契約<ISP>照会) |

**Block 4.1.2** — [IF] ISP result not empty (L2058)

> Only process ISP data if it was returned by the query.

| # | Type | Code |
|---|------|------|
| 1 | IF | `eKK0361A010Hash.size() != 0` |

**Block 4.1.2.1** — [SET] Propagate status and add to list (L2061)

> Attach the option agreement's status to the ISP result and store it in the aggregated list.

| # | Type | Code |
|---|------|------|
| 1 | SET | `eKK0361A010Hash.put(OP_SVC_KEI_STAT, tmpSvcKeiStat)` |
| 2 | SET | `eKK0361A010HashListAll.add(eKK0361A010Hash)` |

**Block 4.1.2.2** — [IF] Status is inspection-complete or beyond (L2070)

> Extract POP ID and WEB ID for instruction document registration only when the agreement has progressed past initial receipt. The comment reads: "Below is data acquisition for instruction document registration — currently awaiting instruction document CC IF, so only acquisition" (以下は指示書登録向けデータ取得処理 / 現在は指示書CCのIF待つのため取得のみ).

| # | Type | Code |
|---|------|------|
| 1 | IF | `tmpSvcKeiStat` matches any of: `STAT_SHOSA_ZUMI` [020] (inspection complete), `STAT_CNC_ZUMI` [030] (cancellation complete), `STAT_SVCTK_CHU` [100] (service in progress), `STAT_PAUSE_STP_CHU` [210] (suspension/interruption in progress), `STAT_STP_CHU` [220] (stopped) |

**Block 4.1.2.2.1** — [SET] Extract POP_ID and WEB_ID (L2079)

> Retrieve the POP ID and WEB ID fields from the ISP agreement for instruction document generation.

| # | Type | Code |
|---|------|------|
| 1 | SET | `tmpWebId = ""` |
| 2 | SET | `tmpPopId = ""` |
| 3 | SET | `tmpPopId = (String)eKK0361A010Hash.get(POP_ID)` [from EKK0361A010CBSMsg1List] |
| 4 | SET | `tmpWebId = (String)eKK0361A010Hash.get(WEB_ID)` [from EKK0361A010CBSMsg1List] |

**Block 4.1.2.2.2** — [IF] POP ID exists (L2083)

> If a POP ID is present, add the agreement data to the POP instruction document registration lists.

| # | Type | Code |
|---|------|------|
| 1 | IF | `!"".equals(tmpPopId)` |

**Block 4.1.2.2.2.1** — [SET] Add to POP instruction lists (L2086)

> Store the option agreement detail and ISP agreement in separate lists for POP ID-based instruction document processing.

| # | Type | Code |
|---|------|------|
| 1 | SET | `shijisyoPopHashList.add(eKK0351A010Hash)` |
| 2 | SET | `shijisyoPopChildHashList.add(eKK0361A010Hash)` |

**Block 4.1.2.2.3** — [IF] WEB ID exists (L2089)

> If a WEB ID is present, add the agreement data to the WEB instruction document registration lists.

| # | Type | Code |
|---|------|------|
| 1 | IF | `!"".equals(tmpWebId)` |

**Block 4.1.2.2.3.1** — [SET] Add to WEB instruction lists (L2092)

> Store the option agreement detail and ISP agreement in separate lists for WEB ID-based instruction document processing.

| # | Type | Code |
|---|------|------|
| 1 | SET | `shijisyoWebHashList.add(eKK0351A010Hash)` |
| 2 | SET | `shijisyoWebChildHashList.add(eKK0361A010Hash)` |

**Block 4.2** — [ELSE IF] Phone-type service processing (L2098)

> When the service subtype is eo Hikari Telephone (4), fetch telephone-specific agreement data for the option service.

| # | Type | Code |
|---|------|------|
| 1 | IF | `svcSbtCd == SVC_SBT_CD_HTEL` [4] (eo Hikari Telephone) |

**Block 4.2.1** — [CALL] Fetch option telephone agreement (L2101)

> Query telephone-specific agreement data for the option service agreement.

| # | Type | Code |
|---|------|------|
| 1 | SET | `eKK0371A010Hash = new HashMap` |
| 2 | CALL | `callEKK0371A010SC(param, handle, eKK0351A010Hash, eKK0371A010Hash)` — Fetch option telephone agreement (オプションサービス契約<電話>照会) |

**Block 4.2.2** — [IF] Telephone result not empty (L2104)

> Only process telephone data if it was returned by the query.

| # | Type | Code |
|---|------|------|
| 1 | IF | `eKK0371A010Hash.size() != 0` |

**Block 4.2.2.1** — [SET] Propagate status and add to list (L2107)

> Attach the option agreement's status to the telephone result and store it in the aggregated list.

| # | Type | Code |
|---|------|------|
| 1 | SET | `eKK0371A010Hash.put(OP_SVC_KEI_STAT, tmpSvcKeiStat)` |
| 2 | SET | `eKK0371A010HashListAll.add(eKK0371A010Hash)` |

**Block 5** — [CALL] Fetch sub-option agreement list (L2113)

> After handling option-level agreements, query for all sub-option service agreements tied to the current option agreement. Re-initialize the list for each option iteration.

| # | Type | Code |
|---|------|------|
| 1 | SET | `eKK0401B001HashList = new ArrayList` |
| 2 | CALL | `callEKK0401B001SC(param, handle, eKK0351A010Hash, eKK0401B001HashList)` — Fetch sub-option service agreement list (サブオプションサービス契約一覧照会) |

**Block 6** — [IF] Sub-option list not empty (L2115)

> Only iterate sub-options if any exist for this option agreement.

| # | Type | Code |
|---|------|------|
| 1 | IF | `eKK0401B001HashList.size() != 0` |

**Block 6.1** — [FOR LOOP] Iterate over sub-option agreements (L2117)

> Inner loop: process each sub-option service agreement under the current option agreement.

| # | Type | Code |
|---|------|------|
| 1 | SET | `j = 0` ; condition `j < eKK0401B001HashList.size()` ; increment `j++` |

**Block 6.1.1** — [CALL] Fetch sub-option agreement details (L2120)

> Retrieve detailed sub-option agreement information for the current sub-option item.

| # | Type | Code |
|---|------|------|
| 1 | SET | `eKK0401A010Hash = new HashMap` |
| 2 | CALL | `callEKK0401A010SC(param, handle, eKK0401B001HashList.get(j), eKK0401A010Hash)` — Fetch sub-option service agreement details (サブオプションサービス契約照会) |

**Block 6.1.2** — [SET] Store sub-option detail and get status (L2123)

> Store the sub-option detail in the working list and extract its status for ISP branching.

| # | Type | Code |
|---|------|------|
| 1 | SET | `eKK0401A010HashList.add(eKK0401A010Hash)` |
| 2 | SET | `tmpSbOpStat = (String)eKK0401A010Hash.get(SBOP_SVC_KEI_STAT)` [-> "sbop_svc_kei_stat"] |

**Block 6.2** — [IF] Sub-option ISP for network-type services (L2126)

> For network-type services (Net/ADSL/Mobile), also fetch the ISP agreement for each sub-option.

| # | Type | Code |
|---|------|------|
| 1 | IF | `svcSbtCd == SVC_SBT_CD_HNET` [1] `|| svcSbtCd == SVC_SBT_CD_ADSL` [3] `|| svcSbtCd == SVC_SBT_CD_MOBA` [2] |

**Block 6.2.1** — [CALL] Fetch sub-option ISP agreement (L2129)

> Query ISP-specific data for the sub-option service agreement.

| # | Type | Code |
|---|------|------|
| 1 | SET | `eKK0411A010Hash = new HashMap` |
| 2 | CALL | `callEKK0411A010SC(param, handle, eKK0401B001HashList.get(j), eKK0411A010Hash)` — Fetch sub-option ISP agreement (サブオプションサービス契約<ISP>照会) |

**Block 6.2.2** — [IF] Sub-option ISP result not empty (L2131)

> Only propagate and store sub-option ISP data if returned.

| # | Type | Code |
|---|------|------|
| 1 | IF | `eKK0411A010Hash.size() != 0` |

**Block 6.2.2.1** — [SET] Propagate status and add to aggregated list (L2134)

> Attach the sub-option's status to the ISP result and store it.

| # | Type | Code |
|---|------|------|
| 1 | SET | `eKK0411A010Hash.put(SBOP_SVC_KEI_STAT, tmpSbOpStat)` |
| 2 | SET | `eKK0411A010HashAll.add(eKK0411A010Hash)` |

**Block 7** — [SET] Add option agreement to all-agreements list (L2139)

> After processing all sub-options, add the current option service agreement detail to the aggregated list of all option agreements.

| # | Type | Code |
|---|------|------|
| 1 | SET | `eKK0351A010HashListAll.add(eKK0351A010Hash)` |

**Block 8** — [SET] Populate workField with all results (L2143)

> Final aggregation step: store all 10 data structures into the `workField` HashMap under their respective keys for the caller to consume.

| # | Type | Code |
|---|------|------|
| 1 | SET | `workField.put(OP_SVC_KEI, eKK0351A010HashListAll)` — Set option service agreement list |
| 2 | SET | `workField.put(OPSVKEI_ISP, eKK0361A010HashListAll)` — Set option ISP agreement list |
| 3 | SET | `workField.put(OPSVKEI_TEL, eKK0371A010HashListAll)` — Set option telephone agreement list |
| 4 | SET | `workField.put(SBOP_SVC_KEI, eKK0401A010HashList)` — Set sub-option service agreement list |
| 5 | SET | `workField.put(SBOPSVKEI_ISP, eKK0411A010HashAll)` — Set sub-option ISP agreement list |
| 6 | SET | `workField.put(OP_SVC_KEI_POP, shijisyoPopHashList)` — Set option agreement POP ID instruction data |
| 7 | SET | `workField.put(OPSVKEI_ISP_POP, shijisyoPopChildHashList)` — Set option ISP POP ID instruction data |
| 8 | SET | `workField.put(OP_SVC_KEI_WEB, shijisyoWebHashList)` — Set option agreement WEB ID instruction data |
| 9 | SET | `workField.put(OPSVKEI_ISP_WEB, shijisyoWebChildHashList)` — Set option ISP WEB ID instruction data |

**Block 9** — [RETURN] Return status code (L2153)

> Return the initialization status code (always 0, as no error paths exist within this method).

| # | Type | Code |
|---|------|------|
| 1 | RETURN | `return statusCode` [-> 0] |

## 7. Glossary

| Term | Type | Business Meaning |
|------|------|------------------|
| `svcSbtCd` | Field | Service subtype code — classifies the main service type (Net=1, ADSL=3, Mobile=2, Phone=4, TV=5, Default=0) |
| `svc_kei_stat` | Field | Service contract status — indicates the current state of a service contract line item |
| `op_svc_kei_no` | Field | Option service contract number — unique identifier for an option service contract |
| `op_svc_kei_stat` | Field | Option service contract status — status code of the option service agreement |
| `op_svc_cd` | Field | Option service code — code identifying the type of optional service (e.g., "B021" = Remote Support Plus) |
| `sbop_svc_kei_stat` | Field | Sub-option service contract line status — status of a sub-option agreement line item |
| `pop_id` | Field | POP (Point of Presence) ID — network access point identifier used for instruction document registration |
| `web_id` | Field | WEB ID — internet identifier used for instruction document registration |
| `op_svc_kei` | Key | Option service agreement — HashMap key for the list of option service agreement details |
| `opsvkei_isp` | Key | Option ISP agreement — HashMap key for the list of ISP-specific option agreement data |
| `opsvkei_tel` | Key | Option telephone agreement — HashMap key for the list of telephone-specific option agreement data |
| `sbop_svc_kei` | Key | Sub-option service agreement — HashMap key for the list of sub-option service agreement details |
| `sbopsvkei_isp` | Key | Sub-option ISP agreement — HashMap key for the list of ISP-specific sub-option agreement data |
| `op_svc_kei_pop` | Key | Option agreement POP ID instruction data — HashMap key for POP ID-based instruction document registration |
| `opsvkei_isp_pop` | Key | Option ISP POP ID instruction data — HashMap key for ISP data used in POP ID instruction documents |
| `op_svc_kei_web` | Key | Option agreement WEB ID instruction data — HashMap key for WEB ID-based instruction document registration |
| `opsvkei_isp_web` | Key | Option ISP WEB ID instruction data — HashMap key for ISP data used in WEB ID instruction documents |
| STAT_NORMAL | Constant | Normal termination status code — value "0" |
| STAT_SHOSA_ZUMI | Constant | Inspection complete status — value "020" (照会済) |
| STAT_CNC_ZUMI | Constant | Cancellation complete status — value "030" (締結済) |
| STAT_SVCTK_CHU | Constant | Service in progress status — value "100" (サービス提供中) |
| STAT_PAUSE_STP_CHU | Constant | Suspension/interruption in progress status — value "210" (休止・中断中) |
| STAT_STP_CHU | Constant | Stopped status — value "220" (停止中) |
| STAT_UK_ZUMI | Constant | Receipt complete status — value "010" (受注済) |
| STAT_DSL_ZUMI | Constant | Contract termination complete status — value "910" (解消済) |
| STAT_CNCL_ZUMI | Constant | Cancellation complete status — value "920" (キャンセル済) |
| SVC_SBT_CD_HNET | Constant | eo Hikari Net service subtype — value 1 |
| SVC_SBT_CD_ADSL | Constant | eo ADSL service subtype — value 3 |
| SVC_SBT_CD_MOBA | Constant | eo Mobile service subtype — value 2 |
| SVC_SBT_CD_HTEL | Constant | eo Hikari Telephone service subtype — value 4 |
| SVC_SBT_CD_HTV | Constant | eo Hikari TV service subtype — value 5 |
| OP_SVC_CD_RMTSPRTPLUS | Constant | Remote Support Plus option service code — value "B021" |
| eo光ネット (Hikari Net) | Business term | Fiber-optic broadband internet service offered by K-Opticom |
| eo光電話 (Hikari Telephone) | Business term | IP-based telephone service offered by K-Opticom |
| eoモバイル (Mobile) | Business term | Mobile communication service offered by K-Opticom |
| リモートサポートプラス (Remote Support Plus) | Business term | Premium remote technical support optional service |
| オプション契約 (Option Contract) | Business term | Optional/add-on service contract attached to a main service contract |
| サブオプション契約 (Sub-Option Contract) | Business term | Contract for a service that is an option of an option — i.e., a nested optional service |
| ISP | Business term | Internet Service Provider — in this context, the internet access component of broadband subscriptions |
| POP | Business term | Point of Presence — a network access location; POP ID is used for customer instruction document registration |
| WEB ID | Field | Web identifier assigned to customers for internet service access; used in instruction document registration |
| 指示書 (Shijisho) | Business term | Customer instruction document — documentation sent to customers regarding service setup |
| K-Opticom | Business term | Japanese telecommunications operator (K-Opticom Corporation) offering fiber-optic broadband, telephone, and mobile services |
| SC | Technical term | Service Component — the service layer that handles business logic and database operations (e.g., EKK0351A010SC) |
| CC | Technical term | Common Component / Control Component — the business logic wrapper layer containing shared processing methods |
| SC Code Pattern | Technical term | Service Component code format: 3-letter prefix + 4 digits + letter + 3 digits + SC suffix (e.g., EKK0351A010SC) |
