# Business Logic — JKKSvkeiShosaCC.editMapShosaOkMoba() [230 LOC]

| Field | Value |
|-------|-------|
| Fully Qualified Name | `com.fujitsu.futurity.bp.custom.common.JKKSvkeiShosaCC` |
| Layer | CC/Common Component (Shared cross-component, extends `JKKSvkeiShosaBaseCC`) |
| Module | `common` (Package: `com.fujitsu.futurity.bp.custom.common`) |

## 1. Role

### JKKSvkeiShosaCC.editMapShosaOkMoba()

This method performs **mapping processing for approval results when checking service contracts for eo Mobile** (Japanese: "照査OK時のeoモバイルのマッピング処理" — mapping processing at the time of check OK for eo Mobile). It is invoked during the service contract inspection workflow to transform pre-validated consent data retrieved from the upstream screen into a structured result map suitable for downstream relay/forwarding (連係 — renkei) operations.

The method handles **four distinct service contract categories**, each representing a different layer of the customer's service subscription: (1) the base Service Contract for eo Mobile, (2) Service Contract Details (line items) for eo Mobile, (3) Option Service Contracts (specifically ISP plans), and (4) Sub-Option Service Contracts (additional add-ons on top of ISP). For each category, the method iterates over existing consent records (from the `rsltShokai` resultMap), extracts message templates via `getWorkData`, applies field-level mapping through the `shosaOkMapper` (approved-mapper) to generate input message structures, and then runs common processing via `editInMsgCmn`.

A key distinguishing feature is the **conditional categorization of Option Service Contracts by `op_svc_cd`** (option service detail code): when the option code is `"B001"`, the service contract number is classified as an **Email Option**; when `"B002"`, it is classified as a **My Home Page Option**. These categorized lists are then passed to the relay data classification layer (`putAxMRenkeiDataKbn`) with specific relay data category codes (`RENKEI_DATA_KBN_POPID = "03"` for POPID, `RENKEI_DATA_KBN_WEBID = "04"` for WEBID) to enable downstream authentication/identity forwarding.

The method implements a **batch processing pattern** (sequential independent category handlers) and a **delegation pattern** (delegates template-to-input mapping to `shosaOkMapper` and common processing to `editInMsgCmn`). Its role in the larger system is as a **central assembly hub** in the service contract inspection CBS — it takes raw inspection results, structures them into mapped input maps per contract type, and prepares relay data for forwarding to external systems.

## 2. Processing Pattern (Detailed Business Logic)

```mermaid
flowchart TD
    START(["editMapShosaOkMoba entry"])
    
    START --> INIT["Initialize: rsltShosaMap, wkMapArray, work arrays"]
    
    INIT --> LOAD["Load consent data from rsltShokai: MAP_KEY_EKK0121A010, MAP_KEY_EKK0201A010, MAP_KEY_EKK0361A010, MAP_KEY_EKK0411A010"]
    
    LOAD --> PROC1["Block 1: Service Contract (EKK0121A010) - eo Mobile"]
    
    PROC1 --> CHECK1{"workEKK0121A010Array != null?"}
    
    CHECK1 -->|Yes| LOOP1["For each service contract: getWorkData -> editInMsgEKK0121C010 -> editInMsgCmn"]
    
    LOOP1 --> STORE1["Store result to rsltShosaMap with key MAP_KEY_EKK0121C010"]
    
    CHECK1 -->|No| SKIP1["Skip processing"]
    
    SKIP1 --> PROC2["Block 2: Service Contract Details (EKK0201A010) - eo Mobile"]
    
    STORE1 --> PROC2
    SKIP1 --> PROC2
    
    PROC2 --> CHECK2{"workEKK0201A010Array != null?"}
    
    CHECK2 -->|Yes| LOOP2["For each detail record: getWorkData -> editInMsgEKK0201C010 -> editInMsgCmn"]
    
    LOOP2 --> STORE2["Store result to rsltShosaMap with key MAP_KEY_EKK0201C010"]
    
    CHECK2 -->|No| SKIP2["Skip processing"]
    
    SKIP2 --> PROC3["Block 3: Option Service Contract (EKK0361A010) - ISP"]
    
    STORE2 --> PROC3
    SKIP2 --> PROC3
    
    PROC3 --> CHECK3{"workEKK0361A010Array != null?"}
    
    CHECK3 -->|Yes| LOOP3["For each option contract: getWorkData -> editInMsgEKK0361C010 -> editInMsgCmn"]
    
    LOOP3 --> CAT_B001{"op_svc_cd == B001? (Email option)"}
    
    CAT_B001 -->|Yes| ADD_B001["Add OP_SVC_KEI_NO to opSvcKeiNoB001 list"]
    
    ADD_B001 --> CAT_B002{"op_svc_cd == B002? (My Home Page option)"}
    
    CAT_B001 -->|No| CAT_B002
    
    CAT_B002 -->|Yes| ADD_B002["Add OP_SVC_KEI_NO to opSvcKeiNoB002 list"]
    
    ADD_B002 --> STORE3["Store result to rsltShosaMap with key MAP_KEY_EKK0361C010"]
    
    STORE3 --> PROC4["Block 4: Sub-Option Service Contract (EKK0411A010) - ISP"]
    
    PROC4 --> CHECK4{"workEKK0411A010Array != null?"}
    
    CHECK4 -->|Yes| LOOP4["For each sub-option contract: getWorkData -> editInMsgEKK0411C020 -> editInMsgCmn"]
    
    LOOP4 --> STORE4["Store result to rsltShosaMap with key MAP_KEY_EKK0411C020"]
    
    STORE4 --> RELAY["Block 5: Relay data classification"]
    
    CHECK4 -->|No| RELAY
    
    RELAY --> SET_V1["Convert opSvcKeiNoB001 to String[] v1"]
    
    SET_V1 --> SET_V2["Convert opSvcKeiNoB002 to String[] v2"]
    
    SET_V2 --> PUT_POPID["Call putAxMRenkeiDataKbn: RENKEI_DATA_KBN_POPID = 03 (POPID info)"]
    
    PUT_POPID --> PUT_WEBID["Call putAxMRenkeiDataKbn: RENKEI_DATA_KBN_WEBID = 04 (WEBID info)"]
    
    PUT_WEBID --> RETURN["Return rsltShosaMap"]
```

