§ 3019. Counterclaims and cross-claims. (a) Subject of counterclaims. A counterclaim may be any cause of action in favor of one or more defendants or a person whom a defendant represents against one or more plaintiffs, a person whom a plaintiff represents or a plaintiff and other persons alleged to be liable. (b) Subject of cross-claims. A cross-claim may be any cause of action in favor of one or more defendants or a person whom a defendant represents against one or more defendants, a person whom a defendant represents or a defendant and other persons alleged to be liable. A cross-claim may include a claim that the party against whom it is asserted is or may be liable to the cross-claimant for all or part of a claim asserted in the action against the cross-claimant. (c) Counterclaim against trustee or nominal plaintiff. In an action brought by a trustee or in the name of a plaintiff who has no actual interest in the contract upon which it is founded, a claim against the plaintiff shall not be allowed as a counterclaim, but a claim existing against the person beneficially interested shall be allowed as a counterclaim to the extent of the plaintiff's claim, if it might have been so allowed in an action brought by the person beneficially interested. (d) Cause of action in counterclaim or cross-claim deemed in complaint. A cause of action contained in a counterclaim or a cross-claim shall be treated, as far as practicable, as if it were contained in a complaint, except that separate process, trial or judgment may not be had unless the court so orders. Where a person not a party is alleged to be liable a summons and answer containing the counterclaim or cross-claim shall be filed, whereupon he or she shall become a defendant. Service upon such a defendant shall be by serving a summons and answer containing the counterclaim or cross-claim. Such defendant shall serve a reply or answer as if he or she were originally a party.