---
title: "Business Logic — FUW02601SFLogic.checkException() [83 LOC]"
---

# Business Logic — FUW02601SFLogic.checkException() [83 LOC]

| Field | Value |
|-------|-------|
| Fully Qualified Name | `eo.web.webview.FUW02601SF.FUW02601SFLogic` |
| Layer | Service / Controller Logic (Webview layer — `eo.web.webview`) |
| Module | `FUW02601SF` (Package: `eo.web.webview.FUW02601SF`) |

## 1. Role

### FUW02601SFLogic.checkException()

The `checkException` method is a centralized exception classification and routing handler for the FUW02601SF module, which manages the **Mail List Addition Application Screen** (メールンギリスト追加申請画面). This method receives a `JCCWebServiceException` (the original exception thrown from a downstream service call) along with a target check-type discriminator (`isTarget`), inspects the exception's embedded metadata (template ID, item ID, status, and error flag), and decides which business-level exception to re-throw or suppress.

The method implements a **conditional dispatch pattern**, branching first by `isTarget` (`"cfm"` for correlation check / 関連チェック, or `"mskm"` for Mskm processing / Mskm処理), then by the combination of template ID, error flag code, and item ID within each branch. Two service templates are evaluated: `EKK0361D010` (FTTH Authorization Service Contract ISP Registration / オプションサービス契約<ISP>登録) and `EZM0111D010` (Aging Target Registration / エイジング対象登録).

Within each branch, the method classifies exceptions into three categories: **business-level exceptions** (re-thrown as the original `JCCWebServiceException` — for mailing list validation failures and aging target checks), **system exceptions** (wrapped as `JCCBusinessException` with specific error codes — for timestamp conflicts, contract state errors, and usage restrictions), and a **default catch-all** (re-thrown as a generic system error `ERROR_CODE_0002` for any unrecognized condition). Its role in the larger system is to ensure that screen-level error display logic receives the correct exception type for each error scenario, enabling proper user-facing error messages while preserving system integrity.

## 2. Processing Pattern (Detailed Business Logic)

```mermaid
flowchart TD
    START(["checkException(JCCWebServiceException, String)"])
    MSG["Get message list from se"]
    INFO["Get first moreInfo from list"]
    EXTRACT["Extract: templateid, itemid, status, errFlg"]
    COND_TOP["status == RELATION_ERR (1100)"]

    CFM_BRANCH["isTarget == 'cfm' (Correlation Check)"]
    MSKM_BRANCH["isTarget == 'mskm' (Mskm Processing)"]
    DEFCHECK["Default: Other combinations"]

    CFM_A1["EKK0361D010 == FTTH-ISP-Reg AND errFlg == EB AND itemid == MailList"]
    CFM_A2["EKK0361D010 == FTTH-ISP-Reg AND errFlg == EA AND itemid == MailList"]
    CFM_S1["EKK0361D010 == FTTH-ISP-Reg AND errFlg == EA AND itemid == UpdateDt"]
    CFM_S2["EKK0361D010 == FTTH-ISP-Reg AND errFlg == EE AND itemid == OpSvcCd"]

    MSKM_B1["EKK0361D010 == FTTH-ISP-Reg AND errFlg == EB AND itemid == MailList"]
    MSKM_B2["EKK0361D010 == FTTH-ISP-Reg AND errFlg == EA AND itemid == MailList"]
    MSKM_B3["EKK0361D010 == FTTH-ISP-Reg AND errFlg == EA AND itemid == UpdateDt"]
    MSKM_B4["EKK0361D010 == FTTH-ISP-Reg AND errFlg == EE AND itemid == OpSvcCd"]

    EZM_A1["EZM0111D010 == Aging-Reg AND errFlg == EA AND itemid == AgingTgVal"]

    THROW_WEB["throw se
(Original WebServiceException)"]
    THROW_SYS_0101["throw JCCBusinessException
(ERROR_CODE_0101)
(Usage Restriction Error)"]
    THROW_SYS_0102["throw JCCBusinessException
(ERROR_CODE_0102)
(Contract State Error)"]
    THROW_SYS_0204["throw JCCBusinessException
(ERROR_CODE_0204)
(System Error - Update Unavailable)"]
    THROW_DEF["throw JCCBusinessException
(ERROR_CODE_0002)
(Default System Error)"]
    END_NODE(["Return / Next"])

    START --> MSG --> INFO --> EXTRACT --> COND_TOP
    COND_TOP -- true --> CFM_BRANCH
    COND_TOP -- true --> MSKM_BRANCH
    COND_TOP -- false --> DEFCHECK --> THROW_DEF --> END_NODE
    CFM_BRANCH --> CFM_A1
    CFM_A1 -- true --> THROW_WEB
    CFM_A1 -- false --> CFM_A2
    CFM_A2 -- true --> THROW_WEB
    CFM_A2 -- false --> CFM_S1
    CFM_S1 -- true --> THROW_SYS_0204
    CFM_S1 -- false --> CFM_S2
    CFM_S2 -- true --> THROW_SYS_0102
    CFM_S2 -- false --> EZM_A1
    EZM_A1 -- true --> THROW_WEB
    EZM_A1 -- false --> END_NODE
    MSKM_BRANCH --> MSKM_B1
    MSKM_B1 -- true --> THROW_SYS_0101
    MSKM_B1 -- false --> MSKM_B2
    MSKM_B2 -- true --> THROW_SYS_0101
    MSKM_B2 -- false --> MSKM_B3
    MSKM_B3 -- true --> THROW_SYS_0204
    MSKM_B3 -- false --> MSKM_B4
    MSKM_B4 -- true --> THROW_SYS_0102
    MSKM_B4 -- false --> END_NODE
    THROW_WEB --> END_NODE
    THROW_SYS_0101 --> END_NODE
    THROW_SYS_0102 --> END_NODE
    THROW_SYS_0204 --> END_NODE
    THROW_DEF --> END_NODE
```

