What is the option to replace versus adding OBS Associations or Security Rights when XOG Group definitions?

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

Description:   
What is the option to replace versus adding Organizational Breakdown Structure (OBS) Associations or Security Rights when updating Group definitions using XML Open Gateway (XOG)?

   
Solution:   
There is an attribute named "complete" that is used in the 'Rights' or 'OBS Associations' grouping element as a wrapper.
When the flag is set to the default "false", the existing OBS associations remain in the target system although they are not present in the import file. New and existing OBS associations present in the import file are inserted and updated.
When the flag is set to "true", the existing OBS associations are removed from the target system if they are not present in the import file. New and existing OBS associations present in the import file are inserted and updated.

Example:   
Use the sample XOG for writing Group Security Rights into a target system. The 'complete' attribute is set to 'true' in the <rights> section, therefore all existing rights for the specified group will be removed in the target system and only the security right(s) listed in the section will be updated (if it already exists in the target system) or inserted into this group definition.

Group Write XML Example: Below is a sample XOG for importing Group Security Rights. The 'complete' attribute is set to 'true', therefore all existing rights for 'My Group' will be removed in the target system and only the security right 'AdminToolAccess' will be updated (if it already exists in the target system) or inserted into this group definition.

<?xml version="1.0" encoding="UTF-8"?>
<NikuDataBus xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../xsd/nikuxog_group.xsd">
<Header action="write" externalSource="NIKU" objectType="group" version="14.1"/>
<groups>
<group code="My_group" isActive="true">
<nls languageCode="cs" name="My Group"/>
<nls languageCode="de" name="My Group"/>
<nls languageCode="en" name="My Group"/>
<nls languageCode="es" name="My Group"/>
<nls languageCode="fr" name="My Group"/>
<nls languageCode="it" name="My Group"/>
<nls languageCode="ja" name="My Group"/>
<nls languageCode="ko" name="My Group"/>
<nls languageCode="nl" name="My Group"/>
<nls languageCode="pt" name="My Group"/>
<nls languageCode="sv" name="My Group"/>
<nls languageCode="zh" name="My Group"/>
<members/>
<rights complete="true">
<GlobalRights>
<Right id="AdminToolAccess"/>
</GlobalRights>
<InstanceRights/>
<InstanceOBSRights/>
</rights>
</group>
</groups>

</NikuDataBus>