# Business Logic — JKKAdchgHakkoSODCC.hakkoSOD() [208 LOC]

| Field | Value |
|-------|-------|
| Fully Qualified Name | `com.fujitsu.futurity.bp.custom.common.JKKAdchgHakkoSODCC` |
| Layer | CC / Common Component (Business Logic Shared Component) |
| Module | `common` (Package: `com.fujitsu.futurity.bp.custom.common`) |

## 1. Role

### JKKAdchgHakkoSODCC.hakkoSOD()

This method is the primary **Service Order Data (SOD) issuance entry point** for address change (住所変更) scenarios within the K-Opticom telecom customer base system. It orchestrates the creation of service orders for a customer's fiber optic internet and telephone services when an address change, new installation, or service termination is processed.

The method implements a **routing/dispatch design pattern**: it iterates over a nested list of service contracts, discriminates each contract's service type (FTTH Internet vs. FTTH Telephone) using `svcKeiJdg()`, and delegates to specialized handlers -- `hakkoSODNet()` for internet service orders and `hakkoSODTel()` for telephone service orders. This separation ensures that each service type receives tailored order processing logic (different data transformations, validation rules, and database writes).

It serves as a **shared utility called by multiple screens** (KKSV0565, KKSV0674, KKSV0725 and related mapping layers), acting as the centralized dispatch hub that processes all service contracts associated with a single address change transaction. The method supports three order issuance triggers (address change registration, cancellation completion, and new installation completion) identified by `odr_exec_div`. It also handles an emergency second-pass dispatch for telephone services (used in urgent small office branch cases), where eligible contracts are processed again with `isEmergency = true`.

If the input data is empty or the function code indicates a non-ordering scenario (FUNC_CODE_2), the method exits gracefully with a zero completion status ("0000"), returning control to the caller without performing any order issuance.

## 2. Processing Pattern (Detailed Business Logic)

```mermaid
flowchart TD
    START(["hakkoSOD(params)"])
    START --> KEYP["Keep session handle resource preservation"]
    KEYP --> GET_IN["Get inMap from param.getData(fixedText)"]
    GET_IN --> GET_FUNC["Get funcCD from inMap.get(FUNC_CODE_KEY)"]
    GET_FUNC --> GET_LIST["Get odr_hakko_svc_kei_list from inMap"]
    GET_LIST --> CHECK_PRE{funcCD blank OR
FUNC_CODE_2 = 2 OR
list is null OR
list size is 0}
    CHECK_PRE -- Yes --> EARLY_RET["Set RETURN_CODE = 0000
Return param"]
    CHECK_PRE -- No --> OUTER_LOOP["For each item in
odr_hakko_svc_kei_list"]
    OUTER_LOOP --> CLEAR_VARS["Clear previous record
and same transaction number"]
    CLEAR_VARS --> INIT_ARR["Initialize arrays:
svc_kei_ucwk_no,
kktk_svc_kei_no, etc."]
    INIT_ARR --> ML_INIT["Initialize mlcapa_flg_list
and related maps"]
    ML_INIT --> NEXT_ITEM["Get next item
trgt_data_map"]
    NEXT_ITEM --> MAP_CHECK{trgt_data_map
is null?}
    MAP_CHECK -- Yes --> OUTER_LOOP
    MAP_CHECK -- No --> GET_FIELDS["Extract:
use_svc_chg_div,
adchg_mskm_dtl_no,
hakko_trgr_trgt_list"]
    GET_FIELDS --> TRG_CHECK{hakko_trgr_trgt_list
is null or empty?}
    TRG_CHECK -- Yes --> OUTER_LOOP
    TRG_CHECK -- No --> INNER_LOOP["For each item in
hakko_trgr_trgt_list"]
    INNER_LOOP --> GET_SUB["Get:
kiki_trgt_data_list,
opt_trgt_data_list,
con_mfr_info_List,
odr_exec_div"]
    GET_SUB --> SET_MAP["Set target data in inMap
Reset flags"]
    SET_MAP --> KIKI_LOOP["For each kiki_sodMap
in kiki_trgt_data_list"]
    KIKI_LOOP --> SVC_JUDGE["svcKeiJdg
param, kiki_sodMap"]
    SVC_JUDGE --> JUDGE_NET{SVC_KIND_NET?}
    JUDGE_NET -- Yes --> CALL_NET["CALL: hakkoSODNet
fiber optic network"]
    JUDGE_NET -- No --> JUDGE_TEL{SVC_KIND_TEL?}
    JUDGE_TEL -- Yes --> CALL_TEL["CALL: hakkoSODTel
fiber optic telephone"]
    JUDGE_TEL -- No --> KIKI_NEXT["Next kiki_sodMap"]
    CALL_NET --> KIKI_NEXT
    CALL_TEL --> KIKI_NEXT
    KIKI_NEXT --> KIKI_CHK{Has next
kiki_sodMap?}
    KIKI_CHK -- Yes --> SVC_JUDGE
    KIKI_CHK -- No --> OPT_LOOP["For each opt_sodMap
in opt_trgt_data_list"]
    OPT_LOOP --> OPT_JUDGE["svcKeiJdg
param, opt_sodMap"]
    OPT_JUDGE --> OPT_NET{SVC_KIND_NET?}
    OPT_NET -- Yes --> OPT_CALL_NET["CALL: hakkoSODNet"]
    OPT_NET -- No --> OPT_TEL{SVC_KIND_TEL?}
    OPT_TEL -- Yes --> OPT_CALL_TEL["CALL: hakkoSODTel"]
    OPT_TEL -- No --> OPT_NEXT["Next opt_sodMap"]
    OPT_CALL_NET --> OPT_NEXT
    OPT_CALL_TEL --> OPT_NEXT
    OPT_NEXT --> OPT_CHK{Has next
opt_sodMap?}
    OPT_CHK -- Yes --> OPT_JUDGE
    OPT_CHK -- No --> EMG_LOOP["Emergency TEL second opt pass"]
    EMG_LOOP --> EMG_TEL{SVC_KIND_TEL?}
    EMG_TEL -- Yes --> EMG_CALL["CALL: hakkoSODTel
isEmergency = true"]
    EMG_TEL -- No --> EMG_NEXT["Next opt_sodMap"]
    EMG_CALL --> EMG_NEXT
    EMG_NEXT --> EMG_CHK{Has next?}
    EMG_CHK -- Yes --> EMG_TEL
    EMG_CHK -- No --> INNER_CHK{Has next
hakko_trgr_trgt?}
    INNER_CHK -- Yes --> GET_SUB
    INNER_CHK -- No --> OUTER_CHK{Has next
odr_hakko_svc_kei?}
    OUTER_CHK -- Yes --> CLEAR_VARS
    OUTER_CHK -- No --> FINALLY["finally block:
release resources"]
    FINALLY --> RETURN_RET["Return param"]
    RETURN_RET --> END(["End"])
    EARLY_RET --> END
```

