adventures in groovy – part 20: groovy on-premise vs

50
Adventures in Groovy – Part 20: Groovy On-Premise vs. Groovy Cloud Introduction Yes, it is true that Groovy is available in on-premise and cloud (PBCS) versions of Hyperion Planning. No, it is not true that the same flavor of Groovy exists in both. Both have their advantages, and both have their drawbacks. The likelihood that they will ever be the same is extremely low, and here is why. The Difference Is On-Premise gives developers the ability to write and use independent Groovy compiled applications. These can be used in Business Rules as CDFs (custom defined functions). Developers have complete functionality to make this do whatever they want. It can return results to save to Essbase/Planning, it can interact with SQL, can run other programs, pretty much anything you can access that has a JAVA API. PBCS doesn’t have the same flexibility. Custom defined functions can’t be compiled and stored on the server. PBCS, rather, has “Groovy Calculations.” This gives developers the flexibility to interact with the Data Forms that on-premise doesn’t have. Developers can iterate through the cells and act accordingly. It can stop the form from saving, calculate and override data entered, color code cells, customize Data Maps, Smart Pushes, dynamically generate calculations, move data between databases, all with access to much of the Groovy functionality.

Upload: others

Post on 02-Mar-2022

18 views

Category:

Documents


0 download

TRANSCRIPT

Page 1: Adventures in Groovy – Part 20: Groovy On-Premise vs

Adventures in Groovy – Part20: Groovy On-Premise vs.Groovy Cloud

IntroductionYes, it is true that Groovy is available in on-premise andcloud (PBCS) versions of Hyperion Planning. No, it is nottrue that the same flavor of Groovy exists in both. Both havetheir advantages, and both have their drawbacks. Thelikelihood that they will ever be the same is extremely low,and here is why.

The Difference IsOn-Premise gives developers the ability to write and useindependent Groovy compiled applications. These can be usedin Business Rules as CDFs (custom defined functions). Developers have complete functionality to make this dowhatever they want. It can return results to save toEssbase/Planning, it can interact with SQL, can run otherprograms, pretty much anything you can access that has a JAVAAPI.

PBCS doesn’t have the same flexibility. Custom definedfunctions can’t be compiled and stored on the server. PBCS,rather, has “Groovy Calculations.” This gives developers theflexibility to interact with the Data Forms that on-premisedoesn’t have. Developers can iterate through the cells andact accordingly. It can stop the form from saving, calculateand override data entered, color code cells, customize DataMaps, Smart Pushes, dynamically generate calculations, movedata between databases, all with access to much of the Groovyfunctionality.

Page 2: Adventures in Groovy – Part 20: Groovy On-Premise vs

PBCS also supports the REST API, so Groovy can be used toaccess that and do everything, even more, that EPM Automatecan do.

Why They Will Never Be The SameThis is just an opinion. Technology changes so rapidly thatthis may change. Corporate strategy changes almost asrapidly.

If PBCS had to ability to do what on-premise does, the abilityfor Oracle to support the instance would be a challenge. CDFscan delete all the files on a server, for instance, and Idon’t see a cloud provider giving developers this much controlin a shared environment.

I also don’t see on-premise to have the same proactiveinteraction that PBCS has with Groovy Calculations purelybecause Oracle is pushing the cloud, and they want the mostcurrent functionality to exist in the platform they arepushing clients to use.

My Two CentsI understand why there is a difference, and I don’t expect itto change in the near future. 3 years ago I didn’t expectthat I would tell you that I would rather do a cloudimplementation than on prem, either. I do think as people getmore comfortable with the cloud, and security improves, therewill be advances. I think there will be a future state wherethe cloud offerings will be closer to having the flexibilityto the on-premise implementations.

Page 3: Adventures in Groovy – Part 20: Groovy On-Premise vs

Exporting Data in PBCS WithBusiness Rules

IntroductionIf your environment is a cloud product, whether it be PBCS orePBCS, one thing that is critical to understand is the backupsproduced in the Migration area, may not be what you think. Learning this after the fact may have negative consequences onyour ability to restore data. In the migration, the EssbaseData section is a copy of the pag, ind, and otl files. Whenthis is used to restore data, it restored the entiredatabase. This includes data and metadata. This may be OKfor many situation, but it won’t help you if

only specific data is required to be restoredspecific data has changed and needs to be excluded fromthe restorecorruption exists in the database and all data isrequired to be restoredThe pag files that hold the data are not readableThe size of the backup is quite large as it includes alldata, and upper level data is normally exponentiallylarger than just level 0 data

Text Data ExportBusiness Rules can be written to export data to theInbox/Outbox that is delimited with a few formatting options. The entire database can be included. With fix statements,specific data can be isolated. So, forecast could be exportedto a file, plan another, and actuals a third. Specificaccounts, entities, and/or products can be isolated in caseswhen specific data was inadvertently changed or deleted. Thisfile is a text file that can be opened in any text editor,

Page 4: Adventures in Groovy – Part 20: Groovy On-Premise vs

Microsoft Excel, a database, or any other application that youopen text files to view or manipulate.

Example Business Rule[crayon-621e80a86dec1090206429/]

Some HintsThere are a few things that you may encounter and be a littleconfused about, so the following are a few things that mighthelp.

To see the data export, it must be exported to1./u03/lcm/, which is the equivalent of your inbox. Anyfile name can be used.Setting DataExportLevel to 0 will export the level 02.blocks, not the level 0 members. If there are anystored members in any of your dense dimensions, theywill be exported unless the dimension is also in the fixto include ONLY level 0 members.The fix statement works the same as a fix statement in3.any business rule, so the data to be exported can beeasily defined.My experience exporting dynamic calculated members4.drastically increases the time of the export.The export options are all pretty logical. Some work in5.conjunction with each other and others are ignoreddepending on dependent setting values. These aredocumented for version 11.1.2.4 here.This process can be automated with EPM Automate and6.include the download and time stamp of the backup forlater use.

ConclusionThere are benefits to both types of backups. My preference isto either run both nightly, or run just the Business Rule. By

Page 5: Adventures in Groovy – Part 20: Groovy On-Premise vs

having both, the administrator has the option of restoring thedata as needed, in the way that is most effective. Havingboth provides the ultimate flexibility. If space is an issue,exclude the data option in the Migration and just run thebusiness rule.

From Oracle’s DocumentationDataExportLevel ALL | LEVEL0 | INPUT

ALL—(Default) All data, including consolidation andcalculation results.LEVEL0—Data from level 0 data blocks only (blockscontaining only level 0 sparse member combinations).INPUT—Input blocks only (blocks containing data from aprevious data load or grid client data-updateoperation). This option excludes dynamically calculateddata. See also the DataExportDynamicCalc option.

In specifying the value for the DataExportLevel option, usethese guidelines:

The values are case-insensitive. For example, you canspecify LEVEL0 or level0.Enclosing the value in quotation marks is optional. Forexample, you can specify LEVEL0 or “LEVEL0”.If the value is not specified, Essbase uses the defaultvalue of ALL.If the value is incorrectly expressed (for example,LEVEL 0 or LEVEL2), Essbase uses the default value ofALL.

Description

Specifies the amount of data to export.

Page 6: Adventures in Groovy – Part 20: Groovy On-Premise vs

DataExportDynamicCalc ON | OFF

