# Business Logic — JKKAdchgCancelHakkoSODCC.editInMsg_EKK1551D010CBS() [326 LOC]

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

## 1. Role

### JKKAdchgCancelHakkoSODCC.editInMsg_EKK1551D010CBS()

This method performs **upper (outbound) data mapping** for the Order Information Creation Work Registration process. Its business purpose is to transform incoming order work registration data from the request parameter into a structured `CAANMsg` message that the Fujitsu Futurity service component framework expects to invoke the CBS (Business Service) `EKK1551D010CBS`. Specifically, it reads order data from a user work map (`HakkoSODCCWORK`), extracts all relevant order and service contract identifiers along with their timestamps, and maps them onto the target message template for the "Order Information Creation Work Registration" service component.

The method implements the **builder pattern**: it progressively constructs a `HashMap` payload (`paramMap`) by gathering system-level metadata (transaction ID, use case ID, call type, hostname, IP, operator ID), then builds a `CAANMsg` template instance, and finally populates every field on the template from the incoming work map. It delegates common template setup to the `editBasicCmn` helper method.

This is a **shared utility method** called by the `executeOdrInfoSakseiWkAdd` method across multiple order-creation classes (`JKKAdchgCancelHakkoSODCC`, `JKKAdchgHakkoSODCC`, `JKKHakkoSODCC`, `JKKKikiDslAddCC`). It serves as the single transformation point between the screen/work map data model and the service component invocation contract, ensuring all required order and service contract fields are correctly mapped before the CBS is executed.

The method handles a comprehensive set of **order information fields**, including the order release condition number, order content code, service contract number and registration timestamp, sub-service contract details, device-provided service contract information, optional service contract numbers (operation, sub-operation, billing option), additional information contracts, pre-change timestamps for rollback tracking, device option contracts (for route function and VA features), and phone number. Each field is conditionally set: if the source data is absent, null, or an empty string, the corresponding template field is set to null; otherwise the value is mapped directly.

## 2. Processing Pattern (Detailed Business Logic)

```mermaid
flowchart TD
    START(["editInMsg_EKK1551D010CBS(params)"])
    START --> STEP1["Set template_id = EKK1551D010"]
    STEP1 --> STEP2["Create paramMap HashMap"]
    STEP2 --> STEP3["Put SC import common data: transaction ID, use case ID, operation ID, call type"]
    STEP3 --> STEP4["Put user data: hostname, IP, view ID, operator ID"]
    STEP4 --> STEP5["Create CAANMsg template EKK1551D010CBS"]
    STEP5 --> STEP6["Set template ID and function code FUNC_CD_1 on template"]
    STEP6 --> STEP7["Call editBasicCmn to setup common fields"]
    STEP7 --> STEP8["Get inMap from param.getData(HAKKOSODCCWORK)"]
    STEP8 --> MAPCHECK["inMap == null || value is null/empty?"]
    MAPCHECK -->|yes - null or empty| SET_NULL_1["template.setNull(ODR_HAKKO_JOKEN_NO)"]
    MAPCHECK -->|no - has value| SET_VAL_1["template.set(ODR_HAKKO_JOKEN_NO, inMap value)"]
    SET_NULL_1 --> NEXT_1["Continue to next field"]
    SET_VAL_1 --> NEXT_1
    NEXT_1 --> FIELDS["Map remaining fields iteratively:"]
    FIELDS --> F_ODR_NAIYO["ODR_NAIYO_CD"]
    FIELDS --> F_SVC_KEI["SVC_KEI_NO"]
    FIELDS --> F_SVKEI_GADTM["SVKEI_GADTM"]
    FIELDS --> F_SVC_UWK["SVC_KEI_UCWK_NO"]
    FIELDS --> F_SVKEI_UW["SVKEIUW_GADTM"]
    FIELDS --> F_KKTK["KKTK_SVC_KEI_NO"]
    FIELDS --> F_KKTSVKEI["KKTSVKEI_GADTM"]
    FIELDS --> F_OP["OP_SVC_KEI_NO"]
    FIELDS --> F_OPSVKEI["OPSVKEI_GADTM"]
    FIELDS --> F_SBOP["SBOP_SVC_KEI_NO"]
    FIELDS --> F_SBOPSVKEI["SBOPSVKEI_GADTM"]
    FIELDS --> F_SEIOP["SEIOPSVC_KEI_NO"]
    FIELDS --> F_SEIOPSVKEI["SEIOPSVKEI_GADTM"]
    FIELDS --> F_HUKA["HUKA_INF_KEI_NO"]
    FIELDS --> F_HUKA_GADTM["HUKA_INF_KEI_GADTM"]
    FIELDS --> F_CHBF_SVKEI["CHBF_SVKEI_GADTM"]
    FIELDS --> F_CHBF_SVKEIUW["CHBF_SVKEIUW_GADTM"]
    FIELDS --> F_CHBF_KKTK["CHBF_KKTSVKEI_GADTM"]
    FIELDS --> F_CHBF_OP["CHBF_OPSVKEI_GADTM"]
    FIELDS --> F_CHBF_SBOP["CHBF_SBOPSVKEI_GADTM"]
    FIELDS --> F_CHBF_SEIOP["CHBF_SEIOPSVKEI_GADTM"]
    FIELDS --> F_KKOP_1["KKOP_SVC_KEI_NO_1 (route function)"]
    FIELDS --> F_KKO_1["KKOSVKEI_GADTM_1 (route function)"]
    FIELDS --> F_KKOP_2["KKOP_SVC_KEI_NO_2 (VA)"]
    FIELDS --> F_KKO_2["KKOSVKEI_GADTM_2 (VA)"]
    FIELDS --> F_TELNO["TELNO (phone number)"]
    FIELDS --> ARRANGE["Create CAANMsg array templates[0]"]
    ARRANGE --> PUT_ARR["Put template array into paramMap"]
    PUT_ARR --> RETURN["Return paramMap"]
```

