Dayalan Punniyamoorthy Blog

Showing posts with label Groovy. Show all posts
Showing posts with label Groovy. Show all posts

Thursday, April 24, 2025

Run Data Management rule on Autopilot: Streamlining DM Data Jobs with Groovy

Have you ever wanted to run a series of Data Management integrations in Oracle Cloud EPM automatically for specific forecast periods — all while staying user-friendly with runtime prompts and full-on status tracking?

Well, this Groovy business rule does exactly that. Let’s break it down

 

This Groovy rule is designed to automate and control the execution of Data Management (DM) integration jobs for forecast data. It dynamically interprets user input, validates required conditions, and executes the appropriate integration job for each forecast period in sequence.

The rule orchestrates the execution of multiple forecast data movement jobs in Oracle Cloud EPM. The jobs transfer forecast data from one scenario/version to another (like from mid-forecast to working version) using a Data Management (DM) integration job. The timing and execution logic is governed by runtime prompt inputs and substitution variables.

Monday, April 14, 2025

Data Copy using DataGridBuilder in Groovy!

 



 

In this blog, we will see how to perform an intercompany data translation with ease,  

 

This rule ensures intercompany data is clean, aligned, and instantly processed when users save a form. It applies standard naming and business logic automatically—no manual cleanup needed. Data flows straight into the target  cube or POV, reducing cycle time and reconciliation effort. It improves auditability and consistency across entities, accounts, and products. The result? Faster closes, fewer errors, and more trust in your numbers

Thursday, March 27, 2025

EPCM - Copy Data by Point of View operation via Groovy

If you’ve been working with Oracle EPM Cloud, particularly Profitability and Cost Management (PCM), you might need to copy data between different POVs (Point of View) in your application.

In Oracle's Enterprise Profitability and Cost Management (EPCM), efficiently managing data across different Points of View (POVs) is crucial for accurate financial analysis and reporting. A POV typically represents a specific combination of dimensions such as year, period, scenario, and version. Copying data from one POV to another allows organizations to replicate datasets across different scenarios or time periods, facilitating comparative analysis and forecasting. Oracle provides a REST API endpoint specifically designed for this purpose: the "Copy Data by Point of View" operation.


Thursday, January 30, 2025

Extracting Notes and Attachments from Cells in Oracle Cloud EPM Using Groovy!

Lets explore on how to extract cell notes and attachments from Oracle Cloud EPM using Groovy scripting. 



This blog walks through retrieving Entity and Cost Center descendants, querying financial data, and identifying cells with notes or file attachments.

The script dynamically iterates through each combination, loads a data grid, and logs key findings after finding the cell Notes and Attachment if any. 

Suppression rules ensure efficient execution, while error handling prevents failures. Ideal for auditing financial data and ensuring compliance. 

Friday, May 24, 2024

All About Clear Cube & Merge Data Slices!

 In this Blog post we will explore the Clear Cube & Merge Data Slices option in Planning and can be leveraged to EPCM applications using the REST API & Groovy


Clear Cube

The Clear Cube can be accessed from the Simplified Interface. 


Thursday, May 23, 2024

Running EPCM Calculation Manager rules in sequential and Data Management rules as a child job using Groovy!

In this blog we will see how to run the EPCM (Enterprise Performance Management Cloud)  Calculation Manager rules using groovy in a sequential manner also invoking Data Management rules as child jobs using the jobFactory.

Groovy script is fetching substitution variable values from an operation's application and printing them. Here's a detailed explanation along with the provided script: 

subVarValue is defined to fetch the value of a substitution variable from the application.

Also Sets the connection name, which is already predefined for the REST API to work. 

def connectionName = 'Localhost'

Closure subVarValue = { String subVar -> operation.application.getSubstitutionVariable(subVar).value }

String CurYr = subVarValue('CurYr')

String CurMth = subVarValue('CurMth')

println "The Rule is using the Sub Var Current Year : " +CurYr +" " + "Current Month : " +CurMth

Thursday, April 18, 2024

Groovy Rules Calling Enterprise Profitability and Cost Management Rules using REST API!


Using the Groovy script we can invoke the following REST API provided by an Enterprise Profitability and Cost Management system.

  • Calculate Model - Runs the calculation on a given point of view in a selected cube.
  • Clear Data By Point of View - Clears the data for a given point of view in a selected cube.
  • Copy Data by Point of View - Copies data from a source to a destination point of view in a selected cube.
  • Delete Point of View - Deletes the data associated with a point of view from the calculation cube.
  • Generate Model Documentation Report - Generates an Enterprise Profitability and Cost Management Model Documentation report. Any validation failures are written to file with file name provided in the parameters and can be accessed from Inbox/Outbox Explorer.
  • Validate Model - Automates the calculation process for validating a model. Any validation failures are written to file with file name provided in the parameters and can be accessed from Inbox/Outbox Explorer.
  • All this are asynchronous call, so use the job status URI to determine whether the operation is complete. For running all the above REST API Required Roles is Service Administrators.

Wednesday, November 16, 2022

Calling Data Management Rule from Calculation Manager rule using Groovy!

null

This was always a special request from multiple customers Can I run Data Management rules from a form?  For quite a while the answer was sorry you cannot. But with Groovy + Calculation Manager you can do that. Yes, you can call the Data Management rule from a Calculation manager rule and attach the Calculation Manager rule to a Menu and attach that Menu to the Form, so the users can run them when needed.

The next question is if the User id is not an Admin user, will he be still able to run the Data Management rule. As per the Oracle EPM security setup you cannot.

But you can overcome this by using Connections either by using On Demand Connections or Named Connections.

A Brief intro on when to use when, (from the Oracle document)

In general, connections can be created in one of two ways:

