# Business Logic — CRW03409SFLogic.execute() [54 LOC]

| Field | Value |
|-------|-------|
| Fully Qualified Name | `eo.web.webview.CRW03409SF.CRW03409SFLogic` |
| Layer | Controller (Webview / Screen Logic — extends `JCCWebBusinessLogic`) |
| Module | `CRW03409SF` (Package: `eo.web.webview.CRW03409SF`) |

## 1. Role

### CRW03409SFLogic.execute()

This method serves as the core execution entry point for the **Charges/Contract Prevention Inquiry** screen (`CRW03409SF`). According to the Javadoc, the method is responsible for **displaying an external system screen in a popup window** (他システム画面画面をポップアップで表示します) — meaning it acts as an intermediary that orchestrates data retrieval and screen navigation state, then delegates the substantive processing to a shared web-common handler.

The method follows a **delegation pattern**: it first obtains the service form bean (`X31SDataBeanAccess`) and the shared common-info bean from the framework, then passes both beans plus `this` (the logic instance itself) to `JCRWebCommon.execute()`, which is a centralized web-business dispatcher. This shared dispatcher encapsulates screen-specific business logic routing across multiple screen modules.

After the delegated processing completes, the method configures **next-screen navigation metadata** on the common-info bean — setting the next screen ID and screen name to `"CRW03409"` (via `JCRScreenConst.SCREEN_ID_CRW03409` and `SCREEN_NAME_CRW03409`). Finally, it returns `true` to signal successful completion.

In the larger system, this method is a screen-level logic handler called from the web framework's message routing mechanism (`receiveMessageWeb`). It plays the role of a **presentation-layer orchestrator** rather than a pure business service — it does not directly manipulate data, query databases, or perform CRUD operations itself. Instead, it coordinates the presentation state for the Charges/Contract Prevention Inquiry screen and bridges to downstream processing via the shared `JCRWebCommon` layer.

## 2. Processing Pattern (Detailed Business Logic)

```mermaid
flowchart TD
    START(["execute()"])
    START --> BEAN["getServiceFormBean()"]
    BEAN --> COMMON["getCommonInfoBean()"]
    COMMON --> CORE["JCRWebCommon.execute(bean, commoninfoBean, this)"]
    CORE --> MSG1["commoninfoBean.sendMessageString(NEXT_SCREEN_ID, DATABEAN_SET_VALUE, SENYO_TAB_ID)"]
    MSG1 --> MSG2["commoninfoBean.sendMessageString(NEXT_SCREEN_NAME, DATABEAN_SET_VALUE, SENYO_TAB_NAME)"]
    MSG2 --> RETURN(["return true"])
    RETURN --> END(["Next / Return"])
```

| Step | Description |
|------|-------------|
| 1 | Obtain the service form bean containing screen-specific input data. |
| 2 | Obtain the shared common-info bean used for cross-screen data passing. |
| 3 | Delegate core processing to the shared web-common dispatcher `JCRWebCommon.execute()`. |
| 4 | Set the next screen ID (`"CRW03409"`) on the common-info bean for navigation. |
| 5 | Set the next screen name (`"CRW03409"`) on the common-info bean for navigation. |
| 6 | Return `true` indicating successful processing. |

## 3. Parameter Analysis

| No | Parameter Name | Type | Business Description |
|----|---------------|------|---------------------|
| - | (none) | - | This method takes no parameters. It operates entirely on framework-provided state accessed via inherited getter methods and instance fields. |

**Instance fields / external state read:**

| Source | Type | Business Description |
|--------|------|---------------------|
| `getServiceFormBean()` | `X31SDataBeanAccess` | Service form bean — container for screen-specific input data and user selections on the Charges/Contract Prevention Inquiry screen. |
| `getCommonInfoBean()` | `X31SDataBeanAccess` | Shared common-info bean — framework-managed container for cross-screen data (e.g., navigation targets, user session context). |
| `SENYO_TAB_ID` | `String` ("CRW03409") | Next screen tab ID — the screen identifier used for navigation routing back to or within the CRW03409 screen. |
| `SENYO_TAB_NAME` | `String` ("CRW03409") | Next screen tab name — the display name for the next screen navigation target. |
| `JCRWebCommon.execute(bean, commoninfoBean, this)` | Method call | Shared web-common handler that performs the actual screen-specific business processing. |
| `sendMessageString(key, value, data)` | Method call | Common-info bean method for setting navigation metadata keys. |

## 4. CRUD Operations / Called Services

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

| CRUD | SC / CBS | SC Code | Entity / DB | Operation Description |
|------|----------|---------|-------------|----------------------|
| - | `JCRWebCommon.execute` | JCRWebCommon | - | Delegates to shared web-common dispatcher for screen-specific processing. Actual CRUD operations (if any) occur inside `JCRWebCommon.execute()` and are not visible at this level. |
| - | `X31SDataBeanAccess.sendMessageString` | OneStopDataBeanAccess | - | Sets string messages on the common-info bean (e.g., next screen ID, next screen name). |

**Note:** This method does **not** directly perform any database CRUD operations. It delegates all substantive business logic to `JCRWebCommon.execute()`, which is a shared dispatcher in the `JCRWebCommon` class. Any Create/Read/Update/Delete operations executed during processing of this screen would occur within that shared handler's internal logic.

## 5. Dependency Trace

| # | Caller (Screen/Batch) | Call Chain (Full Path to this Method) | Terminal (SC / CRUD / Entity) |
|---|----------------------|--------------------------------------|-------------------------------|
| 1 | Screen: KKSV0004 | `KKSV0004Flow` (BPM) → `KKSV0004OPOperation` → (via webview mapping) → `CRW03409SFLogic.execute` | `JCRWebCommon.execute [delegated]` |

