Command Rules for the Parent/Child Element

One example of the operation ParticipantRequest is described in the Command Rule Example for the Parent/Child Element, where the Parent element UPDATEParticipantREQ is highlighted in Italic, and the children (or grand children) are highlighted in Bold.

Command Rule Example for the Parent/Child Element

<UPDATEParticipantREQ>
  <Participant name=”partner1” type=”Partner”>
    <Locations>
      <Location name=”loc1” addr1=”newaddr” />
        <Contacts>
          <Contact name=”Mark” command=”INSERT” />
          <Contact name=”Mary” command=”DELETE” />
        <Contact name=”John” />
       </Contacts>
      </Location>
    <Locations>
  </Participant>
</UPDATEParticipantREQ>

Rules that follow the commands performed on the Parent and Child elements are described in Command Rules for the Parent/Child Element.

Command Rules for the Parent/Child Element

Commands

INSERT

UPSERT

UPDATE

DELETE

Commands on Parent Element

 

 

 

 

INSERT

Only this operation is allowed when the parent or root element are executing the insert command.

Not allowed for children when the parent executes the insert command.

Not allowed for children when the parent executes the insert command.

Not allowed for children when the parent executes the insert command.

UPSERT

Allowed. Inserting a child element adds the contents specified while the parent is executing the UPSERT command.

Allowed. UPSERT on a child element with the UPSERT command on the parent either inserts the child (if not present) or updates the child details appropriately.

Allowed. UPDATE on a child element with the UPSERT command on the parent updates only the child details appropriately. If the child details are not present, an Error is thrown.

Allowed. DELETE on a child element with the UPSERT command on the parent deletes the child data appropriately.

UPDATE

Allowed. Inserting a child element adds the contents specified while the parent is executing an UPDATE command.

 

Allowed. UPSERT on a child element with the UPDATE command on the parent either inserts the child (if not present), or updates the child details appropriately.

Allowed. UPDATE on the child element with the UPDATE command on the parent updates only the child details appropriately. If the child details are not present, an Error is thrown.

Allowed. DELETE on a child element with the UPDATE command on the parent deletes the child data appropriately.

DELETE

Not recommended for the category children when the parent does the delete command.

Not recommended for the category children when the parent does the delete command.

Not recommended for children when the parent does the delete command.

Allowed