# Business Logic — JKKShkaFinJiKikiStaAddCC.callOpSvcStart() [186 LOC]

| Field | Value |
|-------|-------|
| Fully Qualified Name | `com.fujitsu.futurity.bp.custom.common.JKKShkaFinJiKikiStaAddCC` |
| Layer | CC / Common Component (Controller/Common Component — the `common` package under `custom.common` holds cross-cutting business logic shared by CBS layer) |
| Module | `common` (Package: `com.fujitsu.futurity.bp.custom.common`) |

## 1. Role

### JKKShkaFinJiKikiStaAddCC.callOpSvcStart()

This method performs the **option service contract start processing** (オプションサービス契約開始処理) for a customer's equipment-based option services in the telecom ordering system. Specifically, it orchestrates the full lifecycle of an **option service contract** — from locating the existing Smart Rack Premium (B077) contract record, verifying its ISP agreement status, optionally terminating a previous ISP configuration if the contract is inspection-complete, and finally executing the ISP start procedure to activate the service's network settings.

The method handles a single **service type category**: Smart Rack Premium (B077), which is an optional add-on service bundled with broadband fiber contracts. It implements a **routing/dispatch design pattern** — it first queries the option service contract list, filters for the matching Smart Rack Premium record by service code and status (inspection complete "020" or termination complete "030"), and then branches based on the service status to either skip ISP processing (if no matching record) or proceed through ISP agreement search, optional ISP termination, and ISP start processing.

Its **role in the larger system** is as a shared utility method called from the main add-processing CBS (`addShkaFinJiKiStaAdd`) during equipment addition operations. It ensures the option service contract's ISP-side settings (IPv6 address, MLAD, VoIP, mail gateway) are properly activated when the service start date is not in the future. The method acts as a bridge between the top-level option service contract and the lower-level ISP service component layer.

## 2. Processing Pattern (Detailed Business Logic)

```mermaid
flowchart TD
    START(["callOpSvcStart params"])
    STEP1["SET dtm = updDtm Initialize msg = null"]
    STEP2["SET Build input for EKK0351B002CBS TEMPLATEID FUNC_CODE KEY_SVC_KEI_NO"]
    STEP3["CALL callSC EKK0351B002CBS Get option service contract list"]
    LOOP["FOR i = 0 to opMsg.length"]
    STEP4["GET opSvcCd opStat svcChrgStaYmd from opMsg i"]
    COND1{Check matching conditions}
    BRANCH_FOUND["SET msg = opMsg i break loop"]
    COND2{null == msg}
    RET1["RETURN dtm No smart rack premium contract"]
    STEP5["GET stat geneAddDtm opSvcKeiNo from msg"]
    STEP6["SET Build input for EKK0361A010CBS KEY_OP_SVC_KEI_NO KEY_GENE_ADD_DTM"]
    STEP7["CALL callSC EKK0361A010CBS Get option service contract ISP agreement"]
    COND3{null != ekk0361a010outMsg}
    STEP8["SET ido_div = 00031 Option Settings"]
    COND4{stat equals SVC_KEI_STAT_020}
    STEP9["SET Build input for EKK0361C020CBS Option service contract ISP termination"]
    STEP10["CALL callSC EKK0361C020CBS Process ISP termination Update dtm"]
    STEP11["SET Build input for EKK0351A010CBS Option service contract agreement search"]
    STEP12["CALL callSC EKK0351A010CBS Search agreement details"]
    STEP13["SET svcUseStaKiboYmd from result"]
    COND5{svcUseStaKiboYmdCheck baseYMD svcUseStaKiboYmd}
    COND6{adchgFlg is false or both adchgFlg and dateStiFlg true}
    STEP14["SET Build input for EKK0361C040CBS Option service contract ISP start"]
    STEP15["CALL callSC EKK0361C040CBS Execute ISP start processing Update dtm"]
    END_NODE["RETURN dtm"]

    START --> STEP1 --> STEP2 --> STEP3 --> LOOP --> STEP4 --> COND1
    COND1 -->|All match| BRANCH_FOUND
    COND1 -->|No match| LOOP
    BRANCH_FOUND --> COND2
    COND2 -->|true| RET1
    COND2 -->|false| STEP5 --> STEP6 --> STEP7 --> COND3
    COND3 -->|true| STEP8 --> COND4
    COND3 -->|false| STEP11
    COND4 -->|true| STEP9 --> STEP10 --> STEP11
    COND4 -->|false| STEP11
    STEP12 --> STEP13 --> COND5
    COND5 -->|true| COND6
    COND5 -->|false| END_NODE
    COND6 -->|true| STEP14 --> STEP15 --> END_NODE
    COND6 -->|false| END_NODE
    STEP11 --> END_NODE
    STEP15 --> END_NODE
```