**CRITICAL — Constant Resolution:**

| Constant Name | Resolved Value | Business Meaning |
|---------------|---------------|-----------------|
| `JPCModelConstant.RELATION_ERR` | `1100` | Status code indicating a relational/correlation error |
| `CHEK_CFM` | `"cfm"` | Target check type for correlation check processing (関連チェック) |
| `CHEK_MSKM` | `"mskm"` | Target check type for Mskm processing (Mskm処理) |
| `EKK0361D010` | `"EKK0361D010"` | Template ID for FTTH Authorization Service Contract ISP Registration |
| `EZM0111D010` | `"EZM0111D010"` | Template ID for Aging Target Registration |
| `JFUStrConst.RELATION_CHECK_ERR_EA` | `"EA"` | Error flag: related check error type A |
| `JFUStrConst.RELATION_CHECK_ERR_EB` | `"EB"` | Error flag: related check error type B |
| `JFUStrConst.RELATION_CHECK_ERR_EE` | `"EE"` | Error flag: related check error type E |
| `MLLIST_NM` | `"mllist_nm"` | Error item: Mailing list (メーリングリスト) |
| `AGING_TG_VALUE` | `"aging_tg_value"` | Error item: Aging target value (エイジング対象値) |
| `UPD_DTM_BF` | `"upd_dtm_bf"` | Error item: Update date/time before update (更新年月日時分秒<更新前>) |
| `OP_SVC_CD` | `"op_svc_cd"` | Error item: Operation service code (オプションサービスコード) |
| `JFUStrConst.ERROR_CODE_0002` | System default | Default system error |
| `JFUStrConst.ERROR_CODE_0101` | System default | Usage restriction error (利用制限エラー) |
| `JFUStrConst.ERROR_CODE_0102` | System default | Contract state error (契約状態エラー) |
| `JFUStrConst.ERROR_CODE_0204` | System default | Update unavailable error (更新不可エラー) |

## 3. Parameter Analysis

| No | Parameter Name | Type | Business Description |
|----|---------------|------|---------------------|
| 1 | `se` | `JCCWebServiceException` | The exception object thrown from a downstream web service call, containing a message list with metadata about which validation check failed, the target template, and the specific item that caused the error. This object carries all information needed to classify the error and determine the appropriate exception to re-throw to the screen layer. |
| 2 | `isTarget` | `String` | The check-type discriminator indicating which validation flow the exception belongs to. Takes the value `"cfm"` (correlation check / 関連チェック — validates relationships between service items) or `"mskm"` (Mskm processing / Mskm処理 — validates Mskm-specific constraints). This determines which set of error classification rules to apply. |

**Instance Fields / External State:**
No instance fields or external state are accessed by this method. It operates entirely on its parameters and local variables.

## 4. CRUD Operations / Called Services

