# Business Logic — JKKOrsjgsUseStpRlsRunCC.executeUseStpRlsMain() [334 LOC]

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

## 1. Role

### JKKOrsjgsUseStpRlsRunCC.executeUseStpRlsMain()

This method is the **main processing entry point for releasing (unfreezing) use suspension** on a downstream contractor's service contracts within the eo customer base system. "Use suspension" (利用停止) is a telecom business operation where a subscriber's service is temporarily suspended (e.g., due to non-payment, cancellation, or equipment removal). This method performs the **suspension release** (利用停止解除) operation, systematically iterating through all associated service contracts and lifting their suspended status.

The method follows a **route-and-dispatch design pattern**. It first performs preliminary validations — including checking the billing group code to skip processing for certain service types (mineo and eo electricity) — and then retrieves the billing front agreement list. For each billing front entry, it branches into four parallel service contract processing paths: service contract (svc_kei_no), option service contract (op_svc_kei_no), sub-option service contract (sbop_svc_kei_no), and equipment-provided service contract (kktk_svc_kei_no). Each branch delegates to its specialized handler method.

Additionally, if the service contract is classified as a telephone service (SVC_CD_TEL = "02"), the method performs a secondary equipment suspension (executeKktkSvcKei_UseStp2) to also release ONU or VDSL modem equipment that is tied to the fiber network. After all contract releases are processed, the method optionally triggers a service control management release (executeSvcCtlUseStpReq) if the processing flag is set, and finally registers any ex-contractor suspension release instruction orders when the update flag indicates pending data exists.

The method serves as a **shared business component** called by the entry point method `orsjgsRunUseStpRls()`. It is the core orchestrator in the downstream contractor service contract suspension release workflow, coordinating multiple service components and ensuring all associated contracts and equipment are properly unsuspended.

