In an appeal from a judgment of the trial court denying defendant's Section 1717 motion for attorney's fees in an action for breach of a Union agreement by former members, judgment is reversed where subject claim was a legally separate cause of action based on a distinct contractual obligation and thus could not be voluntarily dismissed after it was adjudicated in defendant's favor.