# Business Logic — KKW02410SFLogic.actionFix() [84 LOC]

| Field | Value |
|-------|-------|
| Fully Qualified Name | `eo.web.webview.KKW02410SF.KKW02410SFLogic` |
| Layer | Controller / WebLogic (Web front-end business logic) |
| Module | `KKW02410SF` (Package: `eo.web.webview.KKW02410SF`) |

## 1. Role

### KKW02410SFLogic.actionFix()

This method implements the **confirm button press handler** (確定ボタン押下時処理) for the **Fujicell Option Update screen** (フジセルオプション更新). The Fujicell Option Update screen allows customers or operators to view current Fujicell (femtocell) service details and request a change to the service state — either cancellation (解約) or recovery (回復) of the femtocell option.

The method implements a **routing/dispatch pattern**: it inspects the `trandiv` (processing section) field to determine whether the user requested a service cancellation or a service recovery, then delegates to the corresponding sub-service method (`executeDslSvc` or `executeKaihkSvc`). This is followed by **screen navigation** logic — if no error message ID is returned, the user is forwarded to the next screen (`KKW02411`); otherwise, an error message with replacement text is displayed.

**Design pattern**: This method serves as the **primary entry point** for the confirm action in the KKW02410SF screen lifecycle. It is not a shared utility — it belongs to a single-screen logic class and is invoked when the user clicks the "Confirm" button on the KKW02410F view page.

The method has two main conditional branches:
- **DSL branch** (処理区分が解約 — cancellation): Executes the cancellation confirmation service and displays a generic "Fujicell Option Cancellation" message, then navigates to the next screen.
- **KAIHK branch** (処理区分が回復 — recovery): Executes the recovery service, checks for error conditions via the returned message ID, and either navigates to the next screen or displays an error with replacement text.

A fallback for unknown processing sections does nothing but proceed to navigation.

## 2. Processing Pattern (Detailed Business Logic)

```mermaid
flowchart TD
    START(["actionFix()"])
    START --> INIT["Set result = true"]
    INIT --> GET_COMMON["Get commoninfoBean from super.getCommonInfoBean()"]
    GET_COMMON --> GET_BEAN["Get bean from super.getServiceFormBean()"]
    GET_BEAN --> CREATE_PARAM["Create paramBean array"]
    CREATE_PARAM --> GET_TRANDIV["Get trandiv from bean"]
    GET_TRANDIV --> INIT_MSG["Initialize rtn_msg_id and msgInfo[]"]
    INIT_MSG --> CHECK_DSL{Is DSL?}
    CHECK_DSL -->|Yes| EXEC_DSL["executeDslSvc(paramBean, FUNC_CD_1)"]
    CHECK_DSL -->|No| CHECK_KAIHK{Is Kaihk?}
    EXEC_DSL --> SET_DSL_MSG["Set msgInfo[0] = Cancellation message"]
    CHECK_KAIHK -->|Yes| EXEC_KAIHK["executeKaihkSvc(paramBean, FUNC_CD_1)"]
    CHECK_KAIHK -->|No| SKIP["Skip to screen navigation"]
    EXEC_KAIHK --> GET_RTN_MSGID["Get rtn_msg_id from bean"]
    GET_RTN_MSGID --> SET_KAIHK_MSG["Set msgInfo[0] = Recovery message"]
    SET_DSL_MSG --> CHECK_RTN_EMPTY{Is rtn_msg_id empty?}
    SET_KAIHK_MSG --> CHECK_RTN_EMPTY
    SKIP --> CHECK_RTN_EMPTY
    CHECK_RTN_EMPTY -->|Yes| SET_NEXT_SCREEN["Set NEXT_SCREEN_ID and NEXT_SCREEN_NAME to KKW02411"]
    SET_NEXT_SCREEN --> SET_MSGINFO["setMessageInfo(EKB4390__I, msgInfo)"]
    CHECK_RTN_EMPTY -->|No| SET_STR_ARRAY["Set str array with error replacement text"]
    SET_STR_ARRAY --> SET_MSG_RTN["setMessageInfo(rtn_msg_id, str)"]
    SET_MSGINFO --> LOG_BEAN["Log DataBean dump"]
    SET_MSG_RTN --> LOG_BEAN
    LOG_BEAN --> RETURN["Return result = true"]
    RETURN --> END(["END"])
```

