# Business Logic — JFUSV015223ReqChk.checkExecution() [16 LOC]

| Field | Value |
|-------|-------|
| Fully Qualified Name | `com.fujitsu.futurity.bp.custom.reqchk.JFUSV015223ReqChk` |
| Layer | Service Component / Requirement Check (BPM execution condition evaluation) |
| Module | `reqchk` (Package: `com.fujitsu.futurity.bp.custom.reqchk`) |

## 1. Role

### JFUSV015223ReqChk.checkExecution()

This method serves as an execution condition guard for the **FUSV015223CC** service component within the **eo Customer Core System** (eo顧客基幹システム), a telecom order fulfillment platform operated by K-Opticom. Its sole business purpose is to determine whether the downstream service operation should proceed by verifying the existence of the **Discount Service Automatic Application Mobile Registration Map** (割引サービス自動適用モバイル登録マップ) — a data structure (`JKKWrisvcAutoAplyCCMobileMap`) that must be populated in the request's user data payload before the associated service IF can safely execute. If the map is absent (null), the method returns `false` to suppress execution, preventing the system from attempting operations on undefined service contract line items. The method implements a **null-guard pattern** and acts as a lightweight BPM execution condition check within the **Futurity X21** workflow engine framework. It is registered as a custom requirement check class (`AbstractCustomReqChk`) and evaluated by the BPM operator's `isExecuteCheck()` method before the FUSV015223CC business logic is invoked. This is a shared utility used by **two BPM operations**: **FUSV0152** (lines 780/1247) and **FUSV0161** (lines 1628/2699), both of which reference it as an execution gate with the condition `JFUSV015223ReqChk("")=TRUE`. The method performs no CRUD operations, no external service calls, and no data transformation — its entire responsibility is a single null-safety check on a specific request payload key.

## 2. Processing Pattern (Detailed Business Logic)

```mermaid
flowchart TD
    START(["checkExecution(irp, conditionvalue)"])

    START --> CAST["Cast irp to RequestParameter"]
    CAST --> GETMAP["Get user data Map from rp"]
    GETMAP --> GETINMAP["Get JKKWrisvcAutoAplyCCMobileMap from map"]

    GETINMAP --> COND{"inMap == null"}

    COND -->|Yes| RETURN_FALSE(["Return false<br/>Skip processing"])
    COND -->|No| RETURN_TRUE(["Return true<br/>Allow processing"])

    RETURN_FALSE --> END(["End"])
    RETURN_TRUE --> END
```

The processing pattern is a **single-condition null guard** with two branches:

1. **Cast and extract**: The incoming `IRequestParameterReadOnly` interface is cast to the concrete `RequestParameter` class to access its user data payload. The `getUserData()` method returns a `Map<?, ?>` that carries business data across BPM operation stages.
2. **Key lookup**: The method retrieves the value associated with the constant key string `"JKKWrisvcAutoAplyCCMobileMap"` from the user data map. This key references a `HashMap` containing mobile registration data for the discount service automatic application workflow.
3. **Null check branch**: If the retrieved `inMap` is `null`, the discount service automatic application mobile registration data does not exist in the current request context. The method returns `false`, which signals to the BPM engine (`execondition.isExecuteCheck()`) that the associated service component (FUSV015223CC) should **not** be executed. This is the safety path — it prevents null-pointer exceptions and unnecessary processing when the prerequisite data has not been populated.
4. **Presence branch**: If `inMap` is not `null`, the required data exists. The method returns `true`, allowing the BPM engine to proceed with executing FUSV015223CC.

## 3. Parameter Analysis

| No | Parameter Name | Type | Business Description |
|----|---------------|------|---------------------|
| 1 | `irp` | `IRequestParameterReadOnly` | The BPM workflow request parameter that carries the user data map across operation stages. In business terms, this is the **workflow context envelope** that contains all data gathered during prior BPM phases (screen input, data retrieval, validation). It is cast to `RequestParameter` to access `getUserData()`, which returns a `Map` of key-value pairs. The critical key is `JKKWrisvcAutoAplyCCMobileMap`, which holds mobile registration records for the discount service automatic application process. |
| 2 | `conditionvalue` | `IConditionValue` | Additional condition value passed by the BPM engine's execution condition framework. In this method's implementation, it is **not used** — the method ignores this parameter entirely. It exists to satisfy the contract defined by the `AbstractCustomReqChk` parent class and the `checkExecution()` interface signature used by the BPM operator's `isExecuteCheck()` method. |

**External state / instance fields read**: None. This method is entirely stateless — it reads no instance fields and has no dependency on object-level state. It operates solely on the data provided via the `irp` parameter.

## 4. CRUD Operations / Called Services

This method performs **no CRUD operations** and calls **no external services**. It operates exclusively on local objects derived from the `irp` parameter.

| CRUD | SC / CBS | SC Code | Entity / DB | Operation Description |
|------|----------|---------|-------------|----------------------|
| *(none)* | — | — | — | This method is a pure guard check with no data access or service invocations. |

**Note on called methods**: The only method calls are on the `irp` parameter itself (`rp.getUserData()`) and on a local `Map` (`map.get(...)`). These are local data access operations, not service component calls or database operations.

## 5. Dependency Trace

