Piecing Together EPMA Automation, Part I

I have spoken on a variety of subjects at various user conferences, but there is one presentation that has always been my favorite.  It is also the one that is never finished – Automating EPMA.

I partially think I like presenting on the topic because it is an evolving area of EPM.  Partially because it is still new, so there still is much to figure out.  Partially because I love seeing people’s eyes light up when they connect with what I am try to teach.

EPMA is controversial – some love it, some hate.  I see its strengths and have persevered through its shortcomings.  But I do know this…for some clients, it is necessary and, therefore, make it easier for the client to administer what the developer built.

When I first started working with EPMA about 2 1/2 years ago I wondered how to automate the EPMA actions.  Upon a Google search, I found the EPMA Batch Script Utility (fancy name, huh?).  I figured it would be similar to MaxL or other Hyperion scripting language.  I was wrong.  What I found was a basic, rudimentary language.  Nothing fancy; something to get the job done (and it does do that).

To start, here is the link to download the Batch Client’s Guide from Oracle. (To note, my posts – including Part II and III – will be focused on Essbase and Planning and will be focused in a Windows server environment.)

After an application is developed, you will probably want to validate it is correct for deployment.  Then, you will likely deploy it, right?  And there is an even better chance that you will want to repeat this process in the future – possibly at the end of every month.  So how do you do that?  Here are the steps to making your life *that* much easier.  I will be listing the steps used for created stored scripts although you can use the scripts in the command line as well.

  1. Locate the batch client.  This is *usually* on the Foundation server and is located at EPM_ORACLE_HOME\products\Foundation\BPMA\EPMABatchClient\epma-batch-client.bat .
    EPMAbat
  2. Define the BPMA and Workspace URLs as a variable.  You will need these before any script can be run so they scripts knows where to pass the commands.
    URLs
  3. The next step is to log into EPMA.  You choose to either have the password show in clear text or have a file that contains an encrypted password.  For info on encrypting the password, check out this link.  I have shown an example of using an encrypted password with the username “MaxL”.  (The “-F” in front of the path tells EPMA that the file listed is the encrypted password.)
    Login
  4. Next, you have the option to set variables, if you would like.  There are two main options:
    1. If you working with one application, it may be worthwhile to set the Application name at the start of the script to save you some typing later on.  In scripts requiring you to list an “ApplicationName”, you can avoid doing so by setting the Application name at the start of the script with the following:
      AppName
    2. You can also set general variables by using the “var” setting.  You can create your own variables with your own name and purpose.  To use an application and database names as variables, you can do the following (as an example):
      DBName
  5. This next part is the meat of the automation cow.  For anything you can do in Workspace, you can automate with the batch script.  If you get stuck on what goes in the script, look at Workspace for assistance.  Options like instance name, server, etc will show in Workspace…they are the same in the script.  Below are a few examples:
    1. Validate Application
      ValidateAPp
    2. Redeploy Application
      RedeployApp
    3. Data Synchronization
      DataSync
    4. Commenting a line
      Commenting
    5. Logging out and quitting the script
      LogoutQuit
  6. If you get stuck on what should go on the line of code for a value in the Script Guide, refer back to Workspace, as mentioned before:
    ScreenGuide
  7. The final part is calling the script in the DOS batch script using the EPMA Batch Script.  I will tend to use some options on the end to help me monitor the script and validate for typos before running the script:
    1. -LOn -> logs the commands of the script
    2. -STrue -> Stops the script execution if a command fails
    3. -VOn -> Turns on script validation before running
    4. Full script: call D:\Oracle\Middleware\EPMSystem11R1\products\Foundation\BPMA\EPMABatchClient\epma-batch-client.bat -C”D:\EssbaseScripts\Sample\DeployFromEPMA\DeploySample.epma” -R”D:\EssbaseScripts\Sample\DeployFromEPMA\DeploySample.log” -LOn -STrue -VOn

So what does the script look like when you put it all together?  Just like pieces.

WholeScript

And this wraps up part one of EPMA Automation.  There are many more options for automating various tasks in EPMA like creating members, deleting alternating hierarchies, etc.  Be sure to look in the guide for all of the various options available to you.

Tomorrow I will discuss error trapping in EPMA, MaxL and DOS (’cause they are all needed when developing EPMA based Essbase applications…).

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s