# Business Logic — JFUDslNetOpSvcKeiCC.dslOpSvcKeiIPv6() [156 LOC]

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

## 1. Role

### JFUDslNetOpSvcKeiCC.dslOpSvcKeiIPv6()

This method performs the complete business processing for cancelling an **eo Hikari Net (eo光ネット) option service contract under the IPv6 broadband service**. It serves as the central orchestration entry point for IPv6-specific option cancellation within the customer base system, handling the entire lifecycle from input validation through acceptance registration, individual contract cancellation (or cancellation), post-change confirmation, and progress logging. The method implements a **routing/dispatch pattern** by evaluating the contract status of each option service and branching into two distinct cancellation paths: for contracts already in "consultation completed" state, it processes a simple cancellation (EKK0351C220); for contracts still actively providing service (termination completed or in-service), it performs a fine-charge determination (jdgHiChrg) followed by the full cancellation-and-confirmation flow (EKK0351C240 + EKK0351C250). It operates as a **delegated common component** called by its sibling method `dslOpSvcKei()`, which dispatches to IPv4 or IPv6 processing depending on the service type. The method processes all option service contracts listed in the input `opSvcKeiDslList` sequentially within a single SYSID unit, ensuring atomic batch cancellation behavior.

## 2. Processing Pattern (Detailed Business Logic)

```mermaid
flowchart TD
    START(["dslOpSvcKeiIPv6"])
    LOG_START["Out Debug Log: Start"]
    GET_INMAP["Get inMap from param.getData(fixedText)"]

    GET_SYSID["Get sysid from inMap"]
    GET_LAST_UPD["Get lastUpdDtm from inMap"]
    GET_LIST["Get opSvcKeiDslList from inMap"]

    VALIDATION["Validate: sysid, lastUpdDtm, opSvcKeiDslList not empty"]

    if_input_valid{"Input data valid?"}

    ERROR_THROW["Throw SCCallException"]
    LOG_ERROR["Out Debug Log: Error"]

    INIT0011["initData(param, fixedText, IN_COL_LIST_EKK0011D020)"]
    MAP0011["setInMapEKK0011D020(param, fixedText, sysid)"]
    EXEC0011["executeSC: EKK0011D020 - Order Content Acceptance Registration"]
    GET0011_DETAIL["getTemplateListMap -> mskmNaiyoMap"]
    GET0011_DTM["getTemplateValue -> mskmUpdDtm"]

    INIT0021["initData(param, fixedText, IN_COL_LIST_EKK0021C060)"]
    MAP0021["setInMapEKK0021C060(param, fixedText, mskmUpdDtm, mskmNaiyoMap)"]
    EXEC0021["executeSC: EKK0021C060 - Order Detail Reference / Follow-up Task"]

    LOOP_START["For each opSvcKeiDslMap in opSvcKeiDslList"]

    GET_SVC_NO["Get svcKeiNo from opSvcKeiDslMap"]
    GET_OP_NO["Get opSvcKeiNo from opSvcKeiDslMap"]

    if_op_valid{"opSvcKeiNo valid?"}

    ERROR_OP_THROW["Throw SCCallException"]
    LOG_OP_ERROR["Out Debug Log: dslOpSvcKeiRs Error"]

    INIT_CFM["initData(param, fixedText, IN_COL_LIST_EKK0351A010)"]
    MAP_CFM["setInMapEKK0351A010(param, fixedText, opSvcKeiNo)"]
    EXEC_CFM["executeSC: EKK0351A010 - Option Service Contract Agreement Consultation"]
    GET_CFM_BF["getTemplateListMap -> opInfoMapBf"]

    SOD_BF["setSODMappingOpBf(handle, param, fixedText, opInfoMapBf, null, getUcwkInfoMap)"]

    if_stat{"opInfoMapBf.OP_SVC_KEI_STAT == CD00037_020 = 020 (Consultation Completed)"}

    INIT_CANCEL["initData(param, fixedText, IN_COL_LIST_EKK0351C220)"]
    MAP_CANCEL["setInMapEKK0351C220(param, fixedText, opInfoMapBf, mskmNaiyoMap, lastUpdDtm)"]
    EXEC_CANCEL["executeSC: EKK0351C220 - Option Service Contract Cancellation"]
    GET_CANCEL_DTM["getTemplateValue -> lastUpdDtm"]

    INIT_JDG["jdgHiChrg(handle, param, fixedText, opInfoMapBf, null, 1) -> hiChrgMap"]

    INIT_DELM["initData(param, fixedText, IN_COL_LIST_EKK0351C240)"]
    MAP_DELM["setInMapEKK0351C240(param, fixedText, opInfoMapBf, mskmNaiyoMap, lastUpdDtm)"]
    EXEC_DELM["executeSC: EKK0351C240 - Option Service Contract Cancellation"]
    GET_DELM_DTM["getTemplateValue -> lastUpdDtm"]

    INIT_CFMD["initData(param, fixedText, IN_COL_LIST_EKK0351C250)"]
    MAP_CFMD["setInMapEKK0351C250(param, fixedText, opInfoMapBf, hiChrgMap, lastUpdDtm)"]
    EXEC_CFMD["executeSC: EKK0351C250 - Option Service Contract Cancellation Confirmation"]
    GET_CFMD_DTM["getTemplateValue -> lastUpdDtm"]

    INIT_CFM2["initData(param, fixedText, IN_COL_LIST_EKK0351A010)"]
    MAP_CFM2["setInMapEKK0351A010(param, fixedText, opSvcKeiNo)"]
    EXEC_CFM2["executeSC: EKK0351A010 - Option Service Contract Agreement Consultation (After)"]
    GET_CFM_AF["getTemplateListMap -> opInfoMapAf"]

    SOD_AF["setSODMappingOpAf(handle, param, fixedText, opInfoMapAf, null)"]

    INIT_PRG["initData(param, fixedText, IN_COL_LIST_EKK1091D010)"]
    MAP_PRG["setInMapEKK1091D010(param, fixedText, opSvcKeiDslMap, mskmNaiyoMap)"]
    EXEC_PRG["executeSC: EKK1091D010 - Progress Registration"]

    LOOP_END["End For Loop"]

    LOG_END["Out Debug Log: End"]
    RETURN["Return param"]

    START --> LOG_START --> GET_INMAP --> GET_SYSID --> GET_LAST_UPD --> GET_LIST --> VALIDATION
    VALIDATION --> if_input_valid
    if_input_valid -- Yes --> INIT0011
    if_input_valid -- No --> LOG_ERROR --> ERROR_THROW
    INIT0011 --> MAP0011 --> EXEC0011 --> GET0011_DETAIL --> GET0011_DTM --> INIT0021
    INIT0021 --> MAP0021 --> EXEC0021 --> LOOP_START
    LOOP_START --> GET_SVC_NO --> GET_OP_NO
    GET_OP_NO --> if_op_valid
    if_op_valid -- No --> LOG_OP_ERROR --> ERROR_OP_THROW
    if_op_valid -- Yes --> INIT_CFM
    INIT_CFM --> MAP_CFM --> EXEC_CFM --> GET_CFM_BF --> SOD_BF --> if_stat
    if_stat -- Yes --> INIT_CANCEL --> MAP_CANCEL --> EXEC_CANCEL --> GET_CANCEL_DTM --> INIT_CFM2
    if_stat -- No --> INIT_JDG --> INIT_DELM --> MAP_DELM --> EXEC_DELM --> GET_DELM_DTM --> INIT_CFMD
    INIT_CFMD --> MAP_CFMD --> EXEC_CFMD --> GET_CFMD_DTM --> INIT_CFM2
    INIT_CFM2 --> MAP_CFM2 --> EXEC_CFM2 --> GET_CFM_AF --> SOD_AF --> INIT_PRG
    INIT_PRG --> MAP_PRG --> EXEC_PRG --> LOOP_END
    LOOP_END --> LOG_END --> RETURN
```

