---

# Business Logic — JSCSV002601CC.executeTelVlanOrder() [20 LOC]

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

## 1. Role

### JSCSV002601CC.executeTelVlanOrder()

This method serves as a dedicated facade for invoking the **Telephone VLAN Order New Registration Service Component (SC)**. In business terms, when a customer requests a new telephone line installation that requires VLAN (Virtual LAN) configuration in a fiber-to-the-home (FTTH) network deployment, this method prepares and dispatches the request to the downstream CBS (ESC0051D010 — Telephone Service Order Receipt). It implements a **delegation pattern**: gathering the incoming HTTP/soap request parameters and additional call-specific parameters, assembling them into a structured SC parameter map through `JSCTelSvcScParamHenshu.createScParam()`, and then routing the request to the enterprise service bus via `ServiceComponentRequestInvoker.run()`. The method acts as a shared utility within the `JSCSV002601CC` common component class, called by `executeMain()` during the primary screen processing flow. It has no conditional branching — it performs a single, deterministic sequence: parameter preparation, SC invocation, logging, and result return. The method is designed as a private helper, ensuring all telephone VLAN order registrations are routed through a single, auditable entry point into the ESC0051D010 CBS.

## 2. Processing Pattern (Detailed Business Logic)

```mermaid
flowchart TD
    START(["executeTelVlanOrder(params)"])
    STEP1["Set templateId = ESC0051D010<br>(Telephone Service Order Receipt)"]
    STEP2["Call JSCTelSvcScParamHenshu.createScParam()<br>(param, templateId, ESC0021D010CBSMsg.class, paramTelVlanOrd, funcCode=\"1\")]
    STEP3["Build paramMap:<br>- Extract telegramID, usecaseID, operationID, callType<br>- Extract client hostname, IP, view ID, operator ID, operate date/time<br>- Set templateID and funcCode<br>- Blank/null-fill remaining fields"]
    STEP4["Instantiate ServiceComponentRequestInvoker"]
    STEP5["Call scCall.run(paramMap, handle)<br>(Invokes CBS ESC0051D010)"]
    STEP6["Log result via logger.log(DEBUG,<br>\"Telephone VLAN order issuance<br>new registration SC call completed\")"]
    STEP7["Return result Map"]

    START --> STEP1 --> STEP2 --> STEP3 --> STEP4 --> STEP5 --> STEP6 --> STEP7
```

**Processing Description:**

The method follows a linear, straight-through processing pattern with no conditional branches:

1. **Template Setup** — Sets the CBS template ID to `ESC0051D010`, identifying this as the Telephone Service Order Receipt CBS.
2. **Parameter Assembly** — Delegates to `JSCTelSvcScParamHenshu.createScParam()` to transform the raw HTTP request parameters (`IRequestParameterReadWrite`) and additional call-specific parameters (`paramTelVlanOrd`) into a strongly-typed `HashMap<String, Object>` structured for SC consumption. The helper extracts messaging headers (telegram ID, use case ID, operation ID), client context (hostname, IP, view ID, operator ID, operate date/time), and merges the user-provided service data into a `CAANMsg` template with null-blank handling.
3. **SC Invocation** — Instantiates a `ServiceComponentRequestInvoker`, the standard framework gateway for invoking enterprise CBS services, and calls `run()` with the prepared parameter map and session handle.
4. **Logging** — Logs the completion of the SC call at DEBUG level with a Japanese status message (translated: "Telephone VLAN order issuance new registration SC call completed").
5. **Return** — Returns the result map from the SC invocation to the caller.

## 3. Parameter Analysis

| No | Parameter Name | Type | Business Description |
|----|---------------|------|---------------------|
| 1 | `handle` | `SessionHandle` | The current session context object carrying database connection and transaction state. It is passed through to the SC invocation to maintain the same DB session across the service call boundary. |
| 2 | `param` | `IRequestParameterReadWrite` | The incoming HTTP/web request carrying all user input data from the screen. It contains headers (telegram ID, use case ID, operation ID, call type) and control map data (hostname, client IP, view ID, operator ID, operate date/time). Used to build the SC parameter map. |
| 3 | `logger` | `ILogger` | The BPM logging manager instance. Used to log the completion status of the SC invocation at DEBUG level for audit and troubleshooting purposes. |
| 4 | `paramTelVlanOrd` | `Map` | Additional request parameters specifically collected for the telephone VLAN order registration. This map contains the user-entered service data (e.g., service type, work numbers, order codes) that gets merged into the CBS message template during parameter preparation. |

**External State:**
- No instance fields or static state are read by this method. It is fully stateless, relying only on its parameters and the framework-level `ServiceComponentRequestInvoker`.

## 4. CRUD Operations / Called Services