**Call Chain Detail:**
- KKSV0004 is a BPM (Business Process Management) screen module that coordinates cross-screen operations.
- The call path flows from the BPM flow (`KKSV0004Flow`) through the operation handler (`KKSV0004OPOperation`), which invokes webview mapping that ultimately reaches `CRW03409SFLogic.execute()`.

## 6. Per-Branch Detail Blocks

### Block 1 — SET `(service bean retrieval)` (L588)

> Retrieves the service form bean from the framework. This bean holds screen-specific input data and user selections.

| # | Type | Code |
|---|------|------|
| 1 | SET | `bean = getServiceFormBean()` // Service form bean retrieval — サービスフォームBeanの内容の取得 (Retrieve service form bean content) |

### Block 2 — SET `(common-info bean retrieval)` (L591)

> Retrieves the shared common-info bean used for cross-screen data passing.

| # | Type | Code |
|---|------|------|
| 1 | SET | `commoninfoBean = getCommonInfoBean()` // Common form bean retrieval — 共有フォームBeanの内容を取得 (Retrieve shared form bean content) |

### Block 3 — CALLOUT `(core processing delegation)` (L610)

> Delegates to the shared web-common dispatcher. Previously (v11), this used a `onetPwd` (one-time password) registration flow via `JCRWebCommon.getOnetPwd()`, but was replaced in v12 (ANK-2356-00-00) with the generic `JCRWebCommon.execute()` dispatcher. The old path (commented out) passed a 2-element param bean array; the new path passes individual beans.

| # | Type | Code |
|---|------|------|
| 1 | CALL | `JCRWebCommon.execute(bean, commoninfoBean, this)` // Core service call — メイン処理 (Main processing). MOD v12.00.00 ANK-2356-00-00: replaced `getOnetPwd` with generic `execute` |

### Block 4 — EXEC `(next screen ID navigation)` (L627)

> Sets the next screen ID on the common-info bean. The value `"CRW03409"` is sourced from `JCRScreenConst.SCREEN_ID_CRW03409`, which maps to the same screen module.

| # | Type | Code |
|---|------|------|
| 1 | SET | `commoninfoBean.sendMessageString(NEXT_SCREEN_ID, DATABEAN_SET_VALUE, SENYO_TAB_ID)` // Sets next screen ID — 遷移先画面IDを共有フォームBeanに設定 (Set destination screen ID on shared form bean) [-> SENYO_TAB_ID = "CRW03409"] |

### Block 5 — EXEC `(next screen name navigation)` (L630)

> Sets the next screen name on the common-info bean. The value `"CRW03409"` is sourced from `JCRScreenConst.SCREEN_NAME_CRW03409`.

| # | Type | Code |
|---|------|------|
| 1 | SET | `commoninfoBean.sendMessageString(NEXT_SCREEN_NAME, DATABEAN_SET_VALUE, SENYO_TAB_NAME)` // Sets next screen name — 遷移先画面名を共有フォームBeanに設定 (Set destination screen name on shared form bean) [-> SENYO_TAB_NAME = "CRW03409"] |

### Block 6 — RETURN `(success return)` (L633)

> Returns `true` to indicate successful processing completion.

| # | Type | Code |
|---|------|------|
| 1 | RETURN | `return true` // Processing complete — 処理結果 (Processing result): true = normal termination |

## 7. Glossary

| Term | Type | Business Meaning |
|------|------|------------------|
| `CRW03409SF` | Screen Module | Charges/Contract Prevention Inquiry screen — a webview screen module for inquiring about charges that may prevent contract cancellation. |
| `SENYO_TAB_ID` | Constant | Destination screen tab ID — the next screen identifier set for navigation (`"CRW03409"`). Derived from `JCRScreenConst.SCREEN_ID_CRW03409`. |
| `SENYO_TAB_NAME` | Constant | Destination screen tab name — the next screen name set for navigation (`"CRW03409"`). Derived from `JCRScreenConst.SCREEN_NAME_CRW03409`. |
| `JCRScreenConst.SCREEN_ID_CRW03409` | Constant | Screen ID constant with value `"CRW03409"`. |
| `JCRScreenConst.SCREEN_NAME_CRW03409` | Constant | Screen name constant with value `"CRW03409"`. |
| `JCRWebCommon.execute()` | Shared Method | Centralized web-business dispatcher that handles core screen logic delegation across multiple screen modules. |
| `X31SDataBeanAccess` | Framework Class | Service data bean access — a framework-managed data container for screen-specific input/output data. |
| `CommonInfoCFConst.NEXT_SCREEN_ID` | Constant Key | Key used in the common-info bean to store the next screen identifier for navigation routing. |
| `CommonInfoCFConst.NEXT_SCREEN_NAME` | Constant Key | Key used in the common-info bean to store the next screen display name for navigation routing. |
| `X31CWebConst.DATABEAN_SET_VALUE` | Constant | Marker value indicating that the third argument to `sendMessageString` should be stored directly in the data bean. |
| KKSV0004 | BPM Screen | A Business Process Management screen module that coordinates multi-screen operations including this inquiry screen. |
| ANK-2356-00-00 | Change Ticket | Change ticket number (v12.00.00) that replaced the one-time password (`getOnetPwd`) flow with the generic `execute` dispatcher. |
| OneStop | Architecture | OneStopDataBeanAccess — a unified data access abstraction in the framework for handling bean data across web layers. |
| `receiveMessageWeb` | Framework Method | Overridden framework callback method that routes incoming web events to the screen logic. |
