<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)系 :: 聚合  :: 管理

    Chapter 6. Deployment(部署)

    Table of Contents

    Business archives(業(yè)務檔案)
    Java classes(Java類)
    Deploying programmatically(編程式部署)
    Deploying with ant(以ant方式部署)
    Deploying with Activiti Probe(以Activiti Probe部署)
    Versioning of process definitions(流程定義的版本管理)

    Business archives(業(yè)務檔案)

    To deploy processes, they have to be wrapped in a business archive. A business archive is the unit of deployment to an Activiti Engine. Basically a business archive is equivalent to a zip file. It can contain BPMN 2.0 processes, task forms, rules and any other type of file. In general, a business archive contains a collection of named resources.

    為了部署流程,必須將流程打包為流程檔案。一個流程檔案是Activiti引擎的部署單元。基本來說,一個流程檔案等價于一個zip文件。它包含了BPMN 2.0流程,任務表單,規(guī)則和其它文件類型。通常,流程檔案包含一個命名資源的集合。

    When a business archive is deployed, it is scanned for BPMN files with a extension. Each of those will be parsed and potentially contains multiple process definitions.

    當部署業(yè)務檔案時,以.bpmn20.xml 擴展名為的BPMN文件方式掃描來掃描它。每個BMPN文件被掃描,它包含多個流程定義。

    Note that Java classes present in the business archive will not be added to the classpath. All custom classes used in process definitions in the business archive (for example Java service tasks or event listener implementations) should be present on the activiti-engine's classpath in order to run the processes.

    注意業(yè)務檔案存在的Java類將不會加入到classpath。為了運行流程,業(yè)務檔案里面的流程定義的所有定制類(例如Java服務類或者事件監(jiān)聽器實現(xiàn))應當包含在Activiti引擎的classpath里面。

    Java classes(Java類)

    All custom classes that are used in your process (eg. JavaDelegates used in servicetaks or event-listeners, TaskListeners, ...) should be present on the engine's classpath when an instance of the process is started. It's not nessecairy to have those classes on the classpath when deploying the process-definition into the engine.

    當啟動一個流程實例(例如serviceTask或者event-listener,TaskListener)時,定義在流程里面的所有定制類應當包含在引擎的classpath上面 。當把流程定義部署到引擎時,不必將哪些類放到classpath上。

    When you are using the demo setup and you want to add your custom classes, you should add a jar containing your classes to the activiti-rest webapp lib. Don't forget to include the dependencies of your custom classes (if any) as wel. This is the same location where the activiti-engine jar is located. You can find this folder inside your distro at the folowing location:

    當正在使用demo setup并要加入你自己的定制類時,你應當將包含這些類的jar包添加至activiti-rest webapp lib里面。也不要忘記包含定制類的依賴包(如果有的話),這個和activiti-engine.jar位置相同。在發(fā)行版本中的如下位置找到這個文件夾:

    ${activiti distro}/apps/apache-tomcat-6.0.29/webapps/activiti-rest/lib/

    Deploying programmatically(編程式部署)

    Deploying a business archive from a zip file can be done like this:

    以如下方式完成從zip文件來部署流程檔案:

    String barFileName = "path/to/process-one.bar";
    ZipInputStream inputStream = new ZipInputStream(new FileInputStream(barFileName));
    repositoryService.createDeployment()
    .name("process-one.bar")
    .addZipInputStream(inputStream)
    .deploy();
    

    It's also possible to build a deployment from individual resources. See javadocs for more details.

    也可能從單個資源來構(gòu)建部署。詳情參見javadoc。

    Deploying with ant(以ant方式部署)

    To deploy a business archive with ant, first the deploy-bar task needs to be defined. Make sure that the configuration jar is on the classpath, as well as the Activiti jar and all its dependencies:

    為了以ant方式來部署業(yè)務檔案,首先需要定義 deploy-bar 任務。確保配置jar包,Activiti jar及其所有的依賴都在classpath路徑里面。

    <taskdef name="deploy-bar" classname="org.activiti.engine.impl.ant.DeployBarTask">
    <classpath>
    <fileset dir="...">
    <include name="activiti-cfg.jar"/>
    <include name="your-db-driver.jar"/>
    </fileset>
    <fileset dir="${activiti.home}/lib">
    <include name="activiti-engine-${activiti.version}.jar"/>
    <include name="ibatis-sqlmap-*.jar"/>
    </fileset>
    </classpath>
    </taskdef>
    <deploy-bar file=".../yourprocess.bar" />

    Deploying with Activiti Probe(以Activiti Probe部署)

    It's possible to deploy process definitions through probe, this is described in Activiti Probe - Deployments.

    通過Probe也可以部署流程定義,這在Activiti Probe - Deployments里面描述。

    Versioning of process definitions(流程定義的版本管理)

    BPMN doesn't have a notion of versioning. And that is good because the executable BPMN process file will probably live in an SVN repository as part of your development project. Versions of process definitions are created during deployment. During deployment, Activiti will assign a version to the ProcessDefinition before it is stored in the Activiti DB.

    BPMN沒有版本管理的概念。這是好事,因為可執(zhí)行的BPMN流程文件將作為開發(fā)項目的一部分駐留在一個SVN的倉庫里,所以在部署時,才建立流程定義的版本。在部署期間,在ProcessDefinition 保存到Activiti DB之前,Activiti將為它分布一個版本號。

    For each process definition in a business archive the following steps are performed to initialize the properties key, version, name and id:

    對于業(yè)務檔案里的每個流程定義,執(zhí)行下列步驟初始化 key, version, nameid 這些屬性:

    • The process id attribute is used as the process definition key property

      流程id 屬性 用作為流程定義的key特性

    • The process name attribute is used as the process definition name property. If the name attribute is not specified, then id attribute is used as the name.

      流程name 屬性 用作為流程定義的特性 name 。如果沒有指定name屬性,那么id屬性作為名稱使用。

    • The first time a process with a particular key is deployed, version 1 is assigned. For all subsequent deployments of process definitions with the same key, the version will be set 1 higher then the max currently deployed version. The key property is used to distinct process definitions.

      當一個帶有特殊key的流程第一次部署時,版本分配為1。對帶有相同key的流程定義,在后續(xù)部署時,每部署一次,在當前最大部署版本號上加1。key特性用來區(qū)分流程定義。

    • The id property is set to {processDefinitionKey}:{processDefinitionVersion}

      id特性設置為{processDefinitionKey}:{processDefinitionVersion}

    主站蜘蛛池模板: 亚洲人成电影福利在线播放 | 日本黄页网站免费| 亚洲精品午夜视频| 久久精品免费电影| 亚洲精品成人网站在线观看| 美女巨胸喷奶水视频www免费| 亚洲人成色7777在线观看| 中文字幕在线免费看线人| 亚洲成AV人片在线观看| 日本免费久久久久久久网站| 久久久久亚洲精品影视| 成人免费黄色网址| 国产亚洲精aa在线看| 国产无遮挡裸体免费视频 | 亚洲福利精品电影在线观看| 一级毛片高清免费播放| 亚洲成a人片77777kkkk| 亚洲黄色免费观看| 亚洲精品无码永久在线观看男男| 国产免费拔擦拔擦8x| yellow视频免费在线观看| 久久综合九九亚洲一区| 黄页网站免费在线观看| 爱情岛亚洲论坛在线观看| 亚洲线精品一区二区三区| 最近中文字幕电影大全免费版 | 亚洲中文字幕无码久久精品1| 久久伊人免费视频| 亚洲精品色播一区二区| 国产精品亚洲αv天堂无码| 99精品视频免费在线观看| 亚洲妇女无套内射精| 亚洲精品乱码久久久久久| 国产精品成人免费视频网站京东| 国产成人亚洲精品播放器下载 | 亚洲国产精品无码久久久秋霞1| 亚洲精品久久久www| 日本最新免费网站| 一级毛片大全免费播放| 亚洲毛片免费观看| 亚洲午夜av影院|