**CRITICAL — Constant Resolution:**

| Constant | Resolved Value | Business Meaning |
|----------|---------------|-----------------|
| `HAKKOSODCCWORK` | `"HakkoSODCCWORK"` | The control map key for the order release (order creation) work registration data map |
| `FUNC_CD_1` | `"1"` | Function code for Check & Register — indicates this operation performs both validation and data registration |
| `template_id` | `"EKK1551D010"` | The message template ID for the Order Information Creation Work Registration CBS |

The method performs **sequential field mapping** using an if-else pattern for each field. There are no switch/case or loop-based iterations — each of the 25+ fields is handled as an individual conditional block checking `inMap == null || inMap.get(fieldName) == null || "".equals(value)`.

## 3. Parameter Analysis

| No | Parameter Name | Type | Business Description |
|----|---------------|------|---------------------|
| 1 | `param` | `IRequestParameterReadOnly` | The business data acquisition interface carrying all input context. It provides the Telegram ID, use case ID, operation ID, call type, control map data (hostname, IP, view ID, operator ID), and the work registration data map (`HakkoSODCCWORK`) that contains the order information fields to be mapped. |

**Instance fields / external state used:**

| Name | Type | Business Description |
|------|------|---------------------|
| (none directly) | — | This method does not read any instance-level fields. All state comes from the `param` argument and local variables. |

## 4. CRUD Operations / Called Services

| CRUD | SC / CBS | SC Code | Entity / DB | Operation Description |
|------|----------|---------|-------------|----------------------|
| U | `editBasicCmn` | — | — | Sets up common template fields (basic shared settings) on the CAANMsg template instance |
| - | `EKK1551D010CBSMsg.set` | EKK1551D010CBS | — | Sets individual message fields on the CAANMsg template (field mapping to outbound message) |
| - | `EKK1551D010CBSMsg.setNull` | EKK1551D010CBS | — | Sets null values for fields that are absent, null, or empty in the source work map |
| - | `EKK1551D010CBSMsg` constructor | EKK1551D010CBS | — | Creates the CAANMsg template instance for the EKK1551D010CBS service component |

**How to classify:**
- `editBasicCmn` is classified as **U** (Update) as it configures/sets common template fields
- All `template.set()` calls are classified as **-** (not direct CRUD) — they populate a message template
- All `template.setNull()` calls are classified as **-** (not direct CRUD) — they handle missing data

This method is a pure **data mapper** — it does not directly read or write any database tables or invoke service components. It constructs the input message that will be consumed by the CBS `EKK1551D010CBS` (Order Information Creation Work Registration) when the caller (`executeOdrInfoSakseiWkAdd`) passes the returned `paramMap` to the `ServiceComponentRequestInvoker`. The actual CRUD operations occur inside the CBS, not within this method.

## 5. Dependency Trace

### Direct Callers

| # | Caller (Screen/Batch) | Call Chain (Full Path to this Method) | Terminal (SC / CRUD / Entity) |
|---|----------------------|--------------------------------------|-------------------------------|
| 1 | `JKKAdchgCancelHakkoSODCC` (CC) | `executeOdrInfoSakseiWkAdd` -> `editInMsg_EKK1551D010CBS` | `EKK1551D010CBS [service call] Order Info Creation Work` |
| 2 | `JKKAdchgHakkoSODCC` (CC) | `executeOdrInfoSakseiWkAdd` -> `editInMsg_EKK1551D010CBS` | `EKK1551D010CBS [service call] Order Info Creation Work` |
| 3 | `JKKHakkoSODCC` (CC) | `executeOdrInfoSakseiWkAdd` -> `editInMsg_EKK1551D010CBS` | `EKK1551D010CBS [service call] Order Info Creation Work` |
| 4 | `JKKKikiDslAddCC` (CC) | `executeOdrInfoSakseiWkAdd` -> `editInMsg_EKK1551D010CBS` | `EKK1551D010CBS [service call] Order Info Creation Work` |

All callers route through the same method `executeOdrInfoSakseiWkAdd` which:
1. Calls `editInMsg_EKK1551D010CBS` to build the inbound message (`paramMap`)
2. Creates a `ServiceComponentRequestInvoker` instance
3. Invokes the CBS `EKK1551D010CBS` via `scCall.run(paramMap, handle)`
4. Calls the reverse mapper `editResultRP_EKK1551D010CBS` to process the response

This confirms the method's role as a **shared outbound data mapper** reused across multiple order-creation context components for the same service component.

## 6. Per-Branch Detail Blocks

**Block 1** — SET (L12166)

> Initialize local variables.

| # | Type | Code |
|---|------|------|
| 1 | SET | `template_id = "EKK1551D010"` | // Template ID for the CBS [-> constant value] |
| 2 | SET | `paramMap = new HashMap<String, Object>()` | // Create output payload map |

