# Business Logic — JKKBumpMdsCC.callEKK1081B001SC() [54 LOC]

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

## 1. Role

### JKKBumpMdsCC.callEKK1081B001SC()

This method is a **service interface wrapper** that invokes the order issuance condition inquiry service component (`EKK1081B001CBS` / `EKK1081B001SC`). In business terms, it queries the system to retrieve the list of **order issuance conditions** for a given service contract detail, returning only conditions that have **not yet been issued** ("未発行分のみ取得"). It is a shared common component (CC) method called by multiple screens and business logic modules — notably by `executeBumpMds` in `JKKBumpMdsCC` itself during bump/maintenance service data processing, and by `JKKHakkoSODCC` during SOD (Service Order Data) creation flows for FTTH, telephone, and mobile (WiMAX) services.

The method follows a **standard SIF (Service Interface) invocation pattern** used across the platform: it builds an input message by composing common parameters (`editInMsgCmn`), applying service-specific mapping (`mappingEKK1081B001InMsg`), attaching basic configuration (`editBasicCmn`), invoking the CBS via `ServiceComponentRequestInvoker.run()`, then performing result editing (`editResultRP`), error checking (`errChk`), and extracting the output mapping (`mappingEKK1081B001SCOutMsg`). The return code from the service component determines whether data was successfully retrieved or an error occurred.

## 2. Processing Pattern (Detailed Business Logic)

```mermaid
flowchart TD
    START(["callEKK1081B001SC"])
    
    START --> S1["SET sIFRequest = editInMsgCmn(param)"]
    S1 --> S2["SET template = new CAANMsg(EKK1081B001CBSMsg.class.getName())"]
    S2 --> S3["CALL mappingEKK1081B001InMsg(template, inHash, svcKeiUcwkNo, svckeino)"]
    S3 --> S4["CALL editBasicCmn(param, template)"]
    S4 --> S5["SET sIFRequest.put(TEMPLATE_LIST_KEY, new CAANMsg[]{template})"]
    S5 --> S6["SET scCall = new ServiceComponentRequestInvoker()"]
    S6 --> S7["CALL scCall.run(sIFRequest, handle)"]
    S7 --> S8["CALL editResultRP(sIFResult, param)"]
    S8 --> S9["CALL errChk(sIFResult)"]
    S9 --> S10["SET resultMsgs = sIFResult.get(TEMPLATE_LIST_KEY)"]
    S10 --> S11["SET status = template.getInt(STATUS_INT_KEY)"]
    S11 --> COND{"status == 0"}
    COND -->|true| S12["SET resultHash.put(EKK1081B001, mappingEKK1081B001SCOutMsg(resultMsgs))"]
    COND -->|false| END1["RETURN status"]
    S12 --> END1
    END1(["Return status"])
```

**Processing flow description:**

1. **Input message preparation** — `editInMsgCmn(param)` constructs a shared SIF (Service Interface) request map from the inbound request parameter, setting common SIF metadata.
2. **Template instantiation** — Creates a `CAANMsg` template bound to the `EKK1081B001CBSMsg` class, which defines the schema for the CBS request/response.
3. **Service-specific mapping** — `mappingEKK1081B001InMsg` populates the template with business-specific input data: the service contract detail work number (`svcKeiUcwkNo`) and service detail number (`svckeino`) from the caller's `inHash`.
4. **Basic configuration** — `editBasicCmn` attaches additional standard SIF fields (e.g., operation date, user context) to the template.
5. **Request assembly** — The template is placed into the SIF request map under the `TEMPLATE_LIST_KEY` (`"templateListKey"`), which is the standard key for passing CBS message templates.
6. **Invoker instantiation** — Creates a new `ServiceComponentRequestInvoker` instance to dispatch the service call.
7. **CBS invocation** — `scCall.run()` executes the `EKK1081B001CBS` service component with the assembled request, using the provided session handle. The result is returned as a `Map`.
8. **Result post-processing** — `editResultRP` transforms the raw CBS result into a format consumable by the caller.
9. **Error checking** — `errChk` validates the result and throws an exception if the CBS reported an error condition.
10. **Result extraction** — The `CAANMsg[]` array is extracted from the SIF result using `TEMPLATE_LIST_KEY`, and the status code is read from the template via `STATUS_INT_KEY` (standard success code: `0`).
11. **Conditional output** — If the status is `0` (success), the result is mapped via `mappingEKK1081B001SCOutMsg` and stored in `resultHash` under the key `"EKK1081B001"`. The status is always returned to the caller.

## 3. Parameter Analysis

