# Business Logic — FUW02401SFLogic.cfmMskmSyori() [174 LOC]

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

## 1. Role

### FUW02401SFLogic.cfmMskmSyori()

This method is the core processing hub for the **application and confirmation button operations** (as stated in the Javadoc: "申込ボタン、確認ボタン処理を行います") on the KU100107-0201 page — the Optional Service Change / Add screen in the K-Opticom self-service web portal. It receives an `isTarget` flag to distinguish between **confirmation mode** ("cfm" / CHEK_CFM, where the user is reviewing their selections before submitting) and **registration mode** ("mskm", where the user is finalizing their order). It extracts the current customer's shared form data — including SSO identity, current customer contract details, service contract info, and optional service sub-contract info — and iterates through the optional service items to locate the matching one for the logged-in user. It then builds a service invocation parameter map, dispatches the order through a sequence of **seven service-component (SC) mappers and three cross-cutting (CC) mappers** via the `FUSV0025_FUSV0025OPDBMapper` to handle application content approval, optional service contract ISP changes, enrollment, progress tracking, agreement, data transfer, and order issuance conditions. After service invocation, it validates that the customer has not exceeded their maximum optional service count. The method implements a **dispatcher/delegation pattern**, routing business logic through the mapper and service layer while enforcing identity, contract-state, and quota constraints.

## 2. Processing Pattern (Detailed Business Logic)

```mermaid
flowchart TD
    START(["cfmMskmSyori isTarget, commoninfoBean"])

    START --> N1["Extract common form beans WEB_CHG_INFO, SSO_INFO"]
    N1 --> N2["Get SSO WebID WEB_ID_21"]
    N2 --> C1{Is SSO WebID null?}
    C1 -->|Yes| E1["Throw JCCBusinessException ERROR_CODE_0002 System Error"]
    C1 -->|No| N3["Extract current customer info, service contract info, service detail work info"]
    N3 --> N4["Initialize opSvcKeiInfoBean, webid, urlAccountCnt"]
    N4 --> N5["Get optional service contract array OP_SVC_KEI_INFO"]
    N5 --> N6["Loop for each opSvcKeiInfo item"]
    N6 --> N7["Get opSvcKeiWebid, urlAccount, opSvcCd, opSvcStat from iteration"]

    N7 --> C2{opSvcCd equals B002 FTTH Optional?}
    C2 -->|No| N8["Skip continue"]
    C2 -->|Yes| C3{opSvcStat equals 910 Terminated or 920 Cancelled?}
    N8 --> N9["Next iteration"]
    C3 -->|Yes| N9
    C3 -->|No| C4{ssoInfoWebid equals opSvcKeiInfoWebid?}
    C4 -->|Yes| N10["Set opSvcKeiInfoBean and webid from current bean"]
    C4 -->|No| N11["Skip bean assignment"]
    N10 --> N12{Is urlAccount not null?}
    N11 --> N9
    N12 -->|Yes| N13["Increment urlAccountCnt"]
    N12 -->|No| N9
    N13 --> N9

    N9 --> N14["End loop"]
    N14 --> N15["Get service form bean from super.getServiceFormBean"]
    N15 --> N16["Set paramMap with USECASE_ID_FUSV0025"]
    N16 --> N17["Create FUSV0025_FUSV0025OPDBMapper"]
    N17 --> N18["Create paramMap and dataMap HashMaps"]
    N18 --> N19["Create paramBean array with bean, opSvcKeiInfoBean, ssoInfoBean"]
    N19 --> N20["Determine functionCode from isTarget"]
    N20 --> C5{isTarget equals cfm?}
    C5 -->|Yes| N21["functionCode equals FUNC_CD_2 2 Check Confirmation"]
    C5 -->|No| N22["functionCode equals FUNC_CD_1 1 Registration Apply"]
    N21 --> N23["mapper.setFUSV002501SC Application content approval registration"]
    N22 --> N23
    N23 --> N24["mapper.setFUSV002502SC Optional service contract ISP change"]
    N24 --> N25["mapper.setFUSV002503SC Enrollment registration"]
    N25 --> N26["mapper.setFUSV002504SC Progress registration"]
    N26 --> N27["mapper.setFUSV002505SC Application details check and follow-up request"]
    N27 --> N28["mapper.setFUSV002506SC Optional service contract ISP end SC"]
    N28 --> N29["mapper.setFUSV002507SC Optional service contract ISP start SC"]
    N29 --> N30["mapper.setFUSV002501CC Optional service contract ISP agreement CC"]
    N30 --> N31["mapper.setFUSV002502CC Service IF result data transfer CC"]
    N31 --> N32["mapper.setFUSV002503CC Order issuance condition registration CC"]
    N32 --> N33["JFUWebCommon.setSvcKeiStat Set service contract status"]
    N33 --> N34["JFUWebCommon.setOpSvcKeiStatMyHpRsv1 Set optional service contract status"]
    N34 --> N35["Create outputMap HashMap"]

    N35 --> TRY["TRY: Service invocation block"]
    TRY --> N36["invokeService paramMap, dataMap, outputMap"]
    N36 --> N37["Get maxOpSvcCnt and hpUrlDomain from bean"]
    N37 --> C6{maxOpSvcCnt equals 0 or null or hpUrlDomain null?}
    C6 -->|Yes| E2["Throw JCCBusinessException ERROR_CODE_0002 System Error"]
    C6 -->|No| N38["Parse maxOpSvcCnt to int"]
    N38 --> C7{maxOpSvcCntInt less than or equal to urlAccountCnt?}
    C7 -->|Yes| E3["Throw JCCBusinessException ERROR_CODE_0103 Contract Limit Error"]
    C7 -->|No| N39["Pass service count validation"]

    N39 --> END(["End Return void"])

    E1 --> END
    E2 --> END
    E3 --> END

    TRY --> CATCH["CATCH JCCWebServiceException"]
    N39 --> CATCH
    CATCH --> N40["checkException se, isTarget"]
    N40 --> END
```