**Block 2** — EXEC (L12173–12176)

> Set SC import common data fields extracted from the request parameter's built-in metadata.

| # | Type | Code |
|---|------|------|
| 1 | EXEC | `paramMap.put(JCMConstants.TRANZACTION_ID_KEY, param.getTelegramID())` | // Transaction ID [from telegram ID] |
| 2 | EXEC | `paramMap.put(JCMConstants.USECASE_ID_KEY, param.getUsecaseID())` | // Use case ID |
| 3 | EXEC | `paramMap.put(JCMConstants.OPERATION_ID_KEY, param.getOperationID())` | // Operation ID |
| 4 | EXEC | `paramMap.put(JCMConstants.CALL_TYPE_KEY, param.getCallType())` | // Service call type discriminator |

**Block 3** — EXEC (L12182–12189)

> Set user data fields from the control map for audit and routing purposes.

| # | Type | Code |
|---|------|------|
| 1 | EXEC | `paramMap.put(JCMConstants.CLIENT_HOST_NAME_KEY, param.getControlMapData(SCControlMapKeys.REQ_HOSTNAME))` | // Requestor hostname |
| 2 | EXEC | `paramMap.put(JCMConstants.CLIENT_IP_ADDRESS_KEY, param.getControlMapData(SCControlMapKeys.REQ_HOSTIP))` | // Requestor IP address |
| 3 | EXEC | `paramMap.put(JCMConstants.INVOKE_GAMEN_ID_KEY, param.getControlMapData(SCControlMapKeys.REQ_VIEWID))` | // Requestor screen ID [-> GAMEN] |
| 4 | EXEC | `paramMap.put(JCMConstants.OPERATOR_ID_KEY, param.getControlMapData(SCControlMapKeys.OPERATOR_ID))` | // Operator ID |

**Block 4** — SET (L12191–12203)

> Create the CAANMsg template instance and set the basic template metadata.

| # | Type | Code |
|---|------|------|
| 1 | SET | `template = new CAANMsg(EKK1551D010CBSMsg.class.getName())` | // Create message for EKK1551D010CBS |
| 2 | SET | `inMap = null` | // Initialize work map reference |
| 3 | EXEC | `template.set(EKK1551D010CBSMsg.TEMPLATEID, template_id)` | // Set template ID on message |
| 4 | EXEC | `template.set(EKK1551D010CBSMsg.FUNC_CODE, JPCModelConstant.FUNC_CD_1)` | // Function code Check & Register [-> "1"] |
| 5 | CALL | `editBasicCmn(param, template)` | // Configure common template fields |

**Block 5** — EXEC (L12205–12206)

> Extract the work registration data map from the request parameter.

| # | Type | Code |
|---|------|------|
| 1 | SET | `inMap = (HashMap)param.getData(JKKHakkoSODConstCC.HAKKOSODCCWORK)` | // Get HakkoSODCCWORK map [-> "HakkoSODCCWORK"] |

**Block 6** — IF-ELSE (null check) for `odr_hakko_joken_no` (L12208–12216)

> Map order release condition number — the order release condition sequence number. If absent, set null.

| # | Type | Code |
|---|------|------|
| 1 | IF | `inMap == null \|\| inMap.get("odr_hakko_joken_no") == null \|\| "".equals(inMap.get("odr_hakko_joken_no"))` | // [-> ODR_HAKKO_JOKEN_NO] |
| 1.1 | SET | `template.setNull(EKK1551D010CBSMsg.ODR_HAKKO_JOKEN_NO)` | // Set null when source absent |
| 1.2 | SET | `template.set(EKK1551D010CBSMsg.ODR_HAKKO_JOKEN_NO, (String)inMap.get("odr_hakko_joken_no"))` | // Copy value from work map |

**Block 7** — IF-ELSE (null check) for `odr_naiyo_cd` (L12218–12226)

> Map order content code — classifies the order type (e.g., FTTH registration, mail change, line cancellation). If absent, set null.

| # | Type | Code |
|---|------|------|
| 1 | IF | `inMap == null \|\| inMap.get("odr_naiyo_cd") == null \|\| "".equals(inMap.get("odr_naiyo_cd"))` | // [-> ODR_NAIYO_CD] |
| 1.1 | SET | `template.setNull(EKK1551D010CBSMsg.ODR_NAIYO_CD)` | // Set null when source absent |
| 1.2 | SET | `template.set(EKK1551D010CBSMsg.ODR_NAIYO_CD, (String)inMap.get("odr_naiyo_cd"))` | // Copy value from work map |

**Block 8** — IF-ELSE (null check) for `svc_kei_no` (L12228–12236)

> Map service contract number — the primary service contract identifier. If absent, set null.

| # | Type | Code |
|---|------|------|
| 1 | IF | `inMap == null \|\| inMap.get("svc_kei_no") == null \|\| "".equals(inMap.get("svc_kei_no"))` | // [-> SVC_KEI_NO] |
| 1.1 | SET | `template.setNull(EKK1551D010CBSMsg.SVC_KEI_NO)` | // Set null when source absent |
| 1.2 | SET | `template.set(EKK1551D010CBSMsg.SVC_KEI_NO, (String)inMap.get("svc_kei_no"))` | // Copy value from work map |

**Block 9** — IF-ELSE (null check) for `svkei_gadtm` (L12238–12246)

> Map service contract registration datetime — the timestamp when the service contract was registered. If absent, set null.

