# Business Logic — JFUDslNetOpSvcKeiCC.dslOpSvcKeiHp() [211 LOC]

| Field | Value |
|-------|-------|
| Fully Qualified Name | `com.fujitsu.futurity.bp.custom.common.JFUDslNetOpSvcKeiCC` |
| Layer | CC / Common Component (Shared business logic component extending `JFUBaseNetChgCommonCC`) |
| Module | `common` (Package: `com.fujitsu.futurity.bp.custom.common`) |

## 1. Role

### JFUDslNetOpSvcKeiCC.dslOpSvcKeiHp()

This method executes the **NTT East Hikari (eo光) Option Service Contract Cancellation** workflow specifically for the **My Homepage Capacity (Home Page Capacity Addition)** service type. It is the core backend handler that processes a user's request to cancel their optional add-on service — namely, the extra storage capacity purchased as part of their My Homepage package — within the broader DSL network option contract cancellation flow. The method follows a **sequential service-routing pattern**, initializing request data, mapping business data, and invoking a chain of Service Component (SC) calls that collectively handle application detail registration, pre-change data retrieval, option/sub-option updates, post-change data retrieval, and progress logging.

The method handles a single service category: **CD00137 D04 — "Home Page Capacity Addition" (ホームページ容量追加)**. It filters the sub-option service contract list by this code, skipping any other add-on services (such as mail access or virus check). Within the matching sub-options, it performs a complete before/after SOD (Service Order Data) synchronization cycle, ensuring the legacy SOD system remains consistent through pre-change reads, updates, and post-change reads.

As a shared utility component, this method is called by `dslOpSvcKei()` within the same class, which acts as the public dispatcher routing between different cancellation types (Mail Access, Mail WISCH Service, My Homepage Capacity Reduction). It is NOT a screen entry point — it is an internal processing method designed to be invoked as part of a multi-step cancellation transaction.

## 2. Processing Pattern (Detailed Business Logic)

```mermaid
flowchart TD
    START(["dslOpSvcKeiHp Start"])

    START --> INIT_LOG["Log: dslOpSvcKeiHp Start"]
    INIT_LOG --> GET_MAP["Get inMap from param.getData(fixedText)"]

    GET_MAP --> INPUT_SECTION["Input Data Extraction"]
    INPUT_SECTION --> EXTRACT_SYSID["Extract sysid, lastUpdDtm, opSvcKeiDslList"]

    EXTRACT_SYSID --> VALIDATE_INPUT{"Input validation: sysid, lastUpdDtm, opSvcKeiDslList valid?"}

    VALIDATE_INPUT -->|No| ERROR_THROW["Throw SCCallException RELATION_ERR"]
    VALIDATE_INPUT -->|Yes| APPLY_SECTION["Application Detail Registration"]

    ERROR_THROW --> END_NODE(["Return param"])

    APPLY_SECTION --> INIT_EKK0011["initData IN_COL_LIST_EKK0011D020"]
    INIT_EKK0011 --> SET_EKK0011["setInMapEKK0011D020 sysid"]
    SET_EKK0011 --> EXEC_EKK0011["executeSC TEMP_ID_EKK0011D020"]
    EXEC_EKK0011 --> GET_EKK0011["getTemplateListMap mskmNaiyoMap"]

    GET_EKK0011 --> INIT_EKK0021["initData IN_COL_LIST_EKK0021C060"]
    INIT_EKK0021 --> SET_EKK0021["setInMapEKK0021C060 mskmUpdDtm mskmNaiyoMap"]
    SET_EKK0021 --> EXEC_EKK0021["executeSC TEMP_ID_EKK0021C060"]

    EXEC_EKK0021 --> OPSVC_LOOP{"For each opSvcKeiDslList entry"}

    OPSVC_LOOP -->|Next| VALIDATE_OPSVC{"opSvcKeiNo valid?"}
    OPSVC_LOOP -->|Done| FINISH_LOG["Log: dslOpSvcKeiHp Start"]
    FINISH_LOG --> END_NODE

    VALIDATE_OPSVC -->|No| ERROR_OPSVC["Throw SCCallException RELATION_ERR"]
    VALIDATE_OPSVC -->|Yes| PRE_CHANGE["SOD Pre-Change Data Retrieval"]

    PRE_CHANGE --> INIT_EKK0351["initData IN_COL_LIST_EKK0351A010"]
    INIT_EKK0351 --> SET_EKK0351["setInMapEKK0351A010 opSvcKeiNo"]
    SET_EKK0351 --> EXEC_EKK0351["executeSC TEMP_ID_EKK0351A010"]

    EXEC_EKK0351 --> GET_OP_INFO["getTemplateListMap opInfoMapBf"]

    GET_OP_INFO --> INIT_EKK0361["initData IN_COL_LIST_EKK0361A010"]
    INIT_EKK0361 --> SET_EKK0361["setInMapEKK0361A010 opInfoMapBf"]
    SET_EKK0361 --> EXEC_EKK0361["executeSC TEMP_ID_EKK0361A010"]

    EXEC_EKK0361 --> GET_OP_ISP["getTemplateListMap opIspInfoMapBf"]

    GET_OP_ISP --> INIT_EKK0401B["initData IN_COL_LIST_EKK0401B001"]
    INIT_EKK0401B --> IGNORE_ERR["ignoreSearchError"]
    IGNORE_ERR --> SET_EKK0401B["setInMapEKK0401B001 opInfoMapBf"]
    SET_EKK0401B --> EXEC_EKK0401B["executeSC TEMP_ID_EKK0401B001"]

    EXEC_EKK0401B --> GET_SBOP_LIST["getTemplateList sbopSvcKeiList"]

    GET_SBOP_LIST --> SBOP_LOOP{"For each sbopSvcKeiList entry"}

    SBOP_LOOP -->|Next| CHECK_D04{"sbop_svc_cd == CD00137_D04 D04?"}
    SBOP_LOOP -->|Done| OPSVC_LOOP

    CHECK_D04 -->|No| CONTINUE["continue skip"]
    CHECK_D04 -->|Yes| SOD_MAP_PRE["setSODMappingOpBf pre-change"]

    CONTINUE --> SBOP_LOOP

    SOD_MAP_PRE --> OPT_CHANGE["Option Change Processing"]

    OPT_CHANGE --> INIT_EKK0361C["initData IN_COL_LIST_EKK0361C050"]
    INIT_EKK0361C --> SET_EKK0361C["setInMapEKK0361C050 dslMap opInfoMapBf opIspInfoMapBf mskmNaiyoMap lastUpdDtm"]
    SET_EKK0361C --> EXEC_EKK0361C["executeSC TEMP_ID_EKK0361C050"]
    EXEC_EKK0361C --> UPDATE_LAST_UPD["lastUpdDtm = EKK0351C240CBSMsg.UPD_DTM"]

    UPDATE_LAST_UPD --> SUBOP_CHANGE["Sub-Option Change Processing"]

    SUBOP_CHANGE --> INIT_EKK0411A["initData IN_COL_LIST_EKK0411A010"]
    INIT_EKK0411A --> SET_EKK0411A["setInMapEKK0411A010 sbopInfoMapBf"]
    SET_EKK0411A --> EXEC_EKK0411A["executeSC TEMP_ID_EKK0411A010"]
    EXEC_EKK0411A --> GET_SBOP_ISP["getTemplateListMap sbopIspInfoMap"]

    GET_SBOP_ISP --> INIT_EKK0411C["initData IN_COL_LIST_EKK0411C010"]
    INIT_EKK0411C --> SET_EKK0411C["setInMapEKK0411C010 dslMap sbopIspInfoMap mskmNaiyoMap lastUpdDtm"]
    SET_EKK0411C --> EXEC_EKK0411C["executeSC TEMP_ID_EKK0411C010"]
    EXEC_EKK0411C --> UPDATE_LAST_UPD2["lastUpdDtm = EKK0411C010CBSMsg.UPD_DTM"]

    UPDATE_LAST_UPD2 --> SOD_POST_CHANGE["SOD Post-Change Data Retrieval"]

    SOD_POST_CHANGE --> INIT_EKK0351_POST["initData IN_COL_LIST_EKK0351A010"]
    INIT_EKK0351_POST --> SET_EKK0351_POST["setInMapEKK0351A010 opSvcKeiNo"]
    SET_EKK0351_POST --> EXEC_EKK0351_POST["executeSC TEMP_ID_EKK0351A010"]
    EXEC_EKK0351_POST --> GET_OP_INFO_AF["getTemplateListMap opInfoMapAf"]

    GET_OP_INFO_AF --> INIT_EKK0401A["initData IN_COL_LIST_EKK0401A010"]
    INIT_EKK0401A --> SET_EKK0401A["setInMapEKK0401A010 opSvcKeiNo sbopSvcKeiNo"]
    SET_EKK0401A --> EXEC_EKK0401A["executeSC TEMP_ID_EKK0401A010"]
    EXEC_EKK0401A --> GET_SBOP_AF["getTemplateListMap sbopInfoMapAf"]

    GET_SBOP_AF --> SOD_MAP_POST["setSODMappingOpAf post-change"]

    SOD_MAP_POST --> PROGRESS["Progress Registration"]

    PROGRESS --> INIT_EKK1091["initData IN_COL_LIST_EKK1091D010"]
    INIT_EKK1091 --> SET_EKK1091["setInMapEKK1091D010 dslMap mskmNaiyoMap"]
    SET_EKK1091 --> EXEC_EKK1091["executeSC TEMP_ID_EKK1091D010"]

    EXEC_EKK1091 --> SBOP_LOOP
    ERROR_OPSVC --> END_NODE
```

