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 ...
随机推荐
- iOS 中 CAShapeLayer 的使用( 等待删除的博文)
等待删除. 1.CAShapeLayer 简介 1.CAShapeLayer继承至CALayer,可以使用CALayer的所有属性值 2.CAShapeLayer需要与贝塞尔曲线配合使用才有意义 3. ...
- java网络---再论URL & URI
关于URL 和URI的关系,在本系列的第二篇:java网络---基本web概念 中已经简述了. 这里重复一点,就是URI包含URL,或者说URI是父类,URL就是子类的概念. 本篇再来详述这2个概念. ...
- Log4net配置文件一般配置
配置文件一般配置 <?xml version="1.0"?> <configuration> <configSections> <sect ...
- Effective Java 65 Don't ignore exceptions
Principle An empty catch block defeats the purpose of exceptions, which is to force you to handle ex ...
- Eclipse 快捷键 篇
1. Ctrl+Shift+R:打开资源这可能是所有快捷键组合中最省时间的了.这组快捷键可以让你打开你的工作区中任何一个文件,而你只需要按下文件名或mask名中的前几个字母,比如applic*.xml ...
- [转]shell脚本打印日志方法
该文章转自:http://blog.csdn.net/wylfengyujiancheng/article/details/50019299 ----------------------------- ...
- 巧用开发者工具的控制台来调试页面中的js语句
因为要弄某网页的一个自动登陆工具,所以需要对此网页中的元素利用js进行选取和操作,复杂的js选取如果直接在头脑中想很容易出错,而且一旦出错也不好判断错误原因. 而浏览器带的开发者工具的控制台功能,就给 ...
- [转]设定version 更新js缓存
http://zhenggm.iteye.com/blog/680600 遇到的问题: 在访问量比较大的系统中,我们需要将一些静态的文件在客户端缓存,以减少下载的流量,从而加快客户端访 ...
- runv kill 流程分析
1.runv/kill.go Action: func(context *cli.Context) 该函数做的工作很简单,就是通过grpc客户端,发送一个grpc请求而已,如下: c.Signal(n ...
- iOS使用Core Graphics和UIBezierPath绘画
通过UIView的子类的- (void)drawRect:(CGRect)rect 函数可用对视图进行重新绘画: 要重新绘画可以通过Core Graphics和UIBezierPath来实现. 1.通 ...