**Processing Flow:**

1. **Logging Start** — Output debug log marker "dslOpSvcKeiIPv6 Start".
2. **Input Retrieval** — Extract the input HashMap from `param.getData(fixedText)`, then read `sysid`, `lastUpdDtm`, and `opSvcKeiDslList` (the list of option service contracts to cancel) from the map.
3. **Input Validation** — Validate that `sysid`, `lastUpdDtm`, and `opSvcKeiDslList` (non-null and non-empty) are all present. If validation fails, throw `SCCallException` with a relation error.
4. **Order Content Acceptance Registration (EKK0011D020)** — Initialize input data, map the SYSID into the request, execute the service component, and retrieve the acceptance detail map (`mskmNaiyoMap`) and update timestamp (`mskmUpdDtm`).
5. **Order Detail Reference / Follow-up Task (EKK0021C060)** — Initialize input data, map the acceptance update timestamp and detail map, then execute the service component for reference and follow-up processing.
6. **Contract-by-Contract Processing Loop** — For each option service contract entry in `opSvcKeiDslList`:
   - a. Extract `svcKeiNo` and `opSvcKeiNo`; validate `opSvcKeiNo` is present (throw if missing).
   - b. **Pre-change Agreement Consultation (EKK0351A010)** — Query the current option service contract status to obtain `opInfoMapBf`.
   - c. **SOD Pre-change Mapping** — Set SOD (Service Order Data) mapping with pre-change data and work number info (`getUcwkInfoMap`).
   - d. **Status Branch** — If `opSvcKeiStat == "020"` (Consultation Completed):
     - Process **Cancellation (EKK0351C220)** only, and update `lastUpdDtm`.
   - e. Otherwise (Termination Completed or Service In-Progress):
     - Execute **Fine-Charge Judgment** (`jdgHiChrg`) to determine applicable charges.
     - Process **Cancellation (EKK0351C240)** and update `lastUpdDtm`.
     - Process **Cancellation Confirmation (EKK0351C250)** using the fine-charge result, and update `lastUpdDtm`.
   - f. **Post-change Agreement Consultation (EKK0351A010)** — Re-query to obtain `opInfoMapAf` with updated contract status.
   - g. **SOD Post-change Mapping** — Set SOD mapping with post-change data.
   - h. **Progress Registration (EKK1091D010)** — Initialize, map, and execute progress logging for this contract.
7. **Logging End / Return** — Output end debug log and return the processed `param`.

## 3. Parameter Analysis

