Groovy is the icing on the cake, with pre-save validation on forms, real time consolidation and plan type synchronization, and execute calculations in ASO
Scale your database traffic with Read & Write split using MySQL Router
GETTING STARTED WITH GROOVY FOR THE NON-TECHNICAL SUPERSTARS
1. GETTING STARTED WITH GROOVY FOR
THE NON-TECHNICAL SUPERSTARS
What you need to know to get started
Groovy is the icing on the cake, with pre-save validation on forms, real time
consolidation and plan type synchronization, and execute calculations in ASO
Getting Started With Groovy For The Non-Technical Superstar
Monday, June 24, 2019
Slide 1
2. JOIN
IN2HYPERION • Hundreds of how to articles
• 60 Million hits to date with half a million
monthly
• The easiest way to stay in touch
» http://in2hyperion.com/newsletter-signup/
• Your information
» Confidential
» Never sold
» Only used for new posts and announcements
» Get access to everything for free
» Be notified about public “office hours” where you can
ask questions and get one-on-one help
3. ONLINE
TRAINING
MODULES • Online Training
» Self Paced
» Aggressively priced
• Modules In Progress
» Working on 10 modules to learn Groovy
• Future Modules
» 5-10 advanced Groovy modules
» Building an effective security model
4. PRESENTATION PROGRESSION
Getting Started With Groovy For The Non-Technical Superstar
Monday, June 24, 2019
4
:25
KEYS TO GROOVY SUCCESS
Documentation and basic
concepts needed to get
started
:05 WHERE TO GO FROM HERE
Live demonstration
:10 LAST CALL
Q/A and conclusion
:05
HELLO WORLD
Write your first Groovy
calculation
:05 ACCELYTICS INTRODUCTION
Company history and focus
:10
LEARNING PATH
What to expect from today and
suggestion on how to pick this up
6. KYLE GOODFRIEND
Getting Started With Groovy For The Non-Technical Superstar
Monday, June 24, 2019
Slide 6
Vice President at Accelytics / Oracle EPBCS Implementation Specialist
Professional and Personal
• BBA, concentration in Finance
• College professor for 5 years
• Started consulting in 2008
• 100% self taught (technology)
• 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
10. ABOUT
ACCELYTICS
PBCS/EPBCS ACCELERATORS
• Our Accelerators fast track implementations
» Automation
» Training
» Building security
» User documentation
» Administrative framework
» Dimension builds
» Driver-based models
» UAT
» Project management
» Risk mitigation
» Module builds
11. ABOUT
ACCELYTICS
EPBCS MODULE QUICK START
• 4-6 week implementation
• We provide documentation on needs before
we start
• Client gets
» CapEx
» Financials
▸Income Statement
▸Balance Sheet
▸Cash Flow
» WFP
» Projects
12. Getting Started With Groovy For The Non-Technical Superstar
Monday, June 24, 2019
12
PRESENTATION FORMAT
• If you have a question, ask
• Let’s make this as interactive as
possible
• Let’s go where you want to go with the
content
• I am here for you to benefit
13. LEARNING PATH
Knowing where to start can be overwhelming.
Understanding a few things will help you navigate a
path to success.
Getting Started With Groovy For The Non-Technical Superstar
Monday, June 24, 2019
Slide 13
15. HIGHLIGHTING GROOVY
A lot is possible
Getting Started With Groovy For The Non-Technical Superstar
Monday, June 24, 2019
Slide 15
16. Slide 16
Getting Started With Groovy For The Non-Technical Superstar
Monday, June 24, 2019
IMPROVED PERFORMANCE
• Fix on columns and rows
• Fix on only POV of cells that
were edited
• Dynamic Essbase
calculations
• Dynamic Data Maps/Smart
Pushes
17. Slide 17
Getting Started With Groovy For The Non-Technical Superstar
Monday, June 24, 2019
REAL TIME REPORTING
• Inter-plan type data
movement on the fly
• Consistent dimensionality is
irrelevant
• Sub second performance
• No more consolidations
• No more data consistency
issues
• No more headaches
18. Slide 18
Getting Started With Groovy For The Non-Technical Superstar
Monday, June 24, 2019
PRE-SAVE VALIDATION
• Stop data entry errors
• Provide users real time
warnings
• Options are limitless
» Can require cell comments
» Can dynamically change data
based on entry
19. Slide 19
Getting Started With Groovy For The Non-Technical Superstar
Monday, June 24, 2019
ASO WRITE-BACK
•Write calculations
directly to ASO
» FX calculations
» Allocations
» Anything that can be done
in BSO and more
21. PATH TO BE FUNCTIONAL
Understanding a few directional concepts
will help you troubleshoot what you are
doing wrong
Getting Started With Groovy For The Non-Technical Superstar
Monday, June 24, 2019
Slide 21
22. LEARNING
PATH
• Understand the pieces
» Groovy
» EPBCS API
• Think of a car as the ePBCS API
» Volume is available to change
» Gas pedal will accelerate the car
» Steering wheel will navigate directionally
• Think of Groovy as how you interact with the
above
» If song is good, turn up the volume
» If light turns green, push the pedal slowly
» If you need to turn left, turn the wheel counter
clockwise
MAKE IT SIMPLE
23. LEARNING
PATH
• ePBCS API allows you to do all kinds of things
» Independence now that you have a car
• Understanding how to read what is required to
use the API is a long learning curve
» This is your car’s user manual, but you have never
seen a car before, so you have a lot to learn
• Learning Groovy to be able to use the API can
also be challenging to learn
» Now that you have the car and read the manual, you
have to learn how to drive
» Street signs, the rules of the road, how others drive,
getting used to all the buttons and controls of the car
is a lot to consume
MAKE IT SIMPLE
24. LEARNING
PATH
• Don’t be overwhelmed by what has to be
consumed
• You can be productive with basic concepts with
the examples I have provided in days
• The 80/20 rules applies
» 80% of what you will want to do
» 20% of your learning curve
• When you will get the basics, you will find all
kinds of things that you will want to accomplish
LONG LEARNING CURVE
25. HELLO WORLD
There is a lot to understand to get started, so let’s just
dive in with a quick how and a few simple examples
Getting Started With Groovy For The Non-Technical Superstar
Monday, June 24, 2019
Slide 25
26. Slide 26
Getting Started With Groovy For The Non-Technical Superstar
Monday, June 24, 2019
CREATING A GROOVY CALCULATION
•Create a new rule
» Change the script
mode from Designer
to Edit Script
» Change the Script type
from Calc Script to
Groovy Script
•Templates and
Scripts can also be
Groovy
27. Slide 27
Getting Started With Groovy For The Non-Technical Superstar
Monday, June 24, 2019
HELLO WORLD
•Simple example
•Print message
•Print the person who ran
the calculation
•Print the time in which it
was executed
28. KEYS TO SUCCESS
You won’t learn it overnight, but understanding some
basic concepts will build a foundation for success and
growth
Getting Started With Groovy For The Non-Technical Superstar
Monday, June 24, 2019
Slide 28
29. KEYS TO
SUCCESS
• Revisit the car analogy
» Everything is muscle memory now, but think about how much you would have to
learn about flying a plane
▸ Controls are all different
▸ No idea what lanes to fly in
▸ No clue what the rules are
• Remember the learning pyramid
» ePBCS API is the foundation
» Know what is possible
» Know how to read it
▸ Iterate a grid
▸ Customizing an Essbase calculation
▸ Execute a data map
▸ Run time prompts
• Some key concepts you might want to focus on
» Collections
▸ Maps
▸ Lists
» Manipulating strings
▸ Basig string
▸ Gstring
▸ Tripple quoted string
• Be patient in the process with the process
SECTION AGENDA
30. EPBCS API
DOCUMENTATION
Understanding how to read the API docs
is important to be able to use it.
Getting Started With Groovy For The Non-Technical Superstar
Monday, June 24, 2019
Slide 30
31. Slide 31
Getting Started With Groovy For The Non-Technical Superstar
Monday, June 24, 2019
DOCUMENTATION HOME
•Packages
•Classes
•Helpful to me
» Index
» Examples are hidden
32. Slide 32
Getting Started With Groovy For The Non-Technical Superstar
Monday, June 24, 2019
RUN TIME PROMPT DOCUMENTATION EXPLAINATION
•Provides the package it
is in
•Provides what the
method returns
•Some have basic
examples of use
33. Slide 33
Getting Started With Groovy For The Non-Technical Superstar
Monday, June 24, 2019
RUN TIME PROMPT DOCUMENTATION DETAIL
•Constructor summary
» Detail on what parameters
are required
•Method summary
» This is the meat of what
the object (called a class)
can do
» These methods are what
makes the class useful
34. EXAMPLES
Let’s take the hello world example to the
next level and do something functional.
Getting Started With Groovy For The Non-Technical Superstar
Monday, June 24, 2019
Slide 34
35. // iterate through every cell
operation.grid.dataCellIterator().each {
println("$it.memberNames, cell data: $it.data")
}
// iterate through edited cells
operation.grid.dataCellIterator({DataCell cell -> cell.edited}).each {
println("$it.memberNames, cell data: $it.data")
}
// iterate through cells that are related to Jan
operation.grid.dataCellIterator('Jan').each {
println("$it.memberNames, cell data: $it.data")
}
ITERATING THROUGH CELLS
Slide 35
Getting Started With Groovy For The Non-Technical Superstar
Monday, June 24, 2019
36. Slide 36
Getting Started With Groovy For The Non-Technical Superstar
Monday, June 24, 2019
COMMON CELL METHODS
• addValidationError – adds an error with a tooltip that stops the saving of the data
form
• crossDimCell() – references the same POV in the grid except what is defined in the
parameters
• getMemberName() – gets the name of the member in the cell POV of the
dimension passed
• getData() – gets the data in the cell
• getDataAsSmartListMemberName() – gets the smartlist label rather than the index
• hasCellNote() – returns true if there are any cell notes added
• isLocked() – returns true if the cell is locked
• setData() – updates the data in the cell to the value passed
• setToolTip() – creates a tooltop with the value of the parameter passed
37. Slide 37
Getting Started With Groovy For The Non-Technical Superstar
Monday, June 24, 2019
COMMON USES FOR GRID ITERATION
•Get edited cells to pass to data maps or Essbase calculation scripts
•Check to see if validation passes
» If units are entered, is unit cost also entered
» Do the allocations equal 100%
» Has the user entered a value outside an acceptable range
» Ensure data entered is positive (units sold)
» Verify that the text value for phone number is 10 numeric characters
38. Slide 38
Getting Started With Groovy For The Non-Technical Superstar
Monday, June 24, 2019
CUSTOMIZING AN ESSBASE CALCULATION
•Strings can be passed
Essbase calculations
•Variables defined by grid
iterations or other can
be used in the string
•Fix on only the data that
has changed to improve
performance
•Use RTPs just like you
would or or use Groovy
RTPs
← povMembers
← editedProducts
← editedMonths
39. FIX ("Local",
"Tutle_Crossing",
"Computers",
"Box Store",
"0EP_Plan",
"Webinar_Example",
"FY18",
"Units",
"Input" ,
@RELATIVE("Products",0),
@RELATIVE("Period",0))
"Revenue" = "Units" * "Price";
ENDFIX
BREAKING IT DOWN: ESSBASE CALCULATION
Slide 39
Getting Started With Groovy For The Non-Technical Superstar
Monday, June 24, 2019
• Any Essbase calculation can
be used
• This example is a very
simple calculation
• I normally build this in a
calculation first and
validate, then bring it in
and make the adjustments
needed
• Nothing complicated about
this piece
40. // Define variables as Lists
List povMembers = operation.grid.pov*.essbaseMbrName
List editedProducts = []
List editedMonths = []
StringBuilder sEssCalc = StringBuilder.newInstance()
// Identify edited periods and products
operation.grid.dataCellIterator({DataCell cell ->
cell.edited}).each{ cell ->
editedProducts << cell.getMemberName("Product")
editedMonths << cell.getPeriodName()
}
// remove dymanic members if they exist on the data form
editedMonths.removeAll('Q1','Q2','Q3','Q4','YearTotal’)
BREAKING IT DOWN: GETTING EDITED CELLS
Slide 40
Getting Started With Groovy For The Non-Technical Superstar
Monday, June 24, 2019
• Think back to our iterator
example
• A few variables have to be
defined
» Lists – get to know them them
like the back of your hand!
• This has some Groovy code
that will be new to you
• Our iteration example is in
use here
41. // triple quotes make it easy to add special characters like quotes
// when using complex formulas they have to be inside {}
// we are simply taking the lists and building a delimited list for
our fix statement
// Build Essbase calculation
sEssCalc <<"""
FIX("${povMembers.join('","')}" ,
"${editedProducts.unique().join('","')}",
"${editedMonths.unique().join('","')}")
"Revenue" = "Units" * "Price";
ENDFIX
"""
BREAKING IT DOWN: BUILDING THE ESSBASE CALCULATION
Slide 41
Getting Started With Groovy For The Non-Technical Superstar
Monday, June 24, 2019
• We have a list of
the POV members
• We have a list of
the edited periods
• We have a list of
the edited
products
• Update the script
42. // If no products exist then no cells were edited
// If that happens, print out a message to the log
// that no data was edited
// Otherwise, print the calculation to the log and
// return the string, which executes the calculation
if(editedProducts.size() == 0){
println "No data was changed."
}
else{
println sEssCalc
return sEssCalc
}
BREAKING IT DOWN: SENDING THE STRING TO ESSBASE
Slide 42
Getting Started With Groovy For The Non-Technical Superstar
Monday, June 24, 2019
• We have our essCalc string
built
• Let’s verify that data has
been changed so we don’t
get an error by sending a
bad calculation script to
Essbase
• How about we also write
the script to the log so we
can troubleshoot if there is
an error
43. // Define variables as Lists
List povMembers = operation.grid.pov*.essbaseMbrName
List editedProducts = []
List editedMonths = []
StringBuilder sEssCalc = StringBuilder.newInstance()
// Identify edited periods and products
operation.grid.dataCellIterator({DataCell cell -> cell.edited}).each{ cell ->
editedProducts << cell.getMemberName("Product")
editedMonths << cell.getPeriodName()
}
// remove dymanic members if they exist on the data form
editedMonths.removeAll('Q1','Q2','Q3','Q4','YearTotal’)
// Build Essbase calculation
sEssCalc <<"""
FIX("${povMembers.join('","')}" ,
"${editedProducts.unique().join('","')}",
"${editedMonths.unique().join('","')}")
"Revenue" = "Units" * "Price";
ENDFIX
"""
// Create log and send calculation to Essbase
if(editedProducts.size() == 0){
println "No data was changed."
}
else{
println sEssCalc
return sEssCalc
}
BREAKING IT DOWN: ONE LAST LOOK
Slide 43
Getting Started With Groovy For The Non-Technical Superstar
Monday, June 24, 2019
44. DEMONSTRATION OF DYNAMIC
ESSBASE CALCULATION
Slide 44
Getting Started With Groovy For The Non-Technical Superstar
Monday, June 24, 2019
View a live example of this code working in a real-world
situation
46. KEYS TO
SUCCESS
EXAMPLES
• Why not a smart push on a form?
» Not dynamic to cells that edited
» There are limits to what can be pushed
» Performance is better when only edited cells are in
the push
• We start with a generic data map that we
customize
EXECUTE A CUSTOMIZED SMART
PUSH
47. // same as what we used in the Essbase calculation
// customized calculation
def editedProducts = []
def editedMonths = []
def povMap = [:]
// get the edited products and months (same as
// previous example)
operation.grid.dataCellIterator({DataCell cell -> cell.edi
ted}).each{ cell ->
editedProducts << cell.getMemberName("Product")
editedMonths << cell.getPeriodName()
}
editedMonths.removeAll('Q1','Q2','Q3','Q4','YearTotal’)
// Add the POV dimensions and headers to the map
operation.grid.pov.each{povMap[it.dimName] = it.essbaseMbr
Name}
BREAKING IT DOWN: GETTING THE EDITED
Slide 47
Getting Started With Groovy For The Non-Technical Superstar
Monday, June 24, 2019
• Start by getting the edited
periods and products
• Same as Essbase calculation
customization
48. // Add the POV dimensions and headers to the map
// dimensions is the key and the member is the value
operation.grid.pov.each{povMap[it.dimName] = it.essbaseMbrName}
// the pov includes all the dimensions except what is in the rows
// which are period and product
// The following adds the edited products and edited months, which we will
// add to the map
povMap.put('Product', '"' + editedProducts.unique().join('","') + '"')
povMap.put('Period', '"' + editedMonths.unique().join('","') + '”’)
Basically, the above creates a map with the following key/value pairs:
"Currency":"Local",
"Company":"BILB",
"Department":"Computers",
"Store_Type":"c01",
"Scenario":"OEP_Plan",
"Version":"Webinar_Example",
"Years":"FY18",
"Account":"Units",
"Source":"Input",
"Product":'"5481602","5511009","5595429","5600302","5600304","5622770”’,
"Period”:'"Jan","Feb”’
BREAKING IT DOWN: BUILDING THE MAP
Slide 48
Getting Started With Groovy For The Non-Technical Superstar
Monday, June 24, 2019
• A Map is like a list, but it is a
combination of a key and a
value
» Company = 123
» Cost Center = xyz
» Scenario = OEP_Plan
• If a dimension isn’t defined,
the properties setup in the
data map are used
49. // Use the generic data map to create a smartpush and pass
// the map of dimensions and values to it
operation.application.getDataMap("Product_SmartPush")
.createSmartPush().execute(povMap)
BREAKING IT DOWN: EXECUTING THE SMARTPUSH
Slide 49
Getting Started With Groovy For The Non-Technical Superstar
Monday, June 24, 2019
• Now that we have the
overrides defined, all that is
left is to execute the
smartpush
• Helpful notes
» Users can’t execute a data
map, only a smart push
» Not all dimensions need to be
overwritten if what is in the
data map is meaningful
50. BREAKING IT DOWN: THE JOB CONSOLE
Slide 50
Getting Started With Groovy For The Non-Technical Superstar
Monday, June 24, 2019
• The job console will show
some valuable information
» Anything logged via println will
be in the completed dialogue
» Every smart push will be a child
item and can be analyzed
▸If 2 smart pushes are executed,
two child items will be visible
51. DEMONSTRATION OF
EVERYTHING PUT TOGETHER
Slide 51
Getting Started With Groovy For The Non-Technical Superstar
Monday, June 24, 2019
View a live example of what this can do – real time
reporting with no more BSO consolidations!
52. Getting Started With Groovy For The Non-Technical Superstar
Monday, June 24, 2019
52
53. WHERE TO GO FROM HERE
Review of resources and questions
Getting Started With Groovy For The Non-Technical Superstar
Monday, June 24, 2019
Slide 53
54. WHERE TO
GO FROM
HERE
• Educate yourself on the Groovy PBCS API
• Walk through the examples at
www.in2hyperion.com
• Build a healthy understanding of collections
» Maps/Lists
» Interacting with them
• Understand string and date manipulation
• Grid iteration will probably be the first thing
you tackle
• Learn how to interact with grid builders
• Download the Groovy libraries and developer
app
SUGGESTED RESOURCES
55. WHERE TO
GO FROM
HERE
• Lack of knowledge of Groovy
• Complete misunderstanding of what the ePBCS
documents were for
» They are not to teach you Groovy
» If you don’t know Groovy and aren’t willing to learn it,
these documents will be interpreted as useless, which
they are not
• Complete oversight of understanding the type of
parameters the API methods required
• Not understanding how to know if variables were
instantiated correctly
» There are different types of string that may not play well
with the API
» There are multiple types of lists – would get errors that
say a list was passed and a list was required
MY STRUGGLES
56. LAST CALL
Thank you for attending
Getting Started With Groovy For The Non-Technical Superstar
Monday, June 24, 2019
Slide 56
57. WRAPPING UP
Slide 57
Getting Started With Groovy For The Non-Technical Superstar
Monday, June 24, 2019
Introduction to Groovy and
writing your first Groovy
calculation
01 Using Groovy variables and
validate user input06
Creating Groovy variables and
collections02 Building advanced user input
validation rules07
Looping through a Data Form
and manipulating Groovy
collections03 Query metadata
08
Using Groovy strings to create a
dynamic Essbase calculation04 Introduction to Grid Builders
09
Manipulating lists and maps to
efficiently execute jobs, Data
Maps, and Smart Pushes05
Advanced Grid Builder
concepts to move data
between plan types10
inHYPERION
ORACLE•EPBCS
LEARNINGCENTER
2
58. WRAPPING
UP
• Plan was missing 3MM in Salary
» Business Issue
▸Users changed employee properties from hourly to salary but
didn’t enter an annual salary rate
» Groovy
▸Added validation so it was impossible to save a form with missing
rates
• Leadership wanted real-time reporting, project
would be a failure without, was told PBCS could do
it during sales cycle
» Business Issue
▸When users changed product or WFP module data, it took 2-25
minutes to save every form (consolidations and data maps ran)
» Groovy
▸Consolidations were eliminated to complete and form saves took
2.5 seconds on average
REAL WORLD WINS
59. WRAPPING
UP
• Currency Conversion in ASO
» Procedural calculations
▸Had to be calculated at summary levels
▸Had to be split into more than 20 calculations
» Groovy
▸At level 0 of all dimensions
▸Daily processing time was roughly 20 minutes
• Reconciliate to HFM loaded at consolidated levels
» Procedural calculations
▸ Too complex for PBCS
▸Development could not get it to finish
» Groovy
▸Finished in 5 minutes for the entire year
▸Prompted for start and end month/year
▸One calculation
▸Developed in 4 hours
REAL WORLD WINS
60. WRAPPING
UP
• Eliminating DM
» Mapping done in calculation
▸Dynamically creating maps based on metadata
▸No mapping tables required
▸No maintenance required
» Groovy
▸At level 0 of all dimensions
▸20 times faster than DM process
REAL WORLD WINS
61. WRAPPING
UP
• ASO Only Planning
» All Calculations In Groovy
▸Allocations
▸Balance walk forwards
▸Versioning
▸Pre-save validation
▪ Ensuring allocations are 100%
▪ Transfer in/out are positive/negative
▪ Adjustments by %/$ entry
▸Adding lines to forms for data entry
▸Currency Conversion
▸Unit of Measure Conversion
▸Top Level adjustments
REAL WORLD WINS