Hierarchy Developer's Guide for Oracle Self-Service E-Billing > Extending Advanced Hierarchy Manager Use Cases > Making OMF Objects Work with Hierarchy Manager >

Providing Support for Reporting on the New Business Object


You must implement an event handler to run reports against your business objects through the hierarchy link target, because the link target data is stored in OLAP. When hierarchy is changed in OLTP, either through the UI or a batch job, an event handler can be called directly by the hierarchy API to process these events. Changes can be categorized by event type.

The same mechanism can be used to propagate to the reporting (OLAP) database. The changes made to OLTP and OLAP are bound in a single transaction to guarantee data integrity between OLTP and OLAP databases, using distributed database transaction management.

Example of Writing Your Own Synchronization Handler

If you create a new business object and register it as a link target with hierarchy, you also want to write your own OLAP handler, so that when your business object is linked into hierarchy, the same relationship can be propagated to the OLAP reporting table.

The way you construct the relationship between business object and hierarchy cross reference table determines how much control you have over the relationship. The general pattern is that each hierarchy node has a corresponding entry in the edx_rpt_hierarchy_xref_dim table.

The node and concrete link target type relationship is modeled through the hierarchy and link target workspace table. You can choose whether each link target has a node entry in the edx_rpt_hierarchy_xref_dim table. The alternative is to build a workspace table with just the link targets that are parent nodes of your object.

If you do not want to add a node entry to your link target object, make sure that you return isStoredFlat() = true in your link target event handler. Then, the node entry is not added to the link target edx_rpt_hierarchy_xref_dim table, and your objects and parent objects are stored flat in the workspace table, and can speed up the query.

To write your own OLAP link target handler, implement interface ILinkTargetEventHandler.

Once you finished your OLAP handler, you must register it with Hierarchy Manager, using the hierarchy link target configuration in the hierarchy.cfg.xma.xml file.

<bean id="ServiceAgreementConfig" class="com.edocs.common.hierarchy.core.LinkTargetConfig" singleton="true">
<property name="targetType"><value>edx:omf:serviceagreement:</value></property>
<property name="targetTypeName"><value>Service Agreement</value></property>
<property name="displayName"><value>getLinkTargetName</value></property>
<property name="xmlTag"><value>ServiceAgreement</value></property>
<property name="storedHierXRef"><value>false</value></property>
<property name="xmlExchangeHandler">
<beanclass="com.edocs.common.omf.serviceagreement.ServiceAgreementXMLExchangeHandler"/>
</property>
<property name="linkTargetEventHandlers">
<list>
<bean class="com.edocs.common.hierarchy.connector.olap.OLAPServiceAgreementHandler"/>
</list>
</property>
</bean>

Hierarchy Developer's Guide for Oracle Self-Service E-Billing Copyright © 2013, Oracle and/or its affiliates. All rights reserved. Legal Notices.