# Business Logic — JKKWrisvcAutoAplyGetSvcInfoCC.setSCInputCommonData() [30 LOC]

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

## 1. Role

### JKKWrisvcAutoAplyGetSvcInfoCC.setSCInputCommonData()

This method serves as a shared utility within the Fujitsu Futurity BP (Business Process) framework, responsible for consolidating standard request metadata into a single parameter map for downstream service component consumption. It performs a two-phase data extraction: first pulling core system-level identifiers directly from the `IRequestParameterReadWrite` request object — Telegram ID (a unique request envelope identifier), Use Case ID (the business process context), Operation ID (the specific operation being executed), and Call Type (the service invocation routing discriminator); and second extracting client-facing operational context from a control map, which is a cross-cutting mechanism in the framework used to carry environment and session metadata across service boundaries. The extracted data includes the originating host name (the client or intermediary server that submitted the request), client IP address, originating screen ID (the UI entry point in the web application), and the operator ID (the authenticated user performing the action).

This is a delegation-style utility method with no conditional branching — every invocation produces the same 10-entry enriched parameter map, which is then returned to the caller for further processing. It is designed as a common preparation step, ensuring that all downstream operations have a consistent set of traceability and audit attributes available, regardless of which specific business service is ultimately invoked. The Javadoc describes it in Japanese as "SCインプット共通データ設定処理を行います" (Performs SC input common data setup processing), confirming its role as a shared infrastructure method called during request preparation within the `JKKWrisvcAutoAplyGetSvcInfoCC` class and potentially referenced by similar utility classes across the codebase.

The method is declared `private`, meaning it is an internal helper called exclusively within `JKKWrisvcAutoAplyGetSvcInfoCC`. Its single documented caller is `getSvcInfo()`, the class's main service entry point that handles service contract number retrieval processing ("サービス契約番号取得処理"). By abstracting common parameter population into this dedicated method, the codebase avoids duplication and ensures all request metadata is captured consistently at a single point.

## 2. Processing Pattern (Detailed Business Logic)

```mermaid
flowchart TD
    START(["setSCInputCommonData(param, paramMap)"])

    START --> EXTRACT_SYSTEM["Extract System Identifiers
getTelegramID, getUsecaseID,
getOperationID, getCallType"]
    EXTRACT_SYSTEM --> PUT_SYSTEM["Put 4 entries into paramMap
TRANZACTION_ID_KEY, USECASE_ID_KEY,
OPERATION_ID_KEY, CALL_TYPE_KEY"]

    PUT_SYSTEM --> EXTRACT_CLIENT["Extract Client Context
from Control Map
getControlMapData for hostname,
IP, view ID, operator ID"]
    EXTRACT_CLIENT --> PUT_CLIENT["Put 4 entries into paramMap
CLIENT_HOST_NAME_KEY, CLIENT_IP_ADDRESS_KEY,
INVOKE_GAMEN_ID_KEY, OPERATOR_ID_KEY"]

    PUT_CLIENT --> RETURN["Return enriched paramMap"]
    RETURN --> END(["Next / Caller"])
```

**Processing summary:**

| Step | Action | Data Source | Destination Key (Constant) |
|------|--------|-------------|---------------------------|
| 1 | Extract Telegram ID | `param.getTelegramID()` | `JCMConstants.TRANZACTION_ID_KEY` |
| 2 | Extract Use Case ID | `param.getUsecaseID()` | `JCMConstants.USECASE_ID_KEY` |
| 3 | Extract Operation ID | `param.getOperationID()` | `JCMConstants.OPERATION_ID_KEY` |
| 4 | Extract Call Type | `param.getCallType()` | `JCMConstants.CALL_TYPE_KEY` |
| 5 | Extract Client Host Name | `param.getControlMapData(SCControlMapKeys.REQ_HOSTNAME)` | `JCMConstants.CLIENT_HOST_NAME_KEY` |
| 6 | Extract Client IP Address | `param.getControlMapData(SCControlMapKeys.REQ_HOSTIP)` | `JCMConstants.CLIENT_IP_ADDRESS_KEY` |
| 7 | Extract Client Screen ID | `param.getControlMapData(SCControlMapKeys.REQ_VIEWID)` | `JCMConstants.INVOKE_GAMEN_ID_KEY` |
| 8 | Extract Operator ID | `param.getControlMapData(SCControlMapKeys.OPERATOR_ID)` | `JCMConstants.OPERATOR_ID_KEY` |
| 9 | Return enriched map | — | — |

This method contains no conditional branches, loops, or exception handling beyond the declared `throws RequestParameterException`. Every invocation follows the same linear path: extract 4 system identifiers, extract 4 client context values, populate the parameter map with 8 entries, and return.

## 3. Parameter Analysis

| No | Parameter Name | Type | Business Description |
|----|---------------|------|---------------------|
| 1 | `param` | `IRequestParameterReadWrite` | The incoming request envelope carrying all client-submitted data. This interface provides access to system-level identifiers (`getTelegramID()`, `getUsecaseID()`, `getOperationID()`, `getCallType()`) and a control map for cross-cutting context data (hostname, IP, screen ID, operator ID). It represents the full request payload in the Futurity BP framework. |
| 2 | `paramMap` | `HashMap<String, Object>` | A mutable parameter map that accumulates common input data for downstream service component processing. Initially populated by the caller, this method enriches it with 8 standard metadata entries covering request tracing, client context, and audit trail information. |

