---
title: Business Logic — JFUHakkoSODCC.editResultRP_EKK1551D011CBS()
file: source/koptBp/ejbModule/com/fujitsu/futurity/bp/custom/common/JFUHakkoSODCC.java
loc: 52
---

# Business Logic — JFUHakkoSODCC.editResultRP_EKK1551D011CBS() [52 LOC]

| Field | Value |
|-------|-------|
| Fully Qualified Name | `com.fujitsu.futurity.bp.custom.common.JFUHakkoSODCC` |
| Layer | CC/Common Component (Service-to-Datamap mapping layer) |
| Module | `common` (Package: `com.fujitsu.futurity.bp.custom.common`) |

## 1. Role

### JFUHakkoSODCC.editResultRP_EKK1551D011CBS()

This method serves as the **result mapping layer** (下りマッピング) following the execution of a Service Component (SC) that performs order information creation work registration (オーダ情報作成ワーク登録). After the Service Component `EKK1551D011CBS` completes its business processing, this method extracts the return values from the SC response and maps them into the `IRequestParameterReadWrite` parameter object so that the calling screen/business process can access the processed data.

The method implements a **delegation and transformation pattern** — it transforms raw `CAANMsg` response objects into domain-friendly structures stored within a work map (`HakkoSODCCWORK`), and simultaneously consolidates error information from the SC response into the control map for downstream error handling.

Its **role in the larger system** is as an internal post-processing callback. It is always invoked immediately after `scCall.run(paramMap, handle)` completes in the `executeOdrInfoSakseiWkAdd` method, forming the second half of a request-response mapping pair: `editInMsg_EKK1551D011CBS` prepares the inbound request, and `editResultRP_EKK1551D011CBS` processes the outbound result. The method handles two branches: (1) when `ODR_INF_SKSI_WK_NO` is present — it maps the order information creation work number from the SC response; (2) when `ODR_INF_SKSI_WK_NO` is absent — it stores an empty string to preserve the field contract.

## 2. Processing Pattern (Detailed Business Logic)

```mermaid
flowchart TD
    START(["editResultRP_EKK1551D011CBS"])

    START --> GET_TEMPLATES["Get CAANMsg[] templates from msgList"]
    GET_TEMPLATES --> GET_PARENT["Set parentTemplate = templates[0]"]
    GET_PARENT --> GET_RET_CD["Get return_code from msgList"]
    GET_RET_CD --> INIT_DATAMAP["dataMap = null"]
    INIT_DATAMAP --> GET_WORKMAP["dataMap = param.getData(HAKKOSODCCWORKMAP)"]
    GET_WORKMAP --> CHECK_DATAMAP{"dataMap == null?"}

    CHECK_DATAMAP -->|true| CREATE_DATAMAP["dataMap = new HashMap"]
    CREATE_DATAMAP --> SET_DATAMAP["param.setData(HAKKOSODCCWORKMAP, dataMap)"]
    CHECK_DATAMAP -->|false| CHECK_ODR_INF
    SET_DATAMAP --> CHECK_ODR_INF

    CHECK_ODR_INF{"parentTemplate.isNull(ODR_INF_SKSI_WK_NO)?"}

    CHECK_ODR_INF -->|true| SET_EMPTY["dataMap.put(odr_inf_sksi_wk_no, empty)"]
    CHECK_ODR_INF -->|false| SET_VALUE["dataMap.put(odr_inf_sksi_wk_no, parentTemplate.getString(ODR_INF_SKSI_WK_NO))"]

    SET_EMPTY --> CALL_EDIT_ERROR["editErrorInfo_EKK1551D011CBS(param, templates, return_code)"]
    SET_VALUE --> CALL_EDIT_ERROR
    CALL_EDIT_ERROR --> GET_ERR_LIST["errList = param.getControlMapData(ERROR_INFO)"]

    GET_ERR_LIST --> CHECK_ERR_LIST{"errList == null?"}
    CHECK_ERR_LIST -->|true| CREATE_ERR_LIST["errList = new ArrayList<Object>()"]
    CHECK_ERR_LIST -->|false| SET_CONTROL_MAP
    CREATE_ERR_LIST --> SET_CONTROL_MAP

    SET_CONTROL_MAP["param.setControlMapData(ERROR_INFO, TemplateErrorUtil.getErrorInfo(msgList, errList))"]
    SET_CONTROL_MAP --> CHECK_ERRORS{"errList != null AND !isEmpty?"}

    CHECK_ERRORS -->|true| THROW_EXCEPTION["throw new CCException with SCCallException"]
    CHECK_ERRORS -->|false| RETURN_PARAM["return param"]

    THROW_EXCEPTION --> END(["End"])
    RETURN_PARAM --> END
```