## 2. Processing Pattern (Detailed Business Logic)

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

    START --> Init["Initialize: statusCode=0, resultHash, hakkoSODDataList, SVC_KEI_USE_STP_RLS_EXEC_FLG false"]

    Init --> GetSvcKeiNo["Extract prm_svc_kei_no from requestParam"]

    GetSvcKeiNo --> CallEKK0081A010["Call getEKK0081A010SC - Service contract agreement consultation"]

    CallEKK0081A010 --> CheckEKK0081A010{statusCode != 0?}

    CheckEKK0081A010 -->|Yes| ReturnErr["Return statusCode"]
    CheckEKK0081A010 -->|No| GetEKK0081A010Result["Get eKK0081A010Hash from resultHash"]

    GetEKK0081A010Result --> GetPrcGrpCd["Extract prc_grp_cd from eKK0081A010Hash"]

    GetPrcGrpCd --> CheckMineo{prc_grp_cd is mineo?}

    CheckMineo -->|Yes| ReturnMin[("Return 0 skip processing")]
    CheckMineo -->|No| CheckEdenki{prc_grp_cd is eo electricity?}

    CheckEdenki -->|Yes| ReturnEdenki[("Return 0 skip processing")]
    CheckEdenki -->|No| CallEKK0861B002["Call getEKK0861B002SC - Management info acquisition"]

    CallEKK0861B002 --> CheckEKK0861B002{statusCode != 0?}

    CheckEKK0861B002 -->|Yes| ReturnErr2["Return statusCode"]
    CheckEKK0861B002 -->|No| CheckFuka{isUseStpFukaCheck?}

    CheckFuka -->|true| SetFukaFlg["Set wk_Fuka_flg true - Return 0"]
    CheckFuka -->|false| CallEKK0321B005["Call callEKK0321B005SC - Billing front list"]

    CallEKK0321B005 --> CheckEKK0321B005{statusCode != 0?}

    CheckEKK0321B005 -->|Yes| ReturnErr3["Return statusCode"]
    CheckEKK0321B005 -->|No| CheckEKK0321B005Sz{eKK0321B005HashList empty?}

    CheckEKK0321B005Sz -->|Yes| ReturnEmpty1[("Return 0")]
    CheckEKK0321B005Sz -->|No| GetSeikyKeiNo["Extract seikyu_kei_no from first entry"]

    GetSeikyKeiNo --> CallEKK0321B002["Call getEKK0321B002SC - Billing front agreement"]

    CallEKK0321B002 --> CheckEKK0321B002St{statusCode != 0?}

    CheckEKK0321B002St -->|Yes| ReturnErr4["Return statusCode"]
    CheckEKK0321B002St -->|No| CheckEKK0321B002Sz2{eKK0321B002HashList empty?}

    CheckEKK0321B002Sz2 -->|Yes| ReturnEmpty2[("Return 0")]
    CheckEKK0321B002Sz2 -->|No| GetSvcStat["Set MAP_KEY_GET_SVKEI_STAT service contract status"]

    GetSvcStat --> ForLoop["For each eKK0321B002Hash entry"]

    ForLoop --> GetEKK0321A010["Call getEKK0321A010SC - Billing front agreement"]

    GetEKK0321A010 --> CheckNull{eKK0321A010Hash null?}

    CheckNull -->|Yes| NextIter["continue"]
    CheckNull -->|No| ExtractFields["Extract svc_kei_no, kktk_svc_kei_no, op_svc_kei_no, sbop_svc_kei_no"]

    ExtractFields --> CheckSvcKei{svc_kei_no valid?}

    CheckSvcKei -->|Yes| CallSvcKei["Call executeSvcKei_UseStp"]
    CheckSvcKei -->|No| CheckOpSvcKei

    CallSvcKei --> CheckSvcKeiSt{statusCode != 0?}

    CheckSvcKeiSt -->|Yes| ReturnErr5["Return statusCode"]
    CheckSvcKeiSt -->|No| CheckOpSvcKei{op_svc_kei valid AND sbop empty?}

    CheckOpSvcKei -->|Yes| CallOpSvc["Call executeOpSvcKei_UseStp"]
    CheckOpSvcKei -->|No| CheckSbopSvcKei{sbop_svc_kei_no valid?}

    CallOpSvc --> CheckOpSvcSt{statusCode != 0?}

    CheckOpSvcSt -->|Yes| ReturnErr6["Return statusCode"]
    CheckOpSvcSt -->|No| CheckSbopSvcKei

    CheckSbopSvcKei -->|Yes| CallSbopSvc["Call executeSbOpSvcKei_UseStp"]
    CheckSbopSvcKei -->|No| CheckKktkSvcKei{kktk_svc_kei_no valid?}

    CallSbopSvc --> CheckSbopSvcSt{statusCode != 0?}

    CheckSbopSvcSt -->|Yes| ReturnErr7["Return statusCode"]
    CheckSbopSvcSt -->|No| CheckKktkSvcKei

    CheckKktkSvcKei -->|Yes| CallKktk["Call executeKktkSvcKei_UseStp"]
    CheckKktkSvcKei -->|No| NextIter

    CallKktk --> CheckKktkSt{statusCode != 0?}

    CheckKktkSt -->|Yes| ReturnErr8["Return statusCode"]
    CheckKktkSt -->|No| NextIter

    NextIter --> EndLoop["End for loop iteration"]
    EndLoop --> CheckKktkSvcKei2

    CheckKktkSvcKei2["After loop: eKK0081A010Hash exists AND SVC_CD is Telephone?"]

    CheckKktkSvcKei2 -->|Yes| CallKktk2["Call executeKktkSvcKei_UseStp2 - ONU VDSL suspension"]
    CheckKktkSvcKei2 -->|No| CheckProgStat

    CallKktk2 --> CheckKktk2St{statusCode != 0?}

    CheckKktk2St -->|Yes| ReturnErr9["Return statusCode"]
    CheckKktk2St -->|No| CheckProgStat["Call getEKK1091D010SC - Progress registration"]

    CheckProgStat --> CheckProgSt{statusCode != 0?}

    CheckProgSt -->|Yes| ReturnErr10["Return statusCode"]
    CheckProgSt -->|No| CheckExecFlg{SVC_KEI_USE_STP_RLS_EXEC_FLG true?}

    CheckExecFlg -->|Yes| CallSvcCtl["Call executeSvcCtlUseStpReq - Service control management"]
    CheckExecFlg -->|No| CallEKK0081B547

    CallSvcCtl --> CheckSvcCtlSt{statusCode != 0?}

    CheckSvcCtlSt -->|Yes| ReturnErr11["Return statusCode"]
    CheckSvcCtlSt -->|No| CallEKK0081B547["Call callEKK0081B547SC - Ex-contractor release info"]

    CallEKK0081B547 --> CheckEKK0081B547St{statusCode != 0?}

    CheckEKK0081B547St -->|Yes| ReturnErr12["Return statusCode"]
    CheckEKK0081B547St -->|No| CheckEKK0081B547List{eKK0081B547HashList not empty?}

    CheckEKK0081B547List -->|No| ReturnOk[("Return 0 Normal end")]
    CheckEKK0081B547List -->|Yes| GetFirstEntry["Get first entry from eKK0081B547HashList"]

    GetFirstEntry --> GetUpdUm["Extract updUm from entry"]

    GetUpdUm --> CheckUpdUm{updUm is 1 update?}

    CheckUpdUm -->|No| ReturnOk
    CheckUpdUm -->|Yes| GetSysid["Extract sysid"]

    GetSysid --> CallShijisho["Call orsjgsrunUseStpKaijoAddShijisho - Ex-contractor instruction"]

    CallShijisho --> CheckShijishoSt{statusCode != 0?}

    CheckShijishoSt -->|Yes| ReturnErr13["Return statusCode"]
    CheckShijishoSt -->|No| ReturnOk

    ReturnErr --> END_NODE(["End"])
    ReturnErr2 --> END_NODE
    ReturnErr3 --> END_NODE
    ReturnErr4 --> END_NODE
    ReturnErr5 --> END_NODE
    ReturnErr6 --> END_NODE
    ReturnErr7 --> END_NODE
    ReturnErr8 --> END_NODE
    ReturnErr9 --> END_NODE
    ReturnErr10 --> END_NODE
    ReturnErr11 --> END_NODE
    ReturnErr12 --> END_NODE
    ReturnErr13 --> END_NODE
    ReturnMin --> END_NODE
    ReturnEdenki --> END_NODE
    ReturnEmpty1 --> END_NODE
    ReturnEmpty2 --> END_NODE
    SetFukaFlg --> END_NODE
    NextIter --> END_ITER([Next for-loop iteration])
    END_ITER --> EndLoop
    ReturnOk --> END_NODE