**Processing Flow Summary:**

1. **Initialization & Validation**: Extracts `sysid`, `lastUpdDtm`, and the option service cancellation list from the request map. Throws an error if any are null/empty.
2. **Application Detail Registration Phase**: Registers application details (EKK0011D020) and then forwards them for review and follow-up work (EKK0021C060), extracting the application content map and update timestamp.
3. **Outer Loop — Option Service Entries**: Iterates over each item in the option service contract cancellation list.
4. **Inner Loop — Sub-Option Service Filtering**: Filters sub-option services by service code `D04` (Home Page Capacity Addition), skipping all other add-on types.
5. **Pre-Change Processing**: Reads current SOD state (option agreement, ISP agreement, sub-option list).
6. **Option & Sub-Option Change Processing**: Updates the ISP option contract information, then updates the sub-option contract details with new timestamps.
7. **Post-Change Processing**: Re-reads the SOD state after updates and synchronizes back to SOD (SOD mapping).
8. **Progress Registration**: Logs the cancellation progress in the progress tracking table.

## 3. Parameter Analysis

| No | Parameter Name | Type | Business Description |
|----|---------------|------|---------------------|
| 1 | `handle` | `SessionHandle` | The database/transaction session handle used for all SC invocations. Represents the current database transaction context for the cancellation operation. |
| 2 | `param` | `IRequestParameterReadWrite` | The request parameter object carrying all input/output data for the method. Contains the operation map (`inMap`), control map (return messages, error codes), and template data populated during SC calls. This object is passed through all method calls and returned at the end. |
| 3 | `fixedText` | `String` | A string key used to identify and access data within the `param` object's internal map structure. Used throughout the method as a map key for `param.getData(fixedText)`, `initData(param, fixedText, ...)`, and template operations. Represents the business context identifier for the My Homepage Capacity cancellation workflow. |

### Instance Fields / External State

| Name | Type | Business Description |
|------|------|---------------------|
| `IN_OP_DSL_DIV` | `String` constant | Option cancellation division key (`"net_dsl_div"`) — classifies the type of option cancellation being performed. |