**Constant Resolution:**
- `HAKKOSODCCWORKMAP` = `"HakkoSODCCWORK"` — Key for the Order Release SOD Creation Work Map, used to store and retrieve work registration data [-> JKKHakkoSODConstCC.HAKKOSODCCWORKMAP="HakkoSODCCWORK" (JKKHakkoSODConstCC.java:481)]
- `TEMPLATE_LIST_KEY` = Key used to retrieve `CAANMsg[]` from the SC response `msgList` map [-> JCMConstants.TEMPLATE_LIST_KEY (JCMConstants.java)]
- `RET_CD_INT_KEY` = Key used to retrieve the return code (Integer) from the SC response map [-> JCMConstants.RET_CD_INT_KEY (JCMConstants.java)]
- `ERROR_INFO` = Key for the error information control map [-> SCControlMapKeys.ERROR_INFO (SCControlMapKeys.java)]

## 3. Parameter Analysis

| No | Parameter Name | Type | Business Description |
|----|---------------|------|---------------------|
| 1 | `msgList` | `Map<?, ?>` | The raw response from the Service Component `EKK1551D011CBS`. Contains `CAANMsg` templates with mapped return values, the return code (`Integer`), and error status information. Represents the SC's output payload carrying all business results from the order information creation work registration process. |
| 2 | `param` | `IRequestParameterReadWrite` | The business data retrieval/write interface object that carries work map data, control map data, and screen-bound data. This method reads from it to obtain the work map and writes back mapped results, error info, and processed data for downstream consumers. |

**Instance fields / external state read:**
- `JCCUtils` (inherited base class): Used for utility methods like `isNull` checks.
- `JCCUtilsJAS` (inherited base class): Used for JAS (Japanese Accounting System) related utilities.

## 4. CRUD Operations / Called Services

| CRUD | SC / CBS | SC Code | Entity / DB | Operation Description |
|------|----------|---------|-------------|----------------------|
| U | `editErrorInfo_EKK1551D011CBS` | EKK1551D011CBS | - | Update: Sets error information into the param object by invoking the error info editing helper method within the same class. |
| R | `TemplateErrorUtil.getErrorInfo` | - | - | Read: Extracts structured error information from the `msgList` response and error list for aggregation into the control map. |
| U | `param.setControlMapData` | - | - | Update: Stores the aggregated error information into the control map under `ERROR_INFO` key. |
| R | `param.getControlMapData` | - | - | Read: Retrieves the existing error list from the control map for error accumulation. |
| U | `param.setData` | - | - | Update: Sets the work map (`HAKKOSODCCWORKMAP`) into the param object if not already present. |
| R | `param.getData` | - | - | Read: Retrieves the existing work map from the param object for mapping order information. |
| R | `parentTemplate.getString` | - | - | Read: Extracts the order information creation work number string from the CAANMsg template. |

## 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: `editErrorInfo_EKK1551D011CBS` [U], `getErrorInfo` [R], `setControlMapData` [U], `getControlMapData` [R], `setData` [U], `getData` [R], `getString` [R]

| # | Caller (Screen/Batch) | Call Chain (Full Path to this Method) | Terminal (SC / CRUD / Entity) |
|---|----------------------|--------------------------------------|-------------------------------|
| 1 | Method: `executeOdrInfoSakseiWkAdd` (JFUHakkoSODCC) | `executeOdrInfoSakseiWkAdd` -> `scCall.run(paramMap, handle)` -> `editResultRP_EKK1551D011CBS(result, param)` | `editErrorInfo_EKK1551D011CBS [U]`, `getErrorInfo [R]` |

**Note:** `executeOdrInfoSakseiWkAdd` is an `@Override` protected method of the `JFUHakkoSODCC` class. It is itself called by a screen operation class that handles the order information creation work registration screen flow. The call chain is: screen operation -> `executeOdrInfoSakseiWkAdd` -> Service Component invocation -> `editResultRP_EKK1551D011CBS`.

## 6. Per-Branch Detail Blocks

**Block 1** — [SET] Extract templates and return code from SC response (L1215–1217)

> Retrieve the `CAANMsg` template array from the SC response map and extract the parent template (first element) and the return code. This prepares the data for subsequent mapping and error processing.

| # | Type | Code |
|---|------|------|
| 1 | SET | `CAANMsg[] templates = (CAANMsg[]) msgList.get(JCMConstants.TEMPLATE_LIST_KEY)` // Extract CAANMsg templates [-> JCMConstants.TEMPLATE_LIST_KEY] |
| 2 | SET | `CAANMsg parentTemplate = templates[0]` // Parent template is the first element |
| 3 | SET | `Object return_code = msgList.get(JCMConstants.RET_CD_INT_KEY)` // Extract return code as Integer [-> JCMConstants.RET_CD_INT_KEY] |

