# Business Logic — JKKSecurityPackOperateCC.main() [175 LOC]

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

## 1. Role

### JKKSecurityPackOperateCC.main()

This method orchestrates the end-to-end processing of security pack and premium pack service contract operations — specifically cancellation and registration — for a customer's fiber broadband service bundle. It acts as the central business coordinator within the JKK (service contract operation) component, reading pre-populated configuration flags and service contract numbers from the component's work map (`ccWorkMap`), then dispatching cancellation or registration calls to underlying DSL (deactivate) and add (activate) service methods based on which pack types are enabled. The method supports seven distinct service types: Security Pack (anti-virus/endpoint protection), Remote Support Plus (remote IT assistance), McAfee Multi Access (security software), Premium Pack (SmartLink premium services), InetSGWL (internet gateway), NTfMLPRM (notification mail premium), and Remote Support Plus (remote support pro). Its **role in the larger system** is that of a shared CC (common component) — a reusable, cross-screen utility invoked by the `execute()` method of the same class — that normalizes heterogeneous service-pack registration and cancellation requests into a single coherent operation sequence. The method follows a **routing/dispatch pattern**, branching on per-service activation flags, then a **delegation pattern**, offloading actual database-level changes to specialized helper methods (`addWrib`, `dslWrib`, `addOption`, `dslOption`, `addSupportOption`, `invokeHakkoSODCC`).

## 2. Processing Pattern (Detailed Business Logic)

