Oracle® Hyperion Profitability and Cost Management, Fusion Edition

External Automation of Profitability and Cost Management Processes

Release 11.1.2.1


Copyright © 2011, Oracle and/or its affiliates. All rights reserved.

Authors: EPM Information Development Team

This software and related documentation are provided under a license agreement containing restrictions on use and disclosure and are protected by intellectual property laws. Except as expressly permitted in your license agreement or allowed by law, you may not use, copy, reproduce, translate, broadcast, modify, license, transmit, distribute, exhibit, perform, publish, or display any part, in any form, or by any means. Reverse engineering, disassembly, or decompilation of this software, unless required by law for interoperability, is prohibited. The information contained herein is subject to change without notice and is not warranted to be error-free. If you find any errors, please report them to us in writing.

If this software or related documentation is delivered to the U.S. Government or anyone licensing it on behalf of the U.S. Government, the following notice is applicable:

U.S. GOVERNMENT RIGHTS: Programs, software, databases, and related documentation and technical data delivered to U.S. Government customers are "commercial computer software" or "commercial technical data" pursuant to the applicable Federal Acquisition Regulation and agency-specific supplemental regulations. As such, the use, duplication, disclosure, modification, and adaptation shall be subject to the restrictions and license terms set forth in the applicable Government contract, and, to the extent applicable by the terms of the Government contract, the additional rights set forth in FAR 52.227-19, Commercial Computer Software License (December 2007). Oracle USA, Inc., 500 Oracle Parkway, Redwood City, CA 94065.

This software is developed for general use in a variety of information management applications. It is not developed or intended for use in any inherently dangerous applications, including applications which may create a risk of personal injury. If you use this software in dangerous applications, then you shall be responsible to take all appropriate fail-safe, backup, redundancy, and other measures to ensure the safe use of this software. Oracle Corporation and its affiliates disclaim any liability for any damages caused by use of this software in dangerous applications.

Oracle is a registered trademark of Oracle Corporation and/or its affiliates. Other names may be trademarks of their respective owners.

This software and documentation may provide access to or information on content, products, and services from third parties. Oracle Corporation and its affiliates are not responsible for and expressly disclaim all warranties of any kind with respect to third-party content, products, and services. Oracle Corporation and its affiliates will not be responsible for any loss, costs, or damages incurred due to your access to or use of third-party content, products, or services.


Table of Contents:

Introduction to Web Services

Prerequisites

The WSDL File

Using the Oracle Hyperion Profitability and Cost Management API Reference

Profitability Web Service Operations

Creating a Custom Script

Using the Profitability and Cost Management Sample Client File

Introduction to Web Services

To facilitate the running of lengthy or repetitive processes in Oracle Hyperion Profitability and Cost Management, Fusion Edition, you can create custom scripts for your organization using Oracle Web Services Manager (OWSM) to automatically invoke processes in the production environment, such as deploying or transferring data, without requiring the process to be initiated by on-site personnel.

You generate the custom scripts using a Java application programming interface (API) to invoke the following web services operations for Profitability and Cost Management:

  • Import from the Profitability and Cost Management staging area.

  • Get all stages in a given application.

  • Get all Points of View (POVs) for a given application.

  • Copy POV in a given application.

  • Deploy or redeploy BSO cube given an application name and deployment options.

  • Deploy or redeploy ASO cube given an application name and deployment options.

  • Transfer data from BSO to ASO.

  • Clear, generate and calculate a single POV, given the appName, povList, stageNameList, and clear, generate and calculate options for each stage and in each POV:

    • Generate calc script (app, stage, pov, layer).

    • Run calc script.

  • Run genealogy given a contribution path (like 1-2-3, 1-5, 1-2-3-4) in a given application.

  • Delete an application given its name.

  • Check the status of asynchronous long running tasks using the job process name.

To assist you in creating your custom scripts, a Sample Client is also included with the installation. The sample client provides the Web Services commands that are available for Profitability and Cost Management, and helps to identify data within the model.

See the following sections:

For information about other features for Release 11.1.2.1, see the Oracle Hyperion Profitability and Cost Management, Fusion Edition New Features.

Prerequisites

Before you can use Web Services to create automated scripts, you must install and configure the following components as outlined in the Oracle Hyperion Enterprise Performance Management System Installation and Configuration Guide:

  • Enable security for Web Services. See “Postconfiguration Tasks” for Profitability and Cost Management.

  • Run the Repository Creation Utility (RCU). See “Postconfiguration Tasks” for Profitability and Cost Management.

  • Configure Oracle Web Services Manager (OWSM). See “Configuring Oracle Web Services Manager” for Profitability and Cost Management.

