---
title: Business Logic — JKKEmailInfoAddCfmCC.mappingEKK1091D010SCInMsg() [93 LOC]
---

# Business Logic — JKKEmailInfoAddCfmCC.mappingEKK1091D010SCInMsg() [93 LOC]

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

## 1. Role

### JKKEmailInfoAddCfmCC.mappingEKK1091D010SCInMsg()

This method is the **inbound message builder** for the EKK1091D010 Service Component (SC). Its business purpose is to construct a fully-populated `CAANMsg` template that carries the parameters needed to add or confirm email information within the telecom service provisioning system. Specifically, it maps incoming request data from `inHash` — including service contract number, billing contract number, change classification, and error/reason codes — into the structured message format expected by the EKK1091D010 SC. The method also enriches the template with derived data from `resultHash`, such as the application detail number (`MSKM_DTL_NO`) and the optional service contract number (`OP_SVC_KEI_NO`) obtained from upstream processing steps. It implements a **builder pattern**: first null-filling the entire template schema, then systematically populating each field from various sources, and finally assembling a nested list of error reason sub-messages. The processed template is returned to the caller (`callEKK1091D010SC`) which invokes the SC via the SIF (Service Integration Framework) to persist or confirm the email information addition against the backend. The method has a conditional branch on the transition classification (`IDO_DIV`) that determines whether a user-specified change datetime (`IDO_DTM`) is used (for progression and addition operations) or whether the system datetime is defaulted.

## 2. Processing Pattern (Detailed Business Logic)

```mermaid
flowchart TD
    START(["mappingEKK1091D010SCInMsg"])
    START --> NULL_MAP["fillCAANMSGNullMapping(template, EKK1091D010CBSMsg contents)"]
    NULL_MAP --> SET_TEMPLATE_ID["template.set TEMPLATE_ID = \"EKK1091D010\""]
    SET_TEMPLATE_ID --> SET_FUNC_CODE["template.set FUNC_CODE from inHash"]
    SET_FUNC_CODE --> SET_SVC_KEI_NO["template.set SVC_KEI_NO from inHash"]
    SET_SVC_KEI_NO --> SET_SEIKY_KEI_NO["template.set SEIKY_KEI_NO from inHash[SEIKY_KEI_NO]"]
    SET_SEIKY_KEI_NO --> SET_IDO_DIV["template.set IDO_DIV from inHash"]
    SET_IDO_DIV --> SET_PRG_STAT["template.set PRG_STAT from inHash"]
    SET_PRG_STAT --> SET_PRG_TKJK["template.set PRG_TKJK_1 = \"Eメール情報登録\""]
    SET_PRG_TKJK --> BUILD_LIST["Build CAANMsg[] from idoRsnList"]
    BUILD_LIST --> FOR_LOOP{"For each reason entry in list?"}
    FOR_LOOP --> CREATE_MSG["Create new CAANMsg(EKK1091D010CBSMsg1List)"]
    CREATE_MSG --> SET_RSN_CD["Set IDO_RSN_CD from list element"]
    SET_RSN_CD --> CHECK_MEMO{"Memo is null or empty?"}
    CHECK_MEMO -->|Yes| SET_MEMO_NULL["SetNull IDO_RSN_MEMO"]
    CHECK_MEMO -->|No| SET_MEMO_VALUE["Set IDO_RSN_MEMO value"]
    SET_MEMO_NULL --> STORE_MSG["Store in list array"]
    SET_MEMO_VALUE --> STORE_MSG
    STORE_MSG --> LOOP_END{"i < size?"}
    LOOP_END -->|Yes| FOR_LOOP
    LOOP_END -->|No| SET_LIST["template.set EKK1091D010CBSMSG1LIST"]
    SET_LIST --> CHECK_DTM{"ido_dtm != null and length > 0?"}
    CHECK_DTM -->|No| SET_SYS_DTM["Set IDO_DTM = system datetime"]
    CHECK_DTM -->|Yes| CHECK_DIV{"IDO_DIV = \"00001\" or \"00002\"?"}
    CHECK_DIV -->|Yes| SET_USER_DTM["Set IDO_DTM = user-specified value"]
    CHECK_DIV -->|No| SET_SYS_DTM
    SET_USER_DTM --> SET_MSKM["Set MSKM_DTL_NO from resultHash[TEMPLATE_ID_EKK0021D010]"]
    SET_SYS_DTM --> SET_MSKM
    SET_MSKM --> SET_OP_SVC["Set OP_SVC_KEI_NO from resultHash[TEMPLATE_ID_EKK0361D010]"]
    SET_OP_SVC --> END_NODE(["End / Return"])
```

