# Business Logic — KKW02519SFLogic.kksv0516Execute() [44 LOC]

| Field | Value |
|-------|-------|
| Fully Qualified Name | `eo.web.webview.KKW02519SF.KKW02519SFLogic` |
| Layer | Controller / Web Logic (Package: `eo.web.webview.KKW02519SF`) |
| Module | `KKW02519SF` (Package: `eo.web.webview.KKW02519SF`) |

## 1. Role

### KKW02519SFLogic.kksv0516Execute()

This method performs the core business execution for the **Telephone Optional Service Contract Update Information Update** screen (電話オプションサービス契約更新情報更新 — KKW02519SF). It orchestrates the complete submission workflow: first, it constructs and sets a progress notification label by delegating to `getPrgTkjkSvcNm()` and concatenating fixed suffix strings, then it configures the service invocation context (UCID and OperationID) for the business process framework, and finally it dispatches data through **six sequential DataBean-to-BP mapping steps** that prepare every aspect of the update — from content acceptance registration, to follow-up work requests, optional service contract changes, charge-limit notification codes, progress information registration, and entry support work data. This method implements the **delegation + routing pattern**: it does not contain business logic of its own but acts as the glue layer that prepares and launches a composite business process (`KKSV0516OP`) comprising multiple sub-services. It is a private method, invoked internally by the screen's confirmation handlers (`actionFix()` for fix/save and `actionUpdCfm()` for update confirmation), making it the central execution point for the telephone optional service contract update operation within the K-Opticom customer service system.

## 2. Processing Pattern (Detailed Business Logic)

```mermaid
flowchart TD
    START(["kksv0516Execute svcFormBean, funcCd"])
    START --> GET_SVC_NAM["getPrgTkjkSvcNm svcFormBean"]
    GET_SVC_NAM --> BUILD_STR["strPrgTkjk1 = svcNm + PRG_TKJK_1_JYOHO + PRG_TKJK_1_CHGE"]
    BUILD_STR --> SEND_MSG["svcFormBean sendMessageString PRG_TKJK_1"]
    SEND_MSG --> INIT_ARRAY["paramBean = svcFormBean array"]
    INIT_ARRAY --> INIT_MAPS["init paramMap, inputMap, outputMap"]
    INIT_MAPS --> SET_UCID["paramMap put UCID_KKSV0516"]
    SET_UCID --> SET_OPID["paramMap put OPID_KKSV0516OP"]
    SET_OPID --> NEW_MAPPER["new KKSV0516_KKSV0516OPDBMapper mapper"]
    NEW_MAPPER --> MAP_01["mapper setKKSV051601SC inputMap"]
    MAP_01 --> MAP_01_DESC["Submit content acceptance registration"]
    MAP_01_DESC --> MAP_02["mapper setKKSV051602SC inputMap"]
    MAP_02 --> MAP_02_DESC["Submit details inquiry / follow-up work request"]
    MAP_02_DESC --> MAP_03["mapper setKKSV051603SC inputMap"]
    MAP_03 --> MAP_03_DESC["Phone optional service contract info change"]
    MAP_03_DESC --> MAP_04["mapper setKKSV051604SC inputMap"]
    MAP_04 --> MAP_04_DESC["eo light phone call charge excess notif code change"]
    MAP_04_DESC --> MAP_05["mapper setKKSV051605SC inputMap"]
    MAP_05 --> MAP_05_DESC["Progress information registration"]
    MAP_05_DESC --> MAP_06["mapper setKKSV051606CC inputMap"]
    MAP_06 --> MAP_06_DESC["Submit screen entry support work info update CC"]
    MAP_06_DESC --> INVOKE["invokeService paramMap inputMap outputMap"]
    INVOKE --> RETURN["return true"]
    RETURN --> END(["END"])
```

**Processing overview:**

1. **Progress label construction** — The method calls `getPrgTkjkSvcNm(svcFormBean)` to dynamically retrieve the service name for the progress notification, then appends two fixed Japanese suffix strings (`PRG_TKJK_1_JYOHO` and `PRG_TKJK_1_CHGE`, which translate to "information" and "change") and sets the result into the form bean under the key `PRG_TKJK_1` ("Progress Notification Item 1").

2. **Service invocation preparation** — A parameter map, input map, and output map are created. The UCID (Use Case ID) `UCID_KKSV0516` and Operation ID `OPID_KKSV0516OP` are set into the parameter map to identify the business process.

