Running Multiple Instances of EPM Automate

You can run multiple instances of EPM Automate against one environment from the same directory. Similarly, you can run multiple instances of EPM Automate against different environments from the same or different directories.

For example, you may need to simultaneously refresh the Planning application cube in https://cloudpln.pbcs.us1.oraclecloud.com and https://testcloudpln.pbcs.us1.oraclecloud.com. In this scenario, you have two options:

  • Run two instances of EPM Automate from the same directory to refresh application cubes in different environments

  • Execute EPM Automate from separate directories to connect to the environments and then refresh application cubes

In both scenarios, each instance of EPM Automate works independently; logging out of one instance does not log you out of other instances. Activities initiated using EPM Automate continues to run to completion in the environment even if you sign out from the other instance.

This section contains Windows and Unix/Linux sample scripts (caller and multisession) that may be used to create two EPM Automate sessions to perform tasks. You must add the following connection information in caller.bat or caller.sh. The caller script runs the commands (login, uploadfile, listfiles, and logout) included in the multisession script. You can modify this file to perform tasks other than uploading files to the environment and listing files. Make sure that both these scripts are stored in the same directory.

  • USERNAME: Login ID of a Service Administrator

  • PASSWORD: Password of the Service Administrator

  • URL: Connection URL of the environment

  • IDENTITYDOMAIN: identity domain of the environment

Sample Windows Scripts

caller.BAT

@echo off
setlocal EnableExtensions EnableDelayedExpansion

REM syntax: start /B multisession.bat SID "USERNAME" "PASSWORD" "URL" "IDENTITYDOMAIN" "SNAPSHOTPATH"
start /B multisession.bat !RANDOM! "USERNAME" "PASSWORD" "URL" "IDENTITYDOMAIN" "C:\Snapshot1.zip"
start /B multisession.bat !RANDOM! "USERNAME" "PASSWORD" "URL" "IDENTITYDOMAIN" "C:\Snapshot2.zip"

endlocal

multisession.BAT

@echo off

set EPM_SID=%1
set USERNAME=%2
set PASSWORD=%3
set URL=%4
set IDENTITYDOMAIN=%5
set SNAPSHOTNAME=%6

echo User: %USERNAME% > %EPM_SID%.log
echo Cloud Instance: %URL% >> %EPM_SID%.log

call epmautomate login %USERNAME% %PASSWORD% %URL% %IDENTITYDOMAIN% >> %EPM_SID%.log
call epmautomate uploadfile %SNAPSHOTNAME% >> %EPM_SID%.log
call epmautomate listfiles >> %EPM_SID%.log
call epmautomate logout

Sample Bourne Shell Script

caller.sh
#!/bin/sh

set +x
SCRIPT_DIR=`dirname "${0}"`

# syntax: /home/user/multisession.sh "USERNAME" "PASSWORD" "URL" "IDENTITYDOMAIN" "SNAPSHOTPATH" &
$SCRIPT_DIR/multisession.sh "USERNAME" "PASSWORD" "URL" "IDENTITYDOMAIN" "/home/user/Snapshot1.zip" &
$SCRIPT_DIR/multisession.sh "USERNAME" "PASSWORD" "URL" "IDENTITYDOMAIN" "/home/user/Snapshot2.zip" &
multisession.sh
#!/bin/sh

set +x

EPM_AUTOMATE_HOME=/home/user/epmautomate

export JAVA_HOME=/home/user/jre
export EPM_SID=$$

USERNAME=$1
PASSWORD=$2
URL=$3
IDENTITYDOMAIN=$4
SNAPSHOTNAME=$5

echo User: $USERNAME > $EPM_SID.log
echo Cloud Instance: $URL >> $EPM_SID.log

$EPM_AUTOMATE_HOME/bin/epmautomate.sh login $USERNAME $PASSWORD $URL $IDENTITYDOMAIN >> $EPM_SID.log
$EPM_AUTOMATE_HOME/bin/epmautomate.sh uploadfile $SNAPSHOTNAME >> $EPM_SID.log
$EPM_AUTOMATE_HOME/bin/epmautomate.sh listfiles >> $EPM_SID.log
$EPM_AUTOMATE_HOME/bin/epmautomate.sh logout