# Business Logic — JKKPauseChgRsvClCC.makeProgress() [88 LOC]

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

## 1. Role

### JKKPauseChgRsvClCC.makeProgress()

The `makeProgress` method registers **progress status updates** (進捗登録) to the service contract management system after a pause-change or reservation-cancel operation has been executed. It acts as the **progress-tracking dispatcher** — determining which business milestones have been reached based on changes to the service contract status, and sequentially registering each milestone via the EKK1091D010 Service Component.

The method supports **two service types** based on the launch source code:
- **Online** (`KIDO_CD_ONLINE = "01"`): Registers an initial progress code "1932" (online pause-change registration complete) before processing status transitions.
- **Batch** (`KIDO_CD_BATCH = "02"`): Skips the initial progress code; only registers actual status transition milestones.

The method implements a **builder-dispatch pattern**: it first builds a list of progress status codes to register (by comparing the old and new service contract statuses), then iterates over each code, invoking the mapper to compose the request, executing the Service Component, and mapping the result back. This ensures all relevant progress milestones are recorded in sequence, with each iteration independently error-checked.

It plays a **central role in the post-operation progress tracking workflow**: called by `executePauseRls()`, `pauseChgTranBat()`, `pauseChgTranOn()`, and `pauseRsvClTran()` — all entry points for pause-change and reservation-cancel operations. The method bridges the gap between service contract execution and operational progress recording, ensuring the system's internal progress tracking stays aligned with the actual state of the service contract.

The method is private and operates within the **CC (Common Component) layer**, serving as an internal utility called by the public control transaction methods of the same class. It was introduced in 2012-11-29 (Lot 2, IT1-2012-0002219) to correct improper progress construction.

## 2. Processing Pattern (Detailed Business Logic)

```mermaid
flowchart TD
    START(["makeProgress params"])
    START --> GET_DATA["Get trgtMap from param.getData"]
    GET_DATA --> GET_PAUSE_MAP["Get inMap from trgtMap.get(PAUSE_RECEPT_MAP)"]
    GET_PAUSE_MAP --> GET_MSG["Get msgEKK0081A010 from resultHash"]
    GET_MSG --> GET_LAST_STAT["Get lastStat from msg.getString(SVC_KEI_STAT)"]
    GET_LAST_STAT --> COPY_STAT["Copy newStat = lastStat"]
    COPY_STAT --> CHECK_MSG_C080{msgEKK0081C080
exists?}
    CHECK_MSG_C080 -->|Yes| UPDATE_STAT["Update newStat from msgEKK0081C080"]
    CHECK_MSG_C080 -->|No| INIT_LIST["Init prgStatList"]
    UPDATE_STAT --> INIT_LIST
    INIT_LIST --> GET_KIDO["Get kido_cd from inMap"]
    GET_KIDO --> CHECK_ONLINE{kido_cd == ONLINE?}
    CHECK_ONLINE -->|Yes| ADD_1932["Add 1932 to prgStatList"]
    CHECK_ONLINE -->|No| COMPARE_STAT
    ADD_1932 --> COMPARE_STAT{lastStat
neq newStat?}
    COMPARE_STAT -->|Yes| COMPARE_KYUS{lastStat neq KYUS
and newStat == KYUS?}
    COMPARE_STAT -->|No| GET_PRG_IDO
    COMPARE_KYUS -->|Yes| ADD_2401["Add 2401 - Suspension
start complete"]
    COMPARE_KYUS -->|No| COMPARE_RLS{lastStat == KYUS
and newStat neq KYUS?}
    COMPARE_RLS -->|Yes| ADD_2402["Add 2402 - Suspension
cancellation complete"]
    COMPARE_RLS -->|No| GET_PRG_IDO
    ADD_2401 --> GET_PRG_IDO
    ADD_2402 --> GET_PRG_IDO
    GET_PRG_IDO["Get prgIdoDtm from inMap"]
    GET_PRG_IDO --> CHECK_PRG_DTM{prgIdoDtm
null or empty?}
    CHECK_PRG_DTM -->|Yes| SET_SYS_DTM["Set prgIdoDtm from
getSysDateTimeStamp"]
    CHECK_PRG_DTM -->|No| INIT_RESULT
    SET_SYS_DTM --> INIT_RESULT["Set rsltEKK1091D010 = null"]
    INIT_RESULT --> LOOP_START{i < prgStatList.size?}
    LOOP_START -->|Yes| EDIT_MSG["mapper.editInMsg
EKK1091D010"]
    EDIT_MSG --> SC_RUN["scCall.run(mapEKK1091D010,
handle)"]
    SC_RUN --> EDIT_RESULT["mapper.editResultRP
EKK1091D010"]
    EDIT_RESULT --> ERR_CHK["errChk(rsltEKK1091D010)"]
    ERR_CHK --> INCR["i++"]
    INCR --> LOOP_START
    LOOP_START -->|No| RETURN["Return rsltEKK1091D010"]
    RETURN --> END_NODE(["End"])
```

