---

# Business Logic — KKW00191SFLogic.actionInit() [51 LOC]

| Field | Value |
|-------|-------|
| Fully Qualified Name | `eo.web.webview.KKW00191SF.KKW00191SFLogic` |
| Layer | Controller (Web Presentation Logic) |
| Module | `KKW00191SF` (Package: `eo.web.webview.KKW00191SF`) |

## 1. Role

### KKW00191SFLogic.actionInit()

This method is the **entry-point initialization handler** for the **Investigation Cancellation Completion Screen** (Japanese: 照査取消完了 — *Shousa Torikeshi Kanryou*, Screen ID: KKW00191). Its primary business purpose is to prepare the screen state and dispatch the appropriate service flow based on the result of a prior service contract investigation (照査 — *shousa*, i.e., service eligibility review).

The method implements a **conditional dispatch (routing) pattern**: it reads the investigation completion code (`shosaDslFinCd`) from the DataBean and routes processing into one of two branches:
- **Investigation OK (`CD00469_1 = "1"`)**: Proceeds to call the normal investigation cancellation service (`invokeService`), which processes the standard flow for cancelling a service contract that has passed eligibility review.
- **Investigation NG (`CD00469_2 = "2"`)**: Calls the investigation-not-passed cancellation handler (`shosaNgCl`), which processes the special cancellation flow for contracts that failed the eligibility review.

A third, unconditional branch always executes after the conditional dispatch: it invokes `executeAxMRnkSjisho` to populate routing/forwarding address information (Japanese: 案内振替住所設定 — *Annai Futae Juusho Settei*), which determines the customer's forwarded destination address for service communications. If this step fails, the method logs the DataBean state and returns `false`, causing the screen to re-render with error context. Otherwise, it displays a success message ("Service contract investigation cancellation" — サービス契約の照査取消) and returns `true`.

An earlier version of this method (prior to IT1-2013-0000148, dated 2013-02-08) unconditionally called `invokeService` without any investigation result check. The current conditional routing was added to properly distinguish between OK and NG cancellation paths. The method serves as the **screen initialization handler** within the K-Opticom service contract management system, acting as the first point of contact when a user navigates to the Investigation Cancellation Completion screen from a prior screen in the investigation cancellation workflow.

## 2. Processing Pattern (Detailed Business Logic)

```mermaid
flowchart TD
    START(["actionInit"])
    GET_COMMON["Get commoninfoBean from super.getCommonInfoBean()"]
    GET_SERVICE["Get serviceFormBean bean from super.getServiceFormBean()"]
    CREATE_PARAM["Create paramBean array with bean"]
    INIT_FORM["Call initServiceFormBean(bean)"]
    GET_SHOSA["Read shosaDslFinCd from bean<br/>SHOSA_DSL_FIN_CD = shosa_dsl_fin_cd"]
    COND_1{"shosaDslFinCd equals<br/>CD00469_1 = 1?"}
    BRANCH_OK["Call invokeService(paramBean)<br/>Investigation OK path"]
    COND_2{"shosaDslFinCd equals<br/>CD00469_2 = 2?"}
    BRANCH_NG["Call shosaNgCl(paramBean)<br/>Investigation NG cancellation path"]
    EXEC_ROUTING["Call executeAxMRnkSjisho(IDO_DIV_00001, sysidVal, this)"]
    COND_ROUTING{"executeAxMRnkSjisho returns false?"}
    DUMP_BEAN["Dump DataBean via JSYwebLog.println"]
    RETURN_FALSE["Return false"]
    SET_MESSAGE["Call JCCWebCommon.setMessageInfo(EKB4390__I)<br/>Message: Service contract investigation cancellation"]
    DUMP_BEAN2["Dump DataBean via JSYwebLog.println"]
    RETURN_TRUE["Return true"]
    END_NODE(["Next Screen / Next"])

    START --> GET_COMMON
    GET_COMMON --> GET_SERVICE
    GET_SERVICE --> CREATE_PARAM
    CREATE_PARAM --> INIT_FORM
    INIT_FORM --> GET_SHOSA
    GET_SHOSA --> COND_1
    COND_1 -- true --> BRANCH_OK
    BRANCH_OK --> COND_2
    COND_1 -- false --> COND_2
    COND_2 -- true --> BRANCH_NG
    BRANCH_NG --> EXEC_ROUTING
    COND_2 -- false --> EXEC_ROUTING
    EXEC_ROUTING --> COND_ROUTING
    COND_ROUTING -- true --> DUMP_BEAN
    DUMP_BEAN --> RETURN_FALSE
    COND_ROUTING -- false --> SET_MESSAGE
    SET_MESSAGE --> DUMP_BEAN2
    DUMP_BEAN2 --> RETURN_TRUE
    RETURN_TRUE --> END_NODE
```

