# Business Logic — JKKSvkeiShosaCC.editMapShosaOkHNet() [427 LOC]

| Field | Value |
|-------|-------|
| Fully Qualified Name | `com.fujitsu.futurity.bp.custom.common.JKKSvkeiShosaCC` |
| Layer | CC/Common Component — shared business logic controller |
| Module | `common` (Package: `com.fujitsu.futurity.bp.custom.common`) |

## 1. Role

### JKKSvkeiShosaCC.editMapShosaOkHNet()

This method performs mapping processing for **eo Hikari Net (eo光ネット) service contracts at the verification-OK stage**. It is a central routing and dispatch component in Fujitsu's telecom order-fulfillment system, responsible for transforming pre-queried result data into mapped message templates that can be passed to downstream service components or screens.

The method handles **seven distinct service categories**: (1) Service Contract (eo Hikari Net), (2) Service Detail Contract (eo Hikari Net), (3) Option Service Contract (ISP), (4) Sub-Option Service Contract (ISP), (5) Discounted Contract (割賦契約), (6) Device Option Service (機器オプションサービス), and (7) Construction Discount Contract (工事費割賦契約). Each category is processed through a dedicated mapper and common edit method, with category-specific conditional logic.

It implements the **routing/dispatch pattern** based on the `canCncSvcKei` (connection service type) flag: when `canCncSvcKei` is `false`, the method runs full verification S-IF processing (verification and pre-completion checks); when `true`, it skips the verification S-IF and runs only the completion S-IF (S-IF completion service calls), as noted in the Japanese comment "完了まで進む場合、照査S-IFは実行せず照査完了S-IFを実行するため" (When proceeding to completion, do not execute verification S-IF — instead execute the verification-completion S-IF).

For Option Service Contracts (ISP), it performs **service-type classification** to extract specific identifiers for email options (B001) and My Home Page options (B002), which are later fed into AxMRenkei (linked data) mapping. It also handles **operation transfer differentiation** (異同区分) — when the option service is being transferred ("option inheritance"), it uses the current operation transfer code instead of the default.

The method also processes **device option services** with a filter: only devices where `kkop_svc_cd = "G01"` (Roku function / 楽天機能) AND `kkop_svc_kei_stat = "010"` (status: received) are mapped, ensuring only functional, received devices are processed.

For **construction discount contracts**, it performs a two-step verification: first querying the list view (EKK3131B010), then performing agreement verification (EKK3131A010) only for contracts in the "non-discounted" state (`KAP_KEI_STAT_UK_ZM = "010"`), followed by agreement mapping (EKK3131C030).

Finally, it populates **linked data (AxMRenkeiData)** with three data classification types: authentication ID information, POP ID information, and WEB ID information — using `JKKBpCommon.putAxMRenkeiDataKbn` for each classification.

## 2. Processing Pattern (Detailed Business Logic)