**Branch descriptions:**

| Block | Condition | Constant / Value | Business Meaning |
|-------|-----------|-----------------|------------------|
| C1 | SSO WebID null check | — | Validates the user's SSO identity is present; throws system error if absent |
| C2 | opSvcCd equals CD00136_B002 | `CD00136_B002 = "B002"` (FTTH Optional Service code) | Filters to only FTTH optional service items |
| C3 | opSvcStat equals CD00037_910 or CD00037_920 | `CD00037_910 = "910"` (Terminated), `CD00037_920 = "920"` (Cancelled) | Skips service items that are already terminated or cancelled |
| C4 | ssoInfoWebid equals opSvcKeiInfoWebid | — | Matches the user's SSO WebID to the optional service item's WebID |
| C5 | isTarget equals CHEK_CFM | `CHEK_CFM = "cfm"`, `FUNC_CD_1 = "1"`, `FUNC_CD_2 = "2"` | Distinguishes confirmation mode (Func Code 2) from registration mode (Func Code 1) |
| C6 | maxOpSvcCnt == "0" OR null OR hpUrlDomain null | `MAXOPSVCCNT_ZERO = "0"`, `ERROR_CODE_0002 = "0002"` | Validates configuration data exists before service invocation |
| C7 | maxOpSvcCntInt <= urlAccountCnt | `ERROR_CODE_0103 = "0103"` | Checks the user has not exceeded their maximum optional service count |

## 3. Parameter Analysis

