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

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

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

    網(wǎng)路冷眼@BlogJava

    熙熙攘攘一閑人 以冷靜的眼光觀察技術(shù)
    posts - 88, comments - 193, trackbacks - 0, articles - 28
      BlogJava :: 首頁 :: 新隨筆 :: 聯(lián)系 :: 聚合  :: 管理

    Extend the migration logic

    擴(kuò)展遷移邏輯

    The migration logic is written in such a way, that it is easy to extend to suit your needs. The source code is available as a Maven 2 project in the srcsubfolder of the downloaded zip file. To build a new zip file, after having changed or extended the logic, simply execute a

    遷移邏輯可以編寫,以便輕松地滿足你的需求。源代碼在所下載zip文件里src子文件夾里作一個Maven 2項目來使用。為了構(gòu)建一個新的zip文件,在已經(jīng)改變或者擴(kuò)展邏輯之后,簡單執(zhí)行下面指令

     mvn clean install

     

    to produce a new zip file in the target folder.

    在target文件下產(chǎn)生一個新的zip文件。

    Following picture gives a high-level overview of the classes in the migration logic.

    下圖提供了在遷移邏輯里類的高層次概貌。

    migration.code.overview

    • Both the ProcessConversion and ProcessDataMigration classes have a main method that directly is called from the ant build script in the root of the migration zip.
    • ProcessConversion and ProcessDataMigration 這兩個類都有在遷移zip的根目錄下的ant構(gòu)建腳本里調(diào)用的main方法。
    • These classes construct a ServiceFactory based on the two properties files, using a static factory method
    • 通過使用靜態(tài)的工廠方法,基于兩個properties文件這些類構(gòu)建一個ServiceFactory
    ServiceFactory.configureFromProperties(jbpmDbProperties, activitiDbProperties);
    • The services are constructed by the ServiceFactory (eg. getProcessConversionService()) and are used to execute the migration logic:
    • 通過ServiceFactory (eg. getProcessConversionService())構(gòu)建這些服務(wù),這些服務(wù)被用來執(zhí)行遷移邏輯:
     1 public void execute() throws IOException {
     2     
     3   // convert processes
     4   ServiceFactory serviceFactory = createServiceFactory();
     5   ProcessConversionService processConversionService = serviceFactory.getProcessConversionService();
     6   Map<String, Document> migratedProcesses = processConversionService.convertAllProcessDefinitions();
     7   
     8   // write results to bpmn20.xml files
     9   writeConvertedProcesses(migratedProcesses, workingDir);
    10     
    11   // Deploy processes to Activiti
    12   ActivitiService activitiService = serviceFactory.getActivitiService();
    13   activitiService.deployConvertedProcesses(migratedProcesses);
    14     
    15   // data migration
    16   
    17 }
    • The ProcessConversionService is an interface that contains process conversion and process definition data retrievel operations. It uses an implementation of Jbpm3Dao. The default implementation of this class uses a Hibernate SessionFactory to retrieve all the data from jBPM 3 tables.

    The ActivitiService offers operation needed to get the migrated data in the Activiti tables. For example, deploying the converted process definitions is such an operation

    ProcessConversionService 是一個包含流程轉(zhuǎn)換和數(shù)據(jù)檢索的流程定義借口。它使用了 Jbpm3Dao.的實現(xiàn)。這個類的缺省實現(xiàn)使用了Hibernate的SessionFactory從jBPM 3的數(shù)據(jù)庫表里檢索所有的數(shù)據(jù)。

    ActivitiService 提供需要從Activiti數(shù)據(jù)庫表遷移數(shù)據(jù)的操作。例如,部署轉(zhuǎn)換之后的流程定義就是如此的操作。

    • All these dependencies, ProcessConversionService, Jbpm3Dao, Sessionfactory, ActivitiService and ProcessEngine, are interfaces and can be implemented by your own implementation. You can inject them into the ServiceFactory using regular JavaBean setters. When no such custom implementation is set, the ServiceFactory will fall back to creating the default implementation:
    • 所有這些依賴, ProcessConversionService, Jbpm3Dao, Sessionfactory, ActivitiService 和 ProcessEngine都是接口,并能由你自己實現(xiàn)。采用正常的JavaBean設(shè)置器,能將它們注入到ServiceFactory。當(dāng)沒有設(shè)置這些實現(xiàn),ServiceFactory將后退一步,建立缺省的實現(xiàn):
        1 public ProcessConversionService getProcessConversionService() {
    
     2   if (processConversionService == null) {
     3     this.processConversionService = createDefaultProcessConversionService();
     4   } 
     5   return processConversionService;
     6 }
     7 
     8 protected ProcessConversionService createDefaultProcessConversionService() {
     9   ProcessConversionServiceImpl service = new ProcessConversionServiceImpl(getJbpm3Dao());
    10   return service;
    11 }
               

    評論

    # re: Activiti User Guide(Activiti用戶指南)-Chapter 18. JBPM Migration(JBPM 遷移)(2)[未登錄]  回復(fù)  更多評論   

    2012-05-09 12:29 by hh
    事務(wù)能一起控制嗎?

    # re: Activiti User Guide(Activiti用戶指南)-Chapter 18. JBPM Migration(JBPM 遷移)(2)  回復(fù)  更多評論   

    2014-07-11 14:01 by cheap nikes
    同一樓
    主站蜘蛛池模板: 亚洲欧洲日本天天堂在线观看| 亚洲高清成人一区二区三区| 日韩免费在线视频| 国产精品亚洲视频| 一级黄色免费毛片| 日日噜噜噜噜夜夜爽亚洲精品| 四虎国产精品成人免费久久| 亚洲国产a级视频| 国产成人无码免费看片软件| 亚洲中文字幕在线第六区| 一个人免费观看日本www视频| 狠狠色婷婷狠狠狠亚洲综合 | 亚洲精品无码久久久久YW| 在线视频免费国产成人| 老湿机一区午夜精品免费福利| 亚洲国产综合久久天堂| 巨胸喷奶水www永久免费| 亚洲国产高清人在线| 国产成人福利免费视频| 亚洲国产精品18久久久久久| 免费**毛片在线播放直播| 久久久精品视频免费观看| 亚洲人成网址在线观看| 97人伦色伦成人免费视频| 亚洲精品tv久久久久久久久 | 午夜无遮挡羞羞漫画免费| 免费成人黄色大片| 日批视频网址免费观看| 好爽又高潮了毛片免费下载| 国产亚洲精品美女| 亚洲国产婷婷六月丁香| 999在线视频精品免费播放观看| 亚洲爆乳精品无码一区二区| 亚洲日本一区二区三区在线| 亚州免费一级毛片| 在线观看亚洲精品专区| 久久精品国产亚洲AV网站| 免费观看的a级毛片的网站| 国产日韩AV免费无码一区二区| 亚洲专区一路线二| 在线A亚洲老鸭窝天堂|