```mermaid
flowchart TD
    START(["editMapShosaOkHNet"])
    START --> INIT["Initialize: create rsltShosaMap, extract work arrays from rsltShokai"]
    INIT --> INIT2["Create svcKeiUcwkNo, opSvcKeiNoB001, opSvcKeiNoB002 lists"]
    INIT2 --> HNET_CHECK["workEKK0091A010Array != null?"]
    HNET_CHECK -- Yes --> HNET_LOOP["Loop: Service Contract eo Hikari Net data"]
    HNET_CHECK -- No --> SKIP_HNET["Skip HNet mapping"]
    HNET_LOOP --> HNET_EDIT["shosaOkMapper.editInMsgEKK0091C010 with malwareFlg"]
    HNET_EDIT --> HNET_CMN["editInMsgCmn"]
    HNET_CMN --> HNET_ADD["Add result to wkMapArray"]
    HNET_ADD --> HNET_LOOP
    HNET_LOOP --> HNET_PUT["rsltShosaMap.put MAP_KEY_EKK0091C010"]
    SKIP_HNET --> HNET_PUT
    HNET_PUT --> CANC_CHECK["canCncSvcKei false?"]
    CANC_CHECK -- true --> NOT_CNC["Process: Full verification and completion S-IF"]
    CANC_CHECK -- false --> CNC["Process: Skip verification, run completion S-IF only"]
    NOT_CNC --> EKK0171["Service Detail Contract eo Hikari Net verification"]
    EKK0171 --> EKK0171_LOOP["Loop: getWorkData, editInMsgEKK0171C010, editInMsgCmn"]
    EKK0171_LOOP --> EKK0171_ADD["Add svcKeiUcwkNo, store result"]
    EKK0171_ADD --> EKK0171_PUT["rsltShosaMap.put MAP_KEY_EKK0171C010"]
    EKK0171_PUT --> EKK0361["Option Service Contract ISP verification"]
    EKK0361 --> EKK0361_LOOP["Loop: editInMsgEKK0361C010"]
    EKK0361_LOOP --> EKK0361_IDO["Check IDO_DIV_OP_HIKITUGI"]
    EKK0361_IDO --> EKK0361_TYPE["Determine opSvcKeiNo by op_svc_cd"]
    EKK0361_TYPE --> EKK0361_PUT["rsltShosaMap.put MAP_KEY_EKK0361C010"]
    EKK0361_PUT --> EKK0411["Sub-Option Service Contract ISP verification"]
    EKK0411 --> EKK0411_LOOP["Loop: editInMsgEKK0411C020, editInMsgCmn"]
    EKK0411_LOOP --> EKK0411_PUT["rsltShosaMap.put MAP_KEY_EKK0411C020"]
    EKK0411_PUT --> EKK2811["Device Option Service verification"]
    EKK2811 --> EKK2811_CHECK["kkop_svc_cd equals G01 AND kkop_svc_kei_stat equals 010"]
    EKK2811_CHECK -- Yes --> EKK2811_EDIT["editInMsgEKK2811C030, editInMsgCmn"]
    EKK2811_CHECK -- No --> EKK2811_SKIP["Skip this device"]
    EKK2811_EDIT --> EKK2811_PUT["rsltShosaMap.put MAP_KEY_EKK2811C030"]
    EKK2811_PUT --> EKK3131["Construction Discount Contract verification"]
    EKK3131 --> EKK3131_PRG["Get prcGrpCd from EKK0081A010"]
    EKK3131_PRG --> EKK3131_PRG_CHECK["prcGrpCd equals HOME or MEZON?"]
    EKK3131_PRG_CHECK -- Yes --> EKK3131_HNET["Process EKK0251B003 service detail list"]
    EKK3131_PRG_CHECK -- No --> EKK3131_SKIP["Skip"]
    EKK3131_HNET --> EKK3131_ED["Get svcKeiKaisenUcwkNo"]
    EKK3131_ED --> EKK3131_RUN["scCall.run EKK3131B010 list verification"]
    EKK3131_RUN --> EKK3131_KAP_CHECK["kap_kei_stat equals KAP_KEI_STAT_UK_ZM"]
    EKK3131_KAP_CHECK -- Yes --> EKK3131_CONTRACT["Run EKK3131A010 search and EKK3131C030 agreement verification"]
    EKK3131_KAP_CHECK -- No --> EKK3131_END["End discount contract block"]
    EKK3131_CONTRACT --> EKK3131_PUT["rsltShosaMap.put MAP_KEY_EKK3131C030"]
    EKK3131_PUT --> EKK2541_END["Process discounted contract verification EKK2541C030"]
    EKK2541_END --> AXM_PUT_END["Put AxMRenkeiDataKbn for NINSHO_ID, POPID, WEBID"]
    AXM_PUT_END --> RETURN_NOCNC["Return rsltShosaMap"]
    CNC --> CNC_EKK0091["Service Contract eo Hikari Net completion SC"]
    CNC_EKK0091 --> CNC_EKK0091_EDIT["JKKSvkeiShosaCncMapper.editInMsgEKK0091C020"]
    CNC_EKK0091_EDIT --> CNC_PUT0091["rsltShosaMap.put MAP_KEY_EKK0091C020"]
    CNC_PUT0091 --> CNC_EKK0171["Service Detail Contract eo Hikari Net verification plus completion SC"]
    CNC_EKK0171 --> CNC_EKK0171_EDIT["JKKSvkeiShosaCncMapper.editInMsgEKK0171C030"]
    CNC_EKK0171_EDIT --> CNC_PUT0171["rsltShosaMap.put MAP_KEY_EKK0171C030, collect svcKeiUcwkNo"]
    CNC_PUT0171 --> CNC_EKK0361["Option Service Contract ISP verification plus completion SC"]
    CNC_EKK0361 --> CNC_EKK0361_EDIT["shosaOkMapper.editInMsgEKK0361C030"]
    CNC_EKK0361_EDIT --> CNC_TYPE["Same op_svc_cd B001 and B002 classification"]
    CNC_TYPE --> CNC_PUT0361["rsltShosaMap.put MAP_KEY_EKK0361C030"]
    CNC_PUT0361 --> CNC_EKK0411["Sub-Option Service Contract ISP verification plus completion SC"]
    CNC_EKK0411 --> CNC_EKK0411_EDIT["shosaOkMapper.editInMsgEKK0411C040, editInMsgCmn"]
    CNC_EKK0411_EDIT --> CNC_PUT0411["rsltShosaMap.put MAP_KEY_EKK0411C040"]
    CNC_PUT0411 --> CNC_EKK2811["Device Option Service verification plus completion"]
    CNC_EKK2811 --> CNC_EKK2811_EDIT["JKKSvkeiShosaCncMapper.editInMsgEKK2811C050"]
    CNC_EKK2811_EDIT --> CNC_PUT2811["rsltShosaMap.put MAP_KEY_EKK2811C050"]
    CNC_PUT2811 --> CNC_EKK2541["Discounted Contract verification"]
    CNC_EKK2541 --> CNC_EKK2541_EDIT["shosaOkMapper.editInMsgEKK2541C030, editInMsgCmn"]
    CNC_EKK2541_EDIT --> CNC_PUT2541["rsltShosaMap.put MAP_KEY_EKK2541C030"]
    CNC_PUT2541 --> AXM_PUT_END2["Put AxMRenkeiDataKbn for NINSHO_ID, POPID, WEBID"]
    AXM_PUT_END2 --> RETURN_CNC["Return rsltShosaMap"]
```

**Key Constant Values Resolved:**
- `IDO_DIV_OP_HIKITUGI = "00003"` — Option inheritance transfer code (異同区分: option service being transferred)
- `PRC_GRP_CD_HOME = "02"` — Home type pricing group code
- `PRC_GRP_CD_MEZON = "03"` — Maison type pricing group code
- `KAP_KEI_STAT_UK_ZM = "010"` — Contract status: non-discounted (契約ステータス: 非割賦)
- `G01` — Device service code for Roku function (機器サービスコード: 楽天)
- `B001` — Email option service type (メールオプション)
- `B002` — My Home Page option service type (Myホームページオプション)
- `010` — Service contract status: received (契約ステータス: 受付済み)

## 3. Parameter Analysis

| No | Parameter Name | Type | Business Description |
|----|---------------|------|---------------------|
| 1 | `handle` | `SessionHandle` | Session manager handle carrying session context and state for the current business transaction. Used to access session-scoped resources. |
| 2 | `param` | `IRequestParameterReadWrite` | Request parameter object containing model groups and control maps. Carries input data for verification processing and serves as the output container for mapped results and linked data (AxMRenkeiData). |
| 3 | `userDataIndex` | `int` | Index within the param object identifying which business data record to process. Allows the method to operate on specific user records within multi-record requests. |
| 4 | `rsltShokai` | `HashMap<String, Object>` | Pre-queried result data from unique search (一意照会) and list search (一覧照会). Contains arrays for all seven service contract types, keyed by MAP_KEY constants. This is the primary data source for the method. |
| 5 | `idoDiv` | `String` | Transfer/differentiation classification code (異同区分). Indicates the type of operation being performed (e.g., new registration, modification, cancellation). Used in all mapper calls to determine processing behavior. |
| 6 | `canCncSvcKei` | `boolean` | Connection service type flag (接続サービス種別フラグ). When `false`, full verification S-IF processing is executed (verification + pre-completion checks). When `true`, only the completion S-IF is executed (verification is skipped because the process has already advanced past verification). |
| 7 | `malwareFlg` | `String` | Malware flag added in ANK-3834. Passed to the service contract (EKK0091C010) mapper, likely controlling malware-related screening logic during verification. |

**Instance Fields / External State Read:**
- `shosaOkMapper` — Verifier mapper instance used for mapping verification message templates (e.g., `editInMsgEKK0091C010`).
- `shokaiMapper` — Inquiry/lookup mapper instance used for list search and inquiry operations (e.g., `editInMsgEKK3131B010`).
- `currentSysid` — Current system ID used as a tag for linked data entries.
- Static constants: `MAP_KEY_EKK*` (map keys for extracting result data), `PRC_GRP_CD_HOME`, `PRC_GRP_CD_MEZON`, `IDO_DIV_OP_HIKITUGI`.

## 4. CRUD Operations / Called Services

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

| CRUD | SC / CBS | SC Code | Entity / DB | Operation Description |
|------|----------|---------|-------------|----------------------|
| R | `getWorkData` | (local) | — | Extracts CAANMsg array from HashMap work data by CBS message list key |
| R | `getWorkParentData` | (local) | — | Extracts parent-level CAANMsg array from rsltShokai map for EKK0081A010 |
| R | `getOpSvcKeiIdoDiv` | (local) | — | Retrieves the current operation transfer classification for an option service |
| R | `getValuableData` | (local) | — | Extracts valuable data from rsltShokai map by key, message list, and field name |
| U | `shosaOkMapper.editInMsgEKK0091C010` | EKK0091A010SC | KK_T_OPSVKEI_SVC | Maps verification message template for Service Contract (eo Hikari Net) |
| U | `shosaOkMapper.editInMsgEKK0171C010` | EKK0171A010SC | KK_T_OPSVKEI_DETAIL_SVC | Maps verification message template for Service Detail Contract (eo Hikari Net) |
| U | `shosaOkMapper.editInMsgEKK0361C010` | EKK0361A010SC | KK_T_OPSVKEI_OPTION_SVC | Maps verification message template for Option Service Contract (ISP) |
| U | `shosaOkMapper.editInMsgEKK0411C020` | EKK0411A010SC | KK_T_OPSVKEI_SUB_OPTION_SVC | Maps verification message template for Sub-Option Service Contract (ISP) |
| U | `shosaOkMapper.editInMsgEKK2811C030` | EKK2811A010SC | KK_T_OPSVKEI_DEVICE_OPT | Maps verification message template for Device Option Service (Roku function only) |
| R | `shokaiMapper.editInMsgEKK3131B010` | EKK3131B010CBS | KK_T_KOJIHI_KAP_KEI | Invokes construction discount contract list search S-IF |
| U | `scCall.run` | EKK3131B010 | — | Executes the Service Component for construction discount list verification |
| R | `shokaiMapper.editInMsgEKK3131A010` | EKK3131A010CBS | KK_T_KOJIHI_KAP_KEI | Invokes construction discount contract agreement search S-IF |
| U | `scCall.run` | EKK3131A010 | — | Executes the Service Component for construction discount agreement search |
| U | `shosaOkMapper.editInMsgEKK3131C030` | EKK3131C030 | KK_T_KOJIHI_KAP_KEI | Maps agreement result for construction discount contract |
| U | `shosaOkMapper.editInMsgEKK2541C030` | EKK2541A010SC | KK_T_DISCOUNTED_CONTRACT | Maps verification message template for Discounted Contract |
| U | `JKKSvkeiShosaCncMapper.editInMsgEKK0091C020` | EKK0091C020CBS | — | Completion SC mapping for Service Contract (eo Hikari Net) |
| U | `JKKSvkeiShosaCncMapper.editInMsgEKK0171C030` | EKK0171C030CBS | — | Completion SC mapping for Service Detail Contract (eo Hikari Net) |
| U | `shosaOkMapper.editInMsgEKK0361C030` | EKK0361C030CBS | — | Completion SC mapping for Option Service Contract (ISP) |
| U | `shosaOkMapper.editInMsgEKK0411C040` | EKK0411C040CBS | — | Completion SC mapping for Sub-Option Service Contract (ISP) |
| U | `JKKSvkeiShosaCncMapper.editInMsgEKK2811C050` | EKK2811C050CBS | — | Completion SC mapping for Device Option Service |
| U | `editInMsgCmn` | (local) | — | Common message template editor applied after every mapper call to standardize the result |
| U | `JKKBpCommon.putAxMRenkeiDataKbn` | — | — | Writes linked data classification to SJISHO_MAP for authentication IDs, POP IDs, and WEB IDs |
| U | `JKKAddSjishoCtrl.putAxMRenkeiDataKbn` | — | — | Delegates linked data writing to the addition inquiry management controller |
| U | `shosaOkMapper.editResultRPEKK3131B010` | EKK3131B010CBS | — | Processes and sets result RPE for construction discount list verification |
| U | `shosaOkMapper.editResultRPEKK3131A010` | EKK3131A010CBS | — | Processes and sets result RPE for construction discount agreement search |

## 5. Dependency Trace

| # | Caller (Screen/Batch) | Call Chain (Full Path to this Method) | Terminal (SC / CRUD / Entity) |
|---|----------------------|--------------------------------------|-------------------------------|
| 1 | CBS: `JKKSvkeiShosaCC.runSvkeiShosa` | `runSvkeiShosa` -> `editMapShosaOkHNet` | `editInMsgEKK0091C010 [U] KK_T_OPSVKEI_SVC`, `editInMsgEKK0171C010 [U] KK_T_OPSVKEI_DETAIL_SVC`, `editInMsgEKK0361C010 [U] KK_T_OPSVKEI_OPTION_SVC`, `editInMsgEKK0411C020 [U] KK_T_OPSVKEI_SUB_OPTION_SVC`, `editInMsgEKK2541C030 [U] KK_T_DISCOUNTED_CONTRACT`, `editInMsgEKK2811C030 [U] KK_T_OPSVKEI_DEVICE_OPT`, `putAxMRenkeiDataKbn [U] AxMRenkeiData` |

**Terminal operations from this method:** `putAxMRenkeiDataKbn` [-], `editInMsgCmn` [U], `editInMsgEKK2541C030` [U], `getWorkData` [R], `editInMsgEKK2811C030` [U].

The method is called directly by `JKKSvkeiShosaCC.runSvkeiShosa()`, which is a CBS (Center Business Service) within the same class. The call chain originates from the verification-screen operation layer and flows through the main service order processing CBS into this mapping method. The method itself does not trace back to any screen or batch entry point within 8 hops beyond this direct caller.

## 6. Per-Branch Detail Blocks

**Block 1** — INITIALIZATION (L8464)

> Initializes all local variables, creates work arrays for extracting result data, and prepares tracking lists.

| # | Type | Code |
|---|------|------|
| 1 | SET | `scCall = new ServiceComponentRequestInvoker()` |
| 2 | SET | `rsltShosaMap = new HashMap()` |
| 3 | SET | `rslt = null` |
| 4 | SET | `workEKK0091A010Array = null` // Service Contract<eo Hikari Net> agreement list |
| 5 | SET | `workEKK0171A010Array = null` // Service Detail Contract<eo Hikari Net> agreement list |
| 6 | SET | `workEKK0361A010Array = null` // Option Service Contract<ISP> agreement list |
| 7 | SET | `workEKK0411A010Array = null` // Sub-Option Service Contract<ISP> agreement list |
| 8 | SET | `workEKK2541A010Array = null` // Discounted Contract agreement list |
| 9 | SET | `workEKK2811A010Array = null` // Device Option Service agreement list |
| 10 | SET | `workEKK0251B003Array = null` // Service Contract detail list view |
| 11 | SET | `svcKeiUcwkNo = new ArrayList<String>()` |
| 12 | SET | `opSvcKeiNoB001 = new ArrayList<String>()` |
| 13 | SET | `opSvcKeiNoB002 = new ArrayList<String>()` |

**Block 2** — RESULT DATA EXTRACTION (L8495)

> Extracts work arrays from the `rsltShokai` result map using MAP_KEY constants.

| # | Type | Code |
|---|------|------|
| 1 | SET | `workEKK0091A010Array = (ArrayList)rsltShokai.get(MAP_KEY_EKK0091A010)` |
| 2 | SET | `workEKK0171A010Array = (ArrayList)rsltShokai.get(MAP_KEY_EKK0171A010)` |
| 3 | SET | `workEKK0361A010Array = (ArrayList)rsltShokai.get(MAP_KEY_EKK0361A010)` |
| 4 | SET | `workEKK0411A010Array = (ArrayList)rsltShokai.get(MAP_KEY_EKK0411A010)` |
| 5 | SET | `workEKK2541A010Array = (ArrayList)rsltShokai.get(MAP_KEY_EKK2541A010)` |
| 6 | SET | `workEKK2811A010Array = (ArrayList)rsltShokai.get(MAP_KEY_EKK2811A010)` |
| 7 | SET | `workEKK0251B003Array = (ArrayList)rsltShokai.get(MAP_KEY_EKK0251B003)` |

**Block 3** — SERVICE CONTRACT (eo Hikari Net) MAPPING (L8516)

> Maps the service contract data for eo Hikari Net. Always executed regardless of `canCncSvcKei`. Uses the `malwareFlg` parameter (added in ANK-3834).

| # | Type | Code |
|---|------|------|
| 1 | SET | `wkMapArray = new ArrayList()` |
| 2 | IF | `workEKK0091A010Array != null` |

  **Block 3.1** — FOR LOOP (L8519)

  | # | Type | Code |
  |---|------|------|
  | 1 | SET | `wkTenplates = getWorkData(EKK0091A010CBSMsg.EKK0091A010CBSMSG1LIST, ...)` |
  | 2 | FOR | `j` over `wkTenplates` |
  | 3 | SET | `childTemplate = wkTenplates[j]` |
  | 4 | CALL | `wkCaanMsgList = shosaOkMapper.editInMsgEKK0091C010(param, childTemplate, idoDiv, malwareFlg)` |
  | 5 | CALL | `rslt = editInMsgCmn(param, wkCaanMsgList.get(0))` |
  | 6 | EXEC | `wkMapArray.add(rslt)` |

| # | Type | Code |
|---|------|------|
| 8 | SET | `rsltShosaMap.put(MAP_KEY_EKK0091C010, wkMapArray)` |

**Block 4** — CANC SVC KEI CONDITIONAL BRANCH (L8544)

> The main branching point. When `canCncSvcKei` is `false` (NOT connection-complete), full verification processing is executed. When `true`, only completion SC processing runs.

| # | Type | Code |
|---|------|------|
| 1 | IF | `!canCncSvcKei` (completed? No) |

**Block 4.A** — Service Detail Contract (eo Hikari Net) Verification (L8549)

> Maps the service detail contract data for eo Hikari Net. Collects `svcKeiUcwkNo` for later AxMRenkeiData mapping.

| # | Type | Code |
|---|------|------|
| 1 | SET | `wkMapArray = new ArrayList()` |
| 2 | IF | `workEKK0171A010Array != null` |

  **Block 4.A.1** — FOR LOOP (L8553)

  | # | Type | Code |
  |---|------|------|
  | 1 | SET | `wkTenplates = getWorkData(EKK0171A010CBSMsg.EKK0171A010CBSMSG1LIST, ...)` |
  | 2 | FOR | `j` over `wkTenplates` |
  | 3 | SET | `childTemplate = wkTenplates[j]` |
  | 4 | CALL | `wkCaanMsgList = shosaOkMapper.editInMsgEKK0171C010(param, childTemplate, idoDiv)` |
  | 5 | CALL | `rslt = editInMsgCmn(param, wkCaanMsgList.get(0))` |
  | 6 | EXEC | `wkMapArray.add(rslt)` |
  | 7 | EXEC | `svcKeiUcwkNo.add(childTemplate.getString(EKK0171A010CBSMsg1List.SVC_KEI_UCWK_NO))` // Collect service detail work number |

| # | Type | Code |
|---|------|------|
| 8 | SET | `rsltShosaMap.put(MAP_KEY_EKK0171C010, wkMapArray)` |

**Block 4.B** — Option Service Contract (ISP) Verification (L8575)

> Maps the option service contract data for ISP. Includes special handling for operation transfer differentiation and service-type classification.

| # | Type | Code |
|---|------|------|
| 1 | SET | `wkMapArray = new ArrayList()` |
| 2 | IF | `workEKK0361A010Array != null` |

  **Block 4.B.1** — FOR LOOP (L8578)

  | # | Type | Code |
  |---|------|------|
  | 1 | SET | `wkTenplates = getWorkData(EKK0361A010CBSMsg.EKK0361A010CBSMSG1LIST, ...)` |
  | 2 | FOR | `j` over `wkTenplates` |
  | 3 | SET | `childTemplate = wkTenplates[j]` |
  | 4 | CALL | `currentIdoDiv = getOpSvcKeiIdoDiv(handle, param, childTemplate.getString(EKK0361A010CBSMsg1List.OP_SVC_KEI_NO))` // Get option service transfer classification |
  | 5 | SET | `op_idoDiv = idoDiv` |
  | 6 | IF | `IDO_DIV_OP_HIKITUGI.equals(currentIdoDiv)` [IDO_DIV_OP_HIKITUGI = "00003"] (Option inheritance?) |

    **Block 4.B.1.a** — INHERITANCE OVERRIDE (L8583)

    | # | Type | Code |
    |---|------|------|
    | 1 | SET | `op_idoDiv = currentIdoDiv` // Use current transfer classification for option inheritance |

  | # | Type | Code |
  |---|------|------|
  | 8 | CALL | `wkCaanMsgList = shosaOkMapper.editInMsgEKK0361C010(param, childTemplate, op_idoDiv)` |
  | 9 | CALL | `rslt = editInMsgCmn(param, wkCaanMsgList.get(0))` |
  | 10 | EXEC | `wkMapArray.add(rslt)` |
  | 11 | CALL | `op_svc_cd = getValuableData(rsltShokai, MAP_KEY_EKK0351B002, ...)` // Get option service type code |
  | 12 | IF | `"B001".equals(op_svc_cd)` [Email Option?] |

    **Block 4.B.1.b** — EMAIL OPTION COLLECTION (L8593)

    | # | Type | Code |
    |---|------|------|
    | 1 | EXEC | `opSvcKeiNoB001.add(childTemplate.getString(EKK0361A010CBSMsg1List.OP_SVC_KEI_NO))` // Collect for AxMRenkeiData |

  | # | Type | Code |
  |---|------|------|
  | 13 | ELSE-IF | `"B002".equals(op_svc_cd)` [My Home Page Option?] |

    **Block 4.B.1.c** — MY HOME PAGE OPTION COLLECTION (L8597)

    | # | Type | Code |
    |---|------|------|
    | 1 | EXEC | `opSvcKeiNoB002.add(childTemplate.getString(EKK0361A010CBSMsg1List.OP_SVC_KEI_NO))` // Collect for AxMRenkeiData |

| # | Type | Code |
|---|------|------|
| 16 | SET | `rsltShosaMap.put(MAP_KEY_EKK0361C010, wkMapArray)` |

**Block 4.C** — Sub-Option Service Contract (ISP) Verification (L8606)

> Maps the sub-option service contract data for ISP.

| # | Type | Code |
|---|------|------|
| 1 | SET | `wkMapArray = new ArrayList()` |
| 2 | IF | `workEKK0411A010Array != null` |

  **Block 4.C.1** — FOR LOOP (L8609)

  | # | Type | Code |
  |---|------|------|
  | 1 | SET | `wkTenplates = getWorkData(EKK0411A010CBSMsg.EKK0411A010CBSMSG1LIST, ...)` |
  | 2 | FOR | `j` over `wkTenplates` (with null check) |
  | 3 | SET | `childTemplate = wkTenplates[j]` |
  | 4 | CALL | `wkCaanMsgList = shosaOkMapper.editInMsgEKK0411C020(param, childTemplate, idoDiv)` |
  | 5 | CALL | `rslt = editInMsgCmn(param, wkCaanMsgList.get(0))` |
  | 6 | EXEC | `wkMapArray.add(rslt)` |

| # | Type | Code |
|---|------|------|
| 8 | SET | `rsltShosaMap.put(MAP_KEY_EKK0411C020, wkMapArray)` |

**Block 4.D** — Device Option Service Verification (L8622)

> Maps device option service verification. Filtered to only Roku function (G01) with received status (010).

| # | Type | Code |
|---|------|------|
| 1 | SET | `wkMapArray = new ArrayList()` |
| 2 | IF | `workEKK2811A010Array != null` |

  **Block 4.D.1** — FOR LOOP (L8625)

  | # | Type | Code |
  |---|------|------|
  | 1 | SET | `wkTemplates = getWorkData(EKK2811A010CBSMsg.EKK2811A010CBSMSG1LIST, ...)` |
  | 2 | FOR | `j` over `wkTemplates` (with null check) |
  | 3 | SET | `childTemplate = wkTemplates[j]` |
  | 4 | SET | `kkop_svc_cd = childTemplate.getString(EKK2811A010CBSMsg1List.KKOP_SVC_CD)` |
  | 5 | SET | `kkop_svc_kei_stat = childTemplate.getString(EKK2811A010CBSMsg1List.KKOP_SVC_KEI_STAT)` |
  | 6 | IF | `"G01".equals(kkop_svc_cd)` [Roku function] AND `"010".equals(kkop_svc_kei_stat)` [Received status] |

    **Block 4.D.1.a** — ROKU DEVICE MAPPING (L8633)

    > Only Roku function devices with received status are processed.

    | # | Type | Code |
    |---|------|------|
    | 1 | CALL | `wkCaanMsgList = shosaOkMapper.editInMsgEKK2811C030(param, childTemplate, idoDiv)` |
    | 2 | CALL | `rslt = editInMsgCmn(param, wkCaanMsgList.get(0))` |
    | 3 | EXEC | `wkMapArray.add(rslt)` |

| # | Type | Code |
|---|------|------|
| 8 | SET | `rsltShosaMap.put(MAP_KEY_EKK2811C030, wkMapArray)` |

**Block 4.E** — Construction Discount Contract Verification (L8644)

> For Home (02) and Maison (03) pricing groups, processes construction discount contracts. Uses `ServiceComponentRequestInvoker` to run SC calls.

