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 ...
随机推荐
- 网络请求的基本知识《极客学院 --AFNetworking 2.x 网络解析详解--1》学习笔记
网络请求的基本知识 我们网络请求用的是HTTP请求 Http请求格式:请求的方法,请求头,请求正文 Http请求的Request fields:请求的头部,以及被请求头部的一些设置 Http请求的 ...
- android EditView ime
1.android:imeOptions 可以用来配置输入法右下角的: 这可以在xml中添加相应的属性android:imeOptions actionGo 输入法右下角显示“去往” actionS ...
- 响应式Web设计 – 布局
写在前面 去年上半年,我开始着手推动项目中响应式设计的落地.以官网优化需求为契机,主动去做了响应式的页面设计,也说服了产品.设计和开发的相关同事一起把它上线落实,但不幸的是,由于各种方面的原因,比如, ...
- 菜鸟教程 Python100例 之实例29
学习编程的路,走得好艰辛... 为了巩固基础知识,把菜鸟教程网上的实例拿来练习.. 在做到实例29时,看了网站给出的代码,觉得可以加强一下功能,不由得动了一下脑筋,如下: 原文题目: 题目:给一个不多 ...
- docker-3 基础命令
创建镜像 创建镜像的方法有三种: 基于已有的容器创建 基于本地模板导入 基于dockerfile 基于已有的容器创建 主要使用docker commit 命令,命令格式: docker commit ...
- Struts2-tomcat报错:There is no Action mapped for namespace / and action
HTTP Status 404 - There is no Action mapped for namespace / and action name first. type Status repor ...
- saltstack通过salt.client执行命令(转)
利用saltstack的salt.client模块可以在python的命令行下或者python脚本里执行相应的salt命令 master端想要执行类似 salt '*' cmd.run 'uptime ...
- 10901 Missile
10901 Missile 时间限制:1000MS 内存限制:65535K提交次数:40 通过次数:7 Description Long, long ago, country A invented ...
- ssis trainning
1. 防止包打开后hang住,可以使用delay validation=false. 2.2008R2 configuration 起作用的优先级? 一是des ign time. 二是运行的时候指定 ...
- 《TCP/IP详解 卷一》读书笔记-----TCP数据流
1.Delayed Acknowledgements:TCP通常不会在收到数据之后立即返回一个ACK,而是会有一个延时,希望能ACK报文段中带上一些数据,通常这个延时为200ms 2.Nagle Al ...