# Business Logic — JFUDslNetOpSvcKeiCC.dslOpSvcKeiRs() [138 LOC]

| Field | Value |
|-------|-------|
| Fully Qualified Name | `com.fujitsu.futurity.bp.custom.common.JFUDslNetOpSvcKeiCC` |
| Layer | CC / Common Component (Service-level orchestrator within the `common` package) |
| Module | `common` (Package: `com.fujitsu.futurity.bp.custom.common`) |

## 1. Role

### JFUDslNetOpSvcKeiCC.dslOpSvcKeiRs()

This method performs the core business processing for **eo Hikari Net Option Service Contract Cancellation**, specifically supporting the "Remote Support Plus" (リモートサポートプラス) service. It handles the end-to-end lifecycle of cancelling option services attached to an FTTH (Fiber To The Home) DSL connection — including claim registration, details inquiry, and multi-path cancellation processing.

The method operates in two distinct phases. First, it registers the claim context at the SYSID level by executing the claim content acceptance registration (EKK0011D020) and the claim details inquiry with follow-up work (EKK0021C060). This establishes a shared business context (mskmNaiyoMap and mskmUpdDtm) that is then passed to every subsequent per-contract cancellation step. Second, for each option service contract in the input list, it checks the contract's current status and dispatches to one of two cancellation paths: a simple cancellation (キャancell) if the contract is in the "cancellation available" state (CD00037_020), or a full termination workflow (including billing judgment via `jdgHiChrg`, contract termination EKK0351C240, and termination confirmation EKK0351C250) if the contract is active or still being billed.

The method implements the **delegation and routing patterns**: it delegates data preparation to specialized setter methods (`setInMapEKKxxxD020`, `setInMapEKK0351A010`, etc.), delegates service interface execution to `executeSC`, and routes the processing flow based on contract status. It is a **shared utility** called by the screen controller `dslOpSvcKei()` within the same class, and serves as the central orchestration point for all option service cancellation operations in the eo customer backbone system.

## 2. Processing Pattern (Detailed Business Logic)

```mermaid
flowchart TD
    START["dslOpSvcKeiRs(params)"]
    START --> LOG_START["Output debug log"]
    LOG_START --> GET_INMAP["Get inMap from param.getData(fixedText)"]

    GET_INMAP --> EXTRACT["Extract sysid, lastUpdDtm, opSvcKeiDslList from inMap"]

    EXTRACT --> VALIDATE{"Input validation
(sysid, lastUpdDtm, opSvcKeiDslList not null/empty)"}

    VALIDATE -->|Invalid| ERROR_THROW["Throw SCCallException
Error log"]
    VALIDATE -->|Valid| STEP1["Step 1: Claim details application
process (SYSID unit)"]

    STEP1 --> INIT_EKK0011["EKK0011D020 - Claim content acceptance registration
initData() + setInMapEKK0011D020()"]
    INIT_EKK0011 --> EXEC_EKK0011["executeSC(handle, param, fixedText, TEMP_ID_EKK0011D020)"]
    EXEC_EKK0011 --> GET_MS["Get mskmNaiyoMap and mskmUpdDtm from template"]

    GET_MS --> INIT_EKK0021["EKK0021C060 - Claim details inquiry / follow-up work
initData() + setInMapEKK0021C060(mskmUpdDtm, mskmNaiyoMap)"]
    INIT_EKK0021 --> EXEC_EKK0021["executeSC(handle, param, fixedText, TEMP_ID_EKK0021C060)"]

    EXEC_EKK0021 --> LOOP_START["Loop: for each opSvcKeiDslMap in opSvcKeiDslList"]

    LOOP_START --> GET_OPNO{"opSvcKeiNo null check"}
    GET_OPNO -->|Null| OPNO_ERROR["Throw SCCallException"]
    GET_OPNO -->|Valid| INIT_EKK0351["EKK0351A010 - Option service contract agreement check
initData() + setInMapEKK0351A010(opSvcKeiNo)"]
    INIT_EKK0351 --> EXEC_EKK0351["executeSC(handle, param, fixedText, TEMP_ID_EKK0351A010)"]
    EXEC_EKK0351 --> GET_OPINFO["Get opInfoMapBf (option service contract info)"]

    GET_OPINFO --> CHECK_STAT{"opSvcKeiStat == CD00037_020
(Contract cancellation available)"}

    CHECK_STAT -->|Yes - Cancellation| CANCEL_PATH["Cancellation path"]
    CHECK_STAT -->|No - Billing / Active| BILL_PATH["Billing judgment path"]

    CANCEL_PATH --> INIT_C220["EKK0351C220 - Option service contract cancellation
initData() + setInMapEKK0351C220(opInfoMapBf, mskmNaiyoMap, lastUpdDtm)"]
    INIT_C220 --> EXEC_C220["executeSC(handle, param, fixedText, TEMP_ID_EKK0351C220)"]
    EXEC_C220 --> UPDATE_DTM["Update lastUpdDtm from EKK0351C220 response"]

    UPDATE_DTM --> PROCEED

    BILL_PATH --> HI_CHRG["jdgHiChrg(handle, opInfoMapBf, null, '1')
Billing judgment processing"]
    HI_CHRG --> INIT_C240["EKK0351C240 - Option service contract termination
initData() + setInMapEKK0351C240(opInfoMapBf, mskmNaiyoMap, lastUpdDtm)"]
    INIT_C240 --> EXEC_C240["executeSC(handle, param, fixedText, TEMP_ID_EKK0351C240)"]
    EXEC_C240 --> UPDATE_DTM2["Update lastUpdDtm from EKK0351C240 response"]

    UPDATE_DTM2 --> INIT_C250["EKK0351C250 - Option service contract termination confirmation
initData() + setInMapEKK0351C250(opInfoMapBf, hiChrgMap, lastUpdDtm)"]
    INIT_C250 --> EXEC_C250["executeSC(handle, param, fixedText, TEMP_ID_EKK0351C250)"]
    EXEC_C250 --> UPDATE_DTM3["Update lastUpdDtm from EKK0351C250 response"]

    UPDATE_DTM3 --> PROCEED["Continue to progress registration"]
    UPDATE_DTM --> PROCEED

    PROCEED --> INIT_EKK1091["EKK1091D010 - Progress registration
initData() + setInMapEKK1091D010(opSvcKeiDslMap, mskmNaiyoMap)"]
    INIT_EKK1091 --> EXEC_EKK1091["executeSC(handle, param, fixedText, TEMP_ID_EKK1091D010)"]

    EXEC_EKK1091 --> LOOP_END{"More items in opSvcKeiDslList?"}
    LOOP_END -->|Yes| LOOP_START
    LOOP_END -->|No| LOG_END["Output debug log"]
    LOG_END --> RETURN["Return param"]
```

