The EPM Automate utility can now be used on Mac.  In this post, you will learn how to install the utility on Mac OS and get it working.  Let’s dive right in!

Download and Install JDK

The first step is to download Java Development Kit (JDK) from Oracle’s website.  If you already have JDK installed, you may skip to the next step.  

Accept the license agreement and select the .dmg file for Mac OS.

Once the download is complete, proceed with installing JDK on your Mac.  After installation, open a new terminal and type the following commands to ensure that Java has been properly installed.

The first command will give you the path to where Java has been installed (usually “/usr/bin/java”).  The second command will provide version details of the Java installed on your Mac.

Download EPM Automate for Mac OS

Log in to the EPM instance and navigate to Downloads.  

Select the “Download for Linux/Mac” option for EPM Automate.

This will download the EPMAutomate.tar file.  I then moved the file to a “Documents/EPM” folder.  

The next step is to unzip the “.tar” file, which can be done by following these commands on your Mac Terminal:

The above commands will create the epmautomate folder within the “/Documents/EPM” folder.

Set JAVA HOME and Path to EPM Automate

For the EPM Automate utility to work properly, we need to set up JAVA_HOME and the path to the EPM Automate utility.  Begin by opening the .bash_profile.

Once open, add the following details to the end of the file.  (Press “Esc + i” to edit the file.)

Important Note:  Be sure to provide the correct path to the EPM Automate bin directory.

Save the file by pressing “esc” and “wq!”, then “Enter/Return”.  Exit the terminal.  Open a new terminal and type the following to ensure all is working properly:

You should see a screen like this, in which you can see that the path to Java and the Path to EPM Automate are correctly set.

Run EPM Automate Commands

Open a terminal and type epmautomate.sh to receive this output:

Now, you can use the EPM Automate utility on your Mac!

As always, let us know if you have questions by leaving a comment below.  Thanks for stopping by!

Tagged with: , , , , , ,

In this post, we’ll cover the basics of using PBCS/EPBCS REST APIs using Groovy Scripts.

With the release of the REST APIs, you now have the ability to develop robust applications using Java, Groovy, and CURL.  Let’s see how we can use PBCS REST APIs.  

For the purposes of this post, it is assumed that you are using a Windows Operating System, though Groovy can also be installed on Mac/Linux.

Here is a summary of the topics we’ll cover in this post:

  • Install and Configure Java
  • Install and Configure Groovy
  • Groovy Console
  • The First Groovy Program

Install and Configure Java

The first step is to install Java on your system. Head over to Oracle to get the latest version of Java SDK. Accept the license agreement and download the software. Once the software is download, install Java on your system, keeping the default options.

In my case, I downloaded the 64-bit version, as shown below.

 Once Java is installed, make sure to:

  1. Add JAVA_HOME to Environment Variables and
  2. Edit your “Path” environment variable to include the path to the Java folder.

For further explanation on how to complete the above two configurations, click here. Be sure to restart your system after making changes to the environment variables.

Once logged back in, open command prompt and type “java -version” and you should see the version displayed, as shown below.

Install and Configure Groovy

The second step in this process is to install Groovy. Head over to the Groovy Language website, scroll down, and download the “Windows Installer“, keeping all default values.

Next, download the java-json.jar file. Head over to the Java2s website to download the file. Copy the java-json.jar file to the Groovy Library folder.

In my case, it is “C:\Program Files (x86)\Groovy\Groovy-3.0.0\lib”.

Now, you’re all set to start invoking PBCS REST APIs using Groovy!

The Groovy Console

Open the Groovy console from the Windows start menu. The console consists of 3 main areas:

  • Toolbar
  • Editor – Write the code here
  • Output Area – Check error messages and output messages here

You should also become familiar with the “Execute” and “Clear” buttons, as shown in the image below.

The First Groovy Program

Oracle has provided some excellent examples and sample code for using PBCS REST APIs using Groovy. Head over to Oracle Docs for details. We’ll be working with the “List Files” function. Before we start, though, let’s look at the anatomy of a groovy script.