| No | Parameter Name | Type | Business Description |
|----|---------------|------|---------------------|
| 1 | `isTarget` | `String` | The button action indicator that determines whether the user is performing a **confirmation check** (`"cfm"` / CHEK_CFM) or a **registration/application** (`"mskm"`). When `"cfm"`, the method sets `functionCode` to `"2"` (FUNC_CD_2, Check/Confirmation mode). Otherwise it sets `functionCode` to `"1"` (FUNC_CD_1, Registration/Apply mode). This flag branches the entire downstream service invocation behavior. |
| 2 | `commoninfoBean` | `X31SDataBeanAccess` | The shared form bean containing all data passed between screens. It holds nested sub-beans: `WEB_CHG_INFO` (web change info) which contains `SSO_INFO` (SSO identity data including the user's WebID), `GEN_CUST_KEI_INFO` (current customer contract info), which in turn contains `SVC_KEI_INFO` (service contract info) that holds `SVC_KEI_UCWK_INFO` (service detail work info) containing `OP_SVC_KEI_INFO` (optional service contract sub-items). This bean is the single source of truth for all customer, identity, and service contract data. |

**Additional fields read (instance/external state):**
- `super.getServiceFormBean()` — retrieves the service form data bean from the parent class, used as the primary output/input holder for the service layer.
- `this` (instance reference) — passed to `JFUWebCommon.setSvcKeiStat()` and `JFUWebCommon.setOpSvcKeiStatMyHpRsv1()`, `checkException()`, and `invokeService()` as the current logic handler.

## 4. CRUD Operations / Called Services

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

| CRUD | SC / CBS | SC Code | Entity / DB | Operation Description |
|------|----------|---------|-------------|----------------------|
| - | `FUSV0025_FUSV0025OPDBMapper.setFUSV002501SC` | FUSV002501SC | Application content approval registration SC — registers the user's selected optional service application details for approval |
| - | `FUSV0025_FUSV0025OPDBMapper.setFUSV002502SC` | FUSV002502SC | Optional service contract ISP change SC — processes changes to the ISP (Internet Service Provider) contract details |
| - | `FUSV0025_FUSV0025OPDBMapper.setFUSV002503SC` | FUSV002503SC | Enrollment registration SC — registers the user for the selected optional service enrollment |
| - | `FUSV0025_FUSV0025OPDBMapper.setFUSV002504SC` | FUSV002504SC | Progress registration SC — records the progress/status of the service registration workflow |
| - | `FUSV0025_FUSV0025OPDBMapper.setFUSV002505SC` | FUSV002505SC | Application details check and follow-up request SC — validates application details and records follow-up task requests |
| - | `FUSV0025_FUSV0025OPDBMapper.setFUSV002506SC` | FUSV002506SC | Optional service contract ISP end SC — processes the end-of-contract termination logic for ISP services |
| - | `FUSV0025_FUSV0025OPDBMapper.setFUSV002507SC` | FUSV002507SC | Optional service contract ISP start SC — processes the start-of-contract activation logic for ISP services |
| - | `FUSV0025_FUSV0025OPDBMapper.setFUSV002501CC` | FUSV002501CC | Optional service contract ISP agreement CC — handles cross-cutting agreement acceptance processing for ISP services |
| - | `FUSV0025_FUSV0025OPDBMapper.setFUSV002502CC` | FUSV002502CC | Service IF result data transfer CC — transfers and maps service interface results between beans |
| - | `FUSV0025_FUSV0025OPDBMapper.setFUSV002503CC` | FUSV002503CC | Order issuance condition registration CC — registers conditions required for order invoice generation |
| - | `JFUWebCommon.setSvcKeiStat` | JFUWebCommon | - | Sets the service contract status in the output data map |
| - | `JFUWebCommon.setOpSvcKeiStatMyHpRsv1` | JFUWebCommon | - | Sets the optional service contract status in the My Home page reservation data |
| R | `FUW09905SFLogic.getDataBean` | FUW09905SF | - | Reads data bean (called within the service layer chain) |
| - | `OneStopDataBeanAccess.sendMessageString` | OneStopDataBeanAccess | - | Retrieves string values from data beans (WebID, URL account, service code, etc.) |
| R | `OneStopDataBeanAccess.getDataBean` | OneStopDataBeanAccess | - | Retrieves specific sub-beans from data bean hierarchies |
| R | `OneStopDataBeanAccess.getDataBeanArray` | OneStopDataBeanAccess | - | Retrieves arrays of sub-beans from data beans |
| R | `OneStopDataBeanAccessArray.getCount` | OneStopDataBeanAccessArray | - | Returns the count of items in a data bean array (used in loop iteration) |
| R | `JEDK0011C080TPMA.getCount` | JEDK0011C080TPMA | - | Reads count data from entity (used within called service layer) |
| - | `JFUMappingUtil.setOpSvcKeiStatMyHpRsv1` | JFUMapping | - | Maps optional service contract status data to My Home page reservation fields |
| - | `JFUMappingUtil.setSvcKeiStat` | JFUMapping | - | Maps service contract status data |
| - | `JBSBatKKCrsChgIktAdd.invokeService` | JBSBatKKCrsChgIktAdd | - | Invokes service for course change internet add processing (within service layer) |
| - | `JBSbatKKCrsChgSmtVLAdd.invokeService` | JBSbatKKCrsChgSmtVLAdd | - | Invokes service for course change SMS volume add processing |
| - | `JBSbatKKCrsChgWribSette.invokeService` | JBSbatKKCrsChgWribSette | - | Invokes service for course change writing setting processing |
| - | `JBSbatKKEponSwchKjInfSksi.invokeService` | JBSbatKKEponSwchKjInfSksi | - | Invokes service for EPON switch key info creation processing |
| - | `JBSbatAKCHSeikyYsoInfMake.isNull` | JBSbatAKCHSeikyYsoInfMake | - | Null check utility within service layer |
| - | `JBSbatACInsentetivePrcInfoSaksei.isNull` | JBSbatACInsentetivePrcInfoSaksei | - | Null check utility for account contract incentive price info creation |
| - | `JCCBatCommon.invokeService` | JCCBatCommon | - | Common batch invoke service utility |
| - | `JACBatCommon.isNull` | JACBatCommon | - | Common batch null check utility |
| - | `JCHbatSeikyKaknoBusinessUtil.isNull` | JCHbatSeikyKaknoBusinessUtil | - | Business utility null check for settlement handling |
| - | `JFUMappingUtil.setOpSvcKeiStatMyHpRsv1` | JFUMapping | - | Maps optional service status to My Home page reservation |
| - | `JFUMappingUtil.setSvcKeiStat` | JFUMapping | - | Maps service contract status |
| - | `SCW00101SFLogic.getCount` | SCW00101SFLogic | - | Reads count from service component (within service layer chain) |

## 5. Dependency Trace

| # | Caller (Screen/Batch) | Call Chain (Full Path to this Method) | Terminal (SC / CRUD / Entity) |
|---|----------------------|--------------------------------------|-------------------------------|
| 1 | Class: `FUW02401SFLogic.cfm()` | `cfm()` -> `cfmMskmSyori(CHEK_CFM, commoninfoBean)` | `setFUSV002501SC`, `setFUSV002502SC`, `setFUSV002503SC`, `setFUSV002504SC`, `setFUSV002505SC`, `setFUSV002506SC`, `setFUSV002507SC`, `setFUSV002501CC`, `setFUSV002502CC`, `setFUSV002503CC` (SC operations), `checkException`, `isNull`, `sendMessageString` |
| 2 | Class: `FUW02401SFLogic.mskm()` | `mskm()` -> `cfmMskmSyori(isTarget, commoninfoBean)` | `setFUSV002501SC`, `setFUSV002502SC`, `setFUSV002503SC`, `setFUSV002504SC`, `setFUSV002505SC`, `setFUSV002506SC`, `setFUSV002507SC`, `setFUSV002501CC`, `setFUSV002502CC`, `setFUSV002503CC` (SC operations), `checkException`, `isNull`, `sendMessageString` |

**Note:** `FUW02401SFLogic.cfm()` passes `CHEK_CFM = "cfm"` as the `isTarget` parameter (confirmation mode), while `mskm()` passes the value of `isTarget` from the button click event (registration mode). Both call chains ultimately reach the same processing logic with different function codes.

## 6. Per-Branch Detail Blocks

### Block 1 — [SET / EXTRACT] Extract common form beans (L488)

> Retrieves the shared form bean hierarchy from `commoninfoBean`. Extracts SSO information and customer contract details nested within the bean structure.

| # | Type | Code |
|---|------|------|
| 1 | SET | `webChgInfoBean = commoninfoBean.getDataBeanArray(WEB_CHG_INFO).getDataBean(0)` // Extract WEB change info form bean |
| 2 | SET | `ssoInfoBean = webChgInfoBean.getDataBeanArray(SSO_INFO).getDataBean(0)` // Extract SSO identity info |

### Block 2 — [IF] SSO WebID null validation (L492)

> Validates the SSO WebID is set. If null, throws a system error (JCCBusinessException).

| # | Type | Code |
|---|------|------|
| 1 | SET | `ssoInfoWebid = ssoInfoBean.sendMessageString(WEB_ID_21, DATABEAN_GET_VALUE)` // Get SSO WebID from SSO info bean |
| 2 | IF | `JFUWebCommon.isNull(ssoInfoWebid)` [L493] |

#### Block 2.1 — [THROW] SSO WebID not set error (L495)

> Throws system error when the SSO WebID is missing.

| # | Type | Code |
|---|------|------|
| 1 | EXEC | `X31SWebLog.DEBUG_LOG.debug("【SSO WebID not set error】")` // Debug log for SSO WebID not set error |
| 2 | THROW | `throw new JCCBusinessException(ERROR_CODE_0002)` // System error (ERROR_CODE_0002 = "0002") |

### Block 3 — [SET] Extract customer and service contract beans (L501)

> Retrieves the current customer contract info, service contract info, and service detail work info from the shared form bean hierarchy.

| # | Type | Code |
|---|------|------|
| 1 | SET | `genCustKeiInfoBean = webChgInfoBean.getDataBeanArray(GEN_CUST_KEI_INFO).getDataBean(0)` // Extract current customer contract info |
| 2 | SET | `svcKeiInfoBean = genCustKeiInfoBean.getDataBeanArray(SVC_KEI_INFO).getDataBean(0)` // Extract service contract info |
| 3 | SET | `svcKeiUcwkInfoBean = svcKeiInfoBean.getDataBeanArray(SVC_KEI_UCWK_INFO).getDataBean(0)` // Extract service detail work info |

### Block 4 — [SET] Initialize optional service processing variables (L507)

> Declares and initializes variables for optional service contract data retrieval.

| # | Type | Code |
|---|------|------|
| 1 | SET | `opSvcKeiInfoBean = null` // Optional service contract info bean |
| 2 | SET | `webid = null` // Matched WebID |
| 3 | SET | `urlAccountCnt = 0` // URL account count counter |

### Block 5 — [FOR LOOP] Optional service contract data retrieval (L512)

> Iterates through all optional service contract sub-items to find the one matching the logged-in user.

| # | Type | Code |
|---|------|------|
| 1 | SET | `opSvcKeiInfoArray = svcKeiUcwkInfoBean.getDataBeanArray(OP_SVC_KEI_INFO)` // Get optional service contract array |
| 2 | FOR | `for n = 0 to opSvcKeiInfoArray.getCount() - 1` (L512) |

#### Block 5.1 — [SET] Extract data from iteration n (L513)

| # | Type | Code |
|---|------|------|
| 1 | SET | `tmpOpSvcKeiInfoBean = opSvcKeiInfoArray.getDataBean(n)` // Get bean at index n |
| 2 | SET | `opSvcKeiInfoWebid = tmpOpSvcKeiInfoBean.sendMessageString(WEB_ID_28, DATABEAN_GET_VALUE)` // Get WebID from optional service bean |
| 3 | SET | `opSvcKeiInfoUrlAccount = tmpOpSvcKeiInfoBean.sendMessageString(URL_ACCOUNT_28, DATABEAN_GET_VALUE)` // Get URL account |
| 4 | SET | `tmpopSvcKeiInfoOpSvcCd = tmpOpSvcKeiInfoBean.sendMessageString(OP_SVC_CD_28, DATABEAN_GET_VALUE)` // Get optional service code |
| 5 | SET | `tmpopSvcKeiInfoOpSvcStat = tmpOpSvcKeiInfoBean.sendMessageString(OP_SVC_KEI_STAT_28, DATABEAN_GET_VALUE)` // Get optional service contract status |

#### Block 5.2 — [IF] Filter non-FTTH optional services (L522)

> Skips items that are not FTTH optional service items (opSvcCd != "B002").

| # | Type | Code |
|---|------|------|
| 1 | IF | `!CD00136_B002.equals(tmpopSvcKeiInfoOpSvcCd)` [L522] `[CD00136_B002 = "B002"]` FTTH optional service code |
| 2 | EXEC | `continue` // Skip non-FTTH optional services |

#### Block 5.3 — [IF] Filter terminated/cancelled services (L526)

> Skips items already terminated (910) or cancelled (920).

| # | Type | Code |
|---|------|------|
| 1 | IF | `CD00037_910.equals(tmpopSvcKeiInfoOpSvcStat) \|\| CD00037_920.equals(tmpopSvcKeiInfoOpSvcStat)` [L526] `[CD00037_910 = "910" Terminated]` `[CD00037_920 = "920" Cancelled]` |
| 2 | EXEC | `continue` // Skip terminated or cancelled services |

#### Block 5.4 — [IF] Match SSO WebID (L530)

> Checks if the optional service item's WebID matches the user's SSO WebID.

| # | Type | Code |
|---|------|------|
| 1 | IF | `ssoInfoWebid.equals(opSvcKeiInfoWebid)` [L530] |
| 2 | SET | `opSvcKeiInfoBean = tmpOpSvcKeiInfoBean` // Set matched optional service contract info bean |
| 3 | SET | `webid = opSvcKeiInfoWebid` // Set matched WebID |

#### Block 5.5 — [IF] Count URL accounts (L534)

> Counts the number of non-null URL accounts across all matching optional service items.

| # | Type | Code |
|---|------|------|
| 1 | IF | `!JFUWebCommon.isNull(opSvcKeiInfoUrlAccount)` [L534] |
| 2 | SET | `urlAccountCnt++` // Increment URL account counter |

### Block 6 — [SET] Get service form bean (L542)

> Retrieves the service form data bean from the parent class, used as the primary bean for service invocation.

| # | Type | Code |
|---|------|------|
| 1 | SET | `bean = super.getServiceFormBean()` // Get service form bean |

### Block 7 — [IF] WebID post-validation (L548)

> Validates the WebID was successfully matched during the optional service loop. If null, throws a contract state error.

| # | Type | Code |
|---|------|------|
| 1 | IF | `JFUWebCommon.isNull(webid)` [L548] |
| 2 | THROW | `throw new JCCBusinessException(ERROR_CODE_0102)` // Contract state error (ERROR_CODE_0102 = "0102") |

### Block 8 — [SET] Build service invocation parameters (L556)

> Creates the parameter map and mapper for the FUSV0025 service invocation.

| # | Type | Code |
|---|------|------|
| 1 | SET | `paramMap = new HashMap<String, String>(16)` // Service invocation parameter map |
| 2 | SET | `paramMap.put(TELEGRAM_INFO_USECASE_ID, USECASE_ID_FUSV0025)` `[USECASE_ID_FUSV0025 = "FUSV0025"]` |
| 3 | SET | `mapper = new FUSV0025_FUSV0025OPDBMapper()` // Service order mapper |
| 4 | SET | `dataMap = new HashMap<String, Object>()` // Service data map |
| 5 | SET | `paramBean = {bean, opSvcKeiInfoBean, ssoInfoBean}` // Param bean array |

### Block 9 — [IF] Function code determination (L570)

> Determines the function code based on whether the user is in confirmation mode or registration mode.

| # | Type | Code |
|---|------|------|
| 1 | SET | `functionCode = null` |
| 2 | IF | `CHEK_CFM.equals(isTarget)` [L572] `[CHEK_CFM = "cfm"]` |

#### Block 9.1 — [SET] Confirmation mode (L574)

> Confirmation/check mode — function code "2".

| # | Type | Code |
|---|------|------|
| 1 | SET | `functionCode = FUNC_CD_2` `[FUNC_CD_2 = "2"]` |

#### Block 9.2 — [SET] Registration mode (L576)

> Registration/application mode — function code "1".

| # | Type | Code |
|---|------|------|
| 1 | SET | `functionCode = FUNC_CD_1` `[FUNC_CD_1 = "1"]` |

### Block 10 — [SERIES OF CALLS] Service component mapping (L579)

> Sequentially calls seven service-component (SC) mappers for application processing, followed by three cross-cutting (CC) mappers.

| # | Type | Code |
|---|------|------|
| 1 | CALL | `dataMap = mapper.setFUSV002501SC(paramBean, dataMap, functionCode)` // Application content approval registration |
| 2 | CALL | `dataMap = mapper.setFUSV002502SC(paramBean, dataMap, functionCode)` // Optional service contract ISP change |
| 3 | CALL | `dataMap = mapper.setFUSV002503SC(paramBean, dataMap, functionCode)` // Enrollment registration |
| 4 | CALL | `dataMap = mapper.setFUSV002504SC(paramBean, dataMap, functionCode)` // Progress registration |
| 5 | CALL | `dataMap = mapper.setFUSV002505SC(paramBean, dataMap, functionCode)` // Application details check and follow-up request |
| 6 | CALL | `dataMap = mapper.setFUSV002506SC(paramBean, dataMap, functionCode)` // Optional service contract ISP end SC |
| 7 | CALL | `dataMap = mapper.setFUSV002507SC(paramBean, dataMap, functionCode)` // Optional service contract ISP start SC |
| 8 | CALL | `dataMap = mapper.setFUSV002501CC(paramBean, dataMap)` // Optional service contract ISP agreement CC |
| 9 | CALL | `dataMap = mapper.setFUSV002502CC(paramBean, dataMap)` // Service IF result data transfer CC |
| 10 | CALL | `dataMap = mapper.setFUSV002503CC(paramBean, dataMap, functionCode)` // Order issuance condition registration CC |

### Block 11 — [EXEC] Set service contract statuses (L591)

> Sets the service contract status and optional service contract status in the output data map.

| # | Type | Code |
|---|------|------|
| 1 | CALL | `JFUWebCommon.setSvcKeiStat(this, dataMap)` // Set service contract status |
| 2 | CALL | `JFUWebCommon.setOpSvcKeiStatMyHpRsv1(this, dataMap)` // Set optional service contract status for My Home page |

### Block 12 — [TRY-CATCH] Service invocation and validation (L596)

> Wraps the service invocation, maximum optional service count validation, and exception handling.

| # | Type | Code |
|---|------|------|
| 1 | SET | `outputMap = new HashMap<Object, Object>()` // Search result storage map |
| 2 | TRY | Service invocation block |

#### Block 12.1 — [CALL] Invoke service (L600)

| # | Type | Code |
|---|------|------|
| 1 | CALL | `invokeService(paramMap, dataMap, outputMap)` // Invoke the FUSV0025 service |

#### Block 12.2 — [SET] Get max service count and URL domain (L603)

> Retrieves configuration values for max optional service count and URL domain validation.

| # | Type | Code |
|---|------|------|
| 1 | SET | `maxOpSvcCnt = bean.sendMessageString(MAX_OP_SVC_CNT, DATABEAN_GET_VALUE)` `[MAX_OP_SVC_CNT = "最大オプションサービス数"]` |
| 2 | SET | `hp_url_domain = bean.sendMessageString(HP_URL_DOMAIN, DATABEAN_GET_VALUE)` `[HP_URL_DOMAIN = "ホームページドメイン"]` |

#### Block 12.3 — [IF] Configuration null validation (L607)

> Validates that max optional service count and URL domain configuration data exist.

| # | Type | Code |
|---|------|------|
| 1 | IF | `MAXOPSVCCNT_ZERO.equals(maxOpSvcCnt) \|\| JFUWebCommon.isNull(maxOpSvcCnt) \|\| JFUWebCommon.isNull(hp_url_domain)` [L607] `[MAXOPSVCCNT_ZERO = "0"]` |
| 2 | THROW | `throw new JCCBusinessException(ERROR_CODE_0002)` // System error (ERROR_CODE_0002 = "0002") |

#### Block 12.4 — [ELSE] Service count limit validation (L611)

> Parses the max service count and checks the user has not exceeded their optional service limit.

| # | Type | Code |
|---|------|------|
| 1 | SET | `maxOpSvcCntInt = Integer.parseInt(maxOpSvcCnt)` |
| 2 | IF | `maxOpSvcCntInt <= urlAccountCnt` [L615] |
| 3 | THROW | `throw new JCCBusinessException(ERROR_CODE_0103)` // Contract error — user has exceeded the maximum optional service count (ERROR_CODE_0103 = "0103") |

#### Block 12.5 — [CATCH] Web service exception handler (L622)

> Catches web service exceptions and delegates to the exception handler.

| # | Type | Code |
|---|------|------|
| 1 | CATCH | `catch (JCCWebServiceException se)` [L622] |
| 2 | CALL | `checkException(se, isTarget)` // Delegate exception processing to parent class |

### Block 13 — [RETURN] Method exit (L625)

> Implicit void return — method completes execution.

| # | Type | Code |
|---|------|------|
| 1 | RETURN | `return` (implicit) — method returns void |

## 7. Glossary

| Term | Type | Business Meaning |
|------|------|------------------|
| `isTarget` | Field | Target indicator — determines whether the user is confirming (`"cfm"`) or registering (`"mskm"`) |
| `webChgInfoBean` | Field | Web change info bean — shared form bean containing web-side change request data |
| `ssoInfoBean` | Field | SSO info bean — Single Sign-On identity data for the logged-in user |
| `ssoInfoWebid` | Field | SSO WebID — the user's identity identifier from SSO, used to match service contracts to the correct user |
| `genCustKeiInfoBean` | Field | Current customer contract info bean — contains the customer's active contract details |
| `svcKeiInfoBean` | Field | Service contract info bean — details about the customer's service contracts (e.g., FTTH, Mail, ENUM) |
| `svcKeiUcwkInfoBean` | Field | Service detail work info bean — contains sub-items and work details for service contracts |
| `opSvcKeiInfoBean` | Field | Optional service contract info bean — the matched optional service contract sub-item for this user |
| `opSvcKeiInfoArray` | Field | Optional service contract array — all optional service contract sub-items belonging to this customer |
| `urlAccountCnt` | Field | URL account count — number of valid URL accounts associated with the user's optional services, used for quota validation |
| `CHEK_CFM` | Constant | Confirmation button identifier — value `"cfm"`, indicates check/confirmation mode |
| `USECASE_ID_FUSV0025` | Constant | Use case identifier for the FUSV0025 service — value `"FUSV0025"`, identifies the service invocation use case |
| `FUNC_CD_1` | Constant | Function code 1 — value `"1"`, indicates registration/application mode |
| `FUNC_CD_2` | Constant | Function code 2 — value `"2"`, indicates check/confirmation mode |
| `MAXOPSVCCNT_ZERO` | Constant | Maximum optional service count zero check — value `"0"`, used to detect empty/invalid configuration |
| `CD00136_B002` | Constant | Optional service code for FTTH optional service — value `"B002"`, identifies FTTH optional service items |
| `CD00037_910` | Constant | Service contract status for terminated — value `"910"`, indicates a terminated service contract |
| `CD00037_920` | Constant | Service contract status for cancelled — value `"920"`, indicates a cancelled service contract |
| `ERROR_CODE_0002` | Constant | System error code — value `"0002"`, thrown for system-level errors (missing SSO WebID, missing config) |
| `ERROR_CODE_0102` | Constant | Contract state error code — value `"0102"`, thrown when no valid webID is found for the user |
| `ERROR_CODE_0103` | Constant | Contract limit error code — value `"0103"`, thrown when the user has exceeded the maximum optional service count |
| FUSV0025 | Service | Optional Service Change Screen — the screen module for changing/adding optional services |
| FTTH | Business term | Fiber To The Home — fiber-optic broadband internet service offered by K-Opticom |
| SSO | Acronym | Single Sign-On — authentication mechanism for user identity across K-Opticom services |
| SC | Technical | Service Component — service-tier class handling specific business logic (e.g., `setFUSV002501SC`) |
| CC | Technical | Cross-Cutting — shared service-tier class handling concerns common across services (e.g., agreement acceptance, data transfer, order issuance) |
| ISP | Business term | Internet Service Provider — the internet connectivity service component in K-Opticom's service offerings |
| WEB_ID_21 | Field | SSO WebID field — field key to extract the user's WebID from the SSO info bean |
| WEB_ID_28 | Field | Optional service WebID field — field key to extract the WebID from optional service contract beans |
| URL_ACCOUNT_28 | Field | URL account field — field key to check if a URL account is set for an optional service |
| OP_SVC_CD_28 | Field | Optional service code field — field key to get the service type code from optional service beans |
| OP_SVC_KEI_STAT_28 | Field | Optional service contract status field — field key to get the contract status from optional service beans |
| MAX_OP_SVC_CNT | Field | Maximum optional service count — field key to retrieve the configured maximum number of optional services per customer |
| HP_URL_DOMAIN | Field | Homepage URL domain — field key to retrieve the homepage URL domain configuration |
| JCCBusinessException | Exception | Business layer exception — thrown for business rule violations and system errors |
| JCCWebServiceException | Exception | Web service layer exception — thrown when service invocation fails |
| FUSV0025_FUSV0025OPDBMapper | Class | FUSV0025 OpenDB Mapper — mapper class coordinating service-component and cross-cutting processing for optional service changes |
| invokeService | Method | Service invocation method — triggers the actual external service call with the prepared parameter and data maps |
| checkException | Method | Exception handler method — processes and transforms exceptions based on the `isTarget` mode |