| CRUD | SC / CBS | SC Code | Entity / DB | Operation Description |
|------|----------|---------|-------------|----------------------|
| R | `se.getMessageList` | - | - | Retrieves the message list from the exception parameter (read-only inspection of exception metadata) |
| R | `msgResult.getMessageMoreInfoList` | - | - | Retrieves the array of `X31CMessageMoreInfo` objects from the message result (read-only inspection) |
| R | `info.getTemplateId` | - | - | Extracts the error template ID from the more info object |
| R | `info.getItemId` | - | - | Extracts the error item ID from the more info object |
| R | `info.getStatus` | - | - | Extracts the error status code from the more info object |
| R | `info.getItemCheckErr` | - | - | Extracts the error flag code from the more info object |
| THRW | `throw se` | - | - | Re-throws the original `JCCWebServiceException` for business-level errors (mailing list validation, aging target check) |
| THRW | `throw new JCCBusinessException(...)` | - | - | Throws wrapped system/business exceptions with specific error codes for system-level errors (timestamp conflicts, contract state, usage restrictions, default) |

**Note:** This method is a pure exception classifier — it does not perform any database CRUD operations, call service components (SC/CBS), or interact with entities. All operations listed are read-only extractions from the exception parameter's metadata, followed by exception re-throwing. The actual database/entity operations are performed by the downstream methods that originally threw the `JCCWebServiceException`.

## 5. Dependency Trace

| # | Caller (Screen/Batch) | Call Chain (Full Path to this Method) | Terminal (SC / CRUD / Entity) |
|---|----------------------|--------------------------------------|-------------------------------|
| 1 | Logic: `FUW02601SFLogic.cfmMskmSyori` | `cfmMskmSyori` -> `checkException(se, isTarget)` | `throw se [THRW]` / `JCCBusinessException [THRW]` |

**Instructions:**
- The only direct caller found is `cfmMskmSyori`, which is a method within the same `FUW02601SFLogic` class.
- `cfmMskmSyori` processes the correlation check (Cfm) and Mskm processing flows and delegates to `checkException` when an exception needs classification.
- The terminal operations from this method are exception re-throws — no SC/CBS/CRUD endpoints are called.
- No screen/batch entry points (KKSV*) were found within 8 hops in the caller graph. This method sits deep in the logic chain, serving as an error-handling utility called from `cfmMskmSyori`.

## 6. Per-Branch Detail Blocks

**Block 1** — IF `(condition: status == RELATION_ERR && isTarget == "cfm")` [JPCModelConstant.RELATION_ERR="1100"] (L389)

> Correlation check (関連チェック) processing branch: validates FTTH service contract registration errors and aging target registration errors when the check type is Cfm.

| # | Type | Code |
|---|------|------|
| 1 | SET | `msgResult = se.getMessageList()` // Get exception message list [-> `X31CMessageResult`] |
| 2 | SET | `moreInfo = msgResult.getMessageMoreInfoList()` // Get array of message more info [-> `X31CMessageMoreInfo[]`] |
| 3 | SET | `info = moreInfo[0]` // Take first entry — always exactly one error for related checks [-> `X31CMessageMoreInfo`] |
| 4 | SET | `templateid = info.getTemplateId()` // Extract template ID [-> `String`] |
| 5 | SET | `itemid = info.getItemId()` // Extract item ID [-> `String`] |
| 6 | SET | `status = info.getStatus()` // Extract status code [-> `String`] |
| 7 | SET | `errFlg = info.getItemCheckErr()` // Extract error flag [-> `String`] |
| 8 | IF | `EKK0361D010 == "EKK0361D010" (FTTH-ISP-Reg) && errFlg == "EB" && itemid == "mllist_nm"` (L395) [JFUStrConst.RELATION_CHECK_ERR_EB="EB", MLLIST_NM="mllist_nm"] |

> Business-level exception: Mailing list validation error for FTTH service registration. The error flag EB indicates a specific mailing list constraint violation. Re-throw the original exception so the screen can display the specific mailing list error message.

| # | Type | Code |
|---|------|------|
| 1 | THRW | `throw se` // Business exception — original WebServiceException preserved [-> mailing list error for FTTH registration] |

| # | Type | Code |
|---|------|------|
| 2 | IF-ELSE | `EKK0361D010 == "EKK0361D010" (FTTH-ISP-Reg) && errFlg == "EA" && itemid == "mllist_nm"` (L403) [JFUStrConst.RELATION_CHECK_ERR_EA="EA", MLLIST_NM="mllist_nm"] |