**Constant Resolution:**

| Constant | Resolved Value | Business Meaning |
|----------|---------------|-----------------|
| `JKKHakkoSODConstCC.FUNC_CODE_2` | `"2"` | Non-ordering function code (skips SOD issuance) |
| `JKKHakkoSODConstCC.SVC_KIND_NET` | `"01"` | Internet service type |
| `JKKHakkoSODConstCC.SVC_KIND_TEL` | `"02"` | Telephone service type |
| `JKKAdchgHakkoSODConstCC.ODR_HAKKO_SVC_KEI_LIST` | `"odr_hakko_svc_kei_list"` | Map key for the order issuance service contract list |
| `JKKAdchgHakkoSODConstCC.USE_SVC_CHG_DIV` | `"use_svc_chg_div"` | Map key for usage service change division |
| `JKKAdchgHakkoSODConstCC.HAKKO_TRGR_TRGT_LIST` | `"hakko_trgr_trgt_list"` | Map key for issuance trigger target list |
| `JKKAdchgHakkoSODConstCC.KIKI_TRGT_DATA_LIST` | `"kiki_trgt_data_list"` | Map key for device target data list (service contract + device) |
| `JKKAdchgHakkoSODConstCC.OPT_TRGT_DATA_LIST` | `"opt_trgt_data_list"` | Map key for option target data list (service contract + option) |
| `JKKAdchgHakkoSODConstCC.ODR_EXEC_DIV` | `"odr_exec_div"` | Map key for order issuance trigger division |
| `JKKHakkoSODConstCC.TRGT_DATA_LIST` | (see constant file) | Target data list key set into inMap for main SOD issuance |
| `JCMConstants.FUNC_CODE_KEY` | (function code key) | Map key to retrieve the function code from input |

## 3. Parameter Analysis

