In this solution we are executing Oracle EPM Automate scripts that are used to perform metadata deployments from EDMCS to both EPBCS and PCMCS. We utilize a number of OneCloud capabilities in this solution. This is an extended post intended to provide detailed insight into all of the OneCloud functionality utilized in a complete solution (both functionally and technically).
This Point-And-Run deployment strategy is the basis of this solution highlight.
Let’s start by investigating the overall architecture of this solution. A number of EPM Automate batch scripts were created that perform a series of tasks:
Login to EDMCS
Export a dimension
Download the dimension export (PCMCS)
Logout of EDMCS, login to PCMCS or EPBCS,
Upload the dimension export (PCMCS)
Import the dimension export
Restructure the application
Logout of EPBCS or PCMCS
A batch script was created for each dimension for both PCMCS and EPBCS. In this particular situation, the customer wants the choice to run a dimension refresh for one, multiple or all dimensions for a given EPM Cloud application. As we noted in the background blog, the EPM Automate batch scripts were all named very consistently. This allowed the OneCloud the solution to be very templatized.
The overall solution utilizes the concept of a “Main” process that invokes a subprocess. The subprocess in this solution is the process that invokes the EPM Automate batch job. This approach was taken to address the requirement that the process needs to run for a variable number of dimensions. To accomplish this Main-subprocess approach, we applied a Parent and Child Chain method. The Parent Chain utilizes the Run Chain Event in a loop (Iterator) to invoke the Child Chain to perform the various dimension updates in the Oracle EPM Cloud application.
We decided to utilize a OneCloud Workspace Resource to maintain the list of dimensions that will be deployed. Workspace Resources are useful, because changes become a part of the Version history that is native to OneCloud. This provides the ability to not only investigate what the value was at a particular point in time, but who made the change and when. Finally, the ability to revert a Workspace Resource to a prior version is always a valuable feature.
The Main Chain or Calling Chain has four steps.
First, the Resource is loaded using the List File Contents. This Command is not necessary, but provides a simple way to display the contents of the Workspace Resource within the Chain. The Output becomes a part of the Chain audit history specifying which dimensions were set in the Dimension List Resource.
Second, a Command that deletes a flag or trigger file. This flag is used to prevent sending duplicate notifications during the dimension processing loop. We’ll explore this further in the Subprocess Chain.
Third, transform the Resource Dimension List into a JSON object. This step is necessary to enable the Subprocess to be executed in a loop for each of the dimensions specified in the Dimension List Resource.
Finally, the Run Chain Event is configured to execute the subprocess Chain (PNR - Metadata EDM to @APPTYPE - @DIM) for each of the dimensions.
Variable Transformation is used to extract the Dimension Name from the JSON object created from the Dimension List Resource
The entire Chain is shown below.
Notification is set on this Chain to monitor the overall execution result.
The subprocess or Child Chain is the Chain called by the Main Chain. The subprocess Chain is the one that actually invokes the EPM Automate batch script. This Chain utilizes a number of OneCloud capabilities to deliver a robust integration process.
The first Command in the Chain is a Runtime Input which allows information to be passed to this subprocess Chain at the time of execution. In this instance, the Application Type (EPBCS or PCMCS) as well as the Dimension to process are established as Runtime Inputs. This is critical to allowing reusability of this Chain.
The second Command is the Script Runner which executes the EPM Automate batch script. This is the concept of the Point-and-Run strategy. We are pointing to the existing batch file and simply running it. Because the EPM Automate batch scripts were organized in directories and named consistently, the path to the script file was able to be dynamic.
The Run Script Command also creates multiple Dynamic Outputs that will be used later in the Chain. There are three Dynamic Outputs created using Regex.
Error Information - List of all errors detected in the batch command execution
blnError - Boolean flag to denote if any errors were detected
blnUpgrade - Boolean flag to denote if EPM Automate upgrade warning was detected
Following the Script Runner - Run Script Command, the Chain splits into two branches. One branch is used to check if an upgrade of EPM Automate is required. The other branch is used to detect if any errors are reported by EPM Automate when the batch script is executed.
The Upgrade Warning branch is used to warn if an EPM Automate upgrade is required. The first step in this branch is a Conditional to test to see if the Dynamic Output blnUpgrade is True. If this condition is met, then the branch continues.
The next Command in the branch retrieves the Upgrade flag file properties. This Command has an output object that contains a key indicating if the file actually exists.
The next Command is another Conditional which utilizes the Output of the prior Command to determine if the Upgrade flag file exists. If the file does not exist, the Conditional evaluates to True (Success) and the Branch continues.
Finally, if the Upgrade flag file does not exist, the final Create File Command creates the flag file and sends a notification that an EPM Automate upgrade warning has been detected.
The use of the Upgrade flag file prevents multiple notifications from being sent. A notification is only sent when the flag file does not exist so when this subprocess Chain is run for multiple dimensions, only the first pass generates a notification.
This second branch represents the difference between technical and functional success. Technical success is the idea that the EPM Automate batch script completes. Functional success is the idea that the EPM Automate batch script completes and all of the operations within the script complete without error. This branch in the Chain is testing for functional success.
The first Command in this Branch uses a Conditional to test if the Dynamic Output blnError has a value of True.
If this condition is met, the Conditional value is True (Success) and the branch continues. The next Command in the branch uses Handlebars to parse the EPM Automate errors so that a notification with the error information can be sent.
The Handlebars Command utilizes its own Output when generating the Notification.
A Resource is used when generating the body of the notification. The Resource for the notification is below.
Finally, the last Command uses the Set Chain Result Event to set the Chain result to Failure since while technically the process executed, functionally the execution encountered errors.
The complete Subprocess Chain is below.
We hope you have found this solution highlight informative and illustrative of the capability of OneCloud. For further dialogue or to ask questions, send us a message at email@example.com.