| No | Parameter Name | Type | Business Description |
|----|---------------|------|---------------------|
| 1 | `handle` | `SessionHandle` | Database session handle providing the transaction context for all SC (Service Component) calls. Carries the database connection, transaction boundary, and user session information for the IPv6 option cancellation operation. |
| 2 | `param` | `IRequestParameterReadWrite` | Request parameter carrier that holds both input data (extracted via `getData(fixedText)` into an input HashMap) and output data (populated via `initData`, `setInMap*` methods and template maps). Acts as the primary data shuttle between this CC method and the underlying SC layer. |
| 3 | `fixedText` | `String` | A string key used to identify and scope the input data within `param`. It maps to a specific data section (the "fixed text" section) in the request parameter map that contains `sysId`, `last_upd_dtm`, and `op_svc_kei_dsl_list`. |

**Instance Fields Referenced:**

| Field | Type | Business Description |
|-------|------|---------------------|
| `IN_SYSID` | `String` | Input key constant: `"sysId"` — used to retrieve the system ID from the input map. |
| `IN_LAST_UPD_DTM` | `String` | Input key constant: `"last_upd_dtm"` — used to retrieve the last update timestamp. |
| `IN_OP_SVC_KEI_DSL_LIST` | `String` | Input key constant: `"op_svc_kei_dsl_list"` — used to retrieve the list of option service contracts to cancel. |
| `IN_OP_SVC_KEI_NO` | `String` | Input key constant: `"op_svc_kei_no"` — option service contract number key used within each loop entry. |
| `IN_SVC_KEI_NO` | `String` | Input key constant: `"svc_kei_no"` — service contract number key used within each loop entry. |
| `IN_COL_LIST_EKK0011D020` | `List<String>` | Input column list for EKK0011D020 SC (Order Content Acceptance Registration). |
| `IN_COL_LIST_EKK0021C060` | `List<String>` | Input column list for EKK0021C060 SC (Order Detail Reference / Follow-up Task). |
| `IN_COL_LIST_EKK0351A010` | `List<String>` | Input column list for EKK0351A010 SC (Option Service Contract Agreement Consultation). |
| `IN_COL_LIST_EKK0351C220` | `List<String>` | Input column list for EKK0351C220 SC (Option Service Contract Cancellation). |
| `IN_COL_LIST_EKK0351C240` | `List<String>` | Input column list for EKK0351C240 SC (Option Service Contract Cancellation). |
| `IN_COL_LIST_EKK0351C250` | `List<String>` | Input column list for EKK0351C250 SC (Option Service Contract Cancellation Confirmation). |
| `IN_COL_LIST_EKK1091D010` | `List<String>` | Input column list for EKK1091D010 SC (Progress Registration). |
| `TEMP_ID_EKK0011D020` | `String` | Template ID for EKK0011D020: `"EKK0011D020"`. |
| `TEMP_ID_DTL_EKK0011D020` | `String` | Detail template ID for EKK0011D020. |
| `TEMP_TEMP_KEY_EKK0011D020` | `String` | Template temporary key for EKK0011D020. |
| `RETURN_CODE_NORMAL` | `int` | Normal return code used when throwing exceptions. |

## 4. CRUD Operations / Called Services

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