| No | Parameter Name | Type | Business Description |
|----|---------------|------|---------------------|
| 1 | `handle` | `SessionHandle` | Session manager handle carrying session context (user authentication, database connection pool, transaction scope). Used to preserve the session handle in a ThreadLocal (`keepSesHandle`) for resource management across the processing lifecycle. |
| 2 | `param` | `IRequestParameterReadWrite` | Parameter object containing the model data group and control map. It carries the order issuance target lists (service contracts, devices, options), control flags (return code, return message), and is mutated throughout processing. It is both read from and written back to. |
| 3 | `fixedText` | `String` | User-specified arbitrary string used as the map key to extract the specific data block (`inMap`) from `param.getData()`. Allows multiple data payloads to coexist within the same parameter object, differentiated by this key. |

**Instance Fields / External State Read:**

| Field | Type | Business Meaning |
|-------|------|-----------------|
| `keepSesHandle` | `ThreadLocal<SessionHandle>` | Thread-local storage for the session handle, used to ensure resource cleanup in the finally block. |
| `mae_recode_chaf_op_svc_kei_no` | `String` | Previous record post-change operation service contract number (cleared each iteration). |
| `mae_recode_chaf_op_svc_kei_gene_add_dtm` | `String` | Previous record post-change service contract generation timestamp (cleared each iteration). |
| `mae_recode_chbf_op_svc_kei_no` | `String` | Previous record pre-change operation service contract number (cleared each iteration). |
| `mae_recode_chbf_op_svc_kei_gene_add_dtm` | `String` | Previous record pre-change service contract generation timestamp (cleared each iteration). |
| `mae_recode_ch_svc_kei_no` | `String` | Previous record change service contract number (cleared each iteration). |
| `same_trn_no` | `String` | Same transaction number (cleared each iteration for ID deduplication). |
| `svc_kei_ucwk_no` | `String[]` | Service contract detail work number array (re-allocated each iteration). |
| `kktk_svc_kei_no` | `String[]` | Service contract number for equipment array (re-allocated each iteration). |
| `svc_kei_ucwk_gadtm` | `String[]` | Service contract detail add timestamp array (re-allocated each iteration). |
| `kktk_svc_kei_gadtm` | `String[]` | Service contract add timestamp array (re-allocated each iteration). |
| `taknkiki_model_cd` | `String[]` | Multi-functional device model code array (re-allocated each iteration). |
| `kiki_seizo_no` | `String[]` | Device serial number array (re-allocated each iteration). |
| `chbf_kktk_svc_kei_gadtm` | `String[]` | Pre-change equipment service contract add timestamp array. |
| `kkop_svc_kei_va` | `String[]` | Equipment option service contract validation array. |
| `kkop_svc_kei_va_gadtm` | `String[]` | Equipment option service contract validation add timestamp array. |
| `kkop_svc_kei_router` | `String[]` | Equipment option router array. |
| `kkop_svc_kei_router_gadtm` | `String[]` | Equipment option router add timestamp array. |
| `con_mfr_info_List` | `ArrayList<HashMap<String, Object>>` | Inherited multi-functional router list (for continue service scenarios). |
| `mlcapa_flg_list` | `ArrayList<String>` | ML (Multi-Line) capacity flag list (fault response). |
| `op_svc_kei_no_ml_map` | `HashMap<String, String[]>` | Option service contract number to ML map. |
| `op_svc_kei_no_mlist_map` | `HashMap<String, String>` | Option service contract number to ML list map. |
| `sbop_svckeino_alias_map` | `HashMap<String, String[]>` | Single-line backup option service contract number alias map. |
| `sbop_svckeino_mlvirus_map` | `HashMap<String, String[]>` | Single-line backup option ML virus map. |
| `isChgPlaceZumi` | `boolean` | Flag indicating whether place change processing is complete. |
| `isSakiMailOdr` | `boolean` | Flag indicating advance mail order status. |
| `isRadiusZumi` | `boolean` | Flag indicating whether RADIUS processing is complete. |
| `number050Exe` | `boolean` | Flag indicating whether number 050 execution is needed. |
| `telDslExe` | `boolean` | Flag indicating whether telephone DSL execution is needed. |
| `telAddExe` | `boolean` | Flag indicating whether telephone addition execution is allowed. |
| `va_kiki_list` | `ArrayList<String>` | Validation device list. |

## 4. CRUD Operations / Called Services

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