## 4. CRUD Operations / Called Services

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

| CRUD | SC / CBS | SC Code | Entity / DB | Operation Description |
|------|----------|---------|-------------|----------------------|
| - | `JACBatCommon.isNull` | JACBatCommon | - | Calls `isNull` in `JACBatCommon` |
| - | `JACbatRknBusinessUtil.isNull` | JACbatRknBusiness | - | Calls `isNull` in `JACbatRknBusinessUtil` |
| - | `JCHbatSeikyKaknoBusinessUtil.isNull` | JCHbatSeikyKaknoBusiness | - | Calls `isNull` in `JCHbatSeikyKaknoBusinessUtil` |
| - | `JBSbatACInsentetivePrcInfoSaksei.isNull` | JBSbatACInsentetivePrcInfoSaksei | - | Calls `isNull` in `JBSbatACInsentetivePrcInfoSaksei` |
| - | `JBSbatAKCHSeikyYsoInfMake.isNull` | JBSbatAKCHSeikyYsoInfMake | - | Calls `isNull` in `JBSbatAKCHSeikyYsoInfMake` |
| R | `JBSbatDKNyukaFinAdd.getData` | JBSbatDKNyukaFinAdd | - | Calls `getData` in `JBSbatDKNyukaFinAdd` |
| - | `JBSbatKKOpsvkeiDelTrgtChsht.initData` | JBSbatKKOpsvkeiDelTrgtChsht | - | Calls `initData` in `JBSbatKKOpsvkeiDelTrgtChsht` |
| - | `JFUBaseCC.executeSC` | JFUBaseCC | - | Calls `executeSC` in `JFUBaseCC` |
| R | `JFUBaseCC.getMaxTempTempleteKey` | JFUBaseCC | - | Calls `getMaxTempTempleteKey` in `JFUBaseCC` |
| R | `JFUBaseCC.getTemplateList` | JFUBaseCC | - | Calls `getTemplateList` in `JFUBaseCC` |
| R | `JFUBaseCC.getTemplateListMap` | JFUBaseCC | - | Calls `getTemplateListMap` in `JFUBaseCC` |
| R | `JFUBaseCC.getTemplateValue` | JFUBaseCC | - | Calls `getTemplateValue` in `JFUBaseCC` |
| - | `JFUBaseCC.ignoreSearchError` | JFUBaseCC | - | Calls `ignoreSearchError` in `JFUBaseCC` |
| - | `JFUBaseCC.initData` | JFUBaseCC | - | Calls `initData` in `JFUBaseCC` |
| - | `JFUBaseUtil.executeSC` | JFUBase | - | Calls `executeSC` in `JFUBaseUtil` |
| R | `JFUBaseUtil.getMaxTempTempleteKey` | JFUBase | - | Calls `getMaxTempTempleteKey` in `JFUBaseUtil` |
| R | `JFUBaseUtil.getTemplateList` | JFUBase | - | Calls `getTemplateList` in `JFUBaseUtil` |
| R | `JFUBaseUtil.getTemplateListMap` | JFUBase | - | Calls `getTemplateListMap` in `JFUBaseUtil` |
| R | `JFUBaseUtil.getTemplateListMap` | JFUBase | - | Calls `getTemplateListMap` in `JFUBaseUtil` |
| R | `JFUBaseUtil.getTemplateValue` | JFUBase | - | Calls `getTemplateValue` in `JFUBaseUtil` |
| - | `JFUBaseUtil.ignoreSearchError` | JFUBase | - | Calls `ignoreSearchError` in `JFUBaseUtil` |
| - | `JFUBaseUtil.initData` | JFUBase | - | Calls `initData` in `JFUBaseUtil` |
| - | `JFUBPCommon.executeSC` | JFUBPCommon | - | Calls `executeSC` in `JFUBPCommon` |
| R | `JFUBPCommon.getMaxTempTempleteKey` | JFUBPCommon | - | Calls `getMaxTempTempleteKey` in `JFUBPCommon` |
| R | `JFUBPCommon.getTemplateList` | JFUBPCommon | - | Calls `getTemplateList` in `JFUBPCommon` |
| R | `JFUBPCommon.getTemplateListMap` | JFUBPCommon | - | Calls `getTemplateListMap` in `JFUBPCommon` |
| R | `JFUBPCommon.getTemplateListMap` | JFUBPCommon | - | Calls `getTemplateListMap` in `JFUBPCommon` |
| R | `JFUBPCommon.getTemplateValue` | JFUBPCommon | - | Calls `getTemplateValue` in `JFUBPCommon` |
| - | `JFUBPCommon.ignoreSearchError` | JFUBPCommon | - | Calls `ignoreSearchError` in `JFUBPCommon` |
| - | `JFUBPCommon.initData` | JFUBPCommon | - | Calls `initData` in `JFUBPCommon` |
| C | `EKK0011D020SC` (via executeSC) | EKK0011D020SC | Application detail content registration table | Registers application detail / content acknowledgment registration (申込内容承認登録) |
| C | `EKK0021C060SC` (via executeSC) | EKK0021C060SC | Application detail review table | Forwards application detail for review and follow-up work (申請明細照会・後続業務依頼) |
| R | `EKK0351A010SC` (via executeSC) | EKK0351A010SC | Option service contract agreement table (pre-change) | Queries option service contract agreement information before change (オプションサービス契約同意照会 変更前) |
| R | `EKK0361A010SC` (via executeSC) | EKK0361A010SC | Option service ISP contract agreement table | Queries option service contract (ISP) agreement (オプションサービス契約＜ISP＞同意照会) |
| R | `EKK0401B001SC` (via executeSC) | EKK0401B001SC | Sub-option service contract list table | Queries sub-option service contract list before change (サブオプションサービス契約一覧照会 変更前) |
| U | `EKK0361C050SC` (via executeSC) | EKK0361C050SC | Option service ISP contract update table | Updates option service contract (ISP) information (オプションサービス契約＜ISP＞情報変更) |
| R | `EKK0411A010SC` (via executeSC) | EKK0411A010SC | Sub-option service ISP contract agreement table | Queries sub-option service contract (ISP) agreement (サブオプションサービス契約＜ISP＞同意照会) |
| U | `EKK0411C010SC` (via executeSC) | EKK0411C010SC | Sub-option service ISP contract change table | Updates sub-option service contract (ISP) details (サブオプションサービス契約＜ISP＞変更) |
| R | `EKK0351A010SC` (via executeSC) | EKK0351A010SC | Option service contract agreement table (post-change) | Re-reads option service contract agreement after change (オプションサービス契約同意照会 変更後) |
| R | `EKK0401A010SC` (via executeSC) | EKK0401A010SC | Sub-option service contract agreement table (post-change) | Re-reads sub-option service contract agreement after change (サブオプションサービス契約同意照会 変更後) |
| C | `EKK1091D010SC` (via executeSC) | EKK1091D010SC | Progress registration table | Registers cancellation progress in progress tracking log (進捗登録) |

