---
title: "Business Logic — JKKAdchgVLanGetCC.checkSvcKeiKaisenUcwk() [28 LOC]"
tags:
  - dd
  - JKKAdchgVLanGetCC
  - checkSvcKeiKaisenUcwk
  - VLAN
  - CommonComponent
---

# Business Logic — JKKAdchgVLanGetCC.checkSvcKeiKaisenUcwk() [28 LOC]

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

## 1. Role

### JKKAdchgVLanGetCC.checkSvcKeiKaisenUcwk()

This method performs a VLAN-ID existence check on the service contract line details for a customer's move destination (転居先 — tenkyosaki) as part of the post-move (住所変更 — juusho henkou) data processing workflow in the K-Opticom customer backbone system. When a customer moves, their service lines are carried over to the new address; this method verifies whether a VLAN-ID (Virtual Local Area Network Identifier, used to segment fiber-optic services) has already been assigned to the relevant service contract line item (サービス契約回線内訳 — service kei naiyou). It implements a guard-check pattern: the caller (`execute`) invokes this method early in its processing pipeline and, if the VLAN-ID is already present (`true`), it short-circuits further VLAN-ID generation logic. The method follows a delegate-and-read design: it builds a query condition using the service detail work number (`svc_kei_kaisen_ucwk_no`), dispatches it via the S-IF (Service Interface) through `EKK0251A010` (Service Contract Line Details Consent Form / Care Display), and evaluates the `vlan_id_fix_flg` (VLAN-ID fixed flag) field returned in the result to determine assignment status. This is a shared utility method, called exclusively by the `execute()` entry point within `JKKAdchgVLanGetCC`, which handles VLAN-ID retrieval for move-related service changes.

## 2. Processing Pattern (Detailed Business Logic)

```mermaid
flowchart TD
    START(["checkSvcKeiKaisenUcwk"])
    STEP1["Get JKKAdchgMapperCC instance"]
    STEP2["Create ServiceComponentRequestInvoker"]
    STEP3["Build condMap with svc_kei_kaisen_ucwk_no"]
    STEP4["Call mapper.setEKK0251A010"]
    STEP5["scCall.run S-IF EKK0251A010"]
    STEP6["mapper.getEKK0251A010"]
    STEP7["mapper.scResultCheck"]
    COND1{kk0251Map null?}
    COND2{VLAN_ID_FIX_FLG equals 1?}
    TRUE1["Return true - VLAN-ID set"]
    FALSE1["Return false - VLAN-ID not set"]
    END_NODE(["End"])

    START --> STEP1 --> STEP2 --> STEP3 --> STEP4 --> STEP5 --> STEP6 --> STEP7 --> COND1
    COND1 -- No --> COND2
    COND1 -- Yes --> FALSE1
    COND2 -- VLAN_ID_FIX_FLG_ZUMI --> TRUE1
    COND2 -- Other --> FALSE1
    TRUE1 --> END_NODE
    FALSE1 --> END_NODE
```

**CRITICAL — Constant Resolution:**
- `VLAN_ID_FIX_FLG_ZUMI = "1"` — VLAN-ID already set (既定済み). When the `vlan_id_fix_flg` field returned by `EKK0251A010` equals `"1"`, the VLAN-ID is confirmed as assigned.

## 3. Parameter Analysis

| No | Parameter Name | Type | Business Description |
|----|---------------|------|---------------------|
| 1 | `paramMap` | `HashMap<String, Object>` | Business parameters carried from the `execute()` caller, containing move destination service contract details. Specifically expected to include `svc_kei_kaisen_ucwk_no` (service detail work number), which serves as the primary key to look up the service contract line details record. The method extracts this value to build the query condition for the S-IF call. |
| - | `keepSesHandle` (instance field) | `ThreadLocal<SessionHandle>` | Session handle containing transaction and session management context. Set by the caller `execute()` method. Used as the connection context for the S-IF invocation. |
| - | `keepReqParam` (instance field) | `ThreadLocal<IRequestParameterReadWrite>` | Request parameter object set by the caller `execute()` method. Passed to `setEKK0251A010()` and `getEKK0251A010()` as the request payload and to `scResultCheck()` for result validation. |
| - | `keepFixedText` (instance field) | `ThreadLocal<String>` | Fixed arbitrary text (custom user labels) set by the caller `execute()` method. Passed to `setEKK0251A010()` and `getEKK0251A010()` for message mapping. |

