简介:
JBPM作为JBoos社区的开源Business Process Management (BPM)项目,已被业界广泛的使用。JBPM的目标是搭建业务人员和开发人员之间的桥梁,做到业务建模与程序开发的无缝衔接。
JBPM采用flow chart来帮助业务人员建模和开发人员进行开发,这样做的有点在于:1. 减少业务人员与开发人员的沟通障碍,提高开发效率;2. 增加业务流程的可见性,便于流程监管;3. 增加业务流程的灵活性,是IT系统能快速的对相应业务变化。
JBPM5简介
JBoss社区推出Drools5后,曾经有规划要把JBPM纳入Drools体系,以Drools Flows的形势存在,直到2010年12底,JBoss又推出了JBPM5,其原因具推测是由于JBPM的创始人Tom Baeyens离开JBoss加入Alfresco。(参考文献)
Drools当初合并JBPM是的雄心很大,目标是对JBoss的企业开源软件进行最大程度的整合,提供完整的企业管理的解决方案。但由于业务流与规则流千丝万缕的联系,在谁合并谁的问题上,一直没有确定的答案,最终形成了目前中庸的结果,就是你中有我,我中有你。用户根据自己的实际需求在Drools和JBPM中进行选择。
由于Tom Baeyens的出走,JBPM5完全抛弃了JBPM4的架构(这对那些正在项目中使用JBPM4的人来说是不幸),从Drools work flow继承而来,很大程度上延续了Drools flow的特点。
JBPM5架构介绍
JBPM5的核心仍然是纯java编写的工作流引擎,JBPM5基于最新的BPMN2.0( BPMN 2.0 is a standardized specification that defines a visualization and XML serialization of business processes, and can be extended (if necessary) to include more advanced features.),这为构建业务流程提供了更强大的功能。在工作流引擎的基础上JBPM5还加入了许多功能组件,包括:
1 Eclipse-based and web-based可视化编辑器
2 持久化框架(JPA/JTA)
3 人工任务支持
4 Guvnor流程管理(发布,管理,监视)
5 历史记录查询
6事件处理
7 业务规则
8集成框架(Seam, Spring, OSGi)
JBPM5的安装
JBPM5的安装非常简单,官方的操作文档有较详细步骤说明,在这里不在制造相同的车轮了。如果你是新手,建议你按照下面Demo的安装方法进行安装,这会省掉配置eclipse plug-in和JBoss AS的麻烦,不足的是安装程序会重新下载eclipse和JBoss AS。
下文来自官方文档:
1、Prerequisites
This script assumes you have Java JDK 1.5+ (set as JAVA_HOME), and Ant 1.7+ installed. If you don't, use the following links to download and install them:
Java: http://java.sun.com/javase/downloads/index.jsp
Ant: http://ant.apache.org/bindownload.cgi
2、Download the installer
First of all, you need to download the installer: jBPM-{version}-install.zip
You can for example find the latest snapshot release here.
http://hudson.jboss.org/hudson/job/jBPM5/lastSuccessfulBuild/artifact/target/
3、Demo setup
The easiest way to get started is to simply run the installation script to install the demo setup. Simply go into the install folder and run:
ant install.demo
This will:
Download JBoss AS
Download Eclipse
Install Drools Guvnor into JBoss AS
Install Oryx Designer into JBoss AS
Install the jBPM gwt-console into JBoss AS
Install the jBPM Eclipse plugin
Install the Drools Eclipse plugin
ant start.demo
This will:
Start the H2 database
Start the JBoss AS
Start Eclipse
Start the Human Task Service
Once everything is started, you can start playing with the Eclipse tooling, Guvnor and gwt-console, as explained in the next three sections.
JBPM5 Getting starting:
官方提供了Using Eclipse Tooling,Using web management consoles, Using Guvnor repository的使用flash,你可以通过下面的网址观看或者下载:
http://people.redhat.com/kverlaen/install-eclipse-jbpm.swf
http://people.redhat.com/kverlaen/install-gwt-console-jbpm.swf
http://people.redhat.com/kverlaen/install-guvnor-jbpm.swf
本系列文章,今后会陆续提供一系列关于JBPM5使用的例子。
参考资料:
1、 JBPM官方网站及用户文档
http://www.jboss.org/jbpm
http://docs.jboss.org/jbpm/v5.0/userguide/
2、 Drools官方网站
http://www.jboss.org/drools
3、纵观jBPM:从jBPM3 到jBPM5 以及Activiti5
http://www.infoq.com/cn/articles/rh-jbpm5-activiti5