# Business Logic — KKW02410SFLogic.executeDslSvc() [38 LOC]

| Field | Value |
|-------|-------|
| Fully Qualified Name | `eo.web.webview.KKW02410SF.KKW02410SFLogic` |
| Layer | Service (Logic) |
| Module | `KKW02410SF` (Package: `eo.web.webview.KKW02410SF`) |

## 1. Role

### KKW02410SFLogic.executeDslSvc()

This method implements the **Femtocell Option Information Cancellation Confirmation Execution Processing** (フェムトセルオプション情報解約確認実行処理). It is the central orchestration method for confirming and executing the cancellation (解約) of a femtocell option service attached to a customer's broadband contract.

The method follows a **router/dispatch + mapper** design pattern. It prepares three working maps (`paramMap`, `inputMap`, `outputMap`), then delegates the heavy lifting to a Data-BP (Business Process) mapper (`KKSV0578_KKSV0578OPDBMapper`). The mapper translates screen DataBean fields into a structured input payload that the underlying BPM (Business Process Management) service expects. After invoking the BPM service via `invokeService`, the method reads back the result through the mapper's `getOpSvcKeiDslCC` method and writes any returned message ID back to the DataBean.

The method serves as an internal utility within the Femtocell Option Update module. It is not a public entry point — it is called privately by `KKW02410SFLogic.actionFix()` when the user confirms the cancellation action on the femtocell option update screen. The entire flow is linear with no conditional branches: mapping → service invocation → result retrieval.

The method handles one business service type: **Femtocell Option Cancellation**. A secondary responsibility (added in v5.00, ST1-2013-0000397) is registering the **Femtocell Anomaly Information** (フェムトセル異動情報) alongside the cancellation, ensuring that any service change/disconnection event is logged for audit and provisioning purposes.

## 2. Processing Pattern (Detailed Business Logic)

```mermaid
flowchart TD
    START(["executeDslSvc paramBean, func_code"])

    START --> SETUP["Create paramMap, inputMap, outputMap"]
    SETUP --> SET_USECASE["Set TELEGRAM_INFO_USECASE_ID = KKSV0578 in paramMap"]
    SET_USECASE --> CREATE_MAPPER["Create KKSV0578_KKSV0578OPDBMapper instance"]
    CREATE_MAPPER --> SET_OP_SVC["Call setOpSvcKeiDslCC(paramBean, inputMap, func_code)"]
    SET_OP_SVC --> SET_SOD["Call setJKKHakkoSODCC(paramBean, inputMap, func_code)"]
    SET_SOD --> SET_FMTCEL["Call setFmtcelIdoInfAddCC(paramBean, inputMap, func_code)"]
    SET_FMTCEL --> CLEAR_RTN["Clear rtn_msg_id via sendMessageString"]
    CLEAR_RTN --> INVOKE["Call invokeService paramMap, inputMap, outputMap"]
    INVOKE --> GET_RESULT["Call getOpSvcKeiDslCC paramBean, outputMap"]
    GET_RESULT --> END_NODE(["Return"])
```

**Processing summary:**

| Step | Action | Business Meaning |
|------|--------|-----------------|
| 1 | Create maps | Initialize parameter, input, and output containers for the BPM service call |
| 2 | Set use case ID | Tag the call with `KKSV0578` — the BPM use case for "Option Service Contract Cancellation Confirmation" (オプションサービス契約解約確認) |
| 3 | Create mapper | Instantiate the Data-to-BP mapper for KKSV0578 screen |
| 4 | `setOpSvcKeiDslCC` | Map screen DataBean fields (contract numbers, dates, anomaly reason list) to the `OpSvcKeiDslCC` input map for the Option Service Contract Cancellation |
| 5 | `setJKKHakkoSODCC` | Map screen DataBean fields (SYSID, anomaly division, service contract info, operation service contract info) to the `HakkoSODCC` input map for the Service Order Data (SOD) creation |
| 6 | `setFmtcelIdoInfAddCC` | Map screen DataBean fields (service contract number, operation service contract number, anomaly division, fixed anomaly detail code `"02"`) to the `FmtcelIdoInfAddCC` input map for the Femtocell Anomaly Information Registration |
| 7 | Clear message ID | Reset the return message ID field in the DataBean to prepare for the BPM result |
| 8 | `invokeService` | Execute the BPM workflow `KKSV0578` with the assembled input payload |
| 9 | `getOpSvcKeiDslCC` | Read back the BPM result (e.g., return message ID) and write it to the DataBean |

