Managing Master Data with webMethods OneData 10.5 | Managing Master Data with webMethods OneData | Administering webMethods OneData | Asynchronous Messaging | Working with XML Envelopes for Self Recursive Objects? | Restoring Hierarchy in Self Recursive Objects
 
Restoring Hierarchy in Self Recursive Objects
To restore a self recursive hierarchy, execute the two step process to restore the data objects. This is invoked on the DataObject inbound envelope. The object ID tag contains the DO object ID.
* To restore the hierarchy
1. Restore the root nodes using the following code sample as an example.
<?xml version="1.0"?>
<distribution>
  <header>
   <onedata_version>8.2.1.0</onedata_version>
   <repository>DEV2</repository>
   <client_id>1</client_id>
   <project_id>1</project_id>
   <objectid>1234</objectid> 
   <alternatekey> EMPLOYEE_SR = FNM</alternatekey>
   <decode>true</decode>
   <processingmode>restore</processingmode>
   <dateformat>YYYY-MM-DD</dateformat>
</header>
<data>
  <EMPLOYEE_SR>
   <datarow>
    <FirstName>Manager</FirstName>
   </datarow>
  </EMPLOYEE_SR>
</data>
</distribution>
2. Restore the child nodes using the following sample as an example.
<?xml version="1.0"?>
<distribution>
<header>
  <onedata_version>8.2.1.0</onedata_version>
  <repository>DEV2</repository>
  <client_id>1</client_id>
  <project_id>1</project_id>
  <objectid>1234</objectid>
  <alternatekey> EMPLOYEE_SR = FNM</alternatekey>
  <decode>true</decode>
  <processingmode>restore</processingmode>
  <dateformat>YYYY-MM-DD</dateformat>
</header>
<data>
   <EMPLOYEE_SR>
    <datarow>
     <FirstName>John</FirstName>
    </datarow>
   </EMPLOYEE_SR>
</data>
</distribution>

Copyright © 2011-2019 | Software AG, Darmstadt, Germany and/or Software AG USA, Inc., Reston, VA, USA, and/or its subsidiaries and/or its affiliates and/or their licensors.