# Business Logic — FUW02501SFLogic.execute() [65 LOC]

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

## 1. Role

### FUW02501SFLogic.execute()

This method performs the **service (subscription) execution processing** (サービス(申込)実行処理) for home page analysis-based service subscription — specifically, it orchestrates the full lifecycle of registering a customer's subscription to subscription-based services (サブスクリプションサービス) in a telecom order fulfillment system. It acts as the **central orchestration entry point** that coordinates 9 sequential business operations: 7 SC (Service Component) calls for order content acceptance, subscription contract registration and details, usage start, progress registration, follow-up tasks, and ISP-specific agreements, followed by 2 CC (Common Component) calls for service IF result data transfer and SOD (Service Order Data) issuance. The method implements a **delegation pattern**, routing work through `FUSV0070_FUSV0070OPDBMapper` which in turn dispatches to downstream CBS (Business Service) calls. It handles `JCCWebServiceException` by delegating exception checking to `checkException`, ensuring robust error handling across the multi-step service invocation chain. The method is called from both the confirmation flow (`cfm()`) and the mask flow (`mskm()`), making it a shared service execution point for the FUW02501 screen.

## 2. Processing Pattern (Detailed Business Logic)

```mermaid
flowchart TD
    START(["execute commoninfoBean funcCd"])
    START --> S1["S1: getCommoninfoBeanInfo - Retrieve current customer contract info"]
    S1 --> S2["S2: Extract SSO info seiky contract svc contract op svc contract from resultMap"]
    S2 --> S3["S3: getServiceFormBean - Get service form bean"]
    S3 --> S4["S4: Build paramMap with USECASE_ID_FUSV0070 = FUSV0070"]
    S4 --> S5["S5: Create FUSV0070_FUSV0070OPDBMapper"]
    S5 --> S6["S6: Prepare paramBean array 5 beans"]
    S6 --> S7["S7: mapper.setFUSV007001SC - Order content acceptance registration EKK0011D020"]
    S7 --> S8["S8: mapper.setFUSV007002SC - Sub-op Subscription ISP registration EKK0411D010"]
    S8 --> S9["S9: mapper.setFUSV007003SC - Sub-op Subscription ISP details agreement EKK0411C040"]
    S9 --> S10["S10: mapper.setFUSV007004SC - Sub-op Subscription ISP usage start EKK0411C050"]
    S10 --> S11["S11: mapper.setFUSV007005SC - Progress registration EKK1091D010"]
    S11 --> S12["S12: mapper.setFUSV007006SC - Application details follow-up task EKK0021C060"]
    S12 --> S13["S13: mapper.setFUSV007007SC - Sub-op Subscription ISP details EKK0411C020"]
    S13 --> S14["S14: mapper.setFUSV007001CC - Service IF result data transfer"]
    S14 --> S15["S15: mapper.setFUSV007002CC - Service SOD issuance"]
    S15 --> S16["S16: JFUWebCommon.setOpSvcKeiStatMyHp - Set op subscription status"]
    S16 --> S17["S17: Create outputMap"]
    S17 --> S18["S18: invokeService paramMap dataMap outputMap"]
    S18 --> E1{JCCWebServiceException caught?}
    E1 -->|Yes| S19["checkException - Handle related service check"]
    E1 -->|No| END_NODE(["Return successfully"])
    S19 --> END_NODE
```

**Processing Description:**

The method follows a **linear sequential pipeline** — each step executes unconditionally in order (no conditional branches at the top level). Processing flows through three phases:

1. **Data Preparation Phase (S1-S6):** Extracts customer contract information from the shared form bean (`commoninfoBean`), resolves SSO (Single Sign-On) context, billing contract info, service contract info, and option service contract info. Builds a use case parameter map pointing to the `FUSV0070` use case and prepares the service form bean and parameter bean array.

2. **SC Execution Phase (S7-S13):** Sequentially invokes 7 Service Component (SC) methods through the `FUSV0070_FUSV0070OPDBMapper`, each representing a distinct business operation in the subscription registration lifecycle: order content acceptance, ISP subscription registration, ISP agreement details, ISP usage start, progress registration, follow-up tasks, and ISP contract details.