Import Section

The import section consists of any external files (libraries) that are needed to execute the program. In our example, we’ll include the following:

import org.json.JSONObject
import groovy.json.JsonSlurper

Variables

Assuming you are already familiar with variables, allow me to dive right in and explain the variables we’ll be using:

  • serverUrl:  Stores the planning URL. Be sure to include the port number at the end.
  • username:  PBCS/EPBCS login user name. The format to be followed is “domain.username”.
  • password:  PBCS/EPBCS login password.
  • apiVersion:  default to V3.
  • appName:  PBCS/EPBCS Application name.

Below is the sample code. To find the current version of Migration APIs, click here.

serverUrl="https://planning-yoururl.oraclecloud.com:443" username="a123456.adminuser"
password="mypassword"
apiVersion="11.1.2.3.600"
appName="Vision"

Methods or Functions

We’ll re-use the functions and methods from Oracle’s documentation. Grab the code for the following:

  • fetchResponse ( )
  • fetchJobStatusFromResponse ( )
  • executeRequest ( )
  • listFiles ( )

You’re all set!

Now for the fun part – seeing the results. Before we go ahead and execute the code, let’s add the following line to invoke the process:

listFiles();

Click the “Execute” button and take a moment to enjoy the first Groovy Script.

As always, don’t hesitate to leave us a comment below with any questions.  Thanks for stopping by!

*You might also want to check out an earlier post, Testing PBCS REST APIs Using SoapUI.

Tagged with: , , , , , , , ,

In this post, we’ll look at how to fetch data from Oracle ERP (SaaS) and load it into Oracle EPM (SaaS). 

*This post assumes that the reader has some knowledge of PowerShell and EPM Automate commands.  It also assumes that EPM Automate is already installed and that the import jobs are set up in the EPM instance to import the data file.

The high-level steps involved in the process are:

  • Invoke BI Report
  • Parse and Decode Base64 Response
  • Upload File to EPM
  • Invoke Import Job in EPM

Here, we take a look at using a combination of PowerShell and EPM Automate utility commands to accomplish the task at hand.

Invoking the BI Report

In this scenario, we are using Oracle BI Publisher Web Services.  More specifically, we’re using the “ExternalReportWSSService” web service and the “runReport” method.

In an effort to simplify this example, the BI report does not have any parameters.  The output is in CSV format.  

Create a SOAP payload file, as shown below, and save it as saopRequest.xml.

Make sure the path to the BI report is populated correctly. Look for reportAbsolutePath in the above code snippet.  Be sure to include “.xdo” at the end of the report name.  It is assumed that the report is available in the shared folders.

Now, let’s write the PowerShell script to invoke the BI report.  Make sure to use the correct Oracle Cloud URL.  You need the following information to invoke the web service:

  • User Name to Access BI Report
  • Password of the BI User
  • WSDL

Store all of this information in a json file.  Let’s name it biDetails.json.

Be sure to provide the correct username, password, and URL to the BI server.

Moving on to the PowerShell Script, let’s read the data file to get the details that are required to invoke the web service. We will also need to pass the authorization details as part of the request header.

In the above code snippet, we created the encoded credential string, which is a base64 encoded string of user name and password. The encoded string is then added to the request header.

The next code snippet invokes the BI report.

Make sure the following are set correctly:

  • ContentType to “application/soap+xml;charset=utf-8”
  • Method as “Post”
  • InFile as soapRequest.xml (the SOAP Payload)
  • OutFile as outFile.xml (response will be saved)

outFile.xml is the response from the web service. The report data is base64 encoded and is available in the xml response. The specific xml tag is reportBytes.

Parse and Decode the Report Data

The response from the web service is in base64 encoded format. We have to decode it to save the data to a csv file. Use the below code snippet to decode the response.

In the above code snippet, we are reading the output.xml file and generating the data file. The data is saved as “Positions.csv” in the current working directory.

Upload File to EPM