## 3. Parameter Analysis

| No | Parameter Name | Type | Business Description |
|----|---------------|------|---------------------|
| 1 | `handle` | `SessionHandle` | Database session handle for the current BPM flow context. Provides transaction and session management for the inspection CBS. |
| 2 | `param` | `IRequestParameterReadWrite` | The request parameter object carrying the model group and control map from the screen. Used to write mapped input data and relay information. |
| 3 | `userDataIndex` | `int` | The index within `param` that identifies which business data block to operate on. Selects the active work item in multi-record scenarios. |
| 4 | `rsltShokai` | `HashMap<String, Object>` | The inspection result map populated by upstream screens. Contains arrays of consent records keyed by MAP_KEY constants (e.g., `MAP_KEY_EKK0121A010` for service contracts). This is the **primary data source** for this method. |
| 5 | `idoDiv` | `String` | The difference/similarity classification code. Passed to mapper methods to determine how field mapping should handle changes between the original and current data. Used to differentiate between new, modified, and unchanged records. |

**Instance fields read by this method:**

| Field | Type | Business Description |
|-------|------|---------------------|
| `shosaOkMapper` | `JKKSvkeiShosaShosaOkMapperCC` | Approved-mapper component injected via base class. Handles template-to-input mapping for each service contract type. |
| `currentSysid` | `String` | The current system ID of the customer's line contract, inherited from `JKKSvkeiShosaBaseCC`. Used as a relay data identifier when classifying POPID/WEBID relay data. |

## 4. CRUD Operations / Called Services

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

