Saturday, October 15, 2011

My first encounter with jBPM


Long story, short story. When I was working in one of my projects in Mexico, somebody mentioned something about BPM or BPEL and how practical de idea/concept was, because now we can mix the knowledge of the Business People with the Developers, by using some kind of cool diagrams to do Process Modeling.

And now I had to create a project which essentially it's a WorkFlow but we need some features like keeping the state of each execution (so we can trace it easily and resume the process if by any chance is stopped) "et all" and then, when I saw that One of the requirements was to integrate this miniworkflow with an existing App deployed on jBoss 4 with Seam 2.1 (I'd talk later about this framework, for all those like me who love Spring Framework), then I have to use jBPM 3 instead of 4 or 5 OUCH :'(
"But then, I realize that JBPM4 can work flawlessly on JBoss 4"
What do we need???
No much, Eclipse Helios (3.6)
Install these features:

  • JBoss Tools - http://download.jboss.org/jbosstools/updates/development/helios (don't forget to install jBPM support!)
  • Graphiti - http://download.eclipse.org/graphiti/updates/0.7.1
  • BPMN2 - http://codehoop.com/bpmn2


The concept is really simple, we just need to model the flow (I'll use the Designer to do this)


But it needs some logic inside its guts, so I'll add something called Handlers and some personalized tags (which is a really cool feture)
This is our model translated into XML
On my implementation, the process will run by itself, it's going to be a "FIRE AND FORGET";

On my case the process will wait for a certain amount of time and the it will start, it'll make one decision and it will execute something and then the End :)

The logic will be implemented by Implementing some Interfaces:



And Voila!!!

Soon I'll talk a little bit about jBoss SEAM! (How I implemented a REST Service FACILITO!)

No comments:

Post a Comment