```mermaid
sequenceDiagram
    participant CLIENT as Caller
    participant SVC as dslOpSvcKeiRs
    participant EKK0011 as EKK0011D020SC
    participant EKK0021 as EKK0021C060SC
    participant EKK0351 as EKK0351A010SC
    participant EKKC220 as EKK0351C220SC
    participant EKKC240 as EKK0351C240SC
    participant EKKC250 as EKK0351C250SC
    participant EKK1091 as EKK1091D010SC

    CLIENT->>SVC: dslOpSvcKeiRs(handle, param, fixedText)
    SVC->>SVC: Extract sysid, lastUpdDtm, opSvcKeiDslList
    SVC->>SVC: Validate inputs

    SVC->>EKK0011: executeSC - Claim content acceptance registration
    EKK0011-->>SVC: mskmNaiyoMap, mskmUpdDtm

    SVC->>EKK0021: executeSC - Claim details inquiry / follow-up work
    EKK0021-->>SVC: Response

    loop For each opSvcKeiDslMap
        SVC->>EKK0351: executeSC - Option service contract check
        EKK0351-->>SVC: opInfoMapBf

        alt opSvcKeiStat == CD00037_020 (Cancellation available)
            SVC->>EKKC220: executeSC - Contract cancellation
            EKKC220-->>SVC: lastUpdDtm
        else opSvcKeiStat != CD00037_020 (Active / Billing)
            SVC->>SVC: jdgHiChrg - Billing judgment
            SVC->>EKKC240: executeSC - Contract termination
            EKKC240-->>SVC: lastUpdDtm
            SVC->>EKKC250: executeSC - Termination confirmation
            EKKC250-->>SVC: lastUpdDtm
        end

        SVC->>EKK1091: executeSC - Progress registration
        EKK1091-->>SVC: Response
    end

    SVC-->>CLIENT: param (IRequestParameterReadWrite)
```

**Processing Overview:**

1. **Input Extraction and Validation (L955-L976)**: The method retrieves a `HashMap` from the request parameter using `fixedText` as the key. From this map, it extracts `sysid`, `lastUpdDtm`, and the list of option service contract cancellations (`opSvcKeiDslList`). It validates that all three are non-null and the list is not empty — if validation fails, it throws an `SCCallException`.

2. **Claim Details Application Process — SYSID Unit (L979-L1003)**: Before processing individual contracts, the method registers the claim context at the SYSID level. It executes EKK0011D020 (Claim content acceptance registration) to register the acceptance of the claim content, then executes EKK0021C060 (Claim details inquiry / follow-up work) to initiate the inquiry process. The response from EKK0011D020 yields `mskmNaiyoMap` (claim content details map) and `mskmUpdDtm` (update timestamp), which are passed to EKK0021C060's input mapping.

3. **Per-Contract Cancellation Loop (L1006-L1078)**: The method iterates over each option service contract in `opSvcKeiDslList`. For each contract:
   - It validates that `opSvcKeiNo` (option service contract number) is not null.
   - It executes EKK0351A010 (Option service contract agreement check) to retrieve the current contract state (`opInfoMapBf`).
   - **Branch: Contract Cancellation Available** (`opSvcKeiStat == CD00037_020`): If the contract status indicates cancellation is available (e.g., already terminated but not yet confirmed), it executes EKK0351C220 (Option service contract cancellation — a cleanup/cancellation action) and updates `lastUpdDtm`.
   - **Branch: Billing Judgment Path** (contract is active or being billed): If the contract is not in the cancellation-available state (it is still in service or being billed), it performs billing judgment via `jdgHiChrg()` (L1047), then executes the full termination workflow: EKK0351C240 (Option service contract termination) followed by EKK0351C250 (Option service contract termination confirmation). The `hiChrgMap` from the billing judgment is passed to the confirmation step.
   - **Progress Registration (EKK1091D010)**: After either cancellation path, the method executes EKK1091D010 (Progress registration) to record the processing progress for the current contract, using the `opSvcKeiDslMap` and `mskmNaiyoMap`.