Once the data file is generated from the BI report, we can use EPM Automate utility commands to upload the file to the planning instance. The pre-requisite for this is to have EPM Automate installed on your system.

Log in to the Planning instance and upload the file. To learn more about EPM Automate commands, click here.  You may have to give the full path to the file in the upload command.

Invoke the Import Job in EPM

The final step is to invoke the job in Planning to import the data. The pre-requisite to this step is to define the Import Job in EPM. Use the below command to invoke the import job and log out of the Planning instance.

Import_Position_Data is the import job defined in EPM.

Conclusion

This approach allows you to run the job on-demand. You are not dependent on the ERP team or any scheduled jobs in ERP to get the data file. There are other ways of doing this, but this is the most convenient, from an EPM user’s perspective.  

As always, if you have any questions or comments, or if you want the complete code, please leave a note below and one of our experts will get back to you.

In future posts, we’ll take a look at the same process, but using Unix Shell Scripts.  Stay tuned!

Tagged with: , , , , , , , , , ,

In this article, we’ll show you how to add custom expense types in Oracle’s Enterprise Planning and Budgeting Cloud Service (EPBCS) Projects module.  This can be helpful if you are interfacing Project Plan/Actuals data from another system (e.g., Oracle PPM); the external system may be using different expense types that you want to capture in the EPBCS Projects module.

Let’s get started…

Predefined Expense Types

The Projects module in EPBCS comes with certain predefined expense types.  These expense types are used to capture and plan project expenses.  To view the standard expense types available in EPBCS, navigate to:

Dimensions > Account > OPF_Total Expenses

1

Adding Custom Expense Types

You may want to add other expense types to suite your needs or the needs of your client.  Here’s how to do that:

  1. Add a sibling to ‘OPF_Miscellaneous Expense’ and name it “OPC_Direct_Expenses”. This will allow us to group together any custom expenses that we define.  2
  2. Add children to the member we added in Step 1. For this example, we’ll add two members:  Custom Expense1 and Custom Expense2.

3

  1. Refresh the database.

View Custom Expense Types in Expense Entry Form

Now, we need to check the Expense Forms to make sure we can see the custom expense types we just created.

Navigate to Projects > Expense > Direct Entry.

4

Click on the list of value (LOV) under Expense Type.  You should see your custom expense types in this list.

5

Congratulations!  Moving forward, you can plan and capture project expenses using custom expense types in the EPBCS Projects module.

As always, leave us a comment below with any questions you have about this process.  Also, if there is a specific topic that you would like to see featured on our blog, please let us know.  Thanks for joining us!

Tagged with: , , , , , , , ,

Enterprise Planning and Budgeting Cloud Service (EPBCS) provides users the flexibility to select the financial planning process that best suits their needs.  The various planning options available in EPBCS Financials (FS) are:

  1. Direct Entry
  2. Trend-Based Planning
  3. Driver-Based Planning

EPBCS comes packaged with standard drivers that users can enable based on business requirements.  A few out-of-the-box drivers that can be enabled include:

  1. Compensation
  2. Marketing
  3. Sales
  4. Travel and Entertainment

These drivers can be used in planning and forecasting preparation.  Along with the drivers, you would also use pre-defined assumptions in your planning process.  These drivers would be used in the Driver-Based Planning forms.

Creating Custom Drivers in the EPBCS Financials Module

Often, the planning process may include use of custom drivers. Here, we will take a look at how we can create custom expense drivers that can be used in the planning process.

Enabling custom drivers is a two-step process:

  1. Enable Drivers and Related Accounts for FS
  2. Create Custom Drivers for Expense Accounts

We’ll go through each of these steps in more detail, below.

1. Enable Drivers and Related Accounts for FS

When you are enabling features in the FS module, always be sure to:

  1. Enable drivers and related accounts for expenses, and
  2. Select at least one predefined driver option from the given list (in this case, we are selecting Sales).

 

1

 

Once this is enabled, you will see the predefined account drivers in the Account Dimension.

 

2

 

 

 

 

 

 

