jbpm3的Variable的类型处理
来源:互联网 发布:lol网络不稳定跳ping 编辑:程序博客网 时间:2024/06/07 06:18
我们知道,流程定义中的Variable是要持久化的,比如可能存放到数据库中,那么,类型怎么处理呢?
我们看看jbpm3的方法:
jbpm3定义了自己的类JbpmType,该类有两个属性:
1)public Class variableInstanceClass = null;
它表示该Variable对应于引擎的类型
2)public Converter converter = null;
他表示从引擎的类型与JAVA类型间的转换器
处理时,引擎先到类路径的jbpm.type.properties文件中查找,如果没有,再到
org/jbpm/db/hibernate/jbpm.types.properties文件中查找,该文件是编辑好了的,如下:
# each line contains 2 or 3 class names (transformer-class is optional) separated by a space :
# variable-class
# or
# variable-class
### stored in a text-field in the database###
java.lang.String org.jbpm.context.exe.variableinstance.StringInstance
java.lang.Boolean org.jbpm.context.exe.converter.BooleanToStringConverter org.jbpm.context.exe.variableinstance.StringInstance
java.lang.Character org.jbpm.context.exe.converter.CharacterToStringConverter org.jbpm.context.exe.variableinstance.StringInstance
java.lang.Float org.jbpm.context.exe.converter.FloatToStringConverter org.jbpm.context.exe.variableinstance.StringInstance
java.lang.Double org.jbpm.context.exe.converter.DoubleToStringConverter org.jbpm.context.exe.variableinstance.StringInstance
java.io.Serializable org.jbpm.context.exe.converter.SerializableToStringConverter org.jbpm.context.exe.variableinstance.StringInstance
### stored in a number-field in the database###
java.lang.Long org.jbpm.context.exe.variableinstance.LongInstance
java.lang.Byte org.jbpm.context.exe.converter.ByteToLongConverter org.jbpm.context.exe.variableinstance.LongInstance
java.lang.Short org.jbpm.context.exe.converter.ShortToLongConverter org.jbpm.context.exe.variableinstance.LongInstance
java.lang.Integer org.jbpm.context.exe.converter.IntegerToLongConverter org.jbpm.context.exe.variableinstance.LongInstance
java.util.Date org.jbpm.context.exe.converter.DateToLongConverter org.jbpm.context.exe.variableinstance.LongInstance
第一列表示JAVA类型,第三列表示引擎中的类型,而中间的列表示转换器定义
转换器的概念其实非常简单,比如,对于布尔值true,在程序中是一个java.lang.Boolean的类型
的值,但在jbpm3数据库中,它是一个串"T"或者"F",那么就需要一个转换器
org.jbpm.context.exe.converter.BooleanToStringConverter来进行转换.
- jbpm3的Variable的类型处理
- jbpm3的Variable的类型处理
- jbpm3的Variable的类型处理
- jbpm3.1的不足之处
- JBPM3的对象介绍
- JBPM3的对象介绍
- jbpm3的timer开发问题
- Java的Variable Types变量类型-笔记
- jbpm3的流程定义器预览
- QQ群内的jbpm3讨论
- QQ群内的jbpm3讨论
- jbpm3的流程定义器预览
- QQ群内的jbpm3讨论
- jbpm3的流程定义器预览
- 删掉jbpm3.2 相关表的数据
- 030.(type*)variable 指针的强制类型转换
- 030.(type*)variable 指针的强制类型转换
- jbpm对token和variable的处理办法
- 转贴 为什么我们总是比别人钱少
- 防止SQL注入
- 三大主流工作流引擎技术分析与市场预测
- Flash插入代码
- oracle的bug(包括10G)
- jbpm3的Variable的类型处理
- jbpm解析流程定义的三种方式
- jbpm3的流程定义器预览
- 网址前边加小图标方法
- 在jbpm3中使用Ioc
- JAVA SCRIPT事件
- jbpm与AgileFlow的hibernate持久化实现方式对比
- jbpm的任务管理实现
- jbpm对token和variable的处理办法