## 3. Parameter Analysis

| No | Parameter Name | Type | Business Description |
|----|---------------|------|---------------------|
| - | (none) | - | This method takes no parameters. It derives all input from the service form bean (DataBean) and common info bean, which carry the screen state set up during `actionInit()`. |

**Instance fields / external state read:**

| Source | Description |
|--------|-------------|
| `super.getCommonInfoBean()` | Shared form bean containing cross-screen navigation state (e.g., next screen ID, screen name) |
| `super.getServiceFormBean()` | Service form bean carrying the Fujicell option update screen data (service contract number, processing section, operation date, etc.) |
| `MSGSTRING[]` | Static message resource array containing the two display messages for cancellation and recovery |
| `KKW02410SFConst.TRAN_DIV` | Constant `"processing section"` — the DataBean key used to read the processing section value |
| `KKW02410SFConst.RTN_MSG_ID` | Constant `"return message ID"` — the DataBean key used to read the error message ID after recovery service execution |
| `KKW02410SFConst.RUN_MSG_ID` | Constant `"run message ID"` — referenced in pre-extracted constants table |
| `JPCModelConstant.FUNC_CD_1` | Function code `1` — indicates standard processing mode for service calls |
| `JPCOnlineMessageConstant.EKB4390__I` | Message ID constant — the info-level message displayed on successful completion |
| `JKKScreenConst.SCREEN_ID_KKW02411` | Screen ID constant for the next screen (Fujicell option update completion screen) |
| `JKKScreenConst.SCREEN_NAME_KKW02411` | Screen name constant for the next screen |
| `CommonInfoCFConst.NEXT_SCREEN_ID` | Shared bean key for setting the next screen ID |
| `CommonInfoCFConst.NEXT_SCREEN_NAME` | Shared bean key for setting the next screen name |

## 4. CRUD Operations / Called Services

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

| CRUD | SC / CBS | SC Code | Entity / DB | Operation Description |
|------|----------|---------|-------------|----------------------|
| - | `JKKAddSupportCC.setMessageInfo` | JKKAddSupportCC | - | Calls `setMessageInfo` in `JKKAddSupportCC` |
| - | `JKKCreateNhkDntIktCC.setMessageInfo` | JKKCreateNhkDntIktCC | - | Calls `setMessageInfo` in `JKKCreateNhkDntIktCC` |
| - | `JKKFumeiKktkSvcKeiUpdCC.setMessageInfo` | JKKFumeiKktkSvcUpdCC | - | Calls `setMessageInfo` in `JKKFumeiKktkSvcKeiUpdCC` |
| - | `JKKGetKikiUpdCodeNameCC.setMessageInfo` | JKKGetKikiUpdCodeNameCC | - | Calls `setMessageInfo` in `JKKGetKikiUpdCodeNameCC` |
| - | `JKKGetKojiAkTaknkikiCC.setMessageInfo` | JKKGetKojiAkTaknkikiCC | - | Calls `setMessageInfo` in `JKKGetKojiAkTaknkikiCC` |
| - | `OneStopDataBeanAccess.sendMessageString` | OneStopDataBeanAccess | - | Calls `sendMessageString` in `OneStopDataBeanAccess` |
| - | `KKW02410SFLogic.executeDslSvc` | KKW02410SFLogic | - | Calls `executeDslSvc` in `KKW02410SFLogic` — delegates to KKSV0578 mapper for **DSL (cancellation)** processing |
| - | `KKW02410SFLogic.executeKaihkSvc` | KKW02410SFLogic | - | Calls `executeKaihkSvc` in `KKW02410SFLogic` — delegates to KKSV0579 mapper for **KAIHK (recovery)** processing |

**Additional method calls identified from source code:**