## 3. Parameter Analysis

| No | Parameter Name | Type | Business Description |
|----|---------------|------|---------------------|
| 1 | `handle` | `SessionHandle` | Session management handler — carries database connection, transaction context, and auditing information for the current business operation. Used when executing the Service Component (SC) call to ensure all progress registration operations participate in the correct transaction boundary. |
| 2 | `param` | `IRequestParameterReadWrite` | Request parameter object — a bidirectional data carrier holding the model data group and control map. It stores the pause reception map (from `fixedText`), receives the composed progress registration request data via the mapper, and receives the mapped result data after SC execution. Its `getData(fixedText)` call retrieves the user-defined data map containing the pause reception context. |
| 3 | `fixedText` | `String` | User-defined arbitrary string — serves as the key to retrieve the target data map from `param`. It identifies which data group within the request parameter object contains the pause reception context, effectively routing the method to the correct data payload for the current business operation. |
| 4 | `mskmDtlNo` | `String` | Service detail number — an identifier for a specific service contract line item. Passed through to the EKK1091D010 progress registration SC to link the progress update to the correct service detail record in the system. |
| 5 | `resultHash` | `HashMap<String, Object>` | Result hash buffer — holds execution results from previously called Service Components, specifically the EKK0081A010 (service contract consent meeting) result and the EKK0081C080 (service contract status change) result. The method reads the service contract status from these results to determine which progress codes to register. It is also passed to the progress registration mapper for composed request building. |

**External State / Instance Fields Read:**

| Field | Type | Business Description |
|-------|------|---------------------|
| `this.mapper` | `JKKPauseChgRsvClMapperCC` | Mapping component — transforms request/response data between CAANMsg format and HashMap format for the EKK1091D010 progress registration SC. Provides `editInMsgEKK1091D010()` and `editResultRPEKK1091D010()` methods. |
| `this.scCall` | `ServiceComponentRequestInvoker` | SC invocation utility — executes the EKK1091D010 Service Component with the composed request map. Responsible for the actual SC dispatch to the service layer. |

## 4. CRUD Operations / Called Services

| CRUD | SC / CBS | SC Code | Entity / DB | Operation Description |
|------|----------|---------|-------------|----------------------|
| R | `JKKPauseChgRsvClMapperCC.editInMsgEKK1091D010` | EKK1091D010 | KK_T_PRG_INFO (inferred) | Reads request parameter data, pause reception map, and result hash to compose the progress registration request map (HashMap) for EKK1091D010. |
| C/R | `ServiceComponentRequestInvoker.run` | EKK1091D010 | KK_T_PRG_INFO (inferred) | Executes the EKK1091D010 progress registration Service Component. Performs create/registration of progress status records to the database. |
| U | `JKKPauseChgRsvClMapperCC.editResultRPEKK1091D010` | EKK1091D010 | - | Maps the SC execution result back into the request parameter object (`param`) for downstream processing and response building. |
| R | `JKKBpCommon.getSysDateTimeStamp` | - | - | Retrieves the current system date-time stamp used as the progress displacement datetime when no displacement datetime is available in the input map. |
| - | `JKKPauseChgRsvClCC.errChk` | - | - | Error checking — validates the SC execution result and throws an exception if errors are detected. Internal method of the same class. |
| - | `JKKPauseChgRsvClCC.isNull` | - | - | Null check utility method (referenced in code graph as a called method). |

**CRUD Classification Notes:**
- The EKK1091D010 Service Component performs a **Create** operation (progress registration — 進捗登録) into the progress information table (inferred as `KK_T_PRG_INFO` from the EKK1091D010 naming convention, which follows the pattern where `EKK1091` = progress management, `D010` = detail registration).
- The mapper's `editInMsgEKK1091D010` performs a **Read** — it extracts and assembles data from input maps without writing to any entity.
- The mapper's `editResultRPEKK1091D010` performs an **Update** — it writes mapped results back to the request parameter.

## 5. Dependency Trace