```mermaid
flowchart TD
    START(["main handle, param"])
    LOG1["printlnEjbLog start"]
    GET_SVC_CANCEL["Get svcKeiNoCancel from ccWorkMap"]
    GET_SVC_ADD["Get svcKeiNoAdd from ccWorkMap"]
    GET_HIKITUGI["Get hikitugiUm from ccWorkMap"]
    GET_UPD_CANCEL["Get updDtmCancel from ccWorkMap"]
    GET_UPD_ADD["Get updDtmAdd from ccWorkMap"]
    GET_SEC_PACK_FLG_ADD["Get securityPackTgFlgAdd from ccWorkMap"]
    GET_SEC_PACK_FLG_CANCEL["Get securityPackTgFlgCancel from ccWorkMap"]
    GET_PRM_FLG_ADD["Get premiumPackTgFlgAdd from ccWorkMap"]
    GET_PRM_FLG_CANCEL["Get premiumPackTgFlgCancel from ccWorkMap"]
    GET_INET_FLG_ADD["Get inetsgwlTgFlgAdd from ccWorkMap"]
    GET_INET_FLG_CANCEL["Get inetsgwlTgFlgCancel from ccWorkMap"]
    GET_NTFML_FLG_ADD["Get ntfmlprm_tg_flgAdd from ccWorkMap"]
    GET_NTFML_FLG_CANCEL["Get ntfmlprm_tg_flgCancel from ccWorkMap"]
    GET_RMT_FLG_ADD["Get rmtsprtTgFlgAdd from ccWorkMap"]
    GET_RMT_FLG_CANCEL["Get rmtsprtTgFlgCancel from ccWorkMap"]

    CANCEL_CHECK["securityPackTgFlgCancel or premiumPackTgFlgCancel == ENABLE?"]
    SEC_CANCEL_CHECK["securityPackTgFlgCancel == ENABLE?"]
    SEC_CANCEL["dslWrib security pack cancel"]
    RMT_CANCEL["dslOption RMTSPRT_PLUS cancel"]
    MCAFEE_CANCEL["dslOption McAfee cancel"]

    PRM_CANCEL_CHECK["premiumPackTgFlgCancel == ENABLE?"]
    PRM_CANCEL["dslWrib premium pack cancel"]
    PRM_RMT_CANCEL["dslOption RMTSPRT_PLUS cancel"]
    PRM_MCAFEE_CANCEL["dslOption McAfee cancel"]

    INET_CANCEL_CHECK["inetsgwlTgFlgCancel == ENABLE?"]
    INET_CANCEL["dslOption InetSGWL cancel"]
    NTFML_CANCEL_CHECK["ntfmlprm_tg_flgCancel == ENABLE?"]
    NTFML_CANCEL["dslOption NTfMLPRM cancel"]
    RMT_CANCEL_CHECK2["rmtsprtTgFlgCancel == ENABLE?"]
    RMT_CANCEL_ADD["dslOption RMTSPRT_PLUS cancel (KARA charge)"]

    SVC_EQ_CHECK["svcKeiNoCancel equals svcKeiNoAdd?"]
    SYNC_UPD["updDtmAdd = updDtmCancel"]

    REG_CHECK["securityPackTgFlgAdd or premiumPackTgFlgAdd == ENABLE?"]
    SEC_REG_CHECK["securityPackTgFlgAdd == ENABLE?"]
    SEC_REG["addWrib security pack register"]
    PRM_REG_CHECK["premiumPackTgFlgAdd == ENABLE?"]
    PRM_REG["addWrib premium pack register"]
    RMT_REG["addSupportOption RMTSPRT_PLUS register"]
    MCAFEE_REG["addOption McAfee register"]

    INET_REG_CHECK["inetsgwlTgFlgAdd == ENABLE?"]
    INET_REG["addOption InetSGWL register"]
    NTFML_REG_CHECK["ntfmlprm_tg_flgAdd == ENABLE?"]
    NTFML_REG["addOption NTfMLPRM register"]
    RMT_REG_CHECK["rmtsprtTgFlgAdd == ENABLE?"]
    RMT_REG2["addSupportOption RMTSPRT_PLUS register"]

    SOD_CHECK["sodHakkoCCTrgtDataList != null and size > 0?"]
    SOD_CALL["invokeHakkoSODCC handle, param, FUNC_CD_1"]

    IN_LIST_CANCEL["inListCancel = inMap.get KEY_CANCEL_INFO_LIST"]
    IN_LIST_CANCEL_NULL["inListCancel != null?"]
    CHILD_CANCEL["childMap.put updDtm_af = updDtmCancel"]

    IN_LIST_ADD["inListAdd = inMap.get KEY_ADD_INFO_LIST"]
    IN_LIST_ADD_NULL["inListAdd != null?"]
    CHILD_ADD["childMap.put updDtm_af = updDtmAdd"]

    LOG_END["printlnEjbLog end"]

    START --> LOG1 --> GET_SVC_CANCEL
    GET_SVC_CANCEL --> GET_SVC_ADD --> GET_HIKITUGI
    GET_HIKITUGI --> GET_UPD_CANCEL --> GET_UPD_ADD
    GET_UPD_ADD --> GET_SEC_PACK_FLG_ADD --> GET_SEC_PACK_FLG_CANCEL
    GET_SEC_PACK_FLG_CANCEL --> GET_PRM_FLG_ADD --> GET_PRM_FLG_CANCEL
    GET_PRM_FLG_CANCEL --> GET_INET_FLG_ADD --> GET_INET_FLG_CANCEL
    GET_INET_FLG_CANCEL --> GET_NTFML_FLG_ADD --> GET_NTFML_FLG_CANCEL
    GET_NTFML_FLG_CANCEL --> GET_RMT_FLG_ADD --> GET_RMT_FLG_CANCEL
    GET_RMT_FLG_CANCEL --> CANCEL_CHECK
    CANCEL_CHECK -->|Yes| SEC_CANCEL_CHECK
    CANCEL_CHECK -->|No| SVC_EQ_CHECK
    SEC_CANCEL_CHECK -->|Yes| SEC_CANCEL --> RMT_CANCEL --> MCAFEE_CANCEL --> SVC_EQ_CHECK
    SEC_CANCEL_CHECK -->|No| PRM_CANCEL_CHECK
    PRM_CANCEL_CHECK -->|Yes| PRM_CANCEL --> PRM_RMT_CANCEL --> PRM_MCAFEE_CANCEL --> SVC_EQ_CHECK
    PRM_CANCEL_CHECK -->|No| INET_CANCEL_CHECK
    INET_CANCEL_CHECK -->|Yes| INET_CANCEL --> NTFML_CANCEL_CHECK
    INET_CANCEL_CHECK -->|No| NTFML_CANCEL_CHECK
    NTFML_CANCEL_CHECK -->|Yes| NTFML_CANCEL --> RMT_CANCEL_CHECK2
    NTFML_CANCEL_CHECK -->|No| RMT_CANCEL_CHECK2
    RMT_CANCEL_CHECK2 -->|Yes| RMT_CANCEL_ADD --> SVC_EQ_CHECK
    RMT_CANCEL_CHECK2 -->|No| SVC_EQ_CHECK

    SVC_EQ_CHECK -->|Yes| SYNC_UPD --> REG_CHECK
    SVC_EQ_CHECK -->|No| REG_CHECK
    REG_CHECK -->|Yes| SEC_REG_CHECK
    REG_CHECK -->|No| INET_REG_CHECK
    SEC_REG_CHECK -->|Yes| SEC_REG --> PRM_REG_CHECK
    SEC_REG_CHECK -->|No| RMT_REG
    PRM_REG_CHECK -->|Yes| PRM_REG --> RMT_REG
    PRM_REG_CHECK -->|No| RMT_REG
    RMT_REG --> MCAFEE_REG --> INET_REG_CHECK
    INET_REG_CHECK -->|Yes| INET_REG --> NTFML_REG_CHECK
    INET_REG_CHECK -->|No| NTFML_REG_CHECK
    NTFML_REG_CHECK -->|Yes| NTFML_REG --> RMT_REG_CHECK
    NTFML_REG_CHECK -->|No| RMT_REG_CHECK
    RMT_REG_CHECK -->|Yes| RMT_REG2 --> SOD_CHECK
    RMT_REG_CHECK -->|No| SOD_CHECK

    SOD_CHECK -->|Yes| SOD_CALL --> IN_LIST_CANCEL
    SOD_CHECK -->|No| IN_LIST_CANCEL
    IN_LIST_CANCEL --> IN_LIST_CANCEL_NULL
    IN_LIST_CANCEL_NULL -->|Yes| CHILD_CANCEL --> IN_LIST_ADD
    IN_LIST_CANCEL_NULL -->|No| IN_LIST_ADD
    IN_LIST_ADD --> IN_LIST_ADD_NULL
    IN_LIST_ADD_NULL -->|Yes| CHILD_ADD --> LOG_END
    IN_LIST_ADD_NULL -->|No| LOG_END
    LOG_END --> END(["Return void"])
```