3. **Sequential DataBean mapping** — A `KKSV0516_KKSV0516OPDBMapper` instance is created and called 6 times in sequence. Each mapper method extracts fields from the `svcFormBean`, maps them to the corresponding business process message structure, and returns the populated input map. The mapping steps are:
   - `setKKSV051601SC` — Submit content acceptance registration (申請内容承認登録)
   - `setKKSV051602SC` — Submit details inquiry / follow-up work request (申請明細照会・後続業務依頼)
   - `setKKSV051603SC` — Phone optional service contract information change (オプションサービス契約<電話>情報変更)
   - `setKKSV051604SC` — eo light phone call charge excess notification code change (eo光電話通話合計超過通知コード変更)
   - `setKKSV051605SC` — Progress information registration (進行情報登録)
   - `setKKSV051606CC` — Submit screen entry support work info update CC (申請画面入力支援ワーク情報更新CC)

4. **Business process invocation** — `invokeService()` is called with the prepared parameter map and populated input map to execute the composite business process `KKSV0516OP`.

5. **Return** — The method always returns `true`, indicating successful execution.

## 3. Parameter Analysis

| No | Parameter Name | Type | Business Description |
|----|---------------|------|---------------------|
| 1 | `svcFormBean` | `X31SDataBeanAccess` | The service form bean containing all data entered/viewed on the Telephone Optional Service Contract Update screen. It carries the service contract number, optional service contract number, operation date/time, update date/time, billing contract number, progress notification text, diversion reason detail records, and other screen fields. |
| 2 | `funcCd` | `String` | The function code (機能コード) that identifies the specific operation mode (e.g., fix/save vs. update confirmation). This code is passed through to the DataBean mapper methods so they can conditionally include different mapping logic based on the screen action being performed. |

**Additional fields/state read by the method:**

| Source | Description |
|--------|-------------|
| `getPrgTkjkSvcNm(svcFormBean)` | Instance method on `KKW02519SFLogic` that returns a service name string based on the optional service data in `svcFormBean`. Used to build the progress notification label. |

## 4. CRUD Operations / Called Services

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

| CRUD | SC / CBS | SC Code | Entity / DB | Operation Description |
|------|----------|---------|-------------|----------------------|
| - | `KKSV0516_KKSV0516OPDBMapper.setKKSV051601SC` | KKSV051601SC | - | Maps DataBean fields for submit content acceptance registration. Extracts SYSID, mskm_sbt_cd ("00026"), mskm_uk_dtm, mskm_ymd, consmbsn_mskm_stat_skbt_cd ("04"), and constructs EKK0011D020CBSMsg1List for the submission acceptance message. |
| - | `KKSV0516_KKSV0516OPDBMapper.setKKSV051602SC` | KKSV051602SC | - | Maps DataBean fields for submit details inquiry / follow-up work request. Extracts kzkwrk_reqymd (operation date) and upd_dtm_bf (update date/time). |
| - | `KKSV0516_KKSV0516OPDBMapper.setKKSV051603SC` | KKSV051603SC | - | Maps DataBean fields for phone optional service contract information change. Extracts op_svc_kei_no, ido_div, twryo_stiam_ttu_tchi_stiam (updated call charge limit), and upd_dtm_bf. |
| - | `KKSV0516_KKSV0516OPDBMapper.setKKSV051604SC` | KKSV051604SC | - | Maps DataBean fields for eo light phone call charge excess notification code change. Extracts svc_kei_no, svc_kei_ucwk_no, and seiky_ym (billing year/month, substring of operation date). |
| - | `KKSV0516_KKSV0516OPDBMapper.setKKSV051605SC` | KKSV051605SC | - | Maps DataBean fields for progress information registration. Extracts svc_kei_no, op_svc_kei_no, sbop_svc_kei_no, ido_div, prg_stat ("5102"), seiky_kei_no, prg_tkjk_1, and iterates over diversion reason detail records to populate EKK1091D010CBSMsg1List. |
| - | `KKSV0516_KKSV0516OPDBMapper.setKKSV051606CC` | KKSV051606CC | - | Maps DataBean fields for submit screen entry support work info update CC. Extracts key_svc_kei_no, tel_1_tab_op_if_ctl_cd, and tel_2_tab_op_if_ctl_cd (conditionally included only if equal to "1"). |
| C | `KKW02519SFLogic.invokeService` | KKSV0516OP | - | Invokes the composite business process KKSV0516OP, which internally delegates to the 6 SC/CBS sub-services (EKK0011D020CBS, EKK1091D010CBS, etc.) to persist the telephone optional service contract update data. |
| R | `KKW02519SFLogic.getPrgTkjkSvcNm` | - | - | Reads the optional service name from svcFormBean to build the progress notification label string. |

