Dayalan Punniyamoorthy Blog

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

Monday, March 24, 2025

Fetching Pipeline Execution Details in Oracle EPM Using Groovy!

In Oracle EPM, pipelines are essential for automating data workflows, integrating data sources, and performing transformations. To ensure smooth execution, it's crucial to monitor pipeline runs and detect job failures in real-time.

 

When running automated data processing or calculations in Oracle EPM Cloud, monitoring the execution status of pipelines is critical. You don’t want to just trigger a pipeline and hope for the best—you need real-time insights into whether jobs succeed or fail.



 

Wednesday, March 5, 2025

Automate version creation and renaming in Oracle EPM with Groovy scripting!

 

Groovy scripting, which enables automation, dynamic validation, and metadata updates.

In this blog, we’ll walk through two Groovy business rules that manage version members in the Version dimension:

  1. Creating a new version dynamically
  2. Renaming an existing version member


We’ll explain the logic behind each rule, 

Tuesday, December 17, 2024

Automating Multiple Data Push in Oracle Cloud EPM Using Groovy Business Rules!

In Oracle Cloud EPM, Groovy scripting has become a powerful tool for automating business processes, ensuring real-time validations, and enhancing interactivity. This blog explores a practical use case where a Groovy business rule dynamically sets substitution variables and validates Data Maps before executing Smart Push operations.

The rule also demonstrates on using runtime prompts (RTPs) to set values for Substitution Variables, validate Data Map existence, execute Smart Pushes for specific members, and log user execution details.



Friday, May 10, 2024

Setting User variables values for the first time using Groovy rule!



User variables function as filters within forms, allowing users to narrow their focus to specific members, like a department. Prior to linking a user variable to a form, you need to establish the user variable. When designing forms with user variables, users are required to initially designate values in preferences for the variable prior to accessing the forms. Subsequently, users can modify the variable within the form only if it's dynamic. If not, they must persist in setting the variable in preferences. For instance, if a user variable named "Cost Center" is created, users must designate a Cost Center before engaging with the form.

When users interact with a form for the first time, they set their preferred variable, such as a department or division, in their preferences. This initial selection is crucial as it helps customize their form-viewing experience.

After the initial setup, users have the flexibility to update this variable. They can either go back to their preferences and make changes there, or they can directly adjust the variable within the form itself. This flexibility allows users to adapt their form interactions based on changing needs or contexts without needing to navigate away from the form.

Overall, this approach ensures that users have control over their viewing preferences and can tailor their experience to suit their individual requirements.

Monday, May 6, 2024

Multiple Rules of Enterprise Profitability and Cost Management (EPCM) using Groovy in Sequential Manner!

In this blog we will see how to run multiple Rules of Enterprise Profitability and Cost Management (EPCM) using Groovy in Sequential and proceed with the next rule only after completion the previous rule.











 

/**************************************************************************************/

/*                  Run IC Calcs All Region                                                                     */

/*                  Creation Date       : 10th Apr 2024                                                  */

/*                  Version                   : 1.0                                                                    */

/*                  Modifications         :                                                                        */

/*       The Rule uses the Sub Var &CurMth, &CurYr.                                          */

/*  The Rule will be executing the following,                                                     */

/*       1. Clear for EMEA                                                                                          */

/*        2. Clear for APAC                                                                                         */

/*        3. Clear for Americas                                                                                   */

/*       4. Merge Slices                                                                                         */

/*       5. Run Ruleset Ranges:                                                                            */

/*                  Start   End                                                                                      */

/*                  1            999                                                                                   */

/**************************************************************************************/

connectionName is a variable that stores the name of the connection to the server. In this case, it's set to 'Localhost'. This variable is later used to specify which server to connect to when making HTTP requests. 

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, February 8, 2024

Groovy rule to perform an action depends on the selected Scenario in the RTP!

This time, A different scenario was accomplished using the Groovy by one of my teammates. I thought of sharing here.

The requirement is to populate the Long-range planning and the rule will perform an action if the OEP_Plan (budget) is selected in the RTP and a different action if OEP_Actual (actual) is selected in the RTP.

Monday, December 18, 2023

Add a New row to enter data for a New Product or a Customer - Using Groovy Part 2

 In the Part -1  we saw how to add a new row for a New Product or a Customer using the Calculation Manager rule. In this post, we will see how to do the same using the Groovy rule. 

This is the data from where add a row option is enabled,


Column A is hidden and the rest of the column will be visible.


The actual form is shown below, 

Thursday, May 4, 2023

EPBCS Groovy Rule series-1, Focused calculation based on the selected account!

This blog post will demonstrate how to carry out a targeted calculation using the accounts you've chosen from the Data Form's Page.


Product and Customers on the Rows, on the Data Form.

The Data Form allows for the selection of a single account from a group of accounts in order to perform the calculation. A specific calculation will be performed depending on the account chosen by the members on the POV and on the Page of the Data from the rule related to the Data Form.

Really neat and effective, huh?

Let's look at the Calculation rule that makes this possible.

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.