| CRUD | SC / CBS | SC Code | Entity / DB | Operation Description |
|------|----------|---------|-------------|----------------------|
| R | `bean.sendMessageString(TRAN_DIV, GET_VALUE)` | - | - | Reads the processing section (DSL/KAIHK) from the service form bean |
| R | `paramBean[0].sendMessageString(RTN_MSG_ID, GET_VALUE)` | - | - | Reads the return message ID from the DataBean after Kaihk service execution |
| W | `commoninfoBean.sendMessageString(NEXT_SCREEN_ID, SET_VALUE)` | - | - | Sets the next screen ID in the shared form bean for navigation |
| W | `commoninfoBean.sendMessageString(NEXT_SCREEN_NAME, SET_VALUE)` | - | - | Sets the next screen name in the shared form bean for navigation |
| W | `msgInfo[0] = MSGSTRING[0]` | - | - | Sets the cancellation confirmation message for display |
| W | `msgInfo[0] = MSGSTRING[1]` | - | - | Sets the recovery confirmation message for display |
| - | `JCCWebCommon.setMessageInfo(this, EKB4390__I, msgInfo)` | JCCWebCommon | - | Displays the success info message to the user |
| - | `JCCWebCommon.setMessageInfo(this, rtn_msg_id, str)` | JCCWebCommon | - | Displays the error message with replacement text to the user |
| - | `JSYwebLog.println(DataBean_Dump, ...)` | JSYwebLog | - | Dumps the DataBean state to the debug log for traceability |

## 5. Dependency Trace

| # | Caller (Screen/Batch) | Call Chain (Full Path to this Method) | Terminal (SC / CRUD / Entity) |
|---|----------------------|--------------------------------------|-------------------------------|
| 1 | Screen:KKSV0577 | `KKSV0577` (Service order agreement list) -> navigates to `KKW02410SF` (Fujicell option update) -> user clicks Confirm -> `KKW02410SFLogic.actionFix` | `executeDslSvc [U] OpSvcKeiDslCC -> EKK1091D010CBS (cancellation)` / `executeKaihkSvc [U] OpSvcKeiKaihkAddCC -> femtocell error info registration CC` |
| 2 | Screen:KKSV0578 | `KKSV0578` (DSL service call SC mapping) -> `setOpSvcKeiDslCC` -> `EKK1091D010CBS` (called by executeDslSvc via invokeService) | `EKK1091D010CBS [U] Operation service contract cancellation — writes to K-Opticom service contract tables` |
| 3 | Screen:KKSV0579 | `KKSV0579` (Kaihk service call SC mapping) -> `setFmtcelIdoInfAddCC` -> `Femtocell error info registration CC` | `Femtocell error info registration [C/R] Femtocell option data tables` |
| 4 | KKA16801SFLogic | `actionFix()` -> `this.actionFix()` | Same terminal services as KKW02410SFLogic |
| 5 | KKA16101SFLogic | `actionFix()` -> `this.actionFix()` | Same terminal services as KKW02410SFLogic |
| 6 | KKA15001SFLogic | `actionFix()` -> `this.actionFix()` | Same terminal services as KKW02410SFLogic |
| 7 | KKA16401SFLogic | `actionFix()` -> `this.actionFix()` | Same terminal services as KKW02410SFLogic |
| 8 | KKA16601SFLogic | `actionFix()` -> `this.actionFix()` | Same terminal services as KKW02410SFLogic |
| 9 | KKA15201SFLogic | `actionFix()` -> `this.actionFix()` | Same terminal services as KKW02410SFLogic |
| 10 | KKA17001SFLogic | `actionFix()` -> `this.actionFix()` | Same terminal services as KKW02410SFLogic |
| 11 | KKA18001SFLogic | `actionFix()` -> `this.actionFix()` | Same terminal services as KKW02410SFLogic |
| 12 | KKA16201SFLogic | `actionFix()` -> `this.actionFix()` | Same terminal services as KKW02410SFLogic |
| 13 | KKA14701SFLogic | `actionFix()` -> `this.actionFix()` | Same terminal services as KKW02410SFLogic |
| 14 | KKA16301SFLogic | `actionFix()` -> `this.actionFix()` | Same terminal services as KKW02410SFLogic |
| 15 | KKA14901SFLogic | `actionFix()` -> `this.actionFix()` | Same terminal services as KKW02410SFLogic |

## 6. Per-Branch Detail Blocks

**Block 1** — [SET] `(Initial variable declarations)` (L319-L334)

> Initialize local variables before processing dispatch.