## 3. Parameter Analysis

| No | Parameter Name | Type | Business Description |
|----|---------------|------|---------------------|
| 1 | `paramBean` | `X31SDataBeanAccess[]` | Array of DataBean objects representing the screen data. `paramBean[0]` is the primary bean carrying the femtocell option update screen fields — including service contract numbers, anomaly reasons, dates, and message ID fields. The first element is used for all reads (data extraction) and writes (result return). |
| 2 | `func_code` | `String` | Function code — identifies the calling screen/function. Passed through to the BPM service as common metadata so the back-end process knows which entry point triggered this cancellation confirmation. |

**Instance fields / external state read:**

| Field | Source | Business Description |
|-------|--------|---------------------|
| `KKW02410SFConst.RTN_MSG_ID` | `KKW02410SFConst.java:129` | Return message ID field key — used to clear/reset the message ID in the DataBean before the BPM invocation |
| `X31CWebConst.TELEGRAM_INFO_USECASE_ID` | `X31CWebConst` | Key for setting the BPM use case identifier in the parameter map |
| `X31CWebConst.DATABEAN_SET_VALUE` | `X31CWebConst` | Constant used to set (write) a value into the DataBean |
| `X31CWebConst.DATABEAN_GET_VALUE` | `X31CWebConst` | Constant used to get (read) a value from the DataBean |

## 4. CRUD Operations / Called Services

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

| CRUD | SC / CBS | SC Code | Entity / DB | Operation Description |
|------|----------|---------|-------------|----------------------|
| - | `JCCBatCommon.invokeService` | JCCBatCommon | - | Calls `invokeService` in `JCCBatCommon` to execute the BPM workflow |
| - | `JBSBatKKCrsChgIktAdd.invokeService` | JBSBatKKCrsChgIktAdd | - | Calls `invokeService` in `JBSBatKKCrsChgIktAdd` |
| - | `JBSbatKKCrsChgSmtVLAdd.invokeService` | JBSbatKKCrsChgSmtVLAdd | - | Calls `invokeService` in `JBSbatKKCrsChgSmtVLAdd` |
| - | `JBSbatKKCrsChgWribSette.invokeService` | JBSbatKKCrsChgWribSette | - | Calls `invokeService` in `JBSbatKKCrsChgWribSette` |
| - | `JBSbatKKEponSwchKjInfSksi.invokeService` | JBSbatKKEponSwchKjInfSksi | - | Calls `invokeService` in `JBSbatKKEponSwchKjInfSksi` |
| - | `OneStopDataBeanAccess.sendMessageString` | OneStopDataBeanAccess | - | Calls `sendMessageString` in `OneStopDataBeanAccess` |
| R | `KKSV0578_KKSV0578OPDBMapper.getOpSvcKeiDslCC` | KKSV0578_KKSV0578OPDBMapper | - | Calls `getOpSvcKeiDslCC` in `KKSV0578_KKSV0578OPDBMapper` — reads BPM result (return message ID) and writes to DataBean |
| - | `KKSV0578_KKSV0578OPDBMapper.setFmtcelIdoInfAddCC` | KKSV0578_KKSV0578OPDBMapper | - | Calls `setFmtcelIdoInfAddCC` in `KKSV0578_KKSV0578OPDBMapper` — maps femtocell anomaly info for registration |
| - | `KKSV0578_KKSV0578OPDBMapper.setJKKHakkoSODCC` | KKSV0578_KKSV0578OPDBMapper | - | Calls `setJKKHakkoSODCC` in `KKSV0578_KKSV0578OPDBMapper` — maps SOD (Service Order Data) creation payload |
| - | `KKSV0578_KKSV0578OPDBMapper.setOpSvcKeiDslCC` | KKSV0578_KKSV0578OPDBMapper | - | Calls `setOpSvcKeiDslCC` in `KKSV0578_KKSV0578OPDBMapper` — maps option service contract cancellation data |