## 3. Parameter Analysis

| No | Parameter Name | Type | Business Description |
|----|---------------|------|---------------------|
| 1 | `handle` | `SessionHandle` | The active session context carrying user authentication, locale, transaction scope, and runtime state required for enterprise operations such as SOD dispatch and remote support option processing. |
| 2 | `param` | `IRequestParameterReadWrite` | The request parameter object containing screen-submitted form data, including service contract numbers, charge non-charge codes, start dates, and target flags for pack registration/cancellation. |

**Instance fields read by this method:**

| Field | Type | Business Description |
|-------|------|---------------------|
| `ccWorkMap` | `Map<String, Object>` | Component work map shared across CC processing — holds cancellation and registration service contract numbers, update timestamps, per-service activation/deactivation flags, and charge codes. |
| `inMap` | `HashMap` | Input map containing the cancellation and registration information lists (`inListCancel`, `inListAdd`) used to write back the final update timestamp after processing completes. |
| `sodHakkoCCTrgtDataList` | `ArrayList` | List of Service Order Data (SOD) issuance targets — when non-empty and containing data, triggers an SOD issuance CC call at the end of registration processing. |

**Local variables:**

| Variable | Type | Business Description |
|----------|------|---------------------|
| `svcKeiNoCancel` | `String` | Service contract number for the cancellation side — identifies which contract is being decommissioned. |
| `svcKeiNoAdd` | `String` | Service contract number for the registration side — identifies which contract is being provisioned. |
| `hikitugiUm` | `String` | Inheritance flag — indicates whether the service contract is being inherited from a predecessor contract (affects update timestamp logic during cancellation). |
| `updDtmCancel` | `String` | Update date-time before (timestamp prior to cancellation) — tracks the last update time for cancellation records. |
| `updDtmAdd` | `String` | Update date-time before (timestamp prior to registration) — tracks the last update time for registration records. |
| `securityPackTgFlgAdd` / `securityPackTgFlgCancel` | `String` | Target flag for Security Pack registration/cancellation. When equal to `ENABLE`, triggers Security Pack (McAfee endpoint protection) provisioning or decommissioning. |
| `premiumPackTgFlgAdd` / `premiumPackTgFlgCancel` | `String` | Target flag for Premium Pack registration/cancellation. When enabled, triggers SmartLink Premium provisioning or decommissioning. |
| `inetsgwlTgFlgAdd` / `inetsgwlTgFlgCancel` | `String` | Target flag for InetSGWL (Internet Gateway) registration/cancellation. |
| `ntfmlprm_tg_flgAdd` / `ntfmlprm_tg_flgCancel` | `String` | Target flag for NTfMLPRM (Notification Mail Premium) registration/cancellation. |
| `rmtsprtTgFlgAdd` / `rmtsprtTgFlgCancel` | `String` | Target flag for Remote Support Pro registration/cancellation. |

## 4. CRUD Operations / Called Services