## 5. Dependency Trace

| # | Caller (Screen/Batch) | Call Chain (Full Path to this Method) | Terminal (SC / CRUD / Entity) |
|---|----------------------|--------------------------------------|-------------------------------|
| 1 | Method: `JFUDslNetOpSvcKeiCC.dslOpSvcKei()` | `dslOpSvcKei()` -> `dslOpSvcKeiHp(handle, param, fixedText)` | `initData` [R] / `executeSC` [C/R/U] / `setInMap` [R] / `setSODMappingOpBf` [R] / `setSODMappingOpAf` [R] |

**Terminal operations reached from this method:**

| Terminal | Type | Description |
|----------|------|-------------|
| `outDebugLog` | - | Debug logging (Start/Error markers) |
| `executeSC` (EKK0011D020) | C | Application detail content acknowledgment registration |
| `executeSC` (EKK0021C060) | C | Application detail review and follow-up work request |
| `executeSC` (EKK0351A010) x2 | R | Option service contract agreement query (pre/post change) |
| `executeSC` (EKK0361A010) | R | Option service contract (ISP) agreement query |
| `executeSC` (EKK0401B001) | R | Sub-option service contract list query (pre-change) |
| `executeSC` (EKK0361C050) | U | Option service contract (ISP) information change |
| `executeSC` (EKK0411A010) | R | Sub-option service contract (ISP) agreement query |
| `executeSC` (EKK0411C010) | U | Sub-option service contract (ISP) detail change |
| `executeSC` (EKK0401A010) | R | Sub-option service contract agreement query (post-change) |
| `executeSC` (EKK1091D010) | C | Progress registration |
| `setSODMappingOpBf` | R | SOD mapping processing (pre-change data mapping) |
| `setSODMappingOpAf` | R | SOD mapping processing (post-change data mapping) |
| `getTemplateListMap` x9 | R | Template data extraction from SC results |
| `getTemplateList` | R | Template list data extraction |
| `getTemplateValue` x2 | R | Single template value extraction (update timestamp) |
| `initData` x14 | - | Data structure initialization for each SC call |
| `setInMapEKK*` x10 | - | Input data mapping for each SC call |
| `ignoreSearchError` | - | Error suppression for optional queries |
| `isNull` (JFUBPCommon) | - | Null validation checks |

## 6. Per-Branch Detail Blocks

**Block 1** — [EXEC] `(L1267)`

> Initialize debug logging to mark the start of the method execution.

| # | Type | Code |
|---|------|------|
| 1 | EXEC | `outDebugLog("----- dslOpSvcKeiHp Start -----")` // Start log |

**Block 2** — [EXEC] `(L1270)`

> Retrieve the operation map from the request parameter using the `fixedText` key.

| # | Type | Code |
|---|------|------|
| 1 | SET | `inMap = (HashMap)param.getData(fixedText)` // Request parameter retrieval |

**Block 3** — [SET] `(L1275-L1279)`