**Constant Resolution:**

| Constant | Value | Business Meaning |
|----------|-------|-----------------|
| `KKW00191SFConst.SHOSA_DSL_FIN_CD` | `"shosa_dsl_fin_cd"` | Investigation DSL completion code — DataBean key used to retrieve the investigation result code |
| `JKKStrConst.CD00469_1` | `"1"` | Investigation OK — service contract passed eligibility review |
| `JKKStrConst.CD00469_2` | `"2"` | Investigation NG — service contract failed eligibility review |
| `JKKCommonConst.IDO_DIV_VALUE_00001` | `"00001"` | Forwarding destination address display division — indicates address display mode |
| `JPCOnlineMessageConstant.EKB4390__I` | — | Information message code for "Service contract investigation cancellation" |

## 3. Parameter Analysis

| No | Parameter Name | Type | Business Description |
|----|---------------|------|---------------------|
| - | (none) | - | This method takes no method parameters. It operates entirely on instance fields and bean data retrieved from the super class. |

**Instance fields / external state read:**

| Field | Type | Business Description |
|-------|------|---------------------|
| `sysidVal` | `String` | SYSID value (Japanese: システムID — *System ID*), an instance field set prior to this method call, used as input to `executeAxMRnkSjisho` for routing address determination. |

**Data accessed via inherited super-class methods:**

| Source | Method | Business Description |
|--------|--------|---------------------|
| `super.getCommonInfoBean()` | Returns `X31SDataBeanAccess` | Retrieves the common form bean containing shared session/forwarding information (回線場所要領 — *kaisen basho youryou*, line location details). |
| `super.getServiceFormBean()` | Returns `X31SDataBeanAccess` | Retrieves the service form DataBean containing the current service contract screen state, including the investigation completion code (`shosa_dsl_fin_cd`). |

## 4. CRUD Operations / Called Services

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

| CRUD | SC / CBS | SC Code | Entity / DB | Operation Description |
|------|----------|---------|-------------|----------------------|
| - | `JKKCreateNhkDntIktCC.setMessageInfo` | JKKCreateNhkDntIktCC | - | Calls `setMessageInfo` in `JKKCreateNhkDntIktCC` |
| - | `JKKFumeiKktkSvcKeiUpdCC.setMessageInfo` | JKKFumeiKktkSvcKeiUpdCC | - | Calls `setMessageInfo` in `JKKFumeiKktkSvcKeiUpdCC` |
| - | `JKKGetKikiUpdCodeNameCC.setMessageInfo` | JKKGetKikiUpdCodeNameCC | - | Calls `setMessageInfo` in `JKKGetKikiUpdCodeNameCC` |
| - | `JKKGetKojiAkTaknkikiCC.setMessageInfo` | JKKGetKojiAkTaknkikiCC | - | Calls `setMessageInfo` in `JKKGetKojiAkTaknkikiCC` |
| - | `OneStopDataBeanAccess.sendMessageString` | OneStopDataBeanAccess | - | Reads the investigation completion code (`shosa_dsl_fin_cd`) from the DataBean |
| - | `JKKSvkeiUpdScreenUtil.executeAxMRnkSjisho` | JKKSvkeiUpdScreenUtil | - | Populates routing/forwarding address information for service communications |
| - | `KKW00191SFLogic.initServiceFormBean` | KKW00191SFLogic | - | Initializes inherited fields on the service form DataBean (address, customer info, etc.) |
| - | `KKW00191SFLogic.invokeService` | KKW00191SFLogic | - | Invokes the investigation cancellation service — handles normal OK flow |
| - | `KKW00191SFLogic.shosaNgCl` | KKW00191SFLogic | - | Handles the investigation-not-passed cancellation flow |
| - | `JCCWebCommon.setMessageInfo` | JCCWebCommon | - | Displays the screen information message EKB4390 (サービス契約の照査取消) |

**CRUD Classification:**

