We know that the variable in the process definition is to persist, such as how to store it in the database, then how to deal with the type? Let's take a look at the JBPM3: JBPM3 defines its own class JBPMTYPE, which is two properties: 1) public class variableinstanceclass = null; it indicates that the variable corresponds to the type of engine 2) public converter converter = null; he said Engine Type and Converter between Java Types
When processed, the engine is looking for in the jbpm.type.properties file of the class path, if not, then find it in the org / jbpm / db / hibernate / jbpm.types.properties file, the file is edited, as follows: # each line contains 2 or 3 class names (transformer-class is optional) separated by a space: # variable-class
### stored in a text-field in the database ### java.lang.String org.jbpm.context.exe.variableinstance.StringInstancejava.lang.Boolean org.jbpm.context.exe.converter.BooleanToStringConverter org.jbpm. context.exe.variableinstance.StringInstancejava.lang.Character org.jbpm.context.exe.converter.CharacterToStringConverter org.jbpm.context.exe.variableinstance.StringInstancejava.lang.Float org.jbpm.context.exe.converter.FloatToStringConverter org. jbpm.context.exe.variableinstance.StringInstancejava.lang.Double org.jbpm.context.exe.converter.DoubleToStringConverter org.jbpm.context.exe.variableinstance.StringInstancejava.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.LongInstancejava.lang.Byte org.jbpm.context.exe.converter.ByteToLongConverter org.jbpm. context.exe.variableinstance.LongInstancejava.lang.Short org.jbpm.context.exe.converter.ShortToLongConverter org.jbpm.context.exe.variableinstance.LongInstancejava.lang.Integer org.jbpm.context.exe.converter.IntegerToLongConverter org. jbpm.context.exe.variableinstance.LongInstancejava.util.Date org.jbpm.context.exe.converter.DateToLongConverter org.jbpm.context.exe.variableinstance.LongInstance JAVA first column indicates the type, the third column indicates the type of engine The intermediate column indicates that the concept of converter defining a converter is actually very simple, for example, for the Boolean True, in the program is a value of java.lang.Boolean, but in the JBPM3 database, it is a string " T "or" f ", then a converter org.jbpm.context.exe.converter.BooleantStringConverter is required for conversion.