This document assumes you have a working knowledge of the following components:

  • Oracle Web Services Manager

  • WSDL

  • XML

  • XML Schema (XSD)

  • SOAP

The WSDL File

The interface for the Web Service API is defined by its Web Services Description Language (WSDL) document. WSDL is an XML-based language that describes a Web service and specifies the location of the service and the operations that the service exposes.

To view the WSDL document for Profitability and Cost Management Web Services, see http://<localhost>:19000/profitability/ProfitabilityService?WSDL.

Using the Oracle Hyperion Profitability and Cost Management API Reference

The Oracle Hyperion Profitability and Cost Management API Reference provides the commands that are used in your custom script to invoke the web services available for Profitability and Cost Management.

All commands use the same Namespace and Location:

  • Namespace: http://profitability.webservices.epm.oracle

  • Location: ProfitabilityService.wsdl

The Oracle Hyperion Profitability and Cost Management API Reference provides the following information:

  • Services - The Service must be set to ProfitabilityService to enable the defined web services operations for Profitability and Cost Management.

  • Interfaces (Port Types) contain the specific operations that are available:

    • PortType class is set to ProfitabilityService. This enables the defined web services operations for Profitability and Cost Management.

    • Operations provides information about the list of available web services. For each operation, the following information is defined:

      • Operation

      • Input parameters

      • Output parameters, if required

      • Operation Definition

      • Binding Operation Definition

  • Messages are fault messages that will be displayed if an exception is encountered. These messages are automatic, and no coding is required in the custom script.

  • Elements are the defined fields in the .wsdl file. No coding is required in the custom script.

  • Type represents the wrapper type for the specified parameters and return parameters. No coding is required in the custom script.

For specific coding details, refer to the Oracle Hyperion Profitability and Cost Management API Reference (hpm_api_ref.html) in the OTN Documentation Library, as described in the following procedure.

  To access the Oracle Hyperion Profitability and Cost Management API Reference:

  1. Open the OTN Documentation Library at http://www.oracle.com/technetwork/middleware/performance-management/documentation/index.html.

  2. Locate the current release.

  3. Select View Library, and then Financial PM Applications.

  4. Under Oracle Hyperion Profitability and Cost Management, Fusion Edition, select hpm_api_ref.html to display the Web Services API Reference for Profitability and Cost Management.

    The hpm_api_ref.html file details all APIS for Profitability and Cost Management.

Profitability Web Service Operations

When you set the PortType in the custom script to ProfitabilityServices, a list of pre-defined Profitability and Cost Management operations becomes available.

By calling the required operation in the custom script, you can perform specific tasks, such as getApplications to view a list of all existing Profitability and Cost Management applications.

For detailed API commands for all operations, see the Oracle Hyperion Profitability and Cost Management API Reference. This document is available from the OTN Documentation Library, as described in Using the Oracle Hyperion Profitability and Cost Management API Reference .

See the following table for a list of all available operations.

Table 1. Oracle Web Services Operations for Profitability and Cost Management

OperationDescriptionInput and Output Parameters
getApplicationsList all existing Profitability and Cost Management applications.

Input Parameters:

  • None.

Output Parameters:

  • ApplicationDTO return: Displays list of ApplicationDTOs containing application information.

getPOVsList all existing POVs for a selected application.

Input Parameters:

  • string applicationName: Enter the name of the application for which POVs should be retrieved.

Output Parameters:

  • POVMemberGroupDTO return: Displays list of POVMemberGroupDTOs containing POV information.

getStagesList all existing stages for a selected application.

Input Parameters:

  • string applicationName: E nter the name of the application for which stages should be retrieved.

Output Parameters:

  • stageDTO return: Displays list of StageDTOs containing stage information.

copyPovDataCopy POV data from a source POV combination to a destination POV combination.

Input Parameters:

  • string applicationName: Enter the name of the application to use.

  • CopyPOVDTO copyPOVData: -- Selection details for Copy POV functionality.

Output Parameters:

  • None

deleteApplicationDelete an existing Profitability and Cost Management application.

Input Parameters:

  • string applicationName: Enter the name of the application to be deleted.

Output Parameters:

  • None

deployCubeDeploy the database (cube) for a selected application.

Input Parameters:

  • string applicationName: Enter the name of the application to be deployed.

  • CubeDeployOptionsDTO CubeDeployOptions: -- Enter selection details for deploying the cube.