| CRUD | SC / CBS | SC Code | Entity / DB | Operation Description |
|------|----------|---------|-------------|----------------------|
| C | `JSCTelSvcScParamHenshu.createScParam` | - | - | Builds the SC invocation parameter map from request and user data. Prepares a CAANMsg template with the ESC0051D010 CBS message schema, null-blank filling remaining fields. |
| C | `ServiceComponentRequestInvoker.run` | ESC0051D010 | - | Invokes the Telephone Service Order Receipt CBS (ESC0051D010) to register a new telephone VLAN order. The CBS handles the downstream entity creation (telephone service order records, VLAN assignment records) within the enterprise application platform. |

**Classification rationale:**
- `createScParam`: Prepares data for a create operation; it assembles the parameter map that will be consumed by the CBS for order creation. This is a **parameter builder** (C) — it creates the structured data needed for SC invocation.
- `ServiceComponentRequestInvoker.run`: Invokes CBS `ESC0051D010` (Telephone Service Order Receipt), which performs the actual **Create** operation on the telephone service order entities in the database.

## 5. Dependency Trace

| # | Caller (Screen/Batch) | Call Chain (Full Path to this Method) | Terminal (SC / CRUD / Entity) |
|---|----------------------|--------------------------------------|-------------------------------|
| 1 | CC:JSCSV002601CC | `JSCSV002601CC.executeMain()` → `executeTelVlanOrder` | `ServiceComponentRequestInvoker.run [C] ESC0051D010 (Telephone Service Order Receipt)` |

**Notes:**
- No public/screen entry points (KKSV*) directly call this method. It is a private helper method.
- The direct caller `executeMain()` in the same class `JSCSV002601CC` is responsible for orchestrating the overall telephone/VLAN order registration screen processing flow.
- The terminal operation is `ServiceComponentRequestInvoker.run` invoking CBS `ESC0051D010`, which performs the Create (C) of telephone service order records.

## 6. Per-Branch Detail Blocks

This method has no conditional branches (if/else, switch/case, loops). The entire body is a single linear block.

**Block 1** — [LINEAR] `(straight-through processing)` (L166–L174)

> Sets the CBS template ID, assembles SC parameters, invokes the Service Component, logs completion, and returns the result.

| # | Type | Code |
|---|------|------|
| 1 | SET | `String templateId = "ESC0051D010"` // CBS template ID for Telephone Service Order Receipt (電話用ＶＬＡＮオーダ発行) [-> templateId="ESC0051D010"] |
| 2 | CALL | `JSCTelSvcScParamHenshu.createScParam(param, templateId, ESC0021D010CBSMsg.class, paramTelVlanOrd, "1")` // Builds the SC invocation parameter map; funcCode="1" [-> funcCode="1"] |
| 3 | SET | `HashMap<String, Object> paramMap = JSCTelSvcScParamHenshu.createScParam(...)` // Contains: telegramID, usecaseID, operationID, callType, client hostname/IP/viewID, operatorID, operateDate/time, templates[] |
| 4 | EXEC | `new ServiceComponentRequestInvoker()` // Instantiates the SC invocation gateway |
| 5 | CALL | `scCall.run(paramMap, handle)` // Invokes CBS ESC0051D010 (Telephone Service Order Receipt) with the prepared parameters and session handle |
| 6 | SET | `Map<?, ?> result = scCall.run(paramMap, handle)` // Captures the SC execution result |
| 7 | EXEC | `logger.log(BasicLevel.DEBUG, "電話用ＶＬＡＮオーダ発行新規登録SC呼び出し完了" + result)` // Logs completion status (English: "Telephone VLAN order issuance new registration SC call completed") |
| 8 | RETURN | `return result` // Returns the SC execution result to the caller |

## 7. Glossary

| Term | Type | Business Meaning |
|------|------|------------------|
| ESC0051D010 | CBS ID | Telephone Service Order Receipt — the enterprise CBS that handles telephone service order registration and receipt processing |
| ESC0021D010CBSMsg | Message Class | CBS message schema class defining the structure of the ESC0051D010 CBS input/output message fields |
| Vlan | Business term | Virtual Local Area Network — a network segmentation technology used in FTTH deployments to isolate customer traffic |
|Telephone Order | Business term | A customer request to register a new telephone line with VLAN configuration in the NTT FTTH network |
| templateId | Field | CBS template identifier — routes the SC invocation to the correct CBS program (ESC0051D010) |
| funcCode | Field | Function code passed to the CBS; "1" indicates a new registration operation (新規登録) |
| CAANMsg | Framework class | Fujitsu's Common Application Application Network message class used to structure CBS input/output data |
| ServiceComponentRequestInvoker | Framework class | Enterprise framework class that invokes CBS services through the service bus with session context |
| paramTelVlanOrd | Field | Telephone VLAN order-specific parameters map — contains user-entered data specific to telephone service registration |
| SessionHandle | Framework class | Session management object carrying DB connection, transaction, and security context across service boundaries |
| IRequestParameterReadWrite | Interface | Request parameter interface providing access to HTTP headers (telegram ID, use case ID) and control map data (client info, operator info) |
| new registration (新規登録) | Business term | The operation of creating a brand new service order record, as opposed to modifying or cancelling an existing one |

---
