On Bricks And Mortar – A simple, Spring based Workflow Framework
In spring I was asked to support some maintenance people who had problems of cross checking oracle and informix databases for inaccurate data. I started writing a small Spring based workflow engine and was discouraged continuing to work on it.
But now the pain of the maintenance people has grown again and I polished the stuff and got it ready for use.
After presenting it to collegues it became obvious that this simple approach yielded much power. Having a flow of lego like building blocks which each do just one thing and then put their results on a common context enables one to build complex tasks just be selecting the right blocks and let them to their simple thing. It is much like the pipe principle used in unix operating systems for some decades.
So building on the power of spring, it was easy to create a simple workflow engine consisting of the following:
Features
workflow and steps are spring beans
workflows described in spring config files, loaded from application context and just executed
hierarchy and parent beans for easy basic configuration (e.g. datasources)
workflow context with named slots for data
map based data structures for input and output parameters
logging of intermediate data produced (for all steps or just selected ones)
Available Workflow Steps:
support for springs named queries and ibatis for complex queries (select and update-operations)
set operations: union, difference, intersection, transposition
excel and text report formatting of data
writing data to disk
sending emails with data
Libraries needed/supported
Most of them can be found in the extensive spring distribution. I won’t attach them to the downloadable project source.
BricksAndMortar/lib/database/ifxjdbc.jar
BricksAndMortar/lib/database/ifxjdbcx.jar
BricksAndMortar/lib/database/ojdbc14.jar
BricksAndMortar/lib/excel/jxl.jar
BricksAndMortar/lib/ibatis/ibatis-2.3.0.677.jar
BricksAndMortar/lib/mail/activation.jar
BricksAndMortar/lib/mail/mail.jar
BricksAndMortar/lib/spring/commons-logging.jar
BricksAndMortar/lib/spring/spring-beans.jar
BricksAndMortar/lib/spring/spring-context-support.jar
BricksAndMortar/lib/spring/spring-context.jar
BricksAndMortar/lib/spring/spring-core.jar
BricksAndMortar/lib/spring/spring-jdbc.jar
BricksAndMortar/lib/spring/spring-orm.jar
BricksAndMortar/lib/spring/spring-tx.jar
BricksAndMortar/lib/test/hsqldb.jar
BricksAndMortar/lib/test/junit-3.8.2.jar
Workflow Example
Simplistic example, just reading data from a database and dumping it into a file.
Complex example
reading data from one database in two steps
enriching the data from a second database
inserting the enriched data into the first database
writing excel and text report of the enriched data
sending the data by mail
logging the output of all steps