| CRUD | SC / CBS | SC Code | Entity / DB | Operation Description |
|------|----------|---------|-------------|----------------------|
| - | `initData` | EKK0011D020 | - | Initializes input data structure for Order Content Acceptance Registration SC |
| - | `setInMapEKK0011D020` | EKK0011D020 | - | Maps SYSID into the input parameter for Order Content Acceptance Registration |
| C | `executeSC` | EKK0011D020 | KK_T_MSKM (Acceptance Master) | Registers order content acceptance data — creates acceptance record with system ID, service details, contact information, and temporary acceptance info |
| R | `getTemplateListMap` | EKK0011D020 | KK_T_MSKM | Reads back the acceptance detail map (`mskmNaiyoMap`) from the template |
| R | `getTemplateValue` | EKK0011D020 | - | Extracts the update timestamp (`UPD_DTM`) from the acceptance result |
| - | `initData` | EKK0021C060 | - | Initializes input data structure for Order Detail Reference / Follow-up Task SC |
| - | `setInMapEKK0021C060` | EKK0021C060 | - | Maps acceptance update timestamp and detail map for follow-up task processing |
| C | `executeSC` | EKK0021C060 | KK_T_MSKM_DTL (Acceptance Detail) | Executes order detail reference and delegates follow-up tasks based on acceptance content |
| - | `initData` | EKK0351A010 | - | Initializes input data structure for Option Service Contract Agreement Consultation SC (pre-change) |
| - | `setInMapEKK0351A010` | EKK0351A010 | - | Maps option service contract number for consultation query |
| R | `executeSC` | EKK0351A010 | KK_T_OPSVKEI (Option Service Contract Master) | Queries current option service contract details including status (`OP_SVC_KEI_STAT`) |
| - | `setSODMappingOpBf` | SOD | SOD tables | Sets Service Order Data pre-change mapping with option info and work number data |
| R | `getUcwkInfoMap` | - | UCWK (Work Information) | Retrieves work number (ucwk) information for the service contract, used in SOD mapping |
| - | `jdgHiChrg` | EKK0351C240 | - | Fine-charges determination — evaluates whether cancellation charges apply based on contract status and timing |
| - | `initData` | EKK0351C220 | - | Initializes input data structure for Option Service Contract Cancellation SC (consultation-completed path) |
| - | `setInMapEKK0351C220` | EKK0351C220 | - | Maps pre-change option info, acceptance details, and update timestamp for cancellation |
| U | `executeSC` | EKK0351C220 | KK_T_OPSVKEI | Processes option service contract cancellation when already in consultation-completed state |
| R | `getTemplateValue` | EKK0351C220 | - | Extracts the update timestamp after cancellation processing |
| - | `initData` | EKK0351C240 | - | Initializes input data structure for Option Service Contract Cancellation SC (active-service path) |
| - | `setInMapEKK0351C240` | EKK0351C240 | - | Maps pre-change option info, acceptance details, and update timestamp for cancellation |
| U | `executeSC` | EKK0351C240 | KK_T_OPSVKEI | Processes option service contract cancellation for active-service contracts (post fine-charge judgment) |
| R | `getTemplateValue` | EKK0351C240 | - | Extracts the update timestamp after cancellation processing |
| - | `initData` | EKK0351C250 | - | Initializes input data structure for Option Service Contract Cancellation Confirmation SC |
| - | `setInMapEKK0351C250` | EKK0351C250 | - | Maps pre-change option info, fine-charge map, and update timestamp for confirmation |
| U | `executeSC` | EKK0351C250 | KK_T_OPSVKEI | Finalizes the cancellation with confirmation, committing the cancellation details and fine-charge result |
| R | `getTemplateValue` | EKK0351C250 | - | Extracts the update timestamp after cancellation confirmation |
| - | `initData` | EKK0351A010 | - | Initializes input data structure for Option Service Contract Agreement Consultation SC (post-change) |
| - | `setInMapEKK0351A010` | EKK0351A010 | - | Maps option service contract number for post-change consultation query |
| R | `executeSC` | EKK0351A010 | KK_T_OPSVKEI | Queries updated option service contract details after cancellation processing |
| - | `setSODMappingOpAf` | SOD | SOD tables | Sets Service Order Data post-change mapping with updated option information |
| - | `initData` | EKK1091D010 | - | Initializes input data structure for Progress Registration SC |
| - | `setInMapEKK1091D010` | EKK1091D010 | - | Maps the current contract entry and acceptance details for progress logging |
| C | `executeSC` | EKK1091D010 | KK_T_PRG (Progress Master) | Registers the processing progress record for this option service contract cancellation |
| - | `outDebugLog` | - | - | Outputs debug log entries at start, error, and end points |
| - | `JFUBPCommon.isNull` | JACBatCommon | - | Null-check utility for validating input fields |
| - | `JACbatRknBusinessUtil.isNull` | JACbatRknBusiness | - | Null-check utility used across multiple methods |
| - | `JCHbatSeikyKaknoBusinessUtil.isNull` | JCHbatSeikyKaknoBusiness | - | Null-check utility used across multiple methods |
| - | `JBSbatACInsentetivePrcInfoSaksei.isNull` | JBSbatACInsentetivePrcInfoSaksei | - | Null-check utility used across multiple methods |
| - | `JBSbatAKCHSeikyYsoInfMake.isNull` | JBSbatAKCHSeikyYsoInfMake | - | Null-check utility used across multiple methods |
| R | `JBSbatDKNyukaFinAdd.getData` | JBSbatDKNyukaFinAdd | - | Gets data from request parameter |
| - | `JBSbatKKOpsvkeiDelTrgtChsht.initData` | JBSbatKKOpsvkeiDelTrgtChsht | - | Initializes data for option service deletion target selection |
| R | `JFUBaseCC.getMaxTempTempleteKey` | JFUBaseCC | - | Retrieves the maximum temporary template key for template management |
| R | `JFUBaseCC.getTemplateListMap` | JFUBaseCC | - | Retrieves the template list map for detail data extraction |
| R | `JFUBaseCC.getTemplateValue` | JFUBaseCC | - | Extracts a single template value by key |
| - | `JFUBaseCC.initData` | JFUBaseCC | - | Initializes base template data |
| R | `JFUBaseNetChgCommonCC.getUcwkInfoMap` | JFUBaseNetChgCommonCC | - | Retrieves work number information for service contracts |
| - | `JFUBaseUtil.executeSC` | JFUBase | - | Executes service component through base utility |
| R | `JFUBaseUtil.getMaxTempTempleteKey` | JFUBase | - | Retrieves maximum temporary template key via base utility |
| R | `JFUBaseUtil.getTemplateListMap` | JFUBase | - | Retrieves template list map via base utility |
| R | `JFUBaseUtil.getTemplateValue` | JFUBase | - | Extracts template value via base utility |
| - | `JFUBaseUtil.initData` | JFUBase | - | Initializes base template data via utility |
| - | `JFUBPCommon.executeSC` | JFUBPCommon | - | Executes service component through BP common |
| R | `JFUBPCommon.getMaxTempTempleteKey` | JFUBPCommon | - | Retrieves maximum temporary template key via BP common |
| R | `JFUBPCommon.getTemplateListMap` | JFUBPCommon | - | Retrieves template list map via BP common |
| R | `JFUBPCommon.getTemplateValue` | JFUBPCommon | - | Extracts template value via BP common |
| - | `JFUBPCommon.initData` | JFUBPCommon | - | Initializes base template data via BP common |