**External/Instance state read:** None. This method is purely functional — it only reads from `param` and mutates `paramMap`, with no dependency on instance fields or static state.

## 4. CRUD Operations / Called Services

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

| CRUD | SC / CBS | SC Code | Entity / DB | Operation Description |
|------|----------|---------|-------------|----------------------|
| R | `JKKejbCallTypeChecker.getCallType` | JKKejbCallTypeChecker | - | Calls `getCallType` in `JKKejbCallTypeChecker` — reads call type metadata from the request parameter |
| R | `param.getTelegramID()` | - | - | Extracts the unique request envelope identifier from the incoming request |
| R | `param.getUsecaseID()` | - | - | Extracts the business process context identifier |
| R | `param.getOperationID()` | - | - | Extracts the specific operation identifier being executed |
| R | `param.getCallType()` | - | - | Extracts the service invocation routing discriminator |
| R | `param.getControlMapData(key)` | - | - | Retrieves a value from the control map using a key from `SCControlMapKeys` — called 4 times for hostname, IP, screen ID, and operator ID |

**Classification rationale:**

All operations in this method are **Read (R)** — the method exclusively extracts data from the input `param` object and the control map, then populates the output `paramMap`. No Create, Update, or Delete operations occur. The `paramMap.put()` calls are internal data structure mutations, not database operations.

## 5. Dependency Trace

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

Direct callers found: 1 method.
Terminal operations from this method: read operations on request parameters.

| # | Caller (Screen/Batch) | Call Chain (Full Path to this Method) | Terminal (SC / CRUD / Entity) |
|---|----------------------|--------------------------------------|-------------------------------|
| 1 | — (internal helper) | `JKKWrisvcAutoAplyGetSvcInfoCC.getSvcInfo()` -> `JKKWrisvcAutoAplyGetSvcInfoCC.setSCInputCommonData` | `param.getCallType() [R]` — call type metadata<br>`param.getTelegramID() [R]` — request envelope ID<br>`param.getUsecaseID() [R]` — use case context<br>`param.getOperationID() [R]` — operation ID<br>`param.getControlMapData() [R]` — client context (hostname, IP, view ID, operator ID) |

**Notes:**
- `setSCInputCommonData()` is a `private` method, so it has no callers outside `JKKWrisvcAutoAplyGetSvcInfoCC`.
- Its sole caller is `getSvcInfo()`, which handles service contract number retrieval ("サービス契約番号取得処理"). The enriched `paramMap` containing common request metadata is then consumed by the rest of the service info retrieval flow.
- No screen (KKSV*) or batch entry points are traced within 8 hops of this private method.

## 6. Per-Branch Detail Blocks

This method has no conditional branches or loops. It follows a single linear path.

### Block 1 — LINEAR [system identifier extraction] (L242–L246)

> Extract core system-level identifiers from the request envelope. These values provide request tracing, audit trail, and service routing information required by all downstream operations.

| # | Type | Code | Comment |
|---|------|------|---------|
| 1 | CALL | `param.getTelegramID()` | Extract Telegram ID — unique request envelope identifier |
| 2 | SET | `paramMap.put(JCMConstants.TRANZACTION_ID_KEY, param.getTelegramID())` | Put into paramMap [TRANZACTION_ID_KEY] — Request ID from the header section (電文ID) |
| 3 | CALL | `param.getUsecaseID()` | Extract Use Case ID — business process context |
| 4 | SET | `paramMap.put(JCMConstants.USECASE_ID_KEY, param.getUsecaseID())` | Put into paramMap [USECASE_ID_KEY] — User case identifier |
| 5 | CALL | `param.getOperationID()` | Extract Operation ID — specific operation being executed |
| 6 | SET | `paramMap.put(JCMConstants.OPERATION_ID_KEY, param.getOperationID())` | Put into paramMap [OPERATION_ID_KEY] — Operation identifier |
| 7 | CALL | `param.getCallType()` | Extract Call Type — service invocation routing discriminator |
| 8 | SET | `paramMap.put(JCMConstants.CALL_TYPE_KEY, param.getCallType())` | Put into paramMap [CALL_TYPE_KEY] — Service call type discriminator (サービス呼び出し区分) |

### Block 2 — LINEAR [client context extraction] (L251–L257)

> Extract client-facing operational context from the control map. This section captures network and session metadata about the request origin, enabling auditability and debugging. The Japanese comment indicates this data is sourced from the "User Area (Control Map)" (ユーザーエリア(コントロールマップ)).