| CRUD | SC / CBS | SC Code | Entity / DB | Operation Description |
|------|----------|---------|-------------|----------------------|
| C | `JKKSecurityPackOperateCC.addOption` | JKKSecurityPackOperateCC | - | Calls `addOption` for McAfee Multi Access registration |
| C | `JKKSecurityPackOperateCC.addOption` | JKKSecurityPackOperateCC | - | Calls `addOption` for InetSGWL registration |
| C | `JKKSecurityPackOperateCC.addOption` | JKKSecurityPackOperateCC | - | Calls `addOption` for NTfMLPRM registration |
| C | `JKKSecurityPackOperateCC.addSupportOption` | JKKSecurityPackOperateCC | - | Calls `addSupportOption` for RMTSPRT_PLUS (Remote Support Plus) registration |
| C | `JKKSecurityPackOperateCC.addWrib` | JKKSecurityPackOperateCC | - | Calls `addWrib` for Security Pack (W rib) registration |
| C | `JKKSecurityPackOperateCC.addWrib` | JKKSecurityPackOperateCC | - | Calls `addWrib` for SmartLink Premium (W rib) registration |
| - | `JKKSecurityPackOperateCC.dslOption` | JKKSecurityPackOperateCC | - | Calls `dslOption` for RMTSPRT_PLUS cancellation |
| - | `JKKSecurityPackOperateCC.dslOption` | JKKSecurityPackOperateCC | - | Calls `dslOption` for McAfee cancellation |
| - | `JKKSecurityPackOperateCC.dslOption` | JKKSecurityPackOperateCC | - | Calls `dslOption` for InetSGWL cancellation |
| - | `JKKSecurityPackOperateCC.dslOption` | JKKSecurityPackOperateCC | - | Calls `dslOption` for NTfMLPRM cancellation |
| - | `JKKSecurityPackOperateCC.dslWrib` | JKKSecurityPackOperateCC | - | Calls `dslWrib` for Security Pack (W rib) cancellation |
| - | `JKKSecurityPackOperateCC.dslWrib` | JKKSecurityPackOperateCC | - | Calls `dslWrib` for SmartLink Premium cancellation |
| - | `JKKSecurityPackOperateCC.invokeHakkoSODCC` | JKKSecurityPackOperateCC | - | Invokes SOD issuance CC for service order dispatch |
| - | `JKKSecurityPackOperateCC.printlnEjbLog` | JKKSecurityPackOperateCC | - | Writes EJB log entries for start/end of main processing |

## 5. Dependency Trace

| # | Caller (Screen/Batch) | Call Chain (Full Path to this Method) | Terminal (SC / CRUD / Entity) |
|---|----------------------|--------------------------------------|-------------------------------|
| 1 | Method: `JKKSecurityPackOperateCC.execute()` | `execute()` → `main(handle, param)` | `addWrib [C]`, `addOption [C]`, `addSupportOption [C]`, `dslWrib [-]`, `dslOption [-]`, `invokeHakkoSODCC [-]`, `printlnEjbLog [-]` |

## 6. Per-Branch Detail Blocks

**Block 1** — [SET] Initialization: Read configuration flags from ccWorkMap (L378)

> Reads all cancellation and registration related data from the component work map, including service contract numbers, update timestamps, inheritance flag, and per-service target flags.

| # | Type | Code |
|---|------|------|
| 1 | SET | `svcKeiNoCancel = (String) this.ccWorkMap.get("svc_kei_no_cancel")` // Cancellation service contract number |
| 2 | SET | `svcKeiNoAdd = (String) this.ccWorkMap.get("svc_kei_no_add")` // Registration service contract number |
| 3 | SET | `hikitugiUm = (String) this.ccWorkMap.get(KEY_HIKITUGI_UM)` // Inheritance flag [-> `KEY_HIKITUGI_UM`] |
| 4 | SET | `updDtmCancel = (String) this.ccWorkMap.get("upd_dtm_bf_cancel")` // Update timestamp before (cancel) |
| 5 | SET | `updDtmAdd = (String) this.ccWorkMap.get("upd_dtm_bf_add")` // Update timestamp before (add) |
| 6 | SET | `securityPackTgFlgAdd = (String) this.ccWorkMap.get("security_pack_tg_flg_add")` // Security Pack registration target flag |
| 7 | SET | `securityPackTgFlgCancel = (String) this.ccWorkMap.get("security_pack_tg_flg_cancel")` // Security Pack cancellation target flag |
| 8 | SET | `premiumPackTgFlgAdd = (String) this.ccWorkMap.get("premium_pack_tg_flg_add")` // Premium Pack registration target flag |
| 9 | SET | `premiumPackTgFlgCancel = (String) this.ccWorkMap.get("premium_pack_tg_flg_cancel")` // Premium Pack cancellation target flag |
| 10 | SET | `inetsgwlTgFlgAdd = (String) this.ccWorkMap.get("inetsgwl_tg_flg_add")` // InetSGWL registration target flag |
| 11 | SET | `inetsgwlTgFlgCancel = (String) this.ccWorkMap.get("inetsgwl_tg_flg_cancel")` // InetSGWL cancellation target flag |
| 12 | SET | `ntfmlprm_tg_flgAdd = (String) this.ccWorkMap.get("ntfmlprm_tg_flg_add")` // NTfMLPRM registration target flag |
| 13 | SET | `ntfmlprm_tg_flgCancel = (String) this.ccWorkMap.get("ntfmlprm_tg_flg_cancel")` // NTfMLPRM cancellation target flag |
| 14 | SET | `rmtsprtTgFlgAdd = (String) this.ccWorkMap.get("rmtsprt_tg_flg_add")` // Remote Support Pro registration target flag [-> ANK-4577-00-00 ADD START] |
| 15 | SET | `rmtsprtTgFlgCancel = (String) this.ccWorkMap.get("rmtsprt_tg_flg_cancel")` // Remote Support Pro cancellation target flag |

