Business Integration Engine gets Groovy

I have been working with BIE (Business Integration Engine) trying to set up a proof of concept at work. I had a file format that did not have a built in parser in BIE. I thought about writing a new parser, but it seemed a better approach would be to convert the file into a known format using a bit of scripting magic.

So the plan was to use some regular expressions to convert the file into a nice fixed width format (which BIE can parse out of the box). After seeing that one of the loyal users of BIE had contributed a Jython plugin action that allowed me to perform Jython scripting inside my workflow, I decided to try and use it for the regex parsing (since I’ve wanted to play more with Python anyway).

Well I must say that Jython did not do my bidding if you will. I could not figure out (or find good examples showing) how to do regular expression parsing using the built-in Jython libraries (I believe it uses the Jakarta ORO project).
So after looking at the code for the Jython plugin, I decided I would take Rod Cope’s advice (from his awesome Groovy presentation at JavaOne 2005. You can find a link to download the presentations here, his is TS-3402.pdf) and write a plugin for Groovy (http://groovy.codehaus.org).

It turned out to take less than an hour, and now BIE supports Groovy scripting inside workflows. Next on the agenda will be to add support for BeanShell and Rhino (which I’ve used in some Ant scripts with great success).

You can download the plugin here: Groovy Plugin for BIE

We also have set up a wiki for BIE here: BIE Wiki

This entry was posted in Misc. Bookmark the permalink.

Leave a Reply

Your email address will not be published. Required fields are marked *