4. **Return (L1079-L1080)**: After all contracts are processed, the method outputs an end debug log and returns the modified `param`.

## 3. Parameter Analysis

| No | Parameter Name | Type | Business Description |
|----|---------------|------|---------------------|
| 1 | `handle` | `SessionHandle` | The session handle representing the current business session context. Used to maintain transaction boundaries and session state across all service component calls executed by this method. |
| 2 | `param` | `IRequestParameterReadWrite` | The request parameter object carrying all input/output data for the cancellation operation. Contains the claim data map (retrieved via `getData(fixedText)`), template data populated by each SC execution, and control map data (e.g., return messages). Modified in-place throughout processing. |
| 3 | `fixedText` | `String` | The service message identifier / key used to look up the claim data within the request parameter map. It serves as the key for `param.getData()`, `initData()`, and all `setInMap*()` methods, tying together the shared business context across all SC calls. |

**Instance fields and external state read:**

| Field | Source | Business Description |
|-------|--------|---------------------|
| `RETURN_CODE_NORMAL` | `JFUDslNetOpSvcKeiCC` | Normal return code constant used when throwing `SCCallException` for validation errors |
| `IN_SYSID` | `JFUDslNetOpSvcKeiCC` | Map key for extracting the SYSID (system identifier) from the input claim data |
| `IN_LAST_UPD_DTM` | `JFUDslNetOpSvcKeiCC` | Map key for extracting the last update datetime from the input claim data |
| `IN_OP_SVC_KEI_DSL_LIST` | `JFUDslNetOpSvcKeiCC` | Map key for extracting the list of option service contract cancellation targets from the input data |
| `IN_COL_LIST_EKK0011D020` | `JFUDslNetOpSvcKeiCC` (inherited) | Input column list template for the EKK0011D020 SC call |
| `TEMP_ID_EKK0011D020` | `JFUDslNetOpSvcKeiCC` (inherited) | Temporary ID for the EKK0011D020 SC template |
| `TEMP_ID_DTL_EKK0011D020` | `JFUDslNetOpSvcKeiCC` (inherited) | Detail temporary ID for the EKK0011D020 SC template |
| `TEMP_TEMP_KEY_EKK0011D020` | `JFUDslNetOpSvcKeiCC` (inherited) | Temporary template key for the EKK0011D020 SC |
| `IN_COL_LIST_EKK0021C060` | `JFUDslNetOpSvcKeiCC` (inherited) | Input column list template for the EKK0021C060 SC call |
| `TEMP_ID_EKK0021C060` | `JFUDslNetOpSvcKeiCC` (inherited) | Temporary ID for the EKK0021C060 SC template |
| `IN_COL_LIST_EKK0351A010` | `JFUDslNetOpSvcKeiCC` (inherited) | Input column list template for the EKK0351A010 SC call |
| `TEMP_ID_EKK0351A010` | `JFUDslNetOpSvcKeiCC` (inherited) | Temporary ID for the EKK0351A010 SC template |
| `TEMP_ID_DTL_EKK0351A010` | `JFUDslNetOpSvcKeiCC` (inherited) | Detail temporary ID for the EKK0351A010 SC template |
| `ERR_COL_EKK0351A010` | `JFUDslNetOpSvcKeiCC` (inherited) | Error column list for the EKK0351A010 SC call |
| `TEMP_TEMP_KEY_EKK0351A010` | `JFUDslNetOpSvcKeiCC` (inherited) | Temporary template key for the EKK0351A010 SC |
| `IN_COL_LIST_EKK0351C220` | `JFUDslNetOpSvcKeiCC` (inherited) | Input column list template for the EKK0351C220 SC call |
| `TEMP_ID_EKK0351C220` | `JFUDslNetOpSvcKeiCC` (inherited) | Temporary ID for the EKK0351C220 SC template |
| `TEMP_ID_DTL_EKK0351C220` | `JFUDslNetOpSvcKeiCC` (inherited) | Detail temporary ID for the EKK0351C220 SC template |
| `ERR_COL_EKK0351C220` | `JFUDslNetOpSvcKeiCC` (inherited) | Error column list for the EKK0351C220 SC call |
| `TEMP_TEMP_KEY_EKK0351C220` | `JFUDslNetOpSvcKeiCC` (inherited) | Temporary template key for the EKK0351C220 SC |
| `IN_COL_LIST_EKK0351C240` | `JFUDslNetOpSvcKeiCC` (inherited) | Input column list template for the EKK0351C240 SC call |
| `TEMP_ID_EKK0351C240` | `JFUDslNetOpSvcKeiCC` (inherited) | Temporary ID for the EKK0351C240 SC template |
| `TEMP_ID_DTL_EKK0351C240` | `JFUDslNetOpSvcKeiCC` (inherited) | Detail temporary ID for the EKK0351C240 SC template |
| `ERR_COL_EKK0351C240` | `JFUDslNetOpSvcKeiCC` (inherited) | Error column list for the EKK0351C240 SC call |
| `TEMP_TEMP_KEY_EKK0351C240` | `JFUDslNetOpSvcKeiCC` (inherited) | Temporary template key for the EKK0351C240 SC |
| `IN_COL_LIST_EKK0351C250` | `JFUDslNetOpSvcKeiCC` (inherited) | Input column list template for the EKK0351C250 SC call |
| `TEMP_ID_EKK0351C250` | `JFUDslNetOpSvcKeiCC` (inherited) | Temporary ID for the EKK0351C250 SC template |
| `TEMP_ID_DTL_EKK0351C250` | `JFUDslNetOpSvcKeiCC` (inherited) | Detail temporary ID for the EKK0351C250 SC template |
| `ERR_COL_EKK0351C250` | `JFUDslNetOpSvcKeiCC` (inherited) | Error column list for the EKK0351C250 SC call |
| `TEMP_TEMP_KEY_EKK0351C250` | `JFUDslNetOpSvcKeiCC` (inherited) | Temporary template key for the EKK0351C250 SC |
| `IN_COL_LIST_EKK1091D010` | `JFUDslNetOpSvcKeiCC` (inherited) | Input column list template for the EKK1091D010 SC call |
| `TEMP_ID_EKK1091D010` | `JFUDslNetOpSvcKeiCC` (inherited) | Temporary ID for the EKK1091D010 SC template |
| `TEMP_ID_DTL_EKK1091D010` | `JFUDslNetOpSvcKeiCC` (inherited) | Detail temporary ID for the EKK1091D010 SC call |
| `BLANK` | `JFUDslNetOpSvcKeiCC` (inherited) | Blank string constant used as a placeholder for blank template columns |
| `CD00037_020` | `JFUStrConst` | Status code constant indicating the contract cancellation available state (option service contract status code indicating the contract is in a cancellable state) |
| `IN_OP_SVC_KEI_NO` | `JFUDslNetOpSvcKeiCC` | Map key for extracting the option service contract number from the contract detail map |
| `EKK0351A010CBSMsg1List.OP_SVC_KEI_STAT` | `EKK0351A010CBSMsg1List` | Field name constant for the option service contract status in the EKK0351A010 response |
| `EKK0351C220CBSMsg.UPD_DTM` | `EKK0351C220CBSMsg` | Field name constant for the update datetime in the EKK0351C220 response |
| `EKK0351C240CBSMsg.UPD_DTM` | `EKK0351C240CBSMsg` | Field name constant for the update datetime in the EKK0351C240 response |
| `EKK0351C250CBSMsg.UPD_DTM` | `EKK0351C250CBSMsg` | Field name constant for the update datetime in the EKK0351C250 response |
| `EKK0011D020CBSMsg.UPD_DTM` | `EKK0011D020CBSMsg` | Field name constant for the update datetime in the EKK0011D020 response |

