Oracle Documentation

Finding a parent node using a node type converter expression

Before you begin

This 15-minute hands-on tutorial shows you how to use an expression in a node type converter to find the parent of a node via a subscription request. You begin by identifying a node property you can use to calculate the parent of a node in an expression. You create a subscription and then add an expression to a node type converter to logically derive the parent name. Finally, you create and submit a request to test the logic, and sign in as the subscription assignee to view the subscription request results.

Background

When you add a node to a source, and submit the change via a subscription request, you want the Enterprise Data Management Cloud engine to find a specific parent in the target based on a property of the source node. You can accomplish this by creating an expression in the node type converter. The Enterprise Data Management Cloud engine calculates the target node and parent based on the same source-centric expression logic.

In the example in this tutorial, the expression uses the Summary property to evaluate whether the node is a summary node or a leaf node, and then applies the expression logic to calculate the node name and find the appropriate parent in the target dimension. When you submit the change via a subscription request with auto-submit selected, and no approvals required, the change is automatically pushed to the target dimension.

Please note that the expression logic used in this tutorial is not a universal solution. You are building an expression for this particular case. The logic depends on the source and target applications. For other node types, you may have a different expression. Conceptually, the approach is the same.

What do you need?

  • Have Service Administrator access to your Enterprise Data Management Cloud environment.
  • Upload and import this snapshot into your Enterprise Data Management Cloud environment.
  • Please note that importing the snapshot will override all existing applications in the environment. Back up your current environment before importing the snapshot. For more information on backing up, uploading, and importing migration snapshots, refer to the Administering Migration for Oracle Enterprise Performance Management Cloud documentation.

Identifying a node property you can use to calculate a node parent

  1. Sign in as an Administrator (Admin/oracle), navigate to Views, and open the Account Maintenance view.
    Subaccounts Frame
  2. Select the Corporate Account viewpoint and navigate to the 11101 leaf level node. Notice that the Summary property is set to No, indicating it is not a parent node.
    Subaccounts Frame
  3. Select the parent of the leaf node and notice that Summary is set to Yes, indicating it is a parent node.

    You will use a node converter expression to calculate the parent of a node based on this property.

    Subaccounts Frame
  4. Click (Side-by-Side Layout) to view the Corporate Account and Plan Account viewpoints.
    Subaccounts Frame
  5. With 11000 selected in the Corporate Account viewpoint, click (Locate Node from Viewpoint Corporate Account) to locate the related node in the Plan Account viewpoint.
    Subaccounts Frame

    In this tutorial, you add a child node to the 11000 parent in the Corporate Account dimension, use an expression to find the A_11000 parent in the Plan Account dimension, and add the node to the parent in the target dimension via a subscription request.

Creating a subscription

  1. Click (Tabbed Layout) to turn off side-by-side layout, and inspect the Plan Account viewpoint.
    Subaccounts Frame
  2. Select the Subscriptions tab.
    Subaccounts Frame
  3. Click Create.
  4. Subaccounts Frame
  5. Set the source viewpoint to Corporate Account in the Account Maintenance view and click Create.
    Subaccounts Frame
  6. On the General tab, click Edit.
    Subaccounts Frame
  7. Add Barry Dylan as the Default Assignee and select Auto-Submit.
    Subaccounts Frame
  8. Save the subscription.

Setting up a node converter

  1. Select the Plan Account tab in the bottom left corner and select the Data Chain tab.
    Subaccounts Frame
  2. Select the Node Types data chain object and select the Account node type.
    Subaccounts Frame
  3. On the General tab, notice that the node type includes the qualifier prefix A_.
    Subaccounts Frame
  4. Select Converters and click Edit.
    Subaccounts Frame
  5. Change the Name operation from Copy to Transform.
    Subaccounts Frame
  6. Click dx to open the Expression Builder.
    Subaccounts Frame

Creating an expression

  1. Build the expression.
  2. if sourceNode properties FCGL.Summary equals False
    	return A_ concat(sourceNode properties Core.Name) 
    else return A_ concat(sourceNode properties Core.Name substring
    	Start Index: 0
    	Length: 2)
    	String Value: 000 

    If the Summary property of the source node = False (leaf node), get the name of the source node and add the A_ qualifier prefix.

    If the Summary property of the source node = True (parent node), get the name of the source node, add the A_ qualifier prefix, and use a substring to find the parent name in the target dimension.

    For example, you add a child node named 11504 to the 11000 parent node in the Corporate Planning dimension. The expression adds the A_ prefix qualifier to the child node, and the node is added as A_11504 in the Plan Account target.

    To find the parent node, the expression gets the child node name (11504), adds the A_ prefix qualifier, identifies the first 2 characters of the child node (11 in this example), and adds 000 to identify the parent as 11000 in the Plan Account target.

    Note that the application runs this expression in the context of both the node and its parent. The intent of the if-then-else statement is to isolate the context of when to execute logic for the node, versus when to execute the logic for its parent.

    The key point is a property transformation for the Name property in a node type converter can also be used to determine the target parent for a node in a subscription request. You can use logic in the expression to return a different transformed value for the name of the node and the name of its parent.

    For more information about creating expressions, please view our tutorial Transforming Properties Using Expression Builder.

    Subaccounts Frame
  3. Click Apply.
    Subaccounts Frame
  4. Save and close the inspector.
  5. Click OK to confirm the view has been modified.
    Subaccounts Frame

Creating a request to test the expression

  1. Create a New Request.
    Subaccounts Frame
  2. In the Corporate Account viewpoint, expand T > 10000 > 11000.
    Subaccounts Frame
  3. Add a child to 11000.
    Subaccounts Frame
  4. Define the child properties:
    Property Definition
    Name 11504
    Description USBNK3 Checking Account
    Summary No
    Enabled Yes
    Allow Posting Yes
    Account Type Asset
    Description US USBNK3 Checking Account
    Subaccounts Frame
  5. In the request panel, next to All Items, click (Request Items Menu), and select Validate.
    Subaccounts Frame

    You should receive a message of successful validation.

    Subaccounts Frame

  6. Submit the request. You should receive a message that the request was successfully submitted.
    Subaccounts Frame
  7. Close the view.

Viewing the request results

  1. Navigate to Requests, set the Request Type filter to Subscription, and confirm a request was sent to the request assignee: Barry Dylan.
    Subaccounts Frame
  2. Sign out and sign back in as Barry Dylan (Barry.Dylan/oracle) and navigate to the Account Maintenance view.
    Subaccounts Frame
  3. Select the Plan Account viewpoint and search for the node A_11504.
    Subaccounts Frame
  4. Click A_11504 in the search results, and confirm that the parent node is correctly calculated: Node A_11504 is added as a child to the A_11000 parent in the Plan Account viewpoint.
    Subaccounts Frame

Want to learn more?



Copyright © 1995, 2020, Oracle and/or its affiliates.