SlideShare a Scribd company logo
GROOVY AND PBCS
IS
GAME CHANGING
INTRODUCTION
KYLE GOODFRIENDHuron Consulting / Oracle EPBCS Implementation Specialist
Professional and Personal
• BBA, concentration in Finance
• College professor for 5 years
• Started consulting in 2008
• 100% self taught (technology)
• Worked with Huron since 2013
(via ADI Strategies)
• Created In2Hyperion and the
Essbase Excel Ribbon
• Started the Columbus Hyperion
Customer Community
(CHCC.In2Hyperion.com)
• Love playing ice hockey, scuba
diving, and rescue dogs
• Have a beautiful wife that I drive
nuts
• Raising a son that is a walking
medical deductible
Planning and Essbase
• Worked with Hyperion since
1997
• Started learning Groovy in
August of 2017
• Worked with the cloud since
2015
• Hold certification in Hyperion
Planning, PBCS, and EPBCS
• Hold specialization in Pre-
Sales, Sales, and Support for
both Planning and Essbase
• Also a Microsoft Certified
Professional
Groovy and PBCS Slide 3OVOAUG / Goodfriend
HOW TO CONTACT KYLE
PERSONAL
kyle@in2hyperion.com
www.in2hyperion.com
HURON CONSULTING GROUP
Kgoodfriend@huronconsultinggroup.com
Groovy and PBCS 4OVOAUG / Goodfriend
WHO SHOULD ATTEND
• Users who want to be exposed to improved
possibilities
• Administrators who want to see how Groovy can
help them improve performance and usability
• Anybody that is considering moving to PBCS
• Anybody that is concerned about performance of
the cloud
Groovy and PBCS 5OVOAUG / Goodfriend
SESSION RULES
Be interactive, jump in,
ask questions
Tweet and share your
experiences
Take notes
Add value, share
experiences
Be respectful – none of
us know everything
Stand up, stretch, stay
awake
Groovy and PBCS 6OVOAUG / Goodfriend
SESSION OBJECTIVES
Have a cursory
understanding on how
to get started creating a
Groovy calculation
Share your knowledge
with others
Know where to get help
and how to grow your
knowledge of Groovy
and Groovy calculations
Know enough to be
able to identify where
Groovy can improve
processes
Understand how
Groovy provides
functional additions
Know what is required
to use Groovy in PBCS
calculations
Groovy and PBCS 7OVOAUG / Goodfriend
Sign up at
www.in2hyperion.com
to receive blog
updates through email
STAYING CONNECTED
IN2HYPERION
Join the LinkedIn
In2Hyperion Group
www.linkedin.com/
groups/4010770
LINKEDIN GROUP
Groovy and PBCS 8OVOAUG / Goodfriend
PRESENTATION AGENDA
01 GROOVY INTRODUCTION
What is it and how do I get it
02 FUNCTIONAL SUMMARY
Highlight the functionality added
with using Groovy calculation
03 PERFORMANCE
Discuss the game changing
performance improvements
04 USABILITY
Overview of new features your users
will love
05 DEMONSTRATION
Live demonstration of functionality
07 DEVELOPING SCRIPTS
Overview of requirements to
develop Groovy calculations
06 OTHER ENHANCEMENTS
Discussion of other useful
functional improvements
08 FINISHING UP
Interactive Q/A
09 APPENDIX
Document the calculation discussed
in the session for you to reference
Groovy and PBCS 9OVOAUG / Goodfriend
IF TIME PERMITS
CHANGING
NAMES TO
PROTECT
THE
INNOCENT
• The application is a replica of live application
• The volume of metadata and data is the same
• The metadata has been changed to protect the
innocent
• The data has been altered
GROOVY INTRODUCTION
The back story of what is needed to take advantage of
Groovy Calculations
Groovy and PBCS 11OVOAUG / Goodfriend
WHAT IS GROOVY
Apache Groovy is a powerful, optionally typed and
dynamic language, with static-typing and static
compilation capabilities, for the Java platform
aimed at improving developer productivity thanks
to a concise, familiar and easy to learn syntax. It
integrates smoothly with any Java program, and
immediately delivers to your application powerful
features, including scripting capabilities, Domain-
Specific Language authoring, runtime and
compile-time meta-programming and functional
programming.
Groovy and PBCS 12OVOAUG / Goodfriend
FLAVORS OF GROOVY
RELATED TO PBCS
Groovy can be used to access the API to
do all kinds of things, including
automation, system backups, and user
communication. This discussion will focus
on the ability to access Groovy INSIDE the
calculation manager only.
Groovy and PBCS 13OVOAUG / Goodfriend
On-Premise made
Groovy available late in
2017, and provides the
developers to ability to
execute Groovy scripts
from Business Rules.
PBCS integrated
Groovy into
Calculation Manager in
June of 2017
CLOUD VS ON-PREMISE
PBCS provides the ability to interact with the
Planning objects and in real time and execute
logic based on the user’s actions
On-Premise provides the ability to run
Groovy scripts. It provides complete access
to the Groovy language independent of the
Planning objects
Both have advantages over each other, are
similar in the functionality they provide, but
are drastically different in some of the results
they can produce
Groovy and PBCS 14OVOAUG / Goodfriend
Seamlessly and
transparently
integrates and
interoperates with Java
and any third-party
libraries
BENEFITS OF GROOVY
SMOOTH JAVA
INTEGRATION
Closures, builders,
runtime & compile-time
meta-programming,
functional
programming, type
inference, and static
compilation
POWERFUL
FEATURES
Concise, readable and
expressive syntax, easy
to learn for Java
developers
FLAT LEARNING
CURVE
Web development,
reactive applications,
concurrency /
asynchronous / parallelism
library, test frameworks,
build tools, code analysis,
GUI building
VIBRANT AND RICH
ECOSYSTEM
Groovy and PBCS 15OVOAUG / Goodfriend
Great for writing
concise and
maintainable tests,
and for all your build
and automation tasks
BENEFITS OF GROOVY
SCRIPTING AND
TESTING GLUE Apache Groovy is a powerful, optionally typed
and dynamic language, with static-typing and
static compilation capabilities, for the Java
platform aimed at improving developer
productivity thanks to a concise, familiar and
easy to learn syntax. It integrates smoothly with
any Java program, and immediately delivers to
your application powerful features, including
scripting capabilities, Domain-Specific Language
authoring, runtime and compile-time meta-
programming and functional programming.
WHAT IS GROOVY
Flexible & malleable
syntax, advanced
integration &
customization
mechanisms, to integrate
readable business rules in
your applications
DOMAIN-SPECIFIC
LANGUAGES
Groovy and PBCS 16OVOAUG / Goodfriend
IMPACT TO
PBCS
DESIGN
AND
OPTIONS
AVAILABLE
• Java development is fast tracked and
maintenance is simplified
• Developers get all the functionality of the Java
API
• The knowledge required to construct complex
functionality is far less with Groovy
• PBCS is built with Groovy so it is going to be a
part of the product roadmap
• Within PBCS
• Access to use groovy to interact with the user
• Customize commands sent to the Essbase
IMPACT TO
IMPLEMENTATION
A plethora of new and enhanced
functions exist to improve performance
and the user experience that can be
explored
Groovy and PBCS 18OVOAUG / Goodfriend
REAL WORLD USER EXAMPLE (SPEED &
FUNCTIONALITY)
99%IMPROVEMENT 98% 99%
Reporting includes all updates from
detailed modules (product, Capex,
workforce, and similar modules) and
is included in
real time as changes are made
Consolidated Reporting
Reporting includes all updates from
detailed modules (product, Capex,
workforce, and similar modules) at
scheduled intervals
users have to wait to see
consolidated information
Groovy eliminates the need to
consolidate the BSO cube and
copies data directly from the
ASO cube at a consolidated
level
.2 Seconds
Dimensions are consolidated
and copied to the P&L model
82.9 Seconds
Consolidated P&L
Product detailed dimensions
are consolidated and moved
to the P&L model
Groovy selects only the cells
that where edited and copies
only what changed to the
reporting model
1.0 Seconds
All data on the form is
synchronized
14.5 Seconds
Smart Push
Data synchronizes to the
reporting cube for analysis
01
0110
0001
01101
Groovy selects only edited
cells and executes the logic
on only products and periods
that changed
0.3 Seconds
All products on the form are
calculated
26.1 Seconds
Business Logic
Growth rates are entered at
total product breakouts and
allocated to the detailed level
With the inclusion of Groovy
and access to the Java API,
more customization can be
integrated to maximum
performance and achieve real
time consolidated reporting
Submit
Planner Input
User submits updates to the
Gross Profit model at a
detailed product level that
exists at a more granular level
than in the P&L model
Groovy and PBCS 19OVOAUG / Goodfriend
Reporting includes all updates from
detailed modules (product, Capex,
workforce, and similar modules) and
is included in
real time as changes are made
Consolidated Reporting
Reporting includes all updates from
detailed modules (product, Capex,
workforce, and similar modules) at
scheduled intervals
users have to wait to see
consolidated information
REAL WORLD PROCESS EXAMPLE (SPEED &
FUNCTIONALITY)
Automated Process
Administrative processes are
executed to run all business
logic and model
synchronizations
The entire data set is
consolidated and moved to
the P&L model
12.0 Seconds
Dimensions are consolidated
and copied to the P&L model
663.6 Seconds
Global Consolidation
Global product consolidations are
often required to catch all changes
and completed during
maintenance windows
99% 99%
Groovy and PBCS 20OVOAUG / Goodfriend
SHOULD
YOU
CONSIDER
GROOVY AS
AN OPTION
NEW
IMPLEMENTATIONS
• On premise implementations that want better
performance
• PBCS implementations that have performance
issues due to
• Large dimensions
• Complex calculations
• Detailed planning input
• Do not have real time reporting
• Implementations that need more complex user
input validation
• Applications that want proactive data validation
SHOULD
YOU
CONSIDER
GROOVY AS
AN OPTION
EXISTING
IMPLEMENTATIONS
• Have complex models
• Have large dimensions
• Require data input validation
• Require real time consolidated reporting
SO, PRETTY MUCH EVERYBODY WILL BENEFIT
FROM THE BENEFITS OF GROOVY
• ePBCS and PBCS+1 have access to create
Groovy calculations
• Groovy calculations open up the Java API and
provide a user experience never before
available
• Have access to use groovy to interact with
the user and customize commands sent to
the PBCS
There is currently no expectation that Oracle will make
Groovy Calculations available in future on-premise releases
GROOVY
AVAILABILITY AND
LICENSING
Groovy and PBCS 24OVOAUG / Goodfriend
EXPERTISE NEEDED
Intuitive Developers
Groovy may be built on Java, but Java developers are not
required to successfully implement Groovy into PBCS.
Experienced developers who have knowledge within PBCS
and understand basic functionality with scripting will be
able to use Groovy training materials and global rules to
build an application with groovy that fits a clients
performance needs. It only takes a little groovy knowledge
to exponentially improve ePBCS performance.
Visionary Managers
Managers who can understand, interpret, and plan the
execution of requirements with Groovy will build
exceptional applications. Managers will communicate how
Groovy fills performance gaps that existed prior to it’s
release and help clients understand why Groovy is a
necessary element of any planning application.
Groovy and PBCS 25OVOAUG / Goodfriend
FUNCTIONAL
SUMMARY
What is available with Groovy calculations
Groovy and PBCS 26OVOAUG / Goodfriend
FUNCTIONAL OVERVIEW
Proactive User Input Validation
Users are prompted for input frequently, for
things like employee properties, x, and x. This
data can be validated prior to any business logic
to ensure consistent and valid data input.
Proactive Data Validation
User input can be validated and can interrupt
the data form save proactively. For example, if
an employee is not fully allocated, the allocation
will not save until the allocation is 100%
Selective Data Synchronization
Data between input and reporting applications can
be near real time due to synchronization being
isolated to only edited or effected data, which is
now done on user save more frequently due to
performance improvement.
Selective Business Logic Execution
User can now see significantly improved
performance on data form input because the
business logic can be isolated to only what has
been changed or effected.
Access to Java Functions
Logic that couldn't be completed, or wasn't
because of performance issues, can now be
accessed and executed at lightening
speed. Developers now have access to
functions from the Java API.
Real Time Consolidated Reporting
Data between applications, like workforce,
capital, and a consolidated P&L can be
synchronized in real time without timely data
consolidations.
FUNCTIONAL OVERVIEW
Execute Calculation Logic on ASO
Prior to the availability of Groovy, business logic
on ASO was not available. Now, all logic that
exists in BSO databases is now available through
the Java API and can be executed directly in ASO.
Advanced Form Traffic Lighting
Simple and extremely complex color coding can
be added to forms on load and on save. The
possibilities are endless and are completely
customizable.
Custom Logging
Developers have complete control over what is
logged for review. User information, POV
selections, timing, and data that has changed,
are just a sample of what can be logged.
Custom User Errors
Custom messages in an infinite number of
languages can be displayed in prompts and
added to cells to communicate changes, rule
violations, and errors..
Interaction with Strategic Modeling
Data movement to and from Strategic
Modeling can be done in real time – on form
save.
PERFORMANCE
IMPROVEMENTS
The speed and agility that Groovy provides in
customizing calculations introduces consolidated real
time reporting
Groovy and PBCS 29OVOAUG / Goodfriend
FILTERED EXECUTION OF
DATA FORM UPDATES
One of the challenges with Planning is the
inability to proactively validate data and
communicate that back to the users.
With Groovy, this challenge is non
existent.
Groovy and PBCS 30OVOAUG / Goodfriend
DYNAMIC
BUSINESS
LOGIC
Legacy Business Rule
• Provides the ability to
pass the POV
(Page/Header) to a
business rule to isolate
what is calculated
• Executed on all rows and
columns regardless of the
state of the data
Groovy Calculation
• Can access the same
POV and can
dynamically change
business logic based on
selections
• Can identify the
changed cells and can
alter the business logic
based on results
FILTERED
EXECUTION
WITHOUT
GROOVY
Legacy Planning
• Provides the ability to pass the POV (Page/Header) to a business rule to
isolate what is calculated
• Executed on all rows and columns regardless of the state of the data
FIX(@RELATIVE(“Vendor”,0),”Jan”:”Dec”,…)
FILTERED
EXECUTION
WITH
GROOVY
Groovy Calculation
• Can access the same POV and can dynamically change business logic based
on selections
• Can identify the changed cells and can alter the business logic based on
results
FIX(“v30000400140003”, “V30000400630008”,”Feb”,”Mar”,”Apr”,”May”,…)
Filtered Data Movement
In conjunction with the filtered business logic execution, the same can
be ported to the isolation of edited data when moving it to other
databases.
Data Maps and Smart Pushes Moving and mapping
consolidated data between
applications with different
dimensionality
DATA
MOVEMENT
SMART PUSH
AND
DATA MAPS
• In conjunction with the filtered business logic
execution, data pushes
• Override Form Results
REAL TIME
CONSOLIDATED
REPORTING
Detailed
App
Consolidated
P&L
Detailed
App
Consolidated
P&L
NON GROOVY
• All dimensions need to be
consolidated
• Movement from ASO is not possible
• Movement is batched and scheduled
WITH GROOVY
• NO BSO consolidation is required
• Data can be transferred from ASO
• Movement is executed on form
save
USABILITY
ENHANCEMENTS
The addition of proactive user interaction allows
customized communication and stops users from saving
data that violates business rules
Groovy and PBCS 37OVOAUG / Goodfriend
TRAFFIC
LIGHTING
AND CELL
LEVEL
WARNINGS
• The first level of interaction is traffic lighting.
• These notification would be the equivalent of
warnings if data is valid, but might be incorrect
• One cell is larger than all the others in the row
• Negative values are not normally entered for a row
• Ratios are higher or lower than expected
• These can be used in dashboards to point out
data anomalies
• Large variances
• Lowest margins of the organization’s entities
• Budget variances
RUN TIME
PROMPT
• Run Time Prompts can be validated based on
pretty much anything you can think of
• Users can be asked to execute (deleting data or
long running calculations)
• Only allow certain characters
DATA
FORM
VALIDATION
• Any validation that can be done using member
names, hierarchies, or math is possible
• Example
• The GP Level 2 % has to be between -10% and 30%.
• The Regular Cases CANNOT have one month that is more than 50%
of the total cases.
• If Regular Cases is entered, a corresponding Average Price per Case
is required.
DATA
FORM
VALIDATION
• Example Adjustments can be made to any
month
• The net change has to be 0
• No change can push the number to a
negative number
Eliminate user confusion and data issues can improve a budget and
improve productivity by catching problems before they exist.
Stopping a user before they enter invalid data, cell by cell warnings,
intuitive return messages, it is all here with Groovy.
In line data form errors pinpoint
where a planning has entered
invalid data and eliminate
future data frustration
validating data.
Prompting users with
meaningful errors on input
improves the user experience
and reduces frustration
CUSTOM
ERROR
PROMPTS
• Communicating with the user is far more
flexible and effective using Groovy Calculations
• Tooltips can be added to cells with custom
messages
• Cells can be color coded – traffic lighting, warnings,
errors, successes
• Messages can be managed and used
• Multiple languages
• Custom messages
FUNCTIONAL
DEMO
The addition of proactive user interaction allows
customized communication and stops users from
creating data validity problems
Groovy and PBCS 44OVOAUG / Goodfriend
Proactive User Input Validation
• New Brand Form
Proactive Data Validation
• New Brand Form
• Phasing Form
Selective Data Sync / Selective Business Logic / Real Time
Consolidation
• Override
• Reset Vendors
Custom Errors
Custom Logging
Groovy and PBCS OVOAUG / Goodfriend 45
DEMO SUMMARY
OTHER
POSSIBILITIES
This was released in July ‘17, so every month there are
additional functions and bug fixes released. There is
additional functionality available worth noting, as it can
introduce significant changes in the Planning landscape
Groovy and PBCS 46OVOAUG / Goodfriend
With Groovy, business
logic can be written
and executed, with
results stored in ASO
BUSINESS LOGIC CAN BE EXECUTED IN ASO VIA
GROOVY
BUSINESS LOGIC
Allocation logic can be
processed in Groovy
with the results stored
in ASO
ALLOCATIONS
Data can be loaded to
ASO, but has minimal
calculation logic
ASO LIMITATIONS
Currency exchange
rates can be accessed
and used to calculate
and store USD
equivalents
FX RATES
Groovy and PBCS 47OVOAUG / Goodfriend
ACCESS TO
JAVA
FUNCTIONS
• Java functions are available and can be used.
These can introduce opportunities to do things
never before available, or improve on functions
in Essbase that introduce performance
degradation.
• Math
• Strings
• If/Then logic
• Mapping
• Comparisons
CUSTOM LOGGING
Logging can be completely customized to
include data, user information,
performance statistics, logic executed and
exception reporting – pretty much
anything you can think of.
• User information
• POVs
• Edited cells
• Execution time
• Information to debug logic
Groovy and PBCS 49OVOAUG / Goodfriend
WRITING YOUR FIRST
GROOVY CALCULATION
The start of being self sufficient begins now
Groovy and PBCS 50OVOAUG / Goodfriend
Access to Groovy in calculations can be divided into two functional
groups. Both have distinct uses.
Non Essbase calculations, like
code validation, data pushes,
and all other functionality other
than the Essbase calculation
creation and submission
Essbase calculations can be
generated and executed based
on the results of the user
submission
GROOVY
CALCULATION
WHAT YOU
NEED TO
KNOW
• Groovy works in conjunction with the PBCS API
• Groovy enables you to use the PBCS API
• The PBCS API allows you to interact with PBCS
• What is Groovy
• Variables
• Math functions
• String functions
• Looping
• Writing to the log
• What is the API
• Most objects start with operator, but any line with
an operator/action/reference to a PBCS object
COMMON
GROOVY
SNIPPETS
Interact with the Job console
Print / println
Store POV members in a variable
String Year = operation.grid.find
{it.dimName=='Years'}.essbaseMbrName
Loop through the cells in a grid
operation.grid.dataCellIterator({DataCell cell -> cell.edited}).each
{
periods << cell.periodName
products << cell.getMemberName("Product")
}
Execute a data push
operation.grid.getSmartPush("Employee Data").execute( [
"Employee" : employeesStr ] )
Initiate error messages with a message object
def mbUs = messageBundle(
["validation.missingmember.grade":"No Grades found on the Grid."]
)
def mbl = messageBundleLoader(["en" : mbUs])
CREATING
YOUR FIRST
GROOVY
SCRIPT
• Open Rules in PBCS and create a new rule
• Change the dropdown box with from Designer
to Edit Script
• Change the Script type dropdown box from
Calc Script to Groovy Script
GROOVY
CALC
EXAMPLES
println "The Year Is: " + operation.grid.pov.find{it.dimName =='Years'}.essbaseMbrName
println "The calculation is finished"
String sScenario = '"' + operation.grid.pov.find{it.dimName =='Scenario'}.essbaseMbrName + '"’
println "The scenario is $sScenario"
SEND MESSAGE TO THE LOG
GROOVY
CALC
EXAMPLES
"""SET CREATENONMISSINGBLK ON;
FIX(${fixValues(rtps.Scenario, rtps.Year, rtps.Period,
rtps.Entity, rtps.Version, employee)}, "USD")
"Employee Phone" = $rtps.EmployeePhone;
"Employee Email" = $rtps.EmployeeEmail;
ENDFIX;"""
- or -
Def sEssCalc << """SET CREATENONMISSINGBLK ON;
FIX(${fixValues(rtps.Scenario, rtps.Year, rtps.Period,
rtps.Entity, rtps.Version, employee)}, "USD")
"Employee Phone" = $rtps.EmployeePhone;
"Employee Email" = $rtps.EmployeeEmail;
ENDFIX;"""
Return sEssCalc
SENDING CALCULATION TO PLANNING
GROOVY
CALC
EXAMPLES
operation.grid.dataCellIterator.each {
if(it.missing) {
it.bgColor = 0x00BFFF
} else if(it.data <= 50000)
it.bgColor = 0xFF8C00
else if(it.data > 50000)
it.bgColor = 0x00FA9A
}
ITERATE THROUGH CELLS
GROOVY
CALC
EXAMPLES
operation.grid.dataCellIterator.each {{DataCell cell -> cell.edited}
if(it.missing) {
it.bgColor = 0x00BFFF
} else if(it.data <= 50000)
it.bgColor = 0xFF8C00
else if(it.data > 50000)
it.bgColor = 0x00FA9A
}
ITERATE THROUGH EDITED CELLS
MORE
EXAMPLES
AT
• Groovy Series
• Part 1, Groovy
• Part 2: Data Validation
• Part 3: Acting On Edited Cells
• Part 4: Run Time Prompts
• Part 5: Accessing Substitution Variables
• Part 6: Converting POV into Fix
• Part 7: Validating Run Time Prompts
• Part 8: Customizing Data Maps and Smart Pushes
• Work in progress
• Part 9: Returning Errors
• Part 10: Validating Form Data
• Part 11: Interacting with Smart Lists
• Part 12: Checking The POV Is Level 0
• Part 13: Real Time Data Movement
• Other Groovy Related Articles
• PBCS Data Map / Smart Push Has Data volume Limits
GETTING
HELP
There are a lot of great books, articles, videos on Groovy listed here:
http://groovy-lang.org/learn.html
In particular, I would like to highlight the following two books:
https://www.manning.com/books/groovy-in-action-second-edition
https://pragprog.com/book/vslg2/programming-groovy-2
The following course on Udemy is very affordable, and can be a useful asset:
https://www.udemy.com/apache-groovy/learn/v4/overview
They can also start by going over the “Language Specification” section in the
following document is also useful:
http://groovy-lang.org/documentation.html
Oracle EPBCS Groovy documentation:
http://docs.oracle.com/cloud/latest/epm-common/GROOV/
http://www.in2hyperion.com
WRAPPING UP
A few last items
Groovy and PBCS 61OVOAUG / Goodfriend
Groovy and PBCS is Game Changing
THANK YOU
SESSION CODE EXAMPLES
The calculations discussed in this session throughout
the demo are included for later use
Groovy and PBCS 64OVOAUG / Goodfriend
DYNAMIC
ESSBASE
CALCULATION
• On form save, after the Essbase logic is executed
• Same level of detail moved from the Gross Profit BSO
app to the Gross Profit ASO app
• Consolidated data from the Gross Profit ASO app to the
Fin BSO & ASO App
• Material Group
• Delivery Channel
• Product
Detailed
App (GP)
Consolidated
P&L (Fin)
BSOASO
//println "Agg(Company);"
//return "Agg(Company);"
//Get current webform
DataGrid curgrid = operation.getGrid()
// Construct a string builder to build the Calc script
StringBuilder scriptBldr = StringBuilder.newInstance()
StringBuilder vendorList = StringBuilder.newInstance()
// Iterater which gives you only the edited cells
GridIterator itr =
curgrid.getDataCellIterator(PredicateUtils.invokerPredicate("isE
dited"))
// Variables for holding source entity and destination entity
String dstmbr
String srcmbr
String rHeader
String sScenario
String sCompany
String sYear
String sChannel
String sCurrency
String sMaterial_Group
scriptBldr <<"""
VAR v_Price;
VAR v_CaseGrowth;
VAR v_NewSales;
VAR v_NewGP;
VAR v_GPlevel2;
VAR v_RegCases;
VAR v_NewGP1;
VAR v_GP1;
VAR v_GP2;
VAR v_Sales;
"""
Groovy and PBCS OVOAUG / Goodfriend 66
itr.each{ DataCell cell ->
rHeader = cell.getMemberName("Vendor")
if(vendorList.indexOf(rHeader) < 0){
vendorList <<"""
,"$rHeader"
"""
sScenario = cell.getMemberName("Scenario")
sCompany = cell.getMemberName("Company")
sYear = cell.getMemberName("Years")
sChannel = cell.getMemberName("Channel")
sCurrency = cell.getMemberName("Currency")
sMaterial_Group = cell.getMemberName("Material_Group")
}
}
scriptBldr <<"""
FIX($sScenario,
$sCompany,
&v_BudYear,
"Jan":"Dec",
$rHeader,
$sChannel,
"Input",
$sCurrency,
"Regular_Cases",
$sMaterial_Group)
[Essbase calculation]
ENDFIX
"""
if(vendorList.toString().length() == 0){
scriptBldr.delete(0,scriptBldr.length())
//scriptBldr.append """ "Jan"(@RETURN("No values have changed",INFO);) """
scriptBldr.append """ Nothing was changed so the calculation was not executed /* */
"""
println scriptBldr
}
else{
println scriptBldr
return scriptBldr
}
//println scriptBldr
//return scriptBldr
REAL TIME
REPORTING
SMART PUSH
ASO TO ASO
ASO TO BSO
• On form save, after the Essbase logic is executed
• Same level of detail moved from the Gross Profit BSO
app to the Gross Profit ASO app
• Consolidated data from the Gross Profit ASO app to the
Fin BSO & ASO App
• Material Group
• Delivery Channel
• Product
Detailed
App (GP)
Consolidated
P&L (Fin)
BSOASO
Cube lookupCube = operation.application.getCube("rGP")
DataGridDefinitionBuilder builder = lookupCube.dataGridDefinitionBuilder()
builder.addPov(['Years', 'Scenario', 'Currency', 'Version',
'Company','Channel','Material_Group','Source','Vendor','View'], [['&v_PlanYear'],
['OEP_Plan'], ['Local'], ['OEP_Working'],
[sCompany],['Tot_Channel'],['Total_Material_Group'],['Tot_Source'],['Tot_Vendor'],['MTD
']])
builder.addColumn(['Period'], [ ['ILvl0Descendants("YearTotal")'] ])
for ( e in acctMap ) {
builder.addRow(['Account'], [ [e.key] ])
}
DataGridDefinition gridDefinition = builder.build()
// Load the data grid from the lookup cube
DataGrid dataGrid = lookupCube.loadGrid(gridDefinition, false)
def povmbrs = dataGrid.pov
println "POV:"
println povmbrs*.essbaseMbrName
println ""
def rowmbrs = dataGrid.rows
println"ROWS HEADER:"
println rowmbrs.headers*.essbaseMbrName
println ""
def colmbrs = dataGrid.columns
println"COLUMNS:"
println colmbrs[0]*.essbaseMbrName
println ""
def tmpColMbrs = []
//colmbrs[0].each{println it.essbaseMbrName}
println ""
Groovy and PBCS OVOAUG / Goodfriend 68
//Fin Grid Setup
Cube finCube = operation.application.getCube("Fin")
Cube rfinCube = operation.application.getCube("rFin")
DataGridBuilder finGrid = finCube.dataGridBuilder("MM/DD/YYYY")
DataGridBuilder rfinGrid = rfinCube.dataGridBuilder("MM/DD/YYYY")
finGrid.addPov('&v_PlanYear','OEP_Plan','Local','OEP_Working',sCompany,'No_Center','WRK_Model')
rfinGrid.addPov('&v_PlanYear','OEP_Plan','Local','OEP_Working',sCompany,'No_Center','WRK_Model','MTD')
def colnames = colmbrs[0]*.essbaseMbrName
String scolmbrs = "'" + colnames.join("', '") + "'"
finGrid.addColumn(colmbrs[0]*.essbaseMbrName as String[])
rfinGrid.addColumn(colmbrs[0]*.essbaseMbrName as String[])
dataGrid.dataCellIterator('Jan').each{ it ->
def sAcct = "${acctMap.get(it.getMemberName('Account'))}"
def sValues = []
List addcells = new ArrayList()
colmbrs[0].each{cName ->
sValues.add(it.crossDimCell(cName.essbaseMbrName).data)
addcells << it.crossDimCell(cName.essbaseMbrName).data
}
finGrid.addRow([acctMap.get(it.getMemberName('Account'))],addcells)
rfinGrid.addRow([acctMap.get(it.getMemberName('Account'))],addcells)
// println "${acctMap.get(it.getMemberName('Account'))}" + "," + sValues.join(",")
}
DataGridBuilder.Status status = new DataGridBuilder.Status()
DataGridBuilder.Status rstatus = new DataGridBuilder.Status()
DataGrid grid = finGrid.build(status)
DataGrid rgrid = rfinGrid.build(rstatus)
println("Total number of cells accepted: $status.numAcceptedCells")
println("Total number of cells rejected: $status.numRejectedCells")
println("First 100 rejected cells: $status.cellsRejected")
finCube.saveGrid(grid)
println("Total number of cells accepted: $rstatus.numAcceptedCells")
println("Total number of cells rejected: $rstatus.numRejectedCells")
println("First 100 rejected cells: $rstatus.cellsRejected")
rfinCube.saveGrid(rgrid)
elapsed=(currentTimeMillis()-procTime)/1000
procTime = currentTimeMillis()
println "****************************************************"
println "Time taken copy to fin = $elapsed secs"
println "Total Time = " + (currentTimeMillis()-startTime)/1000 + " secs"
println "****************************************************"

More Related Content

PDF
HIDDEN GEMS IN PBCS—THE BENEFITS THEY DON’T TELL YOU ABOUT
PDF
OATUG Forum - Utilizing Groovy and Data Maps for Instantaneous Analysis betw...
PPTX
How to Deploy & Integrate Oracle EPM Cloud Profitability and Cost Management ...
PDF
GETTING STARTED WITH GROOVY FOR THE NON-TECHNICAL SUPERSTARS
PDF
nter-pod Revolutions: Connected Enterprise Solution in Oracle EPM Cloud
PPTX
Application Integration: EPM, ERP, Cloud and On-Premise – All options explained
PPTX
Oracle FCCS: A Deep Dive
PDF
ePBCS Gridbuilder Deep Dive - Last Minute KScope Souvenirs
HIDDEN GEMS IN PBCS—THE BENEFITS THEY DON’T TELL YOU ABOUT
OATUG Forum - Utilizing Groovy and Data Maps for Instantaneous Analysis betw...
How to Deploy & Integrate Oracle EPM Cloud Profitability and Cost Management ...
GETTING STARTED WITH GROOVY FOR THE NON-TECHNICAL SUPERSTARS
nter-pod Revolutions: Connected Enterprise Solution in Oracle EPM Cloud
Application Integration: EPM, ERP, Cloud and On-Premise – All options explained
Oracle FCCS: A Deep Dive
ePBCS Gridbuilder Deep Dive - Last Minute KScope Souvenirs

What's hot (20)

PPTX
Deep dive on dynamic member lists
PDF
I Can do WHAT with PCMCS? Features and Functions, Business Benefits, and Use...
PDF
FDMEE script examples
PDF
Oracle FCCS Getting Started Guide II
PPTX
KScope14 Jython Scripting
PDF
Getting Started with Groovy for the Non-Technical Superstars
PDF
Automating Security Management in PBCS!
PDF
HFM Extended Analytics
PPTX
Oracle Planning and Budgeting Cloud Service
PDF
EPRCS: The Reporting Swiss Army Knife
PDF
Finit solutions getting the most out of hfm - web data forms tips and tricks
PPTX
EPM, ERP, Cloud and On-Premise – All options explained - OOW CON9532
PDF
Beginning Calculation Manager for Essbase and Hyperion Planning
PDF
ODTUG KSCOPE 2018 - REST APIs for FDMEE and Cloud Data Management
PPTX
How Noble Energy Automated Reconciliations with Oracle ARCS
PDF
Finit solutions getting the most out of hfm - intercompany matching and eli...
PDF
Simplify Complex Consolidations and Close Processes with Oracle Financial Con...
PPTX
EPM Automate - Automating Enterprise Performance Management Cloud Solutions
PDF
Overview profitability and cost management cloud services
PDF
OneStream Functionality You Might Not be Using (But Should Be)
Deep dive on dynamic member lists
I Can do WHAT with PCMCS? Features and Functions, Business Benefits, and Use...
FDMEE script examples
Oracle FCCS Getting Started Guide II
KScope14 Jython Scripting
Getting Started with Groovy for the Non-Technical Superstars
Automating Security Management in PBCS!
HFM Extended Analytics
Oracle Planning and Budgeting Cloud Service
EPRCS: The Reporting Swiss Army Knife
Finit solutions getting the most out of hfm - web data forms tips and tricks
EPM, ERP, Cloud and On-Premise – All options explained - OOW CON9532
Beginning Calculation Manager for Essbase and Hyperion Planning
ODTUG KSCOPE 2018 - REST APIs for FDMEE and Cloud Data Management
How Noble Energy Automated Reconciliations with Oracle ARCS
Finit solutions getting the most out of hfm - intercompany matching and eli...
Simplify Complex Consolidations and Close Processes with Oracle Financial Con...
EPM Automate - Automating Enterprise Performance Management Cloud Solutions
Overview profitability and cost management cloud services
OneStream Functionality You Might Not be Using (But Should Be)
Ad

Similar to Groovy and PBCS is Game Changing (20)

PDF
Why Groovy is Game Changing
PDF
ODTUG Getting Groovy with ePBCS
PDF
18.11 texas user group
PDF
October 2018 ODTUG Webinar - Getting Started with Groovy in EPBCS
PPTX
Preparing for Your Cognos Analytics Upgrade April 2017 Webinar - QueBIT Consu...
PDF
Containers & Cloud Native Ops Cloud Foundry Approach
PDF
Top Down and Bottom Up Planning at Breakthru Beverage Group
PDF
Microsoft Webinar Q&A session
PPTX
A One Stop Solution Platform for various Services Helping Tools.pptx
PPTX
ACUCOBOL - Product Strategy and Roadmap
DOCX
Ignou BCA 5th semester mini project report.
PDF
Converting SAP Business Objects to a New Architecture Solution
PDF
Advantages of golang development services &amp; 10 most used go frameworks
PDF
MWLUG 2017: BP107 Plotting the Path for your IBM Domino Applications
PDF
Blame DevOps: Shifting Left the Wrong Way
PDF
FORWARD 5 Key Highlights and Product Updates - Philadelphia Chapter
PPTX
Beyond Gerrit @ Gerrit User Summit 2017, London
PDF
WSO2Con2024 - Hello Choreo Presentation - Kanchana
PDF
What Are The Top 5 Progressive Web App Development Frameworks For 2023
PDF
Automated budget management system
Why Groovy is Game Changing
ODTUG Getting Groovy with ePBCS
18.11 texas user group
October 2018 ODTUG Webinar - Getting Started with Groovy in EPBCS
Preparing for Your Cognos Analytics Upgrade April 2017 Webinar - QueBIT Consu...
Containers & Cloud Native Ops Cloud Foundry Approach
Top Down and Bottom Up Planning at Breakthru Beverage Group
Microsoft Webinar Q&A session
A One Stop Solution Platform for various Services Helping Tools.pptx
ACUCOBOL - Product Strategy and Roadmap
Ignou BCA 5th semester mini project report.
Converting SAP Business Objects to a New Architecture Solution
Advantages of golang development services &amp; 10 most used go frameworks
MWLUG 2017: BP107 Plotting the Path for your IBM Domino Applications
Blame DevOps: Shifting Left the Wrong Way
FORWARD 5 Key Highlights and Product Updates - Philadelphia Chapter
Beyond Gerrit @ Gerrit User Summit 2017, London
WSO2Con2024 - Hello Choreo Presentation - Kanchana
What Are The Top 5 Progressive Web App Development Frameworks For 2023
Automated budget management system
Ad

More from Kyle Goodfriend (13)

PDF
Improve The Planner Experience With Groovy
PDF
Using REST with EPM Cloud Planning
PDF
Things you didn't know you could do with groovy
PDF
Take groovy to places you never thought were possible
PDF
Accelerators at Accelytics
PDF
Top-Down and BottomS-Up Planning at Breakthru Beverage Group
PDF
CHCC 2017 Q1 Event Overview
PDF
Top Down and Bottom Up Planning at Breakthru Beverage Group Follow Up
PDF
Ohio Valley Oracle Application User Group
PDF
Create Unlimited Custom Spreads for Driver Based Planning
PDF
Automating Hyperion Planning Tasks
PDF
Driving Accountability Through Disciplined Planning at Abercrombie & Fitch
PDF
Supercharge PBCS with PowerShell
Improve The Planner Experience With Groovy
Using REST with EPM Cloud Planning
Things you didn't know you could do with groovy
Take groovy to places you never thought were possible
Accelerators at Accelytics
Top-Down and BottomS-Up Planning at Breakthru Beverage Group
CHCC 2017 Q1 Event Overview
Top Down and Bottom Up Planning at Breakthru Beverage Group Follow Up
Ohio Valley Oracle Application User Group
Create Unlimited Custom Spreads for Driver Based Planning
Automating Hyperion Planning Tasks
Driving Accountability Through Disciplined Planning at Abercrombie & Fitch
Supercharge PBCS with PowerShell

Recently uploaded (20)

PDF
Advanced methodologies resolving dimensionality complications for autism neur...
PPTX
Effective Security Operations Center (SOC) A Modern, Strategic, and Threat-In...
PPTX
Understanding_Digital_Forensics_Presentation.pptx
PDF
Machine learning based COVID-19 study performance prediction
PPT
Teaching material agriculture food technology
PDF
Modernizing your data center with Dell and AMD
PPT
“AI and Expert System Decision Support & Business Intelligence Systems”
PPTX
Detection-First SIEM: Rule Types, Dashboards, and Threat-Informed Strategy
PDF
Per capita expenditure prediction using model stacking based on satellite ima...
PDF
Shreyas Phanse Resume: Experienced Backend Engineer | Java • Spring Boot • Ka...
PPTX
Digital-Transformation-Roadmap-for-Companies.pptx
PDF
The Rise and Fall of 3GPP – Time for a Sabbatical?
PDF
Building Integrated photovoltaic BIPV_UPV.pdf
PDF
How UI/UX Design Impacts User Retention in Mobile Apps.pdf
PDF
Encapsulation_ Review paper, used for researhc scholars
PDF
Unlocking AI with Model Context Protocol (MCP)
PDF
Chapter 3 Spatial Domain Image Processing.pdf
PDF
Dropbox Q2 2025 Financial Results & Investor Presentation
PPTX
VMware vSphere Foundation How to Sell Presentation-Ver1.4-2-14-2024.pptx
PPTX
PA Analog/Digital System: The Backbone of Modern Surveillance and Communication
Advanced methodologies resolving dimensionality complications for autism neur...
Effective Security Operations Center (SOC) A Modern, Strategic, and Threat-In...
Understanding_Digital_Forensics_Presentation.pptx
Machine learning based COVID-19 study performance prediction
Teaching material agriculture food technology
Modernizing your data center with Dell and AMD
“AI and Expert System Decision Support & Business Intelligence Systems”
Detection-First SIEM: Rule Types, Dashboards, and Threat-Informed Strategy
Per capita expenditure prediction using model stacking based on satellite ima...
Shreyas Phanse Resume: Experienced Backend Engineer | Java • Spring Boot • Ka...
Digital-Transformation-Roadmap-for-Companies.pptx
The Rise and Fall of 3GPP – Time for a Sabbatical?
Building Integrated photovoltaic BIPV_UPV.pdf
How UI/UX Design Impacts User Retention in Mobile Apps.pdf
Encapsulation_ Review paper, used for researhc scholars
Unlocking AI with Model Context Protocol (MCP)
Chapter 3 Spatial Domain Image Processing.pdf
Dropbox Q2 2025 Financial Results & Investor Presentation
VMware vSphere Foundation How to Sell Presentation-Ver1.4-2-14-2024.pptx
PA Analog/Digital System: The Backbone of Modern Surveillance and Communication

Groovy and PBCS is Game Changing

  • 3. KYLE GOODFRIENDHuron Consulting / Oracle EPBCS Implementation Specialist Professional and Personal • BBA, concentration in Finance • College professor for 5 years • Started consulting in 2008 • 100% self taught (technology) • Worked with Huron since 2013 (via ADI Strategies) • Created In2Hyperion and the Essbase Excel Ribbon • Started the Columbus Hyperion Customer Community (CHCC.In2Hyperion.com) • Love playing ice hockey, scuba diving, and rescue dogs • Have a beautiful wife that I drive nuts • Raising a son that is a walking medical deductible Planning and Essbase • Worked with Hyperion since 1997 • Started learning Groovy in August of 2017 • Worked with the cloud since 2015 • Hold certification in Hyperion Planning, PBCS, and EPBCS • Hold specialization in Pre- Sales, Sales, and Support for both Planning and Essbase • Also a Microsoft Certified Professional Groovy and PBCS Slide 3OVOAUG / Goodfriend
  • 4. HOW TO CONTACT KYLE PERSONAL kyle@in2hyperion.com www.in2hyperion.com HURON CONSULTING GROUP Kgoodfriend@huronconsultinggroup.com Groovy and PBCS 4OVOAUG / Goodfriend
  • 5. WHO SHOULD ATTEND • Users who want to be exposed to improved possibilities • Administrators who want to see how Groovy can help them improve performance and usability • Anybody that is considering moving to PBCS • Anybody that is concerned about performance of the cloud Groovy and PBCS 5OVOAUG / Goodfriend
  • 6. SESSION RULES Be interactive, jump in, ask questions Tweet and share your experiences Take notes Add value, share experiences Be respectful – none of us know everything Stand up, stretch, stay awake Groovy and PBCS 6OVOAUG / Goodfriend
  • 7. SESSION OBJECTIVES Have a cursory understanding on how to get started creating a Groovy calculation Share your knowledge with others Know where to get help and how to grow your knowledge of Groovy and Groovy calculations Know enough to be able to identify where Groovy can improve processes Understand how Groovy provides functional additions Know what is required to use Groovy in PBCS calculations Groovy and PBCS 7OVOAUG / Goodfriend
  • 8. Sign up at www.in2hyperion.com to receive blog updates through email STAYING CONNECTED IN2HYPERION Join the LinkedIn In2Hyperion Group www.linkedin.com/ groups/4010770 LINKEDIN GROUP Groovy and PBCS 8OVOAUG / Goodfriend
  • 9. PRESENTATION AGENDA 01 GROOVY INTRODUCTION What is it and how do I get it 02 FUNCTIONAL SUMMARY Highlight the functionality added with using Groovy calculation 03 PERFORMANCE Discuss the game changing performance improvements 04 USABILITY Overview of new features your users will love 05 DEMONSTRATION Live demonstration of functionality 07 DEVELOPING SCRIPTS Overview of requirements to develop Groovy calculations 06 OTHER ENHANCEMENTS Discussion of other useful functional improvements 08 FINISHING UP Interactive Q/A 09 APPENDIX Document the calculation discussed in the session for you to reference Groovy and PBCS 9OVOAUG / Goodfriend IF TIME PERMITS
  • 10. CHANGING NAMES TO PROTECT THE INNOCENT • The application is a replica of live application • The volume of metadata and data is the same • The metadata has been changed to protect the innocent • The data has been altered
  • 11. GROOVY INTRODUCTION The back story of what is needed to take advantage of Groovy Calculations Groovy and PBCS 11OVOAUG / Goodfriend
  • 12. WHAT IS GROOVY Apache Groovy is a powerful, optionally typed and dynamic language, with static-typing and static compilation capabilities, for the Java platform aimed at improving developer productivity thanks to a concise, familiar and easy to learn syntax. It integrates smoothly with any Java program, and immediately delivers to your application powerful features, including scripting capabilities, Domain- Specific Language authoring, runtime and compile-time meta-programming and functional programming. Groovy and PBCS 12OVOAUG / Goodfriend
  • 13. FLAVORS OF GROOVY RELATED TO PBCS Groovy can be used to access the API to do all kinds of things, including automation, system backups, and user communication. This discussion will focus on the ability to access Groovy INSIDE the calculation manager only. Groovy and PBCS 13OVOAUG / Goodfriend
  • 14. On-Premise made Groovy available late in 2017, and provides the developers to ability to execute Groovy scripts from Business Rules. PBCS integrated Groovy into Calculation Manager in June of 2017 CLOUD VS ON-PREMISE PBCS provides the ability to interact with the Planning objects and in real time and execute logic based on the user’s actions On-Premise provides the ability to run Groovy scripts. It provides complete access to the Groovy language independent of the Planning objects Both have advantages over each other, are similar in the functionality they provide, but are drastically different in some of the results they can produce Groovy and PBCS 14OVOAUG / Goodfriend
  • 15. Seamlessly and transparently integrates and interoperates with Java and any third-party libraries BENEFITS OF GROOVY SMOOTH JAVA INTEGRATION Closures, builders, runtime & compile-time meta-programming, functional programming, type inference, and static compilation POWERFUL FEATURES Concise, readable and expressive syntax, easy to learn for Java developers FLAT LEARNING CURVE Web development, reactive applications, concurrency / asynchronous / parallelism library, test frameworks, build tools, code analysis, GUI building VIBRANT AND RICH ECOSYSTEM Groovy and PBCS 15OVOAUG / Goodfriend
  • 16. Great for writing concise and maintainable tests, and for all your build and automation tasks BENEFITS OF GROOVY SCRIPTING AND TESTING GLUE Apache Groovy is a powerful, optionally typed and dynamic language, with static-typing and static compilation capabilities, for the Java platform aimed at improving developer productivity thanks to a concise, familiar and easy to learn syntax. It integrates smoothly with any Java program, and immediately delivers to your application powerful features, including scripting capabilities, Domain-Specific Language authoring, runtime and compile-time meta- programming and functional programming. WHAT IS GROOVY Flexible & malleable syntax, advanced integration & customization mechanisms, to integrate readable business rules in your applications DOMAIN-SPECIFIC LANGUAGES Groovy and PBCS 16OVOAUG / Goodfriend
  • 17. IMPACT TO PBCS DESIGN AND OPTIONS AVAILABLE • Java development is fast tracked and maintenance is simplified • Developers get all the functionality of the Java API • The knowledge required to construct complex functionality is far less with Groovy • PBCS is built with Groovy so it is going to be a part of the product roadmap • Within PBCS • Access to use groovy to interact with the user • Customize commands sent to the Essbase
  • 18. IMPACT TO IMPLEMENTATION A plethora of new and enhanced functions exist to improve performance and the user experience that can be explored Groovy and PBCS 18OVOAUG / Goodfriend
  • 19. REAL WORLD USER EXAMPLE (SPEED & FUNCTIONALITY) 99%IMPROVEMENT 98% 99% Reporting includes all updates from detailed modules (product, Capex, workforce, and similar modules) and is included in real time as changes are made Consolidated Reporting Reporting includes all updates from detailed modules (product, Capex, workforce, and similar modules) at scheduled intervals users have to wait to see consolidated information Groovy eliminates the need to consolidate the BSO cube and copies data directly from the ASO cube at a consolidated level .2 Seconds Dimensions are consolidated and copied to the P&L model 82.9 Seconds Consolidated P&L Product detailed dimensions are consolidated and moved to the P&L model Groovy selects only the cells that where edited and copies only what changed to the reporting model 1.0 Seconds All data on the form is synchronized 14.5 Seconds Smart Push Data synchronizes to the reporting cube for analysis 01 0110 0001 01101 Groovy selects only edited cells and executes the logic on only products and periods that changed 0.3 Seconds All products on the form are calculated 26.1 Seconds Business Logic Growth rates are entered at total product breakouts and allocated to the detailed level With the inclusion of Groovy and access to the Java API, more customization can be integrated to maximum performance and achieve real time consolidated reporting Submit Planner Input User submits updates to the Gross Profit model at a detailed product level that exists at a more granular level than in the P&L model Groovy and PBCS 19OVOAUG / Goodfriend
  • 20. Reporting includes all updates from detailed modules (product, Capex, workforce, and similar modules) and is included in real time as changes are made Consolidated Reporting Reporting includes all updates from detailed modules (product, Capex, workforce, and similar modules) at scheduled intervals users have to wait to see consolidated information REAL WORLD PROCESS EXAMPLE (SPEED & FUNCTIONALITY) Automated Process Administrative processes are executed to run all business logic and model synchronizations The entire data set is consolidated and moved to the P&L model 12.0 Seconds Dimensions are consolidated and copied to the P&L model 663.6 Seconds Global Consolidation Global product consolidations are often required to catch all changes and completed during maintenance windows 99% 99% Groovy and PBCS 20OVOAUG / Goodfriend
  • 21. SHOULD YOU CONSIDER GROOVY AS AN OPTION NEW IMPLEMENTATIONS • On premise implementations that want better performance • PBCS implementations that have performance issues due to • Large dimensions • Complex calculations • Detailed planning input • Do not have real time reporting • Implementations that need more complex user input validation • Applications that want proactive data validation
  • 22. SHOULD YOU CONSIDER GROOVY AS AN OPTION EXISTING IMPLEMENTATIONS • Have complex models • Have large dimensions • Require data input validation • Require real time consolidated reporting
  • 23. SO, PRETTY MUCH EVERYBODY WILL BENEFIT FROM THE BENEFITS OF GROOVY
  • 24. • ePBCS and PBCS+1 have access to create Groovy calculations • Groovy calculations open up the Java API and provide a user experience never before available • Have access to use groovy to interact with the user and customize commands sent to the PBCS There is currently no expectation that Oracle will make Groovy Calculations available in future on-premise releases GROOVY AVAILABILITY AND LICENSING Groovy and PBCS 24OVOAUG / Goodfriend
  • 25. EXPERTISE NEEDED Intuitive Developers Groovy may be built on Java, but Java developers are not required to successfully implement Groovy into PBCS. Experienced developers who have knowledge within PBCS and understand basic functionality with scripting will be able to use Groovy training materials and global rules to build an application with groovy that fits a clients performance needs. It only takes a little groovy knowledge to exponentially improve ePBCS performance. Visionary Managers Managers who can understand, interpret, and plan the execution of requirements with Groovy will build exceptional applications. Managers will communicate how Groovy fills performance gaps that existed prior to it’s release and help clients understand why Groovy is a necessary element of any planning application. Groovy and PBCS 25OVOAUG / Goodfriend
  • 26. FUNCTIONAL SUMMARY What is available with Groovy calculations Groovy and PBCS 26OVOAUG / Goodfriend
  • 27. FUNCTIONAL OVERVIEW Proactive User Input Validation Users are prompted for input frequently, for things like employee properties, x, and x. This data can be validated prior to any business logic to ensure consistent and valid data input. Proactive Data Validation User input can be validated and can interrupt the data form save proactively. For example, if an employee is not fully allocated, the allocation will not save until the allocation is 100% Selective Data Synchronization Data between input and reporting applications can be near real time due to synchronization being isolated to only edited or effected data, which is now done on user save more frequently due to performance improvement. Selective Business Logic Execution User can now see significantly improved performance on data form input because the business logic can be isolated to only what has been changed or effected. Access to Java Functions Logic that couldn't be completed, or wasn't because of performance issues, can now be accessed and executed at lightening speed. Developers now have access to functions from the Java API. Real Time Consolidated Reporting Data between applications, like workforce, capital, and a consolidated P&L can be synchronized in real time without timely data consolidations.
  • 28. FUNCTIONAL OVERVIEW Execute Calculation Logic on ASO Prior to the availability of Groovy, business logic on ASO was not available. Now, all logic that exists in BSO databases is now available through the Java API and can be executed directly in ASO. Advanced Form Traffic Lighting Simple and extremely complex color coding can be added to forms on load and on save. The possibilities are endless and are completely customizable. Custom Logging Developers have complete control over what is logged for review. User information, POV selections, timing, and data that has changed, are just a sample of what can be logged. Custom User Errors Custom messages in an infinite number of languages can be displayed in prompts and added to cells to communicate changes, rule violations, and errors.. Interaction with Strategic Modeling Data movement to and from Strategic Modeling can be done in real time – on form save.
  • 29. PERFORMANCE IMPROVEMENTS The speed and agility that Groovy provides in customizing calculations introduces consolidated real time reporting Groovy and PBCS 29OVOAUG / Goodfriend
  • 30. FILTERED EXECUTION OF DATA FORM UPDATES One of the challenges with Planning is the inability to proactively validate data and communicate that back to the users. With Groovy, this challenge is non existent. Groovy and PBCS 30OVOAUG / Goodfriend
  • 31. DYNAMIC BUSINESS LOGIC Legacy Business Rule • Provides the ability to pass the POV (Page/Header) to a business rule to isolate what is calculated • Executed on all rows and columns regardless of the state of the data Groovy Calculation • Can access the same POV and can dynamically change business logic based on selections • Can identify the changed cells and can alter the business logic based on results
  • 32. FILTERED EXECUTION WITHOUT GROOVY Legacy Planning • Provides the ability to pass the POV (Page/Header) to a business rule to isolate what is calculated • Executed on all rows and columns regardless of the state of the data FIX(@RELATIVE(“Vendor”,0),”Jan”:”Dec”,…)
  • 33. FILTERED EXECUTION WITH GROOVY Groovy Calculation • Can access the same POV and can dynamically change business logic based on selections • Can identify the changed cells and can alter the business logic based on results FIX(“v30000400140003”, “V30000400630008”,”Feb”,”Mar”,”Apr”,”May”,…)
  • 34. Filtered Data Movement In conjunction with the filtered business logic execution, the same can be ported to the isolation of edited data when moving it to other databases. Data Maps and Smart Pushes Moving and mapping consolidated data between applications with different dimensionality
  • 35. DATA MOVEMENT SMART PUSH AND DATA MAPS • In conjunction with the filtered business logic execution, data pushes • Override Form Results
  • 36. REAL TIME CONSOLIDATED REPORTING Detailed App Consolidated P&L Detailed App Consolidated P&L NON GROOVY • All dimensions need to be consolidated • Movement from ASO is not possible • Movement is batched and scheduled WITH GROOVY • NO BSO consolidation is required • Data can be transferred from ASO • Movement is executed on form save
  • 37. USABILITY ENHANCEMENTS The addition of proactive user interaction allows customized communication and stops users from saving data that violates business rules Groovy and PBCS 37OVOAUG / Goodfriend
  • 38. TRAFFIC LIGHTING AND CELL LEVEL WARNINGS • The first level of interaction is traffic lighting. • These notification would be the equivalent of warnings if data is valid, but might be incorrect • One cell is larger than all the others in the row • Negative values are not normally entered for a row • Ratios are higher or lower than expected • These can be used in dashboards to point out data anomalies • Large variances • Lowest margins of the organization’s entities • Budget variances
  • 39. RUN TIME PROMPT • Run Time Prompts can be validated based on pretty much anything you can think of • Users can be asked to execute (deleting data or long running calculations) • Only allow certain characters
  • 40. DATA FORM VALIDATION • Any validation that can be done using member names, hierarchies, or math is possible • Example • The GP Level 2 % has to be between -10% and 30%. • The Regular Cases CANNOT have one month that is more than 50% of the total cases. • If Regular Cases is entered, a corresponding Average Price per Case is required.
  • 41. DATA FORM VALIDATION • Example Adjustments can be made to any month • The net change has to be 0 • No change can push the number to a negative number
  • 42. Eliminate user confusion and data issues can improve a budget and improve productivity by catching problems before they exist. Stopping a user before they enter invalid data, cell by cell warnings, intuitive return messages, it is all here with Groovy. In line data form errors pinpoint where a planning has entered invalid data and eliminate future data frustration validating data. Prompting users with meaningful errors on input improves the user experience and reduces frustration
  • 43. CUSTOM ERROR PROMPTS • Communicating with the user is far more flexible and effective using Groovy Calculations • Tooltips can be added to cells with custom messages • Cells can be color coded – traffic lighting, warnings, errors, successes • Messages can be managed and used • Multiple languages • Custom messages
  • 44. FUNCTIONAL DEMO The addition of proactive user interaction allows customized communication and stops users from creating data validity problems Groovy and PBCS 44OVOAUG / Goodfriend
  • 45. Proactive User Input Validation • New Brand Form Proactive Data Validation • New Brand Form • Phasing Form Selective Data Sync / Selective Business Logic / Real Time Consolidation • Override • Reset Vendors Custom Errors Custom Logging Groovy and PBCS OVOAUG / Goodfriend 45 DEMO SUMMARY
  • 46. OTHER POSSIBILITIES This was released in July ‘17, so every month there are additional functions and bug fixes released. There is additional functionality available worth noting, as it can introduce significant changes in the Planning landscape Groovy and PBCS 46OVOAUG / Goodfriend
  • 47. With Groovy, business logic can be written and executed, with results stored in ASO BUSINESS LOGIC CAN BE EXECUTED IN ASO VIA GROOVY BUSINESS LOGIC Allocation logic can be processed in Groovy with the results stored in ASO ALLOCATIONS Data can be loaded to ASO, but has minimal calculation logic ASO LIMITATIONS Currency exchange rates can be accessed and used to calculate and store USD equivalents FX RATES Groovy and PBCS 47OVOAUG / Goodfriend
  • 48. ACCESS TO JAVA FUNCTIONS • Java functions are available and can be used. These can introduce opportunities to do things never before available, or improve on functions in Essbase that introduce performance degradation. • Math • Strings • If/Then logic • Mapping • Comparisons
  • 49. CUSTOM LOGGING Logging can be completely customized to include data, user information, performance statistics, logic executed and exception reporting – pretty much anything you can think of. • User information • POVs • Edited cells • Execution time • Information to debug logic Groovy and PBCS 49OVOAUG / Goodfriend
  • 50. WRITING YOUR FIRST GROOVY CALCULATION The start of being self sufficient begins now Groovy and PBCS 50OVOAUG / Goodfriend
  • 51. Access to Groovy in calculations can be divided into two functional groups. Both have distinct uses. Non Essbase calculations, like code validation, data pushes, and all other functionality other than the Essbase calculation creation and submission Essbase calculations can be generated and executed based on the results of the user submission
  • 52. GROOVY CALCULATION WHAT YOU NEED TO KNOW • Groovy works in conjunction with the PBCS API • Groovy enables you to use the PBCS API • The PBCS API allows you to interact with PBCS • What is Groovy • Variables • Math functions • String functions • Looping • Writing to the log • What is the API • Most objects start with operator, but any line with an operator/action/reference to a PBCS object
  • 53. COMMON GROOVY SNIPPETS Interact with the Job console Print / println Store POV members in a variable String Year = operation.grid.find {it.dimName=='Years'}.essbaseMbrName Loop through the cells in a grid operation.grid.dataCellIterator({DataCell cell -> cell.edited}).each { periods << cell.periodName products << cell.getMemberName("Product") } Execute a data push operation.grid.getSmartPush("Employee Data").execute( [ "Employee" : employeesStr ] ) Initiate error messages with a message object def mbUs = messageBundle( ["validation.missingmember.grade":"No Grades found on the Grid."] ) def mbl = messageBundleLoader(["en" : mbUs])
  • 54. CREATING YOUR FIRST GROOVY SCRIPT • Open Rules in PBCS and create a new rule • Change the dropdown box with from Designer to Edit Script • Change the Script type dropdown box from Calc Script to Groovy Script
  • 55. GROOVY CALC EXAMPLES println "The Year Is: " + operation.grid.pov.find{it.dimName =='Years'}.essbaseMbrName println "The calculation is finished" String sScenario = '"' + operation.grid.pov.find{it.dimName =='Scenario'}.essbaseMbrName + '"’ println "The scenario is $sScenario" SEND MESSAGE TO THE LOG
  • 56. GROOVY CALC EXAMPLES """SET CREATENONMISSINGBLK ON; FIX(${fixValues(rtps.Scenario, rtps.Year, rtps.Period, rtps.Entity, rtps.Version, employee)}, "USD") "Employee Phone" = $rtps.EmployeePhone; "Employee Email" = $rtps.EmployeeEmail; ENDFIX;""" - or - Def sEssCalc << """SET CREATENONMISSINGBLK ON; FIX(${fixValues(rtps.Scenario, rtps.Year, rtps.Period, rtps.Entity, rtps.Version, employee)}, "USD") "Employee Phone" = $rtps.EmployeePhone; "Employee Email" = $rtps.EmployeeEmail; ENDFIX;""" Return sEssCalc SENDING CALCULATION TO PLANNING
  • 57. GROOVY CALC EXAMPLES operation.grid.dataCellIterator.each { if(it.missing) { it.bgColor = 0x00BFFF } else if(it.data <= 50000) it.bgColor = 0xFF8C00 else if(it.data > 50000) it.bgColor = 0x00FA9A } ITERATE THROUGH CELLS
  • 58. GROOVY CALC EXAMPLES operation.grid.dataCellIterator.each {{DataCell cell -> cell.edited} if(it.missing) { it.bgColor = 0x00BFFF } else if(it.data <= 50000) it.bgColor = 0xFF8C00 else if(it.data > 50000) it.bgColor = 0x00FA9A } ITERATE THROUGH EDITED CELLS
  • 59. MORE EXAMPLES AT • Groovy Series • Part 1, Groovy • Part 2: Data Validation • Part 3: Acting On Edited Cells • Part 4: Run Time Prompts • Part 5: Accessing Substitution Variables • Part 6: Converting POV into Fix • Part 7: Validating Run Time Prompts • Part 8: Customizing Data Maps and Smart Pushes • Work in progress • Part 9: Returning Errors • Part 10: Validating Form Data • Part 11: Interacting with Smart Lists • Part 12: Checking The POV Is Level 0 • Part 13: Real Time Data Movement • Other Groovy Related Articles • PBCS Data Map / Smart Push Has Data volume Limits
  • 60. GETTING HELP There are a lot of great books, articles, videos on Groovy listed here: http://groovy-lang.org/learn.html In particular, I would like to highlight the following two books: https://www.manning.com/books/groovy-in-action-second-edition https://pragprog.com/book/vslg2/programming-groovy-2 The following course on Udemy is very affordable, and can be a useful asset: https://www.udemy.com/apache-groovy/learn/v4/overview They can also start by going over the “Language Specification” section in the following document is also useful: http://groovy-lang.org/documentation.html Oracle EPBCS Groovy documentation: http://docs.oracle.com/cloud/latest/epm-common/GROOV/ http://www.in2hyperion.com
  • 61. WRAPPING UP A few last items Groovy and PBCS 61OVOAUG / Goodfriend
  • 64. SESSION CODE EXAMPLES The calculations discussed in this session throughout the demo are included for later use Groovy and PBCS 64OVOAUG / Goodfriend
  • 65. DYNAMIC ESSBASE CALCULATION • On form save, after the Essbase logic is executed • Same level of detail moved from the Gross Profit BSO app to the Gross Profit ASO app • Consolidated data from the Gross Profit ASO app to the Fin BSO & ASO App • Material Group • Delivery Channel • Product Detailed App (GP) Consolidated P&L (Fin) BSOASO
  • 66. //println "Agg(Company);" //return "Agg(Company);" //Get current webform DataGrid curgrid = operation.getGrid() // Construct a string builder to build the Calc script StringBuilder scriptBldr = StringBuilder.newInstance() StringBuilder vendorList = StringBuilder.newInstance() // Iterater which gives you only the edited cells GridIterator itr = curgrid.getDataCellIterator(PredicateUtils.invokerPredicate("isE dited")) // Variables for holding source entity and destination entity String dstmbr String srcmbr String rHeader String sScenario String sCompany String sYear String sChannel String sCurrency String sMaterial_Group scriptBldr <<""" VAR v_Price; VAR v_CaseGrowth; VAR v_NewSales; VAR v_NewGP; VAR v_GPlevel2; VAR v_RegCases; VAR v_NewGP1; VAR v_GP1; VAR v_GP2; VAR v_Sales; """ Groovy and PBCS OVOAUG / Goodfriend 66 itr.each{ DataCell cell -> rHeader = cell.getMemberName("Vendor") if(vendorList.indexOf(rHeader) < 0){ vendorList <<""" ,"$rHeader" """ sScenario = cell.getMemberName("Scenario") sCompany = cell.getMemberName("Company") sYear = cell.getMemberName("Years") sChannel = cell.getMemberName("Channel") sCurrency = cell.getMemberName("Currency") sMaterial_Group = cell.getMemberName("Material_Group") } } scriptBldr <<""" FIX($sScenario, $sCompany, &v_BudYear, "Jan":"Dec", $rHeader, $sChannel, "Input", $sCurrency, "Regular_Cases", $sMaterial_Group) [Essbase calculation] ENDFIX """ if(vendorList.toString().length() == 0){ scriptBldr.delete(0,scriptBldr.length()) //scriptBldr.append """ "Jan"(@RETURN("No values have changed",INFO);) """ scriptBldr.append """ Nothing was changed so the calculation was not executed /* */ """ println scriptBldr } else{ println scriptBldr return scriptBldr } //println scriptBldr //return scriptBldr
  • 67. REAL TIME REPORTING SMART PUSH ASO TO ASO ASO TO BSO • On form save, after the Essbase logic is executed • Same level of detail moved from the Gross Profit BSO app to the Gross Profit ASO app • Consolidated data from the Gross Profit ASO app to the Fin BSO & ASO App • Material Group • Delivery Channel • Product Detailed App (GP) Consolidated P&L (Fin) BSOASO
  • 68. Cube lookupCube = operation.application.getCube("rGP") DataGridDefinitionBuilder builder = lookupCube.dataGridDefinitionBuilder() builder.addPov(['Years', 'Scenario', 'Currency', 'Version', 'Company','Channel','Material_Group','Source','Vendor','View'], [['&v_PlanYear'], ['OEP_Plan'], ['Local'], ['OEP_Working'], [sCompany],['Tot_Channel'],['Total_Material_Group'],['Tot_Source'],['Tot_Vendor'],['MTD ']]) builder.addColumn(['Period'], [ ['ILvl0Descendants("YearTotal")'] ]) for ( e in acctMap ) { builder.addRow(['Account'], [ [e.key] ]) } DataGridDefinition gridDefinition = builder.build() // Load the data grid from the lookup cube DataGrid dataGrid = lookupCube.loadGrid(gridDefinition, false) def povmbrs = dataGrid.pov println "POV:" println povmbrs*.essbaseMbrName println "" def rowmbrs = dataGrid.rows println"ROWS HEADER:" println rowmbrs.headers*.essbaseMbrName println "" def colmbrs = dataGrid.columns println"COLUMNS:" println colmbrs[0]*.essbaseMbrName println "" def tmpColMbrs = [] //colmbrs[0].each{println it.essbaseMbrName} println "" Groovy and PBCS OVOAUG / Goodfriend 68 //Fin Grid Setup Cube finCube = operation.application.getCube("Fin") Cube rfinCube = operation.application.getCube("rFin") DataGridBuilder finGrid = finCube.dataGridBuilder("MM/DD/YYYY") DataGridBuilder rfinGrid = rfinCube.dataGridBuilder("MM/DD/YYYY") finGrid.addPov('&v_PlanYear','OEP_Plan','Local','OEP_Working',sCompany,'No_Center','WRK_Model') rfinGrid.addPov('&v_PlanYear','OEP_Plan','Local','OEP_Working',sCompany,'No_Center','WRK_Model','MTD') def colnames = colmbrs[0]*.essbaseMbrName String scolmbrs = "'" + colnames.join("', '") + "'" finGrid.addColumn(colmbrs[0]*.essbaseMbrName as String[]) rfinGrid.addColumn(colmbrs[0]*.essbaseMbrName as String[]) dataGrid.dataCellIterator('Jan').each{ it -> def sAcct = "${acctMap.get(it.getMemberName('Account'))}" def sValues = [] List addcells = new ArrayList() colmbrs[0].each{cName -> sValues.add(it.crossDimCell(cName.essbaseMbrName).data) addcells << it.crossDimCell(cName.essbaseMbrName).data } finGrid.addRow([acctMap.get(it.getMemberName('Account'))],addcells) rfinGrid.addRow([acctMap.get(it.getMemberName('Account'))],addcells) // println "${acctMap.get(it.getMemberName('Account'))}" + "," + sValues.join(",") } DataGridBuilder.Status status = new DataGridBuilder.Status() DataGridBuilder.Status rstatus = new DataGridBuilder.Status() DataGrid grid = finGrid.build(status) DataGrid rgrid = rfinGrid.build(rstatus) println("Total number of cells accepted: $status.numAcceptedCells") println("Total number of cells rejected: $status.numRejectedCells") println("First 100 rejected cells: $status.cellsRejected") finCube.saveGrid(grid) println("Total number of cells accepted: $rstatus.numAcceptedCells") println("Total number of cells rejected: $rstatus.numRejectedCells") println("First 100 rejected cells: $rstatus.cellsRejected") rfinCube.saveGrid(rgrid) elapsed=(currentTimeMillis()-procTime)/1000 procTime = currentTimeMillis() println "****************************************************" println "Time taken copy to fin = $elapsed secs" println "Total Time = " + (currentTimeMillis()-startTime)/1000 + " secs" println "****************************************************"