A declaratory judgment is a court-issued judgment that defines and outlines the rights and obligations of each party in a contract. Declaratory Relief is a legal procedure designed for those seeking "preventive justice." Specifically, its purpose is to "set controversies at rest. A declaratory judgment is appropriate when it will "terminate the controversy" giving rise to the proceeding. Asking the court to make an order that sets out the obligations and rights of each party (called declaratory relief). Courts have traditionally held that an insurance company has no right to intervene in the liability action against the insured to seek a coverage determination. In the event of a legal controversy, both parties generally want to avoid any legal uncertainty and insecurity that could arise out of a dispute. A petition for declaratory relief in California is used to obtain a judicial declaration on the rights and duties of parties under a contract or statute. To establish federal jurisdiction in a declaratory judgment action, two conditions must be satisfied. First, is the constitutional inquiry.