| CRUD | SC / CBS | SC Code | Entity / DB | Operation Description |
|------|----------|---------|-------------|----------------------|
| R | `getWorkData(EKK0121A010CBSMsg.EKK0121A010CBSMSG1LIST, ...)` | JKKSvkeiShosaCC | - | Extracts message templates from the service contract (eo Mobile) consent record. Returns `CAANMsg[]` arrays for iteration. (Local method, reads from work data) |
| R | `getWorkData(EKK0201A010CBSMsg.EKK0201A010CBSMSG1LIST, ...)` | JKKSvkeiShosaCC | - | Extracts message templates from the service contract detail (eo Mobile) consent record. Returns `CAANMsg[]` arrays for iteration. (Local method, reads from work data) |
| R | `getWorkData(EKK0361A010CBSMsg.EKK0361A010CBSMSG1LIST, ...)` | JKKSvkeiShosaCC | - | Extracts message templates from the option service contract (ISP) consent record. Returns `CAANMsg[]` arrays for iteration. (Local method, reads from work data) |
| R | `getWorkData(EKK0411A010CBSMsg.EKK0411A010CBSMSG1LIST, ...)` | JKKSvkeiShosaCC | - | Extracts message templates from the sub-option service contract (ISP) consent record. Returns `CAANMsg[]` arrays for iteration. (Local method, reads from work data) |
| U | `shosaOkMapper.editInMsgEKK0121C010(param, childTemplate, idoDiv)` | JKKSvkeiShosaShosaOkMapperCC | - | Maps input message structure for service contract (eo Mobile) approval. Generates the input message list from the consent template. |
| U | `shosaOkMapper.editInMsgEKK0201C010(param, childTemplate, idoDiv)` | JKKSvkeiShosaShosaOkMapperCC | - | Maps input message structure for service contract detail (eo Mobile) approval. Generates the input message list from the consent template. |
| U | `shosaOkMapper.editInMsgEKK0361C010(param, childTemplate, idoDiv)` | JKKSvkeiShosaShosaOkMapperCC | - | Maps input message structure for option service contract (ISP) approval. Generates the input message list from the consent template. |
| U | `shosaOkMapper.editInMsgEKK0411C020(param, childTemplate, idoDiv)` | JKKSvkeiShosaShosaOkMapperCC | - | Maps input message structure for sub-option service contract (ISP) approval. Generates the input message list from the consent template. |
| U | `editInMsgCmn(param, wkCaanMsgList.get(0))` | JKKSvkeiShosaCC | - | Applies common field-level processing and validation to a single mapped input message. Produces the final mapping result map. |
| R | `getValuableData(rsltShokai, MAP_KEY_EKK0351B002, ..., OP_SVC_CD, ...)` | JKKSvkeiShosaCC | - | Retrieves the option service detail code (`op_svc_cd`) from the consent data to classify the option type (B001 = Email, B002 = My Home Page). |
| U | `JKKBpCommon.putAxMRenkeiDataKbn(param, SJISHO_MAP, RENKEI_DATA_KBN_POPID, TRN_KBN_ADD, opSvcKeiNoB001, currentSysid)` | JKKBpCommon | - | Classifies and stores POPID (POP authentication ID) relay data under relay data category `"03"`. Prepares email option contract numbers for downstream forwarding. |
| U | `JKKAddSjishoCtrl.putAxMRenkeiDataKbn(param, SJISHO_MAP, RENKEI_DATA_KBN_WEBID, TRN_KBN_ADD, opSvcKeiNoB002, currentSysid)` | JKKAddSjishoCtrl | - | Classifies and stores WEBID relay data under relay data category `"04"`. Prepares My Home Page option contract numbers for downstream forwarding. |
| U | `JKKAddSjishoCtrl.putAxMRenkeiDataKbn(param, SJISHO_MAP, RENKEI_DATA_KBN_POPID, TRN_KBN_ADD, opSvcKeiNoB001, currentSysid)` | JKKAddSjishoCtrl | - | Classifies and stores relay data for POPID under relay data category `"03"` with add transaction code `"01"`. |
| U | `JKKAddSjishoCtrl.putAxMRenkeiDataKbn(param, SJISHO_MAP, RENKEI_DATA_KBN_WEBID, TRN_KBN_ADD, opSvcKeiNoB002, currentSysid)` | JKKAddSjishoCtrl | - | Classifies and stores relay data for WEBID under relay data category `"04"` with add transaction code `"01"`. |

**CRUD classification rationale:**
- This method is a **mapping/transformation method** — it does not directly execute database CRUD (Create/Read/Update/Delete) operations. Instead, it reads pre-retrieved consent data from the `rsltShokai` map and produces mapped input structures.
- The called mapper methods (`editInMsgEKK*`) are **update-type operations** in the sense that they transform input templates into structured output maps destined for downstream CBS calls.
- The `putAxMRenkeiDataKbn` calls are **update operations** on the parameter object, storing relay classification data for forwarding to external systems.

## 5. Dependency Trace

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

No screen/batch entry points found within 8 hops. Direct callers found: 1 methods.
Terminal operations from this method: `putAxMRenkeiDataKbn` [-], `putAxMRenkeiDataKbn` [-], `putAxMRenkeiDataKbn` [-], `toArray` [-], `putAxMRenkeiDataKbn` [-], `putAxMRenkeiDataKbn` [-], `putAxMRenkeiDataKbn` [-], `toArray` [-], `editInMsgCmn` [U], `editInMsgEKK0411C020` [U], `editInMsgEKK0411C020` [U], `editInMsgEKK0411C020` [U], `editInMsgEKK0411C020` [U], `editInMsgEKK0411C020` [U], `getWorkData` [R], `getString` [R], `getString` [R], `getString` [R], `getString` [R], `getString` [R]

| # | Caller (Screen/Batch) | Call Chain (Full Path to this Method) | Terminal (SC / CRUD / Entity) |
|---|----------------------|--------------------------------------|-------------------------------|
| 1 | CBS: JKKSvkeiShosaCC.runSvkeiShosa | `runSvkeiShosa()` -> `editMapShosaOkMoba(handle, param, userDataIndex, rsltShokai, idoDiv)` | `editInMsgEKK0121C010 [U] EKK0121A010 template`, `editInMsgEKK0201C010 [U] EKK0201A010 template`, `editInMsgEKK0361C010 [U] EKK0361A010 template`, `editInMsgEKK0411C020 [U] EKK0411A010 template`, `putAxMRenkeiDataKbn [U] SJISHO_MAP relay data` |