## 5. Dependency Trace

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

No screen/batch entry points found within 8 hops. Direct callers found: 1 methods.
Terminal operations from this method: `outDebugLog` [-], `executeSC` [-], `executeSC` [-], `executeSC` [-], `executeSC` [-], `executeSC` [-], `setInMapEKK1091D010` [-], `initData` [-], `initData` [-], `initData` [-], `initData` [-], `initData` [-], `setSODMappingOpAf` [-], `getTemplateListMap` [R], `getTemplateListMap` [R], `getTemplateListMap` [R], `getTemplateListMap` [R], `getTemplateListMap` [R], `getMaxTempTempleteKey` [R], `getMaxTempTempleteKey` [R], `getMaxTempTempleteKey` [R], `getMaxTempTempleteKey` [R], `getMaxTempTempleteKey` [R], `getTemplateValue` [R], `getTemplateValue` [R], `getTemplateValue` [R], `getTemplateValue` [R], `getTemplateValue` [R], `getTemplateValue` [R], `setInMapEKK0011D020` [-], `setInMapEKK0021C060` [-], `setInMapEKK0351A010` [-], `setInMapEKK0351C220` [-], `setInMapEKK0351C240` [-], `setInMapEKK0351C250` [-]

| # | Caller (Screen/Batch) | Call Chain (Full Path to this Method) | Terminal (SC / CRUD / Entity) |
|---|----------------------|--------------------------------------|-------------------------------|
| 1 | `JFUDslNetOpSvcKeiCC.dslOpSvcKei()` | `dslOpSvcKei()` → `dslOpSvcKeiIPv6()` | `executeSC [C] KK_T_MSKM (EKK0011D020)`, `executeSC [C] KK_T_MSKM_DTL (EKK0021C060)`, `executeSC [R] KK_T_OPSVKEI (EKK0351A010)`, `executeSC [U] KK_T_OPSVKEI (EKK0351C220)`, `executeSC [U] KK_T_OPSVKEI (EKK0351C240)`, `executeSC [U] KK_T_OPSVKEI (EKK0351C250)`, `executeSC [C] KK_T_PRG (EKK1091D010)`, `jdgHiChrg [R/U] KK_T_OPSVKEI`, `setSODMappingOpBf [-] SOD Tables`, `setSODMappingOpAf [-] SOD Tables` |

**Call Chain Details:**

`JFUDslNetOpSvcKeiCC.dslOpSvcKei()` — This is the parent dispatcher method that routes between IPv4 and IPv6 cancellation processing. It inspects the DSL service division (`OP_DSL_DIV_IPV6 = "5"`) and delegates to `dslOpSvcKeiIPv6()` for IPv6-specific handling. The call chain is: Screen (KKSV entry) → CBS Controller → `dslOpSvcKei()` → `dslOpSvcKeiIPv6()`.

## 6. Per-Branch Detail Blocks

**Block 1** — IF (Input Data Validation) (L1114)

> Validates that all required input fields (sysid, lastUpdDtm, opSvcKeiDslList) are present and the list is non-empty. If any validation fails, logs an error and throws an `SCCallException` with a relation error code.

| # | Type | Code |
|---|------|------|
| 1 | SET | `inMap = param.getData(fixedText)` // Extract input HashMap from request parameter |
| 2 | SET | `sysid = (String) inMap.get(IN_SYSID)` [-> `IN_SYSID="sysId"`] |
| 3 | SET | `lastUpdDtm = (String) inMap.get(IN_LAST_UPD_DTM)` [-> `IN_LAST_UPD_DTM="last_upd_dtm"`] |
| 4 | SET | `opSvcKeiDslList = (ArrayList<HashMap<String, Object>>) inMap.get(IN_OP_SVC_KEI_DSL_LIST)` [-> `IN_OP_SVC_KEI_DSL_LIST="op_svc_kei_dsl_list"`] |
| 5 | IF | `JFUBPCommon.isNull(sysid) \|\| JFUBPCommon.isNull(lastUpdDtm) \|\| opSvcKeiDslList == null \|\| opSvcKeiDslList.size() == 0` |

**Block 1.1** — ELSE-IF (Validation Failed) (L1115)

> Error branch: throws an exception with the control map return message and normal return code.

| # | Type | Code |
|---|------|------|
| 1 | EXEC | `outDebugLog("----- dslOpSvcKeiIPv6 Error -----")` |
| 2 | CALL | `throw new SCCallException(param.getControlMapData(SCControlMapKeys.RETURN_MESSAGE), String.valueOf(RETURN_CODE_NORMAL), JPCModelConstant.RELATION_ERR)` |

**Block 2** — EXEC (Order Content Acceptance Registration: EKK0011D020) (L1125)

> Initializes input data for the order content acceptance registration SC, maps the SYSID, executes the service component, then reads back the acceptance detail map and update timestamp. This step registers the acceptance content at the system level.