**Block 2** — [IF] Cancellation processing: Security Pack or Premium Pack cancellation flag enabled `[ENABLE.equals(securityPackTgFlgCancel) || ENABLE.equals(premiumPackTgFlgCancel)]` (L412)

> Initiates cancellation processing for security pack and premium pack services. This is the first major processing phase — decommissioning services before registering new ones.

**Block 2.1** — [IF] Security Pack cancellation `[ENABLE.equals(securityPackTgFlgCancel)]` (L414)

> Deactivates Security Pack (endpoint protection) and its associated services: Remote Support Plus and McAfee Multi Access.

| # | Type | Code |
|---|------|------|
| 1 | SET | `updDtmCancel = dslWrib(WRIB_SVC_CD_SECURITY_PACK, svcKeiNoCancel, PCRSCD_SECURITY_PACK_MSKM, PPLANCDSecurity_Pack_MSKM, securityPackChrgHichrgCdCancel, updDtmCancel)` // Cancel Security Pack [-> `JKKStrConst.WRIB_SVC_CD_SECURITY_PACK`] |
| 2 | SET | `updDtmCancel = dslOption(OP_SVC_CD_RMTSPRT_PLUS, svcKeiNoCancel, OPSVC_PCRSRMTSPRT_PLUS, OPSVC_PPLANRMTSPRT_PLUS, updDtmCancel, hikitugiUm, securityPackChrgHichrgCdCancel, handle, param)` // Cancel Remote Support Plus [-> IT1-2017-0000039 MOD: passes handle, param] |
| 3 | SET | `updDtmCancel = dslOption(OP_SVC_CD_MCAFEE_MULTI_ACCSS, svcKeiNoCancel, PCRSCD_MCAFEE_MULTI_ACCSS, PPLANCDSecure_Multi_ACCSS, updDtmCancel, hikitugiUm, securityPackChrgHichrgCdCancel, handle, param)` // Cancel McAfee Multi Access [-> IT1-2017-0000039 MOD: passes handle, param] |

**Block 2.2** — [ELSE-IF] Premium Pack cancellation `[ENABLE.equals(premiumPackTgFlgCancel)]` (L426)

> Deactivates SmartLink Premium and its associated Remote Support Plus and McAfee services.

| # | Type | Code |
|---|------|------|
| 1 | SET | `updDtmCancel = dslWrib(WRIB_SVC_SMARTLINK_PREMIUM, svcKeiNoCancel, PCRSCD_SMARTLINK_PREMIUM, PPLANCDSMARTLINK_PREMIUM, premiumPackChrgHichrgCdCancel, updDtmCancel)` // Cancel Premium Pack (SmartLink) |
| 2 | SET | `updDtmCancel = dslOption(OP_SVC_CD_RMTSPRT_PLUS, svcKeiNoCancel, OPSVC_PCRSRMTSPRT_PLUS, OPSVC_PPLANRMTSPRT_PLUS, updDtmCancel, hikitugiUm, premiumPackChrgHichrgCdCancel, handle, param)` // Cancel Remote Support Plus [-> IT1-2017-0000039 MOD] |
| 3 | SET | `updDtmCancel = dslOption(OP_SVC_CD_MCAFEE_MULTI_ACCSS, svcKeiNoCancel, PCRSCD_MCAFEE_MULTI_ACCSS, PPLANCDSecure_Multi_ACCSS, updDtmCancel, hikitugiUm, premiumPackChrgHichrgCdCancel, handle, param)` // Cancel McAfee [-> IT1-2017-0000039 MOD] |

**Block 3** — [IF] InetSGWL cancellation `[ENABLE.equals(inetsgwlTgFlgCancel)]` (L438)

> Deactivates the Internet Gateway service using the updated DSL option call that includes handle and param (IT1-2017-0000039 MOD).

| # | Type | Code |
|---|------|------|
| 1 | SET | `updDtmCancel = dslOption(OP_SVC_CD_INETSGWL, svcKeiNoCancel, PCRSCD_INETSGW_FOR_EO, PPLANCDSINETSGW_FOR_EO, updDtmCancel, hikitugiUm, inetsgwlChrgHichrgCdCancel, handle, param)` // Cancel InetSGWL [-> IT1-2017-0000039 MOD] |