## 4. CRUD Operations / Called Services

| CRUD | SC / CBS | SC Code | Entity / DB | Operation Description |
|------|----------|---------|-------------|----------------------|
| R | `JKKAdchgMapperCC.getInstance` | JKKAdchgMapperCC | - | Gets the singleton mapper instance for service contract data mapping |
| R | `ServiceComponentRequestInvoker.<init>` | - | - | Creates the S-IF (Service Interface) invoker for remote service component calls |
| R | `JKKAdchgMapperCC.setEKK0251A010` | EKK0251A010SC | KK_T_OPSVKEI_ISP (Service Contract Line Details) | Maps condition parameters into the S-IF request structure for the service contract line details consent form (care display). Reads `svc_kei_kaisen_ucwk_no` from condMap. |
| R | `ServiceComponentRequestInvoker.run` | EKK0251A010 | KK_T_OPSVKEI_ISP | Invokes the S-IF interface to query service contract line details (care display / カレント取得) for the given condition. The S-IF code is EKK0251A010. |
| R | `JKKAdchgMapperCC.getEKK0251A010` | EKK0251A010SC | KK_T_OPSVKEI_ISP | Extracts the S-IF response data into a HashMap (`kk0251Map`), mapping fields including `vlan_id_fix_flg` (VLAN-ID fixed flag). |
| R | `JKKAdchgMapperCC.scResultCheck` | EKK0251A010SC | - | Validates the S-IF call result and checks for errors in the request parameter object. Throws if the result is abnormal. |

## 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: `scResultCheck` [-], `getEKK0251A010` [R], `setEKK0251A010` [-], `run` [-], `getInstance` [R]

| # | Caller (Screen/Batch) | Call Chain (Full Path to this Method) | Terminal (SC / CRUD / Entity) |
|---|----------------------|--------------------------------------|-------------------------------|
| 1 | CC:JKKAdchgVLanGetCC | `JKKAdchgVLanGetCC.execute(handle, param, fixedText)` → `checkSvcKeiKaisenUcwk(paramMap)` | `scResultCheck` [R], `getEKK0251A010` [R], `setEKK0251A010` [R], `run` [R] |

**Context:** The `execute()` method in `JKKAdchgVLanGetCC` is the public entry point. It stores session handle, request parameters, and fixed text into `ThreadLocal` fields, then calls `checkSvcKeiKaisenUcwk(paramMap)` to verify if the VLAN-ID is already assigned to the move destination service contract line. If `true`, processing is short-circuited. If `false`, the method continues to check the work order status (`checkKojiAnkenStatus`) and potentially generates a VLAN-ID through a separate process (ESC0021D010 — Ethernet VLAN order receipt).

## 6. Per-Branch Detail Blocks

**Block 1** — [SET] `(L164)` Retrieve mapper instance

| # | Type | Code |
|---|------|------|
| 1 | SET | `mapper = JKKAdchgMapperCC.getInstance()` // Get singleton mapper instance [-> JKKAdchgMapperCC] |

**Block 2** — [SET] `(L167)` Create S-IF invoker

| # | Type | Code |
|---|------|------|
| 1 | SET | `scCall = new ServiceComponentRequestInvoker()` // SC request invoker for S-IF calls [-> com.fujitsu.futurity.bp.x21.bpm.ServiceComponentRequestInvoker] |

**Block 3** — [SET] `(L170-172)` Build query condition map

| # | Type | Code |
|---|------|------|
| 1 | SET | `condMap = new HashMap<String, String>()` // Empty condition map for S-IF query |
| 2 | SET | `condMap.put(JKKAdchgMapperCC.COND_KEY_SVC_KEI_KAIS_UCWK_NO, (String)paramMap.get("svc_kei_kaisen_ucwk_no"))` // Set service detail work number as lookup key [-> maps svc_kei_kaisen_ucwk_no to condition key] |

