---

# Business Logic — KKW00804SFLogic.actionAddMyHPInfo() [29 LOC]

| Field | Value |
|-------|-------|
| Fully Qualified Name | `eo.web.webview.KKW00804SF.KKW00804SFLogic` |
| Layer | Service (Web Logic layer within the web MVC stack) |
| Module | `KKW00804SF` (Package: `eo.web.webview.KKW00804SF`) |

## 1. Role

### KKW00804SFLogic.actionAddMyHPInfo()

This method implements the **Registration Confirmation Button processing** (登録確認ボタン処理) for the My Home Page Information Registration feature. It serves as the entry point that orchestrates the full service registration confirmation flow when a customer clicks the confirmation button on the My Home Page information input screen (KKW00804). The method performs a three-phase operation: (1) enriching the service form bean with computed home page capacity and billing start date information via `setHPInfoBean`, (2) executing the comprehensive service registration confirmation service `executeAddCfmSvc` with the FUNC_CD_2 (registration confirmation) function code, which in turn triggers a cascade of 16 Service Component (SC) and Common Component (CC) calls covering service contract, option subscription, progress scheduling, and SOD issuance, and (3) displaying a confirmation message and setting up the next screen (KKW00805) for the confirmation screen display. The method acts as the central coordination point between the customer-facing input screen and the backend service infrastructure, ensuring all service line items (option services, subscription services, email registration, etc.) are registered in a single confirmation step.

## 2. Processing Pattern (Detailed Business Logic)

```mermaid
flowchart TD
    START(["actionAddMyHPInfo()"])

    START --> GET_BEAN["Get ServiceFormBean via super.getServiceFormBean()"]
    GET_BEAN --> WRAP_BEAN["Wrap bean in paramBean array"]
    WRAP_BEAN --> CALL_SET_HP["Call setHPInfoBean(paramBean)"]
    CALL_SET_HP --> HP_ENRICH["setHPInfoBean: Enrich DataBean with:
- HP capacity index/value/name
- Access analysis name (0: None)
- Use start date concatenation
- Service charge start date (+1 month)"]
    HP_ENRICH --> CALL_SVC["Call executeAddCfmSvc(paramBean, FUNC_CD_2)"]
    CALL_SVC --> INIT_MAPS["executeAddCfmSvc: Init paramMap/inputMap/outputMap
Set TELEGRAM_INFO_USECASE_ID = KKSV0006"]
    INIT_MAPS --> MAPPER_INIT["Init KKSV0006_KKSV0006OPDBMapper"]
    MAPPER_INIT --> SET_CALLS["Set (input) mapper calls 12x:
setKKSV000601SC setKKSV000603SC setKKSV000604SC
setKKSV000605SC setKKSV000618SC setKKSV000611SC
setKKSV000612SC setKKSV000619SC setKKSV000606SC
setKKSV000607SC setKKSV000609SC setKKSV000620SC"]
    SET_CALLS --> OTHER_CALLS["Additional set mapper calls:
setKKSV000616SC (func_code FUNC_CD_1)
setKKSV000610SC setKKSV000608SC
setKKSV000602SC setKKSV000613SC
setJKKHakkoSODCC setKKSV0006WORK
setUpdMkmScinsprtWkCC"]
    OTHER_CALLS --> INVOKE_SVC["Call invokeService(paramMap, inputMap, outputMap)"]
    INVOKE_SVC --> GET_CALLS["Get (output) mapper calls:
getKKSV000618SC getKKSV000611SC"]
    GET_CALLS --> FUNC_CD2_CHECK{"FUNC_CD_2 == func_code?"}
    FUNC_CD2_CHECK -->|true| CHECK_IDO_DIV{"Check IDO_DIV (ido_div)"}
    FUNC_CD2_CHECK -->|false| SET_MSG["setMessageInfo: Myホームページ情報の登錹"]
    CHECK_IDO_DIV --> SINKI_OR_TSUIKA{"IDO_DIV == IDO_DIV_SINKI or IDO_DIV_TSUIKA?"}
    SINKI_OR_TSUIKA -->|true| PATCH_IDO_DTM["Patch ido_dtm from outputMap to paramBean"]
    SINKI_OR_TSUIKA -->|false| SET_MSG
    PATCH_IDO_DTM --> SET_MSG
    SET_MSG --> SET_NEXT_SCREEN["Set NEXT_SCREEN_ID = KKW00805
Set NEXT_SCREEN_NAME = Myホームページ情報登錹確認"]
    SET_NEXT_SCREEN --> LOG_DATABEAN["JSYwebLog.println(DataBean_Dump)"]
    LOG_DATABEAN --> RETURN_TRUE["Return true"]
    RETURN_TRUE --> END(["END"])
```