## 3. Parameter Analysis

| No | Parameter Name | Type | Business Description |
|----|---------------|------|---------------------|
| 1 | `handle` | `SessionHandle` | Session handle for the current processing context; carries session-level data (authentication, transaction context) used across all CBS calls |
| 2 | `scCall` | `ServiceComponentRequestInvoker` | Service Component request invoker; the dispatcher used to route calls to lower-level SC (Service Component) CBS endpoints |
| 3 | `param` | `IRequestParameterReadWrite` | Request parameter object providing read/write access to request-scoped parameters and message objects shared across CBS processing |
| 4 | `fixedText` | `String` | Fixed text resource identifier; used for i18n/message resource lookups in error messages and logging |
| 5 | `funcCd` | `String` | Function code — identifies the processing type; passed to SC CBS as `FUNC_CODE_1` ("1" = Check and Register) |
| 6 | `svcKeiNo` | `String` | Service category number — the top-level service contract identifier used to query the option service contract list (EKK0351B002CBS). Identifies which service line item to look up option contracts for. |
| 7 | `updDtm` | `String` | Update datetime — the timestamp of the last update to the service contract record; used as `UPD_DTM_BF` (before update timestamp) in termination and ISP start SC calls for optimistic concurrency control. Initial value assigned to local `dtm`. |
| 8 | `idoDiv` | `String` | Movement classification code — passed from caller but **not used internally** by this method (the local `ido_div` is hardcoded to `IDO_DIV_00031`). Represents the type of equipment movement/change. |
| 9 | `baseYMD` | `String` | Base year-month-day — the service start date candidate (YYYYMMDD format). Used in `svcUseStaKiboYmdCheck` to determine whether the option service start date is in the future. |
| 10 | `adchgFlg` | `boolean` | Additional change flag (追加変更フラグ) — indicates whether this is an additional change operation. When `false`, the ISP start processing (EKK0361C040CBS) is always executed. When `true`, execution depends on `dateStiFlg`. |
| 11 | `dateStiFlg` | `boolean` | Date start flag (日付設定フラグ) — only active when `adchgFlg` is `true`. When both flags are `true`, the ISP start processing is executed; if `adchgFlg` is `true` but `dateStiFlg` is `false`, the ISP start is skipped. |

**No instance fields or external state** is read by this method; it operates entirely on passed parameters and local variables.

## 4. CRUD Operations / Called Services

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

| CRUD | SC / CBS | SC Code | Entity / DB | Operation Description |
|------|----------|---------|-------------|----------------------|
| R | `callSC` (EKK0351B002CBS) | EKK0351B002CBS | KK_T_OPSVKEI_ISP | Calls `callSC` with EKK0351B002CBS input to **read** the option service contract list for the given service category number; retrieves Smart Rack Premium (B077) contract records |
| R | `callSC` (EKK0361A010CBS) | EKK0361A010CBS | KK_T_OPSVKEI_ISP | Calls `callSC` with EKK0361A010CBS input to **read** the option service contract ISP agreement details (ISP consent/confirmation); retrieves IPv6 address interface ID, multilayer authentication credentials, and network settings |
| U | `callSC` (EKK0361C020CBS) | EKK0361C020CBS | KK_T_OPSVKEI_ISP | Calls `callSC` with EKK0361C020CBS input to **update** the option service contract ISP termination when service status is inspection complete (020); processes ISP termination and returns updated timestamp |
| R | `callSC` (EKK0351A010CBS) | EKK0351A010CBS | KK_T_OPSVKEI_ISP | Calls `callSC` with EKK0351A010CBS input to **read** the option service contract agreement details; retrieves service start desired date, IPv6 settings, authentication credentials, VoIP, and mail gateway parameters |
| U | `callSC` (EKK0361C040CBS) | EKK0361C040CBS | KK_T_OPSVKEI_ISP | Calls `callSC` with EKK0361C040CBS input to **update** the option service contract ISP start processing; activates ISP service with IPv6 address, netmask, MLAD, voice, mail gateway, and other network parameters |
| R | `opMsg[i].getString` | — | — | Reads individual fields from option service contract message list: `OP_SVC_CD`, `OP_SVC_KEI_STAT`, `SVC_CHRG_STAYMD`, `OP_SVC_KEI_NO`, `GENE_ADD_DTM` |
| R | `ekk0361a010outMsg[0].getString` | — | — | Reads fields from ISP agreement message: `IPV6_AD_IFID`, `MLTISE_NINSHO_ID`, `MLTISE_NINSHO_ID_PWD`, `KOTEI_IP_AD`, `NETMASK`, `MLAD`, `CAPA`, `HOSML_KRISHA_MLAD`, `HOSML_KRISHA_MAIL_BOX_CAPA`, `DPAD_MLAD`, `VOIP_USER_ID`, `VOIP_TELNO`, `MAIL_GW_KRISHA_ID`, `MAIL_GW_KRISHA_ID_PWD`, `MAIL_GW_KRISHA_MLAD`, `MAIL_GW_RCV_MSERVER_IP_AD`, `MAIL_GW_SEND_MSERVER_IP_AD`, `ML_GW_ACCOUNT_CNT`, `KOSHUMO_TELNO` |
| R | `ekk0351a010outMsg[0].getString` | — | — | Reads service start desired date: `SVC_USE_STA_KIBO_YMD` |
| R | `ekk0361c020outMsg.getString` | — | — | Reads updated timestamp: `UPD_DTM` |
| R | `ekk0361c040outMsg.getString` | — | — | Reads updated timestamp: `UPD_DTM` |
| - | `isValueChk` | — | — | Utility method that checks if a message field has a non-empty, non-default value (used to verify `SVC_CHRG_STAYMD`) |
| - | `svcUseStaKiboYmdCheck` | — | — | Utility method that compares the base date (baseYMD) against the service start desired date to determine if it's not in the future |