```

**Block descriptions:**

- **Initialization (L492–505):** Sets up local variables, initializes the suspension release execution flag to `false`, and creates the SOD (Service Order Data) emission data list.
- **Service Contract Agreement Lookup (L507–517):** Calls `getEKK0081A010SC` to retrieve the service contract agreement details for the target service contract number (`prm_svc_kei_no`). Returns early on error.
- **Billing Group Code Filtering (L519–531):** Extracts the price group code (`prc_grp_cd`) and **skips processing entirely** if the code is `51` (mineo) or `17` (eo electricity). These are non-eligible service categories for suspension release.
- **Management Info Acquisition (L533–540):** Calls `getEKK0861B002SC` to obtain management information associated with the service contract.
- **Use Suspension Release Feasibility Check (L542–548):** Invokes `isUseStpFukaCheck` to determine whether the suspension release is feasible. If infeasible (e.g., active contract, TV/KCN), sets `wk_Fuka_flg = true` and returns 0.
- **Billing Front List Acquisition (L550–573):** Calls `callEKK0321B005SC` to retrieve the billing front list (invoice list). If no entries exist, returns 0. Otherwise, extracts the invoice contract number (`seikyu_kei_no`) from the first entry.
- **Billing Front Agreement Acquisition (L575–587):** Calls `getEKK0321B002SC` to obtain detailed billing front agreement data. If no entries exist, returns 0.
- **Service Contract Status Cache (L589):** Pre-fetches the pre-suspension service contract status via `getUseStpSvcKeiStat` and caches it in `resultHash`.
- **Main Iteration Loop (L591–702):** Iterates over each billing front agreement entry. For each entry, retrieves the billing front consultation (`getEKK0321A010SC`) and extracts four service contract numbers. Each valid service contract type triggers its own suspension release handler.
- **Post-Loop Equipment Suspension (L704–714):** If the original service is classified as telephone (`SVC_CD_TEL = "02"`), calls `executeKktkSvcKei_UseStp2` to suspend ONU/VDSL modem equipment attached to the eo fiber network.
- **Progress Registration (L718–726):** Calls `getEKK1091D010SC` to register the progress state of the suspension release operation.
- **Service Control Management Release (L728–740):** If the `SVC_KEI_USE_STP_RLS_EXEC_FLG` flag is `true`, calls `executeSvcCtlUseStpReq` to execute service control management suspension release processing, passing along the SOD emission data list.
- **Ex-Contractor Instruction Registration (L742–776):** Calls `callEKK0081B547SC` to retrieve ex-contractor suspension release instruction registration data. If data exists and the update flag (`updUm`) is `"1"`, calls `orsjgsrunUseStpKaijoAddShijisho` to register the instruction with the extracted SYSID.

## 3. Parameter Analysis

| No | Parameter Name | Type | Business Description |
|----|---------------|------|---------------------|
| 1 | `handle` | `SessionHandle` | Session handle carrying session manager context and database connection resources. Used throughout the method to invoke service components and manage the transaction scope. |
| 2 | `param` | `IRequestParameterReadWrite` | Request parameter object containing the model group and control map. Carries data between screens/business components and provides `getData()` access to business data maps keyed by `fixedText`. |
| 3 | `requestParam` | `HashMap<String, Object>` | Request parameter map. Key business carrier holding: `svc_kei_no` (target service contract number), `SVC_KEI_USE_STP_RLS_EXEC_FLG` (processing flag set by the method itself), and intermediate results from service component calls stored under template IDs (e.g., `EKK0081A010`, `EKK0321B005`). |
| 4 | `fixedText` | `String` | User-specified arbitrary string. Acts as a data key to access the business data map within `param.getData(fixedText)`. Allows the same method to handle multiple concurrent processing contexts. |
| 5 | `fukaUseStpRlsTrgtLst` | `ArrayList<HashMap<String, Object>>` | List of service contracts that are **not eligible** for use suspension release. Each entry contains `svc_kei_no` (service contract number), `svc_kei_name` (service contract name), and `fuka_reson` (infeasibility reason code: "01" = request cancellation, "02" = in-process contract, "03" = eo TV/KCN). Used by `isUseStpFukaCheck` to determine if release should be blocked. |

**Instance fields / external state read by this method:**

| Field | Type | Business Description |
|-------|------|---------------------|
| `wk_Fuka_flg` | `boolean` | Class-level feasibility flag. Set to `true` when suspension release is infeasible; read by the entry point method `orsjgsRunUseStpRls()` to set the response flag. |

## 4. CRUD Operations / Called Services

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

| CRUD | SC / CBS | SC Code | Entity / DB | Operation Description |
|------|----------|---------|-------------|----------------------|
| R | `JKKOrsjgsUseStpRlsRunCC.callEKK0081B547SC` | EKK0081B547SC | Ex-contractor suspension release instruction registration info | Calls `callEKK0081B547SC` to retrieve ex-contractor release instruction data for the service contract |
| R | `JKKOrsjgsUseStpRlsRunCC.callEKK0321B005SC` | EKK0321B005SC | KK_T_SEIKYUKEI_SVC (invoice contract service link) | Calls `callEKK0321B005SC` to retrieve the billing front list (invoice contract number / service contract number) |
| - | `JKKOrsjgsUseStpRlsRunCC.executeKktkSvcKei_UseStp` | - | - | Calls `executeKktkSvcKei_UseStp` to release use suspension on equipment-provided service contracts |
| - | `JKKOrsjgsUseStpRlsRunCC.executeKktkSvcKei_UseStp2` | - | - | Calls `executeKktkSvcKei_UseStp2` to release use suspension on equipment-provided service contracts (secondary, for telephone services) |
| - | `JKKOrsjgsUseStpRlsRunCC.executeOpSvcKei_UseStp` | - | - | Calls `executeOpSvcKei_UseStp` to release use suspension on option service contracts |
| - | `JKKOrsjgsUseStpRlsRunCC.executeSbOpSvcKei_UseStp` | - | - | Calls `executeSbOpSvcKei_UseStp` to release use suspension on sub-option service contracts |
| - | `JKKOrsjgsUseStpRlsRunCC.executeSvcCtlUseStpReq` | - | - | Calls `executeSvcCtlUseStpReq` to execute service control management S suspension release processing |
| - | `JKKOrsjgsUseStpRlsRunCC.executeSvcKei_UseStp` | - | - | Calls `executeSvcKei_UseStp` to release use suspension on the main service contract |
| R | `JKKOrsjgsUseStpRlsRunCC.getEKK0081A010SC` | EKK0081A010SC | KK_T_SVC_KEI (service contract table) | Calls `getEKK0081A010SC` to retrieve service contract agreement details |
| R | `JKKOrsjgsUseStpRlsRunCC.getEKK0321A010SC` | EKK0321A010SC | KK_T_SEIKYUKEI_SVC (billing front agreement) | Calls `getEKK0321A010SC` to retrieve billing front consultation for each billing front entry |
| R | `JKKOrsjgsUseStpRlsRunCC.getEKK0321B002SC` | EKK0321B002SC | KK_T_SEIKYUKEI (billing front table) | Calls `getEKK0321B002SC` to retrieve billing front agreement details |
| R | `JKKOrsjgsUseStpRlsRunCC.getEKK0861B002SC` | EKK0861B002SC | Management information (contract management) | Calls `getEKK0861B002SC` to acquire management information for the service contract |
| R | `JKKOrsjgsUseStpRlsRunCC.getEKK1091D010SC` | EKK1091D010SC | Progress management (progress registration) | Calls `getEKK1091D010SC` for progress registration of the suspension release operation |
| R | `JKKOrsjgsUseStpRlsRunCC.getUseStpBfSvcKeiStat` | - | - | Calls `getUseStpBfSvcKeiStat` to get the pre-suspension service contract status |
| R | `JKKOrsjgsUseStpRlsRunCC.isUseStpFukaCheck` | - | - | Calls `isUseStpFukaCheck` to check if use suspension release is feasible (infeasible service check) |
| - | `JKKOrsjgsUseStpRlsRunCC.orsjgsrunUseStpKaijoAddShijisho` | - | - | Calls `orsjgsrunUseStpKaijoAddShijisho` to register ex-contractor suspension release instruction data |

**CRUD Classification:**

| CRUD | SC / CBS | SC Code | Entity / DB | Operation Description |
|------|----------|---------|-------------|----------------------|
| R | `callEKK0081B547SC` | EKK0081B547SC | KK_T_ORSJGS_STP_RLS_SHIJISHO (ex-contractor suspension release instruction table) | Read ex-contractor suspension release instruction registration info for the service contract |
| R | `callEKK0321B005SC` | EKK0321B005SC | KK_T_SEIKYUKEI_SVC (invoice contract to service contract link table) | Read billing front list mapping invoice contracts to service contracts |
| R | `getEKK0081A010SC` | EKK0081A010SC | KK_T_SVC_KEI (service contract master table) | Read service contract agreement details including price group code, service code, and contract status |
| R | `getEKK0321A010SC` | EKK0321A010SC | KK_T_SEIKYUKEI_SVC (billing front agreement table) | Read billing front consultation data containing all four service contract numbers per entry |
| R | `getEKK0321B002SC` | EKK0321B002SC | KK_T_SEIKYUKEI (billing front master table) | Read billing front agreement details to iterate over linked service contracts |
| R | `getEKK0861B002SC` | EKK0861B002SC | Contract management information tables | Read management information associated with the service contract |
| R | `getEKK1091D010SC` | EKK1091D010SC | Progress management tables | Register/update the progress state of the suspension release operation |
| C | `orsjgsrunUseStpKaijoAddShijisho` | ECH0911 CBS | Ex-contractor instruction registration table | Register the ex-contractor suspension release instruction order with the extracted SYSID |
| - | `executeSvcKei_UseStp` | - | Various service contract tables (C/R/U) | Release use suspension on the main service contract |
| - | `executeOpSvcKei_UseStp` | - | Various option service contract tables (C/R/U) | Release use suspension on option service contracts |
| - | `executeSbOpSvcKei_UseStp` | - | Various sub-option service contract tables (C/R/U) | Release use suspension on sub-option service contracts |
| - | `executeKktkSvcKei_UseStp` | - | Equipment-provided service contract tables (C/R/U) | Release use suspension on equipment-provided service contracts |
| - | `executeKktkSvcKei_UseStp2` | - | Equipment service tables (C/R/U) | Release use suspension on equipment (ONU/VDSL modem) for telephone services |
| - | `executeSvcCtlUseStpReq` | - | Service control management tables (C/R/U) | Execute service control management S suspension release processing |
| R | `isUseStpFukaCheck` | - | Infeasible service contract list | Check whether the target service contract is in the infeasible list (blocked from release) |
| R | `getUseStpBfSvcKeiStat` | - | Service contract status history | Get the service contract status prior to suspension |

## 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: `orsjgsrunUseStpKaijoAddShijisho` [-], `callEKK0081B547SC` [R], `executeSvcCtlUseStpReq` [-], `getEKK1091D010SC` [R], `executeKktkSvcKei_UseStp2` [-], `executeKktkSvcKei_UseStp` [-], `executeSbOpSvcKei_UseStp` [-], `executeOpSvcKei_UseStp` [-], `executeSvcKei_UseStp` [-], `getEKK0321A010SC` [R], `getUseStpBfSvcKeiStat` [R], `getEKK0321B002SC` [R], `callEKK0321B005SC` [R], `isUseStpFukaCheck` [-], `getEKK0861B002SC` [R], `getEKK0081A010SC` [R]

| # | Caller (Screen/Batch) | Call Chain (Full Path tothis Method) | Terminal (SC / CRUD / Entity) |
|---|----------------------|--------------------------------------|-------------------------------|
| 1 | CBS: `JKKOrsjgsUseStpRlsRunCC.orsjgsRunUseStpRls()` | `orsjgsRunUseStpRls()` (entry point) -> `executeUseStpRlsMain()` | `orsjgsrunUseStpKaijoAddShijisho` [C] Ex-contractor instruction, `callEKK0081B547SC` [R] Ex-contractor release info, `executeSvcCtlUseStpReq` [-] Service control mgmt, `getEKK1091D010SC` [R] Progress mgmt, `executeKktkSvcKei_UseStp2` [-] ONU/VDSL equipment, `executeKktkSvcKei_UseStp` [-] Equipment-provided service, `executeSbOpSvcKei_UseStp` [-] Sub-option service, `executeOpSvcKei_UseStp` [-] Option service, `executeSvcKei_UseStp` [-] Main service, `getEKK0321A010SC` [R] Billing front consultation, `getUseStpBfSvcKeiStat` [R] Pre-suspension status, `getEKK0321B002SC` [R] Billing front agreement, `callEKK0321B005SC` [R] Billing front list, `isUseStpFukaCheck` [-] Infeasibility check, `getEKK0861B002SC` [R] Management info, `getEKK0081A010SC` [R] Service contract agreement |

## 6. Per-Branch Detail Blocks

**Block 1** — [Initialization] (L492)

> Initialize local variables and business flags before processing begins.

| No | Type | Code |
|----|------|------|
| 1 | SET | `statusCode = 0` // Status code initialized to success [-> status code] |
| 2 | SET | `resultHash = new HashMap<String, Object>()` // S-IF result storage map [-> HashMap] |
| 3 | SET | `requestParam.put(SVC_KEI_USE_STP_RLS_EXEC_FLG, (Boolean)false)` // Initialize suspension release execution flag to false [-> SVC_KEI_USE_STP_RLS_EXEC_FLG="svc_kei_use_stp_rls_exec_flg"] |
| 4 | SET | `hakkoSODDataList = new ArrayList<HashMap<String,Object>>()` // SOD emission data list for service order data [-> ArrayList] |
| 5 | SET | `prm_svc_kei_no = (String)requestParam.get(SVC_KEI_NO)` // Extract target service contract number [-> SVC_KEI_NO="svc_kei_no"] |

**Block 2** — [Method Call] `getEKK0081A010SC` (L510)

> Retrieve service contract agreement details (contractor service contract master data).

| No | Type | Code |
|----|------|------|
| 1 | CALL | `statusCode = getEKK0081A010SC(param, handle, requestParam, resultHash, prm_svc_kei_no)` // Service contract agreement consultation |
| 2 | EXEC | `if(statusCode != 0) { return statusCode; }` // Early return on error |

**Block 3** — [Retrieval] Extract eKK0081A010 result (L517)

| No | Type | Code |
|----|------|------|
| 1 | SET | `eKK0081A010Hash = (HashMap<String, Object>)resultHash.get(TEMPLATE_ID_EKK0081A010)` // Get service contract agreement result [-> TEMPLATE_ID_EKK0081A010="EKK0081A010"] |

**Block 4** — [Retrieval] Extract price group code (L520)

| No | Type | Code |
|----|------|------|
| 1 | SET | `prc_grp_cd = (String)eKK0081A010Hash.get(EKK0081A010CBSMsg1List.PRC_GRP_CD)` // Price group code [-> PRC_GRP_CD] |

**Block 5** — [IF] Price group code = mineo check (L523)

> If the price group code is mineo ("51"), skip suspension release processing entirely.

| No | Type | Code |
|----|------|------|
| 1 | IF | `if(PRC_GRP_CD_MINEO.equals(prc_grp_cd))` [-> PRC_GRP_CD_MINEO="51"] |
| 2 | RETURN | `return 0;` // Skip processing for mineo |

**Block 6** — [IF] Price group code = eo electricity check (L529)

> If the price group code is eo electricity ("17"), skip suspension release processing entirely.

| No | Type | Code |
|----|------|------|
| 1 | IF | `if(PRC_GRP_CD_EODENKI.equals(prc_grp_cd))` [-> PRC_GRP_CD_EODENKI="17"] |
| 2 | RETURN | `return 0;` // Skip processing for eo electricity |

**Block 7** — [Method Call] `getEKK0861B002SC` (L537)

> Acquire management information for the service contract.

| No | Type | Code |
|----|------|------|
| 1 | CALL | `statusCode = getEKK0861B002SC(param, handle, requestParam, resultHash)` // Management info acquisition |
| 2 | EXEC | `if(statusCode != 0) { return statusCode; }` // Early return on error |

**Block 8** — [IF] Feasibility check (L542)

> Check if the suspension release is feasible. If infeasible (contract in-progress, request cancellation, or TV/KCN), set the feasibility flag and return 0.

| No | Type | Code |
|----|------|------|
| 1 | IF | `if(isUseStpFukaCheck(fukaUseStpRlsTrgtLst, requestParam, resultHash))` [-> feasibility check] |
| 2 | SET | `wk_Fuka_flg = true` // Set infeasibility flag at class level |
| 3 | RETURN | `return 0;` // Return without error (graceful skip) |

**Block 9** — [Method Call] `callEKK0321B005SC` (L553)

> Retrieve the billing front list — maps invoice contracts to service contracts.

| No | Type | Code |
|----|------|------|
| 1 | CALL | `statusCode = callEKK0321B005SC(param, handle, requestParam, resultHash)` // Billing front list |
| 2 | EXEC | `if(statusCode != 0) { return statusCode; }` // Early return on error |

**Block 10** — [IF] Billing front list empty check (L558)

> If no billing front list entries exist, there is nothing to process.

| No | Type | Code |
|----|------|------|
| 1 | SET | `eKK0321B005HashList = (ArrayList<HashMap<String, Object>>)resultHash.get(TEMPLATE_ID_EKK0321B005)` [-> TEMPLATE_ID_EKK0321B005="EKK0321B005"] |
| 2 | IF | `if(eKK0321B005HashList.size() == 0)` |
| 3 | RETURN | `return 0;` // No billing front entries to process |

**Block 11** — [Retrieval] Extract invoice contract number (L562)

| No | Type | Code |
|----|------|------|
| 1 | SET | `eKK0321B005Hash = eKK0321B005HashList.get(0)` // First entry from billing front list |
| 2 | SET | `seikyu_kei_no = (String)eKK0321B005Hash.get(EKK0321B005CBSMsg1List.SEIKY_KEI_NO)` // Invoice contract number |

**Block 12** — [Method Call] `getEKK0321B002SC` (L569)

> Retrieve billing front agreement details using the invoice contract number and service contract number.

| No | Type | Code |
|----|------|------|
| 1 | CALL | `statusCode = getEKK0321B002SC(param, handle, requestParam, resultHash, seikyu_kei_no)` // Billing front agreement |
| 2 | EXEC | `if(statusCode != 0) { return statusCode; }` // Early return on error |

**Block 13** — [IF] Billing front agreement list empty (L579)

> If no billing front agreement entries exist, skip processing.

| No | Type | Code |
|----|------|------|
| 1 | SET | `eKK0321B002HashList = (ArrayList<HashMap<String, Object>>)resultHash.get(TEMPLATE_ID_EKK0321B002)` [-> TEMPLATE_ID_EKK0321B002="EKK0321B002"] |
| 2 | IF | `if(eKK0321B002HashList.size() == 0)` |
| 3 | RETURN | `return 0;` // No billing front agreement entries |

**Block 14** — [SET] Pre-suspension status cache (L589)

| No | Type | Code |
|----|------|------|
| 1 | SET | `resultHash.put(MAP_KEY_GET_SVKEI_STAT, getUseStpBfSvcKeiStat(handle, param, prm_svc_kei_no, null))` // Cache pre-suspension service contract status [-> MAP_KEY_GET_SVKEI_STAT="JKKGetSvkeiStat"] |

**Block 15** — [FOR LOOP] Main iteration over billing front agreements (L591)

> Iterate through each billing front agreement entry to process all associated service contracts.

| No | Type | Code |
|----|------|------|
| 1 | SET | `eKK0321B002Hash = eKK0321B002HashList.get(i)` // Current billing front agreement entry |
| 2 | CALL | `statusCode = getEKK0321A010SC(param, handle, eKK0321B002Hash, resultHash)` // Billing front consultation |
| 3 | EXEC | `if(statusCode != 0) { return statusCode; }` // Early return on error |

**Block 15.1** — [IF] Billing front consultation null check (L601)

> If no billing front consultation result exists for this entry, skip to next iteration.

| No | Type | Code |
|----|------|------|
| 1 | SET | `eKK0321A010Hash = (HashMap<String, Object>)resultHash.get(TEMPLATE_ID_EKK0321A010)` [-> TEMPLATE_ID_EKK0321A010="EKK0321A010"] |
| 2 | IF | `if(eKK0321A010Hash == null)` |
| 3 | EXEC | `continue;` // Skip this entry |

**Block 15.2** — [Retrieval] Extract all service contract numbers (L606–613)

| No | Type | Code |
|----|------|------|
| 1 | SET | `svc_kei_no = (String)eKK0321A010Hash.get(EKK0321A010CBSMsg1List.SVC_KEI_NO)` // Service contract number |
| 2 | SET | `kktk_svc_kei_no = (String)eKK0321A010Hash.get(EKK0321A010CBSMsg1List.KKTK_SVC_KEI_NO)` // Equipment-provided service contract number |
| 3 | SET | `op_svc_kei_no = (String)eKK0321A010Hash.get(EKK0321A010CBSMsg1List.OP_SVC_KEI_NO)` // Option service contract number |
| 4 | SET | `sbop_svc_kei_no = (String)eKK0321A010Hash.get(EKK0321A010CBSMsg1List.SBOP_SVC_KEI_NO)` // Sub-option service contract number |

**Block 15.3** — [IF] Service contract processing (L618)

> Process the main service contract suspension release if svc_kei_no is present.

| No | Type | Code |
|----|------|------|
| 1 | IF | `if(svc_kei_no != null && !"".equals(svc_kei_no))` |
| 2 | CALL | `statusCode = executeSvcKei_UseStp(handle, param, requestParam, resultHash, hakkoSODDataList, prm_svc_kei_no)` // Service contract suspension release |
| 3 | EXEC | `if(statusCode != 0) { return statusCode; }` // Early return on error |

**Block 15.4** — [IF] Option service contract processing (L634)

> Process option service contract suspension release if op_svc_kei_no is present AND sbop_svc_kei_no is absent (not a sub-option chain).

| No | Type | Code |
|----|------|------|
| 1 | IF | `if((op_svc_kei_no != null && !"".equals(op_svc_kei_no)) && (sbop_svc_kei_no == null || "".equals(sbop_svc_kei_no)))` |
| 2 | CALL | `statusCode = executeOpSvcKei_UseStp(handle, param, requestParam, resultHash, prm_svc_kei_no)` // Option service contract suspension release |
| 3 | EXEC | `if(statusCode != 0) { return statusCode; }` // Early return on error |

**Block 15.5** — [IF] Sub-option service contract processing (L652)

> Process sub-option service contract suspension release if sbop_svc_kei_no is present.

| No | Type | Code |
|----|------|------|
| 1 | IF | `if(sbop_svc_kei_no != null && !"".equals(sbop_svc_kei_no))` |
| 2 | CALL | `statusCode = executeSbOpSvcKei_UseStp(handle, param, requestParam, resultHash, prm_svc_kei_no)` // Sub-option service contract suspension release |
| 3 | EXEC | `if(statusCode != 0) { return statusCode; }` // Early return on error |

**Block 15.6** — [IF] Equipment-provided service contract processing (L674)

> Process equipment-provided service contract suspension release if kktk_svc_kei_no is present.

| No | Type | Code |
|----|------|------|
| 1 | IF | `if(kktk_svc_kei_no != null && !"".equals(kktk_svc_kei_no))` |
| 2 | CALL | `statusCode = executeKktkSvcKei_UseStp(handle, param, requestParam, resultHash, prm_svc_kei_no, true)` // Equipment-provided service contract suspension release |
| 3 | EXEC | `if(statusCode != 0) { return statusCode; }` // Early return on error |

**Block 16** — [IF] Post-loop: telephone service equipment suspension (L704)

> After all billing front entries are processed, if the service is a telephone service (SVC_CD = "02"), release ONU/VDSL modem equipment suspension on the eo fiber network side.

| No | Type | Code |
|----|------|------|
| 1 | IF | `if(eKK0081A010Hash != null && SVC_CD_TEL.equals(eKK0081A010Hash.get(EKK0081A010CBSMsg1List.SVC_CD)))` [-> SVC_CD_TEL="02"] |
| 2 | CALL | `statusCode = executeKktkSvcKei_UseStp2(handle, param, requestParam, resultHash, eKK0081A010Hash, prm_svc_kei_no)` // ONU/VDSL modem suspension release |
| 3 | EXEC | `if(statusCode != 0) { return statusCode; }` // Early return on error |

**Block 17** — [Method Call] Progress registration (L718)

> Register the progress state of the suspension release operation.

| No | Type | Code |
|----|------|------|
| 1 | CALL | `statusCode = getEKK1091D010SC(param, handle, requestParam, resultHash)` // Progress registration |
| 2 | EXEC | `if(statusCode != 0) { return statusCode; }` // Early return on error |

**Block 18** — [IF] Service control management release check (L728)

> If the service contract suspension release execution flag was set by a preceding process, execute service control management suspension release.

| No | Type | Code |
|----|------|------|
| 1 | IF | `if((Boolean)requestParam.get(SVC_KEI_USE_STP_RLS_EXEC_FLG))` [-> SVC_KEI_USE_STP_RLS_EXEC_FLG="svc_kei_use_stp_rls_exec_flg"] |
| 2 | CALL | `statusCode = executeSvcCtlUseStpReq(handle, param, requestParam, resultHash, hakkoSODDataList)` // Service control management S suspension release |
| 3 | EXEC | `if(statusCode != 0) { return statusCode; }` // Early return on error |

**Block 19** — [Method Call] Ex-contractor instruction info retrieval (L744)

> Retrieve ex-contractor suspension release instruction registration information.

| No | Type | Code |
|----|------|------|
| 1 | CALL | `statusCode = callEKK0081B547SC(param, handle, requestParam, resultHash, prm_svc_kei_no)` // Ex-contractor suspension release instruction info |
| 2 | EXEC | `if(statusCode != 0) { return statusCode; }` // Early return on error |

**Block 20** — [IF] Ex-contractor instruction list not empty (L749)

| No | Type | Code |
|----|------|------|
| 1 | IF | `if(eKK0081B547HashList != null && eKK0081B547HashList.size() > 0)` |
| 2 | SET | `eKK0081B547Hash = eKK0081B547HashList.get(0)` // Get first entry |
| 3 | SET | `updUm = (String)eKK0081B547Hash.get(EKK0081B546CBSMsg1List.UPD_UM)` // Update flag |

**Block 20.1** — [IF] Update flag equals "1" (L756)

> If the update flag is "1", ex-contractor instruction registration is required.

| No | Type | Code |
|----|------|------|
| 1 | IF | `if("1".equals(updUm))` [-> updUm="1" means update exists] |
| 2 | SET | `sysid = (String)eKK0081B547Hash.get(EKK0081B547CBSMsg1List.SYSID)` // Extract SYSID |
| 3 | CALL | `statusCode = orsjgsrunUseStpKaijoAddShijisho(handle, param, requestParam, sysid)` // Register ex-contractor instruction |
| 4 | EXEC | `if(statusCode != 0) { return statusCode; }` // Early return on error |

**Block 21** — [RETURN] Normal end (L767)

| No | Type | Code |
|----|------|------|
| 1 | RETURN | `return 0;` // Normal completion |

## 7. Glossary

| Term | Type | Business Meaning |
|------|------|------------------|
| `svc_kei_no` | Field | Service contract number — unique identifier for a service line item in the telecom contract hierarchy |
| `kktk_svc_kei_no` | Field | Equipment-provided service contract number — identifier for equipment contracts (e.g., router, ONU modem) provided by the carrier |
| `op_svc_kei_no` | Field | Option service contract number — identifier for optional add-on service contracts (e.g., security, insurance) |
| `sbop_svc_kei_no` | Field | Sub-option service contract number — identifier for sub-option service contracts linked under an option contract |
| `seikyu_kei_no` | Field | Invoice contract number — the billing contract number that groups multiple service contracts on a single invoice |
| `prm_svc_kei_no` | Field | Parameter service contract number — the target service contract number extracted from the request |
| `prc_grp_cd` | Field | Price group code — categorizes the subscriber's pricing plan |
| `prc_grp_cd` = "51" | Constant | mineo — SoftBank's MVNO brand; excluded from suspension release processing |
| `prc_grp_cd` = "17" | Constant | eo electricity — eo-branded electricity service; excluded from suspension release processing |
| `SVC_CD` | Field | Service code — classifies the type of service |
| `SVC_CD` = "02" | Constant | Telephone — indicates a telephone service (eo Hikari / fiber-optic); triggers ONU/VDSL equipment suspension processing |
| `SVC_CD` = "01" | Constant | Network (commented out) — previously used for internet services |
| `SVC_KEI_STAT` | Field | Service contract status code — indicates current state of the service contract |
| `SVC_KEI_STAT_TKC` = "100" | Constant | Service providing — service is actively being provided |
| `SVC_KEI_STAT_KYUS` = "210" | Constant | Suspension/cancellation in progress |
| `SVC_KEI_STAT_STP` = "220" | Constant | Suspended |
| `SVC_KEI_USE_STP_RLS_EXEC_FLG` | Field | Service contract use suspension release execution flag — when true, triggers service control management release processing |
| `wk_Fuka_flg` | Field | Class-level feasibility flag — set to true when suspension release is infeasible |
| `FUKA_RESON` | Field | Infeasibility reason — code explaining why suspension release is blocked |
| `FUKA_RESON_RTN_IRAI_TORI` = "01" | Constant | Infeasibility reason: Request cancellation — customer has withdrawn the release request |
| `FUKA_RESON_RTN_KEITK_CHU` = "02" | Constant | Infeasibility reason: Contract in-process — active contract handling prevents release |
| `FUKA_RESON_RTN_TV_KCN` = "03" | Constant | Infeasibility reason: eo TV/KCN — TV/KCN service tie prevents release |
| `hakkoSODDataList` | Field | SOD emission data list — list of service order data objects to be emitted during processing |
| `updUm` | Field | Update existence flag — "1" indicates update data exists for ex-contractor instruction registration |
| `sysid` | Field | System ID — unique identifier for the ex-contractor suspension release instruction |
| SOD | Acronym | Service Order Data — internal order fulfillment data entity for telecom services |
| ONU | Business term | Optical Network Unit — endpoint device for fiber-optic broadband (eo Hikari); equipment tied to telephone services |
| VDSL | Business term | Very-high-bit-rate Digital Subscriber Line — alternative access technology for telephone service equipment |
| mineo | Business term | SoftBank's MVNO (Mobile Virtual Network Operator) brand; non-eligible for suspension release processing |
| eo electricity | Business term | eo-branded electricity service; non-eligible for suspension release processing |
| Ex-contractor | Business term | Downstream contractor — a third-party partner who provides services under the eo brand; suspension release requires instruction registration |
| Billing front (課金先) | Business term | Billing destination — the billing entry that groups invoice contracts and their linked service contracts |
| Service control management S (S制御管理S) | Business term | Service control management entity S — manages service-level control and suspension state |
| Use suspension (利用停止) | Business term | Use suspension — telecom operation that temporarily stops a subscriber's service (e.g., due to non-payment or cancellation) |
| Suspension release (利用停止解除) | Business term | Suspension release — operation to restore a suspended service to active status |
| Progress registration (進捗登録) | Business term | Progress state registration — updates the progress tracking table for the suspension release operation |
| `EKK0081A010` | Template ID | Service contract agreement consultation — retrieves service contract master data |
| `EKK0321B005` | Template ID | Billing front list — retrieves invoice contract to service contract mappings |
| `EKK0321B002` | Template ID | Billing front agreement — retrieves detailed billing front entries |
| `EKK0321A010` | Template ID | Billing front consultation — retrieves billing front agreement details per entry |
| `EKK0861B002` | Template ID | Management information list — retrieves contract management info |
| `EKK1091D010` | Template ID | Progress registration — updates progress state for the operation |
| `EKK0081B547` | Template ID | Ex-contractor suspension release instruction registration info |
| `TEMPLATE_ID_EKK0081C060` | Template ID | Service contract suspension release |
| `TEMPLATE_ID_EKK0161C050` | Template ID | Service contract internal detail suspension release |
| `TEMPLATE_ID_EKK0351C050` | Template ID | Option service contract suspension release |
| `TEMPLATE_ID_EKK0401C050` | Template ID | Sub-option service contract suspension release |
| `TEMPLATE_ID_EKK0341C130` | Template ID | Equipment-provided service contract suspension release |
| KK_T_SVC_KEI | DB Table | Service contract master table — stores service contract records |
| KK_T_SEIKYUKEI_SVC | DB Table | Invoice contract to service contract link table |
| KK_T_SEIKYUKEI | DB Table | Billing front master table |