| # | Type | Code |
|---|------|------|
| 1 | CALL | `initData(param, fixedText, IN_COL_LIST_EKK0011D020)` // User data initialization |
| 2 | CALL | `setInMapEKK0011D020(param, fixedText, sysid)` // Upper mapping with SYSID |
| 3 | CALL | `executeSC(handle, param, fixedText, TEMP_ID_EKK0011D020, TEMP_ID_DTL_EKK0011D020, IN_COL_LIST_EKK0011D020, BLANK)` // Service IF execution — Order Content Acceptance Registration |
| 4 | SET | `mskmNaiyoMap = getTemplateListMap(inMap, getMaxTempTempleteKey(inMap, TEMP_TEMP_KEY_EKK0011D020), TEMP_ID_DTL_EKK0011D020, 0)` // Acceptance detail map retrieval |
| 5 | SET | `mskmUpdDtm = getTemplateValue(inMap, getMaxTempTempleteKey(inMap, TEMP_TEMP_KEY_EKK0011D020), EKK0011D020CBSMsg.UPD_DTM)` // Update timestamp extraction |

**Block 3** — EXEC (Order Detail Reference / Follow-up Task: EKK0021C060) (L1134)

> Initializes input data for the order detail reference and follow-up task SC, maps the acceptance update timestamp and detail map, then executes the service component. This step performs reference checks and delegates any required follow-up tasks.

| # | Type | Code |
|---|------|------|
| 1 | CALL | `initData(param, fixedText, IN_COL_LIST_EKK0021C060)` // User data initialization |
| 2 | CALL | `setInMapEKK0021C060(param, fixedText, mskmUpdDtm, mskmNaiyoMap)` // Upper mapping with acceptance data |
| 3 | CALL | `executeSC(handle, param, fixedText, TEMP_ID_EKK0021C060, BLANK, IN_COL_LIST_EKK0021C060, BLANK)` // Service IF execution — Order Detail Reference / Follow-up Task |

**Block 4** — FOR (Contract-by-Contract Processing Loop) (L1144)

> Iterates over each option service contract entry in `opSvcKeiDslList`. For each entry, performs the full cancellation lifecycle: pre-change consultation, status-based branching (cancel vs. cancel+confirm), post-change consultation, SOD mapping, and progress registration.

| # | Type | Code |
|---|------|------|
| 1 | SET | `opSvcKeiDslMap` ← each element from `opSvcKeiDslList` |
| 2 | SET | `svcKeiNo = (String) opSvcKeiDslMap.get(IN_SVC_KEI_NO)` [-> `IN_SVC_KEI_NO="svc_kei_no"`] |
| 3 | SET | `opSvcKeiNo = (String) opSvcKeiDslMap.get(IN_OP_SVC_KEI_NO)` [-> `IN_OP_SVC_KEI_NO="op_svc_kei_no"`] |

**Block 4.1** — IF (per-contract Input Validation) (L1150)

> Validates that `opSvcKeiNo` is present for the current contract entry. If missing, logs an error and throws an `SCCallException`.

| # | Type | Code |
|---|------|------|
| 1 | IF | `JFUBPCommon.isNull(opSvcKeiNo)` |

**Block 4.1.1** — ELSE-IF (Validation Failed) (L1151)

> Error branch for missing option service contract number within a loop entry.

| # | Type | Code |
|---|------|------|
| 1 | EXEC | `outDebugLog("----- dslOpSvcKeiRs Error -----")` |
| 2 | CALL | `throw new SCCallException(param.getControlMapData(SCControlMapKeys.RETURN_MESSAGE), String.valueOf(RETURN_CODE_NORMAL), JPCModelConstant.RELATION_ERR)` |

**Block 4.2** — EXEC (Pre-Change Agreement Consultation: EKK0351A010) (L1160)

> Initializes input data, maps the option service contract number, and executes the agreement consultation SC to query current contract details including the contract status.

| # | 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 — Option Service Contract Agreement Consultation |
| 4 | SET | `opInfoMapBf = getTemplateListMap(inMap, getMaxTempTempleteKey(inMap, TEMP_TEMP_KEY_EKK0351A010), TEMP_ID_DTL_EKK0351A010, 0)` // Pre-change option service contract info |

**Block 4.3** — EXEC (SOD Pre-Change Mapping) (L1166)

> Sets the Service Order Data pre-change mapping using the pre-change option info and work number information.

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

**Block 5** — IF (Contract Status Branch) (L1176)

> Evaluates the option service contract status (`OP_SVC_KEI_STAT`) to determine the cancellation path. If the status equals `"020"` (Consultation Completed), the contract was already in consultation state and only a simple cancellation is needed. Otherwise (Termination Completed or Service In-Progress), the full cancellation flow with fine-charge judgment is required.

| # | Type | Code |
|---|------|------|
| 1 | IF | `JFUStrConst.CD00037_020.equals((String) opInfoMapBf.get(EKK0351A010CBSMsg1List.OP_SVC_KEI_STAT))` [-> `JFUStrConst.CD00037_020 = "020"` (Consultation Completed)] |

**Block 5.1** — ELSE-IF (Consultation Completed → Simple Cancellation) (L1179)

> When the contract is already in "consultation completed" status, process only the cancellation (EKK0351C220) without fine-charge judgment. The contract was previously set to consultation state by a prior screen operation.