| No | Parameter Name | Type | Business Description |
|----|---------------|------|---------------------|
| 1 | `param` | `IRequestParameterReadWrite` | Request parameter interface carrying inbound data from the calling screen or CBS. Used to extract common SIF metadata and store post-processed results via `editInMsgCmn` and `editResultRP`. |
| 2 | `handle` | `SessionHandle` | Database session handle providing transaction and connection context for the CBS invocation via `ServiceComponentRequestInvoker.run()`. |
| 3 | `inHash` | `HashMap<String, Object>` | Input data map containing business parameters such as service contract numbers and order codes. Consumed by `mappingEKK1081B001InMsg` to populate the CBS request. |
| 4 | `resultHash` | `HashMap<String, Object>` | Output container where the method stores the mapped result list (`"EKK1081B001"` key, value is `CAANMsg[]`). The caller reads from this map after the method returns. |
| 5 | `svcKeiUcwkNo` | `String` | Service contract detail number — the unique identifier for a specific service contract line item. Used to filter the order issuance condition query to the relevant service. |
| 6 | `svckeino` | `String` | Service detail number — a finer-grained identifier within a service contract, further narrowing which service conditions to query. |

**Instance fields read:** None directly accessed in this method.

## 4. CRUD Operations / Called Services

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

| CRUD | SC / CBS | SC Code | Entity / DB | Operation Description |
|------|----------|---------|-------------|----------------------|
| - | `ACSV0001Flow.run` | ACSV0001Flow | - | Calls `run` in `ACSV0001Flow` |
| - | `CNSV0036OPOperation.run` | CNSV0036OPOperation | - | Calls `run` in `CNSV0036OPOperation` |
| - | `CNSV0037Flow.run` | CNSV0037Flow | - | Calls `run` in `CNSV0037Flow` |
| - | `CNSV0037OPOperation.run` | CNSV0037OPOperation | - | Calls `run` in `CNSV0037OPOperation` |
| - | `CNSV0038Flow.run` | CNSV0038Flow | - | Calls `run` in `CNSV0038Flow` |
| U | `JKKBumpMdsCC.editBasicCmn` | JKKBumpMdsCC | - | Calls `editBasicCmn` in `JKKBumpMdsCC` |
| U | `JKKBumpMdsCC.editInMsgCmn` | JKKBumpMdsCC | - | Calls `editInMsgCmn` in `JKKBumpMdsCC` |
| U | `JKKBumpMdsCC.editResultRP` | JKKBumpMdsCC | - | Calls `editResultRP` in `JKKBumpMdsCC` |
| - | `JKKBumpMdsCC.errChk` | JKKBumpMdsCC | - | Calls `errChk` in `JKKBumpMdsCC` |
| - | `JKKBumpMdsCC.mappingEKK1081B001InMsg` | JKKBumpMdsCC | - | Calls `mappingEKK1081B001InMsg` in `JKKBumpMdsCC` |
| - | `JKKBumpMdsCC.mappingEKK1081B001SCOutMsg` | JKKBumpMdsCC | - | Calls `mappingEKK1081B001SCOutMsg` in `JKKBumpMdsCC` |
| R | `SCW00701SFLogic.getName` | SCW00701SFLogic | - | Calls `getName` in `SCW00701SFLogic` |

### Direct method analysis:

| CRUD | SC / CBS | SC Code | Entity / DB | Operation Description |
|------|----------|---------|-------------|----------------------|
| R | `EKK1081B001CBS` | EKK1081B001CBS | Order issuance condition tables | Queries the order issuance condition list filtered by service contract detail number (`svcKeiUcwkNo`) and service detail number (`svckeino`), returning only unissued conditions |
| U | `editInMsgCmn` | - | - | Populates the SIF request map with common input metadata from `param` |
| U | `editBasicCmn` | - | - | Attaches basic SIF configuration fields (e.g., operation date, template ID) to the CBS template |
| U | `editResultRP` | - | - | Post-processes the CBS result map, extracting and transforming data for the caller |
| - | `errChk` | - | - | Validates the CBS result and throws an exception on error conditions |
| - | `mappingEKK1081B001InMsg` | - | - | Maps input business parameters (`inHash`, `svcKeiUcwkNo`, `svckeino`) onto the CBS template fields |
| - | `mappingEKK1081B001SCOutMsg` | - | - | Maps the `CAANMsg[]` result from the CBS into a `HashMap`-based output format for the caller |

## 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: `mappingEKK1081B001SCOutMsg` [-], `errChk` [-], `editResultRP` [U], `run` [-], `run` [-], `run` [-], `run` [-], `run` [-], `editBasicCmn` [U], `mappingEKK1081B001InMsg` [-], `getName` [R], `editInMsgCmn` [U]