> Business description: Constructs the query condition to look up the service contract line details record. The key field `svc_kei_kaisen_ucwk_no` (service detail work number) uniquely identifies the service contract line item for the move destination.

**Block 4** — [CALL] `(L175)` Build S-IF request

| # | Type | Code |
|---|------|------|
| 1 | CALL | `reqMap = mapper.setEKK0251A010(keepReqParam.get(), keepFixedText.get(), condMap)` // Map condition into S-IF request structure [-> EKK0251A010SC] |

> Business description: The mapper converts the simple condition map into the full S-IF request parameter structure expected by the `EKK0251A010` service component. This includes service contract line details consent form (care display / カレント取得) data mapping with fixed text localization.

**Block 5** — [CALL] `(L176)` Invoke S-IF

| # | Type | Code |
|---|------|------|
| 1 | CALL | `resMap = scCall.run(reqMap, keepSesHandle.get())` // Execute S-IF EKK0251A010 call [-> EKK0251A010, Entity: KK_T_OPSVKEI_ISP] |

> Business description: Dispatches the S-IF request to the backend service component `EKK0251A010` (Service Contract Line Details Consent Form / Care Display). This reads the service contract line details record from the database table `KK_T_OPSVKEI_ISP` (service contract line details) using the condition provided.

**Block 6** — [CALL] `(L177)` Extract response

| # | Type | Code |
|---|------|------|
| 1 | CALL | `kk0251Map = mapper.getEKK0251A010(keepReqParam.get(), keepFixedText.get(), resMap)` // Map S-IF response to HashMap [-> EKK0251A010SC] |

> Business description: Extracts the S-IF response data into a HashMap. The result includes fields such as `tel_vlan_id` (telephone VLAN-ID), `vlan_id_fix_flg` (VLAN-ID fixed flag), and `vlan_id_fix_flg_nm` (VLAN-ID fixed flag name).

**Block 7** — [CALL] `(L178)` Validate result

| # | Type | Code |
|---|------|------|
| 1 | CALL | `mapper.scResultCheck(keepReqParam.get())` // Check S-IF call result for errors [-> EKK0251A010SC] |

> Business description: Validates the S-IF call result. If an error occurred during the service component call, this method throws an exception, preventing further processing.

**Block 8** — [IF] `(kk0251Map != null)` `(L181)` Result map null check

| # | Type | Code |
|---|------|------|
| 1 | SET | `kk0251Map` — Extracted service contract line details from S-IF response [-> EKK0251A010 response map] |

> Business description: Verifies that the S-IF response returned a non-null map. If null, it means no matching service contract line details record was found, and the VLAN-ID is considered not set.

**Block 8.1** — [IF] `VLAN_ID_FIX_FLG_ZUMI.equals(kk0251Map.get(EKK0251A010CBSMsg1List.VLAN_ID_FIX_FLG))` `(L182)` VLAN-ID fixed flag check [CONSTANT: `VLAN_ID_FIX_FLG_ZUMI = "1"`]

| # | Type | Code |
|---|------|------|
| 1 | COND | `VLAN_ID_FIX_FLG_ZUMI.equals(kk0251Map.get(EKK0251A010CBSMsg1List.VLAN_ID_FIX_FLG))` // Check if vlan_id_fix_flg equals "1" [-> "1" = VLAN-ID already set (既定済み)] |
| 2 | RETURN | `return true` // VLAN-ID is already assigned — skip VLAN-ID generation [-> VLAN-ID設定済み] |

> Business description: Compares the `vlan_id_fix_flg` field from the S-IF response against the constant `VLAN_ID_FIX_FLG_ZUMI = "1"`. If the flag is set, it means a VLAN-ID has already been determined for this service contract line item, and no further action is needed. The method returns `true` to indicate the VLAN-ID is already present.

