The aggrieved party, the plaintiff, must file a complaint or petition seeking damages or other relief. The party that is sued, the defendant, must file an answer, defenses, and a counterclaim, if appropriate. The parties then engage in a discovery process to determine facts that are disputed and the basis for such disputed facts. The discovery period normally lasts six months after the defendant has been served, but can be extended if necessary. If there is no dispute as to material facts, one of the parties may be entitled to a judgment, and the court can enter a summary judgment based upon the undisputed facts. If there are disputed facts, the case will then go to trial and the disputed facts will be resolved at trial. Judges often require the parties to go through mediation or alternate dispute resolution before going to trial, and many cases are settled by the parties before trial.