PEGACPLSA23V1 practice question 12 of 15

[Application Design] Assume that two customers are simultaneously attempting to book tickets for the same flight, which has limited seat availability. How does the design pattern for limited availability and concurrency handle this scenario? (Choose Two)

Full set: 60 questions
Answer options
A: The design pattern records booking attempts for both customers. If the flight exceeds capacity, the customer goes on a waiting list. The waiting list clears after a certain period, and the customer receives notification of the results.
B: The design pattern rejects both bookings, entering an ambiguity mode. It prompts customers to try again later. In the second attempt, it prioritizes one customer based on a first-come-first-serve basis.
C: The design pattern allows both customers to book; however, one receives a notification about no available seats after the analysis. Correct answer
D: The design pattern prioritizes customer bookings on a first-come-first-serve basis. Correct answer
Correct Answer:
C. The design pattern allows both customers to book; however, one receives a notification about no available seats after the analysis.; D. The design pattern prioritizes customer bookings on a first-come-first-serve basis.
Explanation

The Pega design pattern for handling limited availability and concurrency, such as booking a flight with few seats, relies on a case locking strategy. The fundamental principle is first-come-first-serve (D), where the first user to successfully acquire a lock and commit the transaction secures the resource. In a common implementation using optimistic locking, both users can initiate the booking process. However, when the first user confirms their booking, the system updates the flight's seat count. When the second user attempts to commit, the system detects the data has changed (no seats left) and notifies them that the booking cannot be completed, as described in (C).

Why Incorrect

A: This describes a waitlisting pattern, which is a different business process. The core concurrency pattern focuses on immediate success or failure, not deferring the outcome. B: Rejecting both bookings is inefficient and not how Pega's locking mechanisms are designed. The system's goal is to successfully process one transaction, not fail all concurrent attempts.

References

1. Pega Academy

Lead System Architect (LSA) 8.7 Mission

Module: Case Locking. This module details the two primary locking strategies in Pega: pessimistic and optimistic.

Pessimistic Locking: The default mechanism where the first user to open a case obtains a lock

preventing others from making changes. This directly enforces the first-come-first-serve principle (Option D).

Optimistic Locking: Allows multiple users to open a case. When a user submits an update

the system verifies if the case was modified by another user. If so

the update fails

and the user is notified. This mechanism results in the scenario described in Option C.

2. Pega Documentation

"Managing case locking". This official document explains

"With optimistic locking

the system does not lock a case when a user opens it. The system acquires a lock only when the user submits the changes... If the case has been updated in the meantime

the user's changes are rejected." This directly supports the process described in Option C as a valid outcome of the design pattern.

Scroll to Top