Oracle Fusion Technical: Reports, Data, Integrations and Extensions · Module 13 · Groovy in Application Composer
Object functions and reuse
Lesson 132 of 177 · 2 min
An object function puts logic in ONE PLACE and lets several rules call it. The same argument as every shared definition in this course, and the same trap at the other end. THE MAINTENANCE ARGUMENT. A discount calculation used by a trigger, a validation and a formula, written three times, is three things to change and two of them will be missed. Written once, it is one change and the three call sites cannot drift. THE DEBUGGING COST WHEN IT IS NESTED TOO DEEP is the other half. Groovy in Application Composer has no step debugger — Lesson 7 — so every layer of function calling function is a layer you cannot step through. A rule that calls a function that calls two more is a rule whose behaviour you deduce rather than observe, and deducing it at eleven at night with a client waiting is the situation to design…
The full lesson is part of the course
The video, the complete written lesson and the module quiz are included in Oracle Fusion Technical: Reports, Data, Integrations and Extensions, with a certificate on completion and a fourteen-day refund window.
In this module: Module 13 · Groovy in Application Composer
- 1Where Groovy runs, and where it does not
- 2The language subset, quickly
- 3Validation rules that help rather than annoy
- 4Triggers and the order they fire in
- 5Object functions and reuse
- 6Performance: the rule that runs a million times
- 7Debugging without a debugger
- 8What breaks: three Groovy failures
- 9Lab briefing · A rule, and its performance