**Analysis of actual method calls within `executeDslSvc` (lines 456–493):**

| CRUD | SC / CBS | SC Code | Entity / DB | Operation Description |
|------|----------|---------|-------------|----------------------|
| SET | `paramMap.put(TELEGRAM_INFO_USECASE_ID, "KKSV0578")` | - | - | Sets the BPM use case ID in the parameter map — tags the service call with the KKSV0578 confirmation workflow |
| SET | `new KKSV0578_KKSV0578OPDBMapper()` | - | - | Instantiates the mapper for DataBean-to-BP payload translation |
| - | `setOpSvcKeiDslCC(paramBean, inputMap, func_code)` | - | - | Maps Option Service Contract Cancellation fields (SYSID, contract numbers, dates, anomaly reason list) to the input map |
| - | `setJKKHakkoSODCC(paramBean, inputMap, func_code)` | - | - | Maps Service Order Data (SOD) fields (SYSID, anomaly division, service contract info, operation service contract info) to the input map |
| - | `setFmtcelIdoInfAddCC(paramBean, inputMap, func_code)` | - | - | Maps Femtocell Anomaly Information Registration fields (contract number, operation contract number, anomaly division, detail code `"02"`) to the input map |
| - | `paramBean[0].sendMessageString(RTN_MSG_ID, DATABEAN_SET_VALUE, "")` | - | - | Writes empty string to the return message ID field — clears any previous message before BPM execution |
| - | `invokeService(paramMap, inputMap, outputMap)` | JCCBatCommon | BPM: KKSV0578 | Invokes the BPM service to execute the femtocell option cancellation confirmation workflow |
| R | `getOpSvcKeiDslCC(paramBean, outputMap)` | - | - | Reads BPM result from output map and writes the return message ID back to the DataBean |

## 5. Dependency Trace

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

| # | Caller (Screen/Batch) | Call Chain (Full Path to this Method) | Terminal (SC / CRUD / Entity) |
|---|----------------------|--------------------------------------|-------------------------------|
| 1 | `KKW02410SFLogic.actionFix()` | `KKW02410SFLogic.actionFix` → `KKW02410SFLogic.executeDslSvc` | `getOpSvcKeiDslCC [R]`, `invokeService [-]` |

**Full call chain detail:**

The method `KKW02410SFLogic.executeDslSvc` is called directly from `KKW02410SFLogic.actionFix()`. The `actionFix()` method is the action handler for the "Fix/Confirm" (確定) button on the femtocell option update screen. When the user clicks the confirm button after reviewing the cancellation details, `actionFix()` invokes `executeDslSvc` to process the cancellation.

**Terminal operations from this method:**

| Terminal | Type | Description |
|----------|------|-------------|
| `getOpSvcKeiDslCC` | R | Reads BPM result (return message ID) from output map and writes to DataBean |
| `invokeService` | - | Executes BPM workflow KKSV0578 (Option Service Contract Cancellation Confirmation) |
| `setOpSvcKeiDslCC` | SET | Maps option service contract cancellation input data |
| `setJKKHakkoSODCC` | SET | Maps SOD creation input data |
| `setFmtcelIdoInfAddCC` | SET | Maps femtocell anomaly information registration input data |
| `sendMessageString` | EXEC | Writes/clears message ID in DataBean |

## 6. Per-Branch Detail Blocks

**Block 1** — [SET] Variable Initialization (L459)

> Declare local HashMap variables as null — will be instantiated in the next block.

| # | Type | Code |
|---|------|------|
| 1 | SET | `HashMap<String, Object> paramMap = null;` // Parameter map for BPM service |
| 2 | SET | `HashMap<String, Object> inputMap = null;` // Input map for BP payload |
| 3 | SET | `HashMap<String, Object> outputMap = null;` // Output map for BPM result |

**Block 2** — [SET] Map Instantiation (L465–467)

