groovy/macro-resolves
Starts at Error. It reads Groovy files in Rules, Templates, and Scripts,
including the Calc Script a Groovy Rule builds in a string and passes to
executeCalcScript. It doesn’t check Calc Script Rules. It needs to know what the Pod holds, so it stays silent
until the Pod Folder has its Rules, Templates, or Scripts folders, usually after
the first Pull or
Import from a Snapshot.
What it checks
Section titled “What it checks”Every %Template, %Script, and %Rule call must name one of that kind that
exists in the Pod. %Script(name:="Clear_Working") only matches a Script, so a
Template with the same name doesn’t count.
- Names are matched without regard to case, the same as in Oracle. Names with spaces and dashes are fine.
%Template,%Script, and%Rulecan be written in any case, with or without a space before the bracket, so%template (name:="Agg_Entity")is checked like any other.- Calls inside comments are ignored.
- A call inside another call’s
dtps:=(…)argument is checked too. - A call with no
name:=is skipped. There is no name to check. - Each call is underlined separately.
Why it matters
Section titled “Why it matters”Deploy fills in each %Template and %Script before it sends the Rule to
Oracle, and stops with an error when it can’t find the one named. A typo in a
name you wrote weeks ago then shows up as a failed Deploy. This Lint Rule catches
it as you type.
Example
Section titled “Example”A Groovy Rule in ACMEPLAN builds a Calc Script that clears and then aggregates:
String script = """ FIX("Budget", "Working", "FY26", @RELATIVE("Total_Entity", 0)) %Script(name:="Clear_Workng") %Template(name:="Agg_Entity",plantype:="FINANCE",dtps:=()) ENDFIX"""operation.application.getPlanType("FINANCE").executeCalcScript(script)The Script name is misspelled. The name is underlined, and the message reads:
%Script(name:="Clear_Workng") does not resolve — this Pod has no Script named "Clear_Workng".Corrected, with the Script name spelled the way the Pod has it:
%Script(name:="Clear_Working") %Template(name:="Agg_Entity",plantype:="FINANCE",dtps:=())To avoid typos in the first place, let completion fill in the name. Type
%Template or %Script and pick from the list:
Adjusting it
Section titled “Adjusting it”Change its level (Error, Warning, Info) or turn it off in the Lint Rules panel, or excuse one file with a Lint Exception.
If the Template or Script was created in EPM after your last Pull, Pull again before you reach for an Exception. The finding clears once the Pod Folder has it.