| # | Caller (Screen/Batch) | Call Chain (Full Path to this Method) | Terminal (SC / CRUD / Entity) |
|---|----------------------|--------------------------------------|-------------------------------|
| 1 | Method: `executePauseRls()` | `executePauseRls()` -> `makeProgress()` | `editResultRPEKK1091D010 [U]`, `errChk [-]` |
| 2 | Method: `pauseChgTranBat()` | `pauseChgTranBat()` -> `makeProgress()` | `editResultRPEKK1091D010 [U]`, `errChk [-]` |
| 3 | Method: `pauseChgTranOn()` | `pauseChgTranOn()` -> `makeProgress()` | `editResultRPEKK1091D010 [U]`, `errChk [-]` |
| 4 | Method: `pauseRsvClTran()` | `pauseRsvClTran()` -> `makeProgress()` | `editResultRPEKK1091D010 [U]`, `errChk [-]` |

**Notes:**
- All callers are **private/internal methods** within `JKKPauseChgRsvClCC` — they handle the pause-change and reservation-cancel transaction workflows.
- `executePauseRls()` — Handles pause release execution (public entry point for online pause release).
- `pauseChgTranBat()` — Handles pause-change batch transaction.
- `pauseChgTranOn()` — Handles pause-change online transaction.
- `pauseRsvClTran()` — Handles reservation-cancel transaction.
- The method is a **terminal internal component** — no screen/batch entry points are directly within the call chain; it is always called from within the same class's transaction control methods.

## 6. Per-Branch Detail Blocks

**Block 1** — [SET] Retrieve user data and pause reception map (L1558-L1560)

> Extracts the target data map from the request parameter and retrieves the pause reception sub-map.

| # | Type | Code |
|---|------|------|
| 1 | SET | `trgtMap = param.getData(fixedText)` // User data map (Japanese: ユーザーデータ情報) |
| 2 | SET | `inMap = trgtMap.get(JKKPauseChgRsvClConstCC.PAUSE_RECEPT_MAP)` // Pause reception map (Japanese: 休止受付マップ) [-> PAUSE_RECEPT_MAP="PAUSE_RECEPT_MAP" (JKKPauseChgRsvClConstCC.java)] |

**Block 2** — [SET] Retrieve service contract consent meeting result (L1563-L1564)

> Gets the result from the service contract consent meeting SC call (EKK0081A010) stored in the result hash.

| # | Type | Code |
|---|------|------|
| 1 | SET | `msgEKK0081A010 = resultHash.get(RESULT_KEY_EKK0081A010)` // [-> RESULT_KEY_EKK0081A010="EKK0081A010" (L140)] |

**Block 3** — [SET] Read pre-processing service contract status (L1567)

> Extracts the service contract status before the operation, indicating the state before the pause change.

| # | Type | Code |
|---|------|------|
| 1 | SET | `lastStat = msgEKK0081A010.getString(EKK0081A010CBSMsg1List.SVC_KEI_STAT)` // Service contract status before processing (Japanese: 処理前のサービス契約ステータス) |

**Block 4** — [SET] Initialize new status with last status as default (L1570)

> Creates a working copy of the last status. If the status has not changed, this default value will remain.

| # | Type | Code |
|---|------|------|
| 1 | SET | `newStat = new String(lastStat)` // New service contract status after pause change (Japanese: 休止変更後のサービス契約ステータス) |

**Block 5** — [IF] Check for post-change status from EKK0081C080 (L1571-L1576)

> Retrieves the actual post-change service contract status from EKK0081C080 result if available.

| # | Type | Code |
|---|------|------|
| 1 | SET | `msgEKK0081C080 = resultHash.get(RESULT_HASH_KEY_EKK0081C080)` // [-> RESULT_HASH_KEY_EKK0081C080="EKK0081C080" (L136)] |
| 2 | IF | `msgEKK0081C080 != null && !msgEKK0081C080.isNull(EKK0081C080CBSMsg.SVC_KEI_STAT)` |
| 3 | SET | `newStat = msgEKK0081C080.getString(EKK0081C080CBSMsg.SVC_KEI_STAT)` // Override with actual post-change status |

**Block 6** — [SET] Initialize progress status list (L1579-L1580)

> Creates the list that will hold the progress status codes to be registered.

| # | Type | Code |
|---|------|------|
| 1 | SET | `prgStatList = new ArrayList<String>()` // Progress status list (Japanese: 進捗ステータスリスト) |

**Block 7** — [IF] Online launch check — add initial progress code (L1585-L1590)

> When the operation is triggered from an online screen (not batch), the comment states "休止受付変更登録完了" (pause reception change registration complete). Batch operations skip this step because batch only processes suspension start/cancellation without change registration.

