# Business Logic — JKKUseStpRlsRunCC.executeSvcKei_UseStp() [271 LOC]

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

## 1. Role

### JKKUseStpRlsRunCC.executeSvcKei_UseStp()

This method implements the core **service contract suspension cancellation** (use stop release) processing for K-Opticom's telecom operations system. In the business domain, when a customer's service contract has been placed under "suspension" (use stop / 利用停止, status `220`), this method reverses that state by updating the contract and its line-item details back to an active/delivered status — effectively "un-blocking" the customer's services. It acts as a routing and orchestration method: it validates whether the target service contract number is eligible for this operation, retrieves the current contract agreement and status, and then dispatches to the appropriate low-level service components based on whether the service was previously in a "pause/cut-off" (休止・中断中, status `210`) state or a normal operating state. For network service groups (FTTH/home, MT, MZ), it also considers payment method context. It handles both top-level service contracts and their nested sub-contract details (service contract internal details / 契約内訳), iterating over each suspended detail line and cancelling its suspension individually. For iMode (mobile) services, it determines whether a Service Order Data (SOD) record must be generated to trigger downstream order fulfillment. Additionally, for co-change-in-progress scenarios where a service is in delivery status during a network co-change, it generates SOD data to ensure new certifications are issued. The method follows a **template method + routing dispatch** design pattern, using status-based branching to select the correct SC (Service Component) calls while enriching the `hakkoSODDataList` with SOD generation data for later batch processing.

## 2. Processing Pattern (Detailed Business Logic)