| CRUD | SC / CBS | SC Code | Entity / DB | Operation Description |
|------|----------|---------|-------------|----------------------|
| - | `JKKAdchgHakkoSODCC.svcKeiJdg` | - | - | Service type discrimination -- determines whether a contract is FTTH Internet or FTTH Telephone |
| - | `JKKAdchgHakkoSODCC.hakkoSODNet` | - | - | Delegates to fiber optic network (internet) SOD issuance handler |
| - | `JKKAdchgHakkoSODCC.hakkoSODTel` | - | - | Delegates to fiber optic telephone SOD issuance handler |
| - | `JKKAdchgHakkoSODCC.isBlank` | - | - | Utility -- checks if a string is null or blank |
| R | `IRequestParameterReadWrite.getData` | - | - | Reads the data map from param using the fixedText key |
| R | `IRequestParameterReadWrite.setControlMapData` | U | - | Sets control map data (return code, return message) in param |
| R | `IRequestParameterReadWrite.getString` | (via called methods) | - | Reads string data from service component data maps |
| R | `JCMConstants.FUNC_CODE_KEY` | - | - | Constant key used to retrieve function code from inMap |
| - | `HashMap.get()` | - | - | Retrieves values from inMap and nested data maps |
| - | `HashMap.put()` | - | - | Sets target data lists (opt_trgt_data_list, kiki_trgt_data_list) into inMap |
| R | `ArrayList.iterator()` | - | - | Creates iterators for nested list traversals |
| R | `ArrayList.size()` | - | - | Checks list sizes for pre-condition validation |

**Note:** `hakkoSODNet()` and `hakkoSODTel()` are internal helper methods in the same class (`JKKAdchgHakkoSODCC`) that perform the actual SOD creation, including further SC calls, data transformations, and database operations. Their full details are documented in their respective DD files. The `svcKeiJdg()` method performs service type discrimination based on the service contract detail work number (`svc_kei_ucwk_no`) and the service code (`svc_kei_cd`).

## 5. Dependency Trace

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

No screen/batch entry points found within 8 hops. Direct callers found: 5 methods.
Terminal operations from this method: `hakkoSODTel` [-], `svcKeiJdg` [-], `hakkoSODTel` [-], `hakkoSODNet` [-], `svcKeiJdg` [-], `hakkoSODTel` [-], `hakkoSODNet` [-], `svcKeiJdg` [-], `getString` [R], `getString` [R], `getString` [R], `getString` [R], `getString` [R], `isBlank` [-], `getData` [R], `getData` [R], `getData` [R], `getData` [R], `getData` [R]

| # | Caller (Screen/Batch) | Call Chain (Full Path to this Method) | Terminal (SC / CRUD / Entity) |
|---|----------------------|--------------------------------------|-------------------------------|
| 1 | Screen:KKSV0565 | `KKSV0565OPOperation.target3.execute` -> `CCRequestBroker` -> `JKKAdchgHakkoSODCC.hakkoSOD` | `hakkoSODNet [C]`, `hakkoSODTel [C]`, `svcKeiJdg [-]`, `isBlank [-]` |
| 2 | Screen:KKSV0674 | `KKSV0674OPOperation.target43.execute` -> `CCRequestBroker` -> `JKKAdchgHakkoSODCC.hakkoSOD` | `hakkoSODNet [C]`, `hakkoSODTel [C]`, `svcKeiJdg [-]`, `isBlank [-]` |
| 3 | Screen:KKSV0725 | `KKSV0725OPOperation.target4c.execute` -> `CCRequestBroker` -> `JKKAdchgHakkoSODCC.hakkoSOD` | `hakkoSODNet [C]`, `hakkoSODTel [C]`, `svcKeiJdg [-]`, `isBlank [-]` |
| 4 | CBS:JKKAdInfChgCC | `JKKAdInfChgCC` creates `JKKAdchgHakkoSODCC` instance and invokes `hakkoSOD` | `hakkoSODNet [C]`, `hakkoSODTel [C]`, `svcKeiJdg [-]` |
| 5 | CBS:JKKAdchgTelInfoChgCC | `JKKAdchgTelInfoChgCC` creates `JKKAdchgHakkoSODCC` instance and invokes `hakkoSOD` | `hakkoSODNet [C]`, `hakkoSODTel [C]`, `svcKeiJdg [-]` |
| 6 | CBS:JKKAdchgCheckerCC | `JKKAdchgCheckerCC` creates `JKKAdchgHakkoSODCC` instance for order issuance checks | `hakkoSODNet [C]`, `hakkoSODTel [C]`, `svcKeiJdg [-]` |
| 7 | CBS:JKKUsePlaceAdInfUpdCC | `JKKUsePlaceAdInfUpdCC` creates `JKKAdchgHakkoSODCC` instance after address info update | `hakkoSODNet [C]`, `hakkoSODTel [C]`, `svcKeiJdg [-]` |

## 6. Per-Branch Detail Blocks

### Block 1 -- TRY (try block entry) (L590)

