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

| Field | Value |
|-------|-------|
| Fully Qualified Name | `eo.web.webview.CRW03401SF.CRW03401SFLogic` |
| Layer | Service (Web Business Logic — extends JCCWebBusinessLogic) |
| Module | `CRW03401SF` (Package: `eo.web.webview.CRW03401SF`) |

## 1. Role

### CRW03401SFLogic.execute()

This method serves as the **central execution entry point** for the CRW03401SF (Comprehensive Guide Inquiry Support) web screen. Its primary business purpose is to **display a popup window showing an external system screen** — it acts as a screen dispatcher within the Integrated Customer Service interface, enabling the user to navigate to related service screens from the main Comprehensive Guide Inquiry Support page.

The method follows a **delegation pattern**: it retrieves the service form bean and common info bean, then delegates all core processing to the shared utility class `JCRWebCommon.execute()`. This utility method handles screen-level concerns such as initialization, validation, and processing flow orchestration common across the X31 platform.

After the delegated processing completes, this method configures the **navigation destination metadata** — setting the next screen ID (`CRW03401`) and screen name (`総合案内問合せ対応` — "Comprehensive Guide Inquiry Support") into the common info bean — ensuring subsequent navigation within the popup context knows which screen to target. It then returns `true`, signaling successful execution.

In the larger system, this method implements the Javadoc behavior: **他システム画面の表示を行います。(Display external system screen). 他システム画面をポップアップで表示します。(Display the external system screen in a popup).** It is a screen-level logic handler that bridges the X31 web framework's popup screen management with the specific navigation requirements of the CRW03401 module.

## 2. Processing Pattern (Detailed Business Logic)

```mermaid
flowchart TD
    START(["execute()"])
    START --> GET_BEAN["Get service form bean"]
    GET_BEAN --> GET_COMMON["Get common info bean"]
    GET_COMMON --> CALL_COMMON["Call JCRWebCommon.execute"]
    CALL_COMMON --> SET_NEXT_ID["Set NEXT_SCREEN_ID to common info bean"]
    SET_NEXT_ID --> SET_NEXT_NAME["Set NEXT_SCREEN_NAME to common info bean"]
    SET_NEXT_NAME --> RETURN_TRUE["Return true"]
    RETURN_TRUE --> END(["end"])
```

**Processing sequence:**

1. **Bean retrieval** — Obtain the service form bean (`X31SDataBeanAccess`) and the common info bean via framework methods (`getServiceFormBean()`, `getCommonInfoBean()`).
2. **Delegated processing** — Invoke `JCRWebCommon.execute(bean, commoninfoBean, this)` which handles the shared screen processing pipeline (initialization, validation, business method dispatch, result handling).
3. **Navigation setup** — Write the next screen identifier and display name to the common info bean so subsequent navigation steps can locate the correct target.
4. **Completion** — Return `true` indicating successful screen processing.

**Constant Resolution:**
- `SENYO_TAB_ID` resolves to `SCREEN_ID_CRW03401 = "CRW03401"` (JCRScreenConst) — the screen ID for the popup destination tab.
- `SENYO_TAB_NAME` resolves to `SCREEN_NAME_CRW03401 = "総合案内問合せ対応"` ("Comprehensive Guide Inquiry Support") (JCRScreenConst) — the display name for the navigation target.
- `CommonInfoCFConst.NEXT_SCREEN_ID` — constant key used to store the destination screen ID in the common info bean.
- `CommonInfoCFConst.NEXT_SCREEN_NAME` — constant key used to store the destination screen name in the common info bean.
- `X31CWebConst.DATABEAN_SET_VALUE` — the standard value indicator used when writing to the data bean (set value mode).

## 3. Parameter Analysis

| No | Parameter Name | Type | Business Description |
|----|---------------|------|---------------------|
| - | (none — invoked on instance) | - | This is an instance method with no explicit parameters. It operates on the object's internal state (instance fields) and framework-provided beans. |
| - | (instance field: `SENYO_TAB_ID`) | `String` (static final) | Destination tab/screen ID — set to `"CRW03401"`. Identifies the screen tab to navigate to after processing completes. |
| - | (instance field: `SENYO_TAB_NAME`) | `String` (static final) | Destination tab/screen name — set to `"総合案内問合せ対応"` ("Comprehensive Guide Inquiry Support"). The human-readable label for the navigation target. |

## 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 X31 web common execute method for screen processing pipeline (initialization, validation, dispatch) |
| - | `getServiceFormBean` | X31SDataBeanAccess (framework) | - | Retrieves the service form data bean containing screen input/output data |
| - | `getCommonInfoBean` | X31SDataBeanAccess (framework) | - | Retrieves the common info bean used for cross-screen shared state |
| - | `sendMessageString` (×2) | OneStopDataBeanAccess | - | Writes navigation metadata (NEXT_SCREEN_ID and NEXT_SCREEN_NAME) to the common info bean |

**Note:** The core processing logic is delegated entirely to `JCRWebCommon.execute()`, which is a shared utility in the X31 platform. The actual service component calls, data access, and business logic execution occur within that utility method and are not directly visible in this method's source. This method itself performs no direct database operations — it is purely a screen orchestration layer.

## 5. Dependency Trace

| # | Caller (Screen/Batch) | Call Chain (Full Path to this Method) | Terminal (SC / CRUD / Entity) |
|---|----------------------|--------------------------------------|-------------------------------|
| 1 | Screen:CRW03401 | `CRW03401SFLogic.execute` (direct invocation by screen framework) | `JCRWebCommon.execute [delegated]` |

