paulwong

          JBPM WEB CONSOLE安裝實錄

          JBPM WEB CONSOLE是一個B/S端的,能管理JBPM的流程和實例。

          1、下載jbpm-jpdl-3.2.3。

          2、安裝TOMCAT 6.0,注意,這個版本的JBPM由于使用了JSF 1.2,而5.5以下的不支持。

          3、安裝ANT。

          4、安裝MYSQL 5.0,建立JBPM表,可以ANT,或在數據庫中執行SCRIPT建立。

          5、制作JBPM CONSOLE的WAR包。
          轉到DOS運行模式,去到deploy目錄,運行ant  customize.console.for.tomcat,生成兩個目錄:customized和target,將缺少的JAR包加入到WAR包中的WEB-INF/lib中,最后完整的JAR包

          activation.jar
          antlr-2.7.6.jar
          asm.jar
          bsh.jar
          cglib.jar
          commons-beanutils-1.8.0.jar
          commons-collections.jar
          commons-digester-1.8.jar
          commons-fileupload.jar
          commons-io.jar
          commons-logging.jar
          dom4j.jar
          gravel.jar
          hibernate3.jar
          jboss-backport-concurrent.jar
          jboss-j2ee.jar
          jboss-retro-1.1.0-rt.jar
          jbpm4jsf.jar
          jbpm-identity.jar
          jbpm-jpdl.jar
          jsf-api.jar
          jsf-facelets.jar
          jsf-impl.jar
          jstl.jar
          mysql-connector-java-5.0.4-bin.jar
          servlet-api.jar
          standard-1.0.6.jar

          修改WEB.XML里面的其中SECURITY元素為:
              <security-role>
                  
          <role-name>admin</role-name>
              
          </security-role>
              
          <security-role>
                  
          <role-name>user</role-name>
              
          </security-role>

              
          <!--
                 Security constraints - uncomment and optionally customize the role name to require
                 a login before access is allowed to the application.

                 Also, be sure to edit jboss-web.xml to configure the security domain if you are
                 deploying inside JBossAS.
              
          -->
              
          <security-constraint>
                  
          <web-resource-collection>
                      
          <web-resource-name>Secure Area</web-resource-name>
                      
          <url-pattern>/sa/*</url-pattern>
                      
          <http-method>GET</http-method>
                      
          <http-method>POST</http-method>
                  
          </web-resource-collection>
                  
          <auth-constraint>
                      
          <role-name>user</role-name>
                      
          <role-name>admin</role-name>
                  
          </auth-constraint>
              
          </security-constraint>

          修改hibernate.cfg.xml
          <property name="hibernate.dialect">org.hibernate.dialect.MySQLDialect</property>


          6、配置TOMCAT。
          把MYSQL的驅動COPY到lib下;增加數據源

            <Resource
              
          type="javax.sql.DataSource"
              name
          ="jdbc/JbpmDataSource"
              url
          ="jdbc:mysql://localhost/jbpm"
              password
          ="888"
              validationQuery
          ="SELECT * FROM jbpm_processdefinition j;"
              driverClassName
          ="com.mysql.jdbc.Driver"
              maxWait
          ="5000"
              username
          ="root"
              maxIdle
          ="2"
              maxActive
          ="4"/>

          增加LOGIN CONSOLE的用戶,有兩種方式
          1)修改tomcat-users.xml為
          <?xml version='1.0' encoding='utf-8'?>
          <tomcat-users>
            
          <role rolename="user"/>
            
          <role rolename="role1"/>
            
          <role rolename="admin"/>
            
          <role rolename="tomcat"/>
            
          <role rolename="manager"/>
            
          <user username="role1" password="tomcat" roles="role1"/>
            
          <user username="admin" password="888" roles="manager,admin,user"/>
            
          <user username="both" password="tomcat" roles="tomcat,role1"/>
            
          <user username="tomcat" password="tomcat" roles="tomcat"/>
          </tomcat-users>

          2)配置用戶從數據庫中讀取,修改jbpm-console.xml:
          <Context>
          <Realm  className="org.apache.catalina.realm.JDBCRealm 
                    driverName="
          com.mysql.jdbc.Driver" connectionURL="jdbc:mysql://localhost:3306/jbpm"
                    connectionName
          ="root" 
                    connectionPassword
          ="自己的密碼"
                    userTable
          ="JBPM_ID_USER u, JBPM_ID_MEMBERSHIP m, JBPM_ID_GROUP g" 
                    userNameCol
          ="g.TYPE_ = 'security-role' AND m.GROUP_ = g.ID_ AND m.USER_ = u.ID_ AND u.NAME_" 
                    userCredCol
          ="DISTINCT u.PASSWORD_"
                    userRoleTable
          ="JBPM_ID_USER u, JBPM_ID_MEMBERSHIP m, JBPM_ID_GROUP g" 
                    roleNameCol
          ="g.NAME_" />
          </Context>

          向數據庫中插入以下數據:
           INSERT INTO JBPM_ID_GROUP VALUES(1,'G','sales','organisation',NULL);
                
          INSERT INTO JBPM_ID_GROUP VALUES(2,'G','admin','security-role',NULL);
                
          INSERT INTO JBPM_ID_GROUP VALUES(3,'G','user','security-role',NULL);
                
          INSERT INTO JBPM_ID_GROUP VALUES(4,'G','hr','organisation',NULL);
                
          INSERT INTO JBPM_ID_GROUP VALUES(5,'G','manager','security-role',NULL);
                
          INSERT INTO JBPM_ID_USER VALUES(1,'U','user','user@sample.domain','user');
                
          INSERT INTO JBPM_ID_USER VALUES(2,'U','manager','manager@sample.domain','manager');
                
          INSERT INTO JBPM_ID_USER VALUES(3,'U','admin','admin@sample.domain','admin');
                
          INSERT INTO JBPM_ID_USER VALUES(4,'U','shipper','shipper@sample.domain','shipper');
                
          INSERT INTO JBPM_ID_MEMBERSHIP VALUES(1,'M',NULL,NULL,2,4);
                
          INSERT INTO JBPM_ID_MEMBERSHIP VALUES(2,'M',NULL,NULL,3,4);
                
          INSERT INTO JBPM_ID_MEMBERSHIP VALUES(3,'M',NULL,NULL,4,4);
                
          INSERT INTO JBPM_ID_MEMBERSHIP VALUES(4,'M',NULL,NULL,4,3);
                
          INSERT INTO JBPM_ID_MEMBERSHIP VALUES(5,'M',NULL,NULL,1,3);
                
          INSERT INTO JBPM_ID_MEMBERSHIP VALUES(6,'M',NULL,NULL,2,3);
                
          INSERT INTO JBPM_ID_MEMBERSHIP VALUES(7,'M',NULL,NULL,3,3);
                
          INSERT INTO JBPM_ID_MEMBERSHIP VALUES(8,'M',NULL,NULL,3,2);
                
          INSERT INTO JBPM_ID_MEMBERSHIP VALUES(9,'M',NULL,NULL,2,2);
                
          INSERT INTO JBPM_ID_MEMBERSHIP VALUES(10,'M',NULL,NULL,2,5);
                
          INSERT INTO JBPM_ID_MEMBERSHIP VALUES(11,'M',NULL,'boss',2,1);
                
          INSERT INTO JBPM_ID_MEMBERSHIP VALUES(12,'M',NULL,NULL,1,1);


          7、啟動TOMCAT,部署剛才生成的WAR包,輸入http://localhost:8080/jbpm-console訪問,用戶名:admin,密碼:888。

          posted on 2009-03-13 15:45 paulwong 閱讀(2565) 評論(1)  編輯  收藏 所屬分類: JBPM

          Feedback

          # re: JBPM WEB CONSOLE安裝實錄 2009-06-02 14:56 暗暗啊

          本人測試了各種說法,后來我升了好多包,終于啟動不抱錯誤,但是沒有最后的啟動信息,卡到JNDI哪.

          信息: Not binding factory to JNDI, no JNDI name configured

          能登陸,但是無法部署工程


          錯誤提示:

          An Error Occurred:
          /sa/deployproc.jsfNo saved view state could be found for the view identifier: /sa/deployproc.jsf

          Caused by:
          javax.faces.application.ViewExpiredException - /sa/deployproc.jsfNo saved view state could be found for the view identifier: /sa/deployproc.jsf


          希望大蝦門把完整的提供出來,去頭恰腦的對于新手很難的!!!!  回復  更多評論   


          主站蜘蛛池模板: 封开县| 琼中| 隆化县| 罗田县| 政和县| 方正县| 阳山县| 南涧| 民权县| 邛崃市| 平远县| 织金县| 榆中县| 南部县| 平邑县| 鹤岗市| 刚察县| 海晏县| 遂平县| 南汇区| 乌拉特前旗| 溧阳市| 姚安县| 金华市| 泽普县| 湛江市| 凌海市| 武胜县| 平阳县| 犍为县| 轮台县| 佳木斯市| 上林县| 南投县| 南宁市| 邵东县| 金昌市| 巴楚县| 申扎县| 葵青区| 长子县|