| # | Type | Code |
|---|------|------|
| 1 | CALL | `initData(param, fixedText, IN_COL_LIST_EKK0351C220)` // User data initialization |
| 2 | CALL | `setInMapEKK0351C220(param, fixedText, opInfoMapBf, mskmNaiyoMap, lastUpdDtm)` // Upper mapping with pre-change info, acceptance details, and update timestamp |
| 3 | CALL | `executeSC(handle, param, fixedText, TEMP_ID_EKK0351C220, TEMP_ID_DTL_EKK0351C220, IN_COL_LIST_EKK0351C220, ERR_COL_EKK0351C220)` // Service IF execution — Option Service Contract Cancellation |
| 4 | SET | `lastUpdDtm = getTemplateValue(inMap, getMaxTempTempleteKey(inMap, TEMP_TEMP_KEY_EKK0351C220), EKK0351C220CBSMsg.UPD_DTM)` // Update timestamp |

**Block 5.2** — ELSE (Active Service → Full Cancellation with Fine-Charge Judgment) (L1187)

> When the contract is NOT in consultation completed status (i.e., termination completed or actively in-service), process the full cancellation flow: first determine any applicable fine charges via `jdgHiChrg`, then execute cancellation, and finally confirm the cancellation with the fine-charge result.

| # | Type | Code |
|---|------|------|
| 1 | SET | `hiChrgMap = jdgHiChrg(handle, param, fixedText, opInfoMapBf, null, "1")` // Fine-charge judgment (option service) |
| 2 | CALL | `initData(param, fixedText, IN_COL_LIST_EKK0351C240)` // User data initialization |
| 3 | CALL | `setInMapEKK0351C240(param, fixedText, opInfoMapBf, mskmNaiyoMap, lastUpdDtm)` // Upper mapping |
| 4 | CALL | `executeSC(handle, param, fixedText, TEMP_ID_EKK0351C240, TEMP_ID_DTL_EKK0351C240, IN_COL_LIST_EKK0351C240, ERR_COL_EKK0351C240)` // Service IF execution — Option Service Contract Cancellation |
| 5 | SET | `lastUpdDtm = getTemplateValue(inMap, getMaxTempTempleteKey(inMap, TEMP_TEMP_KEY_EKK0351C240), EKK0351C240CBSMsg.UPD_DTM)` // Update timestamp |
| 6 | CALL | `initData(param, fixedText, IN_COL_LIST_EKK0351C250)` // User data initialization |
| 7 | CALL | `setInMapEKK0351C250(param, fixedText, opInfoMapBf, hiChrgMap, lastUpdDtm)` // Upper mapping with fine-charge result |
| 8 | CALL | `executeSC(handle, param, fixedText, TEMP_ID_EKK0351C250, TEMP_ID_DTL_EKK0351C250, IN_COL_LIST_EKK0351C250, ERR_COL_EKK0351C250)` // Service IF execution — Option Service Contract Cancellation Confirmation |
| 9 | SET | `lastUpdDtm = getTemplateValue(inMap, getMaxTempTempleteKey(inMap, TEMP_TEMP_KEY_EKK0351C250), EKK0351C250CBSMsg.UPD_DTM)` // Update timestamp |

**Block 6** — EXEC (Post-Change Agreement Consultation: EKK0351A010) (L1202)

> After cancellation processing, re-query the option service contract agreement consultation SC to obtain the updated contract status. This serves as post-change verification.

| # | 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 — Option Service Contract Agreement Consultation (post-change) |
| 4 | SET | `opInfoMapAf = getTemplateListMap(inMap, getMaxTempTempleteKey(inMap, TEMP_TEMP_KEY_EKK0351A010), TEMP_ID_DTL_EKK0351A010, 0)` // Post-change option service contract info |

**Block 7** — EXEC (SOD Post-Change Mapping) (L1210)

> Sets the Service Order Data post-change mapping with the updated option information.

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

**Block 8** — EXEC (Progress Registration: EKK1091D010) (L1214)

> Initializes input data, maps the current contract entry and acceptance details, and executes the progress registration SC. This records the cancellation progress for tracking and audit purposes.

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

**Block 9** — RETURN (End of Method) (L1221)

> Outputs end debug log and returns the processed parameter.

| # | Type | Code |
|---|------|------|
| 1 | EXEC | `outDebugLog("----- dslOpSvcKeiIPv6 Start -----")` // End log (note: message still says "Start") |
| 2 | RETURN | `return param` |

## 7. Glossary

