
704 A.2d 866 (1997)
1997 ME 220
Walter JOHNSON
v.
SAMSON CONSTR. CORP., et al.
No. Cum-97-82.
Supreme Judicial Court of Maine.
Submitted September 16, 1997.
Decided November 24, 1997.
*867 Richard Golden, Clifford & Golden, Lisbon Falls, for plaintiff.
John S. Campbell, Poulos & Campbell, Portland, for defendant.
Before WATHEN, C.J., and ROBERTS, RUDMAN, DANA, and LIPEZ, JJ.
LIPEZ, Justice.
[¶ 1] Walter Johnson appeals from a judgment entered in the Superior Court (Cumberland County, Brennan, J.) granting Samson Construction's motion for a summary judgment. Johnson argues on appeal that the court erred in its determination that res judicata bars his suit. We disagree and affirm the judgment.

I.
[¶ 2] In June 1988 Samson Construction executed and delivered to Johnson a promissory note for $69,500 and a mortgage deed. The note required principal and interest to be paid in 240 equal monthly installments, and it contained the following acceleration provision: "If any default be made in any payment under this Note, and if such default is not made good within thirty (30) days after written notice of same, the entire unpaid principal and accrued interest shall become *868 immediately due and payable without further demand."
[¶ 3] After Samson defaulted on its May 1990 payment and failed to cure, Johnson initiated a foreclosure action against Samson in August 1990, seeking a judgment against Samson "for the amount due under the Note." Four years later the court entered an order dismissing Johnson's suit with prejudice unless he filed the Report of Conference of Counsel within ten days. Johnson did not file the report, and the court dismissed Johnson's action with prejudice on December 1, 1994.
[¶ 4] In August 1995 Johnson initiated the present action, alleging a failure to make any payment on the note since September 1990 and again seeking a judgment "for the amount due under the Note." Samson moved for a summary judgment, arguing that Johnson's complaint was barred by res judicata. Johnson contended that dismissal of the prior case was res judicata only with regard to any default that occurred before the filing of the prior complaint, but was not a bar to a claim based upon any default which may have occurred after the filing of the prior complaint. Noting that "in the prior case ... the Plaintiff alleged that the Note had been accelerated and that the Plaintiff was seeking the entire balance due under the Note," the court found that the dismissal with prejudice of the prior action barred the instant suit and granted a summary judgment to Samson. This appeal followed.

II.
[¶ 5] A party is entitled to a summary judgment if no genuine issue of material fact exists and if the party is entitled to a judgment as a matter of law. Seashore Performing Arts Ctr., Inc. v. Town of Old Orchard Beach, 676 A.2d 482, 484 (Me.1996). We review the grant of a summary judgment for an error of law, viewing the evidence in the light most favorable to the party against whom the judgment has been granted. Key Trust Co. of Maine v. Nasson College, 1997 ME 145, ¶ 9, 697 A.2d 408, 409.
[¶ 6] "The doctrine of res judicata `is a court-made collection of rules designed to ensure that the same matter will not be litigated more than once.'" Machias Sav. Bank v. Ramsdell, 1997 ME 20, ¶ 11, 689 A.2d 595, 599 (quoting Beegan v. Schmidt, 451 A.2d 642, 643-44 (Me.1982)). "Unlike the related rule of collateral estoppel or `issue preclusion,' which merely prevents the reopening in a second action of an issue of fact actually litigated and decided in an earlier case, the doctrine of bar, or `claim preclusion,' prohibits relitigation of an entire `cause of action.'" Beegan v. Schmidt, 451 A.2d 642, 644 (Me.1982). Claim preclusion bars the relitigation of a claim "if: (1) the same parties or their privies are involved in both actions; (2) a valid final judgment was entered in the prior action; and (3) the matters presented for decision in the second action were, or might have been litigated in the first action." Machias Sav. Bank, 1997 ME 20, ¶ 11, 689 A.2d at 599 (citations omitted). To determine whether the matters presented for decision in the instant action were or might have been litigated in the prior action, we examine "whether the same `cause of action' was before the court in the prior case." Connecticut Nat'l Bank v. Kendall, 617 A.2d 544, 547 (Me.1992). We apply a transactional test to define a cause of action, pursuant to which
the measure of a cause of action is the aggregate of connected operative facts that can be handled together conveniently for purposes of trial. A prior judgment bars a later suit arising out [of] the same aggregate of operative facts even though the second suit relies on a legal theory not advanced in the first case, seeks different relief than that sought in the first case, and involves evidence different from the evidence relevant to the first case.
Id. (citations omitted).
[¶ 7] A plaintiff may not split a cause of action and prosecute each of its parts in separate lawsuits. Kradoska v. Kipp, 397 A.2d 562, 567 (Me.1979). "Judicial economy, fairness to litigants, and the strong public interest favoring finality in judicial proceedings demand that a plaintiff present all relevant aspects of his cause of action in a single lawsuit." Id. Res judicata prevents a litigant from splintering his or her claim and pursuing it "in a piecemeal fashion by asserting *869 in a subsequent lawsuit other grounds of recovery for the same claim" that the litigant had a reasonable opportunity to argue in the prior action. Id. at 569. (citations omitted).
[¶ 8] The promissory note between Johnson and Samson required 240 equal monthly payments of principal and interest. However, the note's acceleration clause provided that "[i]f any default be made in any payment under this Note, and if such default is not made good within thirty (30) days after written notice of same, the entire unpaid principal and accrued interest shall become immediately due and payable without further demand." (emphasis added). Johnson's first cause of action alleged that Samson "defaulted on its obligations to the Plaintiff under the Note" and demanded payment of the entire unpaid principal balance. This suit was an action for the accelerated debt. Once Johnson triggered the acceleration clause of the note and the entire debt became due, the contract became indivisible. The obligations to pay each installment merged into one obligation to pay the entire balance on the note. See Stadler v. Cherry Hill Developers, Inc., 150 So.2d 468, 472 (Fla.Dist.Ct.App.1963) ("While it is axiomatic that a suit for one installment payment does not preclude suit for a later installment on a divisible contract, ... an election to accelerate puts all future installment payments in issue and forecloses successive suits."); Snyder v. Exum, 227 Va. 373, 315 S.E.2d 216, 218 (1984) (finding "no valid distinction between an acceleration clause in a lease and one contained in a note," determining that lease's acceleration clause rendered "all the rent, whether accrued or not" immediately due upon default, and concluding that "`[a]ll installments having matured at the time the action was begun, under well settled principles, those not embraced in that action are now barred'") (citations omitted). The court's dismissal with prejudice of the first action operated "as an adjudication on the merits." See 1 Field, McKusick & Wroth, Maine Civil Practice § 41.5 at 576 (2d ed.1970). That judgment bars the complaint in this action which alleges precisely what the complaint in the first action alleged: that Samson defaulted on the note and that Johnson is entitled to a judgment for the amount due under the note.[1] Johnson cannot avoid the consequences of his procedural default in this second lawsuit by attempting to divide a contract which became indivisible when he accelerated the debt in the first lawsuit.
The entry is:
Judgment affirmed.
NOTES
[1]  Johnson argues that if the dismissal with prejudice of his first suit bars a subsequent action on the note, Samson will receive a windfall. Such a windfall may occur in any case in which a party defaults on a procedural obligation. See, e.g., Terjelian v. Concord Group Ins. Co., 606 A.2d 197, 198 (Me.1992) (dismissing with prejudice a fire loss victim's suit against his insurer for failure to file a report of conference of counsel).