## 4. CRUD Operations / Called Services

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

The following table classifies all method calls within this method as CRUD operations, with SC Codes and entity/table information inferred from the SC class names and CBS message references.

| CRUD | SC / CBS | SC Code | Entity / DB | Operation Description |
|------|----------|---------|-------------|----------------------|
| R | `JFUBPCommon.isNull` | - | - | Null-check utility call for input validation of sysid, lastUpdDtm, and opSvcKeiDslList |
| R | `JFUStrConst.CD00037_020` | - | - | String constant reference for contract status code comparison |
| C | `JFUBPCommon.initData` | EKK0011D020SC | Claim acceptance data | Initializes input data for the claim content acceptance registration SC (EKK0011D020) |
| C | `JFUBPCommon.initData` | EKK0021C060SC | Claim inquiry data | Initializes input data for the claim details inquiry / follow-up work SC (EKK0021C060) |
| C | `JFUBPCommon.initData` | EKK0351A010SC | Option service contract data | Initializes input data for the option service contract agreement check SC (EKK0351A010) |
| C | `JFUBPCommon.initData` | EKK0351C220SC | Option service contract cancellation data | Initializes input data for the option service contract cancellation SC (EKK0351C220) |
| C | `JFUBPCommon.initData` | EKK0351C240SC | Option service contract termination data | Initializes input data for the option service contract termination SC (EKK0351C240) |
| C | `JFUBPCommon.initData` | EKK0351C250SC | Option service contract termination confirmation data | Initializes input data for the option service contract termination confirmation SC (EKK0351C250) |
| C | `JFUBPCommon.initData` | EKK1091D010SC | Progress registration data | Initializes input data for the progress registration SC (EKK1091D010) |
| C | `setInMapEKK0011D020` | EKK0011D020SC | Claim acceptance data | Maps sysid into the input data for the claim content acceptance registration SC |
| C | `setInMapEKK0021C060` | EKK0021C060SC | Claim inquiry data | Maps mskmUpdDtm and mskmNaiyoMap into the input data for the claim details inquiry SC |
| C | `setInMapEKK0351A010` | EKK0351A010SC | Option service contract data | Maps opSvcKeiNo into the input data for the option service contract agreement check SC |
| C | `setInMapEKK0351C220` | EKK0351C220SC | Contract cancellation data | Maps opInfoMapBf, mskmNaiyoMap, and lastUpdDtm into the input data for the contract cancellation SC |
| C | `setInMapEKK0351C240` | EKK0351C240SC | Contract termination data | Maps opInfoMapBf, mskmNaiyoMap, and lastUpdDtm into the input data for the contract termination SC |
| C | `setInMapEKK0351C250` | EKK0351C250SC | Termination confirmation data | Maps opInfoMapBf, hiChrgMap, and lastUpdDtm into the input data for the termination confirmation SC |
| C | `setInMapEKK1091D010` | EKK1091D010SC | Progress registration data | Maps opSvcKeiDslMap and mskmNaiyoMap into the input data for the progress registration SC |
| C | `executeSC` | EKK0011D020SC | KK_T_ODR_HAKKO_JOKEN (Order Content Acceptance Registration) | Executes the claim content acceptance registration service component — registers the claim content for acceptance at the SYSID level |
| C | `executeSC` | EKK0021C060SC | KK_T_ODR_INQ_FOLLOWUP (Claim Inquiry Follow-up Work) | Executes the claim details inquiry and follow-up work service component — initiates the inquiry process with the previously registered claim context |
| C | `executeSC` | EKK0351A010SC | KK_T_OPSVKEI (Option Service Contract Master) | Executes the option service contract agreement check — queries the current state of a specific option service contract to determine its status (opSvcKeiStat) |
| C | `executeSC` | EKK0351C220SC | KK_T_OPSVKEI (Option Service Contract Master) | Executes the option service contract cancellation — performs a cancellation action for contracts already in the cancellation-available state (clean-up path) |
| C | `executeSC` | EKK0351C240SC | KK_T_OPSVKEI (Option Service Contract Master) | Executes the option service contract termination — terminates a live/active option service contract as part of the full cancellation workflow |
| C | `executeSC` | EKK0351C250SC | KK_T_OPSVKEI (Option Service Contract Master) | Executes the option service contract termination confirmation — confirms the termination after billing judgment, finalizing the cancellation |
| C | `executeSC` | EKK1091D010SC | KK_T_PROGRESS (Progress Management) | Executes the progress registration — records the processing progress for each option service contract being cancelled |
| R | `JFUBaseCC.getTemplateListMap` | - | - | Reads template data from the response map to retrieve mskmNaiyoMap (claim details) and opInfoMapBf (contract info) |
| R | `JFUBaseCC.getMaxTempTempleteKey` | - | - | Gets the maximum temporary template key to identify the latest response data |
| R | `JFUBaseCC.getTemplateValue` | - | - | Extracts scalar values (e.g., UPD_DTM) from the template response |
| R | `JFUBaseUtil.getTemplateListMap` | - | - | Reads template data via the Util variant |
| R | `JFUBaseUtil.getMaxTempTempleteKey` | - | - | Gets the maximum temporary template key via the Util variant |
| R | `JFUBaseUtil.getTemplateValue` | - | - | Extracts scalar values from template response via the Util variant |
| R | `JFUBPCommon.getTemplateListMap` | - | - | Reads template data via the BP Common variant |
| R | `JFUBPCommon.getMaxTempTempleteKey` | - | - | Gets the maximum temporary template key via the BP Common variant |
| R | `JFUBPCommon.getTemplateValue` | - | - | Extracts scalar values from template response via the BP Common variant |
| - | `JFUDslNetOpSvcKeiCC.jdgHiChrg` | - | - | Calls the billing judgment processing method within the same class to determine billing status for active contracts |
| - | `JFUDslNetOpSvcKeiCC.outDebugLog` | - | - | Debug logging utility |
| - | `JACBatCommon.isNull` | - | - | Null-check utility (called indirectly through JFUBPCommon) |
| - | `JACbatRknBusinessUtil.isNull` | - | - | Null-check utility (called indirectly through JFUBPCommon) |
| - | `JCHbatSeikyKaknoBusinessUtil.isNull` | - | - | Null-check utility (called indirectly through JFUBPCommon) |
| - | `JBSbatACInsentetivePrcInfoSaksei.isNull` | - | - | Null-check utility (called indirectly through JFUBPCommon) |
| - | `JBSbatAKCHSeikyYsoInfMake.isNull` | - | - | Null-check utility (called indirectly through JFUBPCommon) |