**Constant Resolution:**

| Constant | Resolved Value | Business Meaning |
|----------|---------------|------------------|
| `TEMPLATE_ID_EKK1091D010` | `"EKK1091D010"` | SIF template identifier for the Email Information Addition/Confirmation service |
| `PRG_TKJK_1_VAL_EMAIL_INFO_ADD` | `"Eメール情報登録"` | Progress supplement item 1: "Email Information Registration" (full-width characters) |
| `IDO_DIV_SINKI` | `"00001"` | Transition classification — Modification (change/existing service update) |
| `IDO_DIV_TSUIKA` | `"00002"` | Transition classification — Addition (new service addition) |

**Processing flow summary:**
1. **Null-fill the template**: Initializes all fields in the EKK1091D010CBSMsg schema to null using `fillCAANMSGNullMapping`.
2. **Set top-level template metadata**: Sets the template ID, function code, service contract number, billing contract number, transition classification, and progress status.
3. **Set progress supplement item**: Hard-codes the progress-specific field to "Eメール情報登録" (Email Information Registration).
4. **Build error reason sub-list**: Iterates over the transition reason code list and reason memo list in parallel, creating sub-messages for each reason with conditional null-setting on the memo field.
5. **Set transition datetime**: Conditionally uses the user-specified datetime (for modification/addition operations) or falls back to system datetime.
6. **Enrich with upstream results**: Pulls the application detail number and optional service contract number from the result hash of prior SC invocations.

## 3. Parameter Analysis

| No | Parameter Name | Type | Business Description |
|----|---------------|------|---------------------|
| 1 | `template` | `CAANMsg` | The outbound SIF message template being built for the EKK1091D010 SC. It is instantiated by the caller as `new CAANMsg(EKK1091D010CBSMsg.class.getName())` and carries all mapped fields that will be serialized and sent to the service component. |
| 2 | `inHash` | `HashMap<String, Object>` | The inbound request parameter map carrying business data from the screen/entry point. Contains keys including `func_code` (function code identifying the operation type), `svc_kei_no` (service contract number), `seiky_kei_no` (billing contract number), `ido_div` (transition classification code: e.g., "00001" for modification, "00002" for addition), `prg_stat` (progress status), `ido_dtm` (user-specified change datetime), `ido_rsn_list` (array of transition reason codes), and `ido_rsn_memo_list` (parallel array of reason memos). |
| 3 | `resultHash` | `HashMap<String, Object>` | The result map from previously executed SC invocations within the same business flow. Specifically, this method reads `TEMPLATE_ID_EKK0021D010` (application detail number from the application processing SC) and `TEMPLATE_ID_EKK0361D010` (optional service contract number from the optional service contract SC) to enrich the EKK1091D010 message with cross-referenced data. |

**Instance fields read:**