| # | Type | Code |
|---|------|------|
| 1 | IF | `inMap == null \|\| inMap.get("svkei_gadtm") == null \|\| "".equals(inMap.get("svkei_gadtm"))` | // [-> SVKEI_GADTM] |
| 1.1 | SET | `template.setNull(EKK1551D010CBSMsg.SVKEI_GADTM)` | // Set null when source absent |
| 1.2 | SET | `template.set(EKK1551D010CBSMsg.SVKEI_GADTM, (String)inMap.get("svkei_gadtm"))` | // Copy value from work map |

**Block 10** — IF-ELSE (null check) for `svc_kei_ucwk_no` (L12248–12256)

> Map service contract detail number — internal tracking ID for service contract line items. If absent, set null.

| # | Type | Code |
|---|------|------|
| 1 | IF | `inMap == null \|\| inMap.get("svc_kei_ucwk_no") == null \|\| "".equals(inMap.get("svc_kei_ucwk_no"))` | // [-> SVC_KEI_UCWK_NO] |
| 1.1 | SET | `template.setNull(EKK1551D010CBSMsg.SVC_KEI_UCWK_NO)` | // Set null when source absent |
| 1.2 | SET | `template.set(EKK1551D010CBSMsg.SVC_KEI_UCWK_NO, (String)inMap.get("svc_kei_ucwk_no"))` | // Copy value from work map |

**Block 11** — IF-ELSE (null check) for `svkeiuw_gadtm` (L12258–12266)

> Map service contract detail registration datetime — the timestamp when the service contract detail was registered. If absent, set null.

| # | Type | Code |
|---|------|------|
| 1 | IF | `inMap == null \|\| inMap.get("svkeiuw_gadtm") == null \|\| "".equals(inMap.get("svkeiuw_gadtm"))` | // [-> SVKEIUW_GADTM] |
| 1.1 | SET | `template.setNull(EKK1551D010CBSMsg.SVKEIUW_GADTM)` | // Set null when source absent |
| 1.2 | SET | `template.set(EKK1551D010CBSMsg.SVKEIUW_GADTM, (String)inMap.get("svkeiuw_gadtm"))` | // Copy value from work map |

**Block 12** — IF-ELSE (null check) for `kktk_svc_kei_no` (L12268–12276)

> Map device-provided service contract number — the service contract number for devices provided by the operator. If absent, set null.

| # | Type | Code |
|---|------|------|
| 1 | IF | `inMap == null \|\| inMap.get("kktk_svc_kei_no") == null \|\| "".equals(inMap.get("kktk_svc_kei_no"))` | // [-> KKTK_SVC_KEI_NO] |
| 1.1 | SET | `template.setNull(EKK1551D010CBSMsg.KKTK_SVC_KEI_NO)` | // Set null when source absent |
| 1.2 | SET | `template.set(EKK1551D010CBSMsg.KKTK_SVC_KEI_NO, (String)inMap.get("kktk_svc_kei_no"))` | // Copy value from work map |

**Block 13** — IF-ELSE (null check) for `kktsvkei_gadtm` (L12278–12286)

> Map device-provided service contract registration datetime — the timestamp when the device-provided service contract was registered. If absent, set null.

| # | Type | Code |
|---|------|------|
| 1 | IF | `inMap == null \|\| inMap.get("kktsvkei_gadtm") == null \|\| "".equals(inMap.get("kktsvkei_gadtm"))` | // [-> KKTSVKEI_GADTM] |
| 1.1 | SET | `template.setNull(EKK1551D010CBSMsg.KKTSVKEI_GADTM)` | // Set null when source absent |
| 1.2 | SET | `template.set(EKK1551D010CBSMsg.KKTSVKEI_GADTM, (String)inMap.get("kktsvkei_gadtm"))` | // Copy value from work map |

**Block 14** — IF-ELSE (null check) for `op_svc_kei_no` (L12288–12296)

> Map optional service contract number — the service contract number for optional services. If absent, set null.

| # | Type | Code |
|---|------|------|
| 1 | IF | `inMap == null \|\| inMap.get("op_svc_kei_no") == null \|\| "".equals(inMap.get("op_svc_kei_no"))` | // [-> OP_SVC_KEI_NO] |
| 1.1 | SET | `template.setNull(EKK1551D010CBSMsg.OP_SVC_KEI_NO)` | // Set null when source absent |
| 1.2 | SET | `template.set(EKK1551D010CBSMsg.OP_SVC_KEI_NO, (String)inMap.get("op_svc_kei_no"))` | // Copy value from work map |

**Block 15** — IF-ELSE (null check) for `opsvkei_gadtm` (L12298–12306)

> Map optional service contract registration datetime — the timestamp when the optional service contract was registered. If absent, set null.

| # | Type | Code |
|---|------|------|
| 1 | IF | `inMap == null \|\| inMap.get("opsvkei_gadtm") == null \|\| "".equals(inMap.get("opsvkei_gadtm"))` | // [-> OPSVKEI_GADTM] |
| 1.1 | SET | `template.setNull(EKK1551D010CBSMsg.OPSVKEI_GADTM)` | // Set null when source absent |
| 1.2 | SET | `template.set(EKK1551D010CBSMsg.OPSVKEI_GADTM, (String)inMap.get("opsvkei_gadtm"))` | // Copy value from work map |

