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

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

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

    網路冷眼@BlogJava

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

    Extend the migration logic

    擴展遷移邏輯

    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項目來使用。為了構建一個新的zip文件,在已經改變或者擴展邏輯之后,簡單執行下面指令

     mvn clean install

     

    to produce a new zip file in the target folder.

    在target文件下產生一個新的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構建腳本里調用的main方法。
    • These classes construct a ServiceFactory based on the two properties files, using a static factory method
    • 通過使用靜態的工廠方法,基于兩個properties文件這些類構建一個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())構建這些服務,這些服務被用來執行遷移邏輯:
     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 是一個包含流程轉換和數據檢索的流程定義借口。它使用了 Jbpm3Dao.的實現。這個類的缺省實現使用了Hibernate的SessionFactory從jBPM 3的數據庫表里檢索所有的數據。

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

    • 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都是接口,并能由你自己實現。采用正常的JavaBean設置器,能將它們注入到ServiceFactory。當沒有設置這些實現,ServiceFactory將后退一步,建立缺省的實現:
        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)[未登錄]  回復  更多評論   

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

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

    2014-07-11 14:01 by cheap nikes
    同一樓
    主站蜘蛛池模板: 亚洲综合免费视频| a色毛片免费视频| 女人与禽交视频免费看| 亚洲国产成人久久99精品| 日韩内射激情视频在线播放免费| 亚洲色精品vr一区二区三区| 在线视频网址免费播放| 中文字幕亚洲一区二区三区| 三年片免费观看大全国语| 狠狠色伊人亚洲综合成人| 黄桃AV无码免费一区二区三区 | 久久被窝电影亚洲爽爽爽| 两个人看的www高清免费观看| 亚洲中文字幕无码不卡电影| 国产色无码精品视频免费| 久久亚洲精品中文字幕| 国产精品久久永久免费| 亚洲综合一区国产精品| 最新69国产成人精品免费视频动漫| 中国亚洲呦女专区| 无码国产亚洲日韩国精品视频一区二区三区 | 亚洲综合av一区二区三区| 毛片免费观看的视频在线| 国产亚洲欧美在线观看| 亚洲国产专区一区| 免费一级毛片无毒不卡| 亚洲an日韩专区在线| av免费不卡国产观看| 国产成人亚洲精品电影| 亚洲日韩欧洲乱码AV夜夜摸| 114级毛片免费观看| 精品国产亚洲第一区二区三区| 亚洲人午夜射精精品日韩| 日韩人妻无码精品久久免费一| 亚洲人精品亚洲人成在线| 亚洲 小说区 图片区 都市| 久久免费高清视频| 一本色道久久88亚洲精品综合| 中文字幕亚洲日韩无线码| 欧洲精品成人免费视频在线观看| 免费看一级一级人妻片 |