> Input data extraction section (// INPUTデータ) — extract sysid, last update timestamp, and the option service cancellation list.

| # | Type | Code |
|---|------|------|
| 1 | SET | `sysid = (String)inMap.get(IN_SYSID)` // SYSID |
| 2 | SET | `lastUpdDtm = (String)inMap.get(IN_LAST_UPD_DTM)` // Latest update datetime |
| 3 | SET | `opSvcKeiDslList = (ArrayList)inMap.get(IN_OP_SVC_KEI_DSL_LIST)` // Option service contract cancellation list |

**Block 4** — [IF] `(input validation)` `(L1281)` `[JFUBPCommon.isNull() check]`

> Validate input parameters — if sysid, lastUpdDtm, or the cancellation list is null/empty, throw an error. (// INパラメータがなければエラーをスロー)

| # | Type | Code |
|---|------|------|
| 1 | IF | `JFUBPCommon.isNull(sysid) \|\| JFUBPCommon.isNull(lastUpdDtm) \|\| opSvcKeiDslList == null \|\| opSvcKeiDslList.size() == 0` |
| 2 | EXEC | `outDebugLog("----- dslOpSvcKeiHp Error -----")` // Termination log |
| 3 | EXEC | `throw new SCCallException(... RETURN_CODE_NORMAL, JPCModelConstant.RELATION_ERR)` // Error |

**Block 5** — [BLOCK] `(Application Detail Registration)` `(L1289)` `[// 申込明細申込処理（SYSID単位)]`

> Register application details and forward for review. This phase operates at the SYSID level (not per-cancellation-item).

**Block 5.1** — [EXEC] `(EKK0011D020 — Application Detail Content Acknowledgment Registration)` `(L1292)`

> // EKK0011D020_申込内容承認登録 — User data initialization (// ユーザーデータ初期化)

| # | Type | Code |
|---|------|------|
| 1 | CALL | `initData(param, fixedText, IN_COL_LIST_EKK0011D020)` // User data initialization |
| 2 | CALL | `setInMapEKK0011D020(param, fixedText, sysid)` // Upper mapping |
| 3 | CALL | `executeSC(handle, param, fixedText, TEMP_ID_EKK0011D020, TEMP_ID_DTL_EKK0011D020, IN_COL_LIST_EKK0011D020, BLANK)` // Service IF execution |

**Block 5.2** — [SET] `(Extract application detail info)` `(L1297)`

> // 申込内容承認登録情報 — Extract application content acknowledgment registration data (// 申込内容承認登録情報). // 更新年月日時刻 (Update datetime)

| # | Type | Code |
|---|------|------|
| 1 | SET | `mskmNaiyoMap = getTemplateListMap(inMap, getMaxTempTempleteKey(inMap, TEMP_TEMP_KEY_EKK0011D020), TEMP_ID_DTL_EKK0011D020, 0)` // Application content info |
| 2 | SET | `mskmUpdDtm = getTemplateValue(inMap, getMaxTempTempleteKey(inMap, TEMP_TEMP_KEY_EKK0011D020), EKK0011D020CBSMsg.UPD_DTM)` // Update datetime |

**Block 5.3** — [EXEC] `(EKK0021C060 — Application Detail Review & Follow-up)` `(L1301)`

> // EKK0021C060_申込明細照会・後続業務依頼 (// Application detail review / follow-up work request) — // ユーザーデータ初期化 (User data init)

| # | Type | Code |
|---|------|------|
| 1 | CALL | `initData(param, fixedText, IN_COL_LIST_EKK0021C060)` // User data initialization |
| 2 | CALL | `setInMapEKK0021C060(param, fixedText, mskmUpdDtm, mskmNaiyoMap)` // Upper mapping |
| 3 | CALL | `executeSC(handle, param, fixedText, TEMP_ID_EKK0021C060, BLANK, IN_COL_LIST_EKK0021C060, BLANK)` // Service IF execution |

**Block 6** — [FOR LOOP] `(opSvcKeiDslList)` `(L1312)`

> // オプションサービス契約解約一覧の件数分、変更処理を行う — Process changes for the number of items in the option service contract cancellation list (// Change processing for each item in the option service cancellation list).

**Block 6.1** — [SET] `(L1316)`

> // オプションサービス契約番号 (Option service contract number)

| # | Type | Code |
|---|------|------|
| 1 | SET | `opSvcKeiNo = (String)dslMap.get(IN_OP_SVC_KEI_NO)` // Option service contract number |

**Block 7** — [IF] `(opSvcKeiNo validation)` `(L1318)`

> // INパラメータがなければエラーをスロー — If input parameter is missing, throw error.

| # | Type | Code |
|---|------|------|
| 1 | IF | `JFUBPCommon.isNull(opSvcKeiNo)` |
| 2 | EXEC | `outDebugLog("----- dslOpSvcKeiHp Error -----")` // Termination log |
| 3 | EXEC | `throw new SCCallException(... RETURN_CODE_NORMAL, JPCModelConstant.RELATION_ERR)` // Error |

**Block 8** — [BLOCK] `(SOD Pre-Change Data Retrieval)` `(L1328)` `[// SOD処理(変更前)用データ取得処理]`

> Retrieve SOD data in pre-change state for the current option service contract. This reads the current state of the option service agreement, ISP contract agreement, and sub-option service contract list.

**Block 8.1** — [EXEC] `(EKK0351A010 — Option Service Contract Agreement Pre-Change)` `(L1331)`

> // EKK0351A010_オプションサービス契約同意照会(変更前) (// Option service contract agreement query - pre-change) — // ユーザーデータ初期化 (User data init)

| # | Type | Code |
|---|------|------|
| 1 | CALL | `initData(param, fixedText, IN_COL_LIST_EKK0351A010)` // User data initialization |
| 2 | CALL | `setInMapEKK0351A010(param, fixedText, opSvcKeiNo)` // Upper mapping |
| 3 | CALL | `executeSC(handle, param, fixedText, TEMP_ID_EKK0351A010, TEMP_ID_DTL_EKK0351A010, IN_COL_LIST_EKK0351A010, ERR_COL_EKK0351A010)` // Service IF execution |

**Block 8.2** — [SET] `(Extract option service info pre-change)` `(L1336)`

> // オプションサービス契約情報（変更前）(Option service contract info - pre-change)

| # | Type | Code |
|---|------|------|
| 1 | SET | `opInfoMapBf = getTemplateListMap(inMap, getMaxTempTempleteKey(inMap, TEMP_TEMP_KEY_EKK0351A010), TEMP_ID_DTL_EKK0351A010, 0)` // Option service contract info (pre-change) |

**Block 8.3** — [EXEC] `(EKK0361A010 — Option Service ISP Contract Agreement)` `(L1339)`

> // EKK0361A010_オプションサービス契約＜ISP＞同意照会 (// Option service contract <ISP> agreement query) — // ユーザーデータ初期化 (User data init)

| # | Type | Code |
|---|------|------|
| 1 | CALL | `initData(param, fixedText, IN_COL_LIST_EKK0361A010)` // User data initialization |
| 2 | CALL | `setInMapEKK0361A010(param, fixedText, opInfoMapBf)` // Upper mapping |
| 3 | CALL | `executeSC(handle, param, fixedText, TEMP_ID_EKK0361A010, TEMP_ID_DTL_EKK0361A010, IN_COL_LIST_EKK0361A010, ERR_COL_EKK0361A010)` // Service IF execution |

**Block 8.4** — [SET] `(Extract ISP info pre-change)` `(L1344)`

> // オプションサービス契約情報（変更前）(Option service contract info - pre-change) — extracted ISP-specific data

| # | Type | Code |
|---|------|------|
| 1 | SET | `opIspInfoMapBf = getTemplateListMap(inMap, getMaxTempTempleteKey(inMap, TEMP_TEMP_KEY_EKK0361A010), TEMP_ID_DTL_EKK0361A010, 0)` // Option ISP info (pre-change) |

**Block 8.5** — [EXEC] `(EKK0401B001 — Sub-Option Service Contract List Pre-Change)` `(L1347)`

> // EKK0401B001_サブオプションサービス契約一覧照会(変更前) (// Sub-option service contract list query - pre-change) — // ユーザーデータ初期化 (User data init)

| # | Type | Code |
|---|------|------|
| 1 | CALL | `initData(param, fixedText, IN_COL_LIST_EKK0401B001)` // User data initialization |
| 2 | CALL | `ignoreSearchError(param, fixedText)` // Set no search error |
| 3 | CALL | `setInMapEKK0401B001(param, fixedText, opInfoMapBf)` // Upper mapping |
| 4 | CALL | `executeSC(handle, param, fixedText, TEMP_ID_EKK0401B001, TEMP_ID_DTL_EKK0401B001, IN_COL_LIST_EKK0401B001, ERR_COL_EKK0401B001)` // Service IF execution |

**Block 8.6** — [SET] `(Extract sub-option list)` `(L1351)`

> // サブオプションサービス契約リスト (Sub-option service contract list)

| # | Type | Code |
|---|------|------|
| 1 | SET | `sbopSvcKeiList = getTemplateList(inMap, getMaxTempTempleteKey(inMap, TEMP_TEMP_KEY_EKK0401B001), TEMP_ID_DTL_EKK0401B001)` // Sub-option service contract list |

**Block 9** — [FOR LOOP] `(sbopSvcKeiList)` `(L1358)`

> // サブオプションサービス契約解約一覧の件数分、解約処理を行う — Process cancellation for each item in the sub-option service contract cancellation list.

**Block 9.1** — [IF] `(D04 filter)` `(L1363)` `[JFUStrConst.CD00137_D04="D04" -> JFUStrConst.java:2006]`

> // 「D04:ホームペーじ容量追加」以外はスキップ — Skip all entries except "D04: Home Page Capacity Addition" (D04 ホームページ容量追加). This is the core business filter: only the My Homepage Capacity add-on is handled by this method.

| # | Type | Code |
|---|------|------|
| 1 | IF | `!JFUStrConst.CD00137_D04.equals(sbopInfoMapBf.get(EKK0401B001CBSMsg1List.SBOP_SVC_CD))` [CD00137_D04="D04" -> JFUStrConst.java:2006] |
| 2 | EXEC | `continue` // Skip non-D04 entries |

**Block 10** — [BLOCK] `(SOD Pre-Change Mapping)` `(L1373)` `[// SOD処理(変更前)]`

> // SODマッピング処理(変更前) — SOD mapping processing (pre-change). Maps the pre-change data to SOD format.

| # | Type | Code |
|---|------|------|
| 1 | CALL | `setSODMappingOpBf(handle, param, fixedText, opInfoMapBf, sbopInfoMapBf, null)` // SOD mapping (pre-change) |

**Block 11** — [BLOCK] `(Option Change Processing)` `(L1380)` `[// オプション変更処理]`

> Process the option service contract (ISP) information change. Updates the ISP-level option contract details.

**Block 11.1** — [EXEC] `(EKK0361C050 — Option Service ISP Contract Info Change)` `(L1383)`

> // EKK0361C050_オプションサービス契約＜ISP＞情報変更 (// Option service contract <ISP> information change) — // ユーザーデータ初期化 (User data init)

| # | Type | Code |
|---|------|------|
| 1 | CALL | `initData(param, fixedText, IN_COL_LIST_EKK0361C050)` // User data initialization |
| 2 | CALL | `setInMapEKK0361C050(param, fixedText, dslMap, opInfoMapBf, opIspInfoMapBf, mskmNaiyoMap, lastUpdDtm)` // Upper mapping |
| 3 | CALL | `executeSC(handle, param, fixedText, TEMP_ID_EKK0361C050, TEMP_ID_DTL_EKK0361C050, IN_COL_LIST_EKK0361C050, ERR_COL_EKK0361C050)` // Service IF execution |

**Block 11.2** — [SET] `(Update timestamp)` `(L1388)`

> // 更新年月日時刻 (Update datetime) — extract the updated timestamp from the option change result

| # | Type | Code |
|---|------|------|
| 1 | SET | `lastUpdDtm = getTemplateValue(inMap, getMaxTempTempleteKey(inMap, TEMP_TEMP_KEY_EKK0361C050), EKK0351C240CBSMsg.UPD_DTM)` // Update datetime |

**Block 12** — [BLOCK] `(Sub-Option Change Processing)` `(L1393)` `[// サブオプション変更処理]`

> Process the sub-option service contract (ISP) change. Updates the sub-option level details within the option contract.

**Block 12.1** — [EXEC] `(EKK0411A010 — Sub-Option Service ISP Contract Agreement)` `(L1396)`

> // EKK0411A010_サブオプションサービス契約＜ISP＞同意照会 (// Sub-option service contract <ISP> agreement query) — // ユーザーデータ初期化 (User data init)

| # | Type | Code |
|---|------|------|
| 1 | CALL | `initData(param, fixedText, IN_COL_LIST_EKK0411A010)` // User data initialization |
| 2 | CALL | `setInMapEKK0411A010(param, fixedText, sbopInfoMapBf)` // Upper mapping |
| 3 | CALL | `executeSC(handle, param, fixedText, TEMP_ID_EKK0411A010, TEMP_ID_DTL_EKK0411A010, IN_COL_LIST_EKK0411A010, ERR_COL_EKK0411A010)` // Service IF execution |

**Block 12.2** — [SET] `(Extract sub-option ISP info)` `(L1401)`

> // サブオプションサービス契約＜ISP＞情報 (Sub-option service contract <ISP> info)

| # | Type | Code |
|---|------|------|
| 1 | SET | `sbopIspInfoMap = getTemplateListMap(inMap, getMaxTempTempleteKey(inMap, TEMP_TEMP_KEY_EKK0411A010), TEMP_ID_DTL_EKK0411A010, 0)` // Sub-option ISP contract info |

**Block 12.3** — [EXEC] `(EKK0411C010 — Sub-Option Service ISP Contract Change)` `(L1405)`

> // EKK0411C010_サブオプションサービス契約＜ISP＞変更 (// Sub-option service contract <ISP> change) — // ユーザーデータ初期化 (User data init)

| # | Type | Code |
|---|------|------|
| 1 | CALL | `initData(param, fixedText, IN_COL_LIST_EKK0411C010)` // User data initialization |
| 2 | CALL | `setInMapEKK0411C010(param, fixedText, dslMap, sbopIspInfoMap, mskmNaiyoMap, lastUpdDtm)` // Upper mapping |
| 3 | CALL | `executeSC(handle, param, fixedText, TEMP_ID_EKK0411C010, TEMP_ID_DTL_EKK0411C010, IN_COL_LIST_EKK0411C010, ERR_COL_EKK0411C010)` // Service IF execution |

**Block 12.4** — [SET] `(Update timestamp)` `(L1410)`

> // 更新年月日時刻 (Update datetime) — extract the updated timestamp from the sub-option change result

| # | Type | Code |
|---|------|------|
| 1 | SET | `lastUpdDtm = getTemplateValue(inMap, getMaxTempTempleteKey(inMap, TEMP_TEMP_KEY_EKK0411C010), EKK0411C010CBSMsg.UPD_DTM)` // Update datetime |

**Block 13** — [BLOCK] `(SOD Post-Change Data Retrieval)` `(L1418)` `[// SOD処理(変更後)用データ取得処理]`

> Re-read SOD data in post-change state. This mirrors Block 8 but reads the updated state after changes.

**Block 13.1** — [EXEC] `(EKK0351A010 — Option Service Agreement Post-Change)` `(L1421)`

> // EKK0351A010_オプションサービス契約同意照会(変更後) (// Option service contract agreement query - post-change) — // ユーザーデータ初期化 (User data init)

| # | Type | Code |
|---|------|------|
| 1 | CALL | `initData(param, fixedText, IN_COL_LIST_EKK0351A010)` // User data initialization |
| 2 | CALL | `setInMapEKK0351A010(param, fixedText, opSvcKeiNo)` // Upper mapping |
| 3 | CALL | `executeSC(handle, param, fixedText, TEMP_ID_EKK0351A010, TEMP_ID_DTL_EKK0351A010, IN_COL_LIST_EKK0351A010, ERR_COL_EKK0351A010)` // Service IF execution |

**Block 13.2** — [SET] `(Extract option info post-change)` `(L1426)`

> // オプションサービス契約情報（変更前）(Option service contract info) — extracted post-change

| # | Type | Code |
|---|------|------|
| 1 | SET | `opInfoMapAf = getTemplateListMap(inMap, getMaxTempTempleteKey(inMap, TEMP_TEMP_KEY_EKK0351A010), TEMP_ID_DTL_EKK0351A010, 0)` // Option service contract info |

**Block 13.3** — [EXEC] `(EKK0401A010 — Sub-Option Service Contract Agreement Post-Change)` `(L1429)`

> // EKK0401A010_サブオプションサービス契約同意照会(変更後) (// Sub-option service contract agreement query - post-change) — // ユーザーデータ初期化 (User data init)

| # | Type | Code |
|---|------|------|
| 1 | CALL | `initData(param, fixedText, IN_COL_LIST_EKK0401A010)` // User data initialization |
| 2 | CALL | `setInMapEKK0401A010(param, fixedText, opSvcKeiNo, (String)sbopInfoMapBf.get(EKK0401B001CBSMsg1List.SBOP_SVC_KEI_NO))` // Upper mapping |
| 3 | CALL | `executeSC(handle, param, fixedText, TEMP_ID_EKK0401A010, TEMP_ID_DTL_EKK0401A010, IN_COL_LIST_EKK0401A010, ERR_COL_EKK0401A010)` // Service IF execution |

**Block 13.4** — [SET] `(Extract sub-option info post-change)` `(L1434)`

> // サブオプションサービス契約情報 (Sub-option service contract info)

| # | Type | Code |
|---|------|------|
| 1 | SET | `sbopInfoMapAf = getTemplateListMap(inMap, getMaxTempTempleteKey(inMap, TEMP_TEMP_KEY_EKK0401A010), TEMP_ID_DTL_EKK0401A010, 0)` // Sub-option service contract info |

**Block 14** — [BLOCK] `(SOD Post-Change Mapping)` `(L1439)` `[// SOD処理(変更後)]`

> // SODマッピング処理(変更後) — SOD mapping processing (post-change). Syncs the post-change data back to SOD.

| # | Type | Code |
|---|------|------|
| 1 | CALL | `setSODMappingOpAf(handle, param, fixedText, opInfoMapAf, sbopInfoMapAf)` // SOD mapping (post-change) |

**Block 15** — [BLOCK] `(Progress Registration)` `(L1446)` `[// 進捗登録処理]`

> Register the cancellation progress in the progress tracking system. // 進捗登録 (Progress registration).

**Block 15.1** — [EXEC] `(EKK1091D010 — Progress Registration)` `(L1449)`

> // EKK1091D010_進捗登録 (// Progress registration) — // ユーザーデータ初期化 (User data init)

| # | Type | Code |
|---|------|------|
| 1 | CALL | `initData(param, fixedText, IN_COL_LIST_EKK1091D010)` // User data initialization |
| 2 | CALL | `setInMapEKK1091D010(param, fixedText, dslMap, mskmNaiyoMap)` // Upper mapping |
| 3 | CALL | `executeSC(handle, param, fixedText, TEMP_ID_EKK1091D010, TEMP_ID_DTL_EKK1091D010, IN_COL_LIST_EKK1091D010, BLANK)` // Service IF execution |

**Block 16** — [EXEC] `(End)` `(L1442)`

> // 開始ログ (Start log) — Note: this log message incorrectly says "Start" again at the end of the method.

| # | Type | Code |
|---|------|------|
| 1 | EXEC | `outDebugLog("----- dslOpSvcKeiHp Start -----")` // Start log (at end) |
| 2 | RETURN | `return param` // Return request parameter management class |

## 7. Glossary

| Term | Type | Business Meaning |
|------|------|------------------|
| `sysid` | Field | System ID — internal identifier for the user/system session in the cancellation workflow |
| `lastUpdDtm` | Field | Last update datetime — timestamp tracking the most recent modification, propagated through SC calls to ensure data consistency |
| `opSvcKeiNo` | Field | Option service contract number — unique identifier for an option service contract line item |
| `dslMap` | Field | DSL operation map — represents a single entry in the option service cancellation list (// オプションサービス契約解約一覧) |
| `opInfoMapBf` | Field | Option service info (before change) — snapshot of the option service contract agreement data read before updates |
| `opIspInfoMapBf` | Field | Option ISP info (before change) — ISP-specific contract data snapshot read before updates |
| `opInfoMapAf` | Field | Option service info (after change) — snapshot of the option service contract agreement data read after updates |
| `sbopInfoMapBf` | Field | Sub-option info (before change) — snapshot of sub-option service contract data read before updates |
| `sbopInfoMapAf` | Field | Sub-option info (after change) — snapshot of sub-option service contract data read after updates |
| `sbopIspInfoMap` | Field | Sub-option ISP info — ISP-specific sub-option contract data |
| `mskmNaiyoMap` | Field | Application content map (// 申込内容) — extracted from EKK0011D020 SC, carries application detail acknowledgment registration data |
| `mskmUpdDtm` | Field | Application update datetime — extracted from EKK0011D020 SC, passed to EKK0021C060 as the update timestamp |
| SOD | Acronym | Service Order Data — legacy telecom order fulfillment system; this method reads/writes SOD before and after changes to maintain synchronization |
| EKK0011D020 | SC Code | Application Detail Content Acknowledgment Registration (申込内容承認登録) — registers the cancellation application content |
| EKK0021C060 | SC Code | Application Detail Review / Follow-up Work Request (申込明細照会・後続業務依頼) — forwards application for review |
| EKK0351A010 | SC Code | Option Service Contract Agreement Query (オプションサービス契約同意照会) — reads/writes option service contract agreement data; called pre-change and post-change |
| EKK0361A010 | SC Code | Option Service Contract <ISP> Agreement Query (オプションサービス契約＜ISP＞同意照会) — queries ISP contract data |
| EKK0361C050 | SC Code | Option Service Contract <ISP> Information Change (オプションサービス契約＜ISP＞情報変更) — updates ISP option contract information |
| EKK0401B001 | SC Code | Sub-Option Service Contract List Query Pre-Change (サブオプションサービス契約一覧照会 変更前) — lists sub-option contracts before changes |
| EKK0411A010 | SC Code | Sub-Option Service Contract <ISP> Agreement Query (サブオプションサービス契約＜ISP＞同意照会) — queries sub-option ISP agreement data |
| EKK0411C010 | SC Code | Sub-Option Service Contract <ISP> Change (サブオプションサービス契約＜ISP＞変更) — updates sub-option contract details |
| EKK0401A010 | SC Code | Sub-Option Service Contract Agreement Query Post-Change (サブオプションサービス契約同意照会 変更後) — re-reads sub-option agreement after changes |
| EKK1091D010 | SC Code | Progress Registration (進捗登録) — logs cancellation progress in the tracking system |
| CD00137 | Constant Group | Service code classification group for option service types |
| CD00137_D04 | Constant | Value `"D04"` — Home Page Capacity Addition (ホームページ容量追加) — the specific add-on service handled by this method [-> JFUStrConst.java:2006] |
| eo光 (eo Hikari) | Business term | NTT East's fiber-optic internet service brand — the parent broadband service to which option add-ons attach |
| My Homepage (Myホームページ) | Business term | NTT East's web hosting service included with eo Hikari subscriptions; capacity can be added as an option |
| Option Service (オプションサービス) | Business term | Add-on services purchasable alongside the base DSL connection (e.g., capacity addition, mail access, virus check) |
| Sub-Option (サブオプション) | Business term | Secondary-level add-ons attached to an option service contract; the inner loop processes sub-option level changes |
| SC | Acronym | Service Component — the service layer interface class that handles data access and business operations for a specific function |
| SC Code | Abbreviation | Service Component code — a standardized code identifying a specific SC call (e.g., EKK0361A010SC) |
| SCCallException | Class | Exception class thrown when an SC call encounters a business error (e.g., RELATION_ERR) |
| initData | Method | Template data initialization helper — prepares the request parameter structure for a given SC call |
| setInMap* | Method | Input data mapping helper — populates the request map with business data before calling an SC |
| executeSC | Method | Service Component executor — invokes the SC with prepared template IDs and column lists |
| getTemplateListMap | Method | Extracts a HashMap from SC template results by the highest template key |
| getTemplateList | Method | Extracts a List from SC template results by the highest template key |
| getTemplateValue | Method | Extracts a single value from SC template results |
| getMaxTempTempleteKey | Method | Retrieves the maximum (most recent) template key from the inMap |
| ignoreSearchError | Method | Suppresses search errors for optional queries |
| setSODMappingOpBf | Method | SOD data mapping (before change) — maps pre-change data to SOD format |
| setSODMappingOpAf | Method | SOD data mapping (after change) — maps post-change data to SOD format |
| fixedText | Parameter | Business context key — used as a map identifier throughout the method for accessing request parameter data |
