Pages

A slothy ride through "Work Flows"... a primer

IT has become integral part of every organization.Business people need to be empowered with the tools that would keep an up hand on the competitive market.The execution of business processes in an organization can be done through work flow management systems.It is basically the flow of data that is associated with a work.Distribution of work is needed for efficient management.So the non technical people find it very easy if the applications they work on to control the process, is graphically manageable.In the deep level, the process models are based on graph theories and algorithms.As a programmer you are familiar with activity diagrams/ data flow diagrams,so we can observe these work flow patterns described by them.The distribution of work and its monitoring from the inception to the end can be effectively managed by work flow systems.Work flow systems helps to model the services for Business process management (BPM) (which is a management discipline that focuses on the designing them).Anyway the software used to model them did become role players of the industry.

I recently, read some articles on evolution of work flow tools.In 70's the work flow domain focused on office information systems.They were not successful in earlier days due to the limitations of computing, graphical user interfaces etc.But in these latest times, we could see the massive change in the concept of computing... semantic web,web 2.0,advanced networking etc that helped work flow systems to spread from managing a single organization to social networks(in the sense of social marketing tools, collaborative work etc ).There are a mindful of software like IBM MQseries WorkFlow, Tibco Staffware Oracle BPEL PM , jBPM ,OpenWFE (Ruby) used for work flow development.There is a consortium, formed to define standards for the interoperability of workflow management systems known as Workflow Management Coalition (WfMC) . According to their reference model


- workflow engine the instantiation and execution of process instances based on a predefined process model
- this model is specified using a process definition tool and is subsequently passed to the engine for execution
- workflow client interaction and managing work items on the worklist
- toools for adminstration and monitoring of processes and their instances
- external workflow engines can be communicated while processing done

take the case of jBPM



  • JBoss JBPM core component is the workflow engine (also referred to as core process engine) which takes care of the execution of process instances.
  • JBoss jBPM Graphical Process Designer (GPD), an plugin to Eclipse is the process definition tool which provides support for defining processes in jPDL both in a graphical format and in XML format. (processes can also be defined as Java objects or as records in the jBPM database)
  • jPDL (jBPM Process Definition Language) is the process language
  • JBoss jBPM console web application is the web based workflow client as well as an administration and monitoring tool
more here

At the programming side it uses Graph Oriented Programming.Graph Oriented Programming is a very simple technique that describes how graphs can be defined and executed on a plain OO programming language. Domain specific languages has a pivotal role in the development of work flows.Graph Oriented Programming is the foundation for all domain specific languages that are based on executing a graph. If you compare the system, it can be similar to any process model involving state changes,transitions etc.

Some cool stuffs i read

Making Web 2.0 Meaningful and Achievable by Jackbe
Take advantage of Web 2.0 for next-generation BPM 2.0
Evolution of the workflow management systems

More to know about the meta languages used in these systems.....

Java modularity and metadata

As a java developer one will encounter the spaghetti world of class path hell.Loads of libraries,jars,dependencies etc are used in large projects.Manageability is the major part of any application that is evolving through continued engineering process.When we access a class in a library we have to add the library class (which can be in jar file) to class path.This helps the compiler to use the class when its get compiled and the JVM to load the class when used at runtime. Just the basic stuff.java.lang.ClassLoader plays the main role in the life of class objects.we have jars/plugin mechanisms to do all the required functionality of so called modular.A jar can have dependencies to other jar files.We use lot of jar files usually the Apache commons library and all.Some time we wont be needing all the classes for the required functionality.Intelligent packaging is one of the main concern of any project while deployment.Less dependencies could overcome performance bottlenecks.Better versioning could help a better way of continued engineering and maintenance.The default class loader in java runtime is immutable.Any class that is loaded by the class loader is added to a name space which cannot be changed i.e you can add any class to this namespace but unable to unload them.That's what happening when the object is instantiated with new operator.So when we create a new ClassLoader instance it creates a new namespace.One of the solutions provided by the tech commumity is the modularization of JDK itself.This would allow applications to be installed with just those components of the JDK that they actually require.A specification JSR 277 was targeted to be delivered as a component of Java SE 7.0.The specification defines an architecture with first-class modularity, packaging and deployment support in the Java platform, including a distribution format, a versioning scheme, a repository infrastructure, and runtime support.They introduced the Java module format called JAM.But later on they decided to halt its development because of difficulty in integrating with JVM.They started a project Jigsaw under open jdk.The modular system can be independent or be implemented based on the language or compiler changes.Anyway, the concept of modules is interesting.According to JSR-277 spec
A Java module is a unit of encapsulation. It is generally written as a development module in a programming language in the Java platform, and is ultimately compiled into metadata and packaged together with classes and other resources as a deployment module.
These modules provides the metadata related to itself, like name,version,imported classes,dependencies etc.

But there is already an evolving system known as OSGI that intends to do the modular concept.In this bundles will be the modular jar files.You can install, uninstall, start and stop these bundles(without restarting the VM ).Also, it does offer services that can be dynamically discovered in JAR files at runtime.You can package OSGi with your application, or list it as a prerequisite, and then run on a wide range of Java platforms( design point of OSGi has always been to support a broad set of Java ME). .The concept of bundles is powered by custom class loaders which will provide encapsulation as well as runtime dynamics.
A bundle is a group of Java classes and additional resources equipped with a detailed manifest on all its contents, as well as additional services needed to give the included group of Java classes more sophisticated behaviors, to the extent of deeming the entire aggregate a component.
We know that a jar will have MANIFEST.MF file attached to its structure inside the META-INF directorythat contains information about its contents.By adding OSGi headers to the MANIFEST.MF we can make the jar a bundle.These headers can be

Bundle-Name: a name for this bundle
Bundle-SymbolicName: a unique identifier for a bundle (naming like java packages).
Bundle-Description: description of functionality.
Bundle-ManifestVersion: which OSGi specification to use for reading this bundle.
Bundle-Version: version number of the bundle.
Bundle-Activator: the class name to be invoked once a bundle is activated.
Export-Package: packages contained in a bundle available to the outside world.
Import-Package: packages required from the outside world

These standardized metadata is used by the framework to provide robust modularity while integrating to most of the existing applications.This metadata can act as a semantic definition to integrate pluggable modules to be integrated in large applications.I think modern enterprise application need this type of modularity to provide an easy integration with low cost of maintanence and development.The ISVs can provide an efficient solution by the light weight applications instead of heavy application suites having complex integration structure.It can be an asset to the low budget IT solutions.Also the standardization helps to coexist (and interoperable) with different solutions provided by open jdk community or spring community or any other vendors.

More header information in this OSGi core specification
Some osgi implementations equinox,apache felix
About jigsaw
OSGi elearning