```mermaid
flowchart TD
    START(["executeSvcKei_UseStp"])

    START --> GET_EKK0321["Get EKK0321A010Hash from resultHash<br>Get svc_kei_no"]
    GET_EKK0321 --> CHECK_TARGET["isSvcKeiTargetData<br>prm_svc_kei_no vs svc_kei_no"]
    CHECK_TARGET -->|not target| EARLY_RETURN_1(["return statusCode 0"])

    CHECK_TARGET -->|target| GET_CONSENT["getEKK0081A010SC<br>Service contract agreement"]
    GET_CONSENT --> CHECK_CONSENT_RC{"EKK0081A010<br>statusCode != 0?"}
    CHECK_CONSENT_RC -->|yes| EARLY_RETURN_2(["return statusCode"])

    CHECK_CONSENT_RC -->|no| GET_HASH["Get eKK0081A010Hash"]
    GET_HASH --> EXTRACT_FIELDS["Extract prc_grp_cd, svc_kei_stat"]
    EXTRACT_FIELDS --> CHECK_STP_STATUS{"svc_kei_stat ==<br>SVC_KEI_STAT_STP<br>220 (Suspended)?"}
    CHECK_STP_STATUS -->|not suspended| EARLY_RETURN_3(["return statusCode"])

    CHECK_STP_STATUS -->|suspended| CHECK_PRG_GRP{"prc_grp_cd ==<br>PRC_GRP_CD_NET_HM 02<br>OR PRC_GRP_CD_NET_MT 04<br>OR PRC_GRP_CD_NET_MZ 03"}
    CHECK_PRG_GRP -->|network| CHECK_PAYMENT["Check eKK0861B002Hash != null<br>Get payHoshikiCd"]
    CHECK_PRG_GRP -->|not network| GET_STAT_MAP["Get svkeiStatMap from resultHash"]

    CHECK_PAYMENT --> GET_STAT_MAP
    GET_STAT_MAP --> CHECK_USE_STP_BF_STAT{"useStpBfSvcKeiStat ==<br>SVC_KEI_STAT_KYUS 210<br>(Pause/Cut-off)?"}
    CHECK_USE_STP_BF_STAT -->|pause/cut-off| RLS_PAUSE_SVC["getEKK0081C061SC<br>Svc contract pause cancel"]
    CHECK_USE_STP_BF_STAT -->|not pause/cut-off| RLS_SVC["getEKK0081C060SC<br>Svc contract suspension cancel"]

    RLS_PAUSE_SVC --> SET_EXEC_FLG["Set SVC_KEI_USE_STP_RLS_EXEC_FLG=true"]
    RLS_SVC --> SET_EXEC_FLG

    SET_EXEC_FLG --> SET_SPARA_KEY["Build workMap: func_cd=1,<br>shori_cd=KAIHK_PAUSE_STP_RLS 5,<br>svc_kei_no, snst_mt_ymd"]
    SET_SPARA_KEY --> EXEC_SPARA_KEY["JKKSptvKeyInfOperateCC.execute<br>(handle, param, CC_WORK_USE_STP_RLS)"]
    EXEC_SPARA_KEY --> GET_EKK0161B004["getEKK0161B004SC<br>Svc contract details list"]
    GET_EKK0161B004 --> CHECK_DETAIL_RC{"EKK0161B004<br>statusCode != 0?"}
    CHECK_DETAIL_RC -->|yes| EARLY_RETURN_4(["return statusCode"])

    CHECK_DETAIL_RC -->|no| CHECK_DETAIL_LIST{"eKK0161B004HashList<br>size > 0?"}
    CHECK_DETAIL_LIST -->|empty| SET_SOD_DATA_EMPTY["Create SODData with<br>sysid, svc_kei_no<br>Add to hakkoSODDataList"]
    CHECK_DETAIL_LIST -->|not empty| LOOP_START["Loop over eKK0161B004HashList"]

    SET_SOD_DATA_EMPTY --> FINAL_RETURN(["return 0"])

    LOOP_START --> GET_ITEM["Get eKK0161B004Hash item<br>Extract svc_kei_ucwk_no, svc_kei_ucwk_stat"]
    GET_ITEM --> CHECK_UCWK_STP{"svc_kei_ucwk_stat ==<br>SVC_KEI_STAT_STP 220<br>(Suspended)?"}
    CHECK_UCWK_STP -->|not suspended| CHECK_TEIK["svc_kei_ucwk_stat ==<br>SVC_KEI_STAT_TEIK 030<br>(Delivery)?<br>AND network group"]
    CHECK_TEIK -->|no| LOOP_NEXT(["continue loop"])
    CHECK_TEIK -->|yes| SET_SOD_TEIK["Create SODData with<br>sysid, svc_kei_no,<br>svc_kei_ucwk_no, gen_add_dtm<br>Add to hakkoSODDataList"]
    SET_SOD_TEIK --> LOOP_NEXT

    CHECK_UCWK_STP -->|suspended| CALL_A010["callEKK0161A010SC<br>Svc contract detail agreement"]
    CALL_A010 --> CHECK_A010_RC{"EKK0161A010<br>statusCode != 0?"}
    CHECK_A010_RC -->|yes| EARLY_RETURN_5(["return statusCode"])

    CHECK_A010_RC -->|no| GET_A010_HASH["Get eKK0161A010Hash"]
    GET_A010_HASH --> GET_USE_STP_BF["getUseStpBfSvcKeiStat<br>Get useStpBfSvcKeiUcwkStat"]
    GET_USE_STP_BF --> CHECK_UCWK_BF_STAT{"useStpBfSvcKeiUcwkStat ==<br>SVC_KEI_STAT_KYUS 210<br>(Pause/Cut-off)?"}
    CHECK_UCWK_BF_STAT -->|pause/cut-off| RLS_PAUSE_UCWK["getEKK0161C051SC<br>Svc detail pause cancel"]
    CHECK_UCWK_BF_STAT -->|not pause/cut-off| RLS_SVC_UCWK["getEKK0161C050SC<br>Svc detail suspension cancel"]

    RLS_PAUSE_UCWK --> SET_EKK_C051["Get eKK0161C051Hash from result"]
    RLS_SVC_UCWK --> SET_EKK_C050["Get eKK0161C050Hash from result"]
    SET_EKK_C051 --> CHECK_E_MOBILE{"prc_grp_cd ==<br>PRC_GRP_CD_MOB_EM 08"}
    SET_EKK_C050 --> CHECK_E_MOBILE

    CHECK_E_MOBILE -->|mobile| GET_E_MOB_KBN["getEMobileSodKbn<br>Check eMobileSodKbn"]
    GET_E_MOB_KBN --> CHECK_E_MOBILE_KBN{"eMobileSodKbn ==<br>EMOBILE_SOD_KBN_NONE 3?"}
    CHECK_E_MOBILE_KBN -->|none| SET_IS_HAKKO_FALSE["isHakkoSod = false"]
    CHECK_E_MOBILE_KBN -->|not none| SET_IS_HAKKO_TRUE["isHakkoSod = true"]
    CHECK_E_MOBILE -->|not mobile| CHECK_KYUS_KBN{"useStpBfSvcKeiUcwkStat ==<br>SVC_KEI_STAT_KYUS 210?"}
    CHECK_KYUS_KBN -->|pause| SET_IS_HAKKO_FALSE
    CHECK_KYUS_KBN -->|not pause| SET_IS_HAKKO_TRUE

    SET_IS_HAKKO_FALSE --> LOOP_NEXT
    SET_IS_HAKKO_TRUE --> CHECK_IS_HAKKO{"isHakkoSod == true?"}
    CHECK_IS_HAKKO -->|false| LOOP_NEXT
    CHECK_IS_HAKKO -->|true| BUILD_SOD_DATA["Create SODData: sysid, svc_kei_no,<br>svc_kei_ucwk_no, gen_add_dtm<br>Add to hakkoSODDataList"]
    BUILD_SOD_DATA --> LOOP_NEXT
```

**CRITICAL — Constant Resolution:**

