activiti5.9 用户手册

1
下载
http://activiti.org/download.html

2
安装

前提:
ANT1.8+, JDK5+, Eclipse 3.6+

解压
activiti-5.9
进入 setup
运行:
ant demo.start

3
源码:
http://svn.codehaus.org/activiti/activiti/trunk

4
http://localhost:8080/
kermit/kermit admin
gonzo/gonzo manager
fozzie/fozzie user

http://localhost:8080/activiti-explorer

5
测试并连接数据库
ant h2.console.start

此脚本执行如下动作:


JDBC URL:
jdbc:h2:tcp://localhost/activiti


5.1
5.1.1
创建 ${activiti.home}/setup/build/webapps
复制 ${activiti.home}/setup/files/webapps 到 ${activiti.home}/setup/build/webapps

5.1.2
创建 ${activiti.home}/apps/h2
复制 ${activiti.home}/setup/files/dependencies/libs/h2*.jar  ${activiti.home}/setupfiles/h2

${activiti.home}/apps/h2

5.1.3
调用脚本 h2.start.bat 启动 h2 数据库

5.1.4
调用 org.activiti.engine.impl.db.DbSchemaUpdate 创建表结构

5.1.5
创建目录 build/demo
执行sql h2.data.sql
部署 activiti-engine-examples

5.1.6
调用 h2.stop.bat 停止 h2 数据库

5.1.7
下载 Tomcat 到 ${activiti.home}\..\downloads, 解压到 ${activiti.home}/apps
部署 activiti-rest activiti-explorer 到 ${tomcat.home}/webapps

5.2
启动 H2 数据库

5.3
启动 Tomcat

5.4
打开浏览器
http://localhost:8080/activiti-explorer

5.5
http://localhost:8080/activiti-modeler/

5.6
安装失败后,重新安装
ant tomcat.stop
ant h2.stop
ant demo.stop
ant demo.clean
ant demo.start

5.7
http://localhost:8080/activiti-explorer 404 如何解决?
原因有两个:
a.  ${activiti.home}\apps\apache-tomcat-6.0.32\webapps\activiti-explorer\WEB-INF\classes\db.properties
的JDBC URL 配置有问题

b. 安装了多个 Tomcat.
复制如下脚本到
${activiti.home}\apps\apache-tomcat-6.0.32\bin

启动.bat
@echo off
if "%OS%" == "Windows_NT" setlocal
set "CURRENT_DIR=%cd%"
set "CATALINA_HOME=%CURRENT_DIR%"
cd ..
set "CATALINA_HOME=%cd%"
cd "%CURRENT_DIR%"
set "EXECUTABLE=%CATALINA_HOME%\bin\catalina.bat"
call "%EXECUTABLE%" start 


5.8
tomcat控制台显示的中文乱码
解决办法:
修改文件apps\apache-tomcat-6.0.29\conf\logging.properties,
apps\apache-tomcat-6.0.32\webapps\activiti-explorer\WEB-INF\classes\logging.properties,
apps\apache-tomcat-6.0.32\webapps\activiti-rest\WEB-INF\classes\logging.properties
,都增加如下一行的配置:
java.util.logging.ConsoleHandler.encoding=GBK


6.
流程配置

7.
表单
包括两种:
内建表单|外部表单

表单属性 - Map <-> 流程变量
StartFormData FormService.getStartFormData(String processDefinitionId)

TaskFormdata FormService.getTaskFormData(String taskId)

8
JUEL

9
表单属性类型:
string (org.activiti.engine.impl.form.StringFormType)
long (org.activiti.engine.impl.form.LongFormType)
enum (org.activiti.engine.impl.form.EnumFormType)
date (org.activiti.engine.impl.form.DateFormType)
boolean (org.activiti.engine.impl.form.BooleqnFormType)

10
表单属性接口:
public interface FormProperty {
  /** the key used to submit the property in {@link FormService#submitStartFormData(String, java.util.Map)} 
   * or {@link FormService#submitTaskFormData(String, java.util.Map)} */
  String getId();
  /** the display label */
  String getName();
  /** one of the types defined in this interface like e.g. {@link #TYPE_STRING} */
  FormType getType();
  /** optional value that should be used to display in this property */
  String getValue();
  /** is this property read to be displayed in the form and made accessible with the methods 
   * {@link FormService#getStartFormData(String)} and {@link FormService#getTaskFormData(String)}. */
  boolean isReadable();
  /** is this property expected when a user submits the form? */
  boolean isWritable();
  /** is this property a required input field */
  boolean isRequired();
}



11
外部表单


12
JPA

13
历史

14
Eclipse Designer
注意版本
http://activiti.org/designer/update/

15
Activiti附加组件
cycle
Activiti Modeler

16
REST API

17
CDI 整合


18
部署行为:
DeploymentManager

实体:
DeploymentEntity
ResourceEntity
ProcessDefinitionEntity

表:
ACT_RE_DEPLOYMENT
ACT_GE_BYTEARRAY
ACT_RE_PROCDEF

19
流程执行行为:

实体:
ExecutionEntity
...

表:
ACT_HI_PROCINST
ACT_HI_ACTINST
ACT_HI_TASKINST
ACT_HI_ATTACHMENT
ACT_RU_EXECUTION
ACT_RU_TASK
ACT_RU_VARIABLE
ACT_RU_IDENTITYLINK
ACT_RU_JOB


你可能感兴趣的:(java,tomcat,REST)