Scenario 1 Process Multiple CUD Commands

In this scenario, you can add or modify records with multiple commands in a single transaction. Specify atomic="on" in the <Transaction> element. You can also add multiple transactions with multiple commands.

<Transaction atomic="on">
  <Command type="Modify">
   <!--The Supported CommandTypes for Save are Add and Modify-->
			<MasterCatalogRecord etype="Entity" commandqualifier="Validate/Process">
   <!-- The Suppored commandqualifier for Save are Validate/Process, Validate/NoProcess, NoValidate/Process, NoValidate/NoProcess default is Validate/Process-->
			<ExternalKeys>
   	<Key name="MASTERCATALOGNAME" type="string">Customer</Key>
   	<Key name="PRODUCTID" type="string">1</Key>
			 <Key name="PRODUCTIDEXT" type="string">1-Ext</Key>
			 </ExternalKeys>
				<EntityData>
			  <Attribute name="PRODUCTIDEXT" type="string">1</Attribute>
			  <Attribute name="PRODUCTID" type="string">1-Ext</Attribute>
   		<Attribute name="SHORTDESC" type="string">Record for Customer repository</Attribute>
			 </EntityData>
				</MasterCatalogRecord>
  </Command>
  <Command type="Modify">
   <!--The Supported CommandTypes for Save are Add and Modify-->
			<MasterCatalogRecord etype="Entity" commandqualifier="Validate/Process">
   <!-- The Suppored commandqualifier for Save are Validate/Process, Validate/NoProcess, NoValidate/Process, NoValidate/NoProcess default is Validate/Process-->
   <ExternalKeys>
    <Key name="MASTERCATALOGNAME" type="string">Customer</Key>
    <Key name="PRODUCTID" type="string">2</Key>
   	<Key name="PRODUCTIDEXT" type="string">2-Ext</Key>
			</ExternalKeys>
			<EntityData>
				<Attribute name="PRODUCTIDEXT" type="string">1</Attribute>
				<Attribute name="PRODUCTID" type="string">1-Ext</Attribute>
			 <Attribute name="SHORTDESC" type="string">Customer repository records</Attribute>
			</EntityData>
			</MasterCatalogRecord>
  </Command>
</Transaction>

All the commands are processed as a single atomic operation. Records are successfully modified. If any of the commands in a transaction fails, the transaction is not processed and the records are not added or modified. The transaction may fail because the non-supported command qualifier or an erroneous rulebase exists in a command.