| Constant | Resolved Value | Business Meaning |
|----------|---------------|-----------------|
| `SVC_KEI_STAT_STP` | `"220"` | Service contract status: Suspended (利用停止) |
| `SVC_KEI_STAT_KYUS` | `"210"` | Service contract status: Pause/Cut-off (休止・中断中) |
| `SVC_KEI_STAT_TEIK` | `"030"` | Service contract status: Delivery (提供) |
| `PRC_GRP_CD_NET_HM` | `"02"` | Price group code: Network Home (NET ホーム) |
| `PRC_GRP_CD_NET_MT` | `"04"` | Price group code: Network MT (NET MT) |
| `PRC_GRP_CD_NET_MZ` | `"03"` | Price group code: Network MZ (NET MZ) |
| `PRC_GRP_CD_MOB_EM` | `"08"` | Price group code: Mobile eMobile (iMode) |
| `SHORI_CD_KAIHK_PAUSE_STP_RLS` | `"5"` | Processing code: Pause suspension cancellation release (休止暂停解除) |
| `EMOBILE_SOD_KBN_NONE` | `3` | eMobile SOD category: No SOD generation (SOD発行なし) |
| `EMOBILE_SOD_KBN_EM_UCWK` | `1` | eMobile SOD category: eMobile detail (iMode内訳) |
| `EMOBILE_SOD_KBN_UCWK` | `4` | eMobile SOD category: Detail (内訳) |
| `TEMPLATE_ID_EKK0321A010` | `"EKK0321A010"` | Template ID for payment advance agreement |
| `TEMPLATE_ID_EKK0081A010` | `"EKK0081A010"` | Template ID for service contract agreement |
| `TEMPLATE_ID_EKK0861B002` | `"EKK0861B002"` | Template ID for management info list (contract number) |
| `TEMPLATE_ID_EKK0161B004` | `"EKK0161B004"` | Template ID for service contract details list |
| `TEMPLATE_ID_EKK0161A010` | `"EKK0161A010"` | Template ID for service contract detail agreement |
| `TEMPLATE_ID_EKK0161C050` | `"EKK0161C050"` | Template ID for service detail suspension cancel result |
| `TEMPLATE_ID_EKK0161C051` | `"EKK0161C051"` | Template ID for service detail pause cancel result |
| `CC_WORK_USE_STP_RLS` | `"JKKUSESTPRLSRUNCC"` | Work map key for spare key info operation |
| `MAP_KEY_GET_SVKEI_STAT` | `"JKKGetSvkeiStat"` | Map key for get service status result |

## 3. Parameter Analysis

| No | Parameter Name | Type | Business Description |
|----|---------------|------|---------------------|
| 1 | `handle` | `SessionHandle` | Session handle containing the database session and transaction context. Used for all SC calls and data access operations. Represents the current user's session in the business process workflow. |
| 2 | `param` | `IRequestParameterReadWrite` | Request parameter object that carries model groups and control maps. Used to set spare key information for the temporary key operation (スケー情報操作). Modified to inject work map data for `JKKSptvKeyInfOperateCC`. |
| 3 | `requestParam` | `HashMap<String, Object>` | Request parameter map carrying business data across the processing pipeline. Used to set the `SVC_KEI_USE_STP_RLS_EXEC_FLG` execution flag indicating that suspension cancellation is actively being executed. |
| 4 | `resultHash` | `HashMap<String, Object>` | Result hash map that accumulates data from all SC calls (EKK0321A010, EKK0081A010, EKK0861B002, EKK0161B004, EKK0161A010, EKK0161C050, EKK0161C051). Each SC result is stored under its template ID key. Also contains `MAP_KEY_GET_SVKEI_STAT` with pre-computed previous service status data. |
| 5 | `hakkoSODDataList` | `ArrayList<HashMap<String, Object>>` | Service Order Data (SOD) issuance data list — a shared accumulator that collects SOD generation payloads for each suspended service detail line that is being released. Each entry contains `INFO_SYSID`, `INFO_SVC_KEI_NO`, and optionally `INFO_SVC_KEI_UCWK_NO` and `INFO_CHAF_SVC_KEI_UCWK_GENE_ADD_DTM`. This list is consumed by downstream SOD batch processing. |
| 6 | `prm_svc_kei_no` | `String` | Target service contract number parameter — the specific service contract to be checked for suspension cancellation eligibility. Used in `isSvcKeiTargetData` validation and passed to `getUseStpBfSvcKeiStat`. If this contract number does not match the actual contract number from the payment agreement, the method returns early with no processing. |

**Instance fields read:**

| Field | Type | Business Description |
|-------|------|---------------------|
| `oPE_DATE` | `String` | Operational date timestamp set during class initialization via `JCCBPCommon.getOpeDate(null)`. Used as the notification date/time (`snst_mt_ymd`) when recording spare key operation data. |

## 4. CRUD Operations / Called Services

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

