down: jbpm4.4

down: jbpm4.4

http://sourceforge.net/projects/jbpm

JBPM_HOME = D:\dev\tools\jbpm-4.4

install:
1>gpd

   ${JBPM_HOME}\install\src\gpd\jbpm-gpd-site.zip

2>jpdl-4.4xsd

   ${JBPM_HOME}\src\jpdl-4.4xsd
   Window --> Prsferences-->XML-->XML Catalog-->Add-->File System-->jpdl directory

3> jars

   need:
    ${JBPM_HOME}/jbpm.jar
    ${JBPM_HOME}/lib/*.jar
    mysql.jar
    slf4j-log4j.jar

   unneed:
    servlet-api.jar
    junit.jar
    slf4j-jdk14.jar

4> configuration files

   ${JBPM_HOME}/examples/src
   jbpm.cfg.xml
   logging.properties
   jbpm.hibernate.cfg.xml
 
5> modify
  
    logging.properties
 log4j.rootLogger =ERROR,stdout
 
     jbpm.hibernate.cfg.xml
 org.hibernate.dialect.MySQL5InnoDBDialect
 org.hibernate.dialect.SQLServerDialect
     mysql db connect characterEncoding must UTF-8 OR throw exception workflow sql syntax error

     connect mysql db must be
 jdbc:mysql://localhost:3306/databaseName?useUnicode=true&characterEncoding=utf8
     or throw exception com.mysql.jdbc.exceptions.MySQLIntegrityConstraintViolationException:cannot delete or updatea parent row:

6> database initializing

     ${JBPM_HOME}/install/src/db/create/jbpm.*.create.sql
 or
     jbpm.hernate.cfg.xml hibernate.hbm2ddl.auto=update
    
      @Test
      public void testCreateSchema(){
 new org.hernate.cfg.Configuration().configure("jbpm.hernate.cfg.xml").buildSessionFactory();
      }

use JBPM4.4 :

7> create process engine  ProcessEngine is flow core object

      private ProcessEngine pe = new Configuration().setResource("jbpm.cfg.xml").buildProcessEngine();

8>deploy process flow definition
      @Test
      public void testDeployProcessDefinition() throws Exception {
 pe.getRepositoryService()
   .createDeployment()
   .addResourceFromClasspath("helloworld/HelloWorld.jpbm.xml")
   .addResourceFromClasspath("helloworld/HelloWorld.jpbm.png")
   .deploy();
 }

9> start workflow

      @Test
      public void testStartProcessInstance() throws Exception {
  ProcessInstance pi = pe.getExecutionService().startProcessInstanceByKey("HelloWorld");
  sysout("start success id="+pi.getId()+"\n NAME = "+pi.getnMAE()+"\n key ="+pi.getKey()+"\n getProcessDefinitionId="+pi.getProcessDefinitionId())
   

10> select my unhandle task list testFindMyTaskList

List<Task> taskList = pe.getTaskService().findPersonalTasks(userId);
for(Task task: taskList) {
sysout("id = "+task.getId()....)
}

11> handle business  testCompleteTask

  String taskId="";
  pe.getTaskService().completeTask(taskId);


12>


USE DB :
 

 

 

 

 

jboss-6.0.0.Final
  ================================== 


  <Connector port="80" address="3.242.164.58"
     maxThreads="700" maxHttpHeaderSize="8192"
     emptySessionPath="true" protocol="HTTP/1.1"
     enableLookups="false" redirectPort="8443" acceptCount="100"
     connectionTimeout="20000" disableUploadTimeout="true" URIEncoding="UTF-8"/>
    
.envronment installation priray stemp:
  1.anstall jdk
  2.env
    JAVA_HOME=
    PATH=${JAVA_HOME}/bin
    JAVA_OPTS="-server -Xms800m -Xmx800m  -XX:PermSize=64M -XX:MaxNewSize=256m -XX:MaxPermSize=128m -Djava.awt.headless=true "
  JAVA_OPTS="-server -Xms768m -Xmx768m -XX:PermSize=128m -XX:MaxPermSize=256m -XX: NewSize=192m -XX:MaxNewSize=384m"
    ANT_HOME=
    PATH=${ANT_HOME}/bin
    ANT_OPTS=
    MAVEN_HOME=
    PATH=${MAVEN_HOME}/bin
    MAVE_OPTS=
    JBOSS6_HOME=
    PATH=${JBOSS6_HOME}/bin
    JBOSS6_OPTS=
    CATALINA_HOME=
    PATH=${CATALINA_HOME}/bin
    CATALINA_OPTS=
 CATALINA_OPTS="-server -Xms768m -Xmx768m -XX:PermSize=128m -XX:MaxPermSize=256m -XX:NewSize=192m -XX:MaxNewSize=384m"
二.Common path
  1.service start/close
    sh {JBOSS6_HOME}/bin/run.sh
    sh {JBOSS6_HOME}/bin/shutdown.sh -S
  2.application deploy
    {JBOSS6_HOME}/server/default/deploy/
  3.端口改变
       {JBOSS_HOME}/server/default/deploy/ejb3-connectors-jboss-beans.xml 
     3873=>2873
    {JBOSS_HOME}/server/default/conf/bindingservice.beans/META-INF/bindings-jboss-beans.xml
    8080-->8081
    1090  =>1190
    1098  =>1198
    4446  =>3446
    5445  =>5450
    8083  =>8085
    4813  =>4820
    1091  =>1191
    1099  =>1199
    5455  =>5460 
    8009  =>8109
    5501  =>5503
    5500-->5502

 

你可能感兴趣的:(JBPM4.4)