| # | Type | Code | Comment |
|---|------|------|---------|
| 1 | CALL | `param.getControlMapData(SCControlMapKeys.REQ_HOSTNAME)` | Extract originating host name (依頼元ホスト名) — client or intermediary server name |
| 2 | SET | `paramMap.put(JCMConstants.CLIENT_HOST_NAME_KEY, param.getControlMapData(SCControlMapKeys.REQ_HOSTNAME))` | Put into paramMap [CLIENT_HOST_NAME_KEY] |
| 3 | CALL | `param.getControlMapData(SCControlMapKeys.REQ_HOSTIP)` | Extract client IP address (依頼元IPアドレス) |
| 4 | SET | `paramMap.put(JCMConstants.CLIENT_IP_ADDRESS_KEY, param.getControlMapData(SCControlMapKeys.REQ_HOSTIP))` | Put into paramMap [CLIENT_IP_ADDRESS_KEY] |
| 5 | CALL | `param.getControlMapData(SCControlMapKeys.REQ_VIEWID)` | Extract originating screen ID (依頼元画面ID) — UI entry point |
| 6 | SET | `paramMap.put(JCMConstants.INVOKE_GAMEN_ID_KEY, param.getControlMapData(SCControlMapKeys.REQ_VIEWID))` | Put into paramMap [INVOKE_GAMEN_ID_KEY] — Invoke screen identifier |
| 7 | CALL | `param.getControlMapData(SCControlMapKeys.OPERATOR_ID)` | Extract operator ID (オペレータID) — authenticated user |
| 8 | SET | `paramMap.put(JCMConstants.OPERATOR_ID_KEY, param.getControlMapData(SCControlMapKeys.OPERATOR_ID))` | Put into paramMap [OPERATOR_ID_KEY] |

### Block 3 — RETURN (L258)

| # | Type | Code | Comment |
|---|------|------|---------|
| 1 | RETURN | `return paramMap;` | Return the enriched parameter map containing 8 common metadata entries for downstream consumption |

## 7. Glossary

| Term | Type | Business Meaning |
|------|------|------------------|
| `TRANZACTION_ID_KEY` | Constant | Request envelope identifier key — uniquely identifies a single request message sent through the system (note: "TRANZACTION" is the spelling used in the constant, distinct from "TRANSACTION") |
| `USECASE_ID_KEY` | Constant | Use case identifier key — identifies the business process context in which the request is being executed |
| `OPERATION_ID_KEY` | Constant | Operation identifier key — identifies the specific operation or action being performed within the use case |
| `CALL_TYPE_KEY` | Constant | Call type key — discriminator used for service invocation routing, determines how the request is processed |
| `CLIENT_HOST_NAME_KEY` | Constant | Client host name key — identifies the originating host/server that submitted the request |
| `CLIENT_IP_ADDRESS_KEY` | Constant | Client IP address key — the IP address of the client submitting the request |
| `INVOKE_GAMEN_ID_KEY` | Constant | Invoke screen ID key — the screen identifier from which the request originated in the web UI |
| `OPERATOR_ID_KEY` | Constant | Operator ID key — the authenticated user who initiated the request |
| `REQ_HOSTNAME` | Constant | Request hostname — key within the control map for the originating host name |
| `REQ_HOSTIP` | Constant | Request host IP — key within the control map for the client IP address |
| `REQ_VIEWID` | Constant | Request view ID — key within the control map for the originating screen ID |
| `SCControlMapKeys` | Class | Service Component Control Map Keys — framework class defining constant keys for cross-cutting context data carried across service boundaries |
| `JCMConstants` | Class | Java Constants Manager — framework class defining standard constant keys used throughout the Futurity BP framework for parameter map entry keys |
| `IRequestParameterReadWrite` | Interface | Request parameter read/write interface — the unified request envelope in the BP framework, providing access to system identifiers and the control map |
| `TelegramID` | Field | Telegram ID — a unique identifier for the entire request message, used for request tracing and correlation |
| `電文ID (Denpun ID)` | Field | Request/Message ID — Japanese term for the message envelope identifier (電文 = telegram/message, ID = identifier) |
| `サービス呼び出し区分 (Service Call Type)` | Field | Service call type discriminator — categorizes the type of service invocation for routing and processing decisions |
| `ユーザーエリア (User Area)` | Field | User area — the section of the control map containing user/environment context data such as hostname, IP, and screen ID |
| `コントロールマップ (Control Map)` | Field | Control map — a framework mechanism for carrying environment and session metadata (hostname, IP, screen ID, operator ID) across service component boundaries |
| `依頼元ホスト名 (Request Source Host Name)` | Field | Originating host name — the server or client that submitted the request |
| `依頼元IPアドレス (Request Source IP Address)` | Field | Originating IP address — the network address of the request source |
| `依頼元画面ID (Request Source Screen ID)` | Field | Originating screen identifier — the web UI screen from which the user initiated the request |
| `SCインプット共通データ設定処理` | Process | SC Input Common Data Setup Processing — the Japanese description of this method's purpose; sets up standard input data shared across service components |
| BP | Acronym | Business Process — refers to the Fujitsu Futurity BP framework for enterprise business process development |
| CC | Acronym | Common Component — a shared utility class within the framework architecture |
| SC | Acronym | Service Component — a modular business logic unit in the Futurity BP architecture |
| CBS | Acronym | CBS — Core Business System; a service component variant that interacts with backend databases |
