---
title: Business Logic — JKKIntrInfoChgCfmCC.callEKK0081C310SC()
description: Detailed design document for the callEKK0081C310SC method
---

# Business Logic — JKKIntrInfoChgCfmCC.callEKK0081C310SC() [49 LOC]

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

## 1. Role

### JKKIntrInfoChgCfmCC.callEKK0081C310SC()

This method acts as the **service interface adapter** for invoking the **Service Contract Information Change (Introduction Code)** service component (SC: `EKK0081C310SC`). Its business purpose is to handle updates to a customer's service contract record where an **introduction code** (referral/recommendation code) is being modified. In the K-Opticom telecom customer management system, introduction codes track how customers were referred — a critical data point for partner agreements and commission calculations.

The method implements the **delegation + SIF (Service Interface Framework) invocation** design pattern. It does not contain domain logic itself; instead, it assembles a request payload by combining common service IF metadata (`editInMsgCmn`), domain-specific input mappings (`mappingEKK0081C310InMsg`), and basic header setup (`editBasicCmn`). It then delegates the actual processing to the SIF layer through a `ServiceComponentRequestInvoker`, which routes the call to the CBS (Core Business Service) layer.

The method serves as a **shared utility component** — it is called by the screen controller `JKKIntrInfoChgCfmCC.chgIntrInfo()`, which handles the introduction code change screen (KKSV0004 or similar). It has no conditional branching by service type; the SC `EKK0081C310SC` is always the same single service. After the SC returns, the method maps error results into the response area, performs a **pre-exit error check** on the `svc_kei_no_err_o` flag (service contract number validation error), and returns the SC status code to the caller. If an error flag is set, it short-circuits and returns status 0 immediately without reading the SC's actual status, preventing downstream screens from proceeding with invalid data.

## 2. Processing Pattern (Detailed Business Logic)

```mermaid
flowchart TD
    START(["callEKK0081C310SC start"])

    START --> VAR_INIT["Declare local variables: sIFRequest, template, scCall, sIFResult, status"]

    VAR_INIT --> EDIT_IN_MSG["editInMsgCmn(param)"]
    EDIT_IN_MSG --> EDIT_IN_MSG_RESULT["sIFRequest = editInMsgCmn result"]

    EDIT_IN_MSG_RESULT --> NEW_MSG["template = new CAANMsg(EKK0081C310CBSMsg.class)"]

    NEW_MSG --> MAP_IN_MSG["mappingEKK0081C310InMsg(template, inMap, workMap)"]

    MAP_IN_MSG --> EDIT_BASIC["editBasicCmn(param, template, workMap)"]

    EDIT_BASIC --> PUT_TEMPLATE["sIFRequest.put(TEMPLATE_LIST_KEY, new CAANMsg[]{template})"]

    PUT_TEMPLATE --> NEW_INVOKER["scCall = new ServiceComponentRequestInvoker()"]

    NEW_INVOKER --> SC_RUN["sIFResult = scCall.run(sIFRequest, handle)"]

    SC_RUN --> EDIT_RESULT["editResultRP(sIFResult, param, inMap, workMap)"]

    EDIT_RESULT --> CHECK_ERR{"workMap.get(svc_kei_no_err_o) is not null/blank?"}

    CHECK_ERR -->|Yes - Error detected| RETURN_STATUS["return status (0, early exit)"]

    CHECK_ERR -->|No - No error| GET_STATUS["status = template.getInt(STATUS_INT_KEY)"]

    GET_STATUS --> LOG_END["printlnEjbLog(callEKK0081C310SC end)"]

    LOG_END --> RETURN_FINAL["return status"]

    RETURN_STATUS --> END(["Return status"])
    RETURN_FINAL --> END
```

## 3. Parameter Analysis