### SC Code Details (inferred from mapper analysis):

| Mapper Method | SC Code / CBS | Data Extracted |
|---------------|---------------|----------------|
| `setKKSV051601SC` | `EKK0011D020CBS` (Submit content acceptance registration) | SYSID, mskm_sbt_cd="00026", mskm_uk_dtm, mskm_ymd, consmbsn_mskm_stat_skbt_cd="04", EKK0011D020CBSMsg1List |
| `setKKSV051602SC` | KKSV051602SC (Follow-up work) | kzkwrk_reqymd, upd_dtm_bf |
| `setKKSV051603SC` | KKSV051603SC (Optional service contract change) | op_svc_kei_no, ido_div, twryo_stiam_ttu_tchi_stiam, upd_dtm_bf |
| `setKKSV051604SC` | KKSV051604SC (Charge notification code) | svc_kei_no, svc_kei_ucwk_no, seiky_ym |
| `setKKSV051605SC` | `EKK1091D010CBS` (Progress information) | svc_kei_no, op_svc_kei_no, sbop_svc_kei_no, ido_div, prg_stat="5102", seiky_kei_no, prg_tkjk_1, EKK1091D010CBSMsg1List |
| `setKKSV051606CC` | KKSV051606CC (Entry support work update) | key_svc_kei_no, tel_1_tab_op_if_ctl_cd, tel_2_tab_op_if_ctl_cd |

## 5. Dependency Trace

| # | Caller (Screen/Batch) | Call Chain (Full Path to this Method) | Terminal (SC / CRUD / Entity) |
|---|----------------------|--------------------------------------|-------------------------------|
| 1 | Screen:KKSV0516 | `KKW02519SFLogic.actionFix()` -> `KKW02519SFLogic.kksv0516Execute` | `invokeService [C] KKSV0516OP (EKK0011D020CBS, EKK1091D010CBS)` |
| 2 | Screen:KKSV0516 | `KKW02519SFLogic.actionUpdCfm()` -> `KKW02519SFLogic.kksv0516Execute` | `invokeService [C] KKSV0516OP (EKK0011D020CBS, EKK1091D010CBS)` |

**Call chain details:**

- **`actionFix()`** — The fix/save handler on the KKSV0516 screen. After validation and confirmation, it delegates to `kksv0516Execute()` to persist the telephone optional service contract update.
- **`actionUpdCfm()`** — The update confirmation handler. After the user confirms the update details, it calls `kksv0516Execute()` to execute the service.

Both callers are private methods within `KKW02519SFLogic`, indicating this method is exclusively invoked internally by the KKSV0516 screen's action handlers. The terminal operations reach the composite business process `KKSV0516OP`, which internally triggers the following SC/CBS operations:
- `EKK0011D020CBS` — Submit content acceptance registration (Create)
- `EKK1091D010CBS` — Progress information registration (Create/Update)
- Plus intermediate SCs (KKSV051602SC through KKSV051606CC) that prepare message payloads for the BP framework.

## 6. Per-Branch Detail Blocks

**Block 1** — [METHOD BODY] (L917)

> Executes the telephone optional service contract update information update service. Wraps the entire body in a try/catch context declared at the method signature (throws Exception).

| # | Type | Code | Comment |
|---|------|------|---------|
| 1 | CALL | `strPrgTkjk1 = getPrgTkjkSvcNm(svcFormBean) + PRG_TKJK_1_JYOHO + PRG_TKJK_1_CHGE` | Builds progress notification label 1 by concatenating the optional service name with fixed suffix strings for "information" (情報) and "change" (変更) [ANK-1223-00-00 / OM-2013-0003124] |
| 2 | SET | `svcFormBean.sendMessageString(KKW02519SFConst.PRG_TKJK_1, X31CWebConst.DATABEAN_SET_VALUE, strPrgTkjk1)` | Sets the progress notification label 1 (進行特記事項1) into the form bean for display |

**Block 2** — [STATEMENT BLOCK] (L932)

> Initializes the parameter and data maps used for the business process invocation.

| # | Type | Code | Comment |
|---|------|------|---------|
| 1 | SET | `X31SDataBeanAccess[] paramBean = {svcFormBean}` | Creates a DataBean array containing the single form bean reference |
| 2 | EXEC | `new HashMap<String, Object>()` for `paramMap` | Initializes the service parameter map (サービスパラメータ設定) |
| 3 | EXEC | `new HashMap<String, Object>()` for `inputMap` | Initializes the input map (インプットマップ生成) |
| 4 | EXEC | `new HashMap<String, Object>()` for `outputMap` | Initializes the output map (アウトプットマップ生成) |

**Block 3** — [STATEMENT BLOCK] (L937)

> Configures the UCID (Use Case ID) and Operation ID (Operation ID) into the parameter map. These identifiers route the service invocation to the correct business process.

| # | Type | Code | Comment |
|---|------|------|---------|
| 1 | SET | `paramMap.put(X31CWebConst.TELEGRAM_INFO_USECASE_ID, JKKCommonConst.UCID_KKSV0516)` | Sets the UCID for KKSV0516 (Use Case ID) |
| 2 | SET | `paramMap.put(X31CWebConst.TELEGRAM_INFO_OPERATION_ID, JKKCommonConst.OPID_KKSV0516OP)` | Sets the Operation ID for KKSV0516OP (Operation ID) |

**Block 4** — [STATEMENT BLOCK] (L942)

> Creates the DataBean-BP mapping instance and begins the sequential mapping process. Each mapper call extracts fields from `svcFormBean`, maps them into the input map for the corresponding SC, and chains the result to the next call.

| # | Type | Code | Comment |
|---|------|------|---------|
| 1 | EXEC | `KKSV0516_KKSV0516OPDBMapper mapper = new KKSV0516_KKSV0516OPDBMapper()` | Creates the mapper for upper mapping (上りマッピング) |
| 2 | CALL | `inputMap = mapper.setKKSV051601SC(paramBean, inputMap, funcCd)` | Submit content acceptance registration (申請内容承認登録) |
| 3 | CALL | `inputMap = mapper.setKKSV051602SC(paramBean, inputMap, funcCd)` | Submit details inquiry / follow-up work request (申請明細照会・後続業務依頼) |
| 4 | CALL | `inputMap = mapper.setKKSV051603SC(paramBean, inputMap, funcCd)` | Phone optional service contract info change (オプションサービス契約<電話>情報変更) |
| 5 | CALL | `inputMap = mapper.setKKSV051604SC(paramBean, inputMap, funcCd)` | eo light phone call charge excess notification code change (eo光電話通話合計超過通知コード変更) |
| 6 | CALL | `inputMap = mapper.setKKSV051605SC(paramBean, inputMap, funcCd)` | Progress information registration (進行情報登録) |
| 7 | CALL | `inputMap = mapper.setKKSV051606CC(paramBean, inputMap, funcCd)` | Submit screen entry support work info update CC (申請画面入力支援ワーク情報更新CC) [IT1-2013-0000328 ADD] |

**Block 5** — [STATEMENT BLOCK] (L951)

> Invokes the business process with the prepared parameter and input maps. The output map will contain results after return.

| # | Type | Code | Comment |
|---|------|------|---------|
| 1 | CALL | `invokeService(paramMap, inputMap, outputMap)` | Telephone optional service contract update information update service execution (電話オプションサービス契約更新情報更新サービス実行) |
| 2 | RETURN | `return true` | Returns true for successful execution (正常終了:true) |

## 7. Glossary