| # | Type | Code |
|---|------|------|
| 1 | SET | `boolean result = true;` // Success flag |
| 2 | SET | `X31SDataBeanAccess commoninfoBean = super.getCommonInfoBean();` // Get shared form bean [-> super.getCommonInfoBean()] |
| 3 | SET | `X31SDataBeanAccess bean = super.getServiceFormBean();` // Get service form bean [-> super.getServiceFormBean()] |
| 4 | SET | `X31SDataBeanAccess[] paramBean = {bean};` // Wrap bean in array for service calls |
| 5 | SET | `String trandiv = bean.sendMessageString(KKW02410SFConst.TRAN_DIV, X31CWebConst.DATABEAN_GET_VALUE);` // Read processing section [-> KKW02410SFConst.TRAN_DIV="処理区分"] |
| 6 | SET | `String rtn_msg_id = "";` // Return message ID (default empty) |
| 7 | SET | `String[] msgInfo = new String[1];` // Message display buffer |

**Block 2** — [IF] `(JKKCommonConst.OP_TRAN_DIV_DSL.equals(trandiv)) — Cancellation branch` (L336-L349)

> If processing section indicates DSL (cancellation / 解約), execute the DSL confirmation service. Only the cancel path skips the return message ID check.

| # | Type | Code |
|---|------|------|
| 1 | CALL | `executeDslSvc(paramBean, JPCModelConstant.FUNC_CD_1);` // Cancel confirmation service [-> JPCModelConstant.FUNC_CD_1] |
| 2 | SET | `msgInfo[0] = MSGSTRING[0];` // Set cancellation message "フジセルオプションの解約" [-> MSGSTRING[0]="フジセルオプションの解約"] |

**Block 3** — [ELSE-IF] `(JKKCommonConst.OP_TRAN_DIV_KAIHK.equals(trandiv)) — Recovery branch` (L352-L363)

> If processing section indicates KAIHK (recovery / 回復), execute the recovery service and check for error conditions.

| # | Type | Code |
|---|------|------|
| 1 | CALL | `executeKaihkSvc(paramBean, JPCModelConstant.FUNC_CD_1);` // Recovery service [-> JPCModelConstant.FUNC_CD_1] |
| 2 | SET | `rtn_msg_id = paramBean[0].sendMessageString(KKW02410SFConst.RTN_MSG_ID, X31CWebConst.DATABEAN_GET_VALUE);` // Read return message ID [-> KKW02410SFConst.RTN_MSG_ID="返却メッセージID"] |
| 3 | SET | `msgInfo[0] = MSGSTRING[1];` // Set recovery message "フジセルオプションの回復" [-> MSGSTRING[1]="フジセルオプションの回復"] |

**Block 4** — [IF-ELSE] `("".equals(rtn_msg_id)) — Screen navigation decision` (L365-L389)

> If no error message ID is returned, navigate to the next screen and display a success message. Otherwise, display an error with replacement text.

| # | Type | Code |
|---|------|------|
| 1 | SET | `commoninfoBean.sendMessageString(CommonInfoCFConst.NEXT_SCREEN_ID, X31CWebConst.DATABEAN_SET_VALUE, JKKScreenConst.SCREEN_ID_KKW02411);` // Set next screen ID [-> CommonInfoCFConst.NEXT_SCREEN_ID] |
| 2 | SET | `commoninfoBean.sendMessageString(CommonInfoCFConst.NEXT_SCREEN_NAME, X31CWebConst.DATABEAN_SET_VALUE, JKKScreenConst.SCREEN_NAME_KKW02411);` // Set next screen name [-> CommonInfoCFConst.NEXT_SCREEN_NAME] |
| 3 | CALL | `JCCWebCommon.setMessageInfo(this, JPCOnlineMessageConstant.EKB4390__I, msgInfo);` // Display success message [-> JPCOnlineMessageConstant.EKB4390__I] |

**Block 4.1** — [ELSE] `(rtn_msg_id is non-empty — error recovery branch)` (L377-L389)

> v4.01 (20121007) modification: simplified from dynamic message resolution (`getMsgRep()`) to hardcoded replacement text.

| # | Type | Code |
|---|------|------|
| 1 | SET | `String[] str = {"回復可能期間外", "回復"};` // Replacement text: "Recovery period expired", "Recovery" [-> v4.01 20121007 MOD START] |
| 2 | CALL | `JCCWebCommon.setMessageInfo(this, rtn_msg_id, str);` // Display error message with replacement text [-> rtn_msg_id from bean] |

**Block 5** — [POST-PROCESSING] `(Logging and return)` (L391-L394)

> Dump the DataBean state for debugging and return success.