**Call chain details:**
- `JKKSvkeiShosaCC.runSvkeiShosa()` is the entry CBS (Contract Inspection CBS) that orchestrates the full service contract inspection flow. It retrieves consent data into `rsltShokai` and then delegates per-type mapping to `editMapShosaOkMoba()`.
- The method itself is **not directly invoked from any screen** — it is exclusively called from within the CBS orchestration layer, making it an internal processing utility rather than a screen callback.

## 6. Per-Branch Detail Blocks

### Block 1 — [VARIABLES] Initialization and Array Declaration (L9647)

> Creates the result map and initializes working arrays for each service contract category. The work arrays are pre-declared with Japanese documentation comments indicating their business purpose.

| # | Type | Code |
|---|------|------|
| 1 | SET | `rsltShosaMap = new HashMap<String, Object>()` // Initialize the result map to store all mapped outputs |
| 2 | SET | `rslt = null` // Result holder for per-record mapping |
| 3 | SET | `workEKK0121A010Array = null` // Service Contract (eo Mobile) consent data [-> KEY: MAP_KEY_EKK0121A010 = "EKK0121A010"] |
| 4 | SET | `workEKK0201A010Array = null` // Service Contract Details (eo Mobile) consent data [-> KEY: MAP_KEY_EKK0201A010 = "EKK0201A010"] |
| 5 | SET | `workEKK0361A010Array = null` // Option Service Contract (ISP) consent data [-> KEY: MAP_KEY_EKK0361A010 = "EKK0361A010"] |
| 6 | SET | `workEKK0411A010Array = null` // Sub-Option Service Contract (ISP) consent data [-> KEY: MAP_KEY_EKK0411A010 = "EKK0411A010"] |
| 7 | SET | `wkCaanMsgList = null` // Message list holder for CAANMsg processing |
| 8 | SET | `wkMapArray = null` // Temporary result array holder |
| 9 | SET | `opSvcKeiNoB001 = new ArrayList<String>()` // Email option service contract numbers |
| 10 | SET | `opSvcKeiNoB002 = new ArrayList<String>()` // My Home Page option service contract numbers |

### Block 2 — [EXEC] Load Consent Data from rsltShokai (L9672–L9675)

> Retrieves the four service contract category arrays from the pre-populated `rsltShokai` resultMap using typed casts. These arrays contain consent records that were retrieved by the upstream screen.

| # | Type | Code |
|---|------|------|
| 1 | SET | `workEKK0121A010Array = (ArrayList)rsltShokai.get(MAP_KEY_EKK0121A010)` // [-> KEY = "EKK0121A010"] Service Contract (eo Mobile) |
| 2 | SET | `workEKK0201A010Array = (ArrayList)rsltShokai.get(MAP_KEY_EKK0201A010)` // [-> KEY = "EKK0201A010"] Service Contract Details (eo Mobile) |
| 3 | SET | `workEKK0361A010Array = (ArrayList)rsltShokai.get(MAP_KEY_EKK0361A010)` // [-> KEY = "EKK0361A010"] Option Service Contract (ISP) |
| 4 | SET | `workEKK0411A010Array = (ArrayList)rsltShokai.get(MAP_KEY_EKK0411A010)` // [-> KEY = "EKK0411A010"] Sub-Option Service Contract (ISP) |

### Block 3 — [FOR LOOP] Process Service Contract (EKK0121A010) — eo Mobile (L9681–L9694)

> Iterates over each service contract (eo Mobile) consent record. For each record, extracts the CAANMsg templates via `getWorkData`, iterates through child templates, maps input messages via `editInMsgEKK0121C010`, runs common processing, and collects results. The results are stored under key `MAP_KEY_EKK0121C010`.

**Block 3.1 — [IF] Null Guard** `(workEKK0121A010Array != null)` (L9681)

| # | Type | Code |
|---|------|------|
| 1 | EXEC | `wkMapArray = new ArrayList()` // Create fresh result holder |
| 2 | IF | `if (workEKK0121A010Array != null)` // Guard against null consent data |

**Block 3.2 — [FOR LOOP] Outer: Iterate over Service Contracts** `(i < workEKK0121A010Array.size())` (L9684)

| # | Type | Code |
|---|------|------|
| 1 | FOR | `for (int i = 0; i < workEKK0121A010Array.size(); i++)` // Outer loop: each service contract |

**Block 3.3 — [EXEC] Get Templates** (L9686)

| # | Type | Code |
|---|------|------|
| 1 | SET | `wkTenplates = getWorkData(EKK0121A010CBSMsg.EKK0121A010CBSMSG1LIST, (Map)workEKK0121A010Array.get(i))` // Extract CAANMsg templates for this contract |