| Field | Type | Business Description |
|-------|------|---------------------|
| `TEMPLATE_ID_EKK1091D010` | `String` | Constant: `"EKK1091D010"` — SIF template identifier used as a key in resultHash lookups |
| `FUNC_CODE` | `String` | Constant: `"func_code"` — Key for the function code value in inHash |
| `SVC_KEI_NO` | `String` | Constant: `"svc_kei_no"` — Key for the service contract number in inHash |
| `IDO_DIV` | `String` | Constant: `"ido_div"` — Key for the transition classification code in inHash |
| `PRG_STAT` | `String` | Constant: from inHash — Progress status code |
| `IDO_DTM` | `String` | Constant: `"ido_dtm"` — Key for the user-specified change datetime in inHash |
| `IDO_RSN_LIST` | `String` | Constant: `"ido_rsn_list"` — Key for the transition reason code list in inHash |
| `IDO_RSN_MEMO_LIST` | `String` | Constant: `"ido_rsn_memo_list"` — Key for the transition reason memo list in inHash |
| `PRG_TKJK_1_VAL_EMAIL_INFO_ADD` | `String` | Constant: `"Eメール情報登録"` — Hard-coded progress supplement item 1 value for email info registration |
| `IDO_DIV_SINKI` | `String` | Constant: `"00001"` — Transition classification code for "Modification" |
| `IDO_DIV_TSUIKA` | `String` | Constant: `"00002"` — Transition classification code for "Addition" |

## 4. CRUD Operations / Called Services

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

| CRUD | SC / CBS | SC Code | Entity / DB | Operation Description |
|------|----------|---------|-------------|----------------------|
| - | `JKKEmailInfoAddCfmCC.fillCAANMSGNullMapping` | - | - | Null-fills all fields in the EKK1091D010CBSMsg template. Internal utility method (no DB interaction). |
| R | `EKK1091D010CBSMsg.getContents` | EKK1091D010CBSMsg | - | Retrieves the list of field names defined in the EKK1091D010 message schema, used by fillCAANMSGNullMapping to enumerate fields. |
| - | `JCCModelCommon.getSysDateTimeStamp` | JCCModelCommon | - | Returns the current system date/time as a formatted string, used as the default value for `IDO_DTM` when no user-specified value is present. |
| - | `template.set(...)` | EKK1091D010CBSMsg | - | Sets individual fields on the CAANMsg template (template setter, not a DB operation). |
| - | `idoRsnTemp.set(...)` | EKK1091D010CBSMsg1List | - | Sets fields on sub-message entries in the error reason list. |
| - | `idoRsnTemp.setNull(...)` | EKK1091D010CBSMsg1List | - | Null-sets the memo field when no memo value is provided. |

**How to classify:**
- This method performs **no direct CRUD operations** on database tables. It is a pure **data mapper/builder** that transforms incoming request parameters into a structured SIF message.
- The actual database interaction (if any) is deferred to the EKK1091D010 SC which this method prepares data for.

## 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: `fillCAANMSGNullMapping` [-], `getContents` [R], `getSysDateTimeStamp` [R], `set` [-], `set` [-], `set` [-]

| # | Caller (Screen/Batch) | Call Chain (Full Path to this Method) | Terminal (SC / CRUD / Entity) |
|---|----------------------|--------------------------------------|-------------------------------|
| 1 | Screen:KKSV0002 (Email Info Addition Confirmation) | `KKKSV0002` (screen) -> `JKKEmailInfoAddCfmCC.process` (business logic entry) -> `callEKK1091D010SC(param, handle, requestParam, resultHash)` -> `mappingEKK1091D010SCInMsg(template, inHash, resultHash)` | `fillCAANMSGNullMapping [-]`, `EKK1091D010CBSMsg.getContents [R]`, `JCCModelCommon.getSysDateTimeStamp [R]` |

**Call context:** The method is invoked from `callEKK1091D010SC`, which is the SIF invocation wrapper within `JKKEmailInfoAddCfmCC`. The `callEKK1091D010SC` method creates the `CAANMsg` template, calls `mappingEKK1091D010SCInMsg` to populate it, invokes the SC via `ServiceComponentRequestInvoker`, and maps the response. The entire flow is part of the Email Information Addition Confirmation business process in screen KKSV0002.

## 6. Per-Branch Detail Blocks

**Block 1** — EXEC `(initialization)` (L3955)

> Null-fills the entire EKK1091D010CBSMsg template with null values.