> Business-level exception: Mailing list error with flag EA for FTTH service registration. EA is a different mailing list error subtype than EB. Re-throw the original exception.

| # | Type | Code |
|---|------|------|
| 1 | THRW | `throw se` // Business exception — original WebServiceException preserved |

| # | Type | Code |
|---|------|------|
| 3 | IF-ELSE | `EKK0361D010 == "EKK0361D010" (FTTH-ISP-Reg) && errFlg == "EA" && itemid == "upd_dtm_bf"` (L411) [JFUStrConst.RELATION_CHECK_ERR_EA="EA", UPD_DTM_BF="upd_dtm_bf"] |

> System-level exception: Timestamp conflict error (更新不可エラー — update unavailable). The client's data has been modified since it was read, so the update cannot proceed. Throw a system business exception with error code 0204.

| # | Type | Code |
|---|------|------|
| 1 | THRW | `throw new JCCBusinessException(JFUStrConst.ERROR_CODE_0204)` // System error — update unavailable [-> ERROR_CODE_0204] |

| # | Type | Code |
|---|------|------|
| 4 | IF-ELSE | `EKK0361D010 == "EKK0361D010" (FTTH-ISP-Reg) && errFlg == "EE" && itemid == "op_svc_cd"` (L417) [JFUStrConst.RELATION_CHECK_ERR_EE="EE", OP_SVC_CD="op_svc_cd"] |

> System-level exception: Contract state error (契約状態エラー — contract state error). The option service contract status is invalid for the requested operation. Throw a system business exception with error code 0102.

| # | Type | Code |
|---|------|------|
| 1 | THRW | `throw new JCCBusinessException(JFUStrConst.ERROR_CODE_0102)` // System error — contract state error [-> ERROR_CODE_0102] |

| # | Type | Code |
|---|------|------|
| 5 | IF-ELSE | `EZM0111D010 == "EZM0111D010" (Aging-Reg) && errFlg == "EA" && itemid == "aging_tg_value"` (L425) [EZM0111D010="EZM0111D010", JFUStrConst.RELATION_CHECK_ERR_EA="EA", AGING_TG_VALUE="aging_tg_value"] |

> Business-level exception: Aging target validation error. The aging target value failed validation for the aging target registration process. Re-throw the original exception.

| # | Type | Code |
|---|------|------|
| 1 | THRW | `throw se` // Business exception — original WebServiceException preserved |

**Block 1.2** — ELSE-IF `(condition: status == RELATION_ERR && isTarget == "mskm")` [JPCModelConstant.RELATION_ERR="1100"] (L429)

> Mskm processing (Mskm処理) branch: validates FTTH service contract registration errors when the check type is Mskm. Error handling rules are similar to Cfm but with distinct error code mappings.

| # | Type | Code |
|---|------|------|
| 1 | IF | `EKK0361D010 == "EKK0361D010" (FTTH-ISP-Reg) && errFlg == "EB" && itemid == "mllist_nm"` (L431) [JFUStrConst.RELATION_CHECK_ERR_EB="EB", MLLIST_NM="mllist_nm"] |

> System-level exception: Mailing list usage restriction error (利用制限エラー). For Mskm processing, this specific error combination maps to error code 0101 (usage restriction). Throw a system business exception.

| # | Type | Code |
|---|------|------|
| 1 | THRW | `throw new JCCBusinessException(JFUStrConst.ERROR_CODE_0101)` // System error — usage restriction [-> ERROR_CODE_0101] |

| # | Type | Code |
|---|------|------|
| 2 | IF-ELSE | `EKK0361D010 == "EKK0361D010" (FTTH-ISP-Reg) && errFlg == "EA" && itemid == "mllist_nm"` (L434) [JFUStrConst.RELATION_CHECK_ERR_EA="EA", MLLIST_NM="mllist_nm"] |

> System-level exception: Mailing list error with flag EA for Mskm processing. Maps to error code 0101 (usage restriction), consistent with the EB case in this branch.

| # | Type | Code |
|---|------|------|
| 1 | THRW | `throw new JCCBusinessException(JFUStrConst.ERROR_CODE_0101)` // System error — usage restriction |

| # | Type | Code |
|---|------|------|
| 3 | IF-ELSE | `EKK0361D010 == "EKK0361D010" (FTTH-ISP-Reg) && errFlg == "EA" && itemid == "upd_dtm_bf"` (L440) [JFUStrConst.RELATION_CHECK_ERR_EA="EA", UPD_DTM_BF="upd_dtm_bf"] |