On-demand connection

  Connection connection = connection(http://server:port/HyperionPlanning/rest/v3/applications/Vision, "user", "password")
These connections are easy to change and are great for prototyping and trying out connections.

Named connection

  Connection connection = operation.application.getConnection("Job Definitions")
These connections allow clean separation between resource details and usage. This has multiple benefits over on-demand
connections including:

  • Ease of maintenance - Reuse a connection definition in multiple scripts. Any changes to the definition will automatically apply to all scripts using the named connection.
  • Enhanced security - with on-demand connections, confidential information such as passwords and API keys are visible to anyone who can edit the Groovy script. With named connections, sensitive information can be encrypted and stored securely and cannot be seen or retrieved by Groovy scriptwriters.
  • Ease of use - simplifies the creation of connections to first-party resources such as Oracle Cloud Services.

Monday, September 5, 2022

Invoking REST API via Groovy program outside of EPM Cloud – Authentication to EPM Cloud Part-2



This post is the continuation of the previous one where I explained how to read the User ID, Password, etc.. from a file in the Groovy Program. So the file containing the  User ID, Password, etc.. is a central repository where you need to change it only once.

In this post, I will extend that feature by using the encoding/decoding methods to encode the password and decode it wherever needed. So the password Is not exposed anywhere and no security breach of storing the password in a file or a program.

Let me divide this post into two parts

  1. Encode the Oracle EPM authenticating Password using a Secret Key.

Kindly note I have used the AES encryption algorithm to encrypt the password.

 

Saturday, August 27, 2022

Invoking REST API via Groovy program outside of EPM Cloud – Authentication to EPM Cloud

In this blog, we will see how to invoke the Oracle EPM REST API endpoints outside of Oracle EPM (as a standalone program accessing the REST API endpoints from any machine where the Groovy program can be executed). We all knew we can call Oracle EPM REST API endpoints from the Calculation Manager Business rules as Groovy rules but this is entirely different from that.

 

Friday, May 31, 2019

New Groovy Training Available from Oracle!!!!

Wow i just saw this and cant help myself in advertising this, now we have the OBE (oracle by example) for the GROOOOOOOVYYYYYYYYY yahhhhhh enjoy...

Introduction to Groovy Business Rules
Learn about the Groovy scripting language and see how to create a Groovy script in Oracle Enterprise Planning Cloud.
Working with Data Grids and Iterators in Groovy
Implement Groovy scripts to work with data grids and data grid iterators. You use conditional logic to set the background colors in a data grid, implement performance benchmarking, and set default data values in a grid.
Moving Dimension Members with Groovy
Create a Groovy script to work with metadata, in this case, moving a member from one parent to another.
Moving Modified Data Using Groovy and Smart Push
Push data from a source location to a target location via Groovy rules.
Validating Data Entry Values with Groovy
Implement a Groovy script that validates data entry against allowed ranges stored in a driver cube.
Adding Dimension Members with Groovy
Create a Groovy script to work with metadata, in this case, adding a member to a dimension.
Calculating Modified Data Using Groovy
Generate a focused calculation script to calculate only data that has been edited, instead of the entire data entry form.
Integrating Data Between Planning and Strategic Models Using Groovy
Learn about Strategic Modeling concepts and how to integrate data between strategic models and planning applications using Groovy scripts.
Creating Groovy Templates
Create a Groovy template with interactive Design Time Prompts (DTPs).
The OBEs are available on the Help Center.



Thursday, March 15, 2018

Explore DataManagement REST API - Oracle PBCS/EPBCS with Groovy flavor !!!


In continuation of other series about REST API on Planning ,Migration & User Reports in this post let’s explore the REST APIs for DataManagement to run data rules, run batches, import and export data mapping, and to execute reports. 


To begin let's explore groovy program to get the DataManagement apiVersion details and the Output below

1.DataManagement apiVersion Details



Tuesday, February 27, 2018

Edit / View Groovy from Notepad++

This will help you if you like to edit or view the Groovy Program using the Notepad ++

Currently, you don't have Groovy listed under Language in Notepad ++ so editing or viewing a Groovy program is not well displayed.

But you can add Groovy language to Notepad ++.

Step 1:


Creare “userDefineLang_Groovy.xml” by copying the following code and saving it

<NotepadPlus>
    <UserLang name="Groovy" ext="groovy" udlVersion="2.1">
        <Settings>
            <Global caseIgnored="no" />
            <Prefix Keywords1="no" Keywords2="no" Keywords3="no" Keywords4="no" />
        </Settings>
        <KeywordLists>
            <Keywords name="Comments">03/* 04*/ 00// 01 02</Keywords>
            <Keywords name="Keywords1">abstract break case catch continue default do else extends final finally for if implements instanceof native new private protected public return static switch synchronized throw throws transient try volatile while strictfp package import false null super this true</Keywords>
            <Keywords name="Keywords2">as assert def mixin property test using in it</Keywords>
            <Keywords name="Keywords3">boolean byte char class double float int interface long short void</Keywords>
            <Keywords name="Keywords4">abs any append asList asWritable call collect compareTo count div dump each eachByte eachFile eachLine every find findAll flatten getAt getErr getIn getOut getText grep immutable inject inspect intersect invokeMethods isCase join leftShift minus multiply newInputStream newOutputStream newPrintWriter newReader newWriter next plus pop power previous print println push putAt read readBytes readLines reverse reverseEach round size sort splitEachLine step subMap times toInteger toList tokenize upto waitForOrKill withPrintWriter withReader withStream withWriter withWriterAppend write writeLine</Keywords>
            <Keywords name="Delimiters">00&quot; 01 02&quot; 03&apos; 04 05&apos;</Keywords>
        </KeywordLists>
        <Styles>
            <WordsStyle name="DEFAULT" fgColor="000000" bgColor="FFFFFF" fontName="" fontStyle="0" fontSize="" nesting="0" />
            <WordsStyle name="COMMENTS" fgColor="008000" bgColor="FFFFFF" fontName="" fontStyle="0" fontSize="" nesting="0" />
            <WordsStyle name="LINE COMMENTS" fgColor="008000" bgColor="FFFFFF" fontName="" fontStyle="0" fontSize="" nesting="0" />
            <WordsStyle name="NUMBERS" fgColor="FF0000" bgColor="FFFFFF" fontName="" fontStyle="0" fontSize="" nesting="0" />
            <WordsStyle name="KEYWORDS1" fgColor="0000FF" bgColor="FFFFFF" fontName="" fontStyle="1" fontSize="" nesting="0" />
            <WordsStyle name="KEYWORDS2" fgColor="006699" bgColor="FFFFFF" fontName="" fontStyle="1" fontSize="" nesting="0" />
            <WordsStyle name="KEYWORDS3" fgColor="FF8000" bgColor="FFFFFF" fontName="" fontStyle="1" fontSize="" nesting="0" />
            <WordsStyle name="KEYWORDS4" fgColor="8000FF" bgColor="FFFFFF" fontName="" fontStyle="1" fontSize="" nesting="0" />
            <WordsStyle name="OPERATORS" fgColor="804000" bgColor="FFFFFF" fontName="" fontStyle="1" fontSize="" nesting="0" />
            <WordsStyle name="DELIMITERS1" fgColor="808080" bgColor="FFFFFF" fontStyle="0" nesting="0" />
            <WordsStyle name="DELIMITERS2" fgColor="808080" bgColor="FFFFFF" fontStyle="0" nesting="0" />
        </Styles>
    </UserLang>
</NotepadPlus>

Monday, February 26, 2018

Explore User Reports & Daily Maint REST API - Oracle PBCS with Groovy flavor !!!


In continuation of other series about REST API on Planning & Migration in this post let’s explore the REST APIs for Provision Reports,User Audit reports and the Daily Maintenance Window Time. 

1.REST API for running Provision report on Oracle PBCS\EPBCS

Straight from the document:
Generates a provisioning report of users in the system and writes the report to the filename provided. This is an asynchronous job and uses the job status URI to determine if the operation is complete.

You can manually generate a Provision Report from Oracle PBCS instance
 Navigate -> Tools

Wednesday, November 29, 2017

Explore Migration REST API - Oracle PBCS with Groovy flavor !!!

I hope you have enjoyed the Introduction and the Planning REST API posts which were posted earlier. Lets explore the Migration related REST API for the Oracle PBCS in this post.




Migration REST APIs


Use the Migration REST APIs to get API versions, work with files, and manage
services and application snapshots.

Friday, October 13, 2017

Explore Planning REST API - Oracle PBCS with Groovy flavor !!!

After the introduction to the REST API & Groovy lets explore the Planning REST API in this post.

1. Get REST API version for Planning

Returns information about which versions are available and supported. Multiple versions might be supported simultaneously by Oracle Hyperion Planning.

This is already covered but lets see how to get the apiVersion details using Groovy.

Output of the program

Monday, September 11, 2017

Finally REST(REST API) on Oracle PBCS!!!

This was a lying in my draft for a quite long time after my webinar on this topic, finally publishing it :-)  have fun.