| # | Type | Code |
|---|------|------|
| 1 | CALL | `fillCAANMSGNullMapping(template, new EKK1091D010CBSMsg().getContents())` // Null-fills all template fields [-> EKK1091D010CBSMsg fields] |

**Block 2** — EXEC `(template ID setup)` (L3960)

> Sets the SIF template identifier on the message.

| # | Type | Code |
|---|------|------|
| 1 | SET | `template.set(EKK1091D010CBSMsg.TEMPLATEID, TEMPLATE_ID_EKK1091D010)` // Sets template ID [-> `TEMPLATE_ID_EKK1091D010` = `"EKK1091D010"`] |

**Block 3** — EXEC `(function code)` (L3962)

> Copies the function code from the incoming request to the template.

| # | Type | Code |
|---|------|------|
| 1 | SET | `template.set(EKK1091D010CBSMsg.FUNC_CODE, inHash.get(FUNC_CODE))` // [-> `FUNC_CODE` = `"func_code"`] |

**Block 4** — EXEC `(service contract number)` (L3965)

> Copies the service contract number from the incoming request.

| # | Type | Code |
|---|------|------|
| 1 | SET | `template.set(EKK1091D010CBSMsg.SVC_KEI_NO, inHash.get(SVC_KEI_NO))` // [-> `SVC_KEI_NO` = `"svc_kei_no"`] |

**Block 5** — EXEC `(billing contract number)` (L3969)

> Copies the billing (seikyuu) contract number from the incoming request. Uses a nested constant key from KKSV000201CC.

| # | Type | Code |
|---|------|------|
| 1 | SET | `template.set(EKK1091D010CBSMsg.SEIKY_KEI_NO, inHash.get(KKSV0002_KKSV0002OP_KKSV000201CC.SEIKY_KEI_NO))` // Billing contract number |

**Block 6** — EXEC `(transition classification)` (L3973)

> Sets the transition/division classification code (modification, addition, etc.).

| # | Type | Code |
|---|------|------|
| 1 | SET | `template.set(EKK1091D010CBSMsg.IDO_DIV, inHash.get(IDO_DIV))` // [-> `IDO_DIV` = `"ido_div"`] |

**Block 7** — EXEC `(progress status)` (L3977)

> Sets the progress status code.

| # | Type | Code |
|---|------|------|
| 1 | SET | `template.set(EKK1091D010CBSMsg.PRG_STAT, inHash.get(PRG_STAT))` |

**Block 8** — EXEC `(progress supplement item 1)` (L3981)

> Hard-codes the progress supplement item 1 field to indicate this is an email information registration operation.

| # | Type | Code |
|---|------|------|
| 1 | SET | `template.set(EKK1091D010CBSMsg.PRG_TKJK_1, PRG_TKJK_1_VAL_EMAIL_INFO_ADD)` // [-> `PRG_TKJK_1_VAL_EMAIL_INFO_ADD` = `"Eメール情報登録"` (Email Information Registration)] |

**Block 9** — EXEC/LOOP `(error reason list construction)` (L3989)

> Retrieves the transition reason code list and reason memo list from inHash, then iterates over them in parallel to build a `CAANMsg[]` array of sub-messages.

| # | Type | Code |
|---|------|------|
| 1 | SET | `ArrayList idoRsnList = (ArrayList)inHash.get(IDO_RSN_LIST)` // [-> `IDO_RSN_LIST` = `"ido_rsn_list"`] |
| 2 | SET | `ArrayList idoRsnMemoList = (ArrayList)inHash.get(IDO_RSN_MEMO_LIST)` // [-> `IDO_RSN_MEMO_LIST` = `"ido_rsn_memo_list"`] |
| 3 | SET | `CAANMsg[] list = new CAANMsg[idoRsnList.size()]` // Allocate sub-message array |
| 4 | EXEC | `for(int i = 0; i < idoRsnList.size(); i++)` // Iterate over reason entries |

**Block 9.1** — NESTED LOOP BODY `(per reason entry)` (L3998)

