Generic Workflow Solution using Java
by Vijay Kiran
Its been almost 3.5 years for me in programming/software. I’ve been working on various technologies. I started off with VC++, and most of the time worked with Java and Open Source technologies. When I see the applications, I could see a generic nature in all the applications I’ve developed. It’s just a simple work flow. Apart from the web-applications which have multiple-entry-exit type, all other applications have a simple design.
Every domain have "objects" which have "states". And the logic of the application just alters the "state of the objects" , which is defined by the "business rules" and "workflow".
To provide the manageability, scalability of the application, the modules should be loosely coupled and provide interface for managing them centrally.Java has a very nice set of APIs for creating these type of applications. The manageability of Java objects is now very easy using the JMX API. And JMX is now part of the core java JSDK. So each and every module will expose a MBean.
The communication between the object should be very easy if JMS is used. The application should be divided into modules. The modules will talk to each other using JMS or any other solution depending on how the modules can be designed. The most primitive solution might be using interface-callback way or using observer pattern.
If you use JMS, you must need to have the JMS provider. which might be an overhead. But Most of the times the application will have web-interface which will be implemented using JSP or some other technology that uses a web-container. So use of JMS is based on application design. But interface-callback will also work without any problem. There are also JMX notifications that can be used as communication medium. JMS will be a best option in case of the message is a big java object, which is not the case most of the times.
Once a generic module is designed, it can be extended to be a module in the work flow. And the modules can be managed using a single administration component, which in turn is an extension of the generic module.