> The entire method body is wrapped in a try-finally to ensure session handle resource cleanup.

| # | Type | Code |
|---|------|------|
| 1 | SET | `keepSesHandle.set(handle)` // Preserve session handle in ThreadLocal |
| 2 | SET | `inMap = (HashMap)param.getData(fixedText)` // Extract user data map |
| 3 | SET | `funcCD = (String)inMap.get(JCMConstants.FUNC_CODE_KEY)` // Get function code |
| 4 | SET | `odr_hakko_svc_kei_list = (ArrayList)inMap.get(ODR_HAKKO_SVC_KEI_LIST)` // Get service contract list [-> "odr_hakko_svc_kei_list"] |

### Block 2 -- IF (pre-condition validation) (L599)

> Checks if the request should be skipped: blank function code, FUNC_CODE_2 = "2" (non-ordering), or empty service list.

| # | Type | Code |
|---|------|------|
| 1 | COND | `isBlank(funcCD) || FUNC_CODE_2.equals(funcCD) || null == odr_hakko_svc_kei_list || 0 == odr_hakko_svc_kei_list.size()` |

**Block 2.1 -- IF branch: early return** (L601-606)

> If validation fails, set completion status "0000" (success/no-op) and return.

| # | Type | Code |
|---|------|------|
| 1 | SET | `formatStatus = String.format("%1$04d", 0)` // "0000" |
| 2 | CALL | `JCMAPLConstMgr.getString("RETURN_MESSAGE_0000")` // Get success message |
| 3 | EXEC | `param.setControlMapData(RETURN_CODE, "0000")` // Set return code |
| 4 | EXEC | `param.setControlMapData(RETURN_MESSAGE, message)` // Set return message |
| 5 | RETURN | `return param` |

### Block 3 -- WHILE (outer loop: for each service contract) (L609-789)

> Iterates over `odr_hakko_svc_kei_list` -- each item represents a service contract associated with the address change transaction.

| # | Type | Code |
|---|------|------|
| 1 | SET | `odr_hakko_svc_kei_Ite = odr_hakko_svc_kei_list.iterator()` |

**Block 3.1 -- WHILE body: clear state** (L611-636)

> Resets all instance fields and arrays before processing each service contract item, preventing data leakage between iterations.

| # | Type | Code |
|---|------|------|
| 1 | SET | `mae_recode_chaf_op_svc_kei_no = ""` // [-> clear] |
| 2 | SET | `mae_recode_chaf_op_svc_kei_gene_add_dtm = ""` // [-> clear] |
| 3 | SET | `mae_recode_chbf_op_svc_kei_no = ""` // [-> clear] |
| 4 | SET | `mae_recode_chbf_op_svc_kei_gene_add_dtm = ""` // [-> clear] |
| 5 | SET | `mae_recode_ch_svc_kei_no = ""` // [-> clear] |
| 6 | SET | `same_trn_no = ""` // [-> clear same transaction number] |
| 7 | SET | `svc_kei_ucwk_no = new String[1]` // [-> re-allocate] |
| 8 | SET | `kktk_svc_kei_no = new String[1]` // [-> re-allocate] |
| 9 | SET | `svc_kei_ucwk_gadtm = new String[1]` // [-> re-allocate] |
| 10 | SET | `kktk_svc_kei_gadtm = new String[1]` // [-> re-allocate] |
| 11 | SET | `taknkiki_model_cd = new String[1]` // [-> re-allocate] |
| 12 | SET | `kiki_seizo_no = new String[1]` // [-> re-allocate] |
| 13 | SET | `chbf_kktk_svc_kei_gadtm = new String[1]` // [-> re-allocate, ANK-1578] |
| 14 | SET | `kkop_svc_kei_va = new String[1]` // [-> re-allocate, ANK-1578] |
| 15 | SET | `kkop_svc_kei_va_gadtm = new String[1]` // [-> re-allocate, ANK-1578] |
| 16 | SET | `kkop_svc_kei_router = new String[1]` // [-> re-allocate, ANK-1578] |
| 17 | SET | `kkop_svc_kei_router_gadtm = new String[1]` // [-> re-allocate, ANK-1578] |
| 18 | SET | `mlcapa_flg_list = new ArrayList<String>()` // [-> re-allocate, fault response] |
| 19 | SET | `op_svc_kei_no_ml_map = new HashMap<>()` // [-> re-allocate] |
| 20 | SET | `op_svc_kei_no_mlist_map = new HashMap<>()` // [-> re-allocate] |
| 21 | SET | `sbop_svckeino_alias_map = new HashMap<>()` // [-> re-allocate] |
| 22 | SET | `sbop_svckeino_mlvirus_map = new HashMap<>()` // [-> re-allocate] |

