JBoss jBPM is a flexible, extensible framework for process languages which uses graph oriented programming as a foundation. As the word says it, a graph based language represent some kind of execution which can be shown as a graph (Imagine a simple flow chart which explains the track of a business decision for example).
Business process management can be defined as a procedure in an organization: some of this procedures can be automated, some need human work.
Why we need a BPM in Java ?
the basic of an interaction with other systems is the exchange of information/messagessendInformationToAreaB();
Response r = waitForResponseFromB();
What is the limitation with this ? the first limitation is that by itself this little code is not persistable, yes of course you can wrap it with some Object/Relational tool...but what about waiting states ? even if you implement it as a Thread you cannot persist a Java Thread.
The second one is that you might need a graphical representation of this......for example your Boss wants to take a look at your process...or even more, what about if business changes ? without a native graphical implementation of the process you have to do double work: re-engineering the Code and the Graph with your favourite tool.
So now let's get our hand dirty ! The first thing to do is to download a fresh copy of JBPM fron jBoss site. For this article we'll use jbpm-jpdl-suite-3.2.3.zip downloadable from www.jboss.org site.
This archive includes embedded application server (JBoss of course) and the graphical designer. Before entering in the details let's make clear one thing: usually BPM engines have a tight coupling with the graphical environment : meaning you have to use the graphical editor to draw or change your process. JBPM is basically a process management Api built on Hibernate (which maps the basic workflow tables) and it can live well without any graphical editor. It does exists a plugin built with Eclipse technology which lets you reverse-engineer your graphical process into an XML file, yet you can still design your process with a simple notepad and a Java compiler.
So keep separated the concept of the Graphical Process Designer (GPD), which will be used by analyst/ top managers to describe the process and the process it self which is only xml and pure Java. Nice separation of tasks between analysts and developers isn't it ?
So we talked about XML: what is the process language of jBPM? there are more then one but just for beginning we'll concentrate on the most common: that is jPDL. JPDL is an XML structured language which has a specific process grammar to describe process definitions, nodes and transitions.
Meanwhile
you read this article I guess you have finished downloading
jbpm-jpdl-suite-3.2.3.zip. So unzip it and launch the designer.bat (or
designer.sh for Unix/Linux users) under the "designer" folder.
Once Eclipse is started, launch the "New..." Menu and select new Process projectThen choose a convenient name for your Project and wait until you'll see your Project in the Package explored. Resist one more minute before looking at your process: open the JBPM library tag in the Package explorer: you'll see the libraries needed to run your process from a standalone application. Quite a lot, isn't it ? but only two of them are the core jBPM libraries, all the others are just dependancies.
- jbpm-3.x.x.jar
- jbpm-identity-3.x.x.jar
The process is quite straightforward : once the process is started we meet a Task Node: in short a task node represents an activity that is performed by humans. This task will be in charge of user "buyer".
Once the order is performed we have a Decision Node where the process can lead to different Nodes based on the data at its disposal. In our case we check if the goods ordered are available. If they're not available the process is switched to a State Node named "GetFromStock". A State Node simply tells the process instance to wait and, in contrast to a task node, it doesn't create an activity in anybody's task list.
At last our goods needs to be shipped and this will be another task in charge to our Deliver Office. Once also this task is completed our process will come to a end.
What is jBPM?
jBPM is a flexible Business Process Management (BPM) Suite. It makes the bridge between business analysts and developers. Traditional BPM engines have a focus that is limited to non-technical people only. jBPM has a dual focus: it offers process management features in a way that both business users and developers like it.What does jBPM do?
A business process allows you to model your business goals by describing the steps that need to be executed to achieve that goal and the order, using a flow chart. This greatly improves the visibility and agility of your business logic, results in higher-level and domain-specific representations that can be understood by business users and is easier to monitor.The core of jBPM is a light-weight, extensible workflow engine written in pure Java that allows you to execute business processes using the latest BPMN 2.0 specification. It can run in any Java environment, embedded in your application or as a service.
On top of the core engine, a lot of features and tools are offered to support business processes throughout their entire life cycle:
- Eclipse-based and web-based editor to support the graphical creation of your business processes (drag & drop).
- Pluggable persistence and transactions based on JPA / JTA.
- Pluggable human task service based on WS-HumanTask for including tasks that need to be performed by human actors.
- Management console supporting process instance management, task lists and task form management, and reporting.
- Optional process repository to deploy your process (and other related knowledge).
- History logging (for querying / monitoring / analysis).
- Integration with Seam, Spring, OSGi, etc.
jBPM supports adaptive and dynamic processes that require flexibility to model complex, real-life situations that cannot easily be described using a rigid process. We bring control back to the end users by allowing them to control which parts of the process should be executed, to dynamically deviate from the process, etc.
jBPM is also not just an isolated process engine. Complex business logic can be modeled as a combination of business processes with business rules and complex event processing. jBPM can be combined with the Drools project to support one unified environment that integrates these paradigms where you model your business logic as a combination of processes, rules and events.
For more information follow my Tutorial online @ http://jbpmmaster.blogspot.com/
No comments:
Post a Comment