## 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: `getString` [R], `getString` [R], `getString` [R], `getString` [R], `getString` [R], `callSC` [R], `getString` [R], `getString` [R], `getString` [R], `getString` [R], `getString` [R], `getString` [R], `getString` [R], `getString` [R], `getString` [R], `getString` [R], `getString` [R], `getString` [R], `getString` [R], `getString` [R]

| # | Caller (Screen/Batch) | Call Chain (Full Path to this Method) | Terminal (SC / CRUD / Entity) |
|---|----------------------|--------------------------------------|-------------------------------|
| 1 | CBS:JKKShkaFinJiKikiStaAddCC.addShkaFinJiKiStaAdd | `addShkaFinJiKiStaAdd()` → `callOpSvcStart(handle, scCall, param, fixedText, funcCd, svcKeiNo, updDtm, idoDiv, baseYMD, adchgFlg, dateStiFlg)` | `callSC(EKK0351B002CBS) [R] KK_T_OPSVKEI_ISP`, `callSC(EKK0361A010CBS) [R] KK_T_OPSVKEI_ISP`, `callSC(EKK0361C020CBS) [U] KK_T_OPSVKEI_ISP`, `callSC(EKK0351A010CBS) [R] KK_T_OPSVKEI_ISP`, `callSC(EKK0361C040CBS) [U] KK_T_OPSVKEI_ISP` |

## 6. Per-Branch Detail Blocks

### Block 1 — ASSIGNMENT (Initialization) (L4317)

> Initialize local variables and prepare for the first SC call. The `dtm` variable is set to the passed `updDtm` value, which will be updated throughout processing as each SC call returns a new timestamp.

| # | Type | Code |
|---|------|------|
| 1 | SET | `dtm = updDtm` // Local copy of update datetime for optimistic concurrency |
| 2 | SET | `msg = null` // Will hold the matching Smart Rack Premium contract record |

### Block 2 — SET (EKK0351B002CBS Input Build) (L4326)

> Build the input message for querying the **option service contract list** (オプションサービス契約一覧照会). This call retrieves all option service contracts associated with the given service category number. The function code is set to `FUNC_CODE_1` ("1" = Check and Register). The `KEY_SVC_KEI_NO` is set to the passed `svcKeiNo` to scope the query to the specific service line.

| # | Type | Code |
|---|------|------|
| 1 | SET | `ekk0351b002InMsg` = `{{TEMPLATEID, TEMPLATE_ID_EKK0351B002}, {FUNC_CODE, FUC_CODE_1}, {KEY_SVC_KEI_NO, svcKeiNo}, ...}` // Build input array |
| 2 | SET | `{TEMPLATEID, TEMPLATE_ID_EKK0351B002}` // Template ID for EKK0351B002CBS |
| 3 | SET | `{FUNC_CODE, FUC_CODE_1}` // FUNC_CODE_1 = "1" (Check and Register) |
| 4 | SET | `{KEY_SVC_KEI_NO, svcKeiNo}` // Service category number to query |
| 5 | SET | `{KEY_SVC_KEI_UCWK_NO, ""}` // Empty — not used for list query |
| 6 | SET | `{KEY_OP_SVC_CD, ""}` // Empty — retrieves all option service codes |
| 7 | SET | `{KEY_BASE_YMD, ""}` // Empty — no date filter |
| 8 | SET | `{KEY_KKTK_SVC_KEI_NO, ""}` // Empty — not used |

