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

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

## 1. Role

### JKKIdoRsvHaneiCC.getInvokeCBS()

The `getInvokeCBS` method performs a **check process for transfer reservation reflection** (異動予約反映のチェック処理) within the K-Opticom eo Customer Base System — a telecom service contract management platform operated by K-Opticom (a Japanese fiber-optic ISP subsidiary of Fujitsu). This method serves as the entry point for validating and preparing the data model prior to executing the actual transfer reservation processing (`executeIdoRsvHanei`). 

It implements a **delegation and initialization pattern**: the method delegates the core initialization logic to a private `init()` method which instantiates the associated mapper component (`JKKIdoRsvHaneiMapperCC`) and resets error tracking state in the control map. The method is part of a broader family of `getInvokeCBS` methods that follow a consistent naming and routing convention across the `com.fujitsu.futurity.bp.custom.*` package — each implementation handles check/validation setup for a specific business screen's custom component.

The method is defined as `public` and can be invoked by external screens, BPM operations, or other custom components that need to trigger the transfer reservation reflection workflow. Currently, its implementation returns `null`, with the actual business logic executed through the `executeIdoRsvHanei()` method on the same class — indicating that `getInvokeCBS` is a lightweight scaffolding method whose primary role is to initialize the component's internal state and prepare the parameter context for downstream processing. The method is used in a BPM (Business Process Management) workflow context, where the CCRequestBroker pattern routes invocations from screen operations through this method.

## 2. Processing Pattern (Detailed Business Logic)

```mermaid
flowchart TD
    START(["getInvokeCBS handle, param, fixedText"])
    CALL_INIT["CALL: init param, fixedText"]
    INIT_MAP["Initialize mapper: new JKKIdoRsvHaneiMapperCC if null"]
    INIT_ERROR["Set ERROR_INFO control map to empty ArrayList"]
    RETURN["Return null"]
    END_NODE(["End"])

    START --> CALL_INIT
    CALL_INIT --> INIT_MAP
    INIT_MAP --> INIT_ERROR
    INIT_ERROR --> RETURN
    RETURN --> END_NODE
```

**Processing Summary:**
1. **CALL init()** — Delegates to the private `init(param, fixedText)` method which performs:
   - Mapper instantiation check and lazy initialization
   - Error info control map reset
2. **Mapper Initialization** — If `this.mapper` is `null`, create a new `JKKIdoRsvHaneiMapperCC()` instance
3. **Error Info Reset** — Set `SCControlMapKeys.ERROR_INFO` in the parameter's control map to an empty `ArrayList<Object>`
4. **Return null** — The method returns `null` (the actual CBS invocation logic is handled by `executeIdoRsvHanei()`)

No conditional branches or constant-based routing exist in this method — it is a straight-line delegation pattern.

## 3. Parameter Analysis

| No | Parameter Name | Type | Business Description |
|----|---------------|------|---------------------|
| 1 | `handle` | `SessionHandle` | Session management handle that carries session context (database connections, transaction boundaries, user session state) for the BPM workflow. Passed through for CBS invocation but not directly used in this method's logic. |
| 2 | `param` | `IRequestParameterReadWrite` | Model group and control map parameter object. Carries business data between screen operations, BPM flows, and custom components. Contains the model data map (keyed by `fixedText`) and the control map which tracks error/info state. This is the primary object being initialized. |
| 3 | `fixedText` | `String` | User-designated arbitrary string used as a map key to identify and retrieve data within the parameter object. In practice, this is the screen identifier (e.g., `"JKKIdoRsvHaneiCC"` or `"KKSV044601CC"`) that serves as the namespace for data stored in the parameter's data map. |

**External State / Instance Fields:**

| Field | Type | Business Description |
|-------|------|---------------------|
| `mapper` | `JKKIdoRsvHaneiMapperCC` | Mapper component group used for message transformation between the parameter data and CBS (Call Back Service) message structures. Lazy-initialized on first access via `init()`. |

## 4. CRUD Operations / Called Services

| CRUD | SC / CBS | SC Code | Entity / DB | Operation Description |
|------|----------|---------|-------------|----------------------|
| - | `JKKIdoRsvHaneiCC.init` | JKKIdoRsvHaneiCC | - | Calls `init` in `JKKIdoRsvHaneiCC` — private initialization method (see Block analysis below) |

This method does not perform any direct database CRUD operations. It delegates to `init()` which only initializes internal state (mapper instantiation and error map reset). The actual CBS calls and database interactions are performed by the `executeIdoRsvHanei()` method, which is invoked separately through the `CCRequestBroker` pattern from BPM operations (e.g., `KKSV0446OPOperation`).

## 5. Dependency Trace

| # | Caller (Screen/Batch) | Call Chain (Full Path to this Method) | Terminal (SC / CRUD / Entity) |
|---|----------------------|--------------------------------------|-------------------------------|
| 1 | Screen:KKSV0446 | `KKSV0446OPOperation.run` -> `CCRequestBroker.run` -> `JKKIdoRsvHaneiCC.executeIdoRsvHanei` -> `JKKIdoRsvHaneiCC.getInvokeCBS` | `executeIdoRsvHanei [no direct CRUD in getInvokeCBS]` |
| 2 | Custom CC: JKKAdchgIdoRsvHaneiCC | `JKKAdchgIdoRsvHaneiCC` -> `JKKIdoRsvHaneiCC.executeIdoRsvHanei` -> `JKKIdoRsvHaneiCC.getInvokeCBS` | `executeIdoRsvHanei [no direct CRUD in getInvokeCBS]` |

**Notes:**
- `getInvokeCBS` follows the common pattern across the `bp.custom.*` package where a `getInvokeCBS` method is called from check/validation classes (e.g., `KKSV*OPBPCheck`), but in those cases, different CC classes implement `getInvokeCBS` — not `JKKIdoRsvHaneiCC`.
- The `KKSV0446OPOperation` BPM operation uses `CCRequestBroker` to invoke `executeIdoRsvHanei` (the main processing method), which internally calls `getInvokeCBS`.
- `JKKAdchgIdoRsvHaneiCC` (Service Change Transfer Reservation Processing CC) directly instantiates `JKKIdoRsvHaneiCC` and calls `executeIdoRsvHanei`.
- No other files in the codebase directly reference `JKKIdoRsvHaneiCC.getInvokeCBS`.

## 6. Per-Branch Detail Blocks

**Block 1** — [CALL] `(init(param, fixedText))` (L74)

> Delegates to the private `init()` method which handles mapper lazy-initialization and error map reset. This is the sole processing step in `getInvokeCBS`.

| # | Type | Code |
|---|------|------|
| 1 | CALL | `init(param, fixedText)` // Delegate to private init method [-> L74] |

---

**Block 1.1** — [CALL] `(init internals — mapper initialization)` (L37–40 within `init`)

> The `init` method checks whether the mapper instance has been created. If not, it creates a new `JKKIdoRsvHaneiMapperCC()` and assigns it to `this.mapper`.

| # | Type | Code |
|---|------|------|
| 1 | IF | `null == this.mapper` [L37] |
| 1.1 | SET | `this.mapper = new JKKIdoRsvHaneiMapperCC()` [-> L39 — lazy initialization of the mapper component] |

---

**Block 1.2** — [CALL] `(init internals — error info reset)` (L44 within `init`)

> Resets the error information tracking in the control map by replacing it with a fresh empty `ArrayList`. This ensures any previous error state from prior processing is cleared before new CBS operations begin.

| # | Type | Code |
|---|------|------|
| 1 | EXEC | `param.setControlMapData(SCControlMapKeys.ERROR_INFO, new ArrayList<Object>())` [-> L44 — clear error tracking state] |

---

**Block 2** — [RETURN] `(return null)` (L80)

> Returns `null` to the caller. The actual CBS (Call Back Service) invocation and result generation is performed by the `executeIdoRsvHanei()` method on the same class, which is called through a different code path.

| # | Type | Code |
|---|------|------|
| 1 | RETURN | `return null` [-> L80 — stub/placeholder return; actual processing via executeIdoRsvHanei] |

## 7. Glossary

| Term | Type | Business Meaning |
|------|------|------------------|
| `ido_rsv_no` | Field | Transfer reservation number — unique identifier for a service contract transfer/reservation entry |
| `ido_div` | Field | Transfer division — classifies the type of service transfer (e.g., plan change, provider change) |
| `ido_rsv_dtl_cd` | Field | Transfer reservation detail code — detailed classification code for the transfer reservation line item |
| `rsv_aply_ymd` | Field | Reservation application year/month/day — the date when the transfer reservation was applied |
| `mskm_dtl_no` | Field | Monthly subscription detail number — internal tracking ID for monthly subscription service contract line items |
| `svc_kei_no` | Field | Service contract number — the primary key identifying a customer's service contract |
| `svc_kei_ucwk_no` | Field | Service detail work number — internal tracking ID for service contract line items |
| `seiky_kei_no` | Field | Billing contract number — the contract number used for invoicing/billing purposes |
| `op_svc_kei_no` | Field | Optional service contract number — identifies optional/add-on service contracts attached to a base contract |
| `TRN_DATE` | Field | Transaction date — the date on which processing is performed (typically obtained via `JCCBPCommon.getOpeDate()`) |
| `TEMPLATE_ID` | Field | Template ID — identifier for message template used in return messages |
| `STATUS_ID` | Field | Status ID — identifier for processing status tracking |
| `RETURN_MESSAGE_STRING` | Field | Return message string — text content of processing result messages |
| `RETURN_MESSAGE_FORMAT` | Field | Return message format — format pattern for constructing return messages |
| `SYSID` | Field | System ID — identifier for the system instance performing the operation |
| JKKIdoRsvHaneiCC | Class | Transfer Reservation Reflection CC (異動予約反映CC) — Custom Component class handling transfer reservation reflection processing for service contracts |
| JKKIdoRsvHaneiMapperCC | Class | Transfer Reservation Reflection Mapper CC — Mapper component for transforming parameter data to/from CBS message structures |
| `SCControlMapKeys.ERROR_INFO` | Constant | Error information control map key — standard key in the control map for storing error detail `ArrayList` entries |
| CCRequestBroker | Class | CC Request Broker — BPM framework component that invokes custom components with configured parameters, exception judgment, and database connection settings |
| BPM | Acronym | Business Process Management — the workflow engine that orchestrates multi-step business processes across screens and components |
| CBS | Acronym | Call Back Service — the service component layer that performs actual database operations and business logic |
| eo | Business term | K-Opticom "eo" brand — the customer base system name (eo Customer Base System / eo顧客基幹システム) |
| K-Opticom | Business term | Japanese fiber-optic ISP and telecommunications provider; the business owner of this system |
| AbstractCommonComponent | Class | Base class for all custom components in the Fujitsu Futurity BPM framework — provides common initialization and lifecycle methods |
| SessionHandle | Class | Session management handle carrying database connection, transaction, and session context for BPM operations |
| IRequestParameterReadWrite | Interface | Parameter object interface providing read/write access to model data maps and control maps used across the BPM workflow |
| CAANMsg | Class | Fujitsu Futurity message container class used for CBS (Call Back Service) request/response message passing |