**Block 4** — [IF] NTfMLPRM cancellation `[ENABLE.equals(ntfmlprm_tg_flgCancel)]` (L444)

> Deactivates the Notification Mail Premium service.

| # | Type | Code |
|---|------|------|
| 1 | SET | `updDtmCancel = dslOption(OP_SVC_CD_NTFMLPRM, svcKeiNoCancel, PCRSCD_NTFMLPRM_FOR_EO, PPLANCDSNTFMLPRM_FOR_EO, updDtmCancel, hikitugiUm, ntfmlprmChrgHichrgCdCancel, handle, param)` // Cancel NTfMLPRM [-> IT1-2017-0000039 MOD] |

**Block 5** — [IF] Remote Support Pro cancellation `[ENABLE.equals(rmtsprtTgFlgCancel)]` (L451)

> Deactivates Remote Support Pro. Notably, this branch passes `JKKStrConst.KARA` (free/empty charge) as the charge code instead of the cancellation-side charge code, indicating Remote Support Pro is treated as a free service during cancellation.

| # | Type | Code |
|---|------|------|
| 1 | SET | `updDtmCancel = dslOption(OP_SVC_CD_RMTSPRT_PLUS, svcKeiNoCancel, OPSVC_PCRSRMTSPRT_PLUS, OPSVC_PPLANRMTSPRT_PLUS, updDtmCancel, hikitugiUm, KARA, handle, param)` // Cancel RMTSPRT_PLUS with KARA charge [-> ANK-4577-00-00 ADD, `JKKStrConst.KARA`] |

**Block 6** — [IF] Service contract number match `[svcKeiNoCancel.equals(svcKeiNoAdd)]` (L463)

> If the cancellation and registration side share the same service contract number, the registration update timestamp is synchronized to the cancellation update timestamp to ensure data consistency.

| # | Type | Code |
|---|------|------|
| 1 | SET | `updDtmAdd = updDtmCancel` // Synchronize update timestamp for same contract number |

**Block 7** — [IF] Registration processing: Security Pack or Premium Pack registration enabled `[ENABLE.equals(securityPackTgFlgAdd) || ENABLE.equals(premiumPackTgFlgAdd)]` (L468)

> Initiates registration (activation) of security pack and premium pack services.

**Block 7.1** — [IF] Security Pack registration `[ENABLE.equals(securityPackTgFlgAdd)]` (L471)

> Provisions the Security Pack service.

| # | Type | Code |
|---|------|------|
| 1 | SET | `updDtmAdd = addWrib(WRIB_SVC_CD_SECURITY_PACK, svcKeiNoAdd, PCRSCD_SECURITY_PACK_MSKM, PPLANCDSecurity_Pack_MSKM, updDtmAdd)` // Register Security Pack |

**Block 7.2** — [ELSE-IF] Premium Pack registration `[ENABLE.equals(premiumPackTgFlgAdd)]` (L475)

> Provisions the SmartLink Premium service.

| # | Type | Code |
|---|------|------|
| 1 | SET | `updDtmAdd = addWrib(WRIB_SVC_SMARTLINK_PREMIUM, svcKeiNoAdd, PCRSCD_SMARTLINK_PREMIUM, PPLANCDSMARTLINK_PREMIUM, updDtmAdd)` // Register Premium Pack |

**Block 7.3** — [EXEC] Remote Support Plus registration (always executed within Block 7) (L479)

> Remote Support Plus is always registered alongside Security Pack or Premium Pack. Uses `addSupportOption` (not plain `addOption`).

| # | Type | Code |
|---|------|------|
| 1 | SET | `updDtmAdd = addSupportOption(OP_SVC_CD_RMTSPRT_PLUS, svcKeiNoAdd, OPSVC_PCRSRMTSPRT_PLUS, OPSVC_PPLANRMTSPRT_PLUS, updDtmAdd, kisanyymd)` // Register RMTSPRT_PLUS [-> `KEY_KISAN_YMD`] |

**Block 7.4** — [EXEC] McAfee registration (always executed within Block 7) (L483)

> Registers McAfee Multi Access. Notably uses a hardcoded empty string `""` for the start date instead of the Kisan YMD value (IT1-2017-0000039 MOD).

| # | Type | Code |
|---|------|------|
| 1 | SET | `updDtmAdd = addOption(OP_SVC_CD_MCAFEE_MULTI_ACCSS, svcKeiNoAdd, PCRSCD_MCAFEE_MULTI_ACCSS, PPLANCDSecure_Multi_ACCSS, updDtmAdd, "")` // Register McAfee [-> IT1-2017-0000039 MOD: hardcoded empty start date] |

