IBM BJ0NJML Integration Guide - Page 87
AddChange action, Default action attributes, Comparison of the, change, replace, and add
![]() |
View all IBM BJ0NJML manuals
Add to My Manuals
Save this manual to your list of manuals |
Page 87 highlights
AddChange action Default action attributes Comparison of the change, replace, and add change actions Object Structure Element The AddChange action is like the replace action, except that any existing child record that is not specified in the message is not deleted. An AddChange action on the primary object adds the primary record and all the sub-records that are provided in the message, if the primary record does not exist in the database. If the primary record does exist, it is updated along with any child record that is provided. Existing child records that are not provided in the inbound message are not deleted. The AddChange action does not apply to child objects. The AddChange action is useful in cases where the object structure definition contains elements that are not available in the external system. For example, the MXVENDORInterface enterprise service contains both vendor and contact information. If the database maintains the contacts for a vendor, and external systems maintain the vendor definition itself, sending an inbound vendor record with the action value equal to null results in the deletion of contact information in the database. However, sending a vendor record with the action value equal to AddChange results in the update of vendor information; the contact information remains. The system processes the message in the following ways when an inbound XML message does not contain an action attribute: T If the primary record does not exist in the database, the system performs add action processing. T If the primary record exists in the database, the system performs replace action processing. The following diagram contrasts the Change, Replace, and AddChange actions applied to a hypothetical purchase order. The Original PO diagram shows the initial purchase order. It contains three line items, each with two cost lines. The Changes to the PO diagram shows the changes to the purchase order that originated in the Purchase Orders application. T A change to the POCOST2 record associated with POLINE1 T Deletion of the POCOST3 record associated with POLINE1 T A change to POLINE2 Integration XML and Schemas 73
![](/manual_guide/products/ibm-bj0njml-integration-guide-77e799f/87.png)