| # | Type | Code |
|---|------|------|
| 1 | SET | `wkMapArray = new ArrayList()` |
| 2 | SET | `workEKK0081A010 = getWorkParentData(EKK0081A010CBSMsg.EKK0081A010CBSMSG1LIST, rsltShokai, MAP_KEY_EKK0081A010)` |
| 3 | SET | `prcGrpCd = workEKK0081A010[0].getString(EKK0081A010CBSMsg1List.PRC_GRP_CD)` |
| 4 | IF | `prcGrpCd.equals(PRC_GRP_CD_HOME)` [02] OR `prcGrpCd.equals(PRC_GRP_CD_MEZON)` [03] |

  **Block 4.E.1** — Service Detail List Processing (L8653)

  | # | Type | Code |
  |---|------|------|
  | 1 | FOR | `i` over `workEKK0081A010` |
  | 2 | SET | `wkTemplates = getWorkData(EKK0251B003CBSMsg.EKK0251B003CBSMSG1LIST, ...)` |
  | 3 | FOR | `j` over `wkTemplates` (with null check) |
  | 4 | SET | `svcKeiKaisenUcwkNo = childTemplate.getString(EKK0251B003CBSMsg1List.SVC_KEI_KAISEN_UCWK_NO)` |

  | # | Type | Code |
  |---|------|------|
  | 5 | IF | `svcKeiKaisenUcwkNo != null AND !"".equals(svcKeiKaisenUcwkNo)` |

    **Block 4.E.1.a** — EKK3131B010 List Search (L8668)

    | # | Type | Code |
    |---|------|------|
    | 1 | CALL | `inMsgEKK3131B010List = shokaiMapper.editInMsgEKK3131B010(param, userDataIndex, svcKeiKaisenUcwkNo, "1")` |
    | 2 | CALL | `inMsgEKK3131B010Map = editInMsgCmn(param, inMsgEKK3131B010List.get(0))` |
    | 3 | CALL | `rsltEKK3131B010 = scCall.run(inMsgEKK3131B010Map, handle)` |
    | 4 | CALL | `shosaOkMapper.editResultRPEKK3131B010(rsltEKK3131B010, param, userDataIndex)` |
    | 5 | SET | `workEKK3131B010 = getWorkData(EKK3131B010CBSMsg.EKK3131B010CBSMSG1LIST, rsltEKK3131B010)` |

    | # | Type | Code |
    |---|------|------|
    | 6 | FOR | `i` over `workEKK3131B010` |
    | 7 | SET | `childTemplate = workEKK3131B010[i]` |
    | 8 | SET | `kojihi_kap_kei_no = childTemplate.getString(EKK3131B010CBSMsg1List.KOJIHI_KAP_KEI_NO)` |
    | 9 | SET | `kap_kei_stat = childTemplate.getString(EKK3131B010CBSMsg1List.KAP_KEI_STAT)` |
    | 10 | IF | `kap_kei_stat.equals(JKKModelConst.KAP_KEI_STAT_UK_ZM)` [010 — non-discounted status] |

      **Block 4.E.1.a.i** — Agreement Search + Mapping (L8677)

      | # | Type | Code |
      |---|------|------|
      | 1 | CALL | `inMsgEKK3131A010List = shokaiMapper.editInMsgEKK3131A010(param, userDataIndex, kojihi_kap_kei_no, "2")` |
      | 2 | CALL | `inMsgEKK3131A010Map = editInMsgCmn(param, inMsgEKK3131A010List.get(0))` |
      | 3 | CALL | `rsltEKK3131A010 = scCall.run(inMsgEKK3131A010Map, handle)` |
      | 4 | CALL | `shosaOkMapper.editResultRPEKK3131A010(rsltEKK3131A010, param, userDataIndex)` |
      | 5 | SET | `workEKK3131A010 = getWorkData(EKK3131A010CBSMsg.EKK3131A010CBSMSG1LIST, rsltEKK3131A010)` |
      | 6 | CALL | `rslt = editInMsgCmn(param, inMsgEKK3131A010List.get(0))` |
      | 7 | EXEC | `wkMapArray.add(rslt)` |
      | 8 | EXEC | `rsltShokai.put(MAP_KEY_EKK3131A010, wkMapArray)` |
      | 9 | IF | `workEKK3131A010 != null` |

        **Block 4.E.1.a.i.A** — Extract Agreement Data (L8688)

        | # | Type | Code |
        |---|------|------|
        | 1 | SET | `kojihikapkeino = workEKK3131A010[0].getString(EKK3131A010CBSMsg1List.KOJIHI_KAP_KEI_NO)` |
        | 2 | SET | `upddtmbf = workEKK3131A010[0].getString(EKK3131A010CBSMsg1List.UPD_DTM)` |

      | # | Type | Code |
      |---|------|------|
      | 10 | CALL | `wkCaanMsgList = shosaOkMapper.editInMsgEKK3131C030(param, kojihikapkeino, upddtmbf)` |
      | 11 | CALL | `rslt = editInMsgCmn(param, wkCaanMsgList.get(0))` |
      | 12 | EXEC | `wkMapArray.add(rslt)` |

| # | Type | Code |
|---|------|------|
| 14 | SET | `rsltShosaMap.put(MAP_KEY_EKK3131C030, wkMapArray)` |

**Block 4.F** — Discounted Contract Verification (L8806, outside the canCncSvcKei branch)

> The discounted contract (割賦契約) verification runs regardless of `canCncSvcKei`.

| # | Type | Code |
|---|------|------|
| 1 | SET | `wkMapArray = new ArrayList()` |
| 2 | IF | `workEKK2541A010Array != null` |

  **Block 4.F.1** — FOR LOOP (L8809)

  | # | Type | Code |
  |---|------|------|
  | 1 | SET | `wkTenplates = getWorkData(EKK2541A010CBSMsg.EKK2541A010CBSMSG1LIST, ...)` |
  | 2 | FOR | `j` over `wkTenplates` |
  | 3 | SET | `childTemplate = wkTenplates[j]` |
  | 4 | CALL | `wkCaanMsgList = shosaOkMapper.editInMsgEKK2541C030(param, childTemplate, idoDiv)` |
  | 5 | CALL | `rslt = editInMsgCmn(param, wkCaanMsgList.get(0))` |
  | 6 | EXEC | `wkMapArray.add(rslt)` |

| # | Type | Code |
|---|------|------|
| 8 | SET | `rsltShosaMap.put(MAP_KEY_EKK2541C030, wkMapArray)` |

**Block 4.G** — COMPLETION SC PROCESSING (CNC path, L8549 alternative branch)

> When `canCncSvcKei` is `true`, only completion SC mappings are executed. This branch processes the same service categories but uses `JKKSvkeiShosaCncMapper` (completion) instead of `shosaOkMapper` (verification).

| # | Type | Code |
|---|------|------|
| 1 | IF | `workEKK0091A010Array != null` |

  **Block 4.G.1** — Service Contract Completion (L8553)

  | # | Type | Code |
  |---|------|------|
  | 1 | FOR | `i` over array |
  | 2 | SET | `wkTemplates = getWorkData(...)` |
  | 3 | FOR | `j` over `wkTemplates` |
  | 4 | CALL | `rslt = JKKSvkeiShosaCncMapper.editInMsgEKK0091C020(param, wkTemplates[j], idoDiv)` |
  | 5 | EXEC | `wkMapArray.add(rslt)` |

| # | Type | Code |
|---|------|------|
| 6 | SET | `rsltShosaMap.put(MAP_KEY_EKK0091C020, wkMapArray)` |

**Block 4.G.2** — Service Detail Completion (L8565)

| # | Type | Code |
|---|------|------|
| 1 | FOR | `i` over `workEKK0171A010Array` |
| 2 | SET | `wkTemplates = getWorkData(...)` |
| 3 | FOR | `j` over `wkTemplates` |
| 4 | CALL | `rslt = JKKSvkeiShosaCncMapper.editInMsgEKK0171C030(param, wkTemplates[j], idoDiv)` |
| 5 | EXEC | `wkMapArray.add(rslt)` |
| 6 | EXEC | `svcKeiUcwkNo.add(wkTemplates[j].getString(EKK0171A010CBSMsg1List.SVC_KEI_UCWK_NO))` |
| 7 | SET | `rsltShosaMap.put(MAP_KEY_EKK0171C030, wkMapArray)` |

**Block 4.G.3** — Option Service Completion (L8575)

> Same `op_svc_cd` classification logic as Block 4.B.

| # | Type | Code |
|---|------|------|
| 1 | FOR | `i` over `workEKK0361A010Array` |
| 2 | SET | `childTemplate = getWorkData(...)` |
| 3 | CALL | `currentIdoDiv = getOpSvcKeiIdoDiv(...)` |
| 4 | IF | `IDO_DIV_OP_HIKITUGI.equals(currentIdoDiv)` [00003] |

  **Block 4.G.3.a**

  | # | Type | Code |
  |---|------|------|
  | 1 | SET | `op_idoDiv = currentIdoDiv` |

| # | Type | Code |
|---|------|------|
| 6 | CALL | `wkCaanMsgList = shosaOkMapper.editInMsgEKK0361C030(param, childTemplate, op_idoDiv)` |
| 7 | CALL | `rslt = editInMsgCmn(param, wkCaanMsgList.get(0))` |
| 8 | CALL | `op_svc_cd = getValuableData(...)` |
| 9 | IF | `"B001".equals(op_svc_cd)` |

  **Block 4.G.3.b**

  | # | Type | Code |
  |---|------|------|
  | 1 | EXEC | `opSvcKeiNoB001.add(...)` |

| # | Type | Code |
|---|------|------|
| 10 | ELSE-IF | `"B002".equals(op_svc_cd)` |

  **Block 4.G.3.c**

  | # | Type | Code |
  |---|------|------|
  | 1 | EXEC | `opSvcKeiNoB002.add(...)` |

| # | Type | Code |
|---|------|------|
| 12 | SET | `rsltShosaMap.put(MAP_KEY_EKK0361C030, wkMapArray)` |

**Block 4.G.4** — Sub-Option Completion (L8606)

| # | Type | Code |
|---|------|------|
| 1 | FOR | `i` over `workEKK0411A010Array` |
| 2 | CALL | `wkCaanMsgList = shosaOkMapper.editInMsgEKK0411C040(param, childTemplate, idoDiv)` |
| 3 | CALL | `rslt = editInMsgCmn(param, wkCaanMsgList.get(0))` |
| 4 | EXEC | `wkMapArray.add(rslt)` |
| 5 | SET | `rsltShosaMap.put(MAP_KEY_EKK0411C040, wkMapArray)` |

**Block 4.G.5** — Device Option Completion (L8618)

| # | Type | Code |
|---|------|------|
| 1 | FOR | `i` over `workEKK2811A010Array` |
| 2 | CALL | `rslt = JKKSvkeiShosaCncMapper.editInMsgEKK2811C050(param, wkTemplates[j], idoDiv)` |
| 3 | EXEC | `wkMapArray.add(rslt)` |
| 4 | SET | `rsltShosaMap.put(MAP_KEY_EKK2811C050, wkMapArray)` |

**Block 5** — LINKED DATA MAPPING (AxMRenkeiData) (L8824)

> Converts collected ArrayLists to String arrays and writes three types of linked data to the SJISHO_MAP.

| # | Type | Code |
|---|------|------|
| 1 | SET | `uw = svcKeiUcwkNo.toArray(uw)` // Convert service detail numbers |
| 2 | SET | `v1 = opSvcKeiNoB001.toArray(v1)` // Convert Email option numbers |
| 3 | SET | `v2 = opSvcKeiNoB002.toArray(v2)` // Convert My Home Page option numbers |
| 4 | CALL | `JKKBpCommon.putAxMRenkeiDataKbn(param, SJISHO_MAP="KKSV011835CC", JKKAddSjishoConst.RENKEI_DATA_KBN_NINSHO_ID, JKKAddSjishoConst.TRN_KBN_ADD, uw, currentSysid)` // Linked data 05: Authentication ID info |
| 5 | CALL | `JKKBpCommon.putAxMRenkeiDataKbn(param, SJISHO_MAP="KKSV011835CC", JKKAddSjishoConst.RENKEI_DATA_KBN_POPID, JKKAddSjishoConst.TRN_KBN_ADD, v1, currentSysid)` // Linked data 03: POP ID info |
| 6 | CALL | `JKKBpCommon.putAxMRenkeiDataKbn(param, SJISHO_MAP="KKSV011835CC", JKKAddSjishoConst.RENKEI_DATA_KBN_WEBID, JKKAddSjishoConst.TRN_KBN_ADD, v2, currentSysid)` // Linked data 04: WEB ID info |

