<rt id="bn8ez"></rt>
<label id="bn8ez"></label>

  • <span id="bn8ez"></span>

    <label id="bn8ez"><meter id="bn8ez"></meter></label>

    KK

    Kim-'s-Blog.Object-Everything.I'm POJO.

    .紀(jì)-錄.爲(wèi)了忘卻的記憶..真的勇士,要敢于直面遇到的問(wèn)題,敢于正視繁雜的原碼......在實(shí)踐中積累!

      BlogJava :: 首頁(yè) :: 聯(lián)系 :: 聚合  :: 管理
      74 Posts :: 1 Stories :: 70 Comments :: 0 Trackbacks
    前段時(shí)間對(duì) JBPM 4.0 Spring 2.6 進(jìn)行了整合
    方法有幾種,經(jīng)過(guò)比較感覺(jué)原生集成較好~
    整合后的結(jié)構(gòu):
    src\resources
    src\resources\jbpm
    src\resources\jbpm\jbpm.cfg.xml
    src\resources\jbpm\jbpm.default.cfg.xml
    src\resources\jbpm\jbpm.tx.hibernate.cfg.xml

    src\resources\jbpm\jbpm.mail.properties
    src\resources\jbpm\jbpm.mail.templates.examples.xml
    src\resources\jbpm\logging.properties
    src\resources\spring\applicationContext-jbpm.xml
    src\resources\spring\applicationContext-hibernate.xml


    重點(diǎn)是5個(gè)標(biāo)色文件
    jbpm.cfg.xml
    <?xml version="1.0" encoding="UTF-8"?>

    <jbpm-configuration>

      
    <import resource="jbpm/jbpm.default.cfg.xml" />
      
    <import resource="jbpm/jbpm.tx.hibernate.cfg.xml" />
      
    <import resource="jbpm.jpdl.cfg.xml" />
      
    <import resource="jbpm.identity.cfg.xml" />

      
    <!-- Job executor is excluded for running the example test cases. -->
      
    <!-- To enable timers and messages in production use, this should be included. -->
      
    <!--
      <import resource="jbpm.jobexecutor.cfg.xml" />
      
    -->

      
    <import resource="jbpm/jbpm.mail.templates.examples.xml" />
      
      
    <process-engine-context>
        
    <command-service>
          
    <retry-interceptor />
          
    <environment-interceptor />
          
    <spring-transaction-interceptor />
        
    </command-service>
      
    </process-engine-context>

      
    <transaction-context>
        
    <transaction />
        
    <hibernate-session />
      
    </transaction-context>

    </jbpm-configuration>

    jbpm.default.cfg.xml
    <?xml version="1.0" encoding="UTF-8"?>

    <jbpm-configuration>

      
    <process-engine-context>
      
        
    <repository-service />
        
    <repository-cache />
        
    <execution-service />
        
    <history-service />
        
    <management-service />
        
    <identity-service />
        
    <task-service />
        
    <!--kim
        <hibernate-configuration>
          <cfg resource="jbpm.hibernate.cfg.xml" />     
        </hibernate-configuration>

        <hibernate-session-factory />
        !
    -->
        
    <script-manager default-expression-language="juel"
                        default-script-language
    ="juel">
          
    <script-language name="juel" factory="org.jbpm.pvm.internal.script.JuelScriptEngineFactory" />
        
    </script-manager>
        
        
    <authentication />

        
    <id-generator />
        
    <types resource="jbpm.variable.types.xml" />

        
    <address-resolver />

        
    <business-calendar>
          
    <monday    hours="9:00-12:00 and 12:30-17:00"/>
          
    <tuesday   hours="9:00-12:00 and 12:30-17:00"/>
          
    <wednesday hours="9:00-12:00 and 12:30-17:00"/>
          
    <thursday  hours="9:00-12:00 and 12:30-17:00"/>
          
    <friday    hours="9:00-12:00 and 12:30-17:00"/>
          
    <holiday period="01/07/2008 - 31/08/2008"/>
        
    </business-calendar>
        
        
    <mail-template name='task-notification'>
          
    <to users="${task.assignee}"/>
          
    <subject>${task.name}</subject>
          
    <text><![CDATA[Hi ${task.assignee},
    Task "${task.name}" has been assigned to you.
    ${task.description}

    Sent by JBoss jBPM
    ]]></text>
        
    </mail-template>
      
        
    <mail-template name='task-reminder'>
          
    <to users="${task.assignee}"/>
          
    <subject>${task.name}</subject>
          
    <text><![CDATA[Hey ${task.assignee},
    Do not forget about task "${task.name}".
    ${task.description}

    Sent by JBoss jBPM
    ]]></text>
        
    </mail-template>
      
      
    </process-engine-context>

      
    <transaction-context>
        
    <repository-session />
        
    <db-session />
        
        
    <message-session />
        
    <timer-session />
        
    <history-session />
        
    <mail-session>
          
    <mail-server>
            
    <session-properties resource="jbpm.mail.properties" />
          
    </mail-server>
        
    </mail-session>
      
    </transaction-context>

    </jbpm-configuration>

    jbpm.tx.hibernate.cfg.xml
    <?xml version="1.0" encoding="UTF-8"?>

    <jbpm-configuration>

      
    <process-engine-context>
        
    <command-service>
          
    <retry-interceptor />
          
    <environment-interceptor />
          
    <!-- <standard-transaction-interceptor /> -->
          
    <spring-transaction-interceptor current="true" /> 
        
    </command-service>
      
    </process-engine-context>
      
    <!--kim  
      <transaction-context>
        <transaction />
        <hibernate-session />
      </transaction-context>
      
    -->
      
    <transaction-context>
        
    <hibernate-session current="true"/>
      
    </transaction-context>
      

    </jbpm-configuration>

    applicationContext-jbpm.xml
    <?xml version="1.0" encoding="UTF-8"?>
    <!DOCTYPE beans PUBLIC "-//SPRING//DTD BEAN 2.0//EN" "http://www.springframework.org/dtd/spring-beans-2.0.dtd">
    <beans>

        
    <bean id="jbpmConfiguration" class="org.jbpm.pvm.internal.cfg.SpringConfiguration">
               
    <constructor-arg value="jbpm/jbpm.cfg.xml" />
        
    </bean>
        
    <bean id="processEngine" factory-bean="jbpmConfiguration" factory-method="buildProcessEngine" />
        
    <bean id="repositoryService" factory-bean="processEngine" factory-method="getRepositoryService" />
        
    <bean id="executionService" factory-bean="processEngine" factory-method="getExecutionService" />
        
    <bean id="historyService" factory-bean="processEngine" factory-method="getHistoryService" />
        
    <bean id="managementService" factory-bean="processEngine" factory-method="getManagementService" />
        
    <bean id="taskService" factory-bean="processEngine" factory-method="getTaskService" />
        
    <bean id="identityService" factory-bean="processEngine" factory-method="getIdentityService" />

    </beans>

    applicationContext-hibernate.xml (片段)

    <bean id="sessionFactory" class="org.springframework.orm.hibernate3.annotation.AnnotationSessionFactoryBean" parent="AbstractSessionFactory">
            
    <property name="annotatedClasses">
                
    <list>
                    
    <value>xxxxxxxxxxxxxxxxxxxxxxxxxxxxxx</value>
    </list>
            
    </property>
            
    <property name="mappingResources">
                
    <list>
                    
    <value>jbpm.repository.hbm.xml</value>
                    
    <value>jbpm.execution.hbm.xml</value>
                    
    <value>jbpm.history.hbm.xml</value>
                    
    <value>jbpm.task.hbm.xml</value>
                    
    <value>jbpm.identity.hbm.xml</value>
                
    </list>
            
    </property>
            
        
    </bean>

    另外該有的Jar包都要有哦~
    posted on 2009-08-21 15:19 Kim' 閱讀(1916) 評(píng)論(1)  編輯  收藏

    Feedback

    # re: JBPM 4.0 使用問(wèn)題 -- 3:也談 JBPM 4 整合Spring.. 2009-08-21 17:40 99讀書(shū)人
    不錯(cuò)啊!  回復(fù)  更多評(píng)論
      


    只有注冊(cè)用戶登錄后才能發(fā)表評(píng)論。


    網(wǎng)站導(dǎo)航:
     
    jj
    主站蜘蛛池模板: 6080午夜一级毛片免费看| 亚洲AV无码一区二区三区在线观看 | 亚洲综合亚洲国产尤物| 男的把j放进女人下面视频免费| 亚洲日韩中文字幕日韩在线| yellow视频免费看| 国产精品亚洲综合专区片高清久久久| 特级做a爰片毛片免费看| 久久99国产乱子伦精品免费 | 亚洲第一精品在线视频| 亚洲av乱码中文一区二区三区| 久久国产精品免费专区| 久久久亚洲欧洲日产国码二区| 131美女爱做免费毛片| 激情综合亚洲色婷婷五月APP| 免费看黄的成人APP| 久久精品亚洲综合一品| 九九全国免费视频| 情人伊人久久综合亚洲| 一级毛片在线播放免费| 久久亚洲伊人中字综合精品| 黄页网站免费观看| 亚洲理论片在线中文字幕| 野花高清在线观看免费完整版中文| 亚洲а∨精品天堂在线| 亚洲日韩中文无码久久| 深夜福利在线视频免费| 亚洲精品狼友在线播放| 中文在线免费看视频| 在线免费观看亚洲| 日韩免费观看一级毛片看看| 久久性生大片免费观看性| 国产乱子伦片免费观看中字| 亚洲youwu永久无码精品| 亚洲日韩av无码| 成年网站免费视频A在线双飞| 免费一级毛片在线播放放视频| 久久精品国产精品亚洲艾| 麻豆国产入口在线观看免费 | 一级毛片免费不卡直观看| 99人中文字幕亚洲区|