Activiti系列:是否可以让某些流程的信息写到历史表,而另外一些不写?
public void recordProcessInstanceStart(ExecutionEntity processInstance) {if(isHistoryLevelAtLeast(HistoryLevel.ACTIVITY)) {HistoricProcessInstanceEntity historicProcessInstance = new HistoricProcessInstanceEntity(processInstance);// Insert historic process-instancegetDbSqlSession().insert(historicProcessInstance);....}
public boolean isHistoryLevelAtLeast(HistoryLevel level) {if(log.isDebugEnabled()) {log.debug("Current history level: {}, level required: {}", historyLevel, level);}// Comparing enums actually compares the location of values declared in the enumreturn historyLevel.isAtLeast(level);}
/*** Enum that contains all possible history-levels.** @author Frederik Heremans*/public enum HistoryLevel {NONE("none"),ACTIVITY("activity"),AUDIT("audit"),FULL("full");private String key;private HistoryLevel(String key) {this.key = key;}/*** @param key string representation of level* @return {@link HistoryLevel} for the given key* @throws ActivitiException when passed in key doesn't correspond to existing level*/public static HistoryLevel getHistoryLevelForKey(String key) {for(HistoryLevel level : values()) {if(level.key.equals(key)) {return level;}}throw new ActivitiIllegalArgumentException("Illegal value for history-level: " + key);}/*** String representation of this history-level.*/public String getKey() {return key;}/*** Checks if the given level is the same as, or higher in order than the* level this method is executed on.*/public boolean isAtLeast(HistoryLevel level) {// Comparing enums actually compares the location of values declared in the enumreturn this.compareTo(level) >= 0;}}
Activiti系列:是否可以让某些流程的信息写到历史表,而另外一些不写?的更多相关文章
- 玩转Windows服务系列——服务运行、停止流程浅析
通过研究Windows服务注册卸载的原理,感觉它并没有什么特别复杂的东西,Windows服务正在一步步退去它那神秘的面纱,至于是不是美女,大家可要睁大眼睛看清楚了. 接下来研究一下Windows服务的 ...
- Activiti工作流学习(二)流程实例、执行对象、任务
一.前言 前面说明了基本的流程部署.定义,启动流程实例等基本操作,下面我们继续来学习流程实例.执行对象.任务. 二.流程实例.执行对象说明 整个Activiti的生命周期经过了如下的几个步骤: 1.流 ...
- activiti系列导读
此用于管理activiti系列标签文章,activiti的分析是建立在目前最新的版本5.21之上. 官方指导手册链接:http://www.activiti.org/userguide/index.h ...
- 玩转Windows服务系列——服务运行、停止流程浅析
原文:玩转Windows服务系列——服务运行.停止流程浅析 通过研究Windows服务注册卸载的原理,感觉它并没有什么特别复杂的东西,Windows服务正在一步步退去它那神秘的面纱,至于是不是美女,大 ...
- Activiti进阶(二)——部署流程资源的三种方式
转自:http://blog.csdn.net/zjx86320/article/details/50234707 流程资源可以是各种类型的文件,在启动流程或流程实例运行过程中会被读取.下面介绍常用的 ...
- 【Activiti学习之七】BPMN子流程、顺序流、流程关口
环境 JDK 1.8 MySQL 5.6 Tomcat 7 Eclipse-Luna activiti 6.0 一.子流程 1.嵌入子流程2.调用子流程3.事件子流程4.事务子流程 二.顺序流1.条件 ...
- Spring框架系列(5) - 深入浅出SpringMVC请求流程和案例
前文我们介绍了Spring框架和Spring框架中最为重要的两个技术点(IOC和AOP),那我们如何更好的构建上层的应用呢(比如web 应用),这便是SpringMVC:Spring MVC是Spri ...
- Activiti工作流框架学习(一)——环境的搭建和数据表的了解
一.什么是工作流 工作流(Workflow),就是“业务过程的部分或整体在计算机应用环境下的自动化”,它主要解决的是“使在多个参与者之间按照某种预定义的规则传递文档.信息或任务的过程自动进行,从而实现 ...
- JS组件系列——表格组件神器:bootstrap table(二:父子表和行列调序)
前言:上篇 JS组件系列——表格组件神器:bootstrap table 简单介绍了下Bootstrap Table的基础用法,没想到讨论还挺热烈的.有园友在评论中提到了父子表的用法,今天就结合Boo ...
随机推荐
- Swift面向对象基础(上)——Swift中的枚举
Swift中枚举 学习笔记来自<极客学院> import Foundation /**********1*Swift定义枚举的语法格式*************/ /* enum 枚举名 ...
- 二维码扫描利用ZBar实现
上次是根据系统的属性自己封装的一个二维码扫描,这次给大家介绍一下基于ZBar集成的类似于QQ二维码扫描界面的二维码扫描的效果. ...
- JavaScript Patterns 3.1 Object Literal
Basic concept Values can be properties: primitives or other objects methods: functions User-defined ...
- linux下使用正确的用户名密码,本地无法连接mysql
问题现象: Linux系统为CentOS 7.0 64位,通过IP远程mysql时,可以正常访问,确定账号密码没有问题.但是本地连接mysql时,提示ERROR 1045 (28000): Acces ...
- HDU 3374 String Problem (KMP+最大最小表示)
KMP,在有循环节的前提下: 循环节 t = len-next[len], 个数num = len/(len-next[len]);个人理解,如果有循环节,循环节长度必定小于等于len/2, 换句话说 ...
- eclipse在Ubuntu 13.04下的安装过程及问题小记
一.eclipse安装过程 首先确保在安装eclipse之前已经安装好Java虚拟机 1. eclipse官网下载压缩包 下载地址:http://www.eclipse.org/downloads/? ...
- WCF MSMQ消息队列与离线操作
消息队列类型 公共队列:整个网络中的节点都可以访问到 专用队列:本地计算机,知道路径者可以访问 管理队列:包含确认在给定“消息队列”网络中的发送的消息回执的消息 相应队列:返回给发送程序的相应信息
- [转]Asp.NET MVC Widget开发 - ViewEngine
本文转自:http://www.cnblogs.com/hsinlu/archive/2011/03/02/1968796.html 在Asp.NET开发博客类系统,我们经常都会用到Widget,像在 ...
- ok,今天讲讲linux的部分指令吧
Linux布置服务 cd 进入 ../ 上一层目录 sh shutdown.sh -------tomcat的关闭指令 sh startup.sh ------ ...
- python3使用套接字遇到TypeError: 'str' does not support the buffer interface如何解决
这是我查看的博客 http://blog.csdn.net/chuanchuan608/article/details/17915959 直接引用里面的关键语句: When you use clien ...