**Block 6** — RETURN (L8836)

| # | Type | Code |
|---|------|------|
| 1 | RETURN | `return rsltShosaMap` |

## 7. Glossary

| Term | Type | Business Meaning |
|------|------|------------------|
| `editMapShosaOkHNet` | Method | eo Hikari Net verification-OK mapping — maps service contract data after verification passes |
| `canCncSvcKei` | Field | Connection service type flag — determines whether to run full verification or skip to completion-only processing |
| `idoDiv` | Field | Transfer/differentiation classification (異同区分) — indicates the type of service operation (new, modify, cancel, transfer) |
| `malwareFlg` | Field | Malware screening flag — controls malware-related checks during verification (added in ANK-3834) |
| `svcKeiUcwkNo` | Field | Service detail work number (サービス detail 作業番号) — internal tracking ID for service detail line items, collected for linked data mapping |
| `opSvcKeiNoB001` | Field | Option service number for Email option (メールオプション) — collected option service IDs for email type options |
| `opSvcKeiNoB002` | Field | Option service number for My Home Page option (My ホームページオプション) — collected option service IDs for web page type options |
| `prcGrpCd` | Field | Pricing group code (料金グループコード) — classifies service type: 02=Home, 03=Maison, 04=Mansion, 05=eoADSL, etc. |
| `kap_kei_stat` | Field | Contract installment status (契約割賦状態) — 010 = non-discounted/undiscounted (非割賦) |
| `kojihi_kap_kei_no` | Field | Construction discount contract number (工事費割賦契約番号) — ID for construction cost installment agreements |
| `svcKeiKaisenUcwkNo` | Field | Service detail line number (サービス detail 配線作業番号) — number for service detail wiring records |
| `KKOP_SVC_CD` | Field | Kops service code (機器オプションサービスコード) — device option service type code (G01 = Roku function) |
| `KKOP_SVC_KEI_STAT` | Field | Kops service contract status (機器オプションサービス契約ステータス) — contract processing status (010 = received) |
| `OP_SVC_CD` | Field | Option service code (オプションサービスコード) — classifies option type: B001=Email, B002=My Home Page |
| `OP_SVC_KEI_NO` | Field | Option service contract number (オプションサービス契約番号) — unique ID for option service contracts |
| `SVC_KEI_UCWK_NO` | Field | Service detail work number (サービス detail 作業番号) — unique ID for service detail records |
| `IDO_DIV_OP_HIKITUGI` | Constant | Option inheritance transfer code — value "00003", used when an option service is being transferred to a new customer |
| `PRC_GRP_CD_HOME` | Constant | Home type pricing group code — value "02", represents eo Hikari Net Home tariff type |
| `PRC_GRP_CD_MEZON` | Constant | Maison type pricing group code — value "03", represents eo Hikari Net Maison tariff type |
| `KAP_KEI_STAT_UK_ZM` | Constant | Contract installment status: undiscounted — value "010", indicates a contract that has not been discounted |
| SJISHO_MAP | Constant | Inquiry management map key — value "KKSV011835CC", the parameter map key for linked data (連携手数帳データ) |
| RENKEI_DATA_KBN_NINSHO_ID | Constant | Linked data classification: authentication ID (連携手数帳区分 認証ID) — type code for authentication information |
| RENKEI_DATA_KBN_POPID | Constant | Linked data classification: POP ID (連携手数帳区分 POPID) — type code for POP authentication information |
| RENKEI_DATA_KBN_WEBID | Constant | Linked data classification: WEB ID (連携手数帳区分 WEBID) — type code for web authentication information |
| TRN_KBN_ADD | Constant | Transaction type: add (処理区分 追加) — indicates a new linked data entry |
| eo Hikari Net | Business term | Fiber-optic internet service by eo (NTT East) — the primary broadband service product in this system |
| ISP | Business term | Internet Service Provider — option service for internet connectivity |
| Roku (楽天) | Business term | Rakuten TV streaming function — device option service code G01, a set-top box streaming feature |
| 割賦契約 | Business term | Installment/discount contract — construction cost installment payment agreement with discount pricing |
| 異同区分 | Business term | Transfer/differentiation classification — distinguishes between new registration, modification, cancellation, and transfer operations |
| 照査 | Business term | Verification/screening — pre-processing validation step before committing service changes |
| 照査完了 | Business term | Verification-completion — status indicating verification has passed and completion processing can proceed |
| 工事費割賦 | Business term | Construction cost installment — installment payment plan for construction fees |
| SSIF | Acronym | Service Specification Interface Framework — internal service component execution framework |
| S-IF | Acronym | Service Interface — the service component interface for telecom business operations |
| SC | Acronym | Service Component — modular business logic unit in the telecom order-fulfillment system |
| CBS | Acronym | Center Business Service — central business processing service layer |
| CAANMsg | Type | CAAN message object — standardized message/data container used throughout the BPM platform |
| MAP_KEY_EKK* | Constant | Map key constants for extracting result data — prefixed keys identifying data extracted from `rsltShokai` (e.g., `MAP_KEY_EKK0091A010`) |
| JBSbatFUCaseFileRnkData | Type | Batch data holder — container for batch processing result data |
| JBSbatFUMoveNaviData | Type | Batch navigation data — container for batch processing navigation/routing data |
| JBSbatZMAdDataSet | Type | Batch address data set — container for batch processing address data |
| ACSV0001Flow | SC | Account flow processing — account creation/management service component |
| CNSV0036OPOperation | SC | Service operation processing — CNSV0036 option service operation |
| CNSV0037Flow | SC | Service flow processing — CNSV0037 service registration flow |
| CNSV0037OPOperation | SC | CNSV0037 option operation — CNSV0037 option service operation |
| CNSV0038Flow | SC | CNSV0038 service flow — CNSV0038 service processing flow |
| JKKAddSjishoCtrl | Class | Addition inquiry management controller — manages inquiry-related controls for new service additions |
| JKKBpCommon | Class | BP common utility — shared business platform utility class for common operations |
| JKKModelConst | Class | Model constants — shared constant definitions for model-level values |