> Create the three working maps. Commented as: パラメータ設定用マップ (parameter setting map), 入力用マップ (input map), 結果格納用マップ (result storage map).

| # | Type | Code |
|---|------|------|
| 1 | SET | `paramMap = new HashMap<String, Object>();` // Parameter setting map |
| 2 | SET | `inputMap = new HashMap<String, Object>();` // Input map |
| 3 | SET | `outputMap = new HashMap<String, Object>();` // Result storage map |

**Block 3** — [SET] Use Case ID Assignment (L470)

> Set the BPM use case identifier. This tags the service invocation with `KKSV0578`, the use case ID for the Option Service Contract Cancellation Confirmation workflow.

| # | Type | Code |
|---|------|------|
| 1 | SET | `paramMap.put(X31CWebConst.TELEGRAM_INFO_USECASE_ID, "KKSV0578")` // Tag with BPM use case ID for Option Service Contract Cancellation |

**Block 4** — [SET] Mapper Instantiation (L473)

> Create the Data-BP mapper instance. This mapper translates between screen DataBean fields and the BPM input/output payload structure.

| # | Type | Code |
|---|------|------|
| 1 | SET | `KKSV0578_KKSV0578OPDBMapper mapper = new KKSV0578_KKSV0578OPDBMapper();` // Mapper for KKSV0578 screen |

**Block 5** — [EXEC] Option Service Contract Cancellation Mapping (L476)

> Commented as: 解約CCマッピング (Cancellation CC Mapping). Maps Option Service Contract Cancellation fields from the DataBean into `inputMap`. This method (`setOpSvcKeiDslCC`) populates the `OpSvcKeiDslCC` key in the output map with: function code, SYSID, service contract number, option service contract number, last update timestamp before operation, anomaly division, service end date, service charge end date, progress special item 1, and the anomaly reason list (loop).

| # | Type | Code |
|---|------|------|
| 1 | CALL | `mapper.setOpSvcKeiDslCC(paramBean, inputMap, func_code)` // Map Option Service Contract Cancellation fields |

**Block 6** — [EXEC] SOD Creation Mapping (L478)

> Commented as: SODCCマッピング (SOD CC Mapping). Maps Service Order Data (SOD) creation fields from the DataBean into `inputMap`. This method (`setJKKHakkoSODCC`) populates the `HakkoSODCC` key with: function code, SYSID, anomaly division, service contract info (service contract number, prior service contract number), and operation service contract info (pre-change contract number, post-change contract number, pre-change registration timestamp).

| # | Type | Code |
|---|------|------|
| 1 | CALL | `mapper.setJKKHakkoSODCC(paramBean, inputMap, func_code)` // Map SOD creation fields |

**Block 7** — [EXEC] Femtocell Anomaly Information Registration Mapping (L481–483)

> Commented as: フェムトセル異動情報登録CCマッピング (Femtocell Anomaly Information Registration CC Mapping). Added in v5.00 (2013/02/22, ST1-2013-0000397). Maps femtocell anomaly information for registration from the DataBean into `inputMap`. This method (`setFmtcelIdoInfAddCC`) populates the `FmtcelIdoInfAddCC` key with: function code, service contract number, option service contract number, anomaly division, and a fixed anomaly detail code `"02"`.

| # | Type | Code |
|---|------|------|
| 1 | CALL | `mapper.setFmtcelIdoInfAddCC(paramBean, inputMap, func_code)` // Map Femtocell Anomaly Info Registration [-> FIXED_CODE="02"] |

**Block 8** — [EXEC] Return Message ID Clear (L486)

> Commented as: 返却IDをクリア (Clear return ID). Writes an empty string to the return message ID field in the DataBean to clear any previous message before the BPM invocation.

| # | Type | Code |
|---|------|------|
| 1 | EXEC | `paramBean[0].sendMessageString(KKW02410SFConst.RTN_MSG_ID, X31CWebConst.DATABEAN_SET_VALUE, "")` // Clear return message ID |

**Block 9** — [CALL] BPM Service Invocation (L489)