## 5. Dependency Trace

| # | Caller (Screen/Batch) | Call Chain (Full Path to this Method) | Terminal (SC / CRUD / Entity) |
|---|----------------------|--------------------------------------|-------------------------------|
| 1 | `JFUDslNetOpSvcKeiCC.dslOpSvcKei()` | `dslOpSvcKei()` -> `dslOpSvcKeiRs()` | `executeSC [C] KK_T_ODR_HAKKO_JOKEN`, `executeSC [C] KK_T_ODR_INQ_FOLLOWUP`, `executeSC [C] KK_T_OPSVKEI`, `executeSC [C] KK_T_PROGRESS` |

**Call chain details:** The method is called exclusively from `JFUDslNetOpSvcKeiCC.dslOpSvcKei()` within the same class. The `dslOpSvcKei()` method serves as the public entry point (likely called from the screen controller) and delegates to `dslOpSvcKeiRs()` to perform the actual cancellation processing. The terminal operations reached from this method span five distinct service components: EKK0011D020 (claim acceptance registration), EKK0021C060 (claim inquiry/follow-up), EKK0351A010/A010SC (option service contract check — reads contract state), EKK0351C220/C240/C250 (cancellation/termination/confirmation of option service contracts), and EKK1091D010 (progress registration).

## 6. Per-Branch Detail Blocks

