Patent ID: 7542982

Claim:
A computer program embedded in a computer readable storage medium and executed by a computer processor for electronic data interchange, the executed computer program performing the steps comprising: defining a message validation model using a schema, wherein the defined message validation model includes: a validation layer comprising a rules base class, a schema level base classes, a rule constraints base class, a coexistence rules class, a message level base class, and a valid rule values base classes; a message model element, wherein the message model element is linked with the schema level base class, the message model element including a coexistence rule module and a multiple element rule module and valid value rules with values defined external to the schema; a set of message level rules, wherein the set of message level rules allows two distinct messages based on the schema to be enforced differently from one another; defining a set of pre-defined rules for the schema, wherein the set of predefined rules includes a set of coexistence rules, a set of valid value rules, and a set of message level rules and multi element rules; defining a deployment model, wherein the defined deployment model converts the set of pre-defined rules from schema level rules to message level rules, and obtaining an XPATH of a source and a dependent element along with a set of constraints to be applied to the dependent element; populating the defined deployment model; serializing the populated deployment model with the set of message level rules as an XMI file; generating a query to validate instance documents that are requested to be interchanged based on the defined message validation model and the set of pre-defined rules; executing the set of pre-defined rules using a query language to determine a source and dependent elements; wherein the coexistence rule module includes a rule that specifies for a first existing element, at least one element that must exist and optionally having a required value or range of values depending on the value or range of values of the first existing element; wherein the multiple element rule module is associated with a container and applies to elements within the container and includes a rule that specifies paired rules, required rules and exclusive rules; and wherein the set of valid value rules specifies a set of valid values for a second existing element defined externally in a database table column.