If any lien shall be filed under the provisions of this chapter, and no action to foreclose such lien shall have been commenced, the owner of the land may file his petition in the district court of the county in which said land is situated, making said lien claimants defendants therein, and praying for an adjudication of said lien so claimed, and if such lien claimant shall fail to establish his lien, the court may tax against said claimant the whole, or such portion of the costs of such action as may be just. Provided, that if no action to foreclose or adjudicate any lien filed under the provisions of this chapter shall be instituted within one (1) year from the filing of said lien, the lien is canceled by limitation of law. If a lien is canceled by limitation of law, the owner of the land may file an affidavit attesting to the cancellation with the county clerk of the county in which the land is located. Upon receipt of the affidavit, the county clerk shall attach the affidavit to the original lien document in the lien docket file and enter a notation of the filing in the mechanics' lien journal. The affidavit shall be on a form prescribed by the Office of the Administrative Director of the Courts.
Okla. Stat. tit. 42, § 177