# Business Logic — JKKDslRunCC.runDsl() [14 LOC]

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

## 1. Role

### JKKDslRunCC.runDsl()

This method implements **cancellation execution processing** ("解約実行処理"). It serves as a shared, reusable dispatcher that executes telecom service cancellation (解約) workflows for various business scenarios. The Javadoc states: "Executes cancellation processing according to the parameter's change classification" ("パラメータの異動区分に従って解約処理を実行します。"). This method is **not a screen entry point** — it is a common component designed to be invoked by multiple caller CCs across the system, acting as a centralized cancellation orchestrator. It follows a **delegation pattern**: it initializes the request context, extracts the business data HashMap under the given `fixedText` key, and then delegates the actual cancellation logic to `JKKBpCommon.runDsl()`, which in turn instantiates `JKKDslRun` to perform the core cancellation workflow. The cancellation operation applies to multiple business domains including phone number cancellation during service contract modifications, construction-related service cancellations, and forced cancellations.

## 2. Processing Pattern (Detailed Business Logic)

```mermaid
flowchart TD
    START(["runDsl params"])
    INIT["init param, fixedText"]
    GET_DATA["inMap = param.getData fixedText"]
    DELEGATE["JKKBpCommon.runDsl handle, param, inMap, fixedText"]
    RETURN["return param"]

    START --> INIT --> GET_DATA --> DELEGATE --> RETURN
```

**Processing description:**

1. **Initialization** — `init(param, fixedText)` initializes the request parameter context. This is a standard setup step shared across DSL-based business processing, which prepares internal state and mappings needed for the cancellation workflow.

2. **Request parameter extraction** — `param.getData(fixedText)` retrieves a `HashMap` containing the business data associated with the `fixedText` key. This map carries all cancellation-related data (service contract numbers, work item numbers, order content codes, etc.) that was previously populated by the calling screen or business component.

3. **Delegation to cancellation engine** — `JKKBpCommon.runDsl()` is a static utility method that delegates further to `JKKDslRun.runDsl(handle, param, inMap, fixedText)`. The `JKKDslRun` class contains the actual cancellation processing logic, including service code calls, entity updates, and DSL-based business rule execution. This method is a pure pass-through wrapper — it has no conditional branches of its own.

4. **Return** — The initialized and processed `param` is returned to the caller, allowing the caller to read back any modified data.

## 3. Parameter Analysis

| No | Parameter Name | Type | Business Description |
|----|---------------|------|---------------------|
| 1 | `handle` | `SessionHandle` | Session handle carrying the session manager context. Used to maintain transactional and session state across service component calls during the cancellation workflow. |
| 2 | `param` | `IRequestParameterReadWrite` | Request parameter object containing the model group and control map. It serves as the primary data carrier for the cancellation business data, holding a HashMap under the `fixedText` key that contains all service-specific fields (service contract numbers, work item numbers, order content codes, phone numbers, etc.). |
| 3 | `fixedText` | `String` | User-defined arbitrary string used as a key to access and store business data within the `param` object. Different callers use different values (e.g., `KEY_TELNO_INFO_DSL`, `"DslRunCC"`, `"tekyo_kbn"`) to isolate their cancellation data within the shared parameter object. |

**External state / instance fields:** None. This method is stateless — it does not read any instance fields.

## 4. CRUD Operations / Called Services

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

| CRUD | SC / CBS | SC Code | Entity / DB | Operation Description |
|------|----------|---------|-------------|----------------------|
| - | `JKKDslRunCC.init` | — | — | Initializes the request parameter context with `param` and `fixedText` (utility setup, no CRUD) |
| R | `IRequestParameterReadWrite.getData` | — | — | Retrieves business HashMap from `param` using `fixedText` as key |
| - | `JKKBpCommon.runDsl` | — | — | Static delegation method; creates `JKKDslRun` and calls its `runDsl` (see terminal operations below) |
| R | `JKKDslRun.runDsl` | — | — | Core cancellation logic dispatcher (delegated from `JKKBpCommon.runDsl`) |

**Terminal operations from the delegated `JKKDslRun` chain (from pre-computed graph):**

| CRUD | SC / CBS | SC Code | Entity / DB | Operation Description |
|------|----------|---------|-------------|----------------------|
| R | `JBSbatDKNyukaFinAdd.getData` | — | — | Retrieves finalization addition business data |
| R | `JFUeoTelOpTransferCC.getData` | — | — | Retrieves East Telecom operator transfer data |
| R | `JFUTransferCC.getData` | — | — | Retrieves general transfer data |
| R | `JFUTransferListToListCC.getData` | — | — | Retrieves transfer list-to-list mapping data |
| R | `KKW12701SFLogic.getData` | — | — | Retrieves screen logic data (contract detail inquiry) |

## 5. Dependency Trace

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

No screen/batch entry points found within 8 hops. Direct callers found: 5 methods.
Terminal operations from this method: `runDsl` [-], `getData` [R], `getData` [R], `getData` [R], `getData` [R], `getData` [R], `init` [-]

| # | Caller (Screen/Batch) | Call Chain (Full Path to this Method) | Terminal (SC / CRUD / Entity) |
|---|----------------------|--------------------------------------|-------------------------------|
| 1 | CC:JKKAdchgTelInfoChgCC | `dslSvcKeiUcwk()` -> `JKKDslRunCC.runDsl(handle, param, KEY_TELNO_INFO_DSL)` | Phone number immediate cancellation during service contract modification |
| 2 | CC:JKKDslOrTekkyoDslRunCC | `runDslOrTekkyoDsl()` -> conditional path (orsjgs_dsl_sbt_cd="1") -> `init()` + `JKKBpCommon.runDsl()` | Cancellation processing for pre-cancelled contracts (immediate cancellation) |
| 3 | CC:JKKKojiCallDslRunCC | `runDsl()` -> `JKKDslRunCC.runDsl(handle, param, fixedText)` (conditional: idiv_div="00006" or "00032"/"00035" with kojiak_sbt_cd="002", func_code="1") | Cancellation in construction project address change screen |
| 4 | CC:JKKKojiKikiUpdCC | `updKojiKiki()` -> `JKKDslRunCC.runDsl(handle, param, "DslRunCC")` | Key equipment update with cancellation processing |
| 5 | CC:JKKDslRunCC (self) | `runDsl()` -> `runDsl()` recursive call | Recursive delegation for cancellation re-dispatch |

## 6. Per-Branch Detail Blocks

The method `runDsl` contains **no conditional branches** — it is a purely linear, sequential processing method. All control flow is strictly top-to-bottom.

**Block 1** — [LINEAR] `(top-level execution flow)` (L119)

> Initialization, data extraction, and delegation to the cancellation engine.

| # | Type | Code |
|---|------|------|
| 1 | CALL | `init(param, fixedText)` // Initialize request parameter context ("初期処理") |
| 2 | SET | `HashMap inMap = (HashMap)param.getData(fixedText)` // Extract request parameter HashMap from param using fixedText as key ("リクエストパラメータの取得処理") |
| 3 | CALL | `JKKBpCommon.runDsl(handle, param, inMap, fixedText)` // Delegate to cancellation processing engine ("解約実行処理を呼び出す") |
| 4 | RETURN | `return param` // Return the processed parameter object ("業務データ取得・書込用I/F") |

## 7. Glossary

| Term | Type | Business Meaning |
|------|------|------------------|
| 解約 (Kaiya) | Business term | Cancellation — the act of terminating a telecom service contract or service line item |
| 解約実行処理 | Business term | Cancellation execution processing — the business operation of actually terminating service registrations in the system |
| 異動区分 (Ido Kumbun) | Field | Change classification — a code that classifies the type of change (cancellation, transfer, modification) being processed |
| DSL | Technical term | DSL — Dynamic Script Language (or similar scripting mechanism); used as the framework for executing business processing workflows |
| SessionHandle | Technical term | Session handle — carries session management context (transaction, user session, connection) for distributed processing |
| IRequestParameterReadWrite | Technical term | Request parameter I/F — the interface for reading and writing business data between screens, controllers, and service components |
| fixedText | Field | User-defined arbitrary string — used as a key to isolate business data within the shared request parameter object |
| JKKBpCommon | Component | Fujitsu K-opt Business Processing Common — static utility class providing shared business processing methods |
| JKKDslRun | Component | Core DSL cancellation processing engine — performs the actual cancellation logic when delegated to by this wrapper |
| KEY_TELNO_INFO_DSL | Constant | Key constant for telephone number cancellation DSL data — used by `JKKAdchgTelInfoChgCC` to identify phone cancellation data |
| 工事案件住所変更 | Business term | Construction project address change — a business scenario where a construction project's address is modified, potentially requiring cancellation processing |
| キー設備 | Business term | Key equipment — critical network equipment associated with a service contract |
| 工事 | Business term | Koji — construction/installation work in telecom service provisioning |
