It is essential to file a patent application before disclosing the details of the invention. If disclosing the invention is unavoidable-then the disclosure must be accompanied by confidentiality or a non-disclosure agreement before filing a patent application.