**Block 8.2** — [ELSE] `(L187)` Default branch when map is null or flag does not match

| # | Type | Code |
|---|------|------|
| 1 | RETURN | `return false` // VLAN-ID is not set — VLAN-ID generation is required [-> 未設定] |

> Business description: When the result map is null (no matching record) or the `vlan_id_fix_flg` is not `"1"` (VLAN-ID not yet fixed), the method returns `false`. This signals to the caller that a VLAN-ID needs to be generated via a separate process (ESC0021D010 — Ethernet VLAN order).

## 7. Glossary

| Term | Type | Business Meaning |
|------|------|------------------|
| `svc_kei_kaisen_ucwk_no` | Field | Service detail work number — internal tracking ID for service contract line items during move/change processing. Used as the primary lookup key to retrieve the service contract line details record. |
| `vlan_id_fix_flg` | Field | VLAN-ID fixed flag — indicates whether a VLAN-ID has been assigned. Value `"1"` (VLAN_ID_FIX_FLG_ZUMI) means the VLAN-ID is already set and confirmed. Other values or null means not yet assigned. |
| `COND_KEY_SVC_KEI_KAIS_UCWK_NO` | Constant | Condition key constant used to specify the service detail work number in S-IF query conditions. |
| VLAN | Acronym | Virtual Local Area Network — a networking technology that segments a physical network into isolated logical broadcast domains. In K-Opticom's fiber services, VLAN-IDs identify individual customer connections on shared infrastructure. |
| VLAN-ID | Business term | The unique VLAN identifier assigned to a service contract line. Used to distinguish customer traffic on shared fiber infrastructure. |
| S-IF | Acronym | Service Interface — the remote service component invocation layer used to call backend CBS (Business Common Service) components. |
| EKK0251A010 | SC Code | Service Component for Service Contract Line Details Consent Form (Care Display) — retrieves service contract line item details including VLAN configuration data. |
| EKK0251A010CBSMsg1List | Class | Message list constant class defining field names for the EKK0251A010 S-IF interface, including `VLAN_ID_FIX_FLG` (VLAN-ID fixed flag field name key). |
| KK_T_OPSVKEI_ISP | DB Table | Service Contract Line Details table — stores service contract line item records including VLAN-ID assignments for each service line. |
| ServiceComponentRequestInvoker | Class | S-IF invoker class that dispatches requests to backend service components and returns response maps. |
| JKKAdchgMapperCC | Class | Mapper common component for service contract change operations — maps between raw S-IF requests/responses and HashMap structures. |
| JKKAdchgVLanGetCC | Class | VLAN-ID retrieval common component for move (住所変更) processing — responsible for checking and generating VLAN-IDs during customer move operations. |
| execute() | Method | Public entry point of `JKKAdchgVLanGetCC`. Stores session/context in ThreadLocal fields, then calls `checkSvcKeiKaisenUcwk()` and `checkKojiAnkenStatus()` to determine VLAN-ID generation needs. |
| 転居先 (tenkyosaki) | Japanese term | Move destination — the new address a customer is relocating to. Service lines are carried over from the old address to this new location. |
| サービス契約回線内訳 (service kei naiyou) | Japanese term | Service contract line details — the breakdown of individual service lines within a customer's service contract. |
| カレント取得 (carento shutoku) | Japanese term | Current status acquisition — the process of retrieving the latest/current state of service contract data. |
| 既定済み (kitei zumi) | Japanese term | Already determined/set — indicates that a VLAN-ID has been finalized and assigned for a service line. |
| ThreadLocal | Technical term | Java thread-scoped storage used to hold session handle, request parameters, and fixed text across the `execute()` and `checkSvcKeiKaisenUcwk()` method calls within the same thread. |
| ESC0021D010 | CBS Code | Ethernet VLAN order receipt CBS — the backend service that generates/assigns VLAN-IDs when needed. Called as an alternative path when `checkSvcKeiKaisenUcwk()` returns `false`. |
| 住所変更 (juusho henkou) | Japanese term | Address change — the business process of moving a customer's service from one address to another. |