**Processing flow summary:**

1. **Bean acquisition** (L171-173): The service form bean is retrieved from the parent class and wrapped in an array for pass-by-reference manipulation.
2. **Home page info enrichment** (L176): `setHPInfoBean` processes and populates additional computed fields in the DataBean (capacity info, date calculations).
3. **Service execution** (L179): `executeAddCfmSvc` is invoked with `FUNC_CD_2` (registration confirmation mode), which orchestrates 16+ SC/CC calls through the `KKSV0006_KKSV0006OPDBMapper`.
4. **Message setup** (L182-183): A confirmation message ("My Home page information registration") is set via `JCCWebCommon.setMessageInfo`.
5. **Navigation setup** (L185-188): The common info bean is updated to direct the next screen to `KKW00805` (My Home Page Information Registration Confirmation).
6. **Logging and return** (L191-194): DataBean state is dumped for diagnostic purposes, and the method returns `true` indicating successful processing.

## 3. Parameter Analysis

| No | Parameter Name | Type | Business Description |
|----|---------------|------|---------------------|
| - | (none) | - | This method takes no explicit parameters. It operates entirely on instance state and the framework-managed DataBean. |

**Instance fields / external state read by this method:**

| Source | Business Description |
|--------|---------------------|
| `super.getServiceFormBean()` | The service form DataBean containing customer input from screen KKW00804 — includes home page capacity info, access analysis info, use start date, and all service registration data |
| `JPCModelConstant.FUNC_CD_2` | Function code constant for registration confirmation mode (as opposed to FUNC_CD_1 for new contract), determines which SCs run in confirmation vs. registration mode |
| `JPCOnlineMessageConstant.EKB0370__I` | Message key for the confirmation display message |
| `JKKScreenConst.SCREEN_ID_KKW00805` / `SCREEN_NAME_KKW00805` | Next screen routing constants pointing to the My Home Page Information Registration Confirmation screen |

## 4. CRUD Operations / Called Services

| CRUD | SC / CBS | SC Code | Entity / DB | Operation Description |
|------|----------|---------|-------------|----------------------|
| - | `KKW00804SFLogic.setHPInfoBean` | KKW00804SFLogic | - | Enriches the DataBean with computed home page capacity info, access analysis name, and service charge start date |
| - | `KKW00804SFLogic.executeAddCfmSvc` | KKW00804SFLogic | - | Orchestrates the full service registration confirmation service by preparing mapper input maps and invoking the shared service |
| C | `mapper.setKKSV000601SC` | KKSV000601SC | KK_T_ODR_HAKKO_JOKEN (SOD issuance) | Order content approval registration — registers the service order request record |
| C | `mapper.setKKSV000603SC` | KKSV000603SC | KK_T_OPSVKEI_ISP | Option service (ISP) information change — updates option service details |
| C | `mapper.setKKSV000604SC` | KKSV000604SC | KK_T_OPSVKEI_ISP | Option service (ISP) registration — registers the ISP option service contract |
| C | `mapper.setKKSV000605SC` | KKSV000605SC | - | Subscription option service (ISP) registration — registers subscription-level option service |
| C | `mapper.setKKSV000618SC` | KKSV00060618SC | - | Option service (ISP) search — retrieves option service details for confirmation |
| C | `mapper.setKKSV000611SC` | KKSV000611SC | - | Option service (ISP) search contract — searches option service contract info |
| C | `mapper.setKKSV000612SC` | KKSV000612SC | - | Option service (ISP) start — sets the service start for option services |
| C | `mapper.setKKSV000619SC` | KKSV000619SC | - | Subscription option service (ISP) search — searches subscription option service |
| C | `mapper.setKKSV000606SC` | KKSV000606SC | - | Subscription option service (ISP) search contract |
| C | `mapper.setKKSV000607SC` | KKSV000607SC | - | Subscription option service (ISP) use start |
| C | `mapper.setKKSV000609SC` | KKSV000609SC | - | Email registration SC — registers email service information |
| C | `mapper.setKKSV000620SC` | KKSV000620SC | - | Email registration SC (second call) |
| C | `mapper.setKKSV000616SC` | KKSV000616SC | - | Progress schedule SC — registers progress scheduling information (called with FUNC_CD_1) |
| C | `mapper.setKKSV000610SC` | KKSV000610SC | - | Progress information registration — registers progress record |
| C | `mapper.setKKSV000608SC` | KKSV000608SC | - | Order details agreement confirmation (called with FUNC_CD_2, cancellation search) |
| C | `mapper.setKKSV000602SC` | KKSV000602SC | - | Order details search / follow-up task request |
| C | `mapper.setKKSV000613SC` | KKSV000613SC | - | Billing advance schedule confirmation (contract number / service contract number, called with FUNC_CD_1) |
| C | `mapper.setJKKHakkoSODCC` | JKKHakkoSODCC | KK_T_SOD | SOD issuance Common Component — issues the Service Order Data |
| C | `mapper.setKKSV0006WORK` | KKSV0006WORK | - | My Home page information registration confirmation work item |
| C | `mapper.setUpdMkmScinsprtWkCC` | UpdMkmScinsprtWkCC | - | Input screen entry support work info update CC |
| - | `JCCWebCommon.setMessageInfo` | JCCWebCommon | - | Sets the confirmation message for screen display |
| - | `X31SDataBeanAccess.sendMessageString` | OneStopDataBeanAccess | - | Sets next screen routing data in the common info bean |

