<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 2. Getting Started(入門指南)

    Table of Contents

    Demo setup(安裝演示)
    Example projects in the workspace(工作區(qū)里的示例項目)
    Library dependencies(庫依賴)
    Eclipse setup(Eclipse下的安裝)
    Inspecting the database(檢查數(shù)據(jù)庫)

    Demo setup(安裝演示)

    Setup is an ant script located in directory setup that helps you get up and running with Activiti quickly.

    安裝是一個放置在目錄里的腳本。它幫助用戶快速建立并運(yùn)行Activiti。

    To run the script, you'll need a working Java runtime and Ant installation. Also make sure that the JAVA_HOME and ANT_HOME system variables are correctly set. The way to do this depends on your operating system, but the manual of ant gives a description on how to do this. The demo setup script is tested with Ant 1.7.1.

    為了運(yùn)行腳本,需要一個可以工作的安裝。也要確保JAVA_HOMEANT_HOME系統(tǒng)變量設(shè)置正確。雖然具體的設(shè)置方式根據(jù)操作系統(tǒng)不同而相異,但是為如何完成這些設(shè)置提供了描述。演示安裝腳本在下測試通過。

    To configure setup for your environment, update property files build.properties and build.{your-database}.properties . Check those files for more information on configurable properties and potential values.

    為了針對你的環(huán)境配置安裝,請更新屬性文件build.propertiesbuild.{your-database}.properties。為了獲取更多可配置屬性和潛在的值的信息,請仔細(xì)檢查這些文件。

    The easiest target to get started is open a command prompt in de setup folder and type:

    入門最容易的目標(biāo)是在setup文件夾打開一個命令提示并鍵入:

    ant demo.start

    This target will start tomcat and if you're using h2, it will also start the h2 database. The first time when that is executed, it will also perform the installation:

    這個目標(biāo)將啟動Tomcat。如果正在使用H2數(shù)據(jù)庫,它也將啟動H2數(shù)據(jù)庫。若是第一次執(zhí)行安裝,它也將執(zhí)行下列安裝:

    • (*) Build the webapps. All libraries are stored in ${actviti.home}/setup/files/dependencies/libs The webapps without the libs are stored in ${actviti.home}/setup/files/webapps. Building the webapps means that webapps are combined with the necessary libraries in ${actviti.home}/setup/build/webapps

      (*)構(gòu)建webapps。所有的庫保存在${actviti.home}/setup/files/dependencies/libs。沒帶庫的保存在${actviti.home}/setup/files/webapps。構(gòu)建意味著在組合webapp和必須的庫在${actviti.home}/setup/build/webapps目錄里。

    • (*) Install the H2 in ${activiti.home}/apps/h2. This only happens if you're using h2 as your database. H2 is the default database.

      (*) 將H2安裝至目錄里。只是采用H2數(shù)據(jù)庫時才發(fā)生。H2是缺省的數(shù)據(jù)庫。

    • Start the H2 database. Again, this is only done if using h2 as the database. If you're using a different database it is assumed that it is already up and running.

      啟動H2數(shù)據(jù)庫。對了,如果采用H2數(shù)據(jù)庫時,才完成這一步。如果采用不同的數(shù)據(jù)庫,那么假定數(shù)據(jù)庫已經(jīng)啟動并運(yùn)行了。

    • (*) Create the Activiti tables in the database

      (*) 在數(shù)據(jù)庫里建立Activiti庫表

    • (*) Insert the demo users and groups in the Activiti identity tables (see below)

      (*) 將示例用戶和組插入到 Activiti identity表(見下)。

    • (*) Deploy the example processes to the Activiti Engine DB

      (*) 將示例流程部署至Activiti Engine DB。

    • (*) Download Tomcat if not available in the ${downloads.dir}

      (*) 如果在目錄里面沒有Tomcat,就下載Tomcat

    • (*) Install Tomcat in ${activiti.home}/apps/apache-tomcat-${tomcat.version}

      (*) 將Tomcat安裝至${activiti.home}/apps/apache-tomcat-${tomcat.version}

    • (*) Create an Activiti configuration jar

      建立一個 Activiti 配置jar包

    • (*) Deploy the REST interface webapp into tomcat

      (*)部署REST接口webapp值Tomcat

    • (*) Download the Activiti Modeler webapp to ${activiti.home}/webapps

      (*) 將Activiti Modeler webapp下載至${activiti.home}/webapps目錄。

    • (*) Deploy the Probe, Explorer and Modeler webapps into tomcat.

      (*) 將Probe, Explorer and Modeler webapps部署至Tomcat。

    • Start tomcat

      啟動Tomcat

    (*) only performed the first time when running ant demo.start

    After running this target H2 and Tomcat will be running in the background. To stop those processes run ant demo.stop.

    The other targets in that build script can also be called individually and they will take the configurable properties into account. Run ant -p for more details.

    在運(yùn)行目標(biāo)H2之后,Tomcat將在后臺運(yùn)行。為了停止這些進(jìn)程,請運(yùn)行 ant demo.stop。在構(gòu)建腳本里的其它目標(biāo)也能夠單個調(diào)用。它們將考慮考慮可配置屬性。詳情可以運(yùn)行ant -p 得到。

    These are the demo users:

    這些事示例用戶:

    Table 1.1. The demo users(示例用戶)

    UserId
    Password
    Security roles

    kermit
    kermit
    admin

    gonzo
    gonzo
    manager

    fozzie
    fozzie
    user

    Now you can access following web applications:

    現(xiàn)在,你能訪問下列web 應(yīng)用程序:

    Table 1.2. The webapp tools(webapp工具)

    Webapp Name
    URL
    Description

    Activiti Probe
    http://localhost:8080/activiti-probe
    The admin management console. Use this tool to see if the configured process engine is correctly initialized, DB tables contents.

    Activiti Explorer
    http://localhost:8080/activiti-explorer
    The process engine user console. Use this tool to view your personal and candidate task lists and to complete tasks.

    Activiti Cycle
    http://localhost:8080/activiti-cycle
    The process cycle layer. Use this to browse repositories, execute transformations between model formats.

    Activiti Modeler powered by Signavio
    http://localhost:8080/activiti-modeler
    The web based process designer tool. Use this tool to graphically author BPMN 2.0 compliant process definitions files.

    Note that the Activiti demo setup is a way of showing the capabilities and functionality of Activiti as easy and as fast as possible. This does however, not mean that it is the only way of using Activiti. As Activiti is 'just a jar', it can be embedded in any Java environment: with swing or on a Tomcat, JBoss, WebSphere, etc. Or you could very well choose to run Activiti as a typical, standalone BPM server. If it is possible in Java, it is possible with Activiti!

    注意Activiti示例安裝時為了盡快,盡容易展現(xiàn)Activiti功能和能力的一種方式。但是這并不意味著這是采用Activiti的唯一方式。Activiti只是一個jar包,它可以嵌入到任何Java環(huán)境:Swing或者Tomcat,JBoss,WebSphere等等?;蛘吣隳苓x擇將Activiti作為一個典型的,獨(dú)立的BPM服務(wù)器。Java若在,Activiti就在!

    Example projects in the workspace(工作區(qū)里的示例項目)

    The distribution contains a workspace directory containing a couple of example java projects:

    發(fā)行包包含一個許多java項目的工作區(qū)目錄。

    • activiti-engine-examples: This set of examples show the most common usage of Activiti: BPMN process definitions and process executions are stored in a DB and the examples make use of the persistent API.

      This project contains the eclipse project files, an ant build file and a maven pom file. The ant build file is independent of the maven pom. Both are there to show how you can use ant and maven respectively for building and deploying processes as part of your build.

      activiti-engine-examples: 把這一系列示例展示了Activiti的通用用法:保存在DB里的BPMN流程定義和流程執(zhí)行。還有持久化API使用的示例。

      這個項目包含了eclipse的項目文件,一個ant構(gòu)建文件和一個maven pom文件。ant 構(gòu)建文件和maven pom文件相互獨(dú)立。作為你的構(gòu)建部分,為了構(gòu)建和部署流程,兩者展示了能夠使用ant和maven進(jìn)行構(gòu)建。

    • activiti-spring-examples: These examples show how you can use the Activiti Engine in a Spring environment.

      activiti-spring-examples: 這些示例展示在Spring環(huán)境下如何使用Activiti引擎。

    • activiti-groovy-examples: These examples show the library dependencies for groovy and an example process with groovy scripting.

      activiti-groovy-examples: dd這些示例展示了groovy的依賴庫和用groovy腳本處理的示例流程。

    • activiti-jpa-examples: These examples show library dependencies and how you can work with JPA in Activiti.

      activiti-jpa-examples: 這些示例展示了JPA的依賴庫,以及在Activiti里采用JPA是如何工作的。

    • activiti-cycle-examples: This is a project containing an demo example project for Activiti Cycle

      activiti-cycle-examples: 這是一個包含針對Activiti Cycle的示例項目。

    • activiti-modeler-examples: This is a file based model repository to which the Activiti Modeler is configured in the demo setup.

      activiti-modeler-examples:

      activiti-modeler-examples: 這是一個在示例安裝里配置Activiti Modeler所需的基于模型的倉庫。

    the section called “Eclipse setup(Eclipse下的安裝)” shows how you can set up your eclipse environment to play with these example projects.

    the section called “Eclipse setup(Eclipse下的安裝)” 展示了如何安裝eclipse環(huán)境來熟悉這些示例項目。

    As part of the demo.start, the examples will be inflated. This means that all the libs and configuration files will be put in place. If you don't run the demo.start and you want to inflate the examples with libs in the appropriate place, run this command in the setup directory:

    作為 demo.start的部分,將展開這些事例。 這意味著所有的庫和配置文件將安置就位。如果不運(yùn)行demo.start而將示例和庫展開到合適的位置,運(yùn)行安裝目錄下的這個命令:

    ant inflate.examples

    Once you've done that the activiti-engine-examples and activiti-spring-examples will contain libs-runtime and libs-test directories containing the runtime dependency jars and test time dependency jars respectively.

    一旦完,將包含 activiti-engine-examples 成activiti-spring-examples目錄。這些目錄相應(yīng)地包含而來運(yùn)行時所依賴的jar包和測試時依賴的jar包。

    Library dependencies(庫依賴)

    In order to prevent that the distribution file becomes too big by libraries that are included multiple times, all the libraries are grouped into a single directory somewhere in the setup/files.

    吧為了防止由于庫包含多次而使發(fā)布文件變得太大,所有的庫被分組到setup/files下單個的目錄。

    The ant scripts in the setup/build.xml can inflate the examples (target inflate.examples) with the libs and they will include the appropriate libs when building the webapps.

    setup/build.xml文件里面的ant 腳本能夠展開示例 (target inflate.examples) 及其庫。當(dāng)構(gòu)建webapp時,它們將包含合適的庫。

    All the libs are located in setup/files/dependencies/libs And the following files in setup/files/dependencies describe the library dependencies:

    所有庫放置在 setup/files/dependencies/libs ,并且在setup/files/dependencies 目錄里下列文件描述了庫依賴:

    • libs.engine.runtime.txt: The library runtime dependencies to run the Activiti Engine.

      libs.engine.runtime.txt: 運(yùn)行Activiti引擎的運(yùn)行時依賴庫。

    • libs.engine.runtime.test.txt: The libraries that need to be added to the ones in libs.engine.runtime.txt to run the tests

      libs.engine.runtime.test.txt: 為了運(yùn)行測試,需要加入到libs.engine.runtime.txt 的庫

    • libs.engine.runtime.feature.groovy.txt: The libraries that need to be added to the ones in libs.engine.runtime.txt to use the groovy scripting capabilities.

      libs.engine.runtime.feature.groovy.txt: 為了使用groovy腳本能力,需要加入到libs.engine.runtime.txt 的庫。

    • libs.engine.runtime.txt: The libraries that need to be added to the ones in libs.engine.runtime.txt to use the JPA variable reference capabilities.

      libs.engine.runtime.txt: 為了使用JPA變量引用能力,需要加入到libs.engine.runtime.txt 的庫。

    • libs.spring.runtime.txt: The library runtime dependencies to run the Activiti Engine in a Spring environment. (This list includes the libs in libs.engine.runtime.txt)

      libs.spring.runtime.txt: 在Spring環(huán)境下運(yùn)行Activiti引擎的運(yùn)行期依賴庫。(這個列表包含了libs.engine.runtime.txt

    • libs.spring.runtime.test.txt: The libraries that need to be added to the ones in libs.spring.runtime.txt to run tests in a Spring environment

      libs.spring.runtime.test.txt: 在Spring環(huán)境下,為了測試,需要加入到libs.spring.runtime.txt 下的庫。

    • libs.cycle.runtime.test.txt, libs.webapp.rest.txt and libs.webapp.ui.txt: The full list of libraries dependencies for the respective components cycle, the rest webapp and the UI webapps like Activiti Explorer, Activiti Probe and Activiti Cycle

      libs.cycle.runtime.test.txt, libs.webapp.rest.txtlibs.webapp.ui.txt: 相關(guān)組件cycle,rest webapp和像Activiti Explorer, Activiti Probe 和 Activiti Cycle之類的UI Webapp所需依賴庫的全部列表。

    Eclipse setup(Eclipse下的安裝)

    To run and play with the examples in your eclipse, follow these simple instructions:

    為了在eclipse里運(yùn)行示例,遵從這些簡單的指令:

    File --> Import...

    File --> Import...

    eclipsesetup.import.existing.projects

    Select General --> Existing Projects into Workspace and click Next

    選擇 General --> Existing Projects into Workspace并點(diǎn)擊Next

    eclipsesetup.import

    Click 'Browse...', select the directory ${activiti.home}/workspace and you'll see the example projects being automatically selected.

    點(diǎn)擊 'Browse...',選擇目錄 ${activiti.home}/workspace ,那么將自動選擇示例項目。

    Then you can click Finish in the Import dialog and you're all set.

    吧然后你在輸出對話框能點(diǎn)擊按鈕,所有都設(shè)置好了。

    For more convenience, open the ant view (Window --> Show View --> Ant) and drag the file activiti-engine-examples/build.xml into the ant window. Now you'll be able to activate the build targets by just double clicking on them.

    為了更加方便起見,打開ant視圖(Window --> Show View --> Ant)并將文件拽至ant窗口。通過在它們上面雙擊,現(xiàn)在你能激活構(gòu)建目標(biāo)。

    If you want BPMN 2.0 XML auto-completion and validation while typing, you can add the BPMN 2.0 XML Schema to the XML catalog. Go to Preferences --> XML --> XML Catalog --> Add, and select the XML Schema from the file system in the folder docs/xsd/BPMN20.xsd.

    如果你想當(dāng)輸入時,BPMN 2.0 XML自動完成和校驗,可以將BPMN 2.0 XML Schema 加入到XML分類里面。導(dǎo)航至Preferences --> XML --> XML Catalog --> Add,從文件系統(tǒng)里的文件夾里的docs/xsd/BPMN20.xsd選擇XML Schema。

    eclipse.setup.xml.catalog

    Inspecting the database(檢查數(shù)據(jù)庫)

    To check out the database while trying out the demo setup, run the following Ant target in the setup folder:

    當(dāng)嘗試示例安裝時,為了檢查數(shù)據(jù)庫,運(yùn)行在文件夾下的Ant目標(biāo):

    ant h2.console.start

    This will boot the H2 web console. Note that the Ant target doesn't return, so a 'CTRL + C' is required to shutdown the console. Fill in the following URL in the JDBC URL field and click connect:

    這將引導(dǎo)H2 Web控制臺。注意Ant 目標(biāo)并不返回,所以為了關(guān)閉控制臺,需要鍵入'CTRL + C'。在 JDBC URL字段里填入URL,并點(diǎn)擊“connect”:

    jdbc:h2:tcp://localhost/activiti

    h2.console.login

    You are now able to browse the Activiti database schema and check the content of the tables.

    現(xiàn)在你能瀏覽Activiti數(shù)據(jù)庫結(jié)構(gòu)并檢查數(shù)據(jù)庫表里面的內(nèi)容。

    To change the database, see ???

    為了改變數(shù)據(jù)庫,參見 ???。

    主站蜘蛛池模板: 亚洲人成未满十八禁网站| 国产精品偷伦视频免费观看了| 又粗又大又猛又爽免费视频| 一本一道dvd在线观看免费视频 | 成年网在线观看免费观看网址| 亚洲三区在线观看无套内射| 222www免费视频| 在线精品自拍亚洲第一区| 亚洲AV永久无码精品成人| AV片在线观看免费| a级毛片毛片免费观看久潮| 亚洲中文字幕无码亚洲成A人片| 亚洲视频在线一区二区| 青青在线久青草免费观看| 日本激情猛烈在线看免费观看 | 亚洲国产美女精品久久久久∴| 黄页网站免费在线观看| 成人妇女免费播放久久久| 亚洲国产中文在线视频| 最新国产AV无码专区亚洲 | 亚洲综合久久1区2区3区| 亚洲А∨精品天堂在线| 亚洲一区免费视频| 成在线人免费无码高潮喷水| 狠狠色伊人亚洲综合网站色| 亚洲日韩欧洲乱码AV夜夜摸| 午夜一级免费视频| 最近免费中文字幕高清大全| 中文字幕免费在线看电影大全 | 国产成人一区二区三区视频免费| 亚洲另类无码一区二区三区| 无码乱人伦一区二区亚洲| 亚洲成av人片一区二区三区| 在线观看人成网站深夜免费| 免费播放一区二区三区| 国产免费牲交视频免费播放| 亚洲Av永久无码精品黑人| 亚洲成人动漫在线观看| 亚洲精品在线观看视频| 伊人久久亚洲综合| 亚洲精品岛国片在线观看|