Output Parameters:

  • string return: Process job ID generated for the deploy cube action.

getTaskflowStatusByProcessNameObtain the current status of the job process name. The following valid status values are listed:
  • New

  • Active

  • Stopped

  • Done

Input Parameters:

  • string processName: Enter the process name for which the status should be retrieved.

Output Parameters:

  • string return: Comma-separated values of all tasks and their statuses for the specified taskflow process name.

    For example, if the process has two tasks created for it with the IDs 12345 and 123455, displays task ID and status as follows: 12345=Done,123455=Active

processCalcScriptsInitiate the selected actions for a selected Application Name, POV and Layer.

The following options are available:

  • Clear All

  • Clear Calculated

  • Generate

  • Calculate

  • Transfer data after calculation.

Input Parameters:

  • string applicationName: Enter the name of the application to use.

  • CalcScriptOptionsDTO options: -- Selection details for processing Calculation scripts.

Output Parameters:

  • string return: process task ID generated for the Calculation scripts processing action.

processGenealogyExecutionPathsGenerate the selected contribution paths for genealogy for a selected application.

Input Parameters:

  • string applicationName: Enter the name of the application to use.

  • GenealogyOptionsDTO genealogyInfo: -- Selection details for executing genealogy paths.

Output Parameters:

  • string return: process task ID generated for executing genealogy paths.

importFromStagingImport from Staging tables into a Profitability and Cost Management application.

Input Parameters:

  • string applicationName: Enter the name of the application to use.

  • string importConfigName: -- Import configuration to be imported.

Output Parameters:

  • None.

Creating a Custom Script

When generating a custom Web Services script, you must identify the service name, and select the operations that you want to invoke.

  To create a custom script for Profitability web services:

  1. Set up the server that is to be enabled for Web Services. See the Oracle Hyperion Enterprise Performance Management System Installation and Configuration Guide.

  2. When coding, select the ProfitabilityService service name. (See Using the Profitability and Cost Management Sample Client File for more information.)

  3. Create the Web Service Client and select the operations to be performed.

    • For a list of available operations, see Profitability Web Service Operations.

    • For a detailed description of the parameters for each operation, refer to the Oracle Hyperion Profitability and Cost Management API Reference in the OTN Documentation Library.

  4. Optional: To run the program using a .bat or .sh script, edit the existing files to match the newly created Web Services client name.

Using the Profitability and Cost Management Sample Client File

The Sample Client File for Web Services displays the commands that can be used in your custom script for automating Profitability and Cost Management tasks, and identifies data within your Profitability and Cost Management model. The sample client file is intended as a guide only, to assist you in creating your custom scripts.

See the following procedures:

Setting Up the Sample Client Environment

  To set up the sample client environment:

  1. Optional: If you are not running on the same machine on which Oracle Enterprise Performance Management Workspace, Fusion Edition is installed, copy the folder EPM_ORACLE_HOME/products/Profitability/samples/wsclient to the machine on which the sample is to be accessed.

  2. Copy the following files from the source folders listed below to the wsclient folder:

    Table 2. Required Files for Sample Client

    Source FolderFile Name
    EPM_ORACLE_HOME/../user_projects/domains/EPMSystem/config/fmwconfigjps-config.xml
    EPM_ORACLE_HOME/../user_projects/domains/EPMSystem/config/fmwconfig <<Associated keystore file.XXXX.jks>>
    If you are using file-based security, EPM_ORACLE_HOME/../user_projects/domains/EPMSystem/config/fmwconfigcwallet.sso
  3. Edit the hpm_ws_client.properties file to reflect your local settings:

    # Full Path of the jps-config.xml file in use.
    jps.config.file=C:/wsclient/jps-config.xml
    
    #WSS Recipient key alias name used.
    wss.recipient.key.alias=adminalias
    
    # WSS Credential Store Framework key used.
    wss.csf.key=epmpcm.credentials
    
    # HPCM WSDL URL which is to be accessed. Eg: http://localhost:19000/profitability/ProfitabilityService?WSDL (or) {DRIVE_LETTER}:/{FILE_PATH}/FILE_NAME.wsdl
    hpcm.wsdl.url=http://localhost:19000/profitability/ProfitabilityService?WSDL
    
    # Delimiter used to separate String literals in paramters
    string.delimiter=_
  4. Optional: If you are not running on the same machine on which the Oracle Enterprise Performance Management Workspace, Fusion Edition is installed, download and install JDeveloper 11.1.1.3 locally to obtain the appropriate JAVA_HOME and MIDDLEWARE_HOME folders.

  5. From a command or shell window, set the following environment variables:

    Table 3. Sample Client Environment Variables

    Environment VariableLocation
    JAVA_HOMELocation in which Java Development Kit 1.6.0_18 or higher is available:
    • For Windows, enter SET JAVA_HOME=C:/Oracle/Middleware/jdk160_18

    • For UNIX, enter export JAVA_HOME=/usr/c/Oracle/Middleware/jdk160_18

    MIDDLEWARE_HOMELocation in which Oracle Middleware home is installed.
    • For Windows, enter SET MIDDLEWARE_HOME=C:/Oracle/Middleware

    • For UNIX, enter export MIDDLEWARE_HOME=/usr/c/Oracle/Middleware

  6. In the command window, go to C:\wsclient, and then enter the following command:

    hpm_ws_client.bat -help

    A list of all available functions is displayed.

  7. Use the format and operations specified in the sample client file to build your custom script. See Using the Sample Client File.