| CRUD | SC / CBS | SC Code | Entity / DB | Operation Description |
|------|----------|---------|-------------|----------------------|
| R | `OneStopDataBeanAccess.sendMessageString` | - | In-memory DataBean | Reads the investigation DSL completion code (`shosa_dsl_fin_cd`) from the service form DataBean to determine routing path |
| R | `KKW00191SFLogic.initServiceFormBean` | - | In-memory DataBean | Reads and initializes inherited fields (address, customer name, kana, phone) from the service form bean |
| U | `KKW00191SFLogic.invokeService` | - | Service Contract | Invokes the investigation cancellation service for contracts that passed eligibility review — triggers the business flow that cancels the service contract |
| U | `KKW00191SFLogic.shosaNgCl` | - | Service Contract | Invokes the investigation-not-passed cancellation handler — processes cancellation for contracts that failed eligibility review |
| R | `JKKSvkeiUpdScreenUtil.executeAxMRnkSjisho` | - | Routing Address | Reads routing/forwarding address information using SYSID — determines the destination address for service communications |
| - | `JCCWebCommon.setMessageInfo` | - | Message Display | Sets the screen information message (EKB4390) displaying "Service contract investigation cancellation" |

## 5. Dependency Trace

| # | Caller (Screen/Batch) | Call Chain (Full Path to this Method) | Terminal (SC / CRUD / Entity) |
|---|----------------------|--------------------------------------|-------------------------------|
| 1 | Screen:KKW00191 (Investigation Cancellation Completion Screen) | `KKW00191SFController.actionInit` -> `KKW00191SFLogic.actionInit` | `invokeService [U] Service Contract`, `shosaNgCl [U] Service Contract`, `executeAxMRnkSjisho [R] Routing Address` |

**Notes on caller discovery:**
- The screen ID `KKW00191` is defined in `JKKScreenConst.SCREEN_ID_KKW00191` with screen name "照査取消完了" (Investigation Cancellation Completion).
- This is a web presentation-layer controller method (package `eo.web.webview.*`). In the standard K-Opticom screen architecture, a corresponding screen controller (typically `KKWxxxxSFFront` or similar front-controller pattern) invokes this `actionInit()` method when the screen is first loaded.
- The BPM module `KKSV0194OPOperation` in the `koptBp` project references related KKW00191 constants, indicating the investigation cancellation workflow passes through BPM operations before reaching this screen.
- No direct callers in `koptWebB` or `koptWebA` were found that reference `KKW00191SFLogic.actionInit` by fully-qualified name — the method is invoked through the standard screen controller/front-controller pattern.

## 6. Per-Branch Detail Blocks

**Block 1** — [SET] (L83)

> Retrieve the common form bean for shared session data.

| # | Type | Code |
|---|------|------|
| 1 | SET | `commoninfoBean = super.getCommonInfoBean()` // Get common form bean access class [-> JCCWebBusinessLogic.getCommonInfoBean] |

**Block 2** — [SET] (L86)

> Retrieve the service form DataBean and wrap it into a parameter array.

| # | Type | Code |
|---|------|------|
| 1 | SET | `bean = super.getServiceFormBean()` // Get service form DataBean access [-> JCCWebBusinessLogic.getServiceFormBean] |
| 2 | SET | `paramBean = {bean}` // Create DataBean array parameter for service invocation [-> X31SDataBeanAccess[]] |

**Block 3** — [CALL] (L91)

> Initialize inherited fields on the service form bean (address, customer info, kana).

| # | Type | Code |
|---|------|------|
| 1 | CALL | `initServiceFormBean(bean)` // Initialize inherited fields [-> KKW00191SFLogic.initServiceFormBean] |

**Block 4** — [SET, COMMENT] (L93–L96)

> Previously uncommented: unconditional service invocation. Now commented out — replaced by conditional dispatch below. IT1-2013-0000148 (2013-02-08).

| # | Type | Code |
|---|------|------|
| 1 | SET | `// invokeService(paramBean)` [COMMENTED OUT — replaced by conditional dispatch] |

**Block 5** — [IF / ELSE-IF] (L99–L103)

> Read the investigation DSL completion code from the DataBean and dispatch to the appropriate cancellation path. `SHOSA_DSL_FIN_CD = "shosa_dsl_fin_cd"` is the DataBean key for the investigation completion code.

| # | Type | Code |
|---|------|------|
| 1 | SET | `shosaDslFinCd = bean.sendMessageString(KKW00191SFConst.SHOSA_DSL_FIN_CD, X31CWebConst.DATABEAN_GET_VALUE)` // Get investigation DSL completion code [-> SHOSA_DSL_FIN_CD = "shosa_dsl_fin_cd"] |
| 2 | IF | `if (JKKStrConst.CD00469_1.equals(shosaDslFinCd))` [CD00469_1 = "1"] |
| 3 | EXEC | `invokeService(paramBean)` // Investigation OK — call investigation cancellation service [-> KKW00191SFLogic.invokeService] |
| 4 | ELSE-IF | `else if (JKKStrConst.CD00469_2.equals(shosaDslFinCd))` [CD00469_2 = "2"] |
| 5 | EXEC | `shosaNgCl(paramBean)` // Investigation NG — call investigation-not-passed cancellation handler [-> KKW00191SFLogic.shosaNgCl] |