**Block 1** — IF (input validation) `(sysid, lastUpdDtm, opSvcKeiDslList all non-null/non-empty)` (L967)

> Validates that all required input data is present. If any field is null or the list is empty, throws an exception.

| # | Type | Code |
|---|------|------|
| 1 | EXEC | `outDebugLog("----- dslOpSvcKeiRs Error -----")` // Error log [-> OUT_DEBUG] |
| 2 | RETURN | `throw new SCCallException(...)` // Throws with RETURN_CODE_NORMAL and RELATION_ERR |

**Block 2** — PROCESS (Claim Details Application Process — SYSID Unit) (L979-L1003)

> Registers the claim context at the SYSID level before per-contract processing. This involves two SC calls: the claim content acceptance registration and the claim details inquiry with follow-up work.

| # | Type | Code |
|---|------|------|
| 1 | CALL | `initData(param, fixedText, IN_COL_LIST_EKK0011D020)` // Initialize data for EKK0011D020 |
| 2 | CALL | `setInMapEKK0011D020(param, fixedText, sysid)` // Map sysid into input data |
| 3 | CALL | `executeSC(handle, param, fixedText, TEMP_ID_EKK0011D020, TEMP_ID_DTL_EKK0011D020, IN_COL_LIST_EKK0011D020, BLANK)` // Execute SC: Claim content acceptance registration |
| 4 | SET | `mskmNaiyoMap = getTemplateListMap(...)` // Get claim content details map from response |
| 5 | SET | `mskmUpdDtm = getTemplateValue(...)` // Get update datetime from response |
| 6 | CALL | `initData(param, fixedText, IN_COL_LIST_EKK0021C060)` // Initialize data for EKK0021C060 |
| 7 | CALL | `setInMapEKK0021C060(param, fixedText, mskmUpdDtm, mskmNaiyoMap)` // Map mskmUpdDtm and mskmNaiyoMap into input data |
| 8 | CALL | `executeSC(handle, param, fixedText, TEMP_ID_EKK0021C060, BLANK, IN_COL_LIST_EKK0021C060, BLANK)` // Execute SC: Claim details inquiry / follow-up work |

**Block 3** — FOR LOOP (Per-Contract Cancellation) `(for each opSvcKeiDslMap in opSvcKeiDslList)` (L1006)

> Iterates over each option service contract in the cancellation target list. Each iteration follows the same pattern: extract opSvcKeiNo, validate, check contract status, and branch to the appropriate cancellation path.

**Block 3.1** — IF (opSvcKeiNo null check) `(opSvcKeiNo is null)` (L1014)

> Validates that each contract has a valid contract number. Throws an exception if null.

| # | Type | Code |
|---|------|------|
| 1 | SET | `opSvcKeiNo = (String)opSvcKeiDslMap.get(IN_OP_SVC_KEI_NO)` // Extract contract number [-> IN_OP_SVC_KEI_NO] |
| 2 | EXEC | `outDebugLog("----- dslOpSvcKeiRs Error -----")` // Error log |
| 3 | RETURN | `throw new SCCallException(...)` // Throws with RETURN_CODE_NORMAL and RELATION_ERR |

**Block 3.2** — PROCESS (EKK0351A010 — Option Service Contract Agreement Check) (L1021-L1030)

> Retrieves the current contract state for the current option service contract. This is a read operation that provides the contract information needed to determine the cancellation path.

| # | Type | Code |
|---|------|------|
| 1 | CALL | `initData(param, fixedText, IN_COL_LIST_EKK0351A010)` // Initialize data for EKK0351A010 |
| 2 | CALL | `setInMapEKK0351A010(param, fixedText, opSvcKeiNo)` // Map opSvcKeiNo into input data |
| 3 | CALL | `executeSC(handle, param, fixedText, TEMP_ID_EKK0351A010, TEMP_ID_DTL_EKK0351A010, IN_COL_LIST_EKK0351A010, ERR_COL_EKK0351A010)` // Execute SC: Option service contract agreement check |
| 4 | SET | `opInfoMapBf = getTemplateListMap(inMap, getMaxTempTempleteKey(inMap, TEMP_TEMP_KEY_EKK0351A010), TEMP_ID_DTL_EKK0351A010, 0)` // Get contract info map from response |

**Block 3.3** — IF-ELSE (Contract Status Branch) `(opSvcKeiStat == CD00037_020)` (L1035)