| Term | Type | Business Meaning |
|------|------|------------------|
| `sysId` | Field | System ID — internal identifier for the customer account or system entity performing the cancellation |
| `last_upd_dtm` | Field | Last update date/time — timestamp tracking the most recent modification to the contract data |
| `op_svc_kei_dsl_list` | Field | Option service contract DSL list — list of option service contract entries (each containing svc_kei_no, op_svc_kei_no) targeted for cancellation |
| `svc_kei_no` | Field | Service contract number — the main service line identifier for the customer's broadband contract |
| `op_svc_kei_no` | Field | Option service contract number — the unique identifier for a specific option service (e.g., IPv6, storage capacity, mail service) attached to the main service contract |
| `op_svc_kei_stat` | Field | Option service contract status — indicates the current state of the option service contract (e.g., "020" = consultation completed, other values = active service or termination completed) |
| `mskmNaiyoMap` | Field | Acceptance content map — the map containing accepted order detail information from EKK0011D020, used as input for follow-up tasks and cancellation processing |
| `mskmUpdDtm` | Field | Acceptance update date/time — timestamp of the acceptance content registration |
| `opInfoMapBf` | Field | Pre-change option service contract info map — snapshot of the option service contract state before cancellation processing |
| `opInfoMapAf` | Field | Post-change option service contract info map — updated snapshot of the option service contract state after cancellation processing |
| `hiChrgMap` | Field | High charge (fine charge) map — result of the fine-charges determination, containing billing information applicable when cancelling an active service contract |
| SOD | Acronym | Service Order Data — Fujitsu's order fulfillment data model used to synchronize contract changes with downstream order management systems |
| IP | Acronym | Internet Protocol — refers to the IPv6 broadband service being cancelled |
| IPv6 | Business term | Internet Protocol version 6 — the next-generation IP protocol service offered as an option on eo Hikari Net broadband connections |
| eo Hikari Net | Business term | eo光ネット — NTT West's fiber-optic broadband service brand |
| Option Service | Business term | オプションサービス — additional services attached to a base broadband contract (e.g., IPv6, storage capacity, mail service, remote support) |
| Consultation Completed | Business term | 照会済 — status code "020" indicating the option service contract has already gone through the consultation/discussion process and is ready for cancellation |
| Termination Completed | Business term | 終了済み — status indicating the service has already been terminated but the cancellation record has not yet been finalized |
| Service In-Progress | Business term | サービス提供中 — status indicating the option service is actively being provided and cancellation incurs potential fine charges |
| KK_T_OPSVKEI | Entity | Option Service Contract Master table — stores main option service contract records including status, start/end dates, and service details |
| KK_T_MSKM | Entity | Acceptance Master table — stores order acceptance registration records |
| KK_T_MSKM_DTL | Entity | Acceptance Detail table — stores detail records associated with order acceptance |
| KK_T_PRG | Entity | Progress Master table — stores processing progress records for audit and tracking |
| UCWK | Entity | Work Information table — stores work number (ucwk) data used in SOD mapping |
| EKK0011D020 | SC Code | Order Content Acceptance Registration — registers the acceptance content for the service change order |
| EKK0021C060 | SC Code | Order Detail Reference / Follow-up Task Delegation — references order details and delegates follow-up tasks |
| EKK0351A010 | SC Code | Option Service Contract Agreement Consultation — queries the current state of an option service contract |
| EKK0351C220 | SC Code | Option Service Contract Cancellation (Consultation Path) — processes cancellation when contract is already in consultation-completed state |
| EKK0351C240 | SC Code | Option Service Contract Cancellation (Active Path) — processes cancellation for actively-in-service contracts (after fine-charge judgment) |
| EKK0351C250 | SC Code | Option Service Contract Cancellation Confirmation — finalizes the cancellation with confirmation and fine-charge result |
| EKK1091D010 | SC Code | Progress Registration — registers processing progress for the option service cancellation |
| jdgHiChrg | Method | Fine-Charge Judgment — determines whether cancellation charges (penalty fees) apply based on contract status, timing, and service type |
| setSODMappingOpBf | Method | SOD Pre-Change Mapping — maps pre-cancellation option service data into the SOD order data |
| setSODMappingOpAf | Method | SOD Post-Change Mapping — maps post-cancellation option service data into the SOD order data |
| setInMapEKK0011D020 | Method | Input mapping for EKK0011D020 SC — prepares the input data with SYSID for order acceptance registration |
| setInMapEKK0021C060 | Method | Input mapping for EKK0021C060 SC — prepares the input data with acceptance details for follow-up processing |
| setInMapEKK0351A010 | Method | Input mapping for EKK0351A010 SC — prepares the input data with option service contract number |
| setInMapEKK0351C220 | Method | Input mapping for EKK0351C220 SC — prepares the input data for consultation-path cancellation |
| setInMapEKK0351C240 | Method | Input mapping for EKK0351C240 SC — prepares the input data for active-path cancellation |
| setInMapEKK0351C250 | Method | Input mapping for EKK0351C250 SC — prepares the input data for cancellation confirmation with fine-charge result |
| setInMapEKK1091D010 | Method | Input mapping for EKK1091D010 SC — prepares the input data for progress registration |
| initData | Method | Data initializer — resets and prepares the input template data structure before each SC call |
| executeSC | Method | Service Component executor — invokes the SC (Service Component) layer for database operations |
| getTemplateListMap | Method | Template data reader — retrieves the detail/template list map from the request parameter after SC execution |
| getTemplateValue | Method | Template value extractor — extracts a single value from the template map by key |
| getUcwkInfoMap | Method | Work number info retriever — fetches work number (ucwk) data for the given service contract number |
| JFUStrConst.CD00037_020 | Constant | Status code constant: `"020"` — represents "Consultation Completed" state for option service contracts |
| SCCallException | Exception | Service Component call exception — thrown when SC execution fails or input validation fails |
| RELATION_ERR | Constant | Relationship error code (`JPCModelConstant.RELATION_ERR`) — indicates a data integrity or input validation failure |
| BLANK | Constant | Blank string constant (`""`) — used as a placeholder for unused template ID or error column parameters |