> For each reason entry, creates a sub-message and maps reason code and optional memo.

| # | Type | Code |
|---|------|------|
| 1 | SET | `CAANMsg idoRsnTemp = new CAANMsg(EKK1091D010CBSMsg1List.class.getName())` // Create sub-message for reason detail |
| 2 | SET | `idoRsnTemp.set(EKK1091D010CBSMsg1List.IDO_RSN_CD, idoRsnList.get(i))` // Set reason code |

**Block 9.1.1** — IF `(memo null check)` (L4003)

> Conditionally sets the memo field — null if empty, otherwise the memo value.

| # | Type | Code |
|---|------|------|
| 1 | EXEC | `if (idoRsnMemoList.get(i) == null || "".equals(idoRsnMemoList.get(i)))` // Memo is null or blank |
| 2 | SET | `idoRsnTemp.setNull(EKK1091D010CBSMsg1List.IDO_RSN_MEMO)` // Set memo to null [-> `IDO_RSN_MEMO` field] |
| 3 | ELSE | — |
| 4 | SET | `idoRsnTemp.set(EKK1091D010CBSMsg1List.IDO_RSN_MEMO, idoRsnMemoList.get(i))` // Set memo value |
| 5 | SET | `list[i] = idoRsnTemp` // Store sub-message in array |

**Block 10** — EXEC `(set reason list to template)` (L4009)

> Assigns the built array of reason sub-messages to the template.

| # | Type | Code |
|---|------|------|
| 1 | SET | `template.set(EKK1091D010CBSMsg.EKK1091D010CBSMSG1LIST, list)` |

**Block 11** — EXEC/IF `(transition datetime setup)` (L4021)

> Determines whether to use the user-specified change datetime or default to the system datetime. The condition has two stages: first checking if a datetime value exists, then checking if the transition classification is modification (SINKI = "00001") or addition (TSUIKA = "00002").

| # | Type | Code |
|---|------|------|
| 1 | SET | `String ido_dtm = (String) inHash.get(IDO_DTM)` // [-> `IDO_DTM` = `"ido_dtm"`] |
| 2 | SET | `String idoDiv = (String) inHash.get(IDO_DIV)` |
| 3 | EXEC | `if (null != ido_dtm && 0 < ido_dtm.length() && (IDO_DIV_SINKI.equals(idoDiv) || IDO_DIV_TSUIKA.equals(idoDiv)))` // DateTime exists AND transition is modification or addition |
| 4 | SET | `template.set(EKK1091D010CBSMsg.IDO_DTM, ido_dtm)` // Use user-specified change datetime |
| 5 | ELSE | — |
| 6 | SET | `template.set(EKK1091D010CBSMsg.IDO_DTM, JCCModelCommon.getSysDateTimeStamp())` // Use system datetime as default |

**Block 12** — EXEC `(application detail number)` (L4039)

> Pulls the application detail number from the result of a prior SC invocation (EKK0021D010).

| # | Type | Code |
|---|------|------|
| 1 | SET | `HashMap<?, ?> ekk0021d010Msg = (HashMap<?, ?>) resultHash.get(TEMPLATE_ID_EKK0021D010)` // Retrieve EKK0021D010 result |
| 2 | SET | `Object mskm_dtl_no = ekk0021d010Msg.get(EKK0021D010CBSMsg.MSKM_DTL_NO)` // Extract application detail number |
| 3 | SET | `template.set(EKK1091D010CBSMsg.MSKM_DTL_NO, mskm_dtl_no)` |

**Block 13** — EXEC `(optional service contract number)` (L4044)

> Pulls the optional service contract number from the result of a prior SC invocation (EKK0361D010).