3. **CC Execution and Service Invocation Phase (S14-S19):** Transfers service IF results via CC (Common Component), issues the Service Order Document (SOD), sets the option subscription service status to "my homepage" (MyHp), then performs the final service invocation via `invokeService`. Any `JCCWebServiceException` is caught and routed to `checkException` for related check processing.

## 3. Parameter Analysis

| No | Parameter Name | Type | Business Description |
|----|---------------|------|---------------------|
| 1 | `commoninfoBean` | `X31SDataBeanAccess` | Shared form data bean containing all customer and contract context for the service subscription screen. Provides access to current customer contract information, SSO (Single Sign-On) data, billing contract details, service contract records, and option service contract records. This is the primary data source from which 4 sub-beans are extracted for downstream processing. |
| 2 | `funcCd` | `String` | Function code that identifies the calling business scenario or screen operation. Passed through to all 7 SC calls and 2 CC calls, allowing downstream components to branch based on the originating context (e.g., confirmation vs. execution flow). |

**Instance fields / external state read:**
| Source | Description |
|--------|-------------|
| `this` (FUW02501SFLogic) | The enclosing logic instance, passed as `this` to `setFUSV007001CC`, `checkException`, and `JFUWebCommon.setOpSvcKeiStatMyHp` |
| `super.getServiceFormBean()` | Parent class method that retrieves the service form bean from the request/session context |
| `USECASE_ID_FUSV0070` | Constant: `"FUSV0070"` — identifies the home page analysis subscription use case |

## 4. CRUD Operations / Called Services

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

| CRUD | SC / CBS | SC Code | Entity / DB | Operation Description |
|------|----------|---------|-------------|----------------------|
| C | `FUSV0070_FUSV0070OPDBMapper.setFUSV007001SC` | EKK0011D020 | KK_T_ODR_HAKKO_JOKEN (inferred) | Order content acceptance registration — registers the customer's acceptance of the subscription order content |
| C | `FUSV0070_FUSV0070OPDBMapper.setFUSV007002SC` | EKK0411D010 | KK_T_SBOP_SVC_KEI (inferred) | Sub-op Subscription service contract (ISP) registration — creates the ISP subscription service contract record |
| R | `FUSV0070_FUSV0070OPDBMapper.setFUSV007003SC` | EKK0411C040 | KK_T_SBOP_SVC_KEI (inferred) | Sub-op Subscription service contract (ISP) details agreement — retrieves and validates ISP agreement details |
| R | `FUSV0070_FUSV0070OPDBMapper.setFUSV007004SC` | EKK0411C050 | KK_T_SBOP_SVC_KEI (inferred) | Sub-op Subscription service contract (ISP) usage start — fetches usage start eligibility and configuration for the ISP service |
| C | `FUSV0070_FUSV0070OPDBMapper.setFUSV007005SC` | EKK1091D010 | KK_T_SHINPEN (inferred) | Progress registration — registers the service order progress/advancement record |
| R | `FUSV0070_FUSV0070OPDBMapper.setFUSV007006SC` | EKK0021C060 | KK_T_ODR_SHOMEI (inferred) | Application details follow-up task request — retrieves application detail records for follow-up processing |
| R | `FUSV0070_FUSV0070OPDBMapper.setFUSV007007SC` | EKK0411C020 | KK_T_SBOP_SVC_KEI (inferred) | Sub-op Subscription service contract (ISP) details — retrieves ISP contract detail information |
| U | `FUSV0070_FUSV0070OPDBMapper.setFUSV007001CC` | JFUTransferCC | - | Service IF result data transfer CC — transfers service IF result data between system components |
| C | `FUSV0070_FUSV0070OPDBMapper.setFUSV007002CC` | JKKHakkoSODCC | KK_T_SOD (inferred) | Service SOD issuance CC — issues the Service Order Document (SOD) for the subscription order |
| U | `JFUWebCommon.setOpSvcKeiStatMyHp` | JFUWebCommon | - | Sets the option subscription service status to "MyHp" (my homepage) in the data map |
| R | `FUW02501SFLogic.getCommoninfoBeanInfo` | FUW02501SFLogic | - | Retrieves and extracts current customer contract info from the shared form bean |