**Block 16** — IF-ELSE (null check) for `sbop_svc_kei_no` (L12308–12316)

> Map sub-optional service contract number — the service contract number for sub-optional services. If absent, set null.

| # | Type | Code |
|---|------|------|
| 1 | IF | `inMap == null \|\| inMap.get("sbop_svc_kei_no") == null \|\| "".equals(inMap.get("sbop_svc_kei_no"))` | // [-> SBOP_SVC_KEI_NO] |
| 1.1 | SET | `template.setNull(EKK1551D010CBSMsg.SBOP_SVC_KEI_NO)` | // Set null when source absent |
| 1.2 | SET | `template.set(EKK1551D010CBSMsg.SBOP_SVC_KEI_NO, (String)inMap.get("sbop_svc_kei_no"))` | // Copy value from work map |

**Block 17** — IF-ELSE (null check) for `sbopsvkei_gadtm` (L12318–12326)

> Map sub-optional service contract registration datetime — the timestamp when the sub-optional service contract was registered. If absent, set null.

| # | Type | Code |
|---|------|------|
| 1 | IF | `inMap == null \|\| inMap.get("sbopsvkei_gadtm") == null \|\| "".equals(inMap.get("sbopsvkei_gadtm"))` | // [-> SBOPSVKEI_GADTM] |
| 1.1 | SET | `template.setNull(EKK1551D010CBSMsg.SBOPSVKEI_GADTM)` | // Set null when source absent |
| 1.2 | SET | `template.set(EKK1551D010CBSMsg.SBOPSVKEI_GADTM, (String)inMap.get("sbopsvkei_gadtm"))` | // Copy value from work map |

**Block 18** — IF-ELSE (null check) for `seiopsvc_kei_no` (L12328–12336)

> Map billing optional service contract number — the service contract number for billing-related optional services. If absent, set null.

| # | Type | Code |
|---|------|------|
| 1 | IF | `inMap == null \|\| inMap.get("seiopsvc_kei_no") == null \|\| "".equals(inMap.get("seiopsvc_kei_no"))` | // [-> SEIOPSVC_KEI_NO] |
| 1.1 | SET | `template.setNull(EKK1551D010CBSMsg.SEIOPSVC_KEI_NO)` | // Set null when source absent |
| 1.2 | SET | `template.set(EKK1551D010CBSMsg.SEIOPSVC_KEI_NO, (String)inMap.get("seiopsvc_kei_no"))` | // Copy value from work map |

**Block 19** — IF-ELSE (null check) for `seiopsvkei_gadtm` (L12338–12346)

> Map billing optional service contract registration datetime — the timestamp when the billing optional service contract was registered. If absent, set null.

| # | Type | Code |
|---|------|------|
| 1 | IF | `inMap == null \|\| inMap.get("seiopsvkei_gadtm") == null \|\| "".equals(inMap.get("seiopsvkei_gadtm"))` | // [-> SEIOPSVKEI_GADTM] |
| 1.1 | SET | `template.setNull(EKK1551D010CBSMsg.SEIOPSVKEI_GADTM)` | // Set null when source absent |
| 1.2 | SET | `template.set(EKK1551D010CBSMsg.SEIOPSVKEI_GADTM, (String)inMap.get("seiopsvkei_gadtm"))` | // Copy value from work map |

**Block 20** — IF-ELSE (null check) for `huka_inf_kei_no` (L12348–12356)

> Map additional information contract number — the contract number for supplementary information add-ons. If absent, set null.

| # | Type | Code |
|---|------|------|
| 1 | IF | `inMap == null \|\| inMap.get("huka_inf_kei_no") == null \|\| "".equals(inMap.get("huka_inf_kei_no"))` | // [-> HUKA_INF_KEI_NO] |
| 1.1 | SET | `template.setNull(EKK1551D010CBSMsg.HUKA_INF_KEI_NO)` | // Set null when source absent |
| 1.2 | SET | `template.set(EKK1551D010CBSMsg.HUKA_INF_KEI_NO, (String)inMap.get("huka_inf_kei_no"))` | // Copy value from work map |

**Block 21** — IF-ELSE (null check) for `huka_inf_kei_gadtm` (L12358–12366)

> Map additional information contract registration datetime — the timestamp when the additional information contract was registered. If absent, set null.

| # | Type | Code |
|---|------|------|
| 1 | IF | `inMap == null \|\| inMap.get("huka_inf_kei_gadtm") == null \|\| "".equals(inMap.get("huka_inf_kei_gadtm"))` | // [-> HUKA_INF_KEI_GADTM] |
| 1.1 | SET | `template.setNull(EKK1551D010CBSMsg.HUKA_INF_KEI_GADTM)` | // Set null when source absent |
| 1.2 | SET | `template.set(EKK1551D010CBSMsg.HUKA_INF_KEI_GADTM, (String)inMap.get("huka_inf_kei_gadtm"))` | // Copy value from work map |

**Block 22** — IF-ELSE (null check) for `chbf_svkei_gadtm` (L12368–12376)

> Map pre-change service contract registration datetime — the timestamp before a service contract change, for rollback/audit purposes. If absent, set null.

