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 ...
随机推荐
- CoreAnimation-01-CALayer核心要点及实例解析
CALayer基础 CALayer是每一个UI控件的核心,一个UI控件之所以能显示可以说是CALayer的功劳 每一个UI控件默认都为自己创建一个CALayer对象,通过drawRect方法将内容绘制 ...
- LeetCode 4 Median of Two Sorted Arrays (两个数组的mid值)
题目来源:https://leetcode.com/problems/median-of-two-sorted-arrays/ There are two sorted arrays nums1 an ...
- PMP 项目管理过程组与知识领域
- 《只是为了好玩:Linux之父林纳斯自传》
<只是为了好玩:Linux之父林纳斯自传> 基本信息 作者: (美)Linus Torvalds David Diamond 译者: 陈少芸 出版社:人民邮电出版社 ISBN:978 ...
- python基本数据结构-集合-集合运算
- 肯爹的 StringUtils.isNumeric(String str)
在项目中遇到一处bug,调试的结果竟然是StringUtils.isNumeric(String str) 在捣鬼(采用的是org.apache.commons.lang.StringUtils),下 ...
- Linux 下子线程 exit code 在主线程中的使用
Linux线程函数原型是这样的: void* thread_fun(void* arg) 它的返回值是 空类型指针,入口参数也是 空类型指针.那么线程的 exit code 也应该是 void * 类 ...
- matlab ASCII 格式导入
matlab ASCII 格式导入 可以用fprintf函数,来代替save函数啊比如现在我有一个变量a=[0.1223 345.4544]如果我想保存它的话,可以用下面的程序:fid = fopen ...
- dotnet use regex two samples
One sample is used to replace double quote from words which encapsulated by csvwriter , you know csv ...
- cri-o pod 创建源码分析
1. server/sandbox.go // RunPodSandbox creates and runs a pod-level sandbox func (s *Server) RunPodSa ...