手机站
网通分站
电信主站
密 码:
用户名:
当前位置 : 主页>程序设计>Java技术>列表

JBPM-Getting Started

来源:互联网 作者:west263.com 时间:2008-02-23
西部数码-全国虚拟主机10强!40余项虚拟主机管理功能,全国领先!双线多线虚拟主机南北访问畅通无阻!免费赠送企业邮局,.CN域名,自助建站480元起,免费试用7天,满意再付款! P4主机租用799元/月.月付免压金!

Getting Started

This page describes the fastest way to get jbpm up and running on your system, including the demo Webapplication.

Required software

jBpm 2.0 is tested on a Windows XP machine with following software packages installed :
  • 'J2SE SDK v 1.4.2_03', downloaded from http://java.sun.com/j2se/1.4.2/download.html
  • 'Apache Ant version 1.6.1', downloaded from http://ant.apache.org/bindownload.cgi
  • Optionally, you can deploy jbpm on the JBoss J2EE server. 'JBoss 3.2.5', download from http://prdownloads.sourceforge.net/jboss/jboss-3.2.5.zip?download, unzip and set the JBOSS_HOME environment variable

Getting jBpm

The easiest way to get the latest released sources is from the sourceforge download site.

To get the latest sources from cvs, provide this information to you cvs-client :

  • Connection type: pserver
  • User: anonymous
  • Password:
  • Host: cvs.sourceforge.net
  • Port: 2401 (which is the default)
  • Repository path: /cvsroot/jbpm
  • Label: :pserver:anonymous@cvs.sourceforge.net:/cvsroot/jbpm
Then checkout module jbpm2.

Installation

  1. unzip jbpm to a folder of your choice
  2. update the configs in build.properties to your environment with your favorite text editor
  3. in directory ${jbpm.home} run 'ant configure.jboss.3.2.3 '. (the same task works for jboss-3.2.5) That creates a jbpm configuration ${jboss.home}/server/jbpm which is basically a copy of the 'all' configuration. The only difference is that 2 files are added to the deploy directory : jbpm-db-service.XML and jbpm-ds.xml
  4. start the jbpm configuration of jboss with '%JBOSS_HOME%/bin/run.bat -c jbpm'.
  5. in directory ${jbpm.home}/web run 'ant deploy'. This will build and deploy the web application to the jboss configuration that we've just created.
  6. in directory ${jbpm.home}/web run 'ant deploy.process.archives'. This deploys the demo payraise process to the jbpm database in jboss. Since this is normally your first jbpm Access to the database, this will also create the jbpm tables automatically.
  7. surf to http://localhost:8080/jbpm

The process archive input

Now you can take a look at the process archive that served as the input for jbpm. You can find the process archive at ${jbpm.home}/web/target/payraiseprocess.par. Open it with winzip or any other similar tool that knows how to open jar (Java archive) files.
  processdefinition.xml

  forms.xml

  forms

     evaluating.form

     request.form

     treat.form

     update.ERP.form

     payraise.gif

contents of the payraiseprocess.par

processdefinition.xml contains the formal description of the process. in the jPdl xml language. That file is used by the core engine. All the other files are used by the webapplication to create a web interface for the process. forms.xml specifies the relation between the different states in the process and the forms. The forms contain the html for the forms.

Directory structure

The directory structure of the sub projects core, tools & EJB complies with the maven directory layout http://maven.apache.org/reference/dirlayout.html Note that only ant is used for the build process. We just use the same directory structure as in a maven project. The most important part is that in every subdir src/java contains the java source files that will be packaged and src/test/java contains all unit test related source files.
  • core: is the sub module for the jbpm.core.jar package
  • web: is the sub module for the jbpm.war package
  • ejb: is the sub module for the jbpm.ejb.jar package
  • doc: contains all the documentation available for jbpm
  • lib: contains all the used libraries and their licenses
  • example: contains a template project for developing processes

Overview of the jBpm packages

core

  • produced file : core/target/jbpm.core.jar
  • is the complete jbpm workflow engine
  • runnable in a J2SE environment
  • accessible through an easy to use API
  • libs required by jbpm.core.jar :
    • lib/commons/*.jar
    • lib/Hibernate/*.jar
    • database driver classes (e.g. lib/hsqldb/hsqldb.jar)

web

  • produced files : web/target/jbpm.war and web/target/payraiseprocess.par
  • is a web application that is created for 2 purposes :
    • rapid prototyping : with a simple xml-file and a few form files in the process archive, you can create a webapplication for your processes
    • as the basis for a custom web application

      文章整理:西部数码--专业提供域名注册虚拟主机服务
      http://www.west263.com
      以上信息与文章正文是不可分割的一部分,如果您要转载本文章,请保留以上信息,谢谢!