> System-level exception: Timestamp conflict error (更新不可エラー — update unavailable). Same as Cfm branch — data was modified concurrently.

| # | Type | Code |
|---|------|------|
| 1 | THRW | `throw new JCCBusinessException(JFUStrConst.ERROR_CODE_0204)` // System error — update unavailable |

| # | Type | Code |
|---|------|------|
| 4 | IF-ELSE | `EKK0361D010 == "EKK0361D010" (FTTH-ISP-Reg) && errFlg == "EE" && itemid == "op_svc_cd"` (L446) [JFUStrConst.RELATION_CHECK_ERR_EE="EE", OP_SVC_CD="op_svc_cd"] |

> System-level exception: Contract state error (契約状態エラー — contract state error). Same as Cfm branch.

| # | Type | Code |
|---|------|------|
| 1 | THRW | `throw new JCCBusinessException(JFUStrConst.ERROR_CODE_0102)` // System error — contract state error |

**Block 2** — ELSE (default) (L456)

> Default case: For any exception that doesn't match the above condition combinations (e.g., status is not RELATION_ERR, or isTarget has an unexpected value), throw a generic system error with error code 0002. This ensures all exceptions are handled — none silently pass through.

| # | Type | Code |
|---|------|------|
| 1 | THRW | `throw new JCCBusinessException(JFUStrConst.ERROR_CODE_0002)` // Default system error [-> ERROR_CODE_0002] |

## 7. Glossary

| Term | Type | Business Meaning |
|------|------|------------------|
| `checkException` | Method | Exception classification and routing handler — determines which exception type to propagate based on error metadata |
| `isTarget` | Parameter | Check-type discriminator — `"cfm"` for correlation check (関連チェック), `"mskm"` for Mskm processing (Mskm処理) |
| `cfm` | Constant | Correlation check mode (関連チェック) — validates relationships between service items (e.g., mailing list, option services) |
| `mskm` | Constant | Mskm processing mode (Mskm処理) — validates Mskm-specific constraints |
| `EKK0361D010` | Constant | Template ID for FTTH Authorization Service Contract ISP Registration (オプションサービス契約<ISP>登録) |
| `EZM0111D010` | Constant | Template ID for Aging Target Registration (エイジング対象登録) |
| `RELATION_ERR` | Constant | Status code `1100` — indicates a relational/correlation error has occurred |
| `MLLIST_NM` | Constant | `"mllist_nm"` — Error item identifier for Mailing List (メーリングリスト) validation |
| `AGING_TG_VALUE` | Constant | `"aging_tg_value"` — Error item identifier for Aging Target Value (エイジング対象値) validation |
| `UPD_DTM_BF` | Constant | `"upd_dtm_bf"` — Error item identifier for Update Date/Time Before (更新年月日時分秒<更新前>) — used for optimistic concurrency check |
| `OP_SVC_CD` | Constant | `"op_svc_cd"` — Error item identifier for Option Service Code (オプションサービスコード) |
| `RELATION_CHECK_ERR_EA` | Constant | Error flag `"EA"` — Related check error type A (various validation failures) |
| `RELATION_CHECK_ERR_EB` | Constant | Error flag `"EB"` — Related check error type B (mailing list specific error) |
| `RELATION_CHECK_ERR_EE` | Constant | Error flag `"EE"` — Related check error type E (contract state related) |
| `JCCBusinessException` | Class | Business exception wrapper — wraps error codes for propagation to the screen layer |
| `ERROR_CODE_0002` | Constant | Default system error code — catch-all for unrecognized error combinations |
| `ERROR_CODE_0101` | Constant | Usage restriction error (利用制限エラー) — customer/service usage restrictions prevent the operation |
| `ERROR_CODE_0102` | Constant | Contract state error (契約状態エラー) — the service contract status is invalid for the requested operation |
| `ERROR_CODE_0204` | Constant | Update unavailable error (更新不可エラー) — data was modified concurrently, update cannot proceed |
| `JCCWebServiceException` | Class | Web service exception — contains structured error metadata (message list, more info) from downstream service calls |
| `X31CMessageResult` | Class | Result container for exception messages — holds the list of message more info entries |
| `X31CMessageMoreInfo` | Class | Detailed message information per error — contains template ID, item ID, status, and error flag |