| No | Parameter Name | Type | Business Description |
|----|---------------|------|---------------------|
| 1 | `param` | `IRequestParameterReadWrite` | The screen request parameter object carrying user input from the introduction code change screen. Contains fields such as the service contract number (`svc_kei_no`), introduction code (`intr_cd`), and migration division (`ido_div`) that identify which contract record and which introduction code value to update. |
| 2 | `handle` | `SessionHandle` | The EJB session handle providing database transaction context and connection state. Passed directly to `scCall.run()` to ensure the SC invocation participates in the same database transaction as the calling method. |
| 3 | `workMap` | `HashMap<String, Object>` | The cross-method working data map used for sharing data between methods within the same transaction. Used here to pass input mapping data into the SC (`mappingEKK0081C310InMsg`) and to receive validation error results (`svc_kei_no_err_o`). Also used by `editBasicCmn` for basic header setup. |
| 4 | `inMap` | `HashMap<String, Object>` | The input data map containing the domain-specific fields to be sent to the SC. Used by `mappingEKK0081C310InMsg` to populate the CAANMsg template with values for the introduction code change operation (e.g., contract number, introduction code, migration division). |

**External state / instance fields read:** None. This method reads no instance fields of `JKKIntrInfoChgCfmCC`; all state is passed via parameters.

## 4. CRUD Operations / Called Services

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

| CRUD | SC / CBS | SC Code | Entity / DB | Operation Description |
|------|----------|---------|-------------|----------------------|
| - | `JKKIntrInfoChgCfmCC.editInMsgCmn` | EKK0081C310SC | - | Prepares common service IF header information (template ID, operator, operation date/time, function code) for the SC request payload |
| - | `JKKIntrInfoChgCfmCC.mappingEKK0081C310InMsg` | EKK0081C310SC | - | Maps domain-specific input fields from `inMap`/`workMap` into the `CAANMsg` template for the introduction code change SC. Populates fields like `svc_kei_no`, `intr_cd`, `ido_div` |
| U | `JKKIntrInfoChgCfmCC.editBasicCmn` | EKK0081C310SC | - | Sets basic/common fields on the SC request template — operator ID, operation date/time, function code, access control group code. Updates the template message with header metadata |
| R | `ServiceComponentRequestInvoker.run` | EKK0081C310SC | Core business logic layer | Invokes the EKK0081C310SC service component through the SIF framework. This is the actual SC call that performs the introduction code update in the CBS layer. The SC reads/writes service contract data (contract number, introduction code) from/to the underlying database |
| U | `JKKIntrInfoChgCfmCC.editResultRP` | EKK0081C310SC | - | Maps error and result data from the SC response (`sIFResult`) back into the response area (`param`, `inMap`, `workMap`). Populates error fields like `svc_kei_no_err_o`, `err_flg_o`, `svc_kei_no_err`, `ido_div_err`, `intr_cd_err` for the screen to display |
| R | `JKKStringUtil.isNullBlank` | EKK0081C310SC | - | Null/blank check on the `svc_kei_no_err_o` field from `workMap`. If the field is not null and not blank, an error condition is active and the method short-circuits |
| R | `JKKIntrInfoChgCfmCC.printlnEjbLog` | - | - | Logging utility for debugging — emits start/end markers and trace information to the EJB log |

## 5. Dependency Trace

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

No screen/batch entry points found within 8 hops. Direct callers found: 1 method.
Terminal operations from this method: `printlnEjbLog` [-], `editInMsgCmn` [-], `mappingEKK0081C310InMsg` [-], `editBasicCmn` [U], `run` [R], `editResultRP` [U], `isNullBlank` [-], `printlnEjbLog` [-]

| # | Caller (Screen/Batch) | Call Chain (Full Path to this Method) | Terminal (SC / CRUD / Entity) |
|---|----------------------|--------------------------------------|-------------------------------|
| 1 | Caller: `JKKIntrInfoChgCfmCC.chgIntrInfo()` | `chgIntrInfo()` -> `callEKK0081C310SC(param, handle, workMap, inMap)` | `scCall.run [R] EKK0081C310SC`, `editResultRP [U]` error fields, `isNullBlank [-] svc_kei_no_err_o` |

**Notes on callers:**
- `JKKIntrInfoChgCfmCC.chgIntrInfo()` is the primary (and only documented) caller. It is a private method within the same class (`JKKIntrInfoChgCfmCC`), likely invoked by the introduction code change screen controller. The caller initiates the introduction code update flow, and this method performs the actual SC invocation for the "Service Contract Information Change (Introduction Code)" operation.

## 6. Per-Branch Detail Blocks

**Block 1** — [SET] Initialize local variables (L835)

> Declares and initializes local variables for the SIF request/response flow. `status` is initialized to 0 (default return value).