**Block 3.4 — [FOR LOOP] Inner: Iterate over Templates** `(j < wkTenplates.length)` (L9687)

| # | Type | Code |
|---|------|------|
| 1 | FOR | `for (int j = 0; j < wkTenplates.length; j++)` // Inner loop: each template in the contract |

**Block 3.5 — [EXEC] Process Each Template** (L9689–L9692)

| # | Type | Code |
|---|------|------|
| 1 | SET | `childTemplate = wkTenplates[j]` // Get current template |
| 2 | SET | `wkCaanMsgList = shosaOkMapper.editInMsgEKK0121C010(param, childTemplate, idoDiv)` // [CALL] Map input structure for approval |
| 3 | SET | `rslt = editInMsgCmn(param, wkCaanMsgList.get(0))` // [CALL] Run common processing on first message |
| 4 | EXEC | `wkMapArray.add(rslt)` // Collect mapping result |

**Block 3.6 — [SET] Store Category Results** (L9694)

| # | Type | Code |
|---|------|------|
| 1 | SET | `rsltShosaMap.put(MAP_KEY_EKK0121C010, wkMapArray)` // [-> KEY = "EKK0121C010"] Store for service contract (eo Mobile) |

### Block 4 — [COMMENTED OUT] Historical Block (L9696–L9762)

> This section is fully commented out (from 2012-12-10 deprecation, lot reference: 2ST2-2012-0001328 "progress not yet complete" — 接続済まで進めない). It previously handled contract finalization (締結 — kekketsu) for all four service types. The deprecated C020/C030/C040 suffix mapper methods are no longer called.

### Block 5 — [FOR LOOP] Process Service Contract Details (EKK0201A010) — eo Mobile (L9764–L9782)

> Iterates over each service contract detail (eo Mobile) consent record. Uses `editInMsgEKK0201C010` (approved mapper) for template-to-input mapping. The authentication ID line (`SPOT_LOGIN_SYSID`) is commented out per improvement No. 11 — eo Mobile does not require ID authentication (2013-05-05).

**Block 5.1 — [IF] Null Guard** `(workEKK0201A010Array != null)` (L9764)

| # | Type | Code |
|---|------|------|
| 1 | EXEC | `wkMapArray = new ArrayList()` // Create fresh result holder |
| 2 | IF | `if (workEKK0201A010Array != null)` // Guard against null consent data |

**Block 5.2 — [FOR LOOP] Outer: Iterate over Contract Details** (L9767)

| # | Type | Code |
|---|------|------|
| 1 | FOR | `for (int i = 0; i < workEKK0201A010Array.size(); i++)` // Each service contract detail record |

**Block 5.3 — [EXEC] Get Templates** (L9769)

| # | Type | Code |
|---|------|------|
| 1 | SET | `wkTenplates = getWorkData(EKK0201A010CBSMsg.EKK0201A010CBSMSG1LIST, (Map)workEKK0201A010Array.get(i))` // Extract detail templates |

**Block 5.4 — [FOR LOOP] Inner: Iterate over Detail Templates** (L9770)

| # | Type | Code |
|---|------|------|
| 1 | FOR | `for (int j = 0; j < wkTenplates.length; j++)` // Each template within the detail record |

**Block 5.5 — [EXEC] Process Each Detail Template** (L9772–L9780)

| # | Type | Code |
|---|------|------|
| 1 | SET | `childTemplate = wkTenplates[j]` // Current detail template |
| 2 | SET | `wkCaanMsgList = shosaOkMapper.editInMsgEKK0201C010(param, childTemplate, idoDiv)` // [CALL] Map input for detail approval |
| 3 | SET | `rslt = editInMsgCmn(param, wkCaanMsgList.get(0))` // [CALL] Common processing |
| 4 | EXEC | `wkMapArray.add(rslt)` // Collect result |
| 5 | SET | `// ninsho_id = childTemplate.getString(EKK0201A010CBSMsg1List.SPOT_LOGIN_SYSID)` // [COMMENTED OUT] Auth ID not needed for eo Mobile (improvement No.11, 2013-05-05) |

**Block 5.6 — [SET] Store Category Results** (L9782)

| # | Type | Code |
|---|------|------|
| 1 | SET | `rsltShosaMap.put(MAP_KEY_EKK0201C010, wkMapArray)` // [-> KEY = "EKK0201C010"] Store for service contract details (eo Mobile) |

### Block 6 — [FOR LOOP] Process Option Service Contract (EKK0361A010) — ISP (L9786–L9815)

> Iterates over each option service contract (ISP) consent record. This is the **most complex block** because it also performs **option classification** based on the `op_svc_cd` field. For each record, extracts templates, maps input via `editInMsgEKK0361C010`, runs common processing, then classifies the option into Email (B001) or My Home Page (B002) categories for relay data forwarding.