### Block 3 — CALL (EKK0351B002CBS SC Call) (L4344)

> Execute the service component call to retrieve the option service contract list. The result is cast to `CAANMsg[]` and extracted via `EKK0351B002CBSMSG1LIST`.

| # | Type | Code |
|---|------|------|
| 1 | CALL | `opMsg = callSC(handle, scCall, param, fixedText, ekk0351b002InMsg).getCAANMsgList(EKK0351B002CBSMSG1LIST)` |

### Block 4 — FOR (Iterate through option service contract records) (L4347)

> Loop through all option service contract records returned by EKK0351B002CBS. For each record, extract the option service code, service status, and service charge start date.

| # | Type | Code |
|---|------|------|
| 1 | SET | `opSvcCd = opMsg[i].getString(EKK0351B002CBSMsg1List.OP_SVC_CD)` // Option service code |
| 2 | SET | `opStat = opMsg[i].getString(EKK0351B002CBSMsg1List.OP_SVC_KEI_STAT)` // Service contract status |
| 3 | SET | `svcChrgStaYmd = opMsg[i].getString(EKK0351B002CBSMsg1List.SVC_CHRG_STAYMD)` // Service charge start year-month-day |

### Block 5 — IF (Smart Rack Premium Match Check) (L4355) `[OP_SVC_CD_B077="B077"]` `[MAX_DATE="20991231"]` `[SVC_KEI_STAT_020="020"]` `[SVC_KEI_STAT_030="030"]`

> Search for a matching **Smart Rack Premium** (スマートリンクプレミアム, B077) option service contract record. The record must satisfy ALL of the following conditions simultaneously:

1. **Option service code is B077** — The `OP_SVC_CD` must equal `"B077"` (Smart Rack Premium).
2. **Service charge start date is empty OR system max date** — Either `SVC_CHRG_STAYMD` has a real value (checked via `isValueChk`) OR it equals `"20991231"` (the system's maximum date, indicating no charge has started yet).
3. **Service status is inspection complete or termination complete** — The `OP_SVC_KEI_STAT` must be either `"020"` (Inspection Complete / 照済済) or `"030"` (Termination Complete / 結済済).

This combination finds a valid Smart Rack Premium contract that is either awaiting inspection completion or has already been terminated — both are eligible for ISP start processing.

| # | Type | Code |
|---|------|------|
| 1 | IF | `OP_SVC_CD_B077.equals(opSvcCd)` `[B077]` // Smart Rack Premium code match |
| 2 | AND | `isValueChk(opMsg[i], SVC_CHRG_STAYMD) || MAX_DATE.equals(svcChrgStaYmd)` `[20991231]` // Charge start date has value or is max date |
| 3 | AND | `SVC_KEI_STAT_020.equals(opStat) || SVC_KEI_STAT_030.equals(opStat)` `[020/030]` // Inspection complete OR termination complete |
| 4 | SET | `msg = opMsg[i]` // Store matching record |
| 5 | EXEC | `break` // Exit loop |

### Block 6 — IF (No Matching Record) (L4368)

> If no Smart Rack Premium record was found (msg is null), the method returns the original `dtm` timestamp without performing any further processing. This is the early-exit path for customers who do not have a Smart Rack Premium option contract.

| # | Type | Code |
|---|------|------|
| 1 | IF | `null == msg` // No matching Smart Rack Premium record |
| 2 | RETURN | `return dtm` // Return original timestamp, no further processing |

### Block 7 — GET (Extract Contract Details) (L4373)

> Having found a matching Smart Rack Premium record, extract the key fields from it. These fields are used for subsequent SC calls: the service status determines ISP processing flow, the generation/addition datetime is used for ISP agreement queries, and the option service category number is used as a key for ISP-related operations.

| # | Type | Code |
|---|------|------|
| 1 | SET | `stat = msg.getString(EKK0351B002CBSMsg1List.OP_SVC_KEI_STAT)` // Service status (020 or 030) |
| 2 | SET | `geneAddDtm = msg.getString(EKK0351B002CBSMsg1List.GENE_ADD_DTM)` // Generation/addition datetime |
| 3 | SET | `opSvcKeiNo = msg.getString(EKK0351B002CBSMsg1List.OP_SVC_KEI_NO)` // Option service category number (key for ISP SC calls) |

### Block 8 — SET (EKK0361A010CBS Input Build) (L4379)

> Build the input message for querying the **option service contract ISP agreement confirmation** (オプションサービス契約<ISP>同意照会). This retrieves the ISP-side agreement details for the found option service contract, including network configuration parameters.

| # | Type | Code |
|---|------|------|
| 1 | SET | `ekk0361a010InMsg` = `{{TEMPLATEID, TEMPLATE_ID_EKK0361A010}, {FUNC_CODE, FUC_CODE_1}, {KEY_OP_SVC_KEI_NO, opSvcKeiNo}, {KEY_GENE_ADD_DTM, geneAddDtm}}` |
| 2 | SET | `{KEY_OP_SVC_KEI_NO, opSvcKeiNo}` // Option service contract number (primary key) |
| 3 | SET | `{KEY_GENE_ADD_DTM, geneAddDtm}` // Generation/addition datetime |

### Block 9 — CALL (EKK0361A010CBS SC Call) (L4387)

> Execute the service component call to retrieve the option service contract ISP agreement details.

| # | Type | Code |
|---|------|------|
| 1 | CALL | `ekk0361a010outMsg = callSC(handle, scCall, param, fixedText, ekk0361a010InMsg).getCAANMsgList(EKK0361A010CBSMSG1LIST)` |

### Block 10 — IF (ISP Agreement Found) (L4391)

> If the ISP agreement search returned at least one record, proceed with ISP start processing. This block contains the core ISP processing logic: set the movement classification to option settings (00031), conditionally terminate a previous ISP if the status is inspection complete, search the full agreement details, and then conditionally execute ISP start.

| # | Type | Code |
|---|------|------|
| 1 | IF | `null != ekk0361a010outMsg && 0 < ekk0361a010outMsg.length` |
| 2 | SET | `ido_div = IDO_DIV_00031` `[00031]` // Hardcoded: Movement classification = Option Settings (オプション設定) |

#### Block 10.1 — IF (Inspection Complete — ISP Termination) (L4399) `[SVC_KEI_STAT_020="020"]`

> When the service status is inspection complete (照済済 / "020"), the method first executes an **ISP termination** (オプションサービス契約<ISP>終了) to clean up any existing ISP configuration before starting the new one. This ensures a clean state before activating the service.

| # | Type | Code |
|---|------|------|
| 1 | IF | `SVC_KEI_STAT_020.equals(stat)` `[020 = Inspection Complete]` |
| 2 | SET | `ekk0361c020InMsg` = `{{TEMPLATEID, TEMPLATE_ID_EKK0361C020}, {FUNC_CODE, FUC_CODE_1}, {OP_SVC_KEI_NO, opSvcKeiNo}, {IDO_DIV, ido_div}, {IPV6_AD_IFID, ekk0361a010outMsg[0].getString(IPV6_AD_IFID)}, {UPD_DTM_BF, dtm}, {RULE0059_AUTO_APLY, "0"}}` |
| 3 | SET | `{RULE0059_AUTO_APLY, "0"}` // Auto-apply disabled (0 = not applied) |
| 4 | CALL | `ekk0361c020outMsg = callSC(handle, scCall, param, fixedText, ekk0361c020InMsg)` // Execute ISP termination |
| 5 | SET | `dtm = ekk0361c020outMsg.getString(EKK0361C020CBSMsg.UPD_DTM)` // Update timestamp from termination result |

### Block 11 — SET (EKK0351A010CBS Input Build) (L4413)

> Build the input message for querying the **option service contract agreement details** (オプションサービス契約同意照会). This retrieves full contract details including network settings (IPv6, VoIP, mail gateway) and the service start desired date.

| # | Type | Code |
|---|------|------|
| 1 | SET | `ekk0351a010InMsg` = `{{TEMPLATEID, TEMPLATE_ID_EKK0351A010}, {FUNC_CODE, FUC_CODE_1}, {KEY_OP_SVC_KEI_NO, opSvcKeiNo}, {KEY_GENE_ADD_DTM, geneAddDtm}}` |
| 2 | SET | `{KEY_OP_SVC_KEI_NO, opSvcKeiNo}` // Option service contract number |
| 3 | SET | `{KEY_GENE_ADD_DTM, geneAddDtm}` // Generation/addition datetime |

### Block 12 — CALL (EKK0351A010CBS SC Call) (L4421)

> Execute the service component call to retrieve the full option service contract agreement details.

| # | Type | Code |
|---|------|------|
| 1 | CALL | `ekk0351a010outMsg = callSC(handle, scCall, param, fixedText, ekk0351a010InMsg).getCAANMsgList(EKK0351A010CBSMSG1LIST)` |

### Block 13 — IF (Agreement Found — Extract Start Date) (L4429)

> If the agreement search returned results, extract the **service start desired date** (サービス利用開始希望年月日) from the first record. This date is used to determine whether the service can be started now or needs to wait.

| # | Type | Code |
|---|------|------|
| 1 | IF | `null != ekk0351a010outMsg && 0 < ekk0351a010outMsg.length` |
| 2 | SET | `svcUseStaKiboYmd = ekk0351a010outMsg[0].getString(EKK0351A010CBSMsg1List.SVC_USE_STA_KIBO_YMD)` // Service start desired date |

### Block 14 — IF (Service Start Date Check) (L4436)

> The comment states: "When the option service contract's 'service start desired date' is NOT a future date, execute the option service contract ISP start processing." The `svcUseStaKiboYmdCheck` method compares the `baseYMD` (the proposed start date for this equipment addition) against the `svcUseStaKiboYmd` (the desired start date on the contract). If the check passes (meaning the desired date is not after the base date), ISP start processing is eligible.

| # | Type | Code |
|---|------|------|
| 1 | IF | `this.svcUseStaKiboYmdCheck(baseYMD, svcUseStaKiboYmd)` // Service start date is not in the future |

#### Block 14.1 — IF (Additional Change Flag Check) (L4440) `[v10.00.02 Addition]`

> Version 10.00.02 introduced a conditional check for additional change operations. If `adchgFlg` is `false`, ISP start processing always proceeds (normal operation). If `adchgFlg` is `true`, processing only proceeds when `dateStiFlg` is also `true` (date has been properly set). This prevents premature ISP activation during multi-step additional change operations where the start date hasn't been confirmed yet.

| # | Type | Code |
|---|------|------|
| 1 | IF | `!adchgFlg || (adchgFlg && dateStiFlg)` |
| 2 | SET | `ekk0361c040InMsg` = `{{TEMPLATEID, TEMPLATE_ID_EKK0361C040}, {FUNC_CODE, FUC_CODE_1}, {OP_SVC_KEI_NO, opSvcKeiNo}, {IDO_DIV, ido_div}, {MLTISE_NINSHO_ID, ...}, {MLTISE_NINSHO_ID_PWD, ...}, {KOTEI_IP_AD, ...}, {NETMASK, ...}, {MLAD, ...}, {CAPA, ...}, {HOSML_KRISHA_MLAD, ...}, {HOSML_KRISHA_MAIL_BOX_CAPA, ...}, {DPAD_MLAD, ...}, {VOIP_USER_ID, ...}, {VOIP_TELNO, ...}, {MAIL_GW_KRISHA_ID, ...}, {MAIL_GW_KRISHA_ID_PWD, ...}, {MAIL_GW_KRISHA_MLAD, ...}, {MAIL_GW_RCV_MSERVER_IP_AD, ...}, {MAIL_GW_SEND_MSERVER_IP_AD, ...}, {ML_GW_ACCOUNT_CNT, ...}, {KOSHUMO_TELNO, ...}, {IPV6_AD_IFID, ...}, {UPD_DTM_BF, dtm}, {SKJ_YKGT, ""}, {OP_HKTGI_SK_SVC_KEI_NO, ""}}` |
| 3 | SET | `{SKJ_YKGT, ""}` // Settlement transfer flag — empty (not applicable) |
| 4 | SET | `{OP_HKTGI_SK_SVC_KEI_NO, ""}` // Option handover service category number — empty |
| 5 | SET | `MLTISE_NINSHO_ID` = `ekk0361a010outMsg[0].getString(MLTISE_NINSHO_ID)` // Multilayer authentication ID |
| 6 | SET | `MLTISE_NINSHO_ID_PWD` = `ekk0361a010outMsg[0].getString(MLTISE_NINSHO_ID_PWD)` // Multilayer authentication ID password |
| 7 | SET | `KOTEI_IP_AD` = `ekk0361a010outMsg[0].getString(KOTEI_IP_AD)` // Fixed IP address |
| 8 | SET | `NETMASK` = `ekk0361a010outMsg[0].getString(NETMASK)` // Netmask |
| 9 | SET | `MLAD` = `ekk0361a010outMsg[0].getString(MLAD)` // Multilayer IPv6 prefix |
| 10 | SET | `CAPA` = `ekk0361a010outMsg[0].getString(CAPA)` // Capacity/bandwidth parameter |
| 11 | SET | `HOSML_KRISHA_MLAD` = `ekk0361a010outMsg[0].getString(HOSML_KRISHA_MLAD)` // Home ML processing IPv6 prefix |
| 12 | SET | `HOSML_KRISHA_MAIL_BOX_CAPA` = `ekk0361a010outMsg[0].getString(HOSML_KRISHA_MAIL_BOX_CAPA)` // Home ML processing mail box capacity |
| 13 | SET | `DPAD_MLAD` = `ekk0361a010outMsg[0].getString(DPAD_MLAD)` // DHCPv6 prefix delegation IPv6 prefix |
| 14 | SET | `VOIP_USER_ID` = `ekk0361a010outMsg[0].getString(VOIP_USER_ID)` // VoIP user ID |
| 15 | SET | `VOIP_TELNO` = `ekk0361a010outMsg[0].getString(VOIP_TELNO)` // VoIP phone number |
| 16 | SET | `MAIL_GW_KRISHA_ID` = `ekk0361a010outMsg[0].getString(MAIL_GW_KRISHA_ID)` // Mail gateway processing ID |
| 17 | SET | `MAIL_GW_KRISHA_ID_PWD` = `ekk0361a010outMsg[0].getString(MAIL_GW_KRISHA_ID_PWD)` // Mail gateway processing password |
| 18 | SET | `MAIL_GW_KRISHA_MLAD` = `ekk0361a010outMsg[0].getString(MAIL_GW_KRISHA_MLAD)` // Mail gateway processing IPv6 prefix |
| 19 | SET | `MAIL_GW_RCV_MSERVER_IP_AD` = `ekk0361a010outMsg[0].getString(MAIL_GW_RCV_MSERVER_IP_AD)` // Mail gateway receive mail server IP |
| 20 | SET | `MAIL_GW_SEND_MSERVER_IP_AD` = `ekk0361a010outMsg[0].getString(MAIL_GW_SEND_MSERVER_IP_AD)` // Mail gateway send mail server IP |
| 21 | SET | `ML_GW_ACCOUNT_CNT` = `ekk0361a010outMsg[0].getString(ML_GW_ACCOUNT_CNT)` // Mail gateway account count |
| 22 | SET | `KOSHUMO_TELNO` = `ekk0361a010outMsg[0].getString(KOSHUMO_TELNO)` // Emergency phone number |
| 23 | SET | `IPV6_AD_IFID` = `ekk0361a010outMsg[0].getString(IPV6_AD_IFID)` // IPv6 address interface ID |
| 24 | SET | `UPD_DTM_BF, dtm` // Previous update timestamp |
| 25 | CALL | `ekk0361c040outMsg = callSC(handle, scCall, param, fixedText, ekk0361c040InMsg)` // Execute ISP start processing |
| 26 | SET | `dtm = ekk0361c040outMsg.getString(EKK0361C040CBSMsg.UPD_DTM)` // Update timestamp from ISP start result |

#### Block 14.2 — ELSE (adchgFlg true && dateStiFlg false)

> When `adchgFlg` is `true` but `dateStiFlg` is `false`, the ISP start processing (EKK0361C040CBS) is skipped. This occurs during additional change operations where the start date has not yet been confirmed. The method continues to return the `dtm` without ISP activation.

| # | Type | Code |
|---|------|------|
| 1 | EXEC | (Implicit no-op — EKK0361C040CBS call is not executed) |

### Block 15 — RETURN (L4500)

> Return the final `dtm` value. If all processing succeeded, this is the timestamp from the last SC call executed (EKK0361C040CBS or EKK0361C020CBS). If no Smart Rack Premium was found or no further processing was needed, it is the original `updDtm` value.

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

## 7. Glossary

| Term | Type | Business Meaning |
|------|------|------------------|
| `callOpSvcStart` | Method | Option Service Contract Start Processing — activates ISP network settings for an option service contract |
| Smart Rack Premium (B077) | Business term | An optional add-on service (smart link premium) bundled with broadband fiber contracts; identified by option service code "B077" |
| `svcKeiNo` | Field | Service category number — identifies the top-level service contract line item; used as the primary key for querying option service contracts |
| `OP_SVC_CD` | Field | Option service code — identifies the type of option service (e.g., "B077" = Smart Rack Premium, "B070" = V-ONU) |
| `OP_SVC_KEI_STAT` | Field | Option service category status — the current status of the option service contract (020 = Inspection Complete, 030 = Termination Complete) |
| `SVC_CHRG_STAYMD` | Field | Service charge start year-month-day — when billing starts for this service; empty or 20991231 means charge hasn't started |
| Inspection Complete (照済済) | Business term | Service status "020" — the service has passed inspection and is ready for activation |
| Termination Complete (結済済) | Business term | Service status "030" — the service has been fully processed and terminated |
| `IDO_DIV_00031` | Constant | Movement classification code "00031" = Option Settings (オプション設定) — used for ISP configuration changes |
| `IDO_DIV_00026` | Constant | Movement classification code "00026" = Equipment Addition (機器追加) — originally considered but replaced by hardcoded 00031 |
| `geneAddDtm` | Field | Generation/addition datetime — the timestamp when the option service contract record was created/added |
| `opSvcKeiNo` | Field | Option service category number — the unique identifier for an option service contract; used as key in ISP-related SC calls |
| EKK0351B002CBS | SC Code | Option Service Contract List Inquiry — retrieves the list of option service contracts for a service category |
| EKK0361A010CBS | SC Code | Option Service Contract ISP Agreement Inquiry — retrieves ISP agreement details and network configuration parameters |
| EKK0361C020CBS | SC Code | Option Service Contract ISP Termination — terminates an existing ISP configuration for a service contract |
| EKK0351A010CBS | SC Code | Option Service Contract Agreement Inquiry — retrieves full contract details including network settings and desired start date |
| EKK0361C040CBS | SC Code | Option Service Contract ISP Start — activates ISP service with IPv6, VoIP, mail gateway, and network parameters |
| `FUNC_CODE_1` | Constant | Function code "1" = Check and Register (チェック＆登録) — the processing mode for SC calls |
| `adchgFlg` | Field | Additional change flag (追加変更フラグ) — indicates whether this is an additional change operation |
| `dateStiFlg` | Field | Date start flag (日付設定フラグ) — indicates whether the start date has been set; only meaningful when `adchgFlg` is true |
| `baseYMD` | Field | Base year-month-day — the proposed service start date (YYYYMMDD); compared against the contract's desired start date |
| `svcUseStaKiboYmd` | Field | Service start desired year-month-day — the customer's desired service activation date on the contract |
| `MLTISE_NINSHO_ID` | Field | Multilayer authentication ID — credentials for the ISP's multilayer authentication system |
| `KOTEI_IP_AD` | Field | Fixed IP address — the static IPv4 address assigned to the customer's connection |
| `NETMASK` | Field | Netmask — the subnet mask for the customer's IPv4 connection |
| `MLAD` | Field | Multilayer IPv6 prefix — the IPv6 address prefix assigned at the multilayer (Layer 3) level |
| `IPV6_AD_IFID` | Field | IPv6 address interface ID — the interface identifier portion of the IPv6 address |
| `VOIP_USER_ID` | Field | VoIP user ID — credentials for the VoIP (Voice over IP) service |
| `VOIP_TELNO` | Field | VoIP telephone number — the phone number assigned to the VoIP service |
| `MAIL_GW_KRISHA_ID` | Field | Mail gateway processing ID — credentials for the mail gateway service |
| `MAIL_GW_RCV_MSERVER_IP_AD` | Field | Mail gateway receive mail server IP — the IP address of the receive mail server |
| `MAIL_GW_SEND_MSERVER_IP_AD` | Field | Mail gateway send mail server IP — the IP address of the send mail server |
| `KOSHUMO_TELNO` | Field | Emergency phone number (救急電話番号) — the emergency services phone number for the connection |
| `UPD_DTM_BF` | Field | Update datetime before — optimistic concurrency control timestamp sent with update SC calls |
| `SKJ_YKGT` | Field | Settlement transfer (決済移管) — flag for financial settlement transfer; empty for this processing |
| `CAPA` | Field | Capacity — bandwidth or service capacity parameter for the ISP connection |
| `HOSML_KRISHA_MLAD` | Field | Home ML processing IPv6 prefix — the IPv6 prefix for home multilayer processing |
| `HOSML_KRISHA_MAIL_BOX_CAPA` | Field | Home ML processing mail box capacity — the mail storage capacity for home ML processing |
| `DPAD_MLAD` | Field | DHCPv6 prefix delegation IPv6 prefix — the prefix delegated via DHCPv6 |
| `ML_GW_ACCOUNT_CNT` | Field | Mail gateway account count — the number of mail gateway accounts configured |
| KK_T_OPSVKEI_ISP | DB Table | Option service contract ISP entity table — stores option service contract records and their ISP-side configuration |
| `TEMPLATE_ID_EKK*` | Constant | Message template ID constant for each SC CBS endpoint |