**Block 8** — [IF] InetSGWL registration `[ENABLE.equals(inetsgwlTgFlgAdd)]` (L488)

> Registers the Internet Gateway service.

| # | Type | Code |
|---|------|------|
| 1 | SET | `updDtmAdd = addOption(OP_SVC_CD_INETSGWL, svcKeiNoAdd, PCRSCD_INETSGW_FOR_EO, PPLANCDSINETSGW_FOR_EO, updDtmAdd, inetsgwlStartYymdAdd)` // Register InetSGWL [-> `inetsgwl_start_ymd_add`] |

**Block 9** — [IF] NTfMLPRM registration `[ENABLE.equals(ntfmlprm_tg_flgAdd)]` (L493)

> Registers the Notification Mail Premium service.

| # | Type | Code |
|---|------|------|
| 1 | SET | `updDtmAdd = addOption(OP_SVC_CD_NTFMLPRM, svcKeiNoAdd, PCRSCD_NTFMLPRM_FOR_EO, PPLANCDSNTFMLPRM_FOR_EO, updDtmAdd, ntfmlprmStartYymdAdd)` // Register NTfMLPRM [-> `ntfmlprm_start_ymd_add`] |

**Block 10** — [IF] Remote Support Pro registration `[ENABLE.equals(rmtsprtTgFlgAdd)]` (L498)

> Registers Remote Support Pro. Uses `addSupportOption` (same as RMTSPRT_PLUS in Block 7.3) and the Kisan YMD for the start date.

| # | Type | Code |
|---|------|------|
| 1 | SET | `updDtmAdd = addSupportOption(OP_SVC_CD_RMTSPRT_PLUS, svcKeiNoAdd, OPSVC_PCRSRMTSPRT_PLUS, OPSVC_PPLANRMTSPRT_PLUS, updDtmAdd, kisanyymd)` // Register RMTSPRT_PLUS [-> ANK-4577-00-00 ADD] |

**Block 11** — [IF] SOD issuance target `[sodHakkoCCTrgtDataList != null && sodHakkoCCTrgtDataList.size() > 0]` (L505)

> After all registration processing, checks if there are Service Order Data (SOD) issuance targets. If so, dispatches the SOD issuance CC with function code `FUNC_CD_1`. This was added in IT1-2017-0000094 to replace the previous order-CC-based approach.

| # | Type | Code |
|---|------|------|
| 1 | CALL | `invokeHakkoSODCC(handle, param, FUNC_CD_1)` // Issue Service Order [-> IT1-2017-0000094 ADD, `FUNC_CD_1`] |

**Block 12** — [SET] Update cancellation info list with post-cancellation timestamp (L511)

> Writes the final cancellation update timestamp (`updDtmCancel`) into the first element of the cancellation information list stored in `inMap`.

| # | Type | Code |
|---|------|------|
| 1 | SET | `inListCancel = (ArrayList) this.inMap.get(KEY_CANCEL_INFO_LIST)` // Retrieve cancellation info list [-> `JKKSecurityPackOperateCC.KEY_CANCEL_INFO_LIST`] |
| 2 | IF | `inListCancel != null` (L513) |
| 2.1 | SET | `childMap = (HashMap) inListCancel.get(0)` |
| 2.2 | SET | `childMap.put("upd_dtm_af", updDtmCancel)` // Update timestamp after (cancel) [-> `"upd_dtm_af"`] |

**Block 13** — [SET] Update registration info list with post-registration timestamp (L521)

> Writes the final registration update timestamp (`updDtmAdd`) into the first element of the registration information list stored in `inMap`.

| # | Type | Code |
|---|------|------|
| 1 | SET | `inListAdd = (ArrayList) this.inMap.get(KEY_ADD_INFO_LIST)` // Retrieve registration info list [-> `JKKSecurityPackOperateCC.KEY_ADD_INFO_LIST`] |
| 2 | IF | `inListAdd != null` (L523) |
| 2.1 | SET | `childMap = (HashMap) inListAdd.get(0)` |
| 2.2 | SET | `childMap.put("upd_dtm_af", updDtmAdd)` // Update timestamp after (add) [-> `"upd_dtm_af"`] |

**Block 14** — [EXEC] Log completion (L530)

| # | Type | Code |
|---|------|------|
| 1 | EXEC | `printlnEjbLog("JKKSecurityPackOperateCC.main end")` |

## 7. Glossary