**Block 5.1** — [nested IF branch] Investigation OK (L101–L102)

> The service contract passed the eligibility review. Proceed with standard investigation cancellation service.

| # | Type | Code |
|---|------|------|
| 1 | EXEC | `invokeService(paramBean)` // Investigation OK — normal cancellation flow |

**Block 5.2** — [nested ELSE-IF branch] Investigation NG (L104–L105)

> The service contract failed the eligibility review. Process the special investigation-not-passed cancellation flow.

| # | Type | Code |
|---|------|------|
| 1 | EXEC | `shosaNgCl(paramBean)` // Investigation NG — special cancellation handler |

**Block 6** — [IF] (L109)

> Execute routing/forwarding address setup. If this utility call fails, log the DataBean and return false.

| # | Type | Code |
|---|------|------|
| 1 | IF | `if (!JKKSvkeiUpdScreenUtil.executeAxMRnkSjisho(JKKCommonConst.IDO_DIV_VALUE_00001, sysidVal, this))` [IDO_DIV_VALUE_00001 = "00001"] |
| 2 | EXEC | `JSYwebLog.println(JSYwebLog.DataBean_Dump, getClass(), dumpDatabean(), null, null, null)` // Log DataBean state on failure |
| 3 | RETURN | `return false` // Screen re-render with error context |
| 4 | ELSE | (falls through to success path) |

**Block 7** — [CALL, RETURN] (L114–L119)

> Display success message and return true. The method completes the screen initialization for a successful investigation cancellation screen load.

| # | Type | Code |
|---|------|------|
| 1 | CALL | `JCCWebCommon.setMessageInfo(this, JPCOnlineMessageConstant.EKB4390__I, new String[]{"サービス契約の照査取消"})` // Display screen message: "Service contract investigation cancellation" |
| 2 | EXEC | `JSYwebLog.println(JSYwebLog.DataBean_Dump, getClass(), dumpDatabean(), null, null, null)` // Log DataBean state for audit/debug |
| 3 | RETURN | `return true` // Screen initialization complete, forward to next |

## 7. Glossary

| Term | Type | Business Meaning |
|------|------|------------------|
| `shosa_dsl_fin_cd` | Field | Investigation DSL completion code — the result code from a prior service contract eligibility review (shousa), used to determine the cancellation path |
| `shosa` (照査) | Business term | Investigation / eligibility review — a process that checks whether a service contract is eligible for cancellation or modification |
| `invokeService` | Method | Standard service invocation — triggers the business flow for cancelling a service contract that passed eligibility review |
| `shosaNgCl` | Method | Investigation-not-passed cancellation handler — processes cancellation flow for contracts that failed the eligibility review (ng = not good / failure) |
| `executeAxMRnkSjisho` | Method | Routing/forwarding address setup — populates customer forwarding/destination address information for service communications |
| `sysidVal` (SYSID) | Field | System ID — identifies the system context used for routing address lookup |
| `IDO_DIV_VALUE_00001` | Constant | Dispatch/division value "00001" — indicates forwarding destination address display mode |
| `EKB4390__I` | Constant | Information message code — the screen message displayed on successful initialization |
| `CD00469_1` | Constant | Investigation completion code "1" — investigation OK (passed) |
| `CD00469_2` | Constant | Investigation completion code "2" — investigation NG (failed) |
| `initServiceFormBean` | Method | Initializes inherited fields on the service form DataBean, including address components (kaisen_place_*, keisha_*) and customer information (cust_nm, cust_kana) |
| `paramBean` | Variable | Service form DataBean array wrapper — passed as parameter to service invocation methods |
| JCCWebBusinessLogic | Parent Class | Base business logic class for JCC (Joint Customer Contract) web screens |
| KKW00191SF | Screen Module | Investigation Cancellation screen module — handles the completion screen for service contract investigation cancellation workflow |
| Shousa Torikeshi Kanryou (照査取消完了) | Japanese term | Investigation Cancellation Completion — the screen name for the KKW00191 screen, where users confirm and complete the cancellation of a service contract after the investigation result is known |
| K-Opticom | Business term | K-Opticom — a Japanese telecommunications operator providing fiber-to-the-home (FTTH) and other broadband services |
| Service Contract (サービス契約) | Business term | The core entity in the K-Opticom system representing a customer's subscription to a telecom service |

---