| # | Type | Code |
|---|------|------|
| 1 | SET | `HashMap<String, Object> sIFRequest = null;` // SIF request map for SC invocation |
| 2 | SET | `CAANMsg template = null;` // Request message template for EKK0081C310CBSMsg |
| 3 | SET | `ServiceComponentRequestInvoker scCall = null;` // SIF SC request invoker |
| 4 | SET | `Map<?, ?> sIFResult = null;` // SIF response map from SC execution |
| 5 | SET | `int status = 0;` // Return status code, default 0 |

**Block 2** — [EXEC] Log start marker (L833)

> Logs a start trace marker for debugging.

| # | Type | Code |
|---|------|------|
| 1 | EXEC | `printlnEjbLog("callEKK0081C310SC start")` // Log start of service SC call |

**Block 3** — [CALL] Build SIF request payload (L837-L846)

> Constructs the SC request by combining three setup steps: common IF metadata, domain-specific input mapping, and basic header fields. The result is stored in `sIFRequest`.

| # | Type | Code |
|---|------|------|
| 1 | CALL | `sIFRequest = editInMsgCmn(param)` // Sets common service IF information (template ID, identify CD, operator, operation date) |
| 2 | SET | `template = new CAANMsg(EKK0081C310CBSMsg.class.getName())` // Creates CAANMsg request template for SC EKK0081C310CBSMsg |
| 3 | CALL | `mappingEKK0081C310InMsg(template, inMap, workMap)` // Maps input fields from inMap/workMap into the CAANMsg template (svc_kei_no, intr_cd, ido_div, etc.) |
| 4 | CALL | `editBasicCmn(param, template, workMap)` // Updates basic/common fields on template: operator ID, operate date/time, func code, ac_group_cd |
| 5 | SET | `sIFRequest.put(JCMConstants.TEMPLATE_LIST_KEY, new CAANMsg[]{template})` // Adds template to request map under TEMPLATE_LIST_KEY key [-> JCMConstants.TEMPLATE_LIST_KEY] |

**Block 4** — [SET] Create SC request invoker (L848-L849)

> Instantiates the ServiceComponentRequestInvoker, the SIF framework object that handles the actual SC invocation.

| # | Type | Code |
|---|------|------|
| 1 | SET | `scCall = new ServiceComponentRequestInvoker()` // Creates SC request invoker for SIF invocation |

**Block 5** — [CALL] Invoke the SC (L852)

> Executes the EKK0081C310SC service component via the SIF framework. The `handle` provides database transaction context. The result is stored in `sIFResult`.

| # | Type | Code |
|---|------|------|
| 1 | CALL | `sIFResult = scCall.run(sIFRequest, handle)` // SIF invocation — calls EKK0081C310SC with the built request and session handle. Returns the SC response containing status and error fields |

**Block 6** — [CALL] Map SC response to error area (L855)

> Translates the SC response into the screen error display area. Populates error fields (`svc_kei_no_err_o`, `err_flg_o`, `svc_kei_no_err`, `ido_div_err`, `intr_cd_err`) for the calling screen to display.

| # | Type | Code |
|---|------|------|
| 1 | CALL | `editResultRP(sIFResult, param, inMap, workMap)` // Maps SC result/error fields into response area (param, inMap, workMap). Sets err_flg_o, svc_kei_no_err_o, error detail fields |

**Block 7** — [IF] Early-exit error check (L859-L862)

> Checks whether the service contract number error field (`svc_kei_no_err_o`) is set in the workMap after the SC response. If the field is **not null and not blank**, an error condition was detected and the method short-circuits, returning status 0 without reading the SC status code. This prevents downstream processing of invalid data. The `isNullBlank` utility is used for the null/blank check.

| # | Type | Code |
|---|------|------|
| 1 | EXEC | `JKKStringUtil.isNullBlank((String)workMap.get("svc_kei_no_err_o"))` // Null/blank check on the service contract number error field |

**Block 7.1** — [ELSE-IF] Error detected — early exit

> The `svc_kei_no_err_o` field is not null/blank, indicating the SC detected a validation error on the service contract number. Return status 0 immediately.

| # | Type | Code |
|---|------|------|
| 1 | RETURN | `return status;` // Return 0 — early exit due to error condition detected in svc_kei_no_err_o |