| # | Type | Code |
|---|------|------|
| 1 | IF | `inMap == null \|\| inMap.get("chbf_svkei_gadtm") == null \|\| "".equals(inMap.get("chbf_svkei_gadtm"))` | // [-> CHBF_SVKEI_GADTM] |
| 1.1 | SET | `template.setNull(EKK1551D010CBSMsg.CHBF_SVKEI_GADTM)` | // Set null when source absent |
| 1.2 | SET | `template.set(EKK1551D010CBSMsg.CHBF_SVKEI_GADTM, (String)inMap.get("chbf_svkei_gadtm"))` | // Copy value from work map |

**Block 23** — IF-ELSE (null check) for `chbf_svkeiuw_gadtm` (L12378–12386)

> Map pre-change service contract detail registration datetime — the timestamp before a service contract detail change, for rollback/audit purposes. If absent, set null.

| # | Type | Code |
|---|------|------|
| 1 | IF | `inMap == null \|\| inMap.get("chbf_svkeiuw_gadtm") == null \|\| "".equals(inMap.get("chbf_svkeiuw_gadtm"))` | // [-> CHBF_SVKEIUW_GADTM] |
| 1.1 | SET | `template.setNull(EKK1551D010CBSMsg.CHBF_SVKEIUW_GADTM)` | // Set null when source absent |
| 1.2 | SET | `template.set(EKK1551D010CBSMsg.CHBF_SVKEIUW_GADTM, (String)inMap.get("chbf_svkeiuw_gadtm"))` | // Copy value from work map |

**Block 24** — IF-ELSE (null check) for `chbf_kktsvkei_gadtm` (L12388–12396)

> Map pre-change device-provided service contract registration datetime — the timestamp before a device-provided service contract change, for rollback/audit purposes. If absent, set null.

| # | Type | Code |
|---|------|------|
| 1 | IF | `inMap == null \|\| inMap.get("chbf_kktsvkei_gadtm") == null \|\| "".equals(inMap.get("chbf_kktsvkei_gadtm"))` | // [-> CHBF_KKTSVKEI_GADTM] |
| 1.1 | SET | `template.setNull(EKK1551D010CBSMsg.CHBF_KKTSVKEI_GADTM)` | // Set null when source absent |
| 1.2 | SET | `template.set(EKK1551D010CBSMsg.CHBF_KKTSVKEI_GADTM, (String)inMap.get("chbf_kktsvkei_gadtm"))` | // Copy value from work map |

**Block 25** — IF-ELSE (null check) for `chbf_opsvkei_gadtm` (L12398–12406)

> Map pre-change optional service contract registration datetime — the timestamp before an optional service contract change, for rollback/audit purposes. If absent, set null.

| # | Type | Code |
|---|------|------|
| 1 | IF | `inMap == null \|\| inMap.get("chbf_opsvkei_gadtm") == null \|\| "".equals(inMap.get("chbf_opsvkei_gadtm"))` | // [-> CHBF_OPSVKEI_GADTM] |
| 1.1 | SET | `template.setNull(EKK1551D010CBSMsg.CHBF_OPSVKEI_GADTM)` | // Set null when source absent |
| 1.2 | SET | `template.set(EKK1551D010CBSMsg.CHBF_OPSVKEI_GADTM, (String)inMap.get("chbf_opsvkei_gadtm"))` | // Copy value from work map |

**Block 26** — IF-ELSE (null check) for `chbf_sbopsvkei_gadtm` (L12408–12416)

> Map pre-change sub-optional service contract registration datetime — the timestamp before a sub-optional service contract change, for rollback/audit purposes. If absent, set null.

| # | Type | Code |
|---|------|------|
| 1 | IF | `inMap == null \|\| inMap.get("chbf_sbopsvkei_gadtm") == null \|\| "".equals(inMap.get("chbf_sbopsvkei_gadtm"))` | // [-> CHBF_SBOPSVKEI_GADTM] |
| 1.1 | SET | `template.setNull(EKK1551D010CBSMsg.CHBF_SBOPSVKEI_GADTM)` | // Set null when source absent |
| 1.2 | SET | `template.set(EKK1551D010CBSMsg.CHBF_SBOPSVKEI_GADTM, (String)inMap.get("chbf_sbopsvkei_gadtm"))` | // Copy value from work map |

**Block 27** — IF-ELSE (null check) for `chbf_seiopsvkei_gadtm` (L12418–12426)

> Map pre-change billing optional service contract registration datetime — the timestamp before a billing optional service contract change, for rollback/audit purposes. If absent, set null.

| # | Type | Code |
|---|------|------|
| 1 | IF | `inMap == null \|\| inMap.get("chbf_seiopsvkei_gadtm") == null \|\| "".equals(inMap.get("chbf_seiopsvkei_gadtm"))` | // [-> CHBF_SEIOPSVKEI_GADTM] |
| 1.1 | SET | `template.setNull(EKK1551D010CBSMsg.CHBF_SEIOPSVKEI_GADTM)` | // Set null when source absent |
| 1.2 | SET | `template.set(EKK1551D010CBSMsg.CHBF_SEIOPSVKEI_GADTM, (String)inMap.get("chbf_seiopsvkei_gadtm"))` | // Copy value from work map |

**Block 28** — IF-ELSE (null/empty check) for `kkop_svc_kei_no_1` (L12428–12436)

> Map device option service contract 1 (route function) — the service contract number for device option service 1, used for route functionality. Added per IT1-2013-0001749 (ANK-1578-00-00) 2013.12.25 Y.Kanata. Uses `StringUtils.isEmpty()` instead of the repeated null/empty check pattern. If absent, set null.

