JBPM-Getting Started

2008-02-23 09:33:53来源:互联网 阅读 ()

新老客户大回馈,云服务器低至5折

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

      标签:

      版权申明:本站文章部分自网络,如有侵权,请联系:west999com@outlook.com
      特别注意:本站所有转载文章言论不代表本站观点,本站所提供的摄影照片,插画,设计作品,如需使用,请与原作者联系,版权归原作者所有

上一篇:模式笔记——观察者模式

下一篇:快速排序方法Java实现与分析。