Have you ever had the need to run a batch process to update EPM applications but can’t get access to the server?  Now you can set up a process to call a batch file to run from the EPM Workspace.  This post walks through a simple example.

Create a batch file that calls another batch file.

Import this batch file into the EPM Workspace by clicking on Navigate→Administer→Reporting and Analysis→Generic Job Applications

Oracle EPM Workspace Generic Job Applications

(click to enlarge)

After the Generic Job application window is open go to Actions→New to create a new generic job.

Enter a Product Name, product host (the server name), command template values ($PROGRAM $PARAMS), and executable (%WINDIR%\System32\cmd.exe)

Oracle EPM Workspace command template values

(click to enlarge)

Not that the generic job is set up the batch file needs to be added.  From the EPM Workspace click on “Explore” to open the workspace file system.  Open or create a folder that will contain the job that will run.  From here import the batch file into the EPM workspace (Import→File As Job).

Browse and select the batch file that will be called from the EPM Workspace and check “Import as Generic Job”.  Click “Next”.

Oracle EPM Workspace - import as generic job

(click to enlarge)

Select the “Run_Batch” job factory that was created in the prior steps.  Click “Next”

Click “Next”

Click “Next”

Oracle EPM Workspace - Run Batch step 3

(click to enlarge)

(Note:  The parameters page is where things can get really exciting.  From here uses can crate prompts and send values to the batch files that are being called.  This is not being covered in this example however it is very useful.)

Click “Next”

Oracle EPM Workspace parameters page

(click to enlarge)

Assign access to the job.  This is just like assigning access to Hyperion Financial Reporting documents.  Keep in mind the user/group must have access to the job.  Click “Finish”

Now the batch file can be run from the EPM Workspace.  Keep in mind the batch file will run on the foundation server.  If the batch process needs to be run on a different server for example the essbase server the batch file being called will need to call a program like PSEXEC to run the file on a remote server.

For this example we will read a file and return the contents to the workspace.

The batch file that was imported into the EMP Workspace could actually be the batch file that is being called by the batch file imported.  The reason for using a batch file to call a batch file is this allows us to change the logic of the batch file without having to reimport the file into the EPM Workspace.

The imported batch file is calling RunExternalBatchFile.bat.  This file looks like this.

Oracle EPM Workspace - RunExternalBatchFile.bat

(click to enlarge)

With that said this batch file can contain anything.  It can even call a series of batch files.  When using parameters with your batch file process this becomes a powerful architecture that can run various processes.  Now let’s see how this works.

To test and then compare the file will first be run in a standard command window.  The results look like this:

Oracle EPM Workspace - standard command window

(click to enlarge)

From the EPM Workspace – Explore open the job and click “Run”

(Click Run in the lower right corner of the page.)

The results will look like this:

There is even record of the job output that can be archived or deleted.

Here is an example of a job that uses parameters and can call several different batch processes.  Just so you know what can be done.

This example allows users from the Workspace the ability to load data and review any metadata errors all using the same batch file.  The example above is more complicated to build however uses the same basic principles that were covered.