| # | Type | Code |
|---|------|------|
| 1 | IF | `inMap == null \|\| StringUtils.isEmpty((String)inMap.get("kkop_svc_kei_no_1"))` | // [-> KKOP_SVC_KEI_NO_1] |
| 1.1 | SET | `template.setNull(EKK1551D010CBSMsg.KKOP_SVC_KEI_NO_1)` | // Set null when source absent |
| 1.2 | SET | `template.set(EKK1551D010CBSMsg.KKOP_SVC_KEI_NO_1, (String)inMap.get("kkop_svc_kei_no_1"))` | // Copy value from work map |

**Block 29** — IF-ELSE (null/empty check) for `kko_svkei_gadtm_1` (L12438–12446)

> Map device option service contract registration datetime 1 (route function) — the timestamp when device option service 1 was registered, for route functionality. If absent, set null.

| # | Type | Code |
|---|------|------|
| 1 | IF | `inMap == null \|\| StringUtils.isEmpty((String)inMap.get("kko_svkei_gadtm_1"))` | // [-> KKOSVKEI_GADTM_1] |
| 1.1 | SET | `template.setNull(EKK1551D010CBSMsg.KKOSVKEI_GADTM_1)` | // Set null when source absent |
| 1.2 | SET | `template.set(EKK1551D010CBSMsg.KKOSVKEI_GADTM_1, (String)inMap.get("kko_svkei_gadtm_1"))` | // Copy value from work map |

**Block 30** — IF-ELSE (null/empty check) for `kkop_svc_kei_no_2` (L12448–12456)

> Map device option service contract 2 (VA) — the service contract number for device option service 2, used for VA (Value-Added) functionality. If absent, set null.

| # | Type | Code |
|---|------|------|
| 1 | IF | `inMap == null \|\| StringUtils.isEmpty((String)inMap.get("kkop_svc_kei_no_2"))` | // [-> KKOP_SVC_KEI_NO_2] |
| 1.1 | SET | `template.setNull(EKK1551D010CBSMsg.KKOP_SVC_KEI_NO_2)` | // Set null when source absent |
| 1.2 | SET | `template.set(EKK1551D010CBSMsg.KKOP_SVC_KEI_NO_2, (String)inMap.get("kkop_svc_kei_no_2"))` | // Copy value from work map |

**Block 31** — IF-ELSE (null/empty check) for `kko_svkei_gadtm_2` (L12458–12466)

> Map device option service contract registration datetime 2 (VA) — the timestamp when device option service 2 was registered, for VA (Value-Added) functionality. If absent, set null.

| # | Type | Code |
|---|------|------|
| 1 | IF | `inMap == null \|\| StringUtils.isEmpty((String)inMap.get("kko_svkei_gadtm_2"))` | // [-> KKOSVKEI_GADTM_2] |
| 1.1 | SET | `template.setNull(EKK1551D010CBSMsg.KKOSVKEI_GADTM_2)` | // Set null when source absent |
| 1.2 | SET | `template.set(EKK1551D010CBSMsg.KKOSVKEI_GADTM_2, (String)inMap.get("kko_svkei_gadtm_2"))` | // Copy value from work map |

**Block 32** — IF-ELSE (null check) for `telno` (L12468–12476)

> Map phone number — the customer's contact phone number. Added per ANK-4494-00-00 Step2 quality improvement countermeasure No.17 20241126 Hoshino. If absent, set null.

| # | Type | Code |
|---|------|------|
| 1 | IF | `inMap == null \|\| inMap.get("telno") == null \|\| "".equals(inMap.get("telno"))` | // [-> TELNO] |
| 1.1 | SET | `template.setNull(EKK1551D010CBSMsg.TELNO)` | // Set null when source absent |
| 1.2 | SET | `template.set(EKK1551D010CBSMsg.TELNO, (String)inMap.get("telno"))` | // Copy value from work map |

**Block 33** — SET (L12478–12481)

> Assemble the CAANMsg template into an array and add it to the output payload map. Return the complete map.

| # | Type | Code |
|---|------|------|
| 1 | SET | `templates = new CAANMsg[1]` | // Create single-element template array |
| 2 | SET | `templates[0] = template` | // Assign built template |
| 3 | SET | `paramMap.put(JCMConstants.TEMPLATE_LIST_KEY, templates)` | // Put template array into output |
| 4 | RETURN | `return paramMap` | // Return completed payload map |

## 7. Glossary