**Block 3.2 -- WHILE body: get next item and validate** (L638-647)

> Retrieves the next service contract data map and validates its presence.

| # | Type | Code |
|---|------|------|
| 1 | SET | `trgt_data_map = (HashMap<String, Object>)odr_hakko_svc_kei_Ite.next()` |
| 2 | IF | `null != trgt_data_map` [L639] |

**Block 3.2.1 -- IF: process data map** (L641-645)

> Extracts key fields from the target data map.

| # | Type | Code |
|---|------|------|
| 1 | SET | `use_svc_chg_div = (String)trgt_data_map.get(USE_SVC_CHG_DIV)` // [-> "use_svc_chg_div"] |
| 2 | SET | `adchg_mskm_dtl_no = (String)trgt_data_map.get("adchg_mskm_dtl_no")` // Application detail number |
| 3 | SET | `hakko_trgr_trgt_list = (ArrayList)trgt_data_map.get(HAKKO_TRGR_TRGT_LIST)` // [-> "hakko_trgr_trgt_list"] |

**Block 3.2.1.1 -- IF: trigger list is empty** (L643-645)

> Skips this item if there are no issuance trigger targets.

| # | Type | Code |
|---|------|------|
| 1 | COND | `null == hakko_trgr_trgt_list || 0 == hakko_trgr_trgt_list.size()` |
| 2 | EXEC | `continue` // skip to next odr_hakko_svc_kei item |

**Block 3.2.2 -- WHILE: inner loop over trigger targets** (L648-788)

> Iterates over issuance trigger target list.

| # | Type | Code |
|---|------|------|
| 1 | SET | `hakko_trgr_trgt_Ite = hakko_trgr_trgt_list.iterator()` |

**Block 3.2.2.1 -- WHILE body: get sub-data** (L651-678)

> Extracts nested data structures and resets processing flags.

| # | Type | Code |
|---|------|------|
| 1 | SET | `hakko_trgr_trgt_data_map = (HashMap)hakko_trgr_trgt_Ite.next()` |
| 2 | SET | `kiki_trgt_data_list = (ArrayList)hakko_trgr_trgt_data_map.get(KIKI_TRGT_DATA_LIST)` // [-> "kiki_trgt_data_list"] |
| 3 | SET | `opt_trgt_data_list = (ArrayList)hakko_trgr_trgt_data_map.get(OPT_TRGT_DATA_LIST)` // [-> "opt_trgt_data_list"] |
| 4 | SET | `con_mfr_info_List = (ArrayList)hakko_trgr_trgt_data_map.get("continue_mfr_list")` // [-> inited to empty if null, ANK-1578] |
| 5 | SET | `this.con_mfr_info_List = con_mfr_info_List` |
| 6 | SET | `odr_exec_div = (String)hakko_trgr_trgt_data_map.get(ODR_EXEC_DIV)` // [-> "odr_exec_div"] |
| 7 | SET | `kiki_trgt_data_list_Ite = kiki_trgt_data_list.iterator()` |
| 8 | SET | `opt_trgt_data_list_Ite = opt_trgt_data_list.iterator()` |
| 9 | EXEC | `inMap.put(TRGT_DATA_LIST, opt_trgt_data_list)` // Set options for main SOD issuance |
| 10 | EXEC | `inMap.put(KIKI_TRGT_DATA_LIST, kiki_trgt_data_list)` // Set devices for main SOD issuance |
| 11 | SET | `this.isChgPlaceZumi = false` // Reset place change flag [IT1-2012-0002287] |
| 12 | SET | `this.isSakiMailOdr = false` // Reset advance mail order flag [OM-2014-0002916] |
| 13 | SET | `isRadiusZumi = false` |
| 14 | SET | `number050Exe = false` |
| 15 | SET | `telDslExe = false` |
| 16 | SET | `telAddExe = true` |
| 17 | SET | `va_kiki_list = new ArrayList<String>()` |

**Block 3.2.2.2 -- WHILE: device list loop (kiki_trgt_data_list)** (L685-721)

> Processes each service contract + device combination.

| # | Type | Code |
|---|------|------|
| 1 | SET | `kiki_sodMap = kiki_trgt_data_list_Ite.next()` |

**Block 3.2.2.2.1 -- IF: service type judgment for device** (L687-707)

> Discriminates service type and dispatches to the appropriate handler.