| # | Type | Code |
|---|------|------|
| 1 | SET | `kido_cd = inMap.get(JKKPauseChgRsvClConstCC.KIDO_CD)` // Launch source code (Japanese: 起動元コード) [-> KIDO_CD (JKKPauseChgRsvClConstCC.java)] |
| 2 | IF | `KIDO_CD_ONLINE.equals(kido_cd)` [-> KIDO_CD_ONLINE="01" (JKKPauseChgRsvClCC.java:L132)] |
| 3 | SET | `prgStatList.add("1932")` // Progress status code for "Online pause-change registration complete" (Japanese: 進捗ステータス(オンラインの休止受付変更登録完了)) |

**Block 8** — [IF] Service contract status changed check (L1593-L1602)

> Compares the before/after service contract statuses to determine what progress codes to register.

| # | Type | Code |
|---|------|------|
| 1 | IF | `!lastStat.equals(newStat)` // Status has changed |
| 2 | **Block 8.1** — [IF] Status transitioned to suspension/pause (L1596-L1598) |
| | | > If the status changed from non-KYUS to KYUS (suspension), this means the suspension start date is today. Registers progress code 2401. |
| | | | # | Type | Code |
| | | |---|------|------|
| | | | 1 | IF | `!SVC_KEI_STAT_KYUS.equals(lastStat) && SVC_KEI_STAT_KYUS.equals(newStat)` [-> SVC_KEI_STAT_KYUS="210" (JKKPauseChgRsvClCC.java:L92)] |
| | | | 2 | SET | `prgStatList.add("2401")` // Progress status: Suspension start complete (Japanese: 進捗ステータス(休止開始完了)) |
| 3 | **Block 8.2** — [ELSE-IF] Status changed from suspension to non-suspension (L1600-L1602) |
| | | > If the status changed from KYUS to non-KYUS, the suspension cancellation date is today. Registers progress code 2402. |
| | | | # | Type | Code |
| | | |---|------|------|
| | | | 1 | IF | `SVC_KEI_STAT_KYUS.equals(lastStat) && !SVC_KEI_STAT_KYUS.equals(newStat)` |
| | | | 2 | SET | `prgStatList.add("2402")` // Progress status: Suspension cancellation complete (Japanese: 進捗ステータス(休止解除完了)) |

**Block 9** — [SET] Retrieve progress displacement datetime (L1605-L1614)

> Gets the progress displacement datetime from the input map. If not available (null or empty), falls back to the current system datetime stamp. Added in 2013/07/29 update (UPD START comment) — displacement datetime is only available when the operation was executed from error-reservation reflection.

| # | Type | Code |
|---|------|------|
| 1 | SET | `prgIdoDtm = inMap.get(JKKDslRunConstCC.PRG_IDO_DTM)` // Progress displacement datetime (Japanese: 進捗異動日時) [-> PRG_IDO_DTM="PRG_IDO_DTM" (JKKDslRunConstCC.java)] |
| 2 | IF | `prgIdoDtm == null || "".equals(prgIdoDtm)` |
| 3 | SET | `prgIdoDtm = JKKBpCommon.getSysDateTimeStamp()` // System datetime stamp (Japanese: 実日付 fallback) |

**Block 10** — [SET] Initialize result variable (L1616)

> Declares the result variable for the progress registration SC, initialized to null. Will be set within the loop.

| # | Type | Code |
|---|------|------|
| 1 | SET | `rsltEKK1091D010 = null` // EKK1091D010 registration result (Japanese: 進捗登録の結果) |

**Block 11** — [FOR] Iterate over progress status codes and register each (L1617-L1630)

> Loops through each progress status code in the list. For each code, it: (1) composes the EKK1091D010 request map via the mapper, (2) executes the SC call, (3) maps the result back to the parameter, and (4) performs error checking.

| # | Type | Code |
|---|------|------|
| 1 | FOR | `i = 0; i < prgStatList.size(); i++` |
| 2 | **Block 11.1** — [CALL] Compose progress registration request map (L1620-L1627) |
| | | > Builds the HashMap for EKK1091D010 progress registration with the current progress status code and displacement datetime. |
| | | | # | Type | Code |
| | | |---|------|------|
| | | | 1 | SET | `mapEKK1091D010 = mapper.editInMsgEKK1091D010(param, fixedText, mskmDtlNo, prgStatList.get(i), prgIdoDtm, resultHash)` // Progress registration map (Japanese: 進捗登録用マップ編集) |
| 3 | **Block 11.2** — [CALL] Execute progress registration SC (L1630) |
| | | > Runs the EKK1091D010 Service Component to register the progress status. |
| | | | # | Type | Code |
| | | |---|------|------|
| | | | 1 | SET | `rsltEKK1091D010 = scCall.run(mapEKK1091D010, handle)` // SC execution result |
| 4 | **Block 11.3** — [CALL] Map SC result back to parameter (L1631) |
| | | > Writes the SC result into the request parameter for downstream consumers. |
| | | | # | Type | Code |
| | | |---|------|------|
| | | | 1 | EXEC | `mapper.editResultRPEKK1091D010(rsltEKK1091D010, param, fixedText)` // Result mapping (Japanese: 進捗登録) |
| 5 | **Block 11.4** — [CALL] Error check (L1632) |
| | | > Validates the SC result and throws if errors are detected. |
| | | | # | Type | Code |
| | | |---|------|------|
| | | | 1 | EXEC | `errChk(rsltEKK1091D010)` // Error check |