| # | Type | Code |
|---|------|------|
| 1 | EXEC | `JSYwebLog.println(JSYwebLog.DataBean_Dump, getClass(), dumpDatabean(), null, null, null);` // Log DataBean state |
| 2 | RETURN | `return result;` // Always returns true |

## 7. Glossary

| Term | Type | Business Meaning |
|------|------|------------------|
| `actionFix` | Method | Confirm button press handler — finalizes the user's selection on the Fujicell option update screen |
| `actionInit` | Method | Screen initialization handler — prepares data and displays the Fujicell option update form |
| `KKW02410SF` | Module | Fujicell Option Update screen module — allows viewing and changing Fujicell (femtocell) option service status |
| `KKW02411` | Screen ID | Next screen ID — Fujicell option update completion/confirmation screen |
| `KKSV0577` | Screen | Service order agreement list screen — lists active service orders |
| `KKSV0578` | Mapper | DSL (cancellation) operation service contract mapper — maps cancellation request data to SC parameters |
| `KKSV0579` | Mapper | Kaihk (recovery) operation service contract mapper — maps recovery request data to SC parameters |
| DSL | Constant value | Processing section code for cancellation (解約) |
| KAIHK | Constant value | Processing section code for recovery (回復) |
| `TRAN_DIV` | Field | Processing section — determines whether the request is for cancellation (DSL) or recovery (KAIHK) |
| `RTN_MSG_ID` | Field | Return message ID — error message identifier returned by the Kaihk service if recovery conditions are not met |
| `OP_TRAN_DIV_DSL` | Constant | Service component constant for "cancellation" processing section |
| `OP_TRAN_DIV_KAIHK` | Constant | Service component constant for "recovery" processing section |
| `MSGSTRING[0]` | Constant | "フジセルオプションの解約" — Cancellation confirmation message |
| `MSGSTRING[1]` | Constant | "フジセルオプションの回復" — Recovery confirmation message |
| `EKB4390__I` | Constant | Info-level message code for successful Fujicell option update |
| `FEMTSEL_INFO` | Constant | "フジセル情報" — Femtocell information label for progress-specific item text |
| `FUNC_CD_1` | Constant | Function code 1 — standard processing mode (normal execution) |
| Fujicell (フジセル) | Business term | Femtocell — a small cellular base station providing indoor mobile coverage, offered as an optional add-on service |
| 解約 (Kaiyaku) | Japanese term | Cancellation — terminating the Fujicell option service |
| 回復 (Kaifuku) | Japanese term | Recovery — reactivating a previously cancelled Fujicell option service within the allowable period |
| 確定ボタン (Kakutei botan) | Japanese term | Confirm button — the button that triggers `actionFix()` when the user finalizes their selection |
| 処理区分 (Shori kubun) | Japanese term | Processing section — classifies the type of operation (cancellation vs. recovery) |
| EKK1091D010CBS | CBS Code | Operation service contract cancellation CBS — backend service that processes DSL (cancellation) requests |
| `EKK1091D010CBSMsg1List` | CBS Field | Error reason detail list passed to the cancellation CBS — contains `ido_rsn_cd` and `ido_rsn_memo` |
| `ido_rsn_cd` | Field | Error reason code — the code identifying why the service change was requested |
| `ido_rsn_memo` | Field | Error reason memo — free-text description of the error reason |
| `fmtcel_ido_dtl_cd` | Field | Femtocell option detail code — fixed to "02" to identify the femtocell option change type |
| `svc_kei_no` | Field | Service contract number — unique identifier for the service contract line item |
| `op_svc_kei_no` | Field | Operation service contract number — the contract number subject to the operation (change/cancel/recover) |
| `sysid` | Field | System ID — internal system identifier for the customer record |
| `ido_div` | Field | Error section — classification of the type of error or change |
| `svc_endymd` | Field | Service end date — the date the service ends (used in cancellation) |
| `svc_chrg_endymd` | Field | Service charge end date — the date service charges end (used in cancellation) |
| `prg_tkjk_1` | Field | Progress-specific item 1 — custom progress indicator text |
| `upd_dtm_bf` | Field | Update date-time before — the last update timestamp of the operation service contract before the change |
| v4.01 | Version | Version 4.01 (2012/10/07) — quality management review update; modified the error message branch from dynamic `getMsgRep()` resolution to hardcoded replacement text |