| # | Type | Code |
|---|------|------|
| 1 | SET | `HashMap<?, ?> ekk0361d010Msg = (HashMap<?, ?>) resultHash.get(TEMPLATE_ID_EKK0361D010)` // Retrieve EKK0361D010 result |
| 2 | SET | `Object op_svc_kei_no = ekk0361d010Msg.get(EKK0361D010CBSMsg.OP_SVC_KEI_NO)` // Extract optional service contract number |
| 3 | SET | `template.set(EKK1091D010CBSMsg.OP_SVC_KEI_NO, op_svc_kei_no)` |

## 7. Glossary

| Term | Type | Business Meaning |
|------|------|------------------|
| `IDO_DIV` | Field | Transition classification — indicates the type of service change: "00001" = Modification (change to existing service), "00002" = Addition (new service) |
| `IDO_DTM` | Field | Transition datetime — the date/time when the service change takes effect. Either user-specified or system default. |
| `IDO_RSN_CD` | Field | Transition reason code — the code describing why a transition occurred (e.g., error reason, cancellation reason) |
| `IDO_RSN_MEMO` | Field | Transition reason memo — free-text explanation for the transition reason |
| `IDO_RSN_LIST` | Field | Transition reason code list — array of reason codes for this service change operation |
| `IDO_RSN_MEMO_LIST` | Field | Transition reason memo list — parallel array of memo text for each reason code |
| `IDO_DIV_SINKI` | Constant | Transition classification = "00001" (Modification) |
| `IDO_DIV_TSUIKA` | Constant | Transition classification = "00002" (Addition) |
| `SVC_KEI_NO` | Field | Service contract number — the unique identifier for a telecom service contract |
| `SEIKY_KEI_NO` | Field | Billing contract number — the unique identifier for the billing agreement associated with a service contract |
| `OP_SVC_KEI_NO` | Field | Optional service contract number — the service contract number for an optional/add-on service |
| `MSKM_DTL_NO` | Field | Application detail number — a unique identifier for a specific application/processing detail record |
| `PRG_STAT` | Field | Progress status — the current processing status code of the business transaction |
| `PRG_TKJK_1` | Field | Progress supplement item 1 — a supplementary progress tracking field used to categorize the specific operation type |
| `PRG_TKJK_1_VAL_EMAIL_INFO_ADD` | Constant | Progress supplement item 1 value = "Eメール情報登録" (Email Information Registration) |
| `FUNC_CODE` | Field | Function code — identifies the type of operation being performed (e.g., addition, confirmation) |
| `TEMPLATE_ID_EKK1091D010` | Constant | SIF template identifier = "EKK1091D010" — identifies this message as belonging to the Email Information Addition/Confirmation service component |
| `EKK1091D010` | SC Code | Email Information Addition/Confirmation Service Component — the SC that handles adding or confirming email information for a service contract |
| `EKK0021D010` | SC Code | Application Processing Service Component — handles application detail processing; its result provides MSKM_DTL_NO |
| `EKK0361D010` | SC Code | Optional Service Contract Service Component — handles optional/add-on service contracts; its result provides OP_SVC_KEI_NO |
| `CAANMsg` | Technical | Fujitsu's application message wrapper class — used for structured data exchange between SIF components |
| `EKK1091D010CBSMsg` | Technical | The message schema/class for the EKK1091D010 SC — defines the field structure of the request/response message |
| `EKK1091D010CBSMsg1List` | Technical | The sub-message schema for the error reason list — each element represents one transition reason with code and memo |
| SIF | Acronym | Service Integration Framework — the middleware layer for invoking service components |
| SC | Acronym | Service Component — a reusable business logic module invoked via SIF |
| CBS | Acronym | CBS (Common Business Shared) — naming convention for shared message schema classes |
| `fillCAANMSGNullMapping` | Method | Internal utility method that sets all fields of a CAANMsg to null based on a list of field names |
| `JCCModelCommon.getSysDateTimeStamp` | Method | Utility method that returns the current system date/time as a formatted string |
| KKSV0002 | Screen | Email Information Addition Confirmation screen — the user-facing screen where this business process originates |
| Eメール情報登録 | Business term | "Email Information Registration" — the business operation being performed; the value stored in PRG_TKJK_1 |