| # | Caller (Screen/Batch) | Call Chain (Full Path to this Method) | Terminal (SC / CRUD / Entity) |
|---|----------------------|--------------------------------------|-------------------------------|
| 1 | Method: `JKKBumpMdsCC.executeBumpMds` | `executeBumpMds` (L371) -> `callEKK1081B001SC` | `EKK1081B001CBS [R] Order Issuance Conditions` |
| 2 | Method: `JKKHakkoSODCC` (telephone flow) | `JKKHakkoSODCC` (L6131, L8458) -> `callEKK1081B001SC` | `EKK1081B001CBS [R] Order Issuance Conditions` |
| 3 | Method: `JKKHakkoSODCC` (mobile/WiMAX flow) | `JKKHakkoSODCC` (L9689, L19407) -> `callEKK1081B001SC` | `EKK1081B001CBS [R] Order Issuance Conditions` |
| 4 | Method: `JKKHakkoSODCC` (L36552) | `JKKHakkoSODCC` (L36552) -> `callEKK1081B001SC` | `EKK1081B001CBS [R] Order Issuance Conditions` |

**Note on callers:** The method is called with different `ORDER_SBT_CD` values depending on the caller:
- `ORDER_SBT_CD_TEL = "2"` (Telephone) in the FTTH/telephone SOD creation flow
- `ORDER_SBT_CD_MOBILE = "3"` (Mobile) in the WiMAX mobile SOD flow
- Passed as a parameter variable in `JKKBumpMdsCC.executeBumpMds` (value set by caller in `requestParam`)

## 6. Per-Branch Detail Blocks

**Block 1** — [SET] Initialize variables (L1087)

> Declaration of all local variables with initial `null` or `0` values.

| # | Type | Code |
|---|------|------|
| 1 | SET | `sIFRequest = null` // SIF request map |
| 2 | SET | `resultMsgs = null` // Array of result CAANMsg |
| 3 | SET | `template = null` // CBS message template |
| 4 | SET | `scCall = null` // Service component request invoker |
| 5 | SET | `sIFResult = null` // SIF result map |
| 6 | SET | `status = 0` // Service component return status code |

**Block 2** — [CALL] Prepare input message (L1093)

> Calls `editInMsgCmn` to build the common SIF request structure from the inbound parameter. This sets up shared SIF metadata fields used by all service interface calls.

| # | Type | Code |
|---|------|------|
| 1 | SET | `sIFRequest = editInMsgCmn(param)` // Build common SIF request [-> SET sIFRequest] |

**Block 3** — [SET + CALL] Build and populate CBS template (L1096–1098)

> Creates the `EKK1081B001CBSMsg` template, maps business input parameters, and attaches basic SIF configuration.

| # | Type | Code |
|---|------|------|
| 1 | SET | `template = new CAANMsg(EKK1081B001CBSMsg.class.getName())` // Instantiate CBS message template [-> NEW CAANMsg(EKK1081B001CBSMsg)] |
| 2 | CALL | `mappingEKK1081B001InMsg(template, inHash, svcKeiUcwkNo, svckeino)` // Map service-specific input to template fields |
| 3 | CALL | `editBasicCmn(param, template)` // Attach basic SIF fields (op date, template ID) to template |

**Block 4** — [SET] Assemble SIF request (L1101)

> Places the prepared template into the SIF request map under the standard template list key, and instantiates the service component request invoker.

| # | Type | Code |
|---|------|------|
| 1 | SET | `sIFRequest.put(JCMConstants.TEMPLATE_LIST_KEY, new CAANMsg[]{template})` // Add template to request list [-> TEMPLATE_LIST_KEY="templateListKey"] |
| 2 | SET | `scCall = new ServiceComponentRequestInvoker()` // Create CBS invocation component [-> NEW ServiceComponentRequestInvoker] |

**Block 5** — [CALL] Invoke CBS (L1104)

> Executes the `EKK1081B001CBS` service component. This is the core read operation that queries the order issuance condition list from the database.

| # | Type | Code |
|---|------|------|
| 1 | SET | `sIFResult = scCall.run(sIFRequest, handle)` // Invoke EKK1081B001CBS [-> R EKK1081B001CBS] |

**Block 6** — [CALL] Post-process and validate result (L1107–1108)

> Transforms the CBS result and performs error checking.

| # | Type | Code |
|---|------|------|
| 1 | CALL | `editResultRP(sIFResult, param)` // Post-process CBS result [-> U editResultRP] |
| 2 | CALL | `errChk(sIFResult)` // Check for CBS errors, throws if error |

**Block 7** — [SET] Extract result data (L1111–1114)

> Retrieves the result message array and status code from the SIF result.

