Blog

Batch Scripts: Creating XML files for Runtime Prompts

Hyperion PlanningHyperion WorkspaceIntermediate21 July 2014

Written 12 years ago. The technique still stands, but check it against your release before relying on it.

When automating Business Rules through batch scripts, an XML file is needed to state the runtime prompts. This is how the batch script will know which members to run the business rule for. Is there an easy way to create these files?

Luckily, it is fairly simple to create these XML files and reference them from the batch script. First, to create an XML file directly from a Planning application, go to Tools -> Business Rules:

Planning Tools menu with Business Rules highlighted

Once the business rule page opens, use the 2 dropdown menus at the top of the page to narrow down the list of available business rules:

Business Rules page filters for plan type and rule type

Select the relevant business rule, and click on the launch button on the right side of the window. In this example, I want to create an XML file for the business rule, “CurrConvAdmin”:

Business rules list with Curr_Conv_Admin selected

This rule has 3 runtime prompts (Scenario, Year, & Version). Select the 3 members for the prompts and click “Create runtime prompt values file” in the bottom right of the pop-up window:

Runtime Prompts window for Curr_Conv_Admin with the Create runtime prompt values file button

The following screen will appear, confirming that the file was created successfully:

Message confirming the runtime prompts file was created successfully

Now, we need to go and find where the XML file was saved so that we can reference it in our batch file. From the Foundation server (or the server that Planning is on), go to the following path:

D:\Oracle\Middleware\user_projects oundation1\Planning\planning1\RTP

Planning server folder listing with the RTP folder

All of the XML files will be created under your username within the RTP folder:

RTP folder listing the runtime prompt XML files, with Curr_Conv_RevCOGS_Admin.xml highlighted

Right click to edit the file, and notice that all 3 runtime prompts are accounted for in the file:

Runtime prompt XML file in Notepad listing the Scenario, Year and Version prompt values

In the batch command itself, the XML file is referenced as follows:

CalcMgrCmdLineLauncher batch command referencing the runtime prompt XML file

Here is the default syntax for referencing a business rule via batch scripts:

CalcMgrCmdLineLauncher.cmd [-f:passwordFile] /A:appname /U:username /D:database [/R:business rule name | /S:business ruleset name] /F:runtime prompts file [/validate]

And here is the full documentation on the business rule syntax from Oracle: http://docs.oracle.com/cd/E1723601/epm.1112/hpadmin/frameset.htm?ch06s09s05.html

Oracle documentation table of CalcMgrCmdLineLauncher parameters

I’ve noticed that it is best to create the XML files directly from Planning, rather than trying to create them manually. When manually created, the batch command won’t always recognize the format of the XML file, even if it looks the same to what is created via Planning. It only takes a couple of extra minutes, but will save you from some headaches down the line.

Comments

Moderated. New comments appear once approved.
Held for approval before it appears. No account needed.