<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 :: 首頁 :: 新隨筆 :: 聯系 :: 聚合  :: 管理

    Chapter 6. Deployment(部署)

    Table of Contents

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

    Business archives(業務檔案)

    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流程,任務表單,規則和其它文件類型。通常,流程檔案包含一個命名資源的集合。

    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.

    當部署業務檔案時,以.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.

    注意業務檔案存在的Java類將不會加入到classpath。為了運行流程,業務檔案里面的流程定義的所有定制類(例如Java服務類或者事件監聽器實現)應當包含在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位置相同。在發行版本中的如下位置找到這個文件夾:

    ${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.

    也可能從單個資源來構建部署。詳情參見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方式來部署業務檔案,首先需要定義 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沒有版本管理的概念。這是好事,因為可執行的BPMN流程文件將作為開發項目的一部分駐留在一個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:

    對于業務檔案里的每個流程定義,執行下列步驟初始化 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的流程定義,在后續部署時,每部署一次,在當前最大部署版本號上加1。key特性用來區分流程定義。

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

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

    主站蜘蛛池模板: 亚洲精品无码久久毛片| 大地资源二在线观看免费高清 | 日本亚洲免费无线码| 成人免费夜片在线观看| 四虎影院免费视频| 亚洲一区二区三区偷拍女厕 | 亚洲AV永久无码精品一区二区国产| 四虎成人免费观看在线网址| 亚洲最大福利视频| 日韩免费a级毛片无码a∨| 国产成人亚洲综合一区| 四虎www成人影院免费观看| 亚洲AV成人无码网天堂| 亚洲不卡无码av中文字幕| 在线观看免费视频网站色| 亚洲成AV人片在线观看WWW| 亚洲av成人片在线观看| 亚洲?v无码国产在丝袜线观看| 可以免费观看一级毛片黄a| 国产亚洲成在线播放va| 久久夜色精品国产亚洲av| 很黄很污的网站免费| 亚洲日韩精品无码专区网站 | 午夜时刻免费入口| 免费无码又爽又黄又刺激网站| 国产成人亚洲精品电影| 亚洲精品视频久久久| 久久免费的精品国产V∧| 亚洲综合熟女久久久30p| 深夜特黄a级毛片免费播放| 亚洲日韩精品A∨片无码| 国产乱子精品免费视观看片| 亚洲国产精品成人精品无码区在线| 亚洲jizzjizz在线播放久| 破了亲妺妺的处免费视频国产 | 日本免费人成黄页在线观看视频| 亚洲第一成年男人的天堂| 成人片黄网站A毛片免费| 一级毛片免费视频网站| 亚洲性日韩精品国产一区二区| 日本亚洲免费无线码 |