Using the Sample Client File

The sample client file is intended as a guide only for you to build your own custom scripts to access Profitability and Cost Management data through Web Services. The sample client files are available at EPM_ORACLE_HOME/products/Profitability/samples/wsclient. These files have been created using Batch Script (Windows OS) and Shell Script (UNIX/Linux OS).

  To use the sample client file:

  1. In the command window, go to C:\wsclient. See Setting Up the Sample Client Environment.

  2. Enter the following command:

    hpm_ws_client.bat - help

    The list of all available functions is displayed.

    Table 4. Oracle Web Services Operations for Profitability and Cost Management

    OperationDescription
    getApplicationsList all existing Profitability and Cost Management applications.
    getPOVsList all existing POVs for a selected application.
    getStagesList all existing stages for a selected application.
    copyPovDataCopy POV data from a source POV combination to a destination POV combination.

    See

    deleteApplicationDelete an existing Profitability and Cost Management application.

    See

    deployCubeDeploy the database (cube) for a selected application.
    getTaskflowStatusByProcessNameObtain the current status of the job process name. The following valid status values are listed:
    • New

    • Active

    • Stopped

    • Done

    runImportConfigurationImport from selected staging tables into the Oracle Hyperion Profitability and Cost Management, Fusion Edition application.
    processCalcScriptOptionsInitiate the selected actions for a selected Application Name, POV and Layer.

    The following options are available:

    • Clear All

    • Clear Calculated

    • Generate

    • Calculate

    • Transfer data after calculation.

    processGenealogyExecutionPathsGenerate the selected contribution paths for genealogy for a selected application.
  3. Select the operation to be performed, and enter the command in the following format:

    hpm_ws_client.bat - help operation_name

    For example, to obtain the usage details of getPovs operation, enter the command in the following format:

    hpm_ws_client.bat - help getPovs

  4. To use the sample client file to perform an operation, enter the command in the following format:

    hpm_ws_client.bat operation_name <<parameters>>

    • Example 1: List All Applications

      For example, to obtain a list of all available applications, enter the command:

      hpm_ws_client.bat getApplications

    • Example 2: List All POVs

      For example, to obtain a list of all POVs for a given application, enter the command:

      hpm_ws_client.bat getPovs <<application name>>

Compiling the Code

The client sample is provided in the following formats:

  • As source code (in wsclient/src/oracle/epm/webservices/profitability/client/ProfitabilityServicePortTypeClientSample.java)

  • As a compiled binary file (in wsclient/lib/hpcmwsclient-sample.jar)

To successfully compile the code, you must specify the location of the common.components.home folder.

If the source code needs to be recompiled for any reason, you can recompile using Ant. The build.xml file for Ant is available in the wsclient folder.

  To recompile the source code:

  1. Open a command or shell window to specify the location of the common.components.home folder.

    This folder is defined as MIDDLEWARE_HOME/oracle_common, where MIDDLEWARE_HOME is set as follows:

    • For Windows: SET MIDDLEWARE_HOME=C:/Oracle/Middleware

    • For UNIX: export MIDDLEWARE_HOME=/usr/c/Oracle/Middleware

  2. Pass the folder location to Ant, using one of the following methods:

    • As a command line parameter. For example:

      ant -Dcommon.components.home=C:/Oracle/Middleware/oracle_common

    • In the build.properties file, open the file for editing and uncomment the definition of the common.components.home variable. For example:

      common.components.home=C:/Oracle/Middleware/oracle_common

  3. Recompile the source code.