XOG out a custom object which has multiple heretical levels.

Document ID : KB000052312
Last Modified Date : 14/02/2018
Show Technical Document Details

Description:

It is sometimes required to XOG out only a particular sub-object or sub-sub-object in a multiple layered hierarchy without touching others. The issue is evident for the following case.

Case:

A system A has an object which has child objects and grandchild objects. The structure has been exported to other system B and it is in use. In system A, there are, for example, two grandchildren, GrandchildA and GrandchildB. A new grandchild, GrandchildC is added. It is required to export only newly added GrandchildC to the system B without touching other object at all.

The following is a typical example to xog out GrandchildC

<?xml version="1.0" encoding="UTF-8"?>
- <NikuDataBus xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../xsd/nikuxog_read.xsd">
- <Header version="8.0" action="read" objectType="contentPack" externalSource="NIKU">
<args name="no_dependencies" value="true"/>
- <!-- the contentType is used to determine which filter goes where -->
<args contentType="job_definition" name="order_by_1" value="code"/>
<args contentType="menu" name="order_by_1" value="code"/>
<args contentType="view" name="order_by_1" value="code"/>
<args contentType="process" name="order_by_1" value="code"/>
<args contentType="object" name="order_by_1" value="code"/>
</Header>
- <ObjectQuery>
<Filter name="object_code" criteria="EQUALS">GrandchildC</Filter>
</ObjectQuery>
</NikuDataBus>

What the above exports, however, are not only GrandchildC but also its parent, GrandchildA and GrandchildB as well. There is a risk these objects information in system.

A overrides the corresponding objects in the system B unintentionally. The issue was recognized as a bug and it is fixed in r12.0.5 adding a new argument to exclude parent,

<args name="exclude_parent" value="true"/>

The usage of the new argument is just to add it at the end of the argument as below;

<args contentType="job_definition" name="order_by_1" value="code"/>
<args contentType="menu" name="order_by_1" value="code"/>
<args contentType="view" name="order_by_1" value="code"/>
<args contentType="process" name="order_by_1" value="code"/>
<args contentType="object" name="order_by_1" value="code"/>
<args name="exclude_parent" value="true"/>

The further information is available in r12.0.5 Release Note. If the version is before 12.0.5, the possible workarounds are;

  1. Edit the custom attribute as a required field; then, it will be available to be re-added to the views.

  2. Deactivate the custom attribute and activate it again; then, it will be available to be added to the views again.

Solution:

  1. Use a new argument of <args name="exclude_parent" value="true"/> in r12.0.5 or higher.

  2. In the earlier version than r12.0.5, the possible workarounds are;

    1. Edit the custom attribute as a required field; then, it will be available to be re-added to the views.

    2. Deactivate the custom attribute and activate it again; then, it will be available to be added to the views again.