| CRUD | SC / CBS | SC Code | Entity / DB | Operation Description |
|------|----------|---------|-------------|----------------------|
| R | `JKKUseStpRlsRunCC.callEKK0161A010SC` | EKK0161A010SC | KK_T_OPSVKEI_UCWK (Service Contract Detail) | Reads and confirms service contract detail line-item agreement data |
| R | `JKKUseStpRlsRunCC.getEKK0081A010SC` | EKK0081A010SC | KK_T_OPSVKEI (Service Contract) | Reads and confirms the service contract agreement — retrieves `prc_grp_cd`, `svc_kei_stat`, `svc_kei_no`, `sysid` |
| R | `JKKUseStpRlsRunCC.getEKK0081C060SC` | EKK0081C060SC | KK_T_OPSVKEI (Service Contract) | Reads service contract to update suspension status to active/delivered |
| R | `JKKUseStpRlsRunCC.getEKK0081C061SC` | EKK0081C061SC | KK_T_OPSVKEI (Service Contract) | Reads service contract to update pause/cut-off status to active/delivered |
| R | `JKKUseStpRlsRunCC.getEKK0161B004SC` | EKK0161B004SC | KK_T_OPSVKEI_UCWK (Service Contract Detail List) | Reads list of all service contract detail lines (内訳) for the given contract number |
| R | `JKKUseStpRlsRunCC.getEKK0161C050SC` | EKK0161C050SC | KK_T_OPSVKEI_UCWK (Service Contract Detail) | Reads service contract detail to update its suspension status to active/delivered |
| R | `JKKUseStpRlsRunCC.getEKK0161C051SC` | EKK0161C051SC | KK_T_OPSVKEI_UCWK (Service Contract Detail) | Reads service contract detail to update its pause/cut-off status to active/delivered |
| R | `JKKUseStpRlsRunCC.getEMobileSodKbn` | (internal helper) | — | Determines whether an iMode mobile SOD must be issued based on previous contract and detail statuses |
| R | `JKKUseStpRlsRunCC.getUseStpBfSvcKeiStat` | (internal helper) | KK_T_KK0081 / KK_T_KK0161 | Retrieves the previous service status (before suspension) for both the top-level contract and detail lines |
| - | `JKKSptvKeyInfOperateCC.execute` | — | (temporary key storage) | Executes spare key information operation — records the suspension cancellation event metadata for TV new course (skyper key) integration |
| - | `JBSbatAKKshkmRsltInfoTukiawsday.setData` | — | — | Sets result data (inherited from parent class, used elsewhere) |
| - | `JBSbatAKKshkmRsltInfoTukiaws.setData` | — | — | Sets result data (inherited from parent class, used elsewhere) |
| - | `JBSbatAKKshkmRsltInfoTukiawsRealSkh.setData` | — | — | Sets result data (inherited from parent class, used elsewhere) |
| - | `JBSbatAKKshkmRsltInfTkCvsNCnsl.setData` | — | — | Sets result data (inherited from parent class, used elsewhere) |
| - | `JBSbatKKGetCTITelno.setData` | — | — | Sets result data (inherited from parent class, used elsewhere) |
| - | `JKKUseStpRlsRunCC.isSvcKeiTargetData` | (internal helper) | — | Validates whether the target service contract number (`prm_svc_kei_no`) matches the actual contract number extracted from the payment agreement |

## 5. Dependency Trace

| # | Caller (Screen/Batch) | Call Chain (Full Path to this Method) | Terminal (SC / CRUD / Entity) |
|---|----------------------|--------------------------------------|-------------------------------|
| 1 | `JKKUseStpRlsRunCC.executeUseStpRlsMain()` | `executeUseStpRlsMain` -> `executeSvcKei_UseStp` | `getEMobileSodKbn [R]`, `getEKK0161C050SC [R]`, `getEKK0161C051SC [R]`, `getUseStpBfSvcKeiStat [R]`, `callEKK0161A010SC [R]`, `getEKK0161B004SC [R]`, `execute [-]`, `setData [-]`, `getEKK0081C060SC [R]`, `getEKK0081C061SC [R]`, `getEKK0081A010SC [R]`, `isSvcKeiTargetData [-]` |
| 2 | `JKKOrsjgsUseStpRlsRunCC.executeSvcKei_UseStp()` (similar logic in ORSJGS variant) | `executeSvcKei_UseStp` (ORSJGS variant) | Same terminal operations as above |

**Caller Details:**

| # | Caller Class | Kind | Notes |
|---|-------------|------|-------|
| 1 | `JKKUseStpRlsRunCC.executeUseStpRlsMain()` | CC / Common Component | Main entry point for suspension cancellation processing. Calls `executeSvcKei_UseStp` as part of the top-level orchestration flow. |
| 2 | `JKKOrsjgsUseStpRlsRunCC.executeSvcKei_UseStp()` | CC / Common Component | ORSJGS (Optional Service) variant of the same method in a parallel class with identical signature and logic. |

## 6. Per-Branch Detail Blocks

**Block 1** — SET (initialization) (L925)

> Initialize return code and retrieve payment advance agreement result from resultHash.

| # | Type | Code |
|---|------|------|
| 1 | SET | `statusCode = 0` // Status code initialization |
| 2 | SET | `eKK0321A010Hash = (HashMap)resultHash.get(TEMPLATE_ID_EKK0321A010)` // Get payment advance agreement result template |
| 3 | SET | `svc_kei_no = (String)eKK0321A010Hash.get(EKK0321A010CBSMsg1List.SVC_KEI_NO)` // Extract service contract number from payment advance |

