Using PyDev for Jython Scripts

Hi again!

I introduced new FDMEE scripting capabilities in my last entry.
So what´s next?
If you had time to play with new Script Editor I´m sure you already noticed few things: not interpreter, no colors, no indentation,etc.

If you come from FDM World then you will have to change your mind if you want to use Jython Scripts (they are mandatory for Import Scripts so...) If you have Java knowledge then it will be easier. And if you are Jythoner/Pythoner then you are lucky!

Even if you develop Event Scripts using VB Script you will see important differences from FDM. You can take a look to HFM Action Scripts which are located in  %EPM_ORACLE_HOME%\products\FinancialDataQuality\bin\

VB Scripts are executed using cscript (command-line version of the Windows Script Host -WSH) Therefore you need to declare input parameters for cscript, use WScript object, etc. Take a look!


For example, when data is loaded into HFM, you can see in the FDMEE process log how the HFM Action Script HFM_LOAD.vbs (see above) is executed... good for debugging :-)


So back to developing scripts. As Oracle suggests, your best option is to use a JAVA IDE to develop scripts. The most popular is Eclipse (or at least the one I´m going to use)
Is it enough? Not.
You need to install a Jython/Python Interpreter. I would recommend PyDev. You can use PyDev console to test your code and why not to learn Jython. 

To summarize your first steps:

1Install Eclipse
2. Install PyDev (follow instructions from in PyDev Site)
There is no installer for PyDev. You just have to install new software in Eclipse:


You have to configure the Jython Interpreter by selecting the Jython.jar file you want to use. I have selected the one coming with FDMEE installation as it is the one FDMEE provides:


3. Create your first project 
Don´t forget to select the Jython Interpreter you configured:


Amendment: I got some comments from colleague regarding Grammar version (thanks Craig!). Although there are more versions of Jython we will have to select the one aligned with the Jar we selected in previous step. We can check version by running command Java -JAR Jython.jar:


You can also check Jython version in any FDMEE Process log:


Grammar version can be adjusted after project has been created using the wizard (right click on project > PyDev - Interpreter/Grammar). As version provided by FDMEE is 2.5.1 we can then setup Grammar Version to 2.5 in order to ensure our Jython code will be working in FDMEE:



After project is setup you will have to add two JAR files in order to use FDMEE API objects (aif-apis.jar and aif-custom.jar which are located at EPM_ORACLE_HOME/products/FinancialDataQuality/lib). Appropiate JDBC driver is also needed. The 3 JAR files will be added as External Libraries:


4. Test the initialize script
In the FDMEE Admin guide you will find a sample script to initialize the FDMEE API. You can crate an empy PyDev module to develop it. Take into account that the parameter passed to fdmAPI.initContext function represents a valid Load ID. For example, you can find a valid one in table AIF_APPL_LOAD_AUDIT:


You can execute the script and see result in the PyDev console:


I would recommend you take a look to the new FDMEE Object Model and enjoy with new Jython in FDMEE

I wish you all a nice weekend!

FYI. You can follow us in Twitter (@akafdmee)

0 Response to "Using PyDev for Jython Scripts"

Post a Comment

Iklan Atas Artikel

Iklan Tengah Artikel 1

Iklan Tengah Artikel 2

Iklan Bawah Artikel