| # | Type | Code |
|---|------|------|
| 1 | SET | `resultMsgs = (CAANMsg[])sIFResult.get(JCMConstants.TEMPLATE_LIST_KEY)` // Extract result messages [-> TEMPLATE_LIST_KEY="templateListKey"] |
| 2 | SET | `status = template.getInt(JCMConstants.STATUS_INT_KEY)` // Get status code [-> STATUS_INT_KEY="statusIntKey", status=0 means success] |

**Block 8** — [IF] Conditional success branch (L1117–1125)

> The status code from the CBS indicates success (0) or failure (non-zero). Only on success is the result mapped and stored in the output `resultHash`.

| # | Type | Code |
|---|------|------|
| 1 | IF | `status == 0` [SUCCESS branch] |

**Block 8.1** — [SET] Map and store output (L1119)

> On success, maps the raw `CAANMsg[]` result into a `HashMap`-based format and stores it in `resultHash` under key `"EKK1081B001"`.

| # | Type | Code |
|---|------|------|
| 1 | SET | `resultHash.put(TEMPLATE_ID_EKK1081B001, mappingEKK1081B001SCOutMsg(resultMsgs))` // Map and store result [-> TEMPLATE_ID_EKK1081B001="EKK1081B001", -> MAP mappingEKK1081B001SCOutMsg] |

**Block 9** — [RETURN] Return status code (L1128)

> Returns the CBS status code to the caller. Status `0` indicates success. Non-zero indicates an error (exception may have already been thrown by `errChk`).

| # | Type | Code |
|---|------|------|
| 1 | RETURN | `return status` // 0=success, non-zero=error |

## 7. Glossary

| Term | Type | Business Meaning |
|------|------|------------------|
| `svcKeiUcwkNo` | Field | Service contract detail number — unique identifier for a service contract line item, used to filter queries to a specific service |
| `svckeino` | Field | Service detail number — fine-grained identifier within a service contract, used alongside `svcKeiUcwkNo` to narrow the scope |
| `inHash` | Field | Input data map — carries business parameters from the caller to this method |
| `resultHash` | Field | Output data map — receives mapped result data from this method for the caller to consume |
| `sIFRequest` | Field | SIF (Service Interface) request map — structured request payload sent to the CBS layer |
| `sIFResult` | Field | SIF (Service Interface) result map — response data returned from the CBS layer |
| `status` | Field | Service component return status code — `0` indicates success, non-zero indicates an error condition |
| `TEMPLATE_ID_EKK1081B001` | Constant | Template ID `"EKK1081B001"` — key used to store and retrieve results in `resultHash` |
| `JCMConstants.TEMPLATE_LIST_KEY` | Constant | Key `"templateListKey"` — standard key for the list of CBS message templates in an SIF request |
| `JCMConstants.STATUS_INT_KEY` | Constant | Key `"statusIntKey"` — standard key for the integer status code in a CAANMsg |
| EKK1081B001CBS | CBS | Order Issuance Condition Inquiry CBS — service component that queries the order issuance condition list from the database |
| EKK1081B001 | SC Code | Order Issuance Condition Inquiry — screen/component code for querying which order conditions are ready to be issued |
| SIF | Acronym | Service Interface — the middleware layer between the business logic (CC) and the data access layer (CBS) |
| CBS | Acronym | Component Business System — the data access/service component layer that executes database operations |
| SOD | Acronym | Service Order Data — telecom order fulfillment entity representing a service order to be issued |
| CAANMsg | Class | Common message wrapper — a framework class used to encapsulate CBS request/response data as a typed key-value message |
| ServiceComponentRequestInvoker | Class | Framework class that dispatches SIF requests to CBS components and returns results |
| ORDER_SBT_CD_NET | Constant | Order sub-type code `"1"` (Network) — passed from callers when querying network-order conditions |
| ORDER_SBT_CD_TEL | Constant | Order sub-type code `"2"` (Telephone) — passed from callers when querying telephone-order conditions |
| ORDER_SBT_CD_MOBILE | Constant | Order sub-type code `"3"` (Mobile) — passed from callers when querying mobile/WiMAX-order conditions |
| FTTH | Business term | Fiber To The Home — fiber-optic broadband internet service type in Japanese telecom operations |
| WiMAX | Business term | Wireless High-speed access service — mobile wireless broadband service type |
| 未発行分のみ取得 | Japanese comment | "Retrieve only unissued items" — the business filter applied by the EKK1081B001CBS query |
| オーダ発行条件一覧照会 | Japanese comment | "Order issuance condition list inquiry" — business name of the EKK1081B001 service |
| 注文種別コード (yokyu_sbt_cd) | Field | Request type code — codes like `"03"` (cancellation) and `"08"` (deletion) used by callers to identify order status |