> This is the critical branching point of the method. CD00037_020 represents the "Contract cancellation available" status (option service contract status indicating the contract is in a state where simple cancellation can be performed — e.g., already terminated but not yet confirmed). When true, a simple cancellation path is taken. When false (contract is active or being billed), a full termination workflow is executed.

> **Branch condition:** `JFUStrConst.CD00037_020` = the status code constant indicating cancellation is available.
> **Value reference:** `[-> JFUStrConst.CD00037_020]`

**Block 3.3.1** — IF-THEN (Cancellation Path: Simple Cancellation) `(opSvcKeiStat == CD00037_020)` (L1040-L1044)

> Executes the simple cancellation flow. This path is for contracts that are already in the "cancellation available" state (e.g., termination has been applied but not yet confirmed). It performs a cancellation action (EKK0351C220) which is a clean-up/cancellation operation rather than a full termination.

| # | Type | Code |
|---|------|------|
| 1 | CALL | `initData(param, fixedText, IN_COL_LIST_EKK0351C220)` // Initialize data for EKK0351C220 (Contract cancellation) |
| 2 | CALL | `setInMapEKK0351C220(param, fixedText, opInfoMapBf, mskmNaiyoMap, lastUpdDtm)` // Map contract info, claim details, and update timestamp |
| 3 | CALL | `executeSC(handle, param, fixedText, TEMP_ID_EKK0351C220, TEMP_ID_DTL_EKK0351C220, IN_COL_LIST_EKK0351C220, ERR_COL_EKK0351C220)` // Execute SC: Option service contract cancellation |
| 4 | SET | `lastUpdDtm = getTemplateValue(inMap, getMaxTempTempleteKey(inMap, TEMP_TEMP_KEY_EKK0351C220), EKK0351C220CBSMsg.UPD_DTM)` // Update lastUpdDtm from response |

**Block 3.3.2** — ELSE (Billing Judgment Path: Full Termination) `(opSvcKeiStat != CD00037_020)` (L1047-L1070)

> Executes the full termination flow for contracts that are still active or being billed. This involves three SC calls: billing judgment, contract termination, and termination confirmation. The billing judgment determines the appropriate billing handling for the cancellation.

| # | Type | Code |
|---|------|------|
| 1 | CALL | `hiChrgMap = jdgHiChrg(handle, param, fixedText, opInfoMapBf, null, "1")` // Billing judgment processing with "1" as the option type |
| 2 | CALL | `initData(param, fixedText, IN_COL_LIST_EKK0351C240)` // Initialize data for EKK0351C240 (Contract termination) |
| 3 | CALL | `setInMapEKK0351C240(param, fixedText, opInfoMapBf, mskmNaiyoMap, lastUpdDtm)` // Map contract info, claim details, and update timestamp |
| 4 | CALL | `executeSC(handle, param, fixedText, TEMP_ID_EKK0351C240, TEMP_ID_DTL_EKK0351C240, IN_COL_LIST_EKK0351C240, ERR_COL_EKK0351C240)` // Execute SC: Option service contract termination |
| 5 | SET | `lastUpdDtm = getTemplateValue(inMap, getMaxTempTempleteKey(inMap, TEMP_TEMP_KEY_EKK0351C240), EKK0351C240CBSMsg.UPD_DTM)` // Update lastUpdDtm from response |
| 6 | CALL | `initData(param, fixedText, IN_COL_LIST_EKK0351C250)` // Initialize data for EKK0351C250 (Termination confirmation) |
| 7 | CALL | `setInMapEKK0351C250(param, fixedText, opInfoMapBf, hiChrgMap, lastUpdDtm)` // Map contract info, billing judgment result, and update timestamp |
| 8 | CALL | `executeSC(handle, param, fixedText, TEMP_ID_EKK0351C250, TEMP_ID_DTL_EKK0351C250, IN_COL_LIST_EKK0351C250, ERR_COL_EKK0351C250)` // Execute SC: Option service contract termination confirmation |
| 9 | SET | `lastUpdDtm = getTemplateValue(inMap, getMaxTempTempleteKey(inMap, TEMP_TEMP_KEY_EKK0351C250), EKK0351C250CBSMsg.UPD_DTM)` // Update lastUpdDtm from response |

**Block 3.4** — PROCESS (EKK1091D010 — Progress Registration) (L1073-L1078)

> After either cancellation path, the method registers the progress for the current contract. This ensures the system tracks the processing status of each contract in the batch.

| # | Type | Code |
|---|------|------|
| 1 | CALL | `initData(param, fixedText, IN_COL_LIST_EKK1091D010)` // Initialize data for EKK1091D010 (Progress registration) |
| 2 | CALL | `setInMapEKK1091D010(param, fixedText, opSvcKeiDslMap, mskmNaiyoMap)` // Map contract detail and claim details |
| 3 | CALL | `executeSC(handle, param, fixedText, TEMP_ID_EKK1091D010, TEMP_ID_DTL_EKK1091D010, IN_COL_LIST_EKK1091D010, BLANK)` // Execute SC: Progress registration |

**Block 4** — PROCESS (End of method) (L1079-L1080)

> Outputs an end debug log and returns the modified request parameter.

| # | Type | Code |
|---|------|------|
| 1 | EXEC | `outDebugLog("----- dslOpSvcKeiRs Start -----")` // End debug log |
| 2 | RETURN | `return param` // Return the modified request parameter |