**Block 2** — IF (target data validation) (L935)

> Determine whether the target service contract number matches the actual contract number. If not a target, return early with success code 0. This is a 2013/07/19 ADD.

| # | Type | Code |
|---|------|------|
| 1 | CALL | `isSvcKeiTargetData(prm_svc_kei_no, svc_kei_no)` // Check if this contract is the target for suspension cancellation |
| 2 | IF | `!isSvcKeiTargetData(...)` |
| 2.1 | RETURN | `return statusCode` // Not a target — exit early |

**Block 3** — SET / CALL (service contract agreement) (L949)

> Retrieve the service contract agreement data. This confirms the contract exists and provides the price group code and status.

| # | Type | Code |
|---|------|------|
| 1 | CALL | `getEKK0081A010SC(param, handle, requestParam, resultHash, svc_kei_no)` // Service contract agreement |
| 2 | IF | `statusCode != 0` |
| 2.1 | RETURN | `return statusCode` // Contract agreement failed — exit |

**Block 4** — SET (extract fields from contract agreement) (L957)

> Extract the price group code and service contract status from the contract agreement result.

| # | Type | Code |
|---|------|------|
| 1 | SET | `eKK0081A010Hash = (HashMap)resultHash.get(TEMPLATE_ID_EKK0081A010)` |
| 2 | SET | `prc_grp_cd = (String)eKK0081A010Hash.get(EKK0081A010CBSMsg1List.PRC_GRP_CD)` // Price group code |
| 3 | SET | `svc_kei_stat = (String)eKK0081A010Hash.get(EKK0081A010CBSMsg1List.SVC_KEI_STAT)` // Service contract status |

**Block 5** — IF (suspended status check) (L965)

> Only proceed if the service contract status is "Suspended" (220). This is the fundamental precondition — if the contract is not suspended, there is nothing to cancel.

| # | Type | Code |
|---|------|------|
| 1 | IF | `!SVC_KEI_STAT_STP.equals(svc_kei_stat)` [SVC_KEI_STAT_STP = "220" (利用停止/Suspended)] |
| 1.1 | RETURN | `return statusCode` // Not suspended — nothing to release |

**Block 6** — IF (network price group check) (L972)

> For network service groups (Home/MT/MZ), check the management info list for payment method context. The actual payment check logic is commented out (ANK-2801-00-00 DEL), but the hash retrieval is retained.

| # | Type | Code |
|---|------|------|
| 1 | IF | `prc_grp_cd == PRC_GRP_CD_NET_HM (02) OR PRC_GRP_CD_NET_MT (04) OR PRC_GRP_CD_NET_MZ (03)` |
| 1.1 | SET | `eKK0861B002Hash = (HashMap)resultHash.get(TEMPLATE_ID_EKK0861B002)` // Management info list |
| 1.2 | IF | `eKK0861B002Hash != null` |
| 1.2.1 | SET | `payHoshikiCd = (String)eKK0861B002Hash.get(EKK0861B002CBSMsg1List.KANYU_KEI_PAY_HOSHIKI_CD)` // Payment method code |
| 1.2.2 | // | Commented out: old payment check logic (ANCHI/KYOSHI) deleted per ANK-2801-00-00 |

**Block 7** — IF (previous service status check for pause/cut-off) (L995)

> KT1-2013-0000766 ADD: If the service was previously in "Pause/Cut-off" (休止・中断中) state, use a different SC for cancellation. If not, use the standard suspension cancellation. This distinguishes between contracts that were paused (temporarily halted) vs. those that were suspended.

| # | Type | Code |
|---|------|------|
| 1 | SET | `svkeiStatMap = (HashMap)resultHash.get(MAP_KEY_GET_SVKEI_STAT)` // Previous status map |
| 2 | SET | `useStpBfSvcKeiStat = (String)svkeiStatMap.get(JKKGetSvkeiStatConstCC.LAST_KK0081_STAT)` // Status before suspension |
| 3 | IF | `SVC_KEI_STAT_KYUS.equals(useStpBfSvcKeiStat)` [SVC_KEI_STAT_KYUS = "210" (休止・中断中/Pause/Cut-off)] |
| 3.1 | CALL | `getEKK0081C061SC(param, handle, requestParam, resultHash)` // Pause/cut-off service contract cancel |
| 3.2 | IF | `statusCode != 0` |
| 3.2.1 | RETURN | `return statusCode` // Pause cancel failed |
| 3.3 ELSE | // | (no action needed — falls through) |
| 4 ELSE | // | Not pause/cut-off |
| 4.1 | CALL | `getEKK0081C060SC(param, handle, requestParam, resultHash)` // Standard suspension cancel |
| 4.2 | IF | `statusCode != 0` |
| 4.2.1 | RETURN | `return statusCode` // Suspension cancel failed |