**Block 2** — [SET] Initialize dataMap (L1219)

> Declare and null-initialize the HashMap that will hold the mapped order creation work data.

| # | Type | Code |
|---|------|------|
| 1 | SET | `HashMap dataMap = null` // Initialize working map reference |

**Block 3** — [IF/ELSE] Obtain or create work map (L1222–1228)

> Retrieve the existing work registration map from the param object. If it does not exist (first call), create a new HashMap and store it back. This ensures the work map exists for subsequent field mappings. The key used is `HAKKOSODCCWORKMAP` [-> JKKHakkoSODConstCC.HAKKOSODCCWORKMAP="HakkoSODCCWORK" (JKKHakkoSODConstCC.java:481)].

| # | Type | Code |
|---|------|------|
| 1 | SET | `dataMap = (HashMap) param.getData(JKKHakkoSODConstCC.HAKKOSODCCWORKMAP)` // Get work map from param [-> JKKHakkoSODConstCC.HAKKOSODCCWORKMAP="HakkoSODCCWORK" (JKKHakkoSODConstCC.java:481)] |
| 2 | IF | `dataMap == null` (L1223) |

**Block 3.1** — [ELSE] Create new dataMap (L1224–1226)

| # | Type | Code |
|---|------|------|
| 1 | SET | `dataMap = new HashMap()` // Create new work map |
| 2 | SET | `param.setData(JKKHakkoSODConstCC.HAKKOSODCCWORKMAP, dataMap)` // Store work map back into param [-> JKKHakkoSODConstCC.HAKKOSODCCWORKMAP="HakkoSODCCWORK" (JKKHakkoSODConstCC.java:481)] |

**Block 4** — [IF/ELSE] Map order information creation work number (L1231–1240)

> This block maps the order information creation work number (オーダ情報作成ワーク番号) from the SC response template into the work map. It checks if the `ODR_INF_SKSI_WK_NO` field in the parent template is null (empty/not returned by the SC). The constant `ODR_INF_SKSI_WK_NO` is defined in `EKK1551D011CBSMsg` [-> EKK1551D011CBSMsg.ODR_INF_SKSI_WK_NO (EKK1551D011CBSMsg.java)].

| # | Type | Code |
|---|------|------|
| 1 | IF | `parentTemplate.isNull(EKK1551D011CBSMsg.ODR_INF_SKSI_WK_NO)` (L1231) [-> EKK1551D011CBSMsg.ODR_INF_SKSI_WK_NO] |

**Block 4.1** — [IF] Field is null — store empty string (L1232–1234)

> When the SC does not return an order information creation work number, store an empty string to maintain field consistency.

| # | Type | Code |
|---|------|------|
| 1 | SET | `dataMap.put("odr_inf_sksi_wk_no", "")` // Store empty string for missing work number |

**Block 4.2** — [ELSE] Field is present — store value (L1236–1238)

> When the SC returns a valid order information creation work number, extract it as a string and store it in the work map.

| # | Type | Code |
|---|------|------|
| 1 | SET | `dataMap.put("odr_inf_sksi_wk_no", parentTemplate.getString(EKK1551D011CBSMsg.ODR_INF_SKSI_WK_NO))` // Map work number from template [-> EKK1551D011CBSMsg.ODR_INF_SKSI_WK_NO] |

**Block 5** — [CALL] Set error information (L1243)

> Delegate error processing to the dedicated helper method `editErrorInfo_EKK1551D011CBS`, which extracts error details from the SC response templates and return code, and stores them into the param object. The returned param reference is reassigned to capture any modifications.

| # | Type | Code |
|---|------|------|
| 1 | CALL | `param = editErrorInfo_EKK1551D011CBS(param, templates, (Integer) return_code)` // Set error info into param |

**Block 6** — [SET] Obtain error list from control map (L1246)

> Retrieve the existing error list from the control map for accumulation. The key used is `ERROR_INFO` from `SCControlMapKeys` [-> SCControlMapKeys.ERROR_INFO (SCControlMapKeys.java)].

| # | Type | Code |
|---|------|------|
| 1 | SET | `ArrayList<Object> errList = (ArrayList<Object>) param.getControlMapData(SCControlMapKeys.ERROR_INFO)` // Get error list [-> SCControlMapKeys.ERROR_INFO] |

**Block 7** — [IF/ELSE] Initialize error list if null (L1247–1250)

> If the error list was not previously initialized in the control map, create a new empty ArrayList.

| # | Type | Code |
|---|------|------|
| 1 | IF | `errList == null` (L1247) |

**Block 7.1** — [IF] Create empty error list (L1248–1249)

| # | Type | Code |
|---|------|------|
| 1 | SET | `errList = new ArrayList<Object>()` // Initialize new error list |

**Block 8** — [SET] Set control map data with error info (L1253)