| Term | Type | Business Meaning |
|------|------|------------------|
| `HAKKOSODCCWORK` | Constant | Work registration map key — the control map key for the order release (order creation) work registration data stored in the request parameter |
| `func_cd_1` | Constant | Function code "1" — indicates Check & Register mode (validation + data registration) |
| `EKK1551D010` | Constant | Template ID — identifies the Order Information Creation Work Registration CBS message template |
| `ODR_HAKKO_JOKEN_NO` | Field | Order release condition number — the sequence number identifying an order release condition, used to control when and how orders are generated |
| `ODR_NAIYO_CD` | Field | Order content code — classifies the type of order (e.g., FTTH registration, mail change, line cancellation, device provisioning) |
| `SVC_KEI_NO` | Field | Service contract number — the primary identifier for a service contract line item |
| `SVKEI_GADTM` | Field | Service contract registration datetime — the timestamp when the service contract was registered (GADTM = 登録年月日時分秒) |
| `SVC_KEI_UCWK_NO` | Field | Service contract detail number — internal tracking ID for service contract line items (ucwk = 作業) |
| `SVKEIUW_GADTM` | Field | Service contract detail registration datetime — the timestamp when the service contract detail was registered |
| `KKTK_SVC_KEI_NO` | Field | Device-provided service contract number — the contract number for services associated with devices provided by the operator (kk = 機器, tk = 提供) |
| `KKTSVKEI_GADTM` | Field | Device-provided service contract registration datetime — the timestamp when the device-provided service contract was registered |
| `OP_SVC_KEI_NO` | Field | Optional service contract number — the contract number for optional/add-on services (op = オプション) |
| `OPSVKEI_GADTM` | Field | Optional service contract registration datetime — the timestamp when the optional service contract was registered |
| `SBOP_SVC_KEI_NO` | Field | Sub-optional service contract number — the contract number for sub-level optional services (sb = サブ) |
| `SBOPSVKEI_GADTM` | Field | Sub-optional service contract registration datetime — the timestamp when the sub-optional service contract was registered |
| `SEIOPSVC_KEI_NO` | Field | Billing optional service contract number — the contract number for billing-related optional services (sei = 請求) |
| `SEIOPSVKEI_GADTM` | Field | Billing optional service contract registration datetime — the timestamp when the billing optional service contract was registered |
| `HUKA_INF_KEI_NO` | Field | Additional information contract number — the contract number for supplementary information add-ons (huka = 付加, inf = 情報) |
| `HUKA_INF_KEI_GADTM` | Field | Additional information contract registration datetime — the timestamp when the additional information contract was registered |
| `CHBF_SVKEI_GADTM` | Field | Pre-change service contract registration datetime — the timestamp before a service contract change (chbf = 変更前), used for rollback/audit trail |
| `CHBF_SVKEIUW_GADTM` | Field | Pre-change service contract detail registration datetime — the timestamp before a service contract detail change |
| `CHBF_KKTSVKEI_GADTM` | Field | Pre-change device-provided service contract registration datetime — the timestamp before a device-provided service contract change |
| `CHBF_OPSVKEI_GADTM` | Field | Pre-change optional service contract registration datetime — the timestamp before an optional service contract change |
| `CHBF_SBOPSVKEI_GADTM` | Field | Pre-change sub-optional service contract registration datetime — the timestamp before a sub-optional service contract change |
| `CHBF_SEIOPSVKEI_GADTM` | Field | Pre-change billing optional service contract registration datetime — the timestamp before a billing optional service contract change |
| `KKOP_SVC_KEI_NO_1` | Field | Device option service contract 1 number — the contract number for device option service 1 (1st device option), used for route functionality |
| `KKOSVKEI_GADTM_1` | Field | Device option service contract 1 registration datetime — the timestamp when device option service 1 was registered (route function) |
| `KKOP_SVC_KEI_NO_2` | Field | Device option service contract 2 number — the contract number for device option service 2 (2nd device option), used for VA (Value-Added) functionality |
| `KKOSVKEI_GADTM_2` | Field | Device option service contract 2 registration datetime — the timestamp when device option service 2 was registered (VA function) |
| `TELNO` | Field | Phone number — the customer's contact telephone number |
| CAANMsg | Technical | Fujitsu's messaging framework class — a structured message container used to pass data between screens, CCs, and service components |
| SC | Acronym | Service Component — a server-side business logic module in the Futurity framework |
| CBS | Acronym | CBS = Business Component Service — a service component type that handles business operations (SC Code suffix) |
| SOD | Acronym | Service Order Data — the order management domain entity |
| FTTH | Business term | Fiber To The Home — fiber-optic broadband internet service |
| VA | Business term | Value-Added — premium optional service features (e.g., call forwarding, voicemail, additional bandwidth) |
| GADTM | Abbreviation | 登録年月日時分秒 (Gtoku NenGetsuHiJiFunByou) — registration year/month/day/hour/minute/second |
| ucwk | Abbreviation | 作業 (Sagyou) — work/operation; internal work number for tracking |
| chbf | Abbreviation | 変更前 (Henkou-mae) — before change; used for pre-change snapshot timestamps for rollback support |
| kktk | Abbreviation | 機器提供 (Kiki Teiyou) — device/provided; relates to hardware devices provided by the operator |
| kkop | Abbreviation | 機器オプション (Kiki Option) — device option; relates to optional services for devices |
| sbop | Abbreviation | サブオプション (Sub Option) — sub-optional; lower-tier optional services |
| seiop | Abbreviation | 請求オプション (Seiyou Option) — billing option; optional services related to billing |
| huka | Abbreviation | 付加 (Fuka) — additional; supplementary information services |
| kko | Abbreviation | 機器オプ (Kiki Op) — device option shorthand |
| JCMConstants | Class | Framework constant class — defines keys for transaction ID, use case ID, operation ID, call type, hostname, IP, screen ID, operator ID, and template list |
| JPCModelConstant | Class | Framework constant class — defines model-level constants such as function codes |
| SCControlMapKeys | Class | Control map key constant class — defines keys for request hostname, host IP, view ID, and operator ID |
| IRequestParameterReadOnly | Interface | Request parameter read-only interface — provides access to telegram ID, use case ID, operation ID, call type, control map data, and business data maps |
| ServiceComponentRequestInvoker | Class | Framework class — invokes service components using a parameter map and session handle |