## 5. Dependency Trace

| # | Caller (Screen/Batch) | Call Chain (Full Path to this Method) | Terminal (SC / CRUD / Entity) |
|---|----------------------|--------------------------------------|-------------------------------|
| 1 | Screen:KKSV0004 | `KKSV0004Logic.actionConfirm` (or similar confirmation handler) -> `KKW00804SFLogic.actionAddMyHPInfo` | `setKKSV000601SC [C] KK_T_ODR_HAKKO_JOKEN`, `setJKKHakkoSODCC [C] KK_T_SOD`, `setKKSV000603SC [C] KK_T_OPSVKEI_ISP`, `setKKSV000610SC [C] progress`, `setKKSV000616SC [C] progress_schedule` |

## 6. Per-Branch Detail Blocks

**Block 1** — [SET] Bean acquisition and wrapping (L171-L173)

> Retrieves the service form DataBean from the framework's parent class and wraps it into an array for pass-by-reference manipulation by called methods.

| # | Type | Code |
|---|------|------|
| 1 | SET | `X31SDataBeanAccess bean = super.getServiceFormBean()` // Retrieve the service form DataBean |
| 2 | SET | `X31SDataBeanAccess[] paramBean = {bean}` // Wrap bean in array for pass-by-reference |

**Block 2** — [CALL] Home page info bean enrichment (L176)

> Delegates to `setHPInfoBean` which processes and computes additional fields in the DataBean, including home page capacity info, access analysis name, use start date, and service charge start date.

| # | Type | Code |
|---|------|------|
| 1 | CALL | `setHPInfoBean(paramBean)` // Home page info DataBean enrichment |

**Block 3** — [CALL] Service registration confirmation execution (L179)

> Invokes the full service registration confirmation flow with function code FUNC_CD_2 (registration confirmation mode). This single call orchestrates 16+ Service Component (SC) and Common Component (CC) calls through the mapper, covering order content approval, option service registration, subscription service handling, email registration, progress scheduling, SOD issuance, and follow-up tasks.

| # | Type | Code |
|---|------|------|
| 1 | CALL | `executeAddCfmSvc(paramBean, JPCModelConstant.FUNC_CD_2)` // Registration confirmation service invocation [-> FUNC_CD_2 = "registration confirmation mode"] |

**Block 4** — [SET] Confirmation message setup (L182-L183)

> Sets the confirmation message to be displayed on the confirmation screen. The message "My Home page information registration" (Myホームページ情報の登錹) is prepared in a string array and passed to the framework's message setting utility.

| # | Type | Code |
|---|------|------|
| 1 | SET | `String[] str = {"Myホームページ情報の登錹"}` // Confirmation message string [-> "My Home page information registration"] |
| 2 | CALL | `JCCWebCommon.setMessageInfo(this, JPCOnlineMessageConstant.EKB0370__I, str)` // Set display message [-> EKB0370__I = message key] |

**Block 5** — [SET] Next screen routing setup (L185-L188)

> Configures the common info DataBean to route the user to the confirmation screen (KKW00805) after this method completes. Both the screen ID and screen name are set.

| # | Type | Code |
|---|------|------|
| 1 | SET | `X31SDataBeanAccess commoninfoBean = super.getCommonInfoBean()` // Retrieve common info bean |
| 2 | EXEC | `commoninfoBean.sendMessageString(CommonInfoCFConst.NEXT_SCREEN_ID, X31CWebConst.DATABEAN_SET_VALUE, JKKScreenConst.SCREEN_ID_KKW00805)` // Set next screen ID [-> SCREEN_ID_KKW00805 = "KKW00805"] |
| 3 | EXEC | `commoninfoBean.sendMessageString(CommonInfoCFConst.NEXT_SCREEN_NAME, X31CWebConst.DATABEAN_SET_VALUE, JKKScreenConst.SCREEN_NAME_KKW00805)` // Set next screen name [-> SCREEN_NAME_KKW00805 = "Myホームページ情報登錹確認"] |