**Block 6.1 — [IF] Null Guard** `(workEKK0361A010Array != null)` (L9787)

| # | Type | Code |
|---|------|------|
| 1 | EXEC | `wkMapArray = new ArrayList()` // Create fresh result holder |
| 2 | IF | `if (workEKK0361A010Array != null)` // Guard against null consent data |

**Block 6.2 — [FOR LOOP] Outer: Iterate over Option Contracts** (L9790)

| # | Type | Code |
|---|------|------|
| 1 | FOR | `for (int i = 0; i < workEKK0361A010Array.size(); i++)` // Each option contract record |

**Block 6.3 — [EXEC] Get Templates** (L9792)

| # | Type | Code |
|---|------|------|
| 1 | SET | `wkTenplates = getWorkData(EKK0361A010CBSMsg.EKK0361A010CBSMSG1LIST, (Map)workEKK0361A010Array.get(i))` // Extract option templates |

**Block 6.4 — [FOR LOOP] Inner: Iterate over Templates** (L9793)

| # | Type | Code |
|---|------|------|
| 1 | FOR | `for (int j = 0; j < wkTenplates.length; j++)` // Each template |

**Block 6.5 — [EXEC] Process and Classify Option** (L9795–L9812)

| # | Type | Code |
|---|------|------|
| 1 | SET | `childTemplate = wkTenplates[j]` // Current template |
| 2 | SET | `wkCaanMsgList = shosaOkMapper.editInMsgEKK0361C010(param, childTemplate, idoDiv)` // [CALL] Map input for option approval |
| 3 | SET | `rslt = editInMsgCmn(param, wkCaanMsgList.get(0))` // [CALL] Common processing |
| 4 | EXEC | `wkMapArray.add(rslt)` // Collect mapping result |
| 5 | SET | `op_svc_cd = getValuableData(rsltShokai, MAP_KEY_EKK0351B002, EKK0351B002CBSMsg.EKK0351B002CBSMSG1LIST, EKK0351B002CBSMsg1List.OP_SVC_KEI_NO, childTemplate.getString(EKK0361A010CBSMsg1List.OP_SVC_KEI_NO), EKK0351B002CBSMsg1List.OP_SVC_CD)` // Retrieve option service detail code |

**Block 6.6 — [IF] Option Classification: Email Option** `(op_svc_cd == "B001")` (L9801)

> When the option service detail code is `"B001"`, the service is classified as an Email option. The service contract number is added to the `opSvcKeiNoB001` list for later relay classification.

| # | Type | Code |
|---|------|------|
| 1 | EXEC | `opSvcKeiNoB001.add(childTemplate.getString(EKK0361A010CBSMsg1List.OP_SVC_KEI_NO))` // Add to Email option list |

**Block 6.7 — [ELSE-IF] Option Classification: My Home Page Option** `(op_svc_cd == "B002")` (L9805)

> When the option service detail code is `"B002"`, the service is classified as a My Home Page option. The service contract number is added to the `opSvcKeiNoB002` list for later relay classification.

| # | Type | Code |
|---|------|------|
| 1 | EXEC | `opSvcKeiNoB002.add(childTemplate.getString(EKK0361A010CBSMsg1List.OP_SVC_KEI_NO))` // Add to My Home Page option list |

**Block 6.8 — [SET] Store Category Results** (L9815)

| # | Type | Code |
|---|------|------|
| 1 | SET | `rsltShosaMap.put(MAP_KEY_EKK0361C010, wkMapArray)` // [-> KEY = "EKK0361C010"] Store for option service contracts (ISP) |

### Block 7 — [FOR LOOP] Process Sub-Option Service Contract (EKK0411A010) — ISP (L9819–L9837)

> Iterates over each sub-option service contract (ISP) consent record. Uses `editInMsgEKK0411C020` (approved mapper) for template-to-input mapping. This is the simplest of the four processing blocks as it has no additional classification logic.

**Block 7.1 — [IF] Null Guard** `(workEKK0411A010Array != null)` (L9820)

| # | Type | Code |
|---|------|------|
| 1 | EXEC | `wkMapArray = new ArrayList()` // Create fresh result holder |
| 2 | IF | `if (workEKK0411A010Array != null)` // Guard against null consent data |

**Block 7.2 — [FOR LOOP] Outer: Iterate over Sub-Option Contracts** (L9823)

| # | Type | Code |
|---|------|------|
| 1 | FOR | `for (int i = 0; i < workEKK0411A010Array.size(); i++)` // Each sub-option contract record |

**Block 7.3 — [EXEC] Get Templates** (L9825)