| # | Type | Code |
|---|------|------|
| 1 | SET | `taishoSvc = svcKeiJdg(param, kiki_sodMap)` |
| 2 | IF | `SVC_KIND_NET.equals(taishoSvc)` [JKKHakkoSODConstCC.SVC_KIND_NET = "01" (FTTH Net)] |

**Block 3.2.2.2.1.1 -- IF branch: hakkoSODNet (Internet)** (L690-691)

> Dispatches to fiber optic network service order issuance.

| # | Type | Code |
|---|------|------|
| 1 | EXEC | `param = hakkoSODNet(handle, param, kiki_sodMap, fixedText, use_svc_chg_div, odr_exec_div, adchg_mskm_dtl_no)` |

| # | Type | Code |
|---|------|------|
| 3 | ELSE IF | `SVC_KIND_TEL.equals(taishoSvc)` [JKKHakkoSODConstCC.SVC_KIND_TEL = "02" (FTTH Tel)] |

**Block 3.2.2.2.1.2 -- ELSE IF branch: hakkoSODTel (Telephone)** (L696-697)

> Dispatches to fiber optic telephone service order issuance (normal mode).

| # | Type | Code |
|---|------|------|
| 1 | EXEC | `param = hakkoSODTel(param, kiki_sodMap, fixedText, use_svc_chg_div, odr_exec_div, false)` |

| # | Type | Code |
|---|------|------|
| 5 | ELSE | No matching service type |

**Block 3.2.2.2.1.3 -- ELSE: unknown service type** (L701-703)

> No action taken for unrecognized service types.

| # | Type | Code |
|---|------|------|
| 1 | EXEC | (no-op) // "do nothing" |

**Block 3.2.2.3 -- WHILE: option list loop (opt_trgt_data_list)** (L728-760)

> Processes each service contract + option combination, mirroring the device loop.

| # | Type | Code |
|---|------|------|
| 1 | SET | `opt_sodMap = opt_trgt_data_list_Ite.next()` |
| 2 | SET | `taishoSvc = svcKeiJdg(param, opt_sodMap)` |
| 3 | IF | `SVC_KIND_NET.equals(taishoSvc)` [FTTH Net] |

**Block 3.2.2.3.1 -- IF branch: hakkoSODNet (Internet options)** (L733-734)

> Dispatches to fiber optic network SOD for option items.

| # | Type | Code |
|---|------|------|
| 1 | EXEC | `param = hakkoSODNet(handle, param, opt_sodMap, fixedText, use_svc_chg_div, odr_exec_div, adchg_mskm_dtl_no)` |

| # | Type | Code |
|---|------|------|
| 3 | ELSE IF | `SVC_KIND_TEL.equals(taishoSvc)` [FTTH Tel] |

**Block 3.2.2.3.2 -- ELSE IF branch: hakkoSODTel (Telephone options)** (L739-740)

> Dispatches to fiber optic telephone SOD for option items (normal mode).

| # | Type | Code |
|---|------|------|
| 1 | EXEC | `param = hakkoSODTel(param, opt_sodMap, fixedText, use_svc_chg_div, odr_exec_div, false)` |

**Block 3.2.2.4 -- WHILE: emergency TEL second pass** (L763-784)

> Second iteration over opt_trgt_data_list for telephone emergency processing (small office branch urgent cases). Calls `hakkoSODTel` with `isEmergency = true`.

| # | Type | Code |
|---|------|------|
| 1 | SET | `opt_trgt_data_list_Ite2 = opt_trgt_data_list.iterator()` // Re-iterate |
| 2 | SET | `opt_sodMap = opt_trgt_data_list_Ite2.next()` |
| 3 | SET | `taishoSvc = svcKeiJdg(param, opt_sodMap)` |
| 4 | IF | `SVC_KIND_TEL.equals(taishoSvc)` [FTTH Tel only] |

**Block 3.2.2.4.1 -- IF branch: emergency hakkoSODTel** (L771-772)

> Dispatches to telephone SOD in emergency mode.

| # | Type | Code |
|---|------|------|
| 1 | EXEC | `param = hakkoSODTel(param, opt_sodMap, fixedText, use_svc_chg_div, odr_exec_div, true)` // isEmergency = true |

### Block 4 -- FINALLY (resource cleanup) (L791-798)

> Always executed. Releases the ThreadLocal session handle to prevent memory leaks.

| # | Type | Code |
|---|------|------|
| 1 | IF | `keepSesHandle.get() != null` |
| 2 | EXEC | `keepSesHandle.remove()` // Release ThreadLocal |
| 3 | RETURN | `return param` |