> Aggregate error information from the SC response using `TemplateErrorUtil.getErrorInfo` and store it back into the control map under the `ERROR_INFO` key.

| # | Type | Code |
|---|------|------|
| 1 | SET | `param.setControlMapData(SCControlMapKeys.ERROR_INFO, TemplateErrorUtil.getErrorInfo(msgList, errList))` // Set aggregated error info [-> SCControlMapKeys.ERROR_INFO] |

**Block 9** — [IF] Check for errors and throw exception (L1256–1258)

> If errors exist (the error list is not null and not empty), throw a `CCException` wrapping an `SCCallException`. The exception carries the return code as a string and the status code from the parent template. This signals to the caller that the SC processing resulted in business errors.

| # | Type | Code |
|---|------|------|
| 1 | IF | `errList != null && !errList.isEmpty()` (L1256) |

**Block 9.1** — [IF] Throw CCException (L1257–1258)

> Construct and throw a `CCException` containing: the return code cast to Integer string, and the status code retrieved from `parentTemplate.getInt(EKK1551D011CBSMsg.STATUS)` [-> EKK1551D011CBSMsg.STATUS]. This propagates SC error details up the call chain.

| # | Type | Code |
|---|------|------|
| 1 | RETURN | `throw new CCException("", new SCCallException("", ((Integer) return_code).toString(), templates[0].getInt(EKK1551D011CBSMsg.STATUS)))` // Throw with return code and status [-> EKK1551D011CBSMsg.STATUS] |

**Block 10** — [RETURN] Return param on success (L1261)

> When no errors are present, return the param object with all mapped data (work number and error info) ready for the calling screen to consume.

| # | Type | Code |
|---|------|------|
| 1 | RETURN | `return param` // Return processed parameter object |

## 7. Glossary

| Term | Type | Business Meaning |
|------|------|------------------|
| `odr_inf_sksi_wk_no` | Field | Order information creation work number — the unique tracking ID assigned to a work-in-progress order creation registration session |
| `HAKKOSODCCWORKMAP` | Constant | Hakko (Release/Creation) SOD Creation Work Map — the session-scoped work data container keyed by `"HakkoSODCCWORK"` |
| `TEMPLATE_LIST_KEY` | Constant | Key for retrieving the `CAANMsg[]` template array from the SC response map |
| `RET_CD_INT_KEY` | Constant | Key for retrieving the return code (Integer) from the SC response map |
| `ERROR_INFO` | Constant | Control map key used to store and retrieve error information lists |
| `SOD` | Acronym | Service Order Data — the telecom service order entity representing order information in the order fulfillment workflow |
| `Hakko` (発行) | Japanese term | Release/Creation — referring to the generation of a new service order |
| 下りマッピング | Japanese comment | Downstream mapping — mapping SC (Service Component) response data back to the business layer's parameter object |
| オーダ情報作成ワーク登録 | Japanese comment | Order information creation work registration — the process of registering order data in a work-in-progress state |
| SC | Acronym | Service Component — a backend service layer component that executes business logic and returns data via CAANMsg |
| CAANMsg | Class | Message container class used for passing structured data between SCs and the application layer |
| IRequestParameterReadWrite | Interface | Business data read/write interface — the contract for objects that carry screen data, work maps, and control maps |
| CCException | Class | Common Component Exception — the application-level exception thrown when business processing fails |
| SCCallException | Class | Service Component Call Exception — exception wrapper carrying SC return code and status information |
| `EKK1551D011CBS` | SC Code | Service Component for order information creation work registration result processing |
| `executeOdrInfoSakseiWkAdd` | Method | Order information creation work add — the parent method that invokes the SC and delegates result mapping to this method |
| `editInMsg_EKK1551D011CBS` | Method | Upstream mapping (オーダ情報作成ワーク登録) — the complementary method that prepares inbound data for the SC call |
| `editErrorInfo_EKK1551D011CBS` | Method | Error information setting (エラー情報の設定) — helper method that extracts and stores error details from SC response |
| `ODR_INF_SKSI_WK_NO` | Constant | Order information creation work number field key in EKK1551D011CBSMsg |
| `STATUS` | Constant | Status field key in EKK1551D011CBSMsg — indicates the SC processing status result |
| `TemplateErrorUtil.getErrorInfo` | Utility | Utility method that aggregates error information from SC templates into a structured list |
| `SCControlMapKeys` | Class | Constants class defining keys for the control map (e.g., `ERROR_INFO`) |
| `JKKHakkoSODConstCC` | Class | Constants class for Order Release SOD Creation common constants |
| `JCMConstants` | Class | Common constants class for Java Common Module (template list key, return code key) |
| `JFUHakkoSODCC` | Class | Fujitsu Order Release SOD Common Component — handles order creation SOD mapping operations |

---
