Installing JunkieFramework in FDMEE
In a previous blog post we announced the release of the JunkieFramework (call it whatever you want). This post will focus on getting the framework installed and show some basic usage.
The simplest way to load the framework is by grabbing the source file JunkieFramework.py. Then save this file to your custom scripts folder. On our test server, this was: C:\FDMEE\data\scripts\custom\JunkieFramework.py. Make sure you modify the default Settings object to match your environment.
Next, you need to import the framework into an event script for use. Our sample is from a BefImport event script. The code below automatically determines the custom scripts folder and loads the library. Once we import the library, we initialize the framework for use. Here I pass in the fdmContext and fdmAPI while using the default SMTP settings. Note: the framework can be used with custom, import and batch scripts as well.
To see the framework in action you just need to execute a data load rule. This simple script will log the fdmContext properties to the process log and send an email. The good thing here is it's open source, so you can customize it to suit your needs. And hey, if you make changes that others might find useful, feel free to share and send us a pull request. :)
If you are planning on adding your own code to the framework you may want to add the reload command so that Jython does not use the cached version
reload(jframe) (Thanks Francisco).