**Block 8** — SET (execution flag) (L1028)

> Set the execution flag to indicate that suspension cancellation is actively in progress.

| # | Type | Code |
|---|------|------|
| 1 | SET | `requestParam.put(SVC_KEI_USE_STP_RLS_EXEC_FLG, true)` // Mark execution in progress |

**Block 9** — SET / EXEC (spare key operation) (L1033, ANK-4592-00-00 ADD)

> ANK-4592-00-00: Build spare key (スカパー) operation work map and call the spare key info operation component. This supports the TV new course (skyper key) introduction.

| # | Type | Code |
|---|------|------|
| 1 | SET | `workMap = new HashMap()` |
| 2 | SET | `workMap.put("func_cd", "1")` |
| 3 | SET | `workMap.put("shori_cd", SHORI_CD_KAIHK_PAUSE_STP_RLS "5")` // Pause suspension release |
| 4 | SET | `workMap.put("svc_kei_no", eKK0081A010Hash.get(EKK0081A010CBSMsg1List.SVC_KEI_NO))` |
| 5 | SET | `workMap.put("snst_mt_ymd", oPE_DATE)` // Operation date |
| 6 | EXEC | `param.setData(CC_WORK_USE_STP_RLS, workMap)` // Set work map into param |
| 7 | SET | `JKKSptvKeyInfOperateCC = new JKKSptvKeyInfOperateCC()` |
| 8 | EXEC | `JKKSptvKeyInfOperateCC.execute(handle, param, CC_WORK_USE_STP_RLS)` // Execute spare key operation |

**Block 10** — CALL (service contract details list) (L1049)

> Retrieve the full list of service contract detail lines (内訳) to process each suspended detail individually.

| # | Type | Code |
|---|------|------|
| 1 | CALL | `getEKK0161B004SC(param, handle, requestParam, resultHash, svc_kei_no)` // Contract details list |
| 2 | IF | `statusCode != 0` |
| 2.1 | RETURN | `return statusCode` // Details list fetch failed |

**Block 11** — IF (details list empty vs. non-empty) (L1052)

> Branch based on whether the contract has any detail lines (内訳). If empty, create a minimal SOD data with just the contract-level data.

| # | Type | Code |
|---|------|------|
| 1 | SET | `eKK0161B004HashList = (ArrayList)resultHash.get(TEMPLATE_ID_EKK0161B004)` |
| 2 | IF | `eKK0161B004HashList.size() > 0` |
| 2.1 | FOR | Loop over `eKK0161B004HashList` (idx_su 0..size-1) |
| 3 ELSE | // | Empty list — create minimal SOD data |
| 3.1 | SET | `SODData = new HashMap()` |
| 3.2 | SET | `SODData.put(INFO_SYSID, eKK0081A010Hash.get(EKK0081A010CBSMsg1List.SYSID))` |
| 3.3 | SET | `SODData.put(INFO_SVC_KEI_NO, eKK0081A010Hash.get(EKK0081A010CBSMsg1List.SVC_KEI_NO))` |
| 3.4 | EXEC | `hakkoSODDataList.add(SODData)` |
| 3.5 | RETURN | `return 0` |

**Block 11.1** — FOR loop body (L1058)

> Iterate over each service contract detail line.

| # | Type | Code |
|---|------|------|
| 1 | SET | `eKK0161B004Hash = eKK0161B004HashList.get(idx_su)` |
| 2 | SET | `svc_kei_ucwk_no = (String)eKK0161B004Hash.get(EKK0161B004CBSMsg1List.SVC_KEI_UCWK_NO)` // Detail line number |
| 3 | SET | `svc_kei_ucwk_stat = (String)eKK0161B004Hash.get(EKK0161B004CBSMsg1List.SVC_KEI_UCWK_STAT)` // Detail line status |

**Block 11.2** — IF (detail suspended status check) (L1066)

> If this detail line is suspended (220), process the suspension cancellation for this line item.

| # | Type | Code |
|---|------|------|
| 1 | IF | `SVC_KEI_STAT_STP.equals(svc_kei_ucwk_stat)` [SVC_KEI_STAT_STP = "220" (利用停止)] |
| 1.1 | CALL | `callEKK0161A010SC(param, handle, svc_kei_ucwk_no, resultHash)` // Detail line agreement |
| 1.2 | IF | `statusCode != 0` |
| 1.2.1 | RETURN | `return statusCode` // Detail agreement failed |

**Block 11.2.1** — SET (detail agreement result) (L1077)

> Get the detail agreement result and the previous status of this detail line.

| # | Type | Code |
|---|------|------|
| 1 | SET | `eKK0161A010Hash = (HashMap)resultHash.get(TEMPLATE_ID_EKK0161A010)` |
| 2 | SET | `svkeiStatMap = getUseStpBfSvcKeiStat(handle, param, prm_svc_kei_no, svc_kei_ucwk_no)` // Previous detail status |
| 3 | SET | `useStpBfSvcKeiUcwkStat = (String)svkeiStatMap.get(JKKGetSvkeiStatConstCC.LAST_KK0161_STAT)` |

