当前位置: 首页 > 工具软件 > Bonita > 使用案例 >

Bonita Windows7、Tomcat6下安装

邹驰
2023-12-01
apache-tomcat-6.0.18
apache-ant-1.7.1
jdk1.6
mysql-essential-5.1.48-win32.msi
mysql-connector-java-5.1.13.zip
BOS-5.1-win-setup.exe
建立 一个'Bonita_Process'目录
安装BOS-5.1-win-setup.exe后,建立一个流程My Process
执行:

-----------------------------------------------------------
- Export the Process and its Application
-----------------------------------------------------------

  Start Bonita studio and open your process.  In my case, it was 'MyProcess'.

  - Click on 'Process' and then 'Export...' to generate the BAR file.
  - For the save Location, select the 'Bonita_Process' folder created earlier.
    Process file 'MyProcess--1.0.bar' will be created in this folder.
 
  - Click on 'Process' and then on 'Export Application' to generate the required
    application files of the process.

  - Click on checkbox to select 'Export UserXP' and then 'All UserXP'
  - Click on checkbox to select 'Export Runtime'
  - Click on checkbox to select 'Extract selected War libraries outside......'

    This will ensure that all required files will be generated.

  - From the process list, click on checkbox to select 'MyProcess'
    (Your process name may be different)
  - For the save Location, click on Browse to select the 'Bonita_Process' folder created earlier.
  - Click on 'Export'

  - File 'bonita_application.zip' will be created in the 'Bonita_Process' folder.
  - Unzip the file in the same folder.  You should get the following folders/file.

      - common-war-lib
      - conf
      - runtime
      - wars
      - INSTALL.txt

----------------------------------------------------------------------
- Prepare the Configuration files and Environments
----------------------------------------------------------------------

  From the C:\BONITA_PROCESS\runtime\conf folder,

  Edit the bonita-environment.xml file ( I edited by opening in Windows WordPad ) for
  the hibernate-configuration sections for 'core' and 'history'

      -----------------------------------------------------------------------------------------
      <!-- Description: Configuration of the Hibernate session factory used by Bonita core. --&gt
     
        file='C:\BONITA_PROCESS\runtime\conf\hibernate-core.properties' />注意file原来是resource,一定要改为file
       
       
     

      <!-- Description: Configuration of the Hibernate session factory used by Bonita history. --&gt
     
        file='C:\BONITA_PROCESS\runtime\conf\hibernate-history.properties' />
       
       
     
      -----------------------------------------------------------------------------------------

  edit the hibernate-core.properties file.  Change only the below given lines.

      -----------------------------------------------------------------------------------------
      hibernate.dialect                      org.hibernate.dialect.MySQLInnoDBDialect
      hibernate.connection.driver_class      com.mysql.jdbc.Driver
      hibernate.connection.url               jdbc:mysql://localhost:3306/bonita_core
      hibernate.connection.shutdown                     true
      hibernate.connection.username          root
      hibernate.connection.password          root
      -----------------------------------------------------------------------------------------

  IMPORTANT:  Be sure to remove the line showing 'hibernate.hbm2ddl.auto'.
  Otherwise, as per Bonita guide, the migration won't work and you might lose
  the data in your database.

  edit the hibernate-history.properties file.  Change only the below given lines.

      -----------------------------------------------------------------------------------------
      hibernate.dialect                      org.hibernate.dialect.MySQLInnoDBDialect
      hibernate.connection.driver_class      com.mysql.jdbc.Driver
      hibernate.connection.url               jdbc:mysql://localhost:3306/bonita_history
      hibernate.connection.shutdown                     true
      hibernate.connection.username          root
      hibernate.connection.password          root
      -----------------------------------------------------------------------------------------

  IMPORTANT:  Be sure to remove the line showing hibernate.hbm2ddl.auto.
  Otherwise, as per Bonita guide, the migration won't work and you might lose the data in your database.

  From the 'D:\BONITA_SETUP\mysql-connector-java-5.1.12 folder',

  copy the file 'mysql-connector-java-5.1.12-bin.jar' into
  folder 'D:\BONITA_PROCESS\runtime\lib\server'

建立bonita_core和bonita_history数据库  编码集utf-8和校验集utf8_bin

初始化数据库
C:\bonita_process\runtime>下执行 ant init-db Enter
输入: hibernate-configuration:core回车 成功
下执行 ant init-db Enter
输入: hibernate-configuration:history回车 成功

-----------------------------
- Deploy in Tomcat
-----------------------------

  * Copy ALL files
   
    - from C:\BONITA_PROCESS\common-war-lib              TO  C:\Tomcat_6026\lib
      If asked 'Overwrite?', say yes.

    - from C:\BONITA_PROCESS\runtime\conf                TO  C:\Tomcat_6026\conf
      If asked 'Overwrite?', say yes.

    - from C:\BONITA_PROCESS\runtime\lib\server folder   TO  C:\Tomcat_6026\lib
      If asked 'Overwrite?', say yes.

  * Copy ALL files

    - from D:\BONITA_PROCESS\wars                        TO  C:\Tomcat_6026\webapps

-----------------------------------------------
- Modify bonita-environment.xml
-----------------------------------------------

  * The bonita-environment.xml file copied to Tomcat in the earlier step has
    hibernate path refering to C:\BONITA_PROCESS\runtime\conf folder.  This we had
    done for initilising the database through 'init-db'.

    Now, this path to be edited to refer the Tomcat folder.

  * From the C:\Tomcat_6026\conf folder,

    Edit the bonita-environment.xml file ( I edited by opening in Windows WordPad )
    for the hibernate-configuration sections for 'core' and 'history'

      --------------------------------------------------------------------------------------------
      <!-- Description: Configuration of the Hibernate session factory used by Bonita core. --&gt
     
       
       
       
     

      <!-- Description: Configuration of the Hibernate session factory used by Bonita history. --&gt
     
       
       
       
     
      --------------------------------------------------------------------------------------------

修改catalina.bat文件
在set JAVA_OPTS的末尾添加 -Djava.security.auth.login.config="%CATALINA_BASE%\conf\jaas-standard.cfg" -Dorg.ow2.bonita.environment="%CATALINA_BASE%\conf\bonita-environment.xml"

启动tomcat
IE中输入http://localhost:8080/bonita

完成!
摘自bonita论坛


来自 “ ITPUB博客 ” ,链接:http://blog.itpub.net/118838/viewspace-667607/,如需转载,请注明出处,否则将追究法律责任。

转载于:http://blog.itpub.net/118838/viewspace-667607/

 类似资料: