📋 Cell API & operation.grid
Chapter II · EPM Cloud API · Lesson 1 of 7
Every Groovy form script is handed one object at runtime: operation.grid. It is the in-memory snapshot of the form's cell data — your read/write interface to everything the planner entered. Understanding every property on a Cell object and every way to navigate the grid is the foundation of professional EPM scripting.
operation.grid — Complete API
Cell Object — Every Property
| Property | R/W | Type | Key Behaviour |
|---|---|---|---|
cell.data | R/W | Number|String|null | The new user-entered value. Write here to transform before commit. null = #Missing — never assign 0 when you mean missing. |
cell.edited | R | Boolean | True ONLY if user explicitly changed this cell in the current save. Without this guard, ALL cells refire your logic on every save. |
cell.readOnly | R | Boolean | Writing .data on a readOnly cell silently fails — no error, no exception. Always guard. |
cell.priorValue | R | Number|null | Last committed Essbase value. null if previously #Missing. Use for delta = (cell.data ?: 0) − (cell.priorValue ?: 0). |
cell.noData | R | Boolean | True if current value is #Missing. Never assume null == 0 — missing and zero are semantically different. |
cell.essbaseType | R | String | Values: 'NUMERIC', 'TEXT', 'SMART_LIST'. Guard text cells before any math — ClassCastException on .data as Number. |
cell.memberNames | R | List<String> | Full intersection in POV→row→col dimension order. Use to dynamically build getCellByIntersection POVs. |
cell.row / cell.col | R | int | Zero-based position. Navigate to adjacent cells: grid.getCellAt(cell.row + 1, cell.col). |
Production Audit Trail — cell.priorValue Pattern
🏗 DataGridBuilder — Full API
Chapter II · EPM Cloud API · Lesson 2 of 7
DataGridBuilder is the most important API for production-scale Groovy scripting in EPM Cloud. It is the difference between a rule that takes 2 seconds and one that times out at 30 minutes. One .build() call retrieves everything. One .save() commits everything. Everything in between is pure Groovy in memory.
DataGridBuilder — Complete Method Reference
operation — binds to current Essbase connection..getCellAt(memberName) and .getCellByIntersection(list).Dense vs Sparse Placement — The Why
Vision Scenario — Step 2: DataGridBuilder Integration
🗂 Member & Metadata API
Chapter II · EPM Cloud API · Lesson 3 of 7
Production Groovy rules never hardcode member lists. When Vision Corporation adds a new entity or account, rules that hardcode names silently exclude it. Dynamic metadata queries via the Member API make rules self-maintaining — a new entity tagged with the right UDA is automatically included in every allocation and validation on the next run.
Member API — Complete Reference
Vision Scenario — Step 3: Seasonality with Dynamic Members
🎛 RTPs — Multi-Select, Chains & Control Flow
Chapter II · EPM Cloud API · Lesson 4 of 7
Runtime Prompts are the user's input into a Groovy rule at execution time. Multi-select RTPs arrive as a comma-delimited string with edge cases that bite every developer eventually: trailing commas, blank tokens, null for skipped optional prompts. And chaining rules with executeRule() carries a case-sensitivity trap that has caused many a failed budget cycle overnight batch.
Multi-Select RTP — Complete Safe Parse
executeRule — Chaining Rules
operation.cancelled — The Correct Pattern
⚡ Performance — The 9 Levers
Chapter II · EPM Cloud API · Lesson 5 of 7
A Groovy rule that was 3 minutes in UAT is 45 minutes in production. The data volume is 10x. The analysis: 96 individual setCell() calls in a nested loop. Fix: one DataGridBuilder + one save = 2 seconds. The 9 performance levers are ranked by impact — check them in order before optimising anything.
The 9 Performance Levers — Ranked
Vision Scenario — Step 4: Allocation with all 9 Levers Applied
🌐 Cross-Cube & REST API Patterns
Chapter II · EPM Cloud API · Lesson 6 of 7
Vision Corporation's Planning cube calculates the budget. Its Reporting cube drives the CFO dashboard. When a planner saves a form in Planning, the Reporting cube must immediately reflect the change. Cross-cube writes via getRestApiClient() and external REST calls via HttpURLConnection are the integration bridges that make EPM Cloud talk to the world.
getRestApiClient() — Scope & Decision Tree
| Scenario | Use This | Why |
|---|---|---|
| Write to another cube in same EPM environment | getRestApiClient().postDataSlice() | Zero credential setup — session token injected automatically |
| Read data from another cube | getRestApiClient().get() | Same session token applies |
| Write to a different EPM environment | Manual HttpURLConnection + SubVar credentials | getRestApiClient() only targets current environment |
| Call external API (Salesforce, SAP, etc.) | Manual HttpURLConnection + SubVar credentials | Not in EPM ecosystem — needs own auth |
| Post-write aggregation needed | operation.executeRule() after write | Synchronous, guaranteed order |
👑 Peak: The Complete Vision Production Suite
Chapter II · EPM Cloud API · Lesson 7 of 7 · Mastery Complete!
Every technique from both chapters — null safety, error wrapper, DataGridBuilder, UDA-based member selection, seasonality, allocation, cross-cube write, profiling — assembled into a single, production-grade Vision Corporation Groovy rule suite. This is what a senior EPM Groovy practitioner delivers.
All 24 Interview Toolkit patterns demonstrated. All 9 Performance Levers applied. Vision Corporation $2.8B, 8 operating entities, 6 currencies.
Interview Toolkit — Complete Coverage Map
| Q# | Topic | Where Demonstrated |
|---|---|---|
| Q1, Q2, Q3 | Architecture & hooks | Ch I Lesson 1 + cancellationMessage in skeleton |
| Q4 | Timeout strategies | DataGridBuilder + lap() profiler (Performance Lever #1) |
| Q5, Q6 | cell.data, cell.edited | Ch II Lesson 1 guard chain + audit trail |
| Q7, Q8 | getCellByIntersection null / audit trail | Ch II Lesson 1 |
| Q9, Q10, Q11, Q12 | RTPs — cast, multi-select, closure return, executeRule | Ch I Lessons 2–3 + Ch II Lesson 4 |
| Q13, Q14 | DataGridBuilder / dense columns | Ch II Lesson 2 + Steps 2–5 |
| Q15, Q16 | getRestApiClient / cross-cube | Ch II Lesson 6 + Step 5 |
| Q17, Q18, Q19, Q20 | Performance — single change, member cache, calc script, profiling | Ch II Lesson 5 + lap() in Step 4–5 |
| Q21, Q22, Q23, Q24 | Logging, AssertionError, partial write, error wrapper | Ch I Lesson 5–6 + Step 5 try-catch-finally |