| Term | Type | Business Meaning |
|------|------|------------------|
| `PRG_TKJK_1` | Field constant | Progress Notification Item 1 (進行特記事項1) — The key used to store/display a progress label string on the screen |
| `PRG_TKJK_1_JYOHO` | Constant | "情報" (information) — Fixed suffix appended to the progress notification label |
| `PRG_TKJK_1_CHGE` | Constant | "変更" (change) — Fixed suffix appended to the progress notification label |
| `UCID_KKSV0516` | Constant | Use Case ID for the KKSV0516 screen — Identifies the use case in the BP framework |
| `OPID_KKSV0516OP` | Constant | Operation ID for KKSV0516OP — Identifies the specific operation within the BP framework |
| `svcFormBean` | Parameter | Service form bean — Carries all screen data for the Telephone Optional Service Contract Update screen |
| `funcCd` | Parameter | Function code (機能コード) — Distinguishes the calling operation mode (fix, update, etc.) |
| `KKSV0516OP` | Business Process | Telephone Optional Service Contract Update Information Update Operation — The composite BP that handles the full update workflow |
| `EKK0011D020CBS` | CBS Code | Submit Content Acceptance Registration — CBS that registers the submission acceptance (申請内容承認登録) |
| `EKK1091D010CBS` | CBS Code | Progress Information Registration — CBS that registers progress status and diversion reasons (進行情報登録) |
| `setKKSV051601SC` | SC Method | Maps fields for submit content acceptance registration (申請内容承認登録マッピング) |
| `setKKSV051602SC` | SC Method | Maps fields for submit details inquiry and follow-up work request (申請明細照会・後続業務依頼マッピング) |
| `setKKSV051603SC` | SC Method | Maps fields for phone optional service contract information change (オプションサービス契約情報変更マッピング) |
| `setKKSV051604SC` | SC Method | Maps fields for eo light phone call charge excess notification code change (eo光通話超過通知コード変更マッピング) |
| `setKKSV051605SC` | SC Method | Maps fields for progress information registration (進行情報登録マッピング) |
| `setKKSV051606CC` | CC Method | Maps fields for submit screen entry support work info update (申請画面入力支援ワーク情報更新CC) |
| `op_svc_kei_no` | Field | Optional service contract number (オプションサービス契約番号) — Unique identifier for the optional service contract |
| `ido_div` | Field | Diversion classification (異動区分) — Categorizes the type of service change/diversion |
| `svc_kei_no` | Field | Service contract number (サービス契約番号) — Unique identifier for the main service contract |
| `svc_kei_ucwk_no` | Field | Service contract detail work number (サービス契約内訳番号) — Internal tracking ID for service contract line items |
| `sbop_svc_kei_no` | Field | Sub-optional service contract number (サブオプションサービス契約番号) |
| `seiky_kei_no` | Field | Billing contract number (請求契約番号) |
| `seiky_ym` | Field | Billing year/month (請求年月) — Extracted as first 6 characters of operation date |
| `prg_stat` | Field | Progress status (進行ステータス) — Hardcoded value "5102" indicating current processing state |
| `ido_rsn_cd` | Field | Diversion reason code (異動理由コード) — Reason code for service change/diversion |
| `ido_rsn` | Field | Diversion reason detail (異動理由詳細) — Detailed records associated with the service change |
| `twryo_stiam_ttu_tchi_stiam` | Field | Updated call charge designated amount — Updated charge limit notification designation amount |
| `upd_dtm_bf` | Field | Update date/time before (更新年月日时分秒) — Timestamp before update |
| `mskm_sbt_cd` | Field constant | "00026" — Submission type code (申請種別コード) for content acceptance registration |
| `consmbsn_mskm_stat_skbt_cd` | Field constant | "04" — Consignment business submission status identification code (コンシューマ営業用申込状態識別コード) |
| `TEL_1_TAB_OP_IF_CTL_CD` | Field | Phone 1 Tab Optional Info Control Code (電話1タブオプション情報制御コード) — Controls optional info tab for Phone 1 |
| `TEL_2_TAB_OP_IF_CTL_CD` | Field | Phone 2 Tab Optional Info Control Code (電話2タブオプション情報制御コード) — Controls optional info tab for Phone 2 |
| `getPrgTkjkSvcNm` | Method | Retrieves the progress notification service name — Dynamically determines the service name label for progress display |
| `invokeService` | Method | Invokes the BP framework service — Dispatches the prepared input map to the business process for execution |
| KKSV0516 | Screen | Telephone Optional Service Contract Update Information Update screen — The customer-facing screen for updating phone optional service contracts |
| K-Opticom | Company | K-Opticom — Japanese telecommunications service provider (fiber-optic internet, phone services) |
| BP | Acronym | Business Process — The Fujitsu Futurity-based BP framework for enterprise service orchestration |
| SC | Acronym | Service Component — A component that prepares message data for the BP framework |
| CC | Acronym | Common Component — A shared utility component for business logic reuse |
| CBS | Acronym | Common Business Service — A service component that performs database CRUD operations |
| UCID | Acronym | Use Case ID — Identifies the use case in the BP framework |
| SYSID | Field constant | "SYSID" — System ID field key |