**Block 7.2** — [ELSE] No error — read SC status (L867-L871)

> No error was detected. Read the actual status code from the CAANMsg template's status field and log the end marker.

| # | Type | Code |
|---|------|------|
| 1 | SET | `status = template.getInt(JCMConstants.STATUS_INT_KEY)` // Extracts SC status code from the CAANMsg template [-> JCMConstants.STATUS_INT_KEY] |
| 2 | EXEC | `printlnEjbLog("callEKK0081C310SC end")` // Log end marker for debugging |
| 3 | RETURN | `return status;` // Return SC status code to caller |

## 7. Glossary

| Term | Type | Business Meaning |
|------|------|------------------|
| `svc_kei_no` | Field | Service contract number — the unique identifier for a customer's service contract line item in the K-Opticom system |
| `svc_kei_no_err_o` | Field | Service contract number error (output) — error flag field populated by the SC if the contract number validation fails |
| `intr_cd` | Field | Introduction code — the referral/recommendation code associated with a service contract, used for tracking customer acquisition source and partner commissions |
| `ido_div` | Field | Migration division — classification of the type of service migration or change being performed |
| `err_flg_o` | Field | Error flag (output) — general error indicator flag set by the SC to signal processing errors |
| `svc_kei_no_err` | Field | Service contract number error — error detail field containing the invalid contract number value for screen display |
| `ido_div_err` | Field | Migration division error — error detail field containing the invalid migration division value for screen display |
| `intr_cd_err` | Field | Introduction code error — error detail field containing the invalid introduction code value for screen display |
| `upd_dtm_bf` | Field | Update date/time before — timestamp of the record before the current update (for audit/comparison) |
| `upd_dtm` | Field | Update date/time — timestamp of the current update operation |
| `upd_opeacnt` | Field | Update operator account — the operator account that performed the update |
| `gene_add_dtm` | Field | Generation registration date/time — when the record was originally created |
| `add_dtm` | Field | Registration date/time — when the record was registered |
| `add_opeacnt` | Field | Registration operator account — the operator account that registered the record |
| `mk_flg` | Field | Invalid flag — flag indicating whether a record is marked as invalid/disabled |
| `ac_group_cd` | Field | Access control group code — permission control field for function-level access restrictions |
| `func_code` | Field | Function code — identifies the specific business function being invoked |
| `templateID` | Field | Service IF ID — the unique identifier for the service interface |
| `identifyCD` | Field | Identification code — a code used to identify the request or session |
| CAANMsg | Technical | Fujitsu's CAAN message class — a structured message container used for CBS request/response data exchange, extending `CAANSchemaInfo` |
| EKK0081C310SC | Service Component | Service Contract Information Change (Introduction Code) — the SC responsible for updating introduction code data on a service contract |
| EKK0081C310CBSMsg | CBS Message | CBS message schema class defining the request/response field structure for the EKK0081C310SC service component |
| JCMConstants.TEMPLATE_LIST_KEY | Constant | Key used in the SIF request map to store the array of CAANMsg templates for SC invocation |
| JCMConstants.STATUS_INT_KEY | Constant | Key used to extract the status integer from the CAANMsg template response |
| SIF | Technical | Service Interface Framework — the middleware layer that handles routing between application controllers and CBS service components |
| SC | Technical | Service Component — a business logic unit in the CBS layer that performs a specific operation (CRUD, validation, etc.) |
| CBS | Technical | Core Business Service — the backend service layer containing business logic and database operations |
| CC | Technical | Common Component — a shared utility component class (prefix `JKK...CC`) used across multiple screens and methods |
| `workMap` | Field | Cross-method working data map — a HashMap shared across methods within a single transaction for passing data between processing steps |
| `inMap` | Field | Input data map — a HashMap carrying domain-specific input values into SC invocation |
| `chkKeiInfo` | Field | Service contract information check — referenced in the source code for contract validation logic |
| `chkIntrCd` | Field | Introduction code check — referenced in the source code for introduction code validation logic |
| `kei_ido_kh_result` | Constant | Service migration check result — flag from `JKKKeiIdoKhCheckConstCC` indicating whether the service migration check passed |
| KKSV0004 | Screen | Introduction code change screen — the customer-facing screen that triggers the introduction code update flow |
