首页>>程序代码>>JBPM安装使用的基本步骤和说明图文教程
JBPM安装使用的基本步骤和说明图文教程
来源: 易习特达网 时间: 2014-09-28 16:45:24

JBPM4.4下载地址


JBPM发行版本可以在sourceforge里下载,http://sourceforge.net/projects/jbpm/files/

  它的源码地址为:https://anonsvn.jboss.org/repos/jbpm/jbpm4/

JBPM4.4描述


  JBPM是一个可扩展的,可移植的流程引擎,既可以单独作为服务器运行,也可以嵌入其他java应用程序。JBPM官方文档3类,用户向导,开发向导,API文档。用户向导解释如何使用JBPM,开发向导解释更多高级客户端实现。API文档介绍具体实现类及用法。

官方说明


Clever readers will have noticed that some of these questions point to probably causes :-) Especially tweaking the libs and configuration can easily lead to trouble. That's why we have spend a great deal of effort to include default installations and a simplified configuration mechanism with imports. Think twice before you start to customize configurations beyond what is indicated in this userguide. Also think twice before replacing libs with other versions.

(2)JBPM安装


JBPM文件系统层次关系


按照上述的地址,下载jbpm发行版本

解压后可以看到包含以下内容:

db: 数据库结构创建脚本

doc: 用户手册,javadoc和开发指南

examples: 用户手册的使用的示例流程。

gpd: 图形化流程编辑器插件。

jboss:JBoss安装器(用于将JBPM安装到Jboss中)

lib:第三方类库,和一些特定的jbpm依赖库。

src:源代码

jbpm.jar: jbpm主库。

JBPM安装先决条件


JBPM安装的先决条件为,必须在之前有JDK5以上的版本,如果要使用ant执行脚本命令,

那么选用的apache ant版本也要在1.7.0及以上。

它们的下载地址为:http://java.sun.com/javase/downloads/index.jsp或http://ant.apache.org/bindownload.cgi

 

(3)开始行动


安装过程


这个安装过程很容易上手,这一章节,我们主要描述完成安装demo的过程。如果之前你有下载过tomcat5.5.23或者tomcat6.0或者jboss-5.0.0.GA.zip,你可以手动把他们放在${jbpm.home}/install/downloads目录下,否则的话脚本会自动替你下载。由于它需要较长时间,所以建议你如果有的话,可以放在该目录下。同样eclipse也类似。装好Apache ant之后,在dos窗口下进入目录${jbpm.home}/install然后运行

jbpm1.png

这样的操作会安装eclipse,Tomcat( 或JBPM),创建数据模式,启动tomcat(JBOSS),创建一个例子并将数据保存在jbpm 数据库中,安装JBPM web模块,启动eclipse


 

在这些都完成后,tomcat将会在后台启动,一旦eclipse启动完成后,你可以安装GPD,以使能够使用JBPM Business Process编程。

 

 

Ant脚本说明


*   demo.setup.jboss: installs jboss, installs jbpm into jboss, starts jboss, creates the jBPM DB schema, deploys examples, loads example identities, installs and starts eclipse

*   demo.setup.tomcat: installs tomcat, installs jbpm into tomcat, starts tomcat, creates the jBPM DB schema, deploys examples, loads example identities, installs and starts eclipse

*   clean.cfg.dir: Deletes the ${jbpm.home}/install/generated/cfg folder.

*   create.cfg: Creates a configuration in ${jbpm.home}/install/generated/cfg based on the current parameters.

*   create.jbpm.schema: creates the jbpm tables in the database

*   create.user.webapp: Generates a basic webapp in ${jbpm.home}/install/generated/user-webapp

*   delete.jboss: Deletes the JBoss installation

*   delete.tomcat: Deletes the Tomcat installation

*   demo.teardown.jboss: Drops the jbpm db schema and stops jboss

*   demo.teardown.tomcat: Stops tomcat and then the hsqldb server (if needed)

*   drop.jbpm.schema: Drops the jbpm tables from the database

*   get.eclipse: Downloads eclipse if it is not available

*   get.jboss: Downloads a JBoss AS which was tested against the current jBPM version if it is not available

*   get.tomcat: Downloads tomcat which was tested against the current jBPM version if it is not available

*   hsqldb.databasemanager: Starts the hsqldb database manager

*   install.eclipse: Unzips eclipse, downloads eclipse if it is not available

*   install.jboss: Downloads JBoss if its not available and then unzips it

*   install.jbpm.into.jboss: Installs jBPM into JBoss

*   install.tomcat: Downloads tomcat to ${tomcat.distro.dir} if its not available and then unzips tomcat

*   install.jbpm.into.tomcat: Installs jBPM into tomcat

*   install.examples.into.tomcat: Deploys all the example processes

*   install.signavio.into.jboss: Installs signavio into jboss

*   install.signavio.into.tomcat: Installs signavio into tomcat

*   load.example.identities: Loads the example users and groups into the database

*   reinstall.jboss: Deletes the previous jboss installation and re-installs jboss

*   reinstall.jboss.and.jbpm: Deletes the previous jboss installation and re-installs jboss and installs jbpm in it

*   reinstall.tomcat: Deletes the previous tomcat installation and re-installs tomcat

*   reinstall.tomcat.and.jbpm: Deletes the previous tomcat installation and re-installs tomcat and installs jbpm in it

*   start.eclipse: Starts eclipse

*   start.jboss: Starts jboss and waits till jboss is booted, then lets jboss run in the background

*   start.tomcat: Starts Tomcat and waits till it is booted, then lets Tomcat run in the background

*   stop.jboss: signals jboss to stop, but doesn't wait till its finished

*   stop.tomcat: Signals Tomcat to stop, but doesn't wait till its finished

*   upgrade.jbpm.schema: Upgrades the jBPM tables in the database to the current version

数据库安装


默认数据库安装为hsql所以如果根据实际需要变动数据库类型可以在

${jbpm.home}/install/jdbc修改数据库连接字符串。

要创建数据模式,请运行目标,create.jbpm.schema 在${jbpm.home}/install目录下,

除了创建表和约束外,上述的这个命令还会初始化JBPM_PROPERTY使用当前引擎版本号,基于ID生成编号。

如果要删除模式,只需要简单的运行命令drop.jbpm.schema,不过要注意这个操作会删除jbpm里的所有数据。

jbpm版本号保存在jbpm4_property表在字段key下面的db.version,通过这种方式使以后的版本

可以精确标识。它的ID生成策略和数据库的是一样的。它的下一个ID号的产生是通过计算所有有标识列的

表,然后存储在jbpm4_property表 key下面的next.dbid

 

 

GPD安装


首先启动Eclipse,点击helpàinstall 安装新软件,点击添加,在Add site对话框中点击archive,导航到install/src/gpd/jbpm-gpd-site.zip,点打开,选择该文件,点击Next…….直到完成为止,同意条款,如果要求重新启动,则重新启动下

jbpm2.png


配置JBPM运行时环境


*   点击window-->preferences,选择JBoss jBPM --> jBPM 4 --> Runtime Locations点击添加,如下对话框: 

这时可以导入系统提供的example样例,试着运行下

jbpm3.png


上一篇:JBPM创建一个简单的流程图文说明 下一篇:Freemarker进行list循环常用小技巧