Events

The steps performed by the EPM Integration Agent are as follows:

  1. Process SQL defined by the EPM Integration Agent data source specified in the Oracle Enterprise Performance Management Cloud.

  2. Prepare and transmit the SQL result set to the EPM Cloud from the defined data source.

These steps are referred to as the "Extract" and "Upload" steps. Scripting in the EPM Integration Agent supports four events related to these two process steps where you can define custom scripts. The events are as follows:

Event Script Name Description

Before Extract

BefExtract.py

BefExtract.groovy

Script executed before the agent extract processing. If you want to perform any processing prior to the SQL processing, that code should be included in this script.

After Extract

AftExtract.py

AftExtract.groovy

Script executed after the agent extract processing. After the extract a file is prepared, which includes the job id with the dat suffix in the agent/MyData/data local folder

Before Upload

BefUpload.py

BefUpload.groovy

Script executed before the data file is uploaded to the EPM Cloud. The file uploaded to the EPM Cloud is the <jobID>.dat file from the agent/MyData/data folder.

After Upload

AftUpload.py

AftUpload.groovy

Script executed after the data file is uploaded to the EPM Cloud.

Note:

For information on the EPM Integration Agent BefExport and AftExport events used during write-back executions, see EPM Integration Agent Write-Back Event Scripts.

Sample scripts are available in the agent/Sample/jython and agent/Sample/groovy folders on the local machine where the agent was installed. The system runs an instance of a script if it is placed in the agent/MyData/scripts folder. For example, if you want to only execute the BefExtract script, only save this script to the agent/MyData/scripts folder.

You may also choose to create your own implementation of the Java class that implements the four custom methods described above. An example is provided in the Agent/Sample folder for reference, but consider the following if this approach is selected:

  • If you choose to implement your integration logic directly in Java, then you are not required to save any scripts to the agent/MyData/scripts folder. The Java implementation always executes the four events, and if a script file is not present for any of those events, it just processes the Java logic define by the customer/partner.

  • You can create a Java class file CustomEvent.java, which should implement the interface EPMAgentInterface (for example, public class CustomEvent implements EPMAgentInterface{), present in the agent-interface.jar.

  • The CustomEvent.class can be packaged inside the agent-interface.jar as oracle.epm.aif.agent.agentinterface.CustomEvent.class. If you choose to package it in a separate jar other than agent-interface.jar, then this jar must be included in the CUSTOM_CLASS_PATH agent startup parameter.

  • If you choose to use a different class name from oracle.epm.aif.agent.agentinterface.CustomEvent.class, then you must set the startup parameter CUSTOM_INTERFACE_CLASS_NAME with the fully qualified java class name.

  • Note that the agent-interface.jar is updated each time development provides a fix or a new version during the periodic EPM Cloud release cycle. The custom event class may be used for development and testing purposes, but for production deployment, it is recommended you maintain a separate jar so that customizations are not overwritten.