| Term | Type | Business Meaning |
|------|------|------------------|
| `svc_kei_no` | Field | Service contract number — the unique identifier for a customer's service contract line item. |
| `svc_kei_no_cancel` | Field | Service contract number on the cancellation side — the contract being decommissioned. |
| `svc_kei_no_add` | Field | Service contract number on the registration side — the contract being provisioned. |
| `upd_dtm_bf` | Field | Update date-time before — the timestamp of the last update prior to the current operation. |
| `upd_dtm_af` | Field | Update date-time after — the timestamp written back after processing completes. |
| `hikitugiUm` | Field | Inheritance flag — indicates whether the service contract is inherited from a predecessor contract (affects cancellation timestamp logic). |
| `security_pack_tg_flg` | Field | Target flag for Security Pack — when set to `ENABLE`, triggers Security Pack registration or cancellation. |
| `premium_pack_tg_flg` | Field | Target flag for Premium Pack — when set to `ENABLE`, triggers SmartLink Premium registration or cancellation. |
| `inetsgwl_tg_flg` | Field | Target flag for Internet Gateway (InetSGWL) service. |
| `ntfmlprm_tg_flg` | Field | Target flag for Notification Mail Premium service. |
| `rmtsprt_tg_flg` | Field | Target flag for Remote Support Pro service. |
| `chrg_hichrg_cd` | Field | Charge non-charge code — determines whether the service is billed or free. |
| `KARA` | Constant | Free/empty charge indicator — used when a service is registered or cancelled without charge (Remote Support Pro during cancellation). [-> `JKKStrConst.KARA`] |
| `ENABLE` | Constant | The string literal indicating a target flag is active/enabled. |
| `FUNC_CD_1` | Constant | Function code passed to SOD issuance CC — identifies the SOD issuance operation type. |
| `sodHakkoCCTrgtDataList` | Field | Service Order Data issuance CC target data list — when non-empty, triggers SOD issuance processing. |
| `KEY_HIKITUGI_UM` | Constant | Key for the inheritance flag in `ccWorkMap`. [-> `JKKSecurityPackOperateCC.KEY_HIKITUGI_UM`] |
| `KEY_CANCEL_INFO_LIST` | Constant | Key for the cancellation information list in `inMap`. [-> `JKKSecurityPackOperateCC.KEY_CANCEL_INFO_LIST`] |
| `KEY_ADD_INFO_LIST` | Constant | Key for the registration information list in `inMap`. [-> `JKKSecurityPackOperateCC.KEY_ADD_INFO_LIST`] |
| `KEY_KISAN_YMD` | Constant | Key for the start date (year/month/day) in `ccWorkMap`. [-> `JKKSecurityPackOperateCC.KEY_KISAN_YMD`] |
| `dslWrib` | Method | Deactivate W-rib (W-リブ) service — cancels W-rib based services like Security Pack and SmartLink Premium. |
| `dslOption` | Method | Deactivate option service — cancels optional/add-on services like Remote Support Plus, McAfee, InetSGWL, NTfMLPRM. |
| `addWrib` | Method | Add W-rib service — registers W-rib based services. |
| `addOption` | Method | Add option service — registers optional/add-on services. |
| `addSupportOption` | Method | Add support option service — a variant of addOption for support-type services (Remote Support Plus). |
| `invokeHakkoSODCC` | Method | Invoke issuance CC — dispatches Service Order Data (SOD) issuance to downstream processing. |
| `ccWorkMap` | Field | Component work map — a shared Map<String, Object> used to pass data between CC processing steps. |
| `inMap` | Field | Input map — holds the cancellation and registration information lists for writing back post-processing timestamps. |
| SOD | Acronym | Service Order Data — telecom order fulfillment entity used in Fujitsu's network service management. |
| Security Pack | Business term | Anti-virus / endpoint protection service bundle for consumer broadband subscribers. |
| SmartLink Premium / Premium Pack | Business term | Premium bundled service (SmartLink) offering enhanced features beyond the base Security Pack. |
| RMTSPRT_PLUS | Business term | Remote Support Plus — remote IT assistance service for end users. |
| McAfee Multi Access | Business term | McAfee multi-device security software subscription bundled with broadband. |
| InetSGWL | Business term | Internet Gateway service — network gateway functionality for residential broadband. |
| NTfMLPRM | Business term | Notification Mail Premium — premium email notification service. |
| W-rib / WRIB | Business term | W-rib (ワイヤード・リブ) — Fujitsu's W-branch (Wリブ) home networking service platform. |
| `OP_SVC_CD_` | Prefix | Option service code prefix — identifies optional/add-on service types. |
| `PCRS_CD_` | Constant | Service plan contract code — maps a service to its plan contract identifier. |
| `PPLAN_CD_` | Constant | Plan code — the specific plan tier within a service. |
| `WRIB_SVC_CD_` | Constant | W-rib service code — identifies W-rib based services. |
| `OPSVC_PCRS_` | Constant | Option service plan contract code prefix. |
| `OPSVC_PPLAN_` | Constant | Option service plan code prefix. |