**Block 12** — [RETURN] Return last SC result (L1635)

> Returns the result from the last EKK1091D010 SC execution. This result is used for subsequent processing, such as linking to fault cell abnormality registration (Japanese: ファルトセル・スマートバリュー異常登録用の最後の結果を連系する).

| # | Type | Code |
|---|------|------|
| 1 | RETURN | `return rsltEKK1091D010` |

## 7. Glossary

| Term | Type | Business Meaning |
|------|------|------------------|
| `makeProgress` | Method | Progress registration — registers progress status codes to the system after a pause-change or reservation-cancel operation. |
| 進捗登録 (Shincho Touroku) | Japanese term | Progress registration — the business process of recording operational milestones (progress status codes) in the system to track the lifecycle of service contract changes. |
| 休止 (Kyūshi) | Japanese term | Suspension/Pause — the service contract status (code "210") indicating the service is temporarily suspended but not terminated. |
| 休止開始完了 (Kyūshi Kaishi Kanryō) | Japanese term | Suspension start complete — progress status code "2401" indicating that the suspension start operation has been completed. |
| 休止解除完了 (Kyūshi Kaito Kanryō) | Japanese term | Suspension cancellation complete — progress status code "2402" indicating that the suspension has been lifted/cancelled. |
| 休止受付変更登録完了 (Kyūshi Uketsuke Henko Touroku Kanryō) | Japanese term | Pause reception change registration complete — progress status code "1932" indicating that online pause-change registration has been completed. |
| SVC_KEI_STAT | Field | Service contract status — a 3-digit code representing the current state of a service contract (e.g., "100" = Service provision, "210" = Suspended, "910" = Terminated, "920" = Canceled). |
| SVC_KEI_STAT_KYUS | Constant | Service contract status: Suspended/Paused — value "210". |
| SVC_KEI_STAT_TKC | Constant | Service contract status: Service provision — value "100". |
| SVC_KEI_STAT_STP | Constant | Service contract status: Stopped — value "220". |
| SVC_KEI_STAT_DSL | Constant | Service contract status: Terminated — value "910". |
| SVC_KEI_STAT_CANCEL | Constant | Service contract status: Canceled — value "920". |
| KIDO_CD | Field | Launch source code — indicates whether the operation was triggered from an online screen or batch process. |
| KIDO_CD_ONLINE | Constant | Launch source: Online — value "01". Indicates the operation was triggered from a user-facing screen. |
| KIDO_CD_BATCH | Constant | Launch source: Batch — value "02". Indicates the operation was triggered from a batch job. |
| PAUSE_RECEPT_MAP | Constant | Pause reception map key — used to retrieve the pause reception HashMap from the target data map. |
| PRG_IDO_DTM | Field | Progress displacement datetime — the date-time when the progress status changed. Only available when executed from error-reservation reflection. |
| EKK0081A010 | SC Code | Service contract consent meeting Service Component — retrieves service contract agreement information. |
| EKK0081C080 | SC Code | Service contract status change Service Component — contains the updated service contract status after the pause-change operation. |
| EKK1091D010 | SC Code | Progress registration detail Service Component — registers progress status codes to the system. |
| resultHash | Parameter | Result hash buffer — stores execution results from prior Service Component calls (EKK0081A010, EKK0081C080) for use in subsequent processing. |
| fixedText | Parameter | User-defined arbitrary string — acts as the key to identify and retrieve the correct data group from the request parameter. |
| mskmDtlNo | Parameter | Service detail number — internal tracking identifier for a specific service contract line item. |
| mapper | Instance field | JKKPauseChgRsvClMapperCC — mapping component that transforms data between CAANMsg format and HashMap format for SC requests/responses. |
| scCall | Instance field | ServiceComponentRequestInvoker — the SC invocation utility that dispatches Service Component calls to the service layer. |
| SOD | Acronym | Service Order Data — telecom order fulfillment entity (referenced in related class constants). |
| FTTH | Business term | Fiber To The Home — fiber-optic internet service (referenced in class Javadoc for context). |