> Commented as: サービス実行 (Service Execution). Invokes the BPM service to execute the cancellation confirmation workflow. This delegates to `JCCBatCommon.invokeService()` which routes to the appropriate BPM process (KKSV0578) and processes the input maps.

| # | Type | Code |
|---|------|------|
| 1 | CALL | `invokeService(paramMap, inputMap, outputMap)` // Execute BPM workflow KKSV0578 |

**Block 10** — [EXEC] Result Retrieval (L492)

> Commented as: 結果取得 (Result Retrieval). Reads back the BPM result from `outputMap` and writes the return message ID to the DataBean. The `getOpSvcKeiDslCC` mapper extracts the `OpSvcKeiDslCC` key from the output map and writes the `rtn_msg_id` value (or empty string if not present) to the DataBean's return message ID field.

| # | Type | Code |
|---|------|------|
| 1 | EXEC | `mapper.getOpSvcKeiDslCC(paramBean, outputMap)` // Read BPM result and write to DataBean |

## 7. Glossary

| Term | Type | Business Meaning |
|------|------|-----------------|
| `executeDslSvc` | Method | Femtocell Option Information Cancellation Confirmation Execution Processing — confirms and executes cancellation of a femtocell option service |
| `actionFix` | Method | Action handler for the "Confirm/Fix" button on the femtocell option update screen |
| `paramBean` | Field | DataBean array — screen data carrying femtocell option update fields (contract numbers, dates, anomaly reasons, message IDs) |
| `func_code` | Field | Function code — identifies the calling screen; passed to BPM as common metadata |
| `KKSV0578` | Use Case ID | BPM use case for "Option Service Contract Cancellation Confirmation" (オプションサービス契約解約確認) |
| `OpSvcKeiDslCC` | BP Input Key | Option Service Contract Cancellation Confirmation — payload key for contract cancellation data mapping |
| `HakkoSODCC` | BP Input Key | SOD (Service Order Data) Creation Confirmation — payload key for service order data mapping |
| `FmtcelIdoInfAddCC` | BP Input Key | Femtocell Anomaly Information Addition Confirmation — payload key for femtocell anomaly registration mapping |
| SYSID | Field | System ID — internal system identifier for the service entity |
| `svc_kei_no` | Field | Service contract number — identifies the customer's broadband service contract line item |
| `op_svc_kei_no` | Field | Option service contract number — identifies the specific option (femtocell) attached to the main service contract |
| `ido_div` | Field | Anomaly division (異動区分) — classifies the type of service change (e.g., cancellation, modification) |
| `chbf_opsvkei_no` | Field | Pre-change operation service contract number — contract number before the cancellation takes effect |
| `chaf_opsvkei_no` | Field | Post-change operation service contract number — contract number after the cancellation takes effect |
| `chbf_opsvkei_gene_add_dtm` | Field | Pre-change operation service contract registration timestamp — when the current option service registration was last modified |
| `rtn_msg_id` | Field | Return message ID — BPM result code/message identifier returned after service execution |
| SOD | Acronym | Service Order Data — telecom order fulfillment entity representing a service order record |
| BPM | Acronym | Business Process Management — workflow engine that executes business process definitions |
| BP | Abbreviation | Business Process — a specific workflow instance within the BPM system |
| CC | Abbreviation | Conversion/Conversion Class — data mapping and conversion logic layer |
| CBS | Abbreviation | Common Business Service — shared service component for backend operations |
| SC | Abbreviation | Service Component — business logic service component |
| Femtocell | Business term | A small cellular base station designed for residential or small office use, providing localized 3G/4G coverage; in this system, it is an optional add-on service for broadband customers |
| Option Service | Business term | An optional add-on service attached to a primary broadband service contract (e.g., femtocell, email, security) |
| Cancellation (解約) | Business term | The process of terminating an option service contract, stopping billing, and deprovisioning the associated service |
| Anomaly Information (異動情報) | Business term | Event log data recording service changes (cancellations, modifications, suspensions) for audit and provisioning purposes |
| 確定 (Kakutei / Fix) | Business term | The action of confirming and committing changes — the user's "Confirm" button press on the update screen |