You will also notice that there is a new user variable available on the User Variables page.

 

3

 

This variable is used in the Driver-Based Forms in the FS module.

2. Add or Create Custom Drivers

Navigate to Configure: Financials > Expense Accounts

4

 

In the Expense Accounts screen, Click on Actions > Add Category.

 

5

This will create a new category/parent member for custom drivers. In this example, we’ll call it Wage Drivers. Click Ok to create the category.

 

6

 

Click Save, then click Actions > Add to create various driver members in the “Wage Drivers” category.

 

7

8

 

Click Save.

Navigate to Dimensions > Account.  You will notice that the new drivers are now available in the Account Dimension.  The members are created as children to “OFS_Expense Drivers for Forms”.

 

9

 

 

 

 

 

 

You can now use these drivers during your planning process.  The drivers will also be available in the out-of-the-box forms within the EPBCS FS module.

 

9.1

 

As always, if you have any questions about this process, please leave us a comment below.

Tagged with: , , , , , , ,

In this post, we’ll show how to test Oracle Planning and Budgeting Cloud Service (PBCS) REST APIs using SoapUI.

In the example below, we will test the List Files REST API.  For more details on the List Files API, check out the Oracle Help Center:  REST API for Oracle Enterprise Performance Management Cloud.

Constructing the Rest API URL

First, you need to have the REST API URL in order to test the API.  Follow these steps in order to create this URL:

Format:  https://<SERVICE_URL>:443/interop/rest/<API_VERSION>/applicationsnapshots

  • SERVICE_URL = Let’s say your PBCS URL is:
    https://planning-test-a1234567.pbcs.us2.oraclecloud.com/workspace.
    The service URL in this case is:
    https://planning-test-a1234567.pbcs.us2.oraclecloud.com
  • API_VERSION = For testing purposes, use the value 1.2.3.600. *If you want to find out the latest version, you can use the getLCMVersions() helper function for Groovy/Java.  Here is a link to the Groovy helper functions, provided by Oracle. Leave a comment below and let us know if you are interested in learning more about invoking REST APIs using Groovy.

Testing Using SoapUI

Right-click on Projects and select “New REST Project”, as shown below.

1

 

 

 

 

 

 

2

 

 

 

 

 

 

 

Next, enter the REST API URI and click “OK”.

3

 

 

 

 

 

 

 

You will then see a window similar to this:

4

The next step is to enter the authentication information.  Let’s assume the following:

  • Domain Name: a1234567
  • Username: username1
  • Password: password123

When entering the authentication information in SoapUI, make sure to follow this convention:

Username = Domain.username

So, in our case, the username field will be a1234567.username1.

Now, click the Auth button and select Add New Authorization > Basic, then enter the details, as shown.

5

 

 

 

 

 

6

 

 

 

 

 

 

 

 

7

 

 

 

 

 

 

 

8

 

 

 

 

 

 

 

Make sure not to enter any value in the “Domain” field while you are on the Auth screen. Once this is complete, check the Method at the top of the panel to ensure it is set to GET.

9

You will also see a run button, in green, which will be used to send the request.  Next to that is the Stop button to be used in case you want to interrupt this request.

To the right of the panel, you will see options to select the data format of the response.  Select “JSON” as the data format.

10

 

 

 

 

 

 

Once the setup and configuration are complete, it is time to test the API.  Click the green Run button.  If there are no errors, you will see a JSON response, as shown below, in the right side of the panel.

11

 

If you have any questions about this process, please leave a comment below and one of our EPM experts will get back to you with a response.

Tagged with: , , , , , , , , ,

shutterstock_662073481

Welcome to AST’s blog dedicated to all things Enterprise Performance Management (EPM)!  Our expert EPM team members will share their knowledge, lessons-learned, and best practices here.  Bookmark this page and check back regularly for exciting updates and posts.  If you have any questions about our posts, or anything EPM-related, please feel free to leave us a comment and one of our experts will get back to you.

Thanks for joining us!

Tagged with: , , , ,