Yvette_Essen

CA Clarity Tuesday Tip : XOG - controlling the amount of data

Discussion created by Yvette_Essen Employee on Jun 19, 2012
Latest reply on Dec 16, 2015 by urmas
When exporting configurations (lookups, objects, attributes, portlets, processes, views, pages, etc) XOG normally uses dependencies ending up with big resulting XML file.

For eg,
- If you use XOG in an object and it has an active custom attribute that uses a certain lookup, the XOG will read out the active attribute and the lookup
- If you read out a portlet with XOG that uses a specific query and has an attribute referencing a certain lookup, the XOG will read out the portlet, the query and the lookup

Sometimes, there is a need to be able to export some elements isolated, without the dependencies, especially when dealing with stock objects such as the Project object,
so that we have more control over what's being exported and then imported.

Two directives come in handy: "no_dependencies" and "singleContentType".

no_dependencies

This tells Clarity whether dependencies should be respected or not.

For eg, you extract the idea object and one of the attributes uses a new lookup; therefore the lookup should also be extracted. That's a dependency.
It may appear to be a desired functionality but what if you know you have not changed ANY lookups? You still would have to deal with several lookup entries in the
resulting XML file. To solve this, you can use the no_dependencies argument.

The format of the argument is as follows

<args name=“no_dependencies” value=“true/false”/>



singleContentType

This exports a specific content type. For eg, you’ve just updated a view and you do not want to export the whole object. So, by using singleContentType,
you can export just the Views and NOT the whole object with all its attributes, links, actions, etc

The format for the argument is as follows

<args name="singleContentType" value="content type">

where content type can be any of the following supported content types:
-Job Definitions
- Lookups
- Menu Manager
- Objects
- Portlet Pages
- Portlets
- Processes
- Queries


Example: XML Read File for Exporting a Portlet Without Dependencies

The following example shows an XML read file where portlet data without any dependency data is requested.

<?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="12.0.0.5028" action="read" objectType="contentPack" externalSource="NIKU">
<!-- Provide following argument with singlecontenttype to retrieve only portlet. -->
<args name="singleContentType" value="portlet" />
<!-- May specify following OPTIONAL argument no_dependencies to exclude dependent content. -->
<args name="no_dependencies" value="true" />
</Header>
- <PortletQuery>
<Filter name="code" criteria="EQUALS">balance</Filter>
</PortletQuery>
</NikuDataBus>

Outcomes