Activiti工作流详解一

 最近项目中使用工作流activiti,采用activiti-rest方式。下载将activiti学习过程总的总结作一下分享。希望大家拍砖。谢谢!

 

工作流activiti的下载地址:

     http://activiti.org/download.html

工作流activiti的必须的软件

JDK5+Ant1.81+Eclipse3.6.2

JDK:查看版本 java –version

ANT:查看版本 ant –version

运行默认的Demo安装:

   1.需要配置JAVA_HOME,ANT_HOME环境变量。

   2.更新(C:\mash_activiti-5.6\setup)build.propertiesbuild.{your-database}.properties属性文件参数。

   3.运行ant命令(C:\mash_activiti-5.6\setup)ant demo.start

   4.如果运行不报错的,activitidemo部署成功了。

运行ant的目的官方描述如下:

   This ant target will start a tomcat and a H2 database if you didn't change the default setings.(如果你再启动时候不更改相关的配置文件信息,ant将帮助你启动tomcat和H2数据库) The first time when the script is executed, it will also perform following installations: (第一次执行这个命令需要执行一下步骤)

·         (*) 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 (activiti的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的安装位置为 ${activiti.home}/apps/h2)

·         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数据库)

·         (*) Create the Activiti tables in the database(创建activiti相关的表结构)

·         (*) Insert the demo users and groups in the Activiti identity tables (向activiti对象的数据库中插入默认的用户和用户组)

·         (*) Deploy the example processes to the Activiti Engine DB(将实例demo中流程信息部署到activiti引擎对应的数据库)

·         (*) Download Tomcat if not available in the ${downloads.dir}(如果在build.properties文件中downloads.dir下Tomcat不可用用或者不存在自动下载Tomcat)

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

·         (*) Create an Activiti configuration jar  (创建Activiti的配置文件activiti.cfg.xml等信息)

·         (*) Deploy the REST interface webapp into tomcat(部署REST接口的webapp信息到tomcat中)

·         (*) Download the Activiti Modeler webapp to ${activiti.home}/webapps. The license for the Activiti Modeler is MIT.(下载activiti-Modeler对象到目录)

·         (*) Deploy the Probe, Explorer and Modeler webapps into tomcat.(部署activiti的相关的webapp tools)

·         Start 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.

讲述安装的目的:1.向拷贝依赖jaractiviti webapp工具文件信息
2.
如果相应的目录(C:\mash_activiti-5.6\apps)中的tomcatH2tomant不可用的,则下载相关的软件。
3..
向对应H2数据库中添加相关的数据。
4.
启动tomcatH2数据库服务。

默认demo用户信息:

Table 2.1. The demo users

 

UserId

Password

Security roles

kermit

kermit

admin

gonzo

gonzo

manager

fozzie

fozzie

user

部署成功之后我们可以访问的activiti提供的webapp工具如下:

Table 2.2. The webapp tools

 

Webapp Name

URL

Description

 

Activiti Probe

http://ip: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://ip: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://ip:8080/activiti-cycle

The Activiti collabotation tool. Use this to browse repositories and execute transformations between model formats.

 

Activiti Modeler powered by Signavio

http://ip:8080/activiti-modeler

The web based process designer tool. Use this tool to graphically author BPMN 2.0 compliant process definitions files.

 

Activiti KickStart

http://ip:8080/activiti-kickstart

Allows to specify processes quickly and efficiently in an adhoc way. Simple processes, quick prototypes and adhoc workflow are created in no time using KickStart.

 

Activiti Administrator

http://ip:8080/activiti-administrator

A webapp to administer the users and groups. Currently this is realized as a seperate app, but we plan to unify some of the webapps into a single webapp with authorization.

 

 

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的实例实例工程中。

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-spring-examples: These examples show how you can use the Activiti Engine in a Spring environment.(activitiSpring的整合实例demo)

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

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

activiti-cxf-examples: These examples show library dependencies and how you can work with web services in Activiti.

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

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

 activitiLibrary依赖的包:
所有的lib文件都被放在setup/files/dependencies/libs,其中activiti-5.6\setup\files\dependencies中每一个文件包含了不同项目依赖的lib文件的名称集合。

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

 

·         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.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.txt: The libraries that need to be added to the ones in libs.engine.runtime.txt to use the JPA variable reference capabilities.

 

·         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.test.txt: The libraries that need to be added to the ones in libs.spring.runtime.txt to run tests in a Spring environment (Spring和activiti整合需要的所有lib文件)

 

·         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 (activiti REST整合,activiti-explorer需要的所有lib文件)

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值