## 7. Glossary

| Term | Type | Business Meaning |
|------|------|------------------|
| SOD | Acronym | Service Order Data -- a telecom order fulfillment document created when a service contract change takes effect |
| 住所変更 (Jusho Henkou) | Business term | Address Change -- the business process of modifying a customer's registered address, which triggers service order issuance |
| `funcCD` | Field | Function code -- identifies the business function context (e.g., FUNC_CODE_2 = "2" means non-ordering skip mode) |
| `svc_kei_ucwk_no` | Field | Service detail work number -- internal tracking ID for service contract line items, used for service type discrimination |
| `svc_kei_cd` | Field | Service code -- classifies the type of service (Internet, Telephone, etc.) |
| `use_svc_chg_div` | Field | Usage service change division -- indicates the type of service change (keep, modify, add, cancel, etc.) |
| `adchg_mskm_dtl_no` | Field | Application detail number -- unique identifier for the address change application detail record |
| `odr_exec_div` | Field | Order issuance trigger division -- identifies why the order is being issued (1=address change registration, 2=cancellation completion, 3=new installation completion) |
| `kiki_trgt_data_list` | Field | Device target data list -- list of service contract + device combinations to process |
| `opt_trgt_data_list` | Field | Option target data list -- list of service contract + option combinations to process |
| `hakko_trgr_trgt_list` | Field | Issuance trigger target list -- list of trigger targets that cause SOD issuance for a service contract |
| `mae_recode_chaf_op_svc_kei_no` | Field | Previous record post-change operation service contract number |
| `mae_recode_chbf_op_svc_kei_no` | Field | Previous record pre-change operation service contract number |
| `same_trn_no` | Field | Same transaction number -- used for deduplication across iterations |
| `isChgPlaceZumi` | Field | Place change completion flag -- indicates whether location change processing has been completed (set to false each iteration) |
| `isSakiMailOdr` | Field | Advance mail order flag -- indicates whether a mail order was placed in advance |
| `isRadiusZumi` | Field | RADIUS completion flag -- indicates whether RADIUS processing has been completed |
| `mlcapa_flg_list` | Field | ML (Multi-Line) capacity flag list -- used for fault response handling |
| FTTH | Business term | Fiber To The Home -- fiber-optic broadband internet service offered by K-Opticom |
| FUNC_CODE_2 | Constant | Function code "2" -- indicates a non-ordering scenario where SOD issuance should be skipped |
| SVC_KIND_NET | Constant | Service kind "01" -- FTTH Internet service type |
| SVC_KIND_TEL | Constant | Service kind "02" -- FTTH Telephone service type |
| ODR_EXEC_DIV_AD_CHG | Constant | Order trigger "1" -- address change registration |
| ODR_EXEC_DIV_DSL_END | Constant | Order trigger "2" -- cancellation completion |
| ODR_EXEC_DIV_NEW_END | Constant | Order trigger "3" -- new installation completion |
| CD00849_KEEP | Constant | Address change processing type: Keep (continue existing) |
| CD00849_CHG | Constant | Address change processing type: Modify/Change |
| CD00849_HOLD | Constant | Address change processing type: Hold |
| CD00849_ADD | Constant | Address change processing type: Add |
| CD00849_SLRE | Constant | Address change processing type: Release/Cancel |
| CD00849_NON | Constant | Address change processing type: Non-contract |
| CC | Acronym | Common Component -- a shared business logic component class |
| CCRequestBroker | Class | Framework class that dispatches CC (Common Component) method calls in the K-Opticom operation framework |
| REQUEST_CODE_0000 | Constant | Return code "0000" -- normal termination / success (no orders issued) |
| `fixedText` | Parameter | User-specified arbitrary string used as the data map key within the parameter object |
| `keepSesHandle` | Instance | ThreadLocal session handle storage -- ensures session cleanup in finally block |
| `con_mfr_info_List` | Field | Inherited multi-functional router list -- carries router information for continue service scenarios |
| `isEmergency` | Parameter | Emergency mode flag passed to `hakkoSODTel` -- triggers urgent/small office branch processing path (true in the second opt pass) |
| ANK-1578 | Change ID | Change ticket for multi-functional router and equipment option field additions (2013-12-10) |
| IT1-2012-0002287 | Change ID | Change ticket for place change flag handling (2012-12-08) |
| OM-2014-0002916 | Change ID | Change ticket for advance mail order flag (2014-09-10) |
| OM-2013-000XXXX | Change ID | Emergency small office branch case handling (2013-09-19) |
