Every EPM operation you'll ever need — from data loads to metadata writes — wrapped in clean, copy-paste-ready Groovy functions. Built for practitioners, not Oracle documentation.
// "I know how to control a system.
// The trick is making the system think it controls you."
Groovy in Oracle EPM Cloud runs inside Calculation Manager as a business rule type. No installation — no IDE — no deployment pipeline beyond your browser.
// "Most people would never notice. They're too busy being told what to think."
operation Objectoperation — the root API object. It gives you operation.application, operation.grid, and println(). Start every function with this in mind.LocalConnection pointing to your own EPM URL before running integration functions.try/catch. Use println() for the job console log and throwVetoException for user-visible errors in forms.Click any function card to expand the full reference — parameters, example code, output, error handling, and release notes. Every function is production-ready and SaaS-compliant.
// "I didn't hack the EPM API. I just read the documentation nobody else bothered to read."
All 40 functions at a glance — name, category, what it does, and when to use it.
// "If you know the system's inventory, you own it."
Every snippet in this library was audited against the Oracle Cloud EPM Groovy Scripting Reference (25.11). Below is the complete record of API mismatches corrected from earlier published versions.
operation.writeLine() → println()Operation object does not expose a writeLine method in the EPM Cloud Groovy API. Console output uses standard Groovy println() which routes to the EPM Job Console. Affected: all 25 original functions.application.getEssbaseCube() → application.getCube()Application interface exposes getCube(cubeName). The getEssbaseCube() variant does not exist in any documented Oracle EPM Groovy API surface. Caused NullPointerException on first call. Affected: 12 functions.throw new EpmGroovyRtpException() → throwVetoException()EpmGroovyRtpException is not a class available for instantiation in EPM Groovy. Oracle's Groovy API surfaces user-visible form errors through the throwVetoException(message) helper method — no new keyword, no class import. Affected: validateRTP, validateMemberExists, and associated documentation.resp.statusCode → resp.statusHttpResponse Groovy object exposes HTTP status as .status (Groovy property mapped from getStatus()). The .statusCode property does not exist and returns null silently, meaning HTTP 4xx/5xx errors were never detected. Affected: uploadFileToInbox, callExternalRestAPI, and awaitJob.getSubstitutionVariable() / setSubstitutionVariable() → getSubstitutionVariableValue() / setSubstitutionVariableValue()Application and Cube interfaces use the full Value suffix in the method name. The shorter form does not exist. Note: the plural getSubstitutionVariables() (returns a collection of all variables) is a separate, correct method. Affected: setSubVar, getSubVar, getAllSubVars, bulkSetSubVars.application.executeDataMap(name, [clearData:]) → application.getDataMap(name).execute(boolean)getDataMap(name), then call .execute(clearData) on it with a boolean argument, not a Map. Affected: runSmartPush..completedSuccessfully() → .isSuccessful()JobRunner (returned from executeBusinessRule()) uses isSuccessful() to check job completion. completedSuccessfully() does not exist on this object. Affected: runBusinessRule, runSmartPush.cube.getDimension() → cube.getOutline().getDimension()Cube object does not expose getDimension() directly. Dimension access goes through the outline: cube.getOutline().getDimension(name). Similarly, member lookup on Dimension uses findMember(name) not getMember(name). Affected: getMemberInfo, getDescendants, validateMemberExists.getCellValue / setCellValue / cube.commit() → operation.grid.dataCellIterator{}Cube object does not expose cell-level read/write methods. Cell data access in Planning Groovy is done through the form grid context via operation.grid.dataCellIterator() (Data Form rules only). For standalone rules, use MDX queries or REST API jobs. Affected: readDataCell, writeDataCell.getPlanningUnit() / pu.lock() / pu.unlock() → REST /planningunits/lock endpointApplication Groovy object does not expose getPlanningUnit(). Planning Unit state management is performed through the Planning REST API /planningunits/lock and /planningunits/unlock endpoints via a Named Connection. Affected: lockPlanningUnit.connection.uploadFileToServer() → REST UPLOAD_FILE job typeuploadFileToServer() method on the EPM Named Connection object. File uploads to EPM Inbox are performed via the Planning REST Jobs API with jobType UPLOAD_FILE. Affected: uploadFileToInbox.member.getAllDescendants() / addChildMember() / m.childMembers / m.getAlias() / m.UDAs → correct Oracle Member APIgetAllDescendants() → listDescendants(); m.childMembers → m.getChildren(); m.getAlias() → m.getMemberAlias(); m.setAlias() → m.setMemberAlias(); m.UDAs → m.getUDAs(). addChildMember() is replaced with REST-based IMPORT_METADATA job. Affected: getMemberInfo, getDescendants, addMetadataMember.Every function has been cross-checked against the official Oracle EPM Groovy Scripting Reference. What follows is a full disclosure of what was wrong, why it was wrong, and exactly how it was fixed.
getCube(String) only. getEssbaseCube has never existed. Silent fail — EPM throws a MissingMethodException at runtime.Value suffix. Without it: HspRuntimeException at runtime. Affects setSubVar, getSubVar, getAllSubVars, bulkSetSubVars.new. Using throw new before it is a compile-time syntax error.Three things every EPM Groovy practitioner needs in 2026: fast rules, accurate benchmarks, and a clean Validator report before the May 26.05 mandatory engine upgrade.
def, missing /*RTPS:*/ declarations, or implicit type casts will fail. Run the Script Validator now in your Test environment — you have until May.