**Block 11.2.2** — IF (detail previous status — pause/cut-off check) (L1086)

> KT1-2013-0000766: If this detail was previously in pause/cut-off, use C051SC. Otherwise use C050SC.

| # | Type | Code |
|---|------|------|
| 1 | IF | `SVC_KEI_STAT_KYUS.equals(useStpBfSvcKeiUcwkStat)` [210 (休止・中断中)] |
| 1.1 | CALL | `getEKK0161C051SC(param, handle, eKK0161A010Hash, resultHash)` // Detail pause cancel |
| 1.2 | IF | `statusCode != 0` |
| 1.2.1 | RETURN | `return statusCode` |
| 1.3 | SET | `eKK0161C05XHash = (HashMap)resultHash.get(TEMPLATE_ID_EKK0161C051)` |
| 2 ELSE | // | Not pause/cut-off |
| 2.1 | CALL | `getEKK0161C050SC(param, handle, eKK0161A010Hash, resultHash)` // Detail suspension cancel |
| 2.2 | IF | `statusCode != 0` |
| 2.2.1 | RETURN | `return statusCode` |
| 2.3 | SET | `eKK0161C05XHash = (HashMap)resultHash.get(TEMPLATE_ID_EKK0161C050)` |

**Block 11.2.3** — IF (eMobile SOD generation decision) (L1117)

> KT1-2013-0000766: Determine whether an SOD must be issued for this detail line. For iMode mobile services, the decision depends on the eMobile SOD category. For non-mobile, only generate if previous status was NOT pause/cut-off.

| # | Type | Code |
|---|------|------|
| 1 | SET | `isHakkoSod = true` // Default: generate SOD |
| 2 | SET | `eMobileSodKbn = 0` |
| 3 | IF | `prc_grp_cd == PRC_GRP_CD_MOB_EM (08)` [iMode mobile] |
| 3.1 | CALL | `eMobileSodKbn = getEMobileSodKbn(useStpBfSvcKeiStat, useStpBfSvcKeiUcwkStat)` |
| 3.2 | IF | `eMobileSodKbn == EMOBILE_SOD_KBN_NONE (3)` |
| 3.2.1 | SET | `isHakkoSod = false` // No SOD for this eMobile category |
| 4 ELSE | // | Not iMode mobile |
| 4.1 | IF | `SVC_KEI_STAT_KYUS.equals(useStpBfSvcKeiUcwkStat)` [210] |
| 4.1.1 | SET | `isHakkoSod = false` // Previous state was pause — no SOD needed |
| 5 | IF | `isHakkoSod` |
| 5.1 | SET | `SODData = new HashMap()` |
| 5.2 | SET | `SODData.put(INFO_SYSID, eKK0081A010Hash.get(EKK0081A010CBSMsg1List.SYSID))` |
| 5.3 | SET | `SODData.put(INFO_SVC_KEI_NO, eKK0081A010Hash.get(EKK0081A010CBSMsg1List.SVC_KEI_NO))` |
| 5.4 | IF | `eMobileSodKbn == 0 OR EMOBILE_SOD_KBN_EM_UCWK (1) OR EMOBILE_SOD_KBN_UCWK (4)` |
| 5.4.1 | SET | `SODData.put(INFO_SVC_KEI_UCWK_NO, eKK0161C05XHash.get(EKK0161C050CBSMsg.SVC_KEI_UCWK_NO))` |
| 5.4.2 | SET | `SODData.put(INFO_CHAF_SVC_KEI_UCWK_GENE_ADD_DTM, eKK0161C05XHash.get(EKK0161C050CBSMsg.GENE_ADD_DTM))` |
| 5.5 | EXEC | `hakkoSODDataList.add(SODData)` // Add SOD data to accumulator |

**Block 11.3** — ELSE IF (delivery status with network co-change) (L1154, OM-2016-0000008 ADD)

> OM-2016-0000008: Handle the case where a network service detail line is in "Delivery" (提供, 030) status during a co-change (ko-hen) process. Generate SOD data for certification on the new recognition side.

| # | Type | Code |
|---|------|------|
| 1 | ELSE IF | `SVC_KEI_STAT_TEIK.equals(svc_kei_ucwk_stat) AND (network group)` [030 (提供) AND PRC_GRP_CD_NET_HM/MT/MZ] |
| 1.1 | SET | `SODData = new HashMap()` |
| 1.2 | SET | `SODData.put(INFO_SYSID, eKK0081A010Hash.get(EKK0081A010CBSMsg1List.SYSID))` |
| 1.3 | SET | `SODData.put(INFO_SVC_KEI_NO, eKK0081A010Hash.get(EKK0081A010CBSMsg1List.SVC_KEI_NO))` |
| 1.4 | SET | `SODData.put(INFO_SVC_KEI_UCWK_NO, eKK0161B004Hash.get(EKK0161B004CBSMsg1List.SVC_KEI_UCWK_NO))` |
| 1.5 | SET | `SODData.put(INFO_CHAF_SVC_KEI_UCWK_GENE_ADD_DTM, eKK0161B004Hash.get(EKK0161B004CBSMsg1List.GENE_ADD_DTM))` |
| 1.6 | EXEC | `hakkoSODDataList.add(SODData)` |

