How the XML Import Method Processes Row Elements |
XML documents are processed record-by-record. If a row element in an XML document contains an instruction, the XML import method inserts, updates, or deletes the corresponding record. A row element without an instruction will be inserted. If a record with the same primary key already exists, the record is updated. The Rules Engine performs all necessary actions and checks. For a comprehensive description, refer to the Rules Engine Help. Row elements are identified by their primary key, which could be generated (a sequence number, for example) and they must be in accordance with a USoft XML specification. Attributes that have an empty value, and columns that are not specified in the XML document are set to NULL. Sequence numbers (as defined in the repository) are calculated only if the corresponding attribute in the XML document has no value. Otherwise the row element is imported with the value specified, and no sequence number is generated. If a sequence number for some attribute is specified in the XML document, the Rules Engine also checks if this sequence number cannot be generated in the future. Commit behavior is determined outside this method. It is the programmer or user who decides when to commit. It is therefore possible to execute an XML import in the middle of a transaction. The transaction may consist of more than one XML import. If one of the import processes fails, processing of the INVOKE statement stops and the complete transaction is rolled back. However, previous import processes may have been performed already. In this case, the failing row element and all subsequent row elements are not listed in the returning XML document. |