# Business Logic — JKKDslRunCC.getInvokeCBS() [12 LOC]

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

## 1. Role

### JKKDslRunCC.getInvokeCBS()

This method performs the **cancellation execution check processing** (解約実行のチェック処理) within the K-Opticom DSL (Digital Subscriber Line) service termination workflow. It is a shared utility method in the cancellation execution CC class that prepares and validates input message maps before delegating to backend CBS (Central Business System) calls.

The method implements a **pre-flight preparation pattern**: it initializes the execution context (clearing error queues, ensuring the mapper instance exists), extracts the service contract number from the parameter data, and hands off the request to the mapper's `editInMsgEKK0081A010` method to build the structured service component call message. Its SC Code is `EKK0081A010`, which corresponds to the DSL cancellation service component.

The method serves as a **common gateway** called by numerous check-processing classes (BP check classes) across multiple screens — primarily screens handling service contract cancellation (KKSV0568), contract information updates (KKSV0791, KKSV0339), and various DSL-related operations. It is not a standalone screen entry point but a reusable preparation step invoked within the broader cancellation-check-and-execute pipeline.

## 2. Processing Pattern (Detailed Business Logic)

```mermaid
flowchart TD
    START(["getInvokeCBS(handle, param, fixedText)"])
    INIT["init(param, fixedText)
Initialize mapper & clear error queue"]
    GET_DATA["param.getData(fixedText)
Get parameter data map"]
    GET_SVC["inMap.get(\"svc_kei_no\")
Extract service contract number"]
    EDIT_MSG["mapper.editInMsgEKK0081A010(param, fixedText, svcKeiNo)
Build CBS call message map"]
    END_NODE(["Return paramMap
HashMap<String, Object>"])

    START --> INIT --> GET_DATA --> GET_SVC --> EDIT_MSG --> END_NODE
```

**Processing Flow:**

1. **Initialize** — Calls `init(param, fixedText)` to ensure the `JKKDslRunMapperCC` mapper instance is instantiated (if null) and clears the error information queue in the control map via `param.setControlMapData(SCControlMapKeys.ERROR_INFO, new ArrayList<Object>())`.

2. **Extract Data Map** — Retrieves the parameter data map associated with the `fixedText` key from the request parameter object. This map carries the business data group for the current cancellation check context.

3. **Extract Service Contract Number** — Pulls the service contract number (`svc_kei_no`) from the data map using the resolved constant `JKKDslRunConstCC.SVC_KEI_NO = "svc_kei_no"`.

4. **Build CBS Call Message** — Delegates to the mapper's `editInMsgEKK0081A010` method, passing the request parameter, the fixed text key, and the service contract number. The mapper constructs the input message map for the CBS service component.

5. **Return** — Returns the prepared `HashMap<String, Object>` for downstream CBS invocation.

## 3. Parameter Analysis

| No | Parameter Name | Type | Business Description |
|----|---------------|------|---------------------|
| 1 | `handle` | `SessionHandle` | Session manager handle carrying the user's session context, including authentication, transaction management, and database connection state. Used as the primary context object for CBS service invocations. |
| 2 | `param` | `IRequestParameterReadWrite` | Request parameter object containing the model data group (business data maps keyed by strings) and the control map (system-level metadata such as error queues and processing flags). This is the central data carrier throughout the BP check pipeline. |
| 3 | `fixedText` | `String` | User-defined string key used as a map key to locate and extract specific data groups within the `param` object. Typically set to a screen identifier (e.g., `"KKSV079101CC"`) or a contextual tag that scopes the parameter data to the calling screen/operation. |

**Instance fields read:**

| Field | Type | Business Description |
|-------|------|---------------------|
| `mapper` | `JKKDslRunMapperCC` | DSL cancellation message mapper responsible for building and transforming input message maps for the CBS service component `EKK0081A010`. Lazily initialized on first call. |

## 4. CRUD Operations / Called Services

| CRUD | SC / CBS | SC Code | Entity / DB | Operation Description |
|------|----------|---------|-------------|----------------------|
| I | `JKKDslRunCC.init` | - | - | Initializes the mapper instance and clears the error information control map queue. Internal setup, no DB interaction. |
| R | `IRequestParameterReadWrite.getData` | - | - | Reads the parameter data map associated with the `fixedText` key from the request parameter object. |
| - | `HashMap.get` | - | - | Retrieves the service contract number value from the data map using the key `"svc_kei_no"`. |
| U | `JKKDslRunMapperCC.editInMsgEKK0081A010` | EKK0081A010 | - | Builds/edits the input message map for the DSL cancellation CBS service component. Transforms parameter data into the structured format expected by the CBS. |

**Classification rationale:**

- **`init` (Internal setup):** Not a CRUD operation — it performs object instantiation and error queue reset. No data read/write to persistent storage.
- **`param.getData()` (R):** Read from the request parameter's data store to obtain the business data map.
- **`inMap.get()` (Read):** In-memory extraction from the HashMap.
- **`mapper.editInMsgEKK0081A010` (U):** The method name `editInMsg` indicates it edits/builds the input message structure for the CBS. SC Code `EKK0081A010` follows the K-Opticom convention where `EKK` denotes the DSL/cancellation business domain, `0081` is the specific service number, and `A010` is the processing sequence.

## 5. Dependency Trace

| # | Caller (Screen/Batch) | Call Chain (Full Path to this Method) | Terminal (SC / CRUD / Entity) |
|---|----------------------|--------------------------------------|-------------------------------|
| 1 | Screen:KKSV0791 | `KKSV0791_KKSV0791OPBPCheck.getInvokeCBS` -> `jkkopchrirekilistdlydcc.getInvokeCBS` | `editInMsgEKK0081A010 [U] EKK0081A010` |
| 2 | Screen:CRSV0183 | `CRSV0183_CRSV0183OPBPCheck.getInvokeCBS` -> `jcrgetdenshifilectl1icc.getInvokeCBS` | `editInMsgEKK0081A010 [U] EKK0081A010` |
| 3 | Screen:KKSV0339 | `KKSV0339_KKSV0339OPBPCheck.getInvokeCBS` -> `jkknnowsvcinfocc.getInvokeCBS` | `editInMsgEKK0081A010 [U] EKK0081A010` |
| 4 | Screen:SCSV0028 | `SCSV0028_SCSV0028OPBPCheck.getInvokeCBS` -> `jscsv002801cc.getInvokeCBS` | `editInMsgEKK0081A010 [U] EKK0081A010` |
| 5 | Screen:CRSV0025 | `CRSV0025_CRSV0025OPBPCheck.getInvokeCBS` -> `jcrjudgengwordcc.getInvokeCBS` | `editInMsgEKK0081A010 [U] EKK0081A010` |
| 6 | Screen:CRSV0025 | `CRSV0025_CRSV0025OPBPCheck.getInvokeCBS` -> `jcraddtaiokrkdtlcallcc.getInvokeCBS` | `editInMsgEKK0081A010 [U] EKK0081A010` |
| 7 | Screen:CRSV0025 | `CRSV0025_CRSV0025OPBPCheck.getInvokeCBS` -> `jcraddhotvoiccc.getInvokeCBS` | `editInMsgEKK0081A010 [U] EKK0081A010` |
| 8 | Screen:KKSV0630 | `KKSV0630_KKSV0630OPBPCheck.getInvokeCBS` -> `jkkhapiepointkeiresearchforrsvcc.getInvokeCBS` | `editInMsgEKK0081A010 [U] EKK0081A010` |
| 9 | Screen:KKSV0781 | `KKSV0781_KKSV0781OPBPCheck.getInvokeCBS` -> `jkksamescreenheadercc.getInvokeCBS` | `editInMsgEKK0081A010 [U] EKK0081A010` |
| 10 | Screen:KKSV0781 | `KKSV0781_KKSV0781OPBPCheck.getInvokeCBS` -> `jkkintrinfochgcfmcc.getInvokeCBS` | `editInMsgEKK0081A010 [U] EKK0081A010` |
| 11 | Screen:KKSV0568 | `KKSV0568_KKSV0568OPBPCheck.getInvokeCBS` -> `jkkcancelsvcwribcc.getInvokeCBS` | `editInMsgEKK0081A010 [U] EKK0081A010` |
| 12 | Screen:KKSV0568 | `KKSV0568_KKSV0568OPBPCheck.getInvokeCBS` -> `jkkcanceluseplaceinfocc.getInvokeCBS` | `editInMsgEKK0081A010 [U] EKK0081A010` |
| 13 | Screen:KKSV0568 | `KKSV0568_KKSV0568OPBPCheck.getInvokeCBS` -> `jkkcancelsvckeimobilecc.getInvokeCBS` | `editInMsgEKK0081A010 [U] EKK0081A010` |
| 14 | Screen:KKSV0568 | `KKSV0568_KKSV0568OPBPCheck.getInvokeCBS` -> `jkkcancelsvckeitvcc.getInvokeCBS` | `editInMsgEKK0081A010 [U] EKK0081A010` |
| 15 | Screen:KKSV0568 | `KKSV0568_KKSV0568OPBPCheck.getInvokeCBS` -> `jkkcancelsvckeitelcc.getInvokeCBS` | `editInMsgEKK0081A010 [U] EKK0081A010` |

**Caller analysis:** The `getInvokeCBS` method follows a delegation pattern where numerous wrapper CC classes (each prefixed with `j` for the specific operation, such as `jkkcancelsvcwribcc` for cancel service write-back) call through to this common implementation. The callers span:

- **KKSV0568** (Cancellation screen): Multiple cancellation sub-operations (service write-back, usage place info, mobile/TV/TEL/NET service cancellation, IC card set, application history, gift service, MSKM info).
- **KKSV0791** (OP Chiriki List DSL): DSL support list check.
- **KKSV0339** (No Service Info): Service info check.
- **KKSV0781** (Same Screen Header / Inter Info Change Confirmation): Header and confirmation checks.
- **KKSV0630** (Hapie Point Research): Loyalty point research check.
- **CRSV0025/CRSV0183/CRSV0174** (CR screens): Content-related checks (NG word judgment, add tai ok rk dtl call, hot voice).
- **CNSV0045/CNSV0051** (CNS screens): Content service checks.
- **CKSV0017** (CK screens): Customer list search.
- **CHSV0008** (CH screens): General check.

## 6. Per-Branch Detail Blocks

**Block 1** — [METHOD ENTRY] `(SessionHandle handle, IRequestParameterReadWrite param, String fixedText)` (L73)

> Entry point for the cancellation execution check. This block handles the initialization of the processing context and the extraction/building of the CBS call message.

| # | Type | Code |
|---|------|------|
| 1 | CALL | `init(param, fixedText)` // Initialize mapper and clear error queue [-> CONSTANT="svc_kei_no" resolution] |

**Block 1.1** — [NESTED: `init` method] `(IRequestParameterReadWrite param, String fixedText)` (L59)

> Initializes the mapper instance and resets the control map error information queue.

| # | Type | Code |
|---|------|------|
| 1 | IF | `null == this.mapper` [Mapper lazy initialization guard] (L62) |

**Block 1.1.1** — [IF-BRANCH: mapper is null] (L63)

| # | Type | Code |
|---|------|------|
| 1 | SET | `this.mapper = new JKKDslRunMapperCC()` // Instantiate DSL cancellation message mapper |

**Block 1.1.2** — [ELSE: mapper already exists] (L62)

> No action needed — mapper was already initialized by a previous call.

| # | Type | Code |
|---|------|------|
| 1 | SET | `param.setControlMapData(SCControlMapKeys.ERROR_INFO, new ArrayList<Object>())` // Clear error info queue [-> CONTROL_KEY="ERROR_INFO"] |

**Block 2** — [STATEMENT] `(Extract data map)` (L77)

> Retrieves the business data map associated with the `fixedText` key from the request parameter object. This map carries all the domain-specific data needed for the cancellation check context.

| # | Type | Code |
|---|------|------|
| 1 | EXEC | `param.getData(fixedText)` // Retrieve data map by fixedText key |
| 2 | SET | `HashMap inMap = (HashMap) param.getData(fixedText)` // Cast to HashMap for type-safe access |

**Block 3** — [STATEMENT] `(Extract service contract number)` (L78)

> Pulls the service contract number from the data map using the constant key `"svc_kei_no"`.

| # | Type | Code |
|---|------|------|
| 1 | EXEC | `inMap.get(JKKDslRunConstCC.SVC_KEI_NO)` [-> CONSTANT="svc_kei_no"] // Get service contract number |
| 2 | SET | `String svcKeiNo = (String) inMap.get(JKKDslRunConstCC.SVC_KEI_NO)` // Cast to String for SC code routing |

**Block 4** — [STATEMENT] `(Build CBS call message)` (L79)

> Delegates to the mapper to construct the structured input message map for the CBS service component `EKK0081A010`. The mapper transforms the raw parameter data into the CBS-expected format using the service contract number as a routing/lookup key.

| # | Type | Code |
|---|------|------|
| 1 | CALL | `this.mapper.editInMsgEKK0081A010(param, fixedText, svcKeiNo)` [-> SC Code="EKK0081A010"] // Build CBS call message |
| 2 | SET | `HashMap<String, Object> paramMap = this.mapper.editInMsgEKK0081A010(param, fixedText, svcKeiNo)` |

**Block 5** — [RETURN] `(Return prepared map)` (L80)

> Returns the constructed parameter map for the caller to proceed with the CBS service component invocation.

| # | Type | Code |
|---|------|------|
| 1 | RETURN | `return paramMap;` // Return built CBS call message map |

## 7. Glossary

| Term | Type | Business Meaning |
|------|------|------------------|
| `svc_kei_no` | Field | Service contract number — the unique identifier for a service contract line item in the K-Opticom billing system |
| `svc_kei_ucwk_no` | Field | Service detail work number — internal tracking ID for service contract line item sub-processes |
| `ido_div` | Field | Movement division — classification code for the type of service change (new installation, transfer, cancellation) |
| `adchg_ido_div` | Field | Address change movement division — subclassification for service changes triggered by address changes |
| `kido_cd` | Field | Activation code — code indicating the service activation status or trigger type |
| `dsl` | Business term | Digital Subscriber Line — broadband internet service delivered over copper telephone lines |
| CBS | Acronym | Central Business System — the backend core system that processes service order transactions |
| SC | Acronym | Service Component — a modular service layer component identified by codes like `EKK0081A010`, handling specific business operations |
| CC | Acronym | Common Component — reusable shared classes in the K-Opticom architecture (e.g., `JKKDslRunCC`) that provide cross-cutting functionality |
| BP | Acronym | Business Process — the screen-level or workflow-level processing class (e.g., `KKSV0568OPBPCheck`) that orchestrates the end-to-end business operation |
| Mapper | Pattern | `JKKDslRunMapperCC` — a message transformation class that maps parameter data to/from CBS-expected formats |
| `JKKDslRunConstCC` | Class | DSL Run Constants class — holds all static constant keys used throughout the DSL cancellation processing module |
| `SCControlMapKeys.ERROR_INFO` | Constant | Control map key for the error information queue — used to pass error messages between processing stages |
| `fixedText` | Parameter | User-defined string key — acts as a context/scoping key to identify which data group within the parameter object to operate on |
| Cancellation (解約) | Business term | The process of terminating a K-Opticom service contract, involving validation, CBS coordination, and finalization across multiple sub-services |
| EKK | Prefix | K-Opticom service code prefix for DSL/cancellation-related business domain |
| CAANMsg | Class | Message container class from the `com.fujitsu.futurity.model.base` package — used for service component communication |
| SessionHandle | Class | Session management handle — carries session context (user, transaction, DB connection) for CBS invocations |
| `JBSbatDKNyukaFinAdd` | Class | Batch data entry finalization add — service component for finalizing batch data entry operations |
| `editInMsgEKK0081A010` | Method | CBS input message editing method — constructs the input parameter map for the DSL cancellation CBS call |
| `WORK_RRK_BIKO` | Field | Work reference memo — business note field for temporary work-related remarks |
| `SVC_ENDYMD` | Field | Service end date — the date when the service contract terminates |
| `SVC_CHRG_ENDYMD` | Field | Service charge end date — the date until which service charges are applied |
| `SVC_DSL_KISAN_YMD` | Field | Service cancellation accounting date — the date used for cancellation pro-rating calculations |
| `DSL_KIBO_YMD` | Field | Cancellation requested date — the date the customer requested service cancellation |