| # | Type | Code |
|---|------|------|
| 1 | SET | `wkTenplates = getWorkData(EKK0411A010CBSMsg.EKK0411A010CBSMSG1LIST, (Map)workEKK0411A010Array.get(i))` // Extract sub-option templates |

**Block 7.4 — [FOR LOOP] Inner: Iterate over Templates** (L9826)

| # | Type | Code |
|---|------|------|
| 1 | FOR | `for (int j = 0; null != wkTenplates && j < wkTenplates.length; j++)` // Each template (with null check) |

**Block 7.5 — [EXEC] Process Each Sub-Option Template** (L9828–L9833)

| # | Type | Code |
|---|------|------|
| 1 | SET | `childTemplate = wkTenplates[j]` // Current template |
| 2 | SET | `wkCaanMsgList = shosaOkMapper.editInMsgEKK0411C020(param, childTemplate, idoDiv)` // [CALL] Map input for sub-option approval |
| 3 | SET | `rslt = editInMsgCmn(param, wkCaanMsgList.get(0))` // [CALL] Common processing |
| 4 | EXEC | `wkMapArray.add(rslt)` // Collect result |

**Block 7.6 — [SET] Store Category Results** (L9835)

| # | Type | Code |
|---|------|------|
| 1 | SET | `rsltShosaMap.put(MAP_KEY_EKK0411C020, wkMapArray)` // [-> KEY = "EKK0411C020"] Store for sub-option service contracts (ISP) |

### Block 8 — [EXEC] Relay Data Classification (L9839–L9857)

> Converts classified option lists to arrays and classifies relay data under the `SJISHO_MAP` (指向書CCマップ — instruction book CC map, key `"KKSV011835CC"`). POPID information (`RENKEI_DATA_KBN_POPID = "03"`) is written for email options, and WEBID information (`RENKEI_DATA_KBN_WEBID = "04"`) is written for My Home Page options. Transaction kind is set to `"01"` (add).

| # | Type | Code |
|---|------|------|
| 1 | SET | `v1 = new String[opSvcKeiNoB001.size()]` // Array for email option contract numbers |
| 2 | SET | `v2 = new String[opSvcKeiNoB002.size()]` // Array for My Home Page option contract numbers |
| 3 | CALL | `JKKBpCommon.putAxMRenkeiDataKbn(param, SJISHO_MAP, RENKEI_DATA_KBN_POPID, TRN_KBN_ADD, opSvcKeiNoB001.toArray(v1), currentSysid)` // [-> SJISHO_MAP = "KKSV011835CC", RENKEI_DATA_KBN_POPID = "03" (POPID info), TRN_KBN_ADD = "01" (add)] Relay POPID info for email options |
| 4 | CALL | `JKKAddSjishoCtrl.putAxMRenkeiDataKbn(param, SJISHO_MAP, RENKEI_DATA_KBN_WEBID, TRN_KBN_ADD, opSvcKeiNoB002.toArray(v2), currentSysid)` // [-> RENKEI_DATA_KBN_WEBID = "04" (WEBID info), TRN_KBN_ADD = "01" (add)] Relay WEBID info for My Home Page options |

### Block 9 — [RETURN] Return Result Map (L9859)

| # | Type | Code |
|---|------|------|
| 1 | RETURN | `return rsltShosaMap` // Return the complete mapping result containing all four service contract categories |

## 7. Glossary