**Note:** The caller information was pre-extracted from the code graph. This method is invoked directly by the CRW03401SF screen entry point, which is the Comprehensive Guide Inquiry Support screen. The terminal processing is fully delegated to `JCRWebCommon.execute()` — all downstream service component (SC) and database operations are internal to that shared utility method.

## 6. Per-Branch Detail Blocks

**Block 1** — [SET] `(service bean retrieval) (L588)`

> Retrieve the service form data bean from the X31 framework.

| # | Type | Code |
|---|------|------|
| 1 | SET | `bean = getServiceFormBean();` // 他システム画面の内容の取得 (Retrieve contents of the other system screen) |

**Block 2** — [SET] `(common info bean retrieval) (L591)`

> Retrieve the common info bean used for shared screen state.

| # | Type | Code |
|---|------|------|
| 1 | SET | `commoninfoBean = getCommonInfoBean();` // 共有フォームBeanの内容を取得 (Retrieve contents of the shared form bean) |

**Block 3** — [EXEC / DELEGATE] `(service processing) (L612)`

> Delegation point: all core screen processing is handled by the shared `JCRWebCommon.execute()` utility. This method acts as a pass-through — the actual business logic, validation, and service dispatch occur inside this utility class.
>
> **Note:** Previous version (v12.00.00 ANK-2356-00-00) used `JCRWebCommon.getOnetPwd()` for window password registration with `paramBean` array. This was replaced with the unified `JCRWebCommon.execute()` call. The commented-out code remains for reference.

| # | Type | Code |
|---|------|------|
| 1 | CALL | `JCRWebCommon.execute(bean, commoninfoBean, this);` // サービス呼び出し処理 (Service call processing) |

**Block 4** — [SET] `(next screen ID setup) (L626)`

> Set the destination screen ID into the common info bean so the framework knows which screen to display after this processing completes.

| # | Type | Code |
|---|------|------|
| 1 | EXEC | `commoninfoBean.sendMessageString(CommonInfoCFConst.NEXT_SCREEN_ID, X31CWebConst.DATABEAN_SET_VALUE, SENYO_TAB_ID);` // 遷移先画面IDを共有フォームBeanに設定 (Set destination screen ID to shared form bean) |
| - | - | Resolves to: `sendMessageString(NEXT_SCREEN_ID, DATABEAN_SET_VALUE, "CRW03401")` |

**Block 5** — [SET] `(next screen name setup) (L629)`

> Set the destination screen display name into the common info bean.

| # | Type | Code |
|---|------|------|
| 1 | EXEC | `commoninfoBean.sendMessageString(CommonInfoCFConst.NEXT_SCREEN_NAME, X31CWebConst.DATABEAN_SET_VALUE, SENYO_TAB_NAME);` // 遷移先画面名を共有フォームBeanに設定 (Set destination screen name to shared form bean) |
| - | - | Resolves to: `sendMessageString(NEXT_SCREEN_NAME, DATABEAN_SET_VALUE, "総合案内問合せ対応")` |

**Block 6** — [RETURN] `(completion) (L631)`

> Return success flag.

| # | Type | Code |
|---|------|------|
| 1 | RETURN | `return true;` // 正常終了 (Normal completion) |

## 7. Glossary

| Term | Type | Business Meaning |
|------|------|------------------|
| `SENYO_TAB_ID` | Field | Destination tab/screen ID — the unique identifier for the popup screen destination (CRW03401) |
| `SENYO_TAB_NAME` | Field | Destination tab/screen name — the human-readable label displayed for the popup screen destination |
| `CRW03401` | Screen ID | Comprehensive Guide Inquiry Support screen — the main integrated inquiry support interface in the customer service system |
| `JCRWebCommon` | Class | Shared X31 web common utility class — provides cross-screen standard processing including initialization, validation, and execution dispatch |
| `X31SDataBeanAccess` | Class | X31 Service data bean access class — framework class for accessing and manipulating service form screen data |
| `sendMessageString` | Method | Framework method for writing String values to a data bean (set or get value mode) |
| `NEXT_SCREEN_ID` | Constant | Common info bean key — identifies the destination screen ID for navigation |
| `NEXT_SCREEN_NAME` | Constant | Common info bean key — identifies the destination screen display name for navigation |
| `DATABEAN_SET_VALUE` | Constant | Data bean operation mode flag — indicates the write/set operation when calling sendMessageString |
| `JCRScreenConst` | Class | Screen constant definition class — contains all screen ID and screen name constants for the application |
| `CommonInfoCFConst` | Class | Common info constant definition class — contains shared form bean key constants |
| `X31CWebConst` | Class | X31 Web constant definition class — contains web framework constant definitions |
| 他システム画面 | Japanese term | External system screen — a popup window that displays content from a related/external system within the main application context |
| ポップアップ | Japanese term | Popup — a modal or overlay window that appears on top of the current screen |
| 総合案内問合せ対応 | Japanese term | Comprehensive Guide Inquiry Support — the main customer service inquiry handling screen |
| 遷移先画面ID | Japanese term | Destination screen ID — the identifier of the screen to navigate to after processing |
| 遷移先画面名 | Japanese term | Destination screen name — the display name of the screen to navigate to |
| サービス呼び出し処理 | Japanese term | Service call processing — the business logic execution phase of screen processing |
| 共有フォームBean | Japanese term | Shared form bean — a bean used to share data across multiple screens within a session or popup context |