**Block 6** — [EXEC/RETURN] Diagnostic logging and return (L191-L194)

> Dumps the current DataBean state for diagnostic logging, then returns `true` to indicate successful processing completion.

| # | Type | Code |
|---|------|------|
| 1 | EXEC | `JSYwebLog.println(JSYwebLog.DataBean_Dump, getClass(), dumpDatabean(), null, null, null)` // DataBean diagnostic dump |
| 2 | RETURN | `return true` // Processing completed successfully |

## 7. Glossary

| Term | Type | Business Meaning |
|------|------|------------------|
| `actionAddMyHPInfo` | Method | My Home Page Information Registration — the button processing method triggered when a customer confirms their My Home Page data entry |
| My Home Page (Myホームページ) | Business term | A customer-facing portal where users can view and configure their service information, including contact methods and billing preferences |
| KKW00804 | Screen ID | My Home Page Information Input screen — the customer data entry screen for registering/updating My Home Page information |
| KKW00805 | Screen ID | My Home Page Information Registration Confirmation screen — the confirmation review screen displayed after clicking the confirm button |
| FUNC_CD_1 | Constant | Function code for "new contract" mode — triggers registration-style SC processing |
| FUNC_CD_2 | Constant | Function code for "registration confirmation" mode — triggers confirmation/search-style SC processing |
| DataBean (DataBeanAccess) | Technical | Framework-managed object holding all screen input/output data; methods access it via `sendMessageString` for get/set operations and `getDataBeanArray` for list-type fields |
| `setHPInfoBean` | Method | Home Page info bean enrichment — populates computed fields like capacity value, capacity name, access analysis name, and derived dates |
| `executeAddCfmSvc` | Method | Execute Add Confirmation Service — orchestrates the full service registration confirmation flow including 16+ SC/CC calls |
| SC (Service Component) | Technical | Service Component — a granular business service unit (e.g., KKSV000601SC for order content approval) that handles one specific CRUD operation |
| CC (Common Component) | Technical | Common Component — a reusable shared component (e.g., JKKHakkoSODCC for SOD issuance) used across multiple screens |
| SOD | Acronym | Service Order Data — the core telecom order entity that triggers downstream service provisioning |
| `KKSV000601SC` | SC Code | Order content approval registration — registers the order/content request for service SOD issuance |
| `KKSV000603SC` | SC Code | Option service (ISP) information change |
| `KKSV000604SC` | SC Code | Option service (ISP) registration |
| `KKSV000605SC` | SC Code | Subscription option service (ISP) registration |
| `KKSV000610SC` | SC Code | Progress information registration |
| `KKSV000616SC` | SC Code | Progress schedule SC |
| `KKSV000602SC` | SC Code | Order details search / follow-up task request |
| `JKKHakkoSODCC` | CC Code | SOD issuance Common Component — creates and issues the SOD record |
| `setKKSV0006WORK` | Method | My Home page information registration confirmation work item setup |
| `setUpdMkmScinsprtWkCC` | Method | Input screen entry support work info update CC |
| HP_CAPA_INFO | Constant | Home page capacity info DataBean array key — holds capacity selection data |
| HP_CAPA_VALUE | Constant | DataBean field for home page capacity value |
| CAPA | Constant | DataBean field alias for capacity |
| HP_CAPA_NM | Constant | DataBean field for home page capacity name |
| ACCSS_BNSK_NM | Constant | DataBean field for access analysis name (fixed to "0: None") |
| USE_STAYMD | Constant | Use start date (YYYYMMDD concatenated string) |
| SVC_CHRG_STAYMD | Constant | Service charge start date — use start date + 1 month (YYYYMMDD) |
| TELEGRAM_INFO_USECASE_ID | Constant | DataBean key for use case identification (set to "KKSV0006") |
| KKW00804SFConst | Class | Constants class specific to the KKW00804 Screen Logic module |
| JCCWebCommon.setMessageInfo | Method | Framework utility to set the screen display message |
| `JPCOnlineMessageConstant.EKB0370__I` | Constant | Message template key for the My Home page registration confirmation message |
| CommonInfoCFConst.NEXT_SCREEN_ID | Constant | Common info field key for next screen ID routing |
| CommonInfoCFConst.NEXT_SCREEN_NAME | Constant | Common info field key for next screen name routing |
| X31CWebConst.DATABEAN_SET_VALUE | Constant | Framework constant indicating a DataBean set operation |
| X31CWebConst.DATABEAN_GET_VALUE | Constant | Framework constant indicating a DataBean get operation |

---

## FINAL STEP (MANDATORY)
The document has been written to `.codewiki/dd/KKW00804SFLogic/actionAddMyHPInfo.md`.