| Term | Type | Business Meaning |
|------|------|------------------|
| `editMapShosaOkMoba` | Method | Mapping processing for approval OK — transforms validated consent data into structured input maps for eo Mobile service contracts |
| `idoDiv` | Parameter | Difference/similarity classification code (異同区分) — distinguishes between new, modified, and unchanged records during inspection |
| `rsltShokai` | Parameter | Inspection result data map (一覧照会結果データ) — pre-populated resultMap from upstream screen containing consent records |
| `userDataIndex` | Parameter | Business data index within param — identifies the active work item in multi-record scenarios |
| `MAP_KEY_EKK0121A010` | Constant | Map key "EKK0121A010" — Service Contract (eo Mobile) consent records (サービス契約<eoモバイル>同意照会) |
| `MAP_KEY_EKK0201A010` | Constant | Map key "EKK0201A010" — Service Contract Details (eo Mobile) consent records (サービス契約内訳<eoモバイル>同意照会) |
| `MAP_KEY_EKK0361A010` | Constant | Map key "EKK0361A010" — Option Service Contract (ISP) consent records (オプションサービス契約<ISP>同意照会) |
| `MAP_KEY_EKK0411A010` | Constant | Map key "EKK0411A010" — Sub-Option Service Contract (ISP) consent records (サブオプションサービス契約<ISP>同意照会) |
| `MAP_KEY_EKK0121C010` | Constant | Map key "EKK0121C010" — output key for service contract (eo Mobile) mapping results |
| `MAP_KEY_EKK0201C010` | Constant | Map key "EKK0201C010" — output key for service contract detail (eo Mobile) mapping results |
| `MAP_KEY_EKK0361C010` | Constant | Map key "EKK0361C010" — output key for option service contract (ISP) mapping results |
| `MAP_KEY_EKK0411C020` | Constant | Map key "EKK0411C020" — output key for sub-option service contract (ISP) mapping results |
| `SJISHO_MAP` | Constant | Instruction book CC map key `"KKSV011835CC"` — the map namespace for relay instruction data (サービス契約照会BPサービスでの指示書CCマップのキー) |
| `RENKEI_DATA_KBN_POPID` | Constant | Relay data category code "03" — POPID information (POPIDの情報) — used for email option contract forwarding |
| `RENKEI_DATA_KBN_WEBID` | Constant | Relay data category code "04" — WEBID information (WEBIDの情報) — used for My Home Page option contract forwarding |
| `TRN_KBN_ADD` | Constant | Transaction kind code "01" — Add (処理区分: 登録) — indicates the relay data is being registered/added |
| `shosaOkMapper` | Field | Approved-mapper component (照査OK.mapper) — maps consent templates to input message structures for each service type |
| `currentSysid` | Field | Current system ID of the customer's line contract — identifies the caller system in relay data |
| `op_svc_cd` | Variable | Option service detail code — classifies option types (B001 = Email, B002 = My Home Page) |
| `opSvcKeiNoB001` | Variable | List of option service contract numbers classified as Email options (メールオプション) |
| `opSvcKeiNoB002` | Variable | List of option service contract numbers classified as My Home Page options (Myホームページオプション) |
| `op_svc_kei_no` | Field | Option service contract number — the unique identifier for each option service subscription |
| `EKK0121A010` | SC Code | Service Contract (eo Mobile) — base service contract for the eo Mobile broadband package |
| `EKK0201A010` | SC Code | Service Contract Details (eo Mobile) — line-item details within the eo Mobile service contract |
| `EKK0361A010` | SC Code | Option Service Contract (ISP) — optional add-on services on top of the base contract (ISP plan) |
| `EKK0411A010` | SC Code | Sub-Option Service Contract (ISP) — additional sub-options layered on top of the ISP option service |
| `editInMsgEKK0121C010` | SC Method | Maps input message structure for EKK0121 (Service Contract eo Mobile) approval |
| `editInMsgEKK0201C010` | SC Method | Maps input message structure for EKK0201 (Service Contract Details eo Mobile) approval |
| `editInMsgEKK0361C010` | SC Method | Maps input message structure for EKK0361 (Option Service Contract ISP) approval |
| `editInMsgEKK0411C020` | SC Method | Maps input message structure for EKK0411 (Sub-Option Service Contract ISP) approval |
| `editInMsgCmn` | SC Method | Common input message processing — applies shared field-level transformation and validation |
| `putAxMRenkeiDataKbn` | CBS Method | Relay data classification and storage — writes relay data into the instruction map by category code |
| `getWorkData` | CC Method | Local helper that extracts CAANMsg templates from a consent record by message list key |
| `getValuableData` | CC Method | Local helper that retrieves specific field values from a resultMap by navigation path |
| `CAANMsg` | Type | Fujitsu's message template object — represents a structured business message used for data mapping in the eo customer system |
| `IRequestParameterReadWrite` | Type | Request parameter interface — provides read/write access to the screen's model and control data |
| `SessionHandle` | Type | BPM session handle — manages database session and transaction context |
| eo Mobile | Business term | K-Opticom's mobile broadband internet service — the base service line for which contracts are processed |
| ISP | Business term | Internet Service Provider — the connectivity service layer in K-Opticom's service portfolio |
| POPID | Business term | Point of Presence ID — authentication identifier used for email service access |
| WEBID | Business term | Web ID — authentication identifier used for My Home Page (customer portal) access |
| 連係 (Renkei) | Japanese term | Relay/forwarding — the process of sending structured data to external or downstream systems |
| 照査 (Sousa) | Japanese term | Inspection/verification — the process of validating contract data before approval |
| 同意照会 (Doui Shoukai) | Japanese term | Consent inquiry — retrieving and displaying consent records for verification |
| 指示書 (Shijisho) | Japanese term | Instruction book — structured data format used for relay/forwarding between systems |
| 異同区分 (Ido Kaku) | Japanese term | Difference/similarity classification — categorizes records as new, modified, or unchanged |
| メールオプション (Meeru Opushon) | Japanese term | Email option — an add-on service that provides email access functionality |
| Myホームページオプション | Japanese term | My Home Page option — an add-on service that provides customer portal access functionality |
| 締結 (Ketsu) | Japanese term | Contract finalization — the process of completing and finalizing a service contract (currently deprecated/disabled) |
