(a) Voluntary Dismissal: Effect Thereof.
(1) By Plaintiff; by Stipulation. Subject to the provisions of these rules and of any statute of this Commonwealth, an action may be dismissed by the plaintiff without order of court (i) by filing a notice of dismissal at any time before service by the adverse party of an answer or (ii) that after a judgment nisi has been entered, upon the filing of a stipulation of dismissal signed by all the parties who have appeared in the action, the same shall be presented forthwith to a judge of the Court who shall thereupon enter an order of dismissal. Unless otherwise stated in the notice of dismissal or stipulation, the dismissal is without prejudice, except that a notice of dismissal operates as an adjudication upon the merits when filed by a plaintiff who has once dismissed in any court of the United States or of this or any other state an action based on or including the same claim.
(2) By Order of Court. Except as provided in paragraph (1) of this subdivision (a), an action shall not be dismissed at the plaintiff's instance save upon order of the court and upon such terms and conditions as the court deems proper. If a counterclaim has been pleaded by a defendant prior to the service upon him of the plaintiff's motion to dismiss, the action shall not be dismissed against the defendant's objection unless the counterclaim can remain pending for independent adjudication by the court. Unless otherwise specified in the order, a dismissal under this paragraph is without prejudice. Identical to Mass.R.Civ.P. 41(a)(2)
(b) Involuntary Dismissal: Effect Thereof.
(1) On Court's Own Motion. The court may on notice as hereinafter provided at any time, in its discretion, dismiss for lack of prosecution any action which has remained upon the docket for three years preceding said notice without activity shown other than placing upon the trial list, marking for trial, being set down for trial, the filing or withdrawal of an appearance, or the filing of any paper pertaining to discovery. The notice shall state that the action will be dismissed on a day certain, (not less than one year from the date of the notice) unless before that day the case has been tried, heard on the merits, otherwise disposed of, or unless the court on motion with or without notice shall otherwise order. The notice shall be mailed to the plaintiff's attorney of record, or, if there be none, to the plaintiff if his address be known. Otherwise such notice shall be published as directed by the court. Dismissal under this paragraph shall be without prejudice.
(2) On Motion of the Defendant. On motion of the defendant, with notice, the court may, in its discretion, dismiss any action for failure of the plaintiff to prosecute or to comply with these rules or any order of court. After the plaintiff, in an action tried by the court without a jury, has completed the presentation of his evidence, the defendant, without waiving his right to offer evidence in the event the motion is not granted, may move for a dismissal on the ground that upon the facts and the law the plaintiff has shown no right to relief. The court as trier of the facts may then determine them and render judgment against the plaintiff or may decline to render any judgment until the close of all the evidence. If the court renders judgment on the merits against the plaintiff the court shall make findings as provided in Rule 52(a).
(3) Effect. Unless the dismissal is pursuant to paragraph (1) of this subdivision (b), or unless the court in its order for dismissal otherwise specifies, a dismissal under this subdivision (b) and any dismissal not provided for in this rule, other than a dismissal for lack of jurisdiction, for improper venue, or for failure to join a party under Rule 19, operates as an adjudication upon the merits.
Identical to Mass.R.Civ.P. 41(b)
(c) Dismissal of Counterclaim, Cross-Claim, or Third-Party Claim. The provisions of this rule apply to the dismissal of any counterclaim, cross- claim, or third-party claim. A voluntary dismissal by the claimant alone pursuant to paragraph (1) of subdivision (a) of this rule shall be made before a responsive pleading or a motion for summary judgment is served, whichever first occurs, or, if there is none, before the introduction of evidence at the trial or hearing. Identical to Mass.R.Civ.P. 41(c)
(d) Costs of Previously-Dismissed Action. If a plaintiff who has once dismissed an action in any court commences an action based upon or including the same claim against the same defendant, the court may make such order for the payment of costs of the action previously dismissed as it may deem proper and may stay the proceedings in the action until the plaintiff has complied with the order. Identical to Mass.R.Civ.P. 41(d)