|
Release 11.1.2.1
Table of Contents:
Using the Oracle Hyperion Profitability and Cost Management API Reference
Profitability Web Service Operations
Using the Profitability and Cost Management Sample Client File
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.
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 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.
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:
Open the OTN Documentation Library at http://www.oracle.com/technetwork/middleware/performance-management/documentation/index.html.
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.
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
Operation | Description | Input and Output Parameters |
---|---|---|
getApplications | List all existing Profitability and Cost Management applications. | Input Parameters:
Output Parameters:
|
getPOVs | List all existing POVs for a selected application. | Input Parameters:
Output Parameters:
|
getStages | List all existing stages for a selected application. | Input Parameters:
Output Parameters:
|
copyPovData | Copy POV data from a source POV combination to a destination POV combination. | Input Parameters:
Output Parameters:
|
deleteApplication | Delete an existing Profitability and Cost Management application. | Input Parameters:
Output Parameters:
|
deployCube | Deploy the database (cube) for a selected application. | Input Parameters:
Output Parameters:
|
getTaskflowStatusByProcessName | Obtain the current status of the job process name. The following valid status values are listed:
| Input Parameters:
Output Parameters:
|
processCalcScripts | Initiate the selected actions for a selected Application Name, POV and Layer. The following options are available:
| Input Parameters:
Output Parameters:
|
processGenealogyExecutionPaths | Generate the selected contribution paths for genealogy for a selected application. | Input Parameters:
Output Parameters:
|
importFromStaging | Import from Staging tables into a Profitability and Cost Management application. | Input Parameters:
Output Parameters:
|
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:
Set up the server that is to be enabled for Web Services. See the Oracle Hyperion Enterprise Performance Management System Installation and Configuration Guide.
When coding, select the ProfitabilityService service name. (See Using the Profitability and Cost Management Sample Client File for more information.)
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.
Optional: To run the program using a .bat or .sh script, edit the existing files to match the newly created Web Services client name.
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:
To set up the sample client environment:
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.
Copy the following files from the source folders listed below to the wsclient folder:
Table 2. Required Files for Sample Client
Source Folder | File Name |
---|---|
EPM_ORACLE_HOME/../user_projects/domains/EPMSystem/config/fmwconfig | jps-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/fmwconfig | cwallet.sso |
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=_
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.
From a command or shell window, set the following environment variables:
Table 3. Sample Client Environment Variables
Environment Variable | Location |
---|---|
JAVA_HOME | Location in which Java Development Kit 1.6.0_18 or higher is available:
|
MIDDLEWARE_HOME | Location in which Oracle Middleware home is installed.
|
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.
Use the format and operations specified in the sample client file to build your custom script. See 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:
In the command window, go to C:\wsclient. See Setting Up the Sample Client Environment.
hpm_ws_client.bat - help
The list of all available functions is displayed.
Table 4. Oracle Web Services Operations for Profitability and Cost Management
Operation | Description |
---|---|
getApplications | List all existing Profitability and Cost Management applications. |
getPOVs | List all existing POVs for a selected application. |
getStages | List all existing stages for a selected application. |
copyPovData | Copy POV data from a source POV combination to a destination POV combination. See |
deleteApplication | Delete an existing Profitability and Cost Management application. See |
deployCube | Deploy the database (cube) for a selected application. |
getTaskflowStatusByProcessName | Obtain the current status of the job process name. The following valid status values are listed:
|
runImportConfiguration | Import from selected staging tables into the Oracle Hyperion Profitability and Cost Management, Fusion Edition application. |
processCalcScriptOptions | Initiate the selected actions for a selected Application Name, POV and Layer. The following options are available:
|
processGenealogyExecutionPaths | Generate the selected contribution paths for genealogy for a selected application. |
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
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>>
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:
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
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