## 7. Glossary

| Term | Type | Business Meaning |
|------|------|------------------|
| `dslOpSvcKeiRs` | Method | DSL Option Service Contract Cancellation Execution (Remote Support Plus) — the core cancellation processing method for eo Hikari Net option services |
| `dslOpSvcKei` | Method | DSL Option Service Contract Cancellation entry point — the public method that delegates to `dslOpSvcKeiRs()` |
| `sysid` | Field | System identifier — the unique identifier for a DSL connection/system, used to group claim processing at the SYSID level |
| `lastUpdDtm` | Field | Last update datetime — tracks the most recent update timestamp across all SC calls, passed between SCs to maintain temporal consistency |
| `opSvcKeiDslList` | Field | Option service contract DSL cancellation list — the list of option service contracts to be cancelled for the current DSL connection |
| `opSvcKeiNo` | Field | Option service contract number — the unique identifier for a specific option service contract |
| `opInfoMapBf` | Field | Option service contract info map (before) — the current state of the option service contract retrieved from EKK0351A010, containing fields like `OP_SVC_KEI_STAT` |
| `mskmNaiyoMap` | Field | Claim content details map — the structured claim content information from the EKK0011D020 response, containing details about the claim registration |
| `mskmUpdDtm` | Field | Claim content update datetime — the update timestamp from the EKK0011D020 response, passed to EKK0021C060 as part of the claim context |
| `hiChrgMap` | Field | Billing judgment map — the result of the billing judgment processing (`jdgHiChrg`), containing billing-related information for the contract termination |
| `CD00037_020` | Constant | Contract cancellation available status code — the status value in `opSvcKeiStat` that indicates the option service contract is in a state where simple cancellation (without billing) can be performed |
| `OP_SVC_KEI_STAT` | Field | Option service contract status — the status field in the contract info map that determines the cancellation path |
| `OP_DSL_DIV` | Field | Option cancellation division — a classification field for the type of option cancellation |
| `OP_DSL_DIV_MLAD` | Constant | Option cancellation division: Mail address web cancellation (value "1") |
| `OP_DSL_DIV_VC` | Constant | Option cancellation division: Mail Wischi service web cancellation (value "2") |
| SC | Acronym | Service Component — a service layer component that encapsulates business logic and database operations, identified by codes like EKK0351A010SC |
| CBS | Acronym | Component-Based Service — the CBS message classes (e.g., EKK0351A010CBSMsg) define the input/output fields for service component calls |
| EKK | Acronym | Enterprise Kit Code — prefix used for service component codes in the eo system (EKK = EO Ku-su Kei, related to customer service) |
| EKK0011D020 | SC Code | Claim content acceptance registration — registers the acceptance of claim content for a DSL connection |
| EKK0021C060 | SC Code | Claim details inquiry / follow-up work — performs inquiry and follow-up work related to the claim |
| EKK0351A010 | SC Code | Option service contract agreement check — queries the current state of an option service contract |
| EKK0351C220 | SC Code | Option service contract cancellation — performs cancellation for contracts in the cancellation-available state |
| EKK0351C240 | SC Code | Option service contract termination — terminates an active option service contract |
| EKK0351C250 | SC Code | Option service contract termination confirmation — confirms the termination of an option service contract after billing judgment |
| EKK1091D010 | SC Code | Progress registration — records the processing progress for each option service contract |
| SOD | Acronym | Service Order Data — telecom order fulfillment entity; mentioned in the change history as SOD non-conformance issues related to IPv6 cancellation |
| FTTH | Business term | Fiber To The Home — fiber-optic internet service; the DSL connection context for option service contracts |
| eo Hikari | Business term | eo Hikari — NTT docomo's fiber-optic internet service brand; the service platform this method operates on |
| Remote Support Plus | Business term | リモートサポートプラス — a remote support service for eo Hikari customers; this method specifically supports this service |
| jdgHiChrg | Method | Billing judgment processing — a method within the same class that determines billing status for contract cancellation |
| initData | Method | Data initialization method — initializes input data structures for SC calls |
| setInMap* | Method | Input mapping methods — specialized methods that populate input data structures for specific SC calls (EKK0011D020, EKK0021C060, EKK0351A010, EKK0351C220, EKK0351C240, EKK0351C250, EKK1091D010) |
| executeSC | Method | Service Component execution method — the core method that invokes service components with the prepared input data and returns results in the template map |
| getTemplateListMap | Method | Template list map getter — retrieves a HashMap of template data from the response |
| getTemplateValue | Method | Template value getter — retrieves a scalar value from the template response |
| getMaxTempTempleteKey | Method | Maximum temporary template key getter — gets the key of the latest temporary template to identify the current response |
| outDebugLog | Method | Debug log output — outputs diagnostic log messages |
| SCControlMapKeys.RETURN_MESSAGE | Constant | Control map key for the return message — used to get the error message text when throwing exceptions |
| SCCallException | Exception | Service Component call exception — thrown when service component calls fail or validation fails |
| `fixedText` | Parameter | Service message — the key used to identify and look up the claim data within the request parameter |