ON—(Default) Dynamically calculated values are includedin the export.OFF—No dynamically calculated values are included in thereport.

Description

Specifies whether a text data export excludes dynamicallycalculated data.

Notes:

Text data exports only. If DataExportDynamicCalc ON isencountered with a binary export (DATAEXPORT BINFILE …)it is ignored. No dynamically calculated data isexported.The DataExportDynamicCalc option does not apply toattribute values.If DataExportLevel INPUT is also specified and the FIXstatement range includes sparse Dynamic Calc members,the FIX statement is ignored.

DataExportNonExistingBlocks ON | OFF

ON—Data from all possible data blocks, including allcombinations in sparse dimensions, are exported.OFF—(Default) Only data from existing data blocks isexported.

Description

Specifies whether to export data from all possible datablocks. For large outlines with a large number of members insparse dimensions, the number of potential data blocks can bevery high. Exporting Dynamic Calc members from all possibleblocks can significantly impact performance.

Page 7: Adventures in Groovy – Part 20: Groovy On-Premise vs

DataExportPrecision n

n (Optional; default 16)—A value that specifies the number ofpositions in exported numeric data. If n < 0, 16-positionprecision is used.

Description

Specifies that the DATAEXPORT calculation command will outputnumeric data with emphasis on precision (accuracy). Dependingon the size of a data value and number of decimal positions,some numeric fields may be written in exponential format; forexample, 678123e+008. You may consider usingDataExportPrecision for export files intended as backup orwhen data ranges from very large to very small values. Theoutput files typically are smaller and data values moreaccurate. For output data to be read by people or someexternal programs, you may consider specifying theDataExportDecimal option instead.

Notes:

By default, Essbase supports 16 positions for numericdata, including decimal positions.The DataExportDecimal option has precedence over theDataExportPrecision option.

Example

[crayon-621e80a86dece204156778/]Initial Data Load Values[crayon-621e80a86ded2563704595/]Exported Data Format[crayon-621e80a86ded4617832962/]DataExportDecimal n

Where n is a value between 0 and 16.

If no value is provided, the number of decimal positions of

Page 8: Adventures in Groovy – Part 20: Groovy On-Premise vs

the data to be exported is used, up to 16 positions, or avalue determined by the DataExportPrecision option if that isspecified.

Description

Specifies that the DATAEXPORT calculation command will outputnumeric data with emphasis on legibility; output data is instraight text format. Regardless of the number of decimalpositions in the data, the specified number is output. It ispossible the data can lose accuracy, particularly if the dataranges from very large values to very small values, above andbelow the decimal point.

Notes:

By default, Essbase supports 16 positions for numericdata, including decimal positions.If both the DataExportDecimal option and theDataExportPrecision option are specified, theDataExportPrecision option is ignored.

Example

[crayon-621e80a86ded5190290124/]Initial Data Load Values[crayon-621e80a86ded7679697906/]Exported Data Format[crayon-621e80a86ded8632864850/]

Output Format Options

DataExportColFormat ON | OFF

ON—The data is output in columnar format.OFF—Default. The data is output in non-columnar format.

Description

Page 9: Adventures in Groovy – Part 20: Groovy On-Premise vs

Specifies if data is output in columnar format. Columnarformat displays a member name from every dimension; names canbe repeated from row to row, enabling use by applicationsother than Essbase tools. In non-columnar format, sparsemembers identifying a data block are included only once forthe block. Non-columnar export files are smaller, enablingfaster loading to an Essbase database.

Notes

Do not use the DataExportColFormat option in combination withthe DataExportRelationalFile option, which already assumescolumnar format for files destined as input files torelational databases.

Example[crayon-621e80a86ded9902040276/]DataExportColHeader dimensionName

Description

Specifies the name of the dense dimension that is the columnheader (the focus) around which other data is referenced inthe export file. Use the DataExportColHeader option only whenyou export data to a text file. For example, if from SampleBasic the Year dimension is specified, the output data startswith data associated with the first member of the Yeardimension: Year. After all data for Year is output, itcontinues with the second member: Qtr1, and so on.

Notes

MaxL, ESSCMD, and Essbase exports do not provide a similarcapability. With these methods, Essbase determines the focalpoint of the output data.

Exporting through Report Writer enables you to specify theheader in the report script.

Example

Page 10: Adventures in Groovy – Part 20: Groovy On-Premise vs

[crayon-621e80a86dedb479028053/]Specifies Scenario as the page header in the export file. TheScenario dimension contains three members: Scenario, Actual,and Budget. All Scenario data is shown first, followed by allActual data, then all Budget data.

DataExportDimHeader ON | OFF

ON—The header record is included.OFF—Default. The header record is not included.

Description

Use the DataExportDimHeader option to insert the optionalheader record at the beginning of the export data file. Theheader record contains all dimension names in the order asthey are used in the file. Specifying this command alwayswrites the data in “column format”.

Example[crayon-621e80a86dedc481975287/]Specifying the DataExporttDimHeader ON option while exportingSample Basic writes the data in column format, with commonmembers repeated in each row. The data begins with a dimensionheader, as shown in the first two rows of the example filebelow:[crayon-621e80a86dedd091755732/]DataExportRelationalFile ON | OFF

ON—The output text export file is formatted for importto a relational database.

Data is in column format; sparse member names arerepeated. (The DataExportColFormat option isignored.)The first record in the export file is data; nocolumn heading or dimension header is included,even if specified. (The DataExportColHeader andDataExportDimHeader options are ignored.)

Page 11: Adventures in Groovy – Part 20: Groovy On-Premise vs

Missing and invalid data is skipped, resulting inconsecutive delimiters (commas) in the output. Theoptional “missing_char” parameter for DATAEXPORTis ignored

OFF—Default. The data is not explicitly formatted foruse as input to a relational database.

Description

Using the DataExportRelationalFile option with DATAEXPORTenables you to format the text export file to be used directlyas an input file for a relational database.

Example[crayon-621e80a86dedf375449982/]

Processing Options

DataExportOverwriteFile ON | OFF

ON—The existing file with the same name and location isreplaced.OFF—Default. If a file with the same name and locationalready exists, no file is output.

Description

Manages whether an existing file with the same name andlocation is replaced.

DataExportDryRun ON | OFF

ON—DATAEXPORT and associated commands are run, withoutexporting data.OFF—Default. Data is exported

Description

Enables running the calculation script data export commands tosee information about the coded export, without exporting the

Page 12: Adventures in Groovy – Part 20: Groovy On-Premise vs

data. When the DataExportDryRun option value is ON, thefollowing information is written to the output file specifiedin the DATAEXPORT command:

Summary of data export settingsInfo, Warning, and Error messagesExact number of blocks to be exportedEstimated time, excluding I/O time.

Notes

The DataExportDryRun option does not work with exportsto relational databases.If you modify the script for reuse for the actualexport, besides removing the DataExportDryRun optionfrom the script you may want to change the name of theexport file.

Example

[crayon-621e80a86dee0455333120/]

Adventures in Groovy – Part3: Acting On Edited Cells

IntroductionWith the introduction of Groovy Calculations this summer, oneof the things I use most, especially for applications withdata forms that include a large sparse dimension in the rowswith suppression on, is the option to loop through cells andidentify only the POV on the cells that have changed. In

Page 13: Adventures in Groovy – Part 20: Groovy On-Premise vs

applications like workforce planning, or product levelapplications that have hundreds, if not thousands, of possibleblocks, isolating only the changed data can have significantimpacts on performance. Normally when a data form is saved,the fix includes all level 0 members of the employee dimensionand must run the calculations on all of them, regardless ofwhether employee changed or not. Being able to fix on only arow, or the handful that change, give us a significantadvantage in user response.

This post will go into how this is executed, and a few usecases to get you thinking about the possibilities. All ofthese I have developed and are in a production application.

The CodeUsing a grid iterator, with the appropriate parameter, is anextremely easy way to deploy functionality that looks throughONLY the cells that have been changed.[crayon-621e80a86ec44465311090/]The cell object, and all its parameters, are available insidethe loop. By adding {DataCell cell -> cell.edited}, the loopis isolated to only cells that have changed. Therepresentative member names, the data value, if it is locked,has attachments, and many other things can be accessed withthe example above.

Use CasesAn infinite number of uses are possible, as you are probablyalready thinking about. If not, the following will probablyspark some creativity.

Customizing an Essbase Fix StatementOne of the most significant benefits of this is the ability tobe able to dynamically generate a fix statement and filterwhat is calculated. Although the calculation on the Essbase

Page 14: Adventures in Groovy – Part 20: Groovy On-Premise vs

side isn’t improved just by using Groovy, the ability todynamically write the calculation on only what changed issignificant, especially when allocations, data pushes, andother longer running processes are required.

Assuming the rows of a data grid include the dimensionProduct, and Period is in the columns, the following willcreate variables that will include only the periods andproducts that have been updated. These can be used in thestring builder that is passed to Essbase. So, rather than@RELATIVE(“Product”,0) running on all possible products, itcan be replaced with “Product 1″,”Product 2”.

The following creates list and string variable for Product andPeriod. Every cell that is updated will add the relativeproduct and period to the list variables. After all the cellvalues have been read, the two string variables are set toinclude a unique list of the dimension members, surrounded byquotes, and separated by commas, which are immediately readyto include in the FIX statement.[crayon-621e80a86ec4b438735869/]The string builder would look something like this. In thefollowing example, the other variables are pulled from thePOV.[crayon-621e80a86ec4d050893476/]At this point, the strEssCalc value can be passed to Essbaseand executed. If only 2 products are changed in 1 month, onlythose 2 cells would be calculated. If this data form included12 months and 1,000 products, the calculation would takeroughly 1/500th of the time.

Customizing Smart PushSmart Pushes on forms, depending on the POV, can exceed athreshold of what a user perceives as acceptable performance. In the 17.11 release, Data Maps and Smart Pushes can nowembedded in the Groovy Calculations. The 2 huge benefits tothis are that

Page 15: Adventures in Groovy – Part 20: Groovy On-Premise vs

the data that is pushed can be filtered to only the data1.that changes, decreasing the time of the operation, andthe ability control the operation order of when a push2.runs (for example, calculation, push, calculation, push)

If a data form has a smart push associated to it, it can beaccessed and further customized. If not, data maps can alsobe accessed, customized, and executed.

One thing I learned from the Oracle development team is thatthe Smart Pushes have a max memory that can be accessed. OneSmart Push may never hit that limit if it is isolated enough,but we found issues when multiple Smart Pushes were executed athe same time. We were seeing multiple, and intermediate,failures in the logs. So, it is even more critical to makethese pushes as small as possible to eliminate that issue.

If we reference the example above in the customized fix, weexpand on that and apply the same filter to the Smart Push. The only addition needed is to encapsulate the strProductsvariable in quotes. If nothing is passed, it runs the smartpush as it is setup in the form, sooperation.grid.getSmartPush(“appname”).execute() would simplyexecute the same thing as if the Smart Push was set to run onsave.[crayon-621e80a86ec4f137647445/]

Validate dataHaving the ability to proactively perform data validation isanother great addition with Groovy. Rather than running acalculation, and after the Data Form save returning a messagetelling the user that they have to change something, orchanging it for them, we now can interrupt the data form saveand instruct the user to change it before it has any adverseimpact on the data. The following will change the cells thatviolate the validation to red, add a tooltip, stop the formsave, and throw an error message. Assume we don’t want the

Page 16: Adventures in Groovy – Part 20: Groovy On-Premise vs

user to enter more than 50,000 in salary. This threshold canpoint to data in the application, but is hard coded below forsimplicity.[crayon-621e80a86ec50481737682/]

ConclusionThis is just a taste of what can be done. As you can see,with the ability to isolate actions on only the dirty cells,we now have opportunities we haven’t had since pre Smart View,and functions are completely new. The impact on performanceis game changing and the ability we now have to interact witha user pre and post save is ground breaking to thepossibilities.

Choosing a ReportingMechanism in PlanningReports out of Hyperion Planning are typically identified in 2categories.

Standard “canned” reports – These reports are usedgenerically in a global aspect to report data in commonformats and standardized views. These are oftengenerated in volume and printed for presentations andexecutive review.Ad hoc reports – These reports are more flexible, oftenadjusted to explain current variances and marketconditions. These reports are most likely generated byanalysts and managers producing unique views to explainvariances that exist at a point in time. The need toalter, change, and customize these reports are essential

Page 17: Adventures in Groovy – Part 20: Groovy On-Premise vs

to identify and explaining current business conditions.

Reporting from Hyperion Planning can be completed in 3(debatably 4) ways. Deciding which reports are developed, orproduced, and in which delivery method, is critical to makingthe most of the reporting capabilities and development timeavailable.

The recommended approach for reports that are distributedglobally, need to have a consistent look and feel, and usestandard hierarchies and financial definitions, is to buildthem in Hyperion Financial Reporting. This will enable usersto execute the exact same report, with their specific point ofview, and distribute it to anybody in the company. It canalso be mass distributed by email to thousands of users fortheir specific business ownership when data is finalized. Reports can be grouped into books so users can easily run aset of reports for their line of business quickly and easily.Development of reports in HFR take a little longer are can bemore time consuming to change, so selecting reports in thisdelivery method should be evaluated and considered carefully.

Reports that consistently change, are not required to be massproduced, or don’t require a defined format, are more commonlyproduced in SmartView/Excel. This delivery method providesthe ultimate flexibility in creativity and customization. These reports can be rapidly produced and development and iscost effective. These reports, although extremely flexible,require complete ownership on data validation by the users, asthey don’t change automatically to the changes in thehierarchies of the application. Developing reports inSmartView/Excel is extremely beneficial when the reportchanges rapidly and it supports the ability to quicklyidentify business variances and explain those variances tomanagement.

The following matrix will help you identify the best reporting

Page 18: Adventures in Groovy – Part 20: Groovy On-Premise vs

method for your environment.

My Adventures in GroovyCalculations – Part 1

What Is GroovyRecently, Groovy scripting was added to ePBCS business rulesas an option instead of the GUI, or the go-to scripting foryou old-timers who still refuse to change. These are definedin the Business Rule editor as Groovy calculations. So, whatis Groovy?

“Apache Groovy is an object-oriented programminglanguage for the Java platform. It is a dynamiclanguage with features similar to those of

Page 19: Adventures in Groovy – Part 20: Groovy On-Premise vs

Python, Ruby, Perl, and Smalltalk. It can be used as ascripting language for the Java Platform, is dynamicallycompiled to Java virtual machine (JVM) bytecode, andinteroperates with other Java code and libraries. Groovyuses a Java-like curly-bracket syntax. Most Java code isalso syntactically valid Groovy, although semantics may bedifferent.”

If you haven’t heard of Groovy, you may want to do someresearch. Oracle is using more and more Groovy inapplications as administrative options and a communicationmethod between applications. Groovy is a standard and can beused with millions of applications and websites with the RESTAPI.

What Groovy Script/Calculations AreNotGroovy calculations are not java-based calculations. It isnot a new calculation language. It does provide a way tointeract with a Data Form in ePBCS and build a calculationscript dynamically. So, Groovy, in the context of GroovyCalculation Scripts, does not connect to Essbase via GroovyBusiness Rules. It simply builds a string that is sent toEssbase as a calculation. It does, however, interact withPlanning and that is where the power starts. With the abilityto have all the Groovy functionality to manipulate strings andnow the ability to interact with the data form, dynamiccalculations can be built. The calculation script sent toEssbase is no different, but the script can now be dynamicallygenerated based on things like, the POV, the text value of aSmart List, whether the values in the grid were updated,whether the data entered meets validation criteria, and othersimilar things.

If you are experienced with Hyperion Planning, you may havedabbled with JavaScript to do data validation, calculate data

Page 20: Adventures in Groovy – Part 20: Groovy On-Premise vs

prior to the user submitting it, or prevent users fromsubmitting data. It was a great option to provide feedback tousers, but that basically was useless when Smart View allowedusers to open Data Forms in Excel. The JavaScript did nothingunless the form was opened in an internet browser.

Getting StartedThe first step in creating a Groovy Calculation Script is to,well, create one. To do that, create a new business rule. Change the view from Designer to Edit Script. If you haven’tnoticed this before, it provides a way to toggle the GUI to ascript view.

Next, find the drop-down box in the toolbar to the far rightnamed Script Type. This option will read Calc Script. Changeit to Groovy Script.

AAt this point, the script window is now set to validateGroovy script, not Essbase syntax. Even though it doesn’t doanything yet, you have just created your first Groovy BusinessRule!

Page 21: Adventures in Groovy – Part 20: Groovy On-Premise vs

Use CasesThere is a lot of potential in this functionality. To get youthinking, here are some examples:

Execute calculations on large sparse dimensions on ONLY1.the members that changed on the form.Access the Smart List text to do validation, use in2.calculations, and store for later use in Essbase (maybesave a member name in a member that is numeric, likeemployee ID, Cost Center, or account).Perform validation before the calculation is built and3.sent to Essbase. For example, if the sum of a columnused to allocate dollars doesn’t sum to 100, send acalculation that ONLY returns a message and doesn’tperform the allocation.Perform text manipulation previously done in Essbase4.with functions. Concatenating member names andtruncating member name prefixes and date formats aresome of the few I use regularly. Many of thesefunctions are extremely slow and force the calculationto execute in serial mode, so to be able to do themoutside the script is now an option.

Real World ExampleThe ProblemI am working with a client who wants to override the result ofdriver-based calculations based on historical trends. In thisexample, the volume of cases can be changed and the profitrate can be adjusted. Once the form is saved, the overridesneed to be removed.

Here-in lies the challenge. If the overrides are removed andthe calculation runs on all members in the form, the resultswould revert back to what they were prior to the override

Page 22: Adventures in Groovy – Part 20: Groovy On-Premise vs

because the override values no longer exist in the database orData Form. So, rather than perform the calculation on theoverride, it would use #missing or zero, and take the resultsright back to what the drivers dictated. The most obvious wayaround this issue is to execute the calculation on ONLY therows (vendors in this example) that were edited. In otherwords, dynamically generate the FIX statement on the vendorsthat were updated.

The Non-Groovy FIX StatementWithout Groovy, the FIX statement would include@RELATIVE(“Vendor”,0) to run the calculation on all venders onthe Data Form. This has 2 issues. One, it calculates all thevendors and will change the vendors back to the pre-overridevalues. Two, every time the user saves the form, the fix istraversing through 30,000 possible vendors. Although mostcompanies have less than 8,000 active vendors, it still posesa performance issue calculating 8,000 blocks when only a fewtypically change.

The only aspect of the calculation that is going to change inthis situation is the FIX statement, so that will be the onlypiece shown in the comparison between a Groovy script and anon-Groovy script.[crayon-621e80a86f4a4838185927/]

Page 23: Adventures in Groovy – Part 20: Groovy On-Premise vs

The Groovy FIX StatementSince Groovy can dynamically create the calculation script, itlooks more like the example below. The sPov will be a stringvariable in Groovy that holds all the members in the dataform’s POV. The sVendors Groovy variable will hold the listof vendors that have been edited.[crayon-621e80a86f4b3656113243/]@RELATIVE(“Vendor”,0), which would produce a list of everyvendor in the hierarchy, is replaced with “V300000300040003”,“V300000300060001”, “V300000300070002”.

The issue of running the calculation on vendors that have notbeen edited has now been solved. An added benefit is that thecalculation runs on 3 of the 8,000 blocks, so what took 30seconds now completes in under a second.

Now, The Interesting PartLet’s dissect the Groovy calculation script piece by piece.

Setting The StageFor Groovy to perform operations, there are a few housekeepingitems that need to be addressed. First, a few string buildersneed to be created to store some variables of strings thatgrow through the process and are concatenated to Essbase

Page 24: Adventures in Groovy – Part 20: Groovy On-Premise vs

calculation before it is submitted for processing.

There are some variables used to interact with the form’s datagrid. For easy reference to the grid through the script, thegrid object is stored in a variable (curgrid). Next, avariable is created to hold the result of the cells that havebeen edited (itr). The likelihood that these variableswould exist in most of the scripts is high, so it might makesense to get familiar with these objects and their parameters.[crayon-621e80a86f4b5669394178/]At this point the values of the variables are as follows.

Find the Vendors That Have ChangedWe know the users will enter overrides in this Data Form (CaseGrowth and Average Price). The following piece of the Groovyscript will build a delimited list of those vendors based onthe rows that have been edited. It will include quotes aroundthe member names to account for any member names that arenumeric or have special characters and will be separated by acomma. Groovy provides the ability to append to a string with<<”””, and close it with “””. The if statement ensures that avendor will not be appended to the string if multiple columnsare changed.[crayon-621e80a86f4b9933330036/]At this point, only a few variables have changed. The bulk ofthe Groovy functionality is finished. We now have the POV andthe list of vendors that need to be in the FIX statement.

Page 25: Adventures in Groovy – Part 20: Groovy On-Premise vs

The Essbase CalculationThe next section will append text to the scriptBldr string. This string will ultimately be sent to Essbase as thecalculation to be performed. Groovy variables are embeddedand replaced with the value that they were set to previously. The two used in this calculation are $vendorList and $sPOV. Other than those two pieces, everything else is pulled fromthe original Business Rule and highlighted in red below.[crayon-621e80a86f4bb718282855/]At this point, the scriptBldr variable is a complete Essbasecalculation that can be validated in any Business Rule.

Finishing UPThe last thing required is to send the calculation text builtabove to Essbase.[crayon-621e80a86f4bc812190566/]

Verifying What Was Sent To EssbaseWhen the Data Form is saved, the results in the form can bevalidated back to the logic to verify that the calculationworked as expected. Regardless of whether the calculationexecutes with or without failing, the value of scriptBldr (calculation sent to Essbase) is captured in the Job console.

Page 26: Adventures in Groovy – Part 20: Groovy On-Premise vs

In the Job console, click the Job Status link. This includesthe value of the scriptBldr variable. The text can be copiedfrom this window, and if it failed to execute, can be copiedinto a Business Rule and validated there to find the issue.

Wrapping UpI will admit that I am not a Java programmer, so I am stilleducating myself on the potential this affords developers. Iam struggling to digest the API documentation and to trulyunderstand the depth of the possibilities. I do know thisopens up a whole world we didn’t have with Hyperion Planning.I plan on learning and using Groovy calculations more and morebecause of the possibilities it provides. Look for moreexamples and knowledge sharing as I get my hands around theAPI and integrate this into more delivery solutions. To getfuture publications, sign up to be notified about new postsand articles at www.in2hyperion.com.

Page 27: Adventures in Groovy – Part 20: Groovy On-Premise vs

Using a Shared Connectionwith HSGetValue/HSSetValuewith Planning or PBCSIf you are a fan of the HSGetValue and HSSetValue, youprobably are using a private connection. As you know, anybodythat uses the template has to either change the connectionstring to their own predefined private connection, or set up aprivate connection with the same name. When dealing withinexperience users, both methods can be problematic.

You may be surprised to know that the Get and Set Valuefunctions can use a shared connection. Rather than using theprivate connection name, the following can be specified to usea shared connection in place of the private connection name.

Private connection syntax:HsGetValue(“PrivateConnectionName”,”POV”)HsSetValue (dollar amount,”PrivateConnectionName”,”POV”)

Shared connection syntax:

HsGetValue(“WSFN|ProviderType|Server|Application|Database”,”POV”)HsSetValue (dollaramount,”WSFN|ProviderType|Server|Application|Database”,”POV”)

Parameter Summary“WSFN” is a static string and never changesThe provider type for planning is “HP” regardless ofwhether the server is a cloud server or on premiseserverThe server specifies the location of the server housingthe application. For PBCS, use the URL provided byOracle (planning-test-domain.pbcs.us2.oraclecloud.com)

Page 28: Adventures in Groovy – Part 20: Groovy On-Premise vs

The application is the application nameThe database is the plan type, or database name

Put that all together and the string looks like this.WSFN|HP|planning-test-A12345.pbcs.us2.oraclecloud.com|Finance|Revenue

ConclusionAlthough there are a few drawbacks to using a sharedconnection (users could use the wrong connection and not getthe expected result), my experience has been that the pros (nosetup of private connections, can be used in multipleenvironments without changing anything, etc.) far outweigh thecons.

Remove Dimensions FromPlanning LCM Extracts

ProblemI am currently working with a client that is updating aplanning application and one of the changes is to remove adimension. After the new application was setup and thehierarchies were modified to meet the objectives, migratingartifacts was the next step. As many of you know, if you tryto migrate web forms and composite forms, they will errorduring the migration due to the additional dimension in theLCM file. It wouldn’t be a huge deal to edit a few XML files,but when there are hundreds of them, it is extremely timeconsuming (and boring, which is what drove me to create thissolution).

Page 29: Adventures in Groovy – Part 20: Groovy On-Premise vs

AssumptionsTo fully understand this article, a basic understanding of XMLis recommended. The example below assumes an LCM extract wasrun on a Planning application and it will be used to migratethe forms to the same application without a CustomerSegmentdimension. It is also assumed that the LCM extract has beendownloaded and decompressed.

SolutionI have been learning and implementing PowerShell scripts forthe last 6 months and am overwhelmed by how easy it is tocomplete complex tasks. So, PowerShell was my choice tomodify these XML files in bulk.

It would be great to write some long article on how smart thissolution is and overwhelm you with my whit, but there is notmuch too it. A few lines of PowerShell will loop through allthe files and remove the XML tags related to a predefineddimension. So, let’s get to it.

Step 1 – Understand The XMLThere are two folders of files we will look to. Forms areunder the plan type and the composite forms are under theglobal artifacts. Both of these are located inside theresource folder. If there are composite forms that hold thedimension in question as a shared dimension, both will need tobe impacted. Scripts will be included to update both of theseareas.

Page 30: Adventures in Groovy – Part 20: Groovy On-Premise vs

Inside each of the web form files will be a tag for eachdimension, and it will vary in location based on whether thedimension is in the POV, page, column, or row. In thisparticular example, the CustomerSegment dimension is in thePOV section. What we want to accomplish is removing the<dimension/> tag where the name attribute is equal toCustomerSegment.

For the composite forms, the XML tag is slightly different,although the concept is the same. The tag in composite formXML files is <sharedDimension/> and the attribute isdimension, rather than name.

Page 31: Adventures in Groovy – Part 20: Groovy On-Premise vs

Step 2 – Breaking Down the PowerShellThe first piece of the script is just setting some environmentvariables so the script can be changed quickly so that it canbe used wherever and whenever it is needed. The firstvariable is the path of the Data Forms folder to be executedon. The second is the dimension to be removed.[crayon-621e80a86fedc907394584/]The next piece of the script is recursing through the folderand storing the files in an array. There is a where statementto exclude directories so the code only executes on files.[crayon-621e80a86fee2840770258/]

Step 3 – Removing The Unwanted DimensionThe last section of the script does most of the work. Thiswill loop through each file in the $files array and

Opens the file1.Loops through all tags and deletes any <dimension/> tag2.with a name attribute with a value equal to the $dimNamevariableSaves the file3.

[crayon-621e80a86fee4028762067/]

$xml = Get-Content $_.FullName$node = $xml.SelectNodes(“//dimension”) |Where-Object {$_.name -eq $dimName} | ForEach-Object {# Remove each node from its parent[void][/void]$_.ParentNode.RemoveChild($_)}$xml.save($_.FullName)Write-Host “($_.FullName) updated.”}

Executing The Logic On Composite FormsThe above concepts are exactly the same to apply the same

Page 32: Adventures in Groovy – Part 20: Groovy On-Premise vs

logic on composite forms files in the LCM. If this iscompared to the script applied to the web forms files, thereare three differences.

The node, or XML tag, that needs to be removed is called1.sharedDimension, not dimension. (highlighted in red)The attribute is not name in this instance, but is2.called dimension. (highlighted in red)We have added a counter to identify whether the file has3.the dimension to be removed and only saves the file ifit was altered. (highlighted in green)

The Script[crayon-621e80a86fee6558291454/]

$xml = Get-Content $_.FullName$node = $xml.SelectNodes(“//sharedDimension“) | Where-Object{$_.dimension -eq $dimName} | ForEach-Object {#Increase the counter for each file that matches the criteria $fileCount++# Remove each node from its parent[void][/void]$_.ParentNode.RemoveChild($_)}# If the dimension was found in the file, save the updatedcontents. if($fileCount -ge 1) {$xml.save($_.FullName)Write-Host “$_.FullName updated.” }}

SummaryThe first script may need to be run on multiple plan types,but the results is an identical folder structure with alteredfiles that have the identified dimension removed. This can bezipped and uploaded to Shared Services and used to migrate the

Page 33: Adventures in Groovy – Part 20: Groovy On-Premise vs

forms to the application that has the dimension removed.

The scripts above can be copied and pasted into PowerShell, orthe code can be Downloaded.

PBCS Pro Tip: Manage MultipleTest Accounts with One GmailAddressWorking with Jake Turrell always benefits me in many ways. Jake found a fantastic way to minimize the effort it takes tocreate test accounts for testing and training Planning users. You no longer have to create new multiple accounts.

“During the testing phase of most Planning implementations,developers need to create test user accounts. I typicallycreate at least one test user for each security group so Ican verify that the correct access has been assigned. Withan on-premises Hyperion Planning implementation, this is easy– simply create user ID’s in the Shared Services nativedirectory. With PBCS, creating bulk test ID’s can bedifficult, as each user ID requires a unique e-mail address. If you need 50 test users, should you create 50fake/temporary e-mail accounts? Luckily the answer is no.”

Check out how here.

About JakeJake Turrell is a Hyperion Architect and Oracle Ace Associatewith over 20 years of experience implementing EnterprisePerformance Management solutions. Jake’s technology career

Page 34: Adventures in Groovy – Part 20: Groovy On-Premise vs

began in the early 90’s as a Financial Systems intern at Dellin Austin, Texas, administering IMRS Micro Control (the DOS-based predecessor to Hyperion Enterprise). After working atDell, Jake joined Ernst & Young’s Management Consultingpractice where he worked with a variety of technologies. Helater returned to the Hyperion world and joined a boutiqueHyperion consulting firm in Dallas, Texas.Jake has spent the last 17 years implementing HyperionPlanning and Essbase solutions for a variety of clients acrossmultiple industries. Certified in both Hyperion Planning andEssbase, Jake holds a BBA from the University of Texas atAustin.

PBCS Release 16.06 OverviewPBCS is about to release a major upgrade (1 of 2 every yearscheduled). Oracle released a 29 page document laying outeverything that should be expected. Want the abbreviatedversion?

Want your users to see the simplified user interface?You will be able to make it the default.Welcome to EPBCS. This enhanced version will includemodules for Financials, Workforce, Projects, andCapital.Users can now create dashboards that include editableforms and ad hoc grids, and include new chart types.Forms, task lists, and reports can be viewed in eitherlist view or hierarchical view.You can now use an attribute dimension as a dimension,as a filter in forms and reports, and within ad hoc

Page 35: Adventures in Groovy – Part 20: Groovy On-Premise vs

grids. Using attribute dimensions enables administratorsand end users to perform tasks such as:

Filtering data using attribute members, such as by1.products with a certain colorPerforming cross-dimensional rollups across2.attribute membersReporting and analysis with attribute dimension3.members using Smart View, or financial reportsUsing attribute dimensions in dynamic user4.variables Attribute dimensions are optional andare listed separately on the Layout tab of theForm Designer. Drag the Attribute dimension to aPoint of View or to a row or column to add it tothe form grid.

Administrators can create aliases for artifacts similarto alias tables where things like forms can be viewed innative languages.For new applications, administrators can optionallychoose a simplified multicurrency option duringapplication creation. Using simplified currency avoidsthe use of the Hsp_Rates dimension and adds a Currencydimension with exchange rates stored in the AccountdimensionYou can now create smart lists based on dimensionhierarchies. This dynamically updates smart list valuesbased on member updates.Form grid display can be tied to the start and endperiod for the respective scenarios on displayA new action menu in the console allows customers toclear specific areas within both input and reportingcubesUsers can now drill on shared members to get to thechildren of the base member.Form designers can now prevent the form saveconfirmation message from being displayed to users byspecifying an option in form design.The usability and readability of forms is increased with

Page 36: Adventures in Groovy – Part 20: Groovy On-Premise vs

duplicate aliases. Aliases can now contain the same namewithin an alias table and across alias tables.Import Metadata functionality is extended to MicrosoftWord.You can now quickly add attribute dimensions to an adhoc grid at any time during the ad hoc session.In the Planning Admin Extension, you can now work withattribute dimensions and the Time Period dimension. Justas with regular dimensions, you can use the PlanningAdmin Extension in the Smart View application to quicklyimport and edit attribute and time dimension applicationmetadata.System Templates are now displayed under New Objects.You can now add a warning or an error to a step usingvalidation conditions. Errors prevent the next step.Warnings allow the next step after you click OK on thewarning message. You can use a design- time prompt orfunction on the validation condition. This allows you touse functions on design-time prompts without having tocreate non-promptable design-time prompts.When you are debugging business rules, a ConditionBuilder is now available to help you build conditions.You can use the Member Selector dialog box to create MDXsyntax and validation before running a partial clear.The following new design-time prompt types areavailable:

Percent1.Integer2.StringAsNumber3.DateAsNumber4.Smart List5.UDA6.

New Design-Time Prompt Functions@AVAILDIMCOUNT – Returns the number of availabledimensions.

Page 37: Adventures in Groovy – Part 20: Groovy On-Premise vs

@DEPENDENCY – “Inclusive” returns member(s) from Input 1for which Input 2 has member(s) specified from the samedimensions. “Exclusive” returns members from Input 1 forwhich Input 2 has no specified members in the samedimensions.@DIMATTRIBUTE – Returns the attribute name if thespecified attribute is associated with a dimension.@DIMNAME – Returns the name of a dimension if it isvalid for the database.@DIMUDA – Returns the UDA name if the specified UDA isvalid for the dimension.@EVALUATE – Returns the result of an expression.@FINDFIRST – Finds the first substring of a string thatmatches the given regular expression.@FINDLAST – Finds the last substring of a string thatmatches the given regular expression.@GETDATA – Returns the value of the slice.@INTEGER – Returns an integer.@ISDATAMISSING – Returns true if the value of the sliceis missing.@ISANDBOXED – Determines if the current application issandboxed.@ISVARIABLE – Determines if the argument is a variable.@MATCHES – Returns “true” if the first substring of astring matches the given regular expression.@MEMBERGENERATION – Returns the generation number of amember.@MEMBERLEVEL – Returns the level number of a member.@MSGFORMAT – Takes a set of objects, formats them, andthen inserts the formatted strings into the pattern atthe appropriate places.@OPENDIMCOUNT – Returns the number of dimensions forwhich a member was not specified.@VALUEDIMCOUNT – Returns the number of dimensions forwhich a member was specified.@TOMDX – Returns an MDX expression.

Page 38: Adventures in Groovy – Part 20: Groovy On-Premise vs

New Design Time Prompt TypesPercent1.Integer2.StringAsNumber3.DateAsNumber4.Smart List5.UDA6.

New Custom Defined Functions@CalcMgrBitAnd – Performs a bitwise AND operation, whichcompares each bit of the first operand to thecorresponding bit of the second operand. If both bitsare 1, the corresponding result bit is set to 1;otherwise, the corresponding result bit is set to 0.@CalcMgrBitOR – Performs a bitwise OR operation, whichcompares each bit of the first operand to thecorresponding bit of the second operand. If either bitis 1, the corresponding result bit is set to 1;otherwise, the corresponding result bit is set to 0.@CalcMgrBitExOR – Performs an exclusive bitwise ORoperation, which compares each bit of the first operandto the corresponding bit of the second operand. Ifeither bit is 1, the corresponding result bit is set to1; otherwise, the corresponding result bit is set to 0.@CalcMgrBitExBoolOR – Performs an exclusive booleanbitwise OR operation.@CalcMgrBitCompliment – Performs a unary bitwisecomplement, which reverses each bit.@CalcMgrBitShiftLeft – Performs a signed left shift.@CalcMgrBitShiftRight – Performs a signed right shift.@CalcMgrBitUnsignedShiftRight – Performs an unsignedright shift.@CalcMgrCounterClearAll – Removes all keys and valuesfrom the counter@CalcMgrCounterClearKey – Removes the value from the

Page 39: Adventures in Groovy – Part 20: Groovy On-Premise vs

counter associated with the key@CalcMgrCounterDecrement – Decrements the value in thecounter based on the key. If the key is not found, avalue of zero is set for the key@CalcMgrCounterDecrementKey – Decrements the value inthe counter based on the key. If the key is not found, avalue of zero is set for the key@CalcMgrCounterGetKeyNumber – Returns the text found inthe counter based on the key. If the key is not found,missing value is returned.@CalcMgrCounterGetKeyText – Returns the text found inthe counter based on the key. If the key is not found,missing value is returned.@CalcMgrCounterGetNumber – Returns the number from thecounter specified by the key. If the key is not found orthe value is not a number, missing value is returned.@CalcMgrCounterGetText – Returns the text found in thecounter based on the key. If the key is not found,missing value is returned.@CalcMgrCounterIncrement – Increment the value in thecounter specified by the key@CalcMgrCounterIncrementKey – Increments the value inthe counter based on the key. If the key is not found, avalue of zero is set for the key.@CalcMgrExcelToDate – Converts an Excel date to YYYYMMDDformat.@CalcMgrExcelToDateTime – Converts an Excel date toYYYYMMDDHHMMSS format.@CalcMgrGetStringFormattedDateTime – Converts the datedefined by format to date in the YYYYMMddHHmmss format.@CalcMgrDateToExcel – Converts a date in YYYYMMDD formatto an Excel date@CalcMgrDateTimeToExcel – Converts a date inYYYYMMDDHHMMSS format to an Excel date@CalcMgrRollDay – Roll the day up or down to the datewhich is in the YYYYMMDD format@CalcMgrRollDate – Adds or subtracts (up or down) a

Page 40: Adventures in Groovy – Part 20: Groovy On-Premise vs

single unit of time on the given date field withoutchanging larger fields.Possible values of date_part are: day, month, week andyear.@CalcMgrRollMonth – Roll the month up or down to thedate which is in the YYYYMMDD format.@CalcMgrRollYear – Roll the year up or down to the datewhich is in the YYYYMMDD format.@CalcMgrExcelACCRINT – Returns the accrued interest fora security that pays periodic interest@CalcMgrExcelACCRINTM – Returns the accrued interest fora security that pays interest at maturity@CalcMgrExcelAMORDEGRC – Returns the depreciation foreach accounting period by using a depreciationcoefficient@CalcMgrExcelAMORLINC – Returns the depreciation foreach accounting period@CalcMgrExcelCOUPDAYBS – Returns the number of days fromthe beginning of the coupon period to the settlementdate@CalcMgrExcelCOUPDAYS – Returns the number of daysin the coupon period that contains the settlement date@CalcMgrExcelCOUPDAYSNC – Returns the number of daysfrom the settlement date to the next coupon date@CalcMgrExcelCOUPNCD – Returns a number that representsthe next coupon date after the settlement date@CalcMgrExcelCOUPNUM – Returns the number of couponspayable between the settlement date and maturity date,rounded up to the nearest whole coupon@CalcMgrExcelCOUPPCD – Returns a number that representsthe previous coupon date before the settlement date@CalcMgrExcelCUMIPMT – Returns the cumulative interestpaid on a loan between start_period andend_period@CalcMgrExcelCUMPRINC – Returns thecumulative principal paid on a loan between the startperiod and the end period@CalcMgrExcelDB – Returns the depreciation of an assetfor a specified period using the fixed-declining balance

Page 41: Adventures in Groovy – Part 20: Groovy On-Premise vs

method@CalcMgrExcelDDB – Returns the depreciation of an assetfor a specified period using the double- decliningbalance method or some other method you specify@CalcMgrExcelDISC – Returns the discount rate for asecurity@CalcMgrExcelDOLLARDE – Converts a dollar priceexpressed as an integer part and a fraction part, suchas 1.02, into a dollar price expressed as a decimalnumber. Fractional dollar numbers are sometimes used forsecurity prices.@CalcMgrExcelDOLLARFR – Converts a dollar price,expressed as a decimal number, into a dollar price,expressed as a fraction@CalcMgrExcelDURATION – Returnsthe annual duration of a security with periodic interestpayments@CalcMgrExcelEFFECT – Returns the effective annualinterest rate@CalcMgrExcelFV – Returns the future value of aninvestment@CalcMgrExcelFVSCHEDULE – Returns the future value of aninitial principal after applying a series of compoundinterest rates@CalcMgrExcelINTRATE – Returns the interest rate for afully invested security @CalcMgrExcelIPMT – Returns theinterest payment for a given period for an investmentbased on periodic, constant payments and a constantinterest rate@CalcMgrExcelIRR – Returns the internal rate of returnfor a series of cash flows@CalcMgrExcelISPMT – Calculates the interest paid duringa specific period of an investment@CalcMgrExcelMDURATION – Returns the Macauley modifiedduration for a security with an assumed par value of$100@CalcMgrExcelMIRR – Returns the internal rate of returnwhere positive and negative cash flows are financed at

Page 42: Adventures in Groovy – Part 20: Groovy On-Premise vs

different rates@CalcMgrExcelNOMINAL – Returns the annual nominalinterest rate@CalcMgrExcelNPER – Returns the number of periods for aninvestment@CalcMgrExcelNPV – Returns the net present value of aninvestment based on a series of periodic cash flows anda discount rate@CalcMgrExcelPMT – Returns the periodic payment for anannuity@CalcMgrExcelPPMT – Returns the payment on the principalfor a given period for an investment based on periodic,constant payments and a constant interest rate@CalcMgrExcelPRICE – Returns the price per $100 facevalue of a security that pays periodic interest@CalcMgrExcelPRICEDISC – Returns the price per $100 facevalue of a discounted security@CalcMgrExcelPRICEMAT – Returns the price per $100 facevalue of a security that pays interest at maturity@CalcMgrExcelPV – Returns the present value of aninvestment@CalcMgrExcelRATE – Returns the interest rateper period of an annuity@CalcMgrExcelRECEIVED – Returns the amount received atmaturity for a fully invested security@CalcMgrExcelSLN – Returns the straight-linedepreciation of an asset for one period@CalcMgrExcelSYD – Returns the sum-of-years’ digitsdepreciation of an asset for a specified period@CalcMgrExcelTBILLEQ – Returns the bond-equivalent yieldfor a Treasury bill@CalcMgrExcelTBILLPRICE – Returns the price per $100face value for a Treasury bill@CalcMgrExcelTBILLYIELD – Returns the yield for aTreasury bill@CalcMgrExcelXIRR – Returns the internal rate of returnfor a schedule of cash flows that is not necessarilyperiodic

Page 43: Adventures in Groovy – Part 20: Groovy On-Premise vs

@CalcMgrExcelXNPV – Returns the net present value for aschedule of cash flows that is not necessarily periodic@CalcMgrExcelYIELD – Returns the yield on a securitythat pays periodic interest@CalcMgrExcelYIELDDISC – Returns the annual yield for adiscounted security; for example, a Treasury bill@CalcMgrExcelYIELDMAT – Returns the annual yield of asecurity that pays interest at maturity@CalcMgrExcelCEILING – Rounds a number up (away fromzero) to the nearest integer or to the nearest multipleof significance@CalcMgrExcelCOMBIN – Returns the number of combinationsfor a given number of objects@CalcMgrExcelEVEN – Rounds a number up to the nearesteven integer@CalcMgrExcelFACT – Returns the factorial of a number@CalcMgrExcelFACTDOUBLE – Returns the double factorialof a number@CalcMgrExcelFLOOR – Rounds a number down, toward zero@CalcMgrExcelGCD – Returns the greatest common divisor@CalcMgrExcelLCM – Returns the least common multiple@CalcMgrExcelMROUND – Rounds a number to a specifiednumber of digits@CalcMgrExcelMULTINOMIAL – Returns the multi-nominal ofa set of numbers@CalcMgrExcelODD – Rounds a number up to the nearest oddinteger@CalcMgrExcelPOWER – Returns the result of a numberraised to a power@CalcMgrExcelPRODUCT – Multiplies its arguments@CalcMgrExcelROUNDDOWN – Rounds a number down, towardszero@CalcMgrExcelROUNDUP – Rounds a number up, away fromzero@CalcMgrExcelSQRT – Returns a positive square root@CalcMgrExcelSQRTPI – Returns the square root of (number* pi)

Page 44: Adventures in Groovy – Part 20: Groovy On-Premise vs

@CalcMgrExcelSUMSQ – Returns the sum of the squares ofthe arguments@CalcMgrExcelSUMPRODUCT – Returns the sum of theproducts of corresponding array components@CalcMgrExcelAVEDEV – Returns the average of theabsolute deviations of data points from their mean@CalcMgrExcelDEVSQ – Returns the sum of squares ofdeviations@CalcMgrExcelLARGE – Returns the nth highest number@CalcMgrExcelMEDIAN – Returns the median of the givennumbers@CalcMgrExcelSMALL – Returns the nth smallest number@CalcMgrExcelSTDEV- Estimates standard deviation basedon a sample@CalcMgrExcelVAR – Estimates variance based on a sample@CalcMgrExcelVARP – Estimates variance based on theentire population@CalcMgrFindFirst – Find the first substring of thisstring that matches the given regular expression.@CalcMgrFindLast – Find the last substring of thisstring that matches the given regular expression.@CalcMgrMatches – Returns true, if the first substringof this string that matches the given regularexpression. For regular expression, see”java.util.regex.Pattern” in the Java docs.@CalcMgrMessageFormat – Creates a string with the givenpattern and uses it to format the given arguments.@CalcMgrStartsWith – Tests if this string starts withthe specified prefix.

SecurityWhile the overall access rights granted to a user arecontrolled by the assigned identity domain role, ServiceAdministrators can use the Access Control feature fromthe Console to assign additional application-levelaccess by provisioning users and Native Directory groups

Page 45: Adventures in Groovy – Part 20: Groovy On-Premise vs

with application-specific roles. For instance, a Plannerin the service can now be assigned the ApprovalsAdministrator role to enable the user to performapprovals-related activities.

Map Smart List to DimensionAs you all notice PBCS does not yet offer the possibility tocreate attribute dimensions. One of the solutions to getaround this is to choose to map a smart list to a dimension inthe map reporting module. Follow the steps below to configureyour mapping.

Let’s assume that you already have 2 plan types, one BSO andone ASO. In the example below, my plan type names are Financefor the BSO and rFinance for the ASO. In the project where Iimplemented this solution, I only needed 2 differentattributes (Department and Service type) and I didn’t need anycustomized dimensions.

First you need to create the ASO dimensions representingthe desired attributes. In my example I have two

Page 46: Adventures in Groovy – Part 20: Groovy On-Premise vs

different attributes: Department and Service Type. Oneach of these dimensions create the members representingthe value of your attribute. Please note that themembers’ name must match the value of the smart listconsequently, they need to follow the naming conventionof the smart list (no spaces or special characters). Youwill also notice that for each of the dimensions I havecreated a default member (No_***), I will explain why Idid this a bit later on in the post.

On the second step we will create the smart list. To dothat click on Administration -> Manage -> Smart lists.Then create the new smart lists by clicking on add.

For now just create thesmart lists, we will add value in other steps.

Now, we will create the BSO members linked to the smart

Page 47: Adventures in Groovy – Part 20: Groovy On-Premise vs

list. Go to your BSO outline and on the accountdimension create 4 members’ names, Department Property,Department Property Input, Service Type Property andService Type Property Input. Link these members to the

correct smart list.

Once this step in finished go to refresh the app byclicking on Administration -> Application -> Refresh

Database.

Now that all members and smart lists are created, let’screate the map reporting application. To do that clickon Administration -> Map Reporting Application thenclick on add.

On the first tab choose your source(Finance) and reporting (rFinance) application, anddon’t forget to add a name to the map reporting.On the second tab for the department and service typerow choose the Smart List to Dimension mapping type, andthen choose the appropriate smart list. On the member

Page 48: Adventures in Groovy – Part 20: Groovy On-Premise vs

section choose Department Property and Service TypeProperty members and click on save.

Now you should see on the screen the application mappingthat you have just created. Select it and refresh it byclicking on refresh

Now we will go back to the smart lists that we createdin the second step. Since we have linked these smartlists to a dimension, we can now update themautomatically. This can help you save a lot of time ifyou have smart lists with 50 members or more.To do this, go on the smart list screen (see step 2).Once you are there, select the smart list and click onsynchronize.

Once this is done, the message below should appear.

In order to make the smart list to dimension work, weneed to assign an attribute value to every intersectionfor which we have data. For easy maintenance and toavoid business rules that are running for too long, wewill do this by attaching a formula to a member(Department Property and Service Type Property). Go to

Page 49: Adventures in Groovy – Part 20: Groovy On-Premise vs

your outline and edit these members by making themdynamic and by adding the formula that you see in thescreen shot below (this formula might need to be updateddepending on the name and number of dimensions that youhave in your application). You will see in the formulathat I’m defaulting the value of the attribute toNo_Department, this is because you can’t leave anyintersection #missing it will lead the map reporting toan error.

The final step is to create the form where the user canset up the attribute of their choice for every entity.Go to the form panel to create your form, in the POVsection put the member that you put in the aboveformula. In the row put the level 0 entity and in thecolumn put the member Department Property Input andService Type Property Input.

You can now push your data using the previous mapreporting application.

Page 50: Adventures in Groovy – Part 20: Groovy On-Premise vs

Pro: This solution is very easy to maintain for the admin, andif needed you can also let a user play with the attributes.Con: If you have too many attributes, this can make the sizeof the application get too big and consequently slower.