**Block 11.4** — ELSE (skip) (L1165)

> For any other detail line status (not suspended, not delivery in network co-change), skip processing.

| # | Type | Code |
|---|------|------|
| 1 | ELSE | // Not suspended, not delivery in co-change |
| 1.1 | EXEC | `continue` // Skip this detail line |

## 7. Glossary

| Term | Type | Business Meaning |
|------|------|------------------|
| `svc_kei_no` | Field | Service contract number — unique identifier for a customer's service contract (サービス契約番号) |
| `svc_kei_stat` | Field | Service contract status — current state code (030=Delivery, 210=Pause, 220=Suspended) |
| `svc_kei_ucwk_no` | Field | Service contract detail (line-item) number — identifies individual service components within a contract (サービス契約内訳番号) |
| `svc_kei_ucwk_stat` | Field | Service contract detail status — status of an individual line item |
| `prc_grp_cd` | Field | Price group code — classifies the pricing tier/type (02=Network Home, 03=Network MZ, 04=Network MT, 08=Mobile eMobile) |
| `hakkoSODDataList` | Field | SOD issuance data list — accumulator for Service Order Data generation payloads |
| SOD | Acronym | Service Order Data — order fulfillment record generated for downstream processing (サービスオーダ発行データ) |
| 利用停止 (Riyoshi Teishi) | Business term | Service suspension — the state where a customer's service is blocked (status "220") |
| 利用停止解除 (Riyoshi Teishi Kaidoku) | Business term | Suspension cancellation / release — the process of un-blocking a suspended service (what this method implements) |
| 休止 (Kyushu) | Business term | Service pause — temporary halt of service, distinct from suspension (status "210") |
| 中断 (Chudan) | Business term | Service cut-off — more severe than pause, often due to non-payment |
| 提供 (Teikyo) | Business term | Delivery/Active service — the contract is actively providing service (status "030") |
| 内訳 (Uchiwake) | Business term | Service contract detail / line-item — sub-components of a service contract (e.g., internet, TV, phone bundles) |
| 同意照会 (Doui Shokai) | Business term | Agreement inquiry — SC operation that reads and confirms contract data |
| 停止解除 (Teishi Kaidoku) | Business term | Suspension cancellation — updating a suspended contract back to active status |
| スパーキー情報操作 (Sparkey Joho Soussa) | Business term | Spare key (skyper key) information operation — TV/new course integration for satellite broadcasting keys |
| コー変更 (Ko-hen) | Business term | Co-change / line change — process of changing a customer's service line or configuration |
| iMode | Business term | NTT DOCOMO's mobile service platform — in this context, refers to mobile/eMobile service contracts |
| eMobile SOD Kbn | Field | eMobile SOD category — classification for whether mobile SOD generation is needed (0=None, 1=eMobile detail, 3=No SOD, 4=Detail) |
| EKK0321A010 | SC Code | Payment advance agreement SC — retrieves billing/payment agreement data |
| EKK0081A010 | SC Code | Service contract agreement SC — reads and confirms the service contract |
| EKK0081C060 | SC Code | Service contract suspension cancel SC — cancels standard suspension |
| EKK0081C061 | SC Code | Service contract pause cancel SC — cancels pause/cut-off state |
| EKK0161A010 | SC Code | Service contract detail agreement SC — reads/confirm a contract detail line |
| EKK0161B004 | SC Code | Service contract details list SC — retrieves all detail lines for a contract |
| EKK0161C050 | SC Code | Service detail suspension cancel SC — cancels suspension on a detail line |
| EKK0161C051 | SC Code | Service detail pause cancel SC — cancels pause on a detail line |
| KK_T_OPSVKEI | DB Table | Service contract master table (サービス契約マスター) |
| KK_T_OPSVKEI_UCWK | DB Table | Service contract detail table (サービス契約内訳) |
| KK_T_KK0081 | DB Table | Previous service status table for top-level contract |
| KK_T_KK0161 | DB Table | Previous service status table for contract detail lines |
| `SHORI_CD_KAIHK_PAUSE_STP_RLS` | Constant | Processing code "5" — Pause suspension cancellation release (休止暂停解除処理コード) |
| `SVC_KEI_USE_STP_RLS_EXEC_FLG` | Constant | Execution flag key — marks suspension cancellation as in-progress |
| `CC_WORK_USE_STP_RLS` | Constant | Work map key "JKKUSESTPRLSRUNCC" — spare key info operation work map identifier |
| `oPE_DATE` | Instance Field | Operational date — obtained via `JCCBPCommon.getOpeDate()`, used as the notification date in spare key operations |
