The lien provided by this chapter, for which claims of lien have been recorded, may be foreclosed and enforced by a civil action in the court having jurisdiction in the manner prescribed for the judicial foreclosure of a mortgage. The court shall have the power to order the sale of the property. In any action brought to foreclose a lien, the owner shall be joined as a party. The interest in the real property of any person who, prior to the commencement of the action, has a recorded interest in the property, or any part thereof, shall not be foreclosed or affected unless they are joined as a party.
A person shall not begin an action to foreclose a lien upon any property while a prior action begun to foreclose another lien on the same property is pending, but if not made a party plaintiff or defendant to the prior action, he or she may apply to the court to be joined as a party thereto, and his or her lien may be foreclosed in the same action. The filing of such application shall toll the running of the period of limitation established by RCW
60.04.141 until disposition of the application or other time set by the court. The court shall grant the application for joinder unless to do so would create an undue delay or cause hardship which cannot be cured by the imposition of costs or other conditions as the court deems just. If a lien foreclosure action is filed during the pendency of another such action, the court may, on its own motion or the motion of any party, consolidate actions upon such terms and conditions as the court deems just, unless to do so would create an undue delay or cause hardship which cannot be cured by the imposition of costs or other conditions. If consolidation of actions is not permissible under this section, the lien foreclosure action filed during the pendency of another such action shall not be dismissed if the filing was the result of mistake, inadvertence, surprise, excusable neglect, or irregularity. An action to foreclose a lien shall not be dismissed at the instance of a plaintiff therein to the prejudice of another party to the suit who claims a lien.