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

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

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

    Vanlin Study Club

    Java Js Flex

    Spring integration with jBPM4{PPT}

    Spring integration with jBPM4



























    來自http://zhyi-12.javaeye.com/blog/375061 的實(shí)現(xiàn)

    數(shù)據(jù)庫:mysql

    集成項(xiàng):spring2.5  hibernate3.3  jbpm4

    相關(guān)的類:

    org.jbpm.pvm.internal.cfg.JbpmConfiguration (其中的buildProcessEngine方法 有些東西沒有合并進(jìn)去,可能會(huì)有些問題 ,有興趣的可以探尋下)

    org.jbpm.pvm.internal.cfg.SpringConfiguration(Tom Baeyens在TODO中,這個(gè)是ainze寫的)

     

    org.jbpm.pvm.internal.env.SpringPvmEnvironment(ainze)

     

    org.jbpm.pvm.internal.spring.SpringConfigurationFactoryBean(ainze)

     

     

    (jbpm.cfg.xml中只需要注釋掉hibernate的配置即可)

     

    spring 配置--使用了SpringConfigurationFactoryBean(調(diào)整自ainze)的方式配置時(shí) 這個(gè)就是spring集成的最簡配置

    Xml代碼 
    1. <!-- jbpm4配置   -->  
    2.     <bean id="configuration" class="org.jbpm.spring.cfg.SpringConfigurationFactoryBean">  
    3.         <property name="jbpmConfigurationLocation" value="jbpm.cfg.xml"></property>  
    4.         <property name="sessionFactory" ref="sessionFactory" />  
    5.     </bean>  

     

    測試代碼--org.jbpm.spring.test.AbstractTransactionalSpringJbpmTestCase(author Andries Inze)

    Java代碼 
    1. public class SimpleProcessTest  extends AbstractTransactionalSpringJbpmTestCase{  
    2.    
    3.  @Override  
    4.  protected String[] getConfigLocations() {  
    5.   return new String[]{"classpath:test-context-hibernate.xml"};  
    6.  }  
    Java代碼 
    1.  public void test1(){  
    2.    deployJpdlXmlString(   
    3.      "<process name='p'>"   
    4.      + " <start>"   
    5.      + "  <transition to='a'/>"  
    6.      + " </start>"   
    7.      + " <state name='a'>"   
    8.      + "   <transition to='b'/>"  
    9.      + "</state>"  
    10.      + " <state name='b'>"   
    11.      + "   <transition to='c'/>"  
    12.      + "</state>"  
    13.      + " <state name='c'/>"   
    14.       + "</process>");  
    15.      
    16.      
    17.    Execution execution = executionService.startProcessInstanceByKey("p");  
    18.    execution = executionService.findExecutionById(execution.getId());//.findExecution(execution.getId());  
    19.    assertNotNull(execution);  
    20.    assertEquals("a", execution.getActivityName());  
    21.      
    22.   //a流向b   
    23.    execution = executionService.signalExecutionById(execution.getId());  
    24.    assertNotNull(execution);  
    25.    assertEquals("b", execution.getActivityName());  
    26.      
    27.   //b流向c   
    28.    execution = executionService.signalExecutionById(execution.getId());  
    29.    assertNotNull(execution);  
    30.    assertEquals("c", execution.getActivityName());  
    31.    //再次啟動(dòng)流程  
    32.    execution = executionService.startProcessInstanceByKey("p");  
    33.   //第三次啟動(dòng)流程  
    34.    execution = executionService.startProcessInstanceByKey("p");  
    35.      
    36.    assertEquals(3,executionService.createProcessInstanceQuery().list().size());  
    37.  }  
    38. }  

     

    posted on 2009-10-12 16:00 vanlin 閱讀(474) 評論(0)  編輯  收藏 所屬分類: jbpm

    主站蜘蛛池模板: 亚洲国产最大av| 黄页网址大全免费观看12网站| 中文字幕在线免费观看视频| 亚洲av成人一区二区三区在线播放| 亚洲AV无码无限在线观看不卡 | 亚洲免费精彩视频在线观看| 日本免费A级毛一片| 免费观看一区二区三区| 国产情侣久久久久aⅴ免费| 免费无码又爽又刺激网站| 久久国产乱子伦精品免费午夜 | 特黄aa级毛片免费视频播放| 国产av无码专区亚洲av毛片搜 | 88av免费观看| av无码免费一区二区三区| 免费三级毛片电影片| 中国在线观看免费高清完整版 | 99热在线日韩精品免费| 中文字幕一区二区三区免费视频| 色播在线永久免费视频网站| 一级毛片在线免费看| 亚洲国产精品免费在线观看| 欧洲乱码伦视频免费| 永久免费视频v片www| 国产精品亚洲二区在线观看| 亚洲国产精品嫩草影院在线观看 | 国产免费怕怕免费视频观看| 亚洲国产精品无码久久青草| 亚洲精品无码久久久久去q| 久久亚洲精品成人AV| 亚洲综合欧美色五月俺也去| 国产亚洲日韩在线a不卡| a级毛片免费高清毛片视频| 曰批全过程免费视频播放网站| 黄a大片av永久免费| JLZZJLZZ亚洲乱熟无码| 亚洲天堂视频在线观看| 亚洲欧洲专线一区| 精品国产免费人成网站| 国产精品1024永久免费视频| 亚洲av无码国产精品色在线看不卡 |