**How to classify:**
- **C** (Create): SC methods named with registration (登録) — creates new order, contract, and progress records
- **R** (Read): SC methods named with details/agreement (照枠/照会) — retrieves existing contract and agreement data
- **U** (Update): CC methods with `set` naming — updates data structures with transferred or modified results
- The `invokeService` terminal operation dispatches to downstream CBS components for actual database persistence.

## 5. Dependency Trace

| # | Caller (Screen/Batch) | Call Chain (Full Path to this Method) | Terminal (SC / CRUD / Entity) |
|---|----------------------|--------------------------------------|-------------------------------|
| 1 | Screen:KKSV0004 | `FUW02501SFLogic.cfm()` -> `FUW02501SFLogic.execute` | `setFUSV007001SC [C] KK_T_ODR_HAKKO_JOKEN`, `setFUSV007002SC [C] KK_T_SBOP_SVC_KEI`, `setFUSV007005SC [C] KK_T_SHINPEN`, `setFUSV007002CC [C] KK_T_SOD` |
| 2 | Screen:KKSV0004 | `FUW02501SFLogic.mskm()` -> `FUW02501SFLogic.execute` | `setFUSV007003SC [R] KK_T_SBOP_SVC_KEI`, `setFUSV007004SC [R] KK_T_SBOP_SVC_KEI`, `setFUSV007006SC [R] KK_T_ODR_SHOMEI`, `setFUSV007007SC [R] KK_T_SBOP_SVC_KEI` |

**Call Chain Details:**
- `FUW02501SFLogic.cfm()` — Confirmation flow: prepares data and calls `execute` after user confirms the subscription details
- `FUW02501SFLogic.mskm()` — Masking/intermediate flow: handles masked data state and calls `execute` for processing
- Terminal operations from `execute` reach downstream SC/CBS services via `FUSV0070_FUSV0070OPDBMapper`, which internally calls `invokeService` on CBS endpoints, and `invokeService` at the method level dispatches to the JCC web service layer for final processing.

## 6. Per-Branch Detail Blocks

**Block 1** — [SET] (Data Preparation — Extract contract info from shared bean) (L531)

> Retrieves current customer contract information from the shared form bean and extracts 4 sub-contexts (SSO, billing contract, service contract, option service contract).

| # | Type | Code |
|---|------|------|
| 1 | CALL | `resultMap = getCommoninfoBeanInfo(commoninfoBean)` // Retrieve current customer contract info // -> `getCommoninfoBeanInfo [R]` |
| 2 | SET | `ssoInfoBean = (X31SDataBeanAccess) resultMap.get(CommonInfoCFConst.SSO_INFO)` // SSO info — Single Sign-On data [-> SSO_INFO = "SSO情報"] |
| 3 | SET | `seikyKeiInfoBean = (X31SDataBeanAccess) resultMap.get(CommonInfoCFConst.SEIKY_KEI_INFO)` // Billing contract info [-> SEIKY_KEI_INFO = "請求契約情報"] |
| 4 | SET | `svcKeiInfoBean = (X31SDataBeanAccess) resultMap.get(CommonInfoCFConst.SVC_KEI_INFO)` // Service contract info [-> SVC_KEI_INFO = "サービス契約情報"] |
| 5 | SET | `opSvcKeiInfoBean = (X31SDataBeanAccess) resultMap.get(CommonInfoCFConst.OP_SVC_KEI_INFO)` // Option service contract info [-> OP_SVC_KEI_INFO = "オプションサービス契約情報"] |

**Block 2** — [SET] (Service Form Bean Acquisition) (L539)

> Acquires the service form bean data bean access class from the parent class.

| # | Type | Code |
|---|------|------|
| 1 | CALL | `bean = super.getServiceFormBean()` // Get service form bean data bean access class |

**Block 3** — [SET] (Service Call-out Preparation) (L543)

> Home page analysis service subscription (initial display) (ホームページ解析サービス申込（初期表示）) — Prepares the call-out for the service subscription process. Generates a map for user case ID storage.

| # | Type | Code |
|---|------|------|
| 1 | SET | `paramMap = new HashMap<String, String>(16)` // Generate map for user case ID storage |
| 2 | SET | `paramMap.put(X31CWebConst.TELEGRAM_INFO_USECASE_ID, USECASE_ID_FUSV0070)` // [-> USECASE_ID_FUSV0070 = "FUSV0070", home page analysis subscription use case] |
| 3 | SET | `mapper = new FUSV0070_FUSV0070OPDBMapper()` // Create operation mapper |
| 4 | SET | `dataMap = new HashMap<String, Object>()` // Data map for service operations |
| 5 | SET | `paramBean = { bean, ssoInfoBean, seikyKeiInfoBean, opSvcKeiInfoBean, svcKeiInfoBean }` // Array of 5 beans for SC calls |

**Block 4** — [CALL] (Sequential SC Execution — Contract Registration Pipeline) (L558-L564)

> Executes 7 Service Component (SC) methods in sequence through the mapper. Each SC call handles a distinct step in the subscription contract registration lifecycle. All share the same `paramBean`, `dataMap`, and `funcCd` parameters.

| # | Type | Code |
|---|------|------|
| 1 | CALL | `mapper.setFUSV007001SC(paramBean, dataMap, funcCd)` // 1. Order content acceptance registration SC (EKK0011D020) — registers customer acceptance of subscription order content |
| 2 | CALL | `mapper.setFUSV007002SC(paramBean, dataMap, funcCd)` // 2. Sub-op Subscription service contract (ISP) registration SC (EKK0411D010) — creates ISP subscription contract |
| 3 | CALL | `mapper.setFUSV007003SC(paramBean, dataMap, funcCd)` // 3. Sub-op Subscription service contract (ISP) details agreement SC (EKK0411C040) — retrieves agreement details |
| 4 | CALL | `mapper.setFUSV007004SC(paramBean, dataMap, funcCd)` // 4. Sub-op Subscription service contract (ISP) usage start SC (EKK0411C050) — fetches usage start configuration |
| 5 | CALL | `mapper.setFUSV007005SC(paramBean, dataMap, funcCd)` // 5. Progress registration SC (EKK1091D010) — registers service order progress |
| 6 | CALL | `mapper.setFUSV007006SC(paramBean, dataMap, funcCd)` // 6. Application details follow-up task request SC (EKK0021C060) — handles follow-up tasks |
| 7 | CALL | `mapper.setFUSV007007SC(paramBean, dataMap, funcCd)` // 7. Sub-op Subscription service contract (ISP) details SC (EKK0411C020) — retrieves ISP contract details |

**Block 5** — [CALL] (CC Execution — Data Transfer and SOD Issuance) (L567-L568)

> Executes Common Component (CC) operations: transfers service IF results and issues the Service Order Document (SOD).

| # | Type | Code |
|---|------|------|
| 1 | CALL | `mapper.setFUSV007001CC(paramBean, dataMap, funcCd, this)` // Service IF result data transfer CC (JFUTransferCC) — transfers result data between system components |
| 2 | CALL | `mapper.setFUSV007002CC(paramBean, dataMap, funcCd)` // Service SOD issuance CC (JKKHakkoSODCC) — issues Service Order Document |

**Block 6** — [CALL] (Option Service Status Setup) (L570)

> Sets the option subscription service contract status to "MyHp" (my homepage).

| # | Type | Code |
|---|------|------|
| 1 | CALL | `JFUWebCommon.setOpSvcKeiStatMyHp(this, dataMap)` // Set option service contract status to MyHp |

**Block 7** — [TRY-CATCH] (Service Invocation with Exception Handling) (L573-L582)

> Generates an output map for search results, then invokes the downstream service. Catches `JCCWebServiceException` and delegates exception checking to `checkException` for related check processing.

| # | Type | Code |
|---|------|------|
| 1 | SET | `outputMap = new HashMap<Object, Object>()` // Generate map for search result storage |
| 2 | SET | `invokeService(paramMap, dataMap, outputMap)` // Call the service [inside try block] |
| 3 | CATCH | `JCCWebServiceException se` // Catches web service exception |
| 4 | CALL | `checkException(se)` // Perform related check [-> catch block] |

## 7. Glossary

| Term | Type | Business Meaning |
|------|------|------------------|
| `commoninfoBean` | Field | Shared form bean — primary data access object carrying all customer and contract context for the subscription screen |
| `funcCd` | Field | Function code — identifies the calling business scenario (e.g., confirmation flow vs. intermediate masking flow) |
| `SSO_INFO` | Constant | SSO info — Single Sign-On user authentication and session data |
| `SEIKY_KEI_INFO` | Constant | Billing contract info — customer billing contract records and details |
| `SVC_KEI_INFO` | Constant | Service contract info — primary service subscription contract records |
| `OP_SVC_KEI_INFO` | Constant | Option service contract info — additional/optional service contract records associated with the main subscription |
| `USECASE_ID_FUSV0070` | Constant | Use case identifier `"FUSV0070"` — identifies the home page analysis service subscription use case |
| `paramMap` | Field | Use case parameter map — carries the use case ID to the service invocation layer |
| `dataMap` | Field | Service operation data map — accumulates data across all SC/CC calls as the processing pipeline progresses |
| `paramBean` | Field | Parameter bean array — ordered array of 5 DataBeanAccess objects (service form, SSO, billing, option service, service) passed to all SC/CC methods |
| `outputMap` | Field | Output map — result storage map for search/query results from the final service invocation |
| SOD | Acronym | Service Order Document — the official order document generated for subscription service fulfillment |
| SC | Acronym | Service Component — backend service layer component that handles specific business operations (registration, inquiry, etc.) |
| CC | Acronym | Common Component — shared utility component for cross-cutting concerns (data transfer, SOD issuance) |
| CBS | Acronym | Business Service — the lowest-level service component that interfaces with databases and external systems |
| ISP | Acronym | Internet Service Provider — the ISP-specific subscription service tier within the subscription offering |
| Sub-op | Acronym | Subscription (サブスクリプション) — subscription-based recurring service model |
| FUSV0070 | Term | Home page analysis service — a Fujitsu-branded internet/home network analysis subscription service |
| MyHp | Term | My Homepage — customer self-service portal; `setOpSvcKeiStatMyHp` sets the option service status to reflect homepage availability |
| EKK0011D020 | SC Code | Order content acceptance registration SC — registers the customer's acceptance of the subscription order content |
| EKK0411D010 | SC Code | Sub-op Subscription ISP registration SC — creates the ISP subscription service contract record |
| EKK0411C040 | SC Code | Sub-op Subscription ISP details agreement SC — retrieves ISP agreement detail records |
| EKK0411C050 | SC Code | Sub-op Subscription ISP usage start SC — fetches usage start eligibility for the ISP service |
| EKK1091D010 | SC Code | Progress registration SC — registers the service order progress advancement |
| EKK0021C060 | SC Code | Application details follow-up task SC — handles application detail follow-up operations |
| EKK0411C020 | SC Code | Sub-op Subscription ISP details SC — retrieves ISP contract detail information |
| JFUTransferCC | Acronym | JFU Transfer Common Component — handles service IF result data transfer between system components |
| JKKHakkoSODCC | Acronym | JKK SOD Issuance Common Component — handles Service Order Document issuance |
| JCCWebServiceException | Type | Web service exception — thrown by downstream CBS service invocations, triggers exception handling flow |
| KK_T_ODR_HAKKO_JOKEN | Table | Order content acceptance record table (inferred) — stores order acceptance registration records |
| KK_T_SBOP_SVC_KEI | Table | Subscription service contract table (inferred) — stores subscription service contract records |
| KK_T_SHINPEN | Table | Progress/advancement registration table (inferred) — stores service order progress records |
| KK_T_ODR_SHOMEI | Table | Application details table (inferred) — stores application detail records for follow-up |
| KK_T_SOD | Table | SOD (Service Order Document) table (inferred) — stores issued SOD records |
| `cfm()` | Method | Confirmation flow — calls `execute` after user confirms subscription details on the screen |
| `mskm()` | Method | Masking/intermediate flow — calls `execute` when processing masked data state on the screen |