The complete documentation for the REST API for Oracle EPM Cloud is here

Straight from document:

REST describes any simple interface that transmits data over a standardized interface (such as HTTP) without an additional messaging layer, such as SOAP. REST provides a set of design rules for creating stateless services that are viewed as resources, or sources of specific information, and can be identified by their unique URIs. RESTful web services are services that are built according to REST principles and, as such, are designed to work well on the web. Typically, RESTful web services are built on the HTTP protocol and implement operations that map to the common HTTP methods, such as GET, POST, PUT, and DELETE to retrieve, create, update, and delete resources, respectively. 

REST API Methods

You can create, view, update, or delete Oracle Enterprise Performance Management
Cloud resources using standard HTTP method requests, as shown below
Method
Description
GET
Retrieve information about the REST API resource
POST
Create a REST API resource
PUT
Update a REST API resource
DELETE
Delete a REST API resource or related component

Current REST API Version

Covering only majorly used components
REST Resource REST API version Getting REST API Versions
     Planning
v3
/HyperionPlanning/rest/ 
     Migration
11.1.2.3.600
/interop/rest/ 
Data Management
V1
/aif/rest/

There are multiple REST API clients available for free, you can pick as per your choice.

Tuesday, August 20, 2013

Just about me

This is Dayalan Punniyamoorthy and I am passionate about the Oracle EPM suite of products. I did start my career with Brio aka Hyperion Interactive Reporting in 2006. Until now from 2006 I did acquire knowledge on multiple Oracle Hyperion EPM suites of products. In this blog, I will post my findings and the learnings I feel helpful to others who are using the Oracle Hyperion EPM Suite of products.

Keep visiting if you find my blog useful.

I can be reached by Twitter @Pdayalan

Via Linkedin - https://www.linkedin.com/in/dayalanpunniyamoorthy/

Thanks for your time.

Dayalan P.