| # | Caller (Screen/Batch) | Call Chain (Full Path to this Method) | Terminal (SC / CRUD / Entity) |
|---|----------------------|--------------------------------------|-------------------------------|
| 1 | Operation: FUSV0152 | `FUSV0152Operation.getBPMOperator().isExecuteCheck(param, execondition6)` → `JFUSV015223ReqChk.checkExecution(irp, conditionvalue)` | No terminal CRUD — pure execution gate |
| 2 | Operation: FUSV0161 | `FUSV0161Operation.getBPMOperator().isExecuteCheck(param, execondition17)` → `JFUSV015223ReqChk.checkExecution(irp, conditionvalue)` | No terminal CRUD — pure execution gate |

**Caller details**:

- **FUSV0152Operation** (line 780, 1247): Registers `JFUSV015223ReqChk` as `execondition6` with comparison type `CONST_EQUAL` and conjunction `CONST_CONJUNCTION_NON` (AND). When the BPM operator evaluates `ecrc.isExecuteCheck(param, execondition6)` at line 1247, it invokes `checkExecution()`. If `true`, the FUSV015223CC target is executed (line 1268 area) after logging the execution start/end. The target is executed via `getBPMOperator().run(target29, param, dbConInfo)` on database connection context "29".

- **FUSV0161Operation** (line 1628, 2699): Registers `JFUSV015223ReqChk` as `execondition17` with the same configuration pattern. It is used as an execution gate in the FUSV0161 business process.

## 6. Per-Branch Detail Blocks

**Block 1** — [CAST] `(irp → RequestParameter)` (L51)

> Cast the read-only interface to the concrete RequestParameter class to access user data.

| # | Type | Code |
|---|------|------|
| 1 | CAST | `RequestParameter rp = (RequestParameter) irp;` |

**Block 2** — [METHOD CALL] `rp.getUserData()` (L52)

> Retrieve the user data map from the request parameter. This map carries business data across BPM operation stages.

| # | Type | Code |
|---|------|------|
| 1 | SET | `Map<?, ?> map = rp.getUserData();` // Gets the user data payload from the request |

**Block 3** — [METHOD CALL] `map.get("JKKWrisvcAutoAplyCCMobileMap")` (L53)

> Retrieve the mobile registration map for the discount service automatic application. The key `"JKKWrisvcAutoAplyCCMobileMap"` is a hardcoded string literal referencing the map that holds mobile registration records.

| # | Type | Code |
|---|------|------|
| 1 | SET | `HashMap inMap = (HashMap) map.get("JKKWrisvcAutoAplyCCMobileMap");` // JKKWrisvcAutoAplyCCMobileMap — discount service auto-application mobile registration map |

**Block 4** — [IF] `(inMap == null)` `[L55-L60]`

> 割引サービス自動適用モバイル登録マップが存在しない場合、処理を実行しない。 // If the discount service automatic application mobile registration map does not exist, skip processing.

| # | Type | Code |
|---|------|------|
| 1 | EXEC | `// 割引サービス自動適用モバイル登録マップが存在しない場合、処理を実行しない。` // If discount service auto-application mobile registration map is absent, do not execute processing [L55] |

**Block 4.1** — [IF TRUE] `inMap == null` (L56–L58)

> Returns `false` to suppress execution of FUSV015223CC. The BPM engine will skip the associated service component.

| # | Type | Code |
|---|------|------|
| 1 | RETURN | `return false;` // Do not execute — prerequisite data missing |

**Block 4.2** — [ELSE] `inMap != null` (L59–L61)

> Returns `true` to allow execution of FUSV015223CC. The required mobile registration data exists in the request payload.

| # | Type | Code |
|---|------|------|
| 1 | RETURN | `return true;` // Allow execution — prerequisite data present |

## 7. Glossary

| Term | Type | Business Meaning |
|------|------|------------------|
| `irp` | Parameter | IRequestParameterReadOnly — the BPM workflow request parameter interface, serving as the workflow context envelope carrying user data across BPM operation stages |
| `conditionvalue` | Parameter | IConditionValue — additional condition value for BPM execution condition framework (unused in this method) |
| `RequestParameter` | Class | Concrete implementation of IRequestParameterReadOnly that provides access to user data via `getUserData()` |
| `JKKWrisvcAutoAplyCCMobileMap` | Constant (String key) | Discount Service Automatic Application Mobile Registration Map — a HashMap key in the user data payload holding mobile registration records required for the discount service workflow |
| `checkExecution` | Method | Execution condition determination — evaluates whether a service IF should be executed based on prerequisite data existence |
| `AbstractCustomReqChk` | Class | Base class for custom requirement check classes in the Futurity X21 BPM framework |
| `ReqChkException` | Exception | Requirement check exception thrown by the BPM framework when a custom requirement check fails |
| FUSV015223CC | Business term | A service component in the eo Customer Core System whose execution is gated by this requirement check class |
| FUSV0152 | BPM Operation | Business process operation that uses this check as execution condition `execondition6` |
| FUSV0161 | BPM Operation | Business process operation that uses this check as execution condition `execondition17` |
| eo 顧客基幹システム | Business term | eo Customer Core System — K-Opticom's telecom order fulfillment platform |
| K-Opticom | Business term | Japanese telecommunications operator (parent company of the eo brand) |
| BPM | Acronym | Business Process Management — the workflow engine framework (Fujitsu Futurity X21) that orchestrates business operations |
| 割引サービス自動適用 | Business term | Discount Service Automatic Application — the business domain for automatically applying discount services to eligible mobile registrations |
| モバイル登録 | Business term | Mobile Registration — registration data for mobile service line items |
| 実行条件判定 | Business term | Execution condition determination — the process of evaluating whether a service component should be executed |
| Service IF | Business term | Service Interface — the boundary between BPM operations and service components; this check guards the service IF entry point |
