Search in sources :

Example 1 with JodaDateTimeType

use of org.activiti.engine.impl.variable.JodaDateTimeType in project Activiti by Activiti.

the class ProcessEngineConfigurationImpl method initVariableTypes.

public void initVariableTypes() {
    if (variableTypes == null) {
        variableTypes = new DefaultVariableTypes();
        if (customPreVariableTypes != null) {
            for (VariableType customVariableType : customPreVariableTypes) {
                variableTypes.addType(customVariableType);
            }
        }
        variableTypes.addType(new NullType());
        variableTypes.addType(new StringType(getMaxLengthString()));
        variableTypes.addType(new LongStringType(getMaxLengthString() + 1));
        variableTypes.addType(new BooleanType());
        variableTypes.addType(new ShortType());
        variableTypes.addType(new IntegerType());
        variableTypes.addType(new LongType());
        variableTypes.addType(new DateType());
        variableTypes.addType(new JodaDateType());
        variableTypes.addType(new JodaDateTimeType());
        variableTypes.addType(new DoubleType());
        variableTypes.addType(new UUIDType());
        objectMapper.configOverride(BigDecimal.class).setFormat(JsonFormat.Value.forShape(JsonFormat.Shape.STRING));
        JsonTypeConverter jsonTypeConverter = new JsonTypeConverter(objectMapper, javaClassFieldForJackson);
        variableTypes.addType(new JsonType(getMaxLengthString(), objectMapper, serializePOJOsInVariablesToJson, jsonTypeConverter));
        variableTypes.addType(new LongJsonType(getMaxLengthString() + 1, objectMapper, serializePOJOsInVariablesToJson, jsonTypeConverter));
        // if java serliazation needed together with json defaulting then add to customPostVariableTypes
        if (!serializePOJOsInVariablesToJson) {
            variableTypes.addType(new ByteArrayType());
            variableTypes.addType(new SerializableType(serializableVariableTypeTrackDeserializedObjects));
            variableTypes.addType(new CustomObjectType("item", ItemInstance.class));
            variableTypes.addType(new CustomObjectType("message", MessageInstance.class));
        }
        if (customPostVariableTypes != null) {
            for (VariableType customVariableType : customPostVariableTypes) {
                variableTypes.addType(customVariableType);
            }
        }
    }
}
Also used : JsonType(org.activiti.engine.impl.variable.JsonType) LongJsonType(org.activiti.engine.impl.variable.LongJsonType) LongType(org.activiti.engine.impl.variable.LongType) JPAEntityListVariableType(org.activiti.engine.impl.variable.JPAEntityListVariableType) VariableType(org.activiti.engine.impl.variable.VariableType) JPAEntityVariableType(org.activiti.engine.impl.variable.JPAEntityVariableType) LongStringType(org.activiti.engine.impl.variable.LongStringType) StringType(org.activiti.engine.impl.variable.StringType) SerializableType(org.activiti.engine.impl.variable.SerializableType) ShortType(org.activiti.engine.impl.variable.ShortType) LongStringType(org.activiti.engine.impl.variable.LongStringType) BooleanType(org.activiti.engine.impl.variable.BooleanType) JodaDateTimeType(org.activiti.engine.impl.variable.JodaDateTimeType) BigDecimal(java.math.BigDecimal) CustomObjectType(org.activiti.engine.impl.variable.CustomObjectType) DefaultVariableTypes(org.activiti.engine.impl.variable.DefaultVariableTypes) IntegerType(org.activiti.engine.impl.variable.IntegerType) MessageInstance(org.activiti.engine.impl.bpmn.webservice.MessageInstance) DoubleType(org.activiti.engine.impl.variable.DoubleType) ByteArrayType(org.activiti.engine.impl.variable.ByteArrayType) UUIDType(org.activiti.engine.impl.variable.UUIDType) JsonTypeConverter(org.activiti.engine.impl.variable.JsonTypeConverter) NullType(org.activiti.engine.impl.variable.NullType) JodaDateType(org.activiti.engine.impl.variable.JodaDateType) DateType(org.activiti.engine.impl.variable.DateType) JodaDateType(org.activiti.engine.impl.variable.JodaDateType) LongJsonType(org.activiti.engine.impl.variable.LongJsonType) ItemInstance(org.activiti.engine.impl.bpmn.data.ItemInstance)

Aggregations

BigDecimal (java.math.BigDecimal)1 ItemInstance (org.activiti.engine.impl.bpmn.data.ItemInstance)1 MessageInstance (org.activiti.engine.impl.bpmn.webservice.MessageInstance)1 BooleanType (org.activiti.engine.impl.variable.BooleanType)1 ByteArrayType (org.activiti.engine.impl.variable.ByteArrayType)1 CustomObjectType (org.activiti.engine.impl.variable.CustomObjectType)1 DateType (org.activiti.engine.impl.variable.DateType)1 DefaultVariableTypes (org.activiti.engine.impl.variable.DefaultVariableTypes)1 DoubleType (org.activiti.engine.impl.variable.DoubleType)1 IntegerType (org.activiti.engine.impl.variable.IntegerType)1 JPAEntityListVariableType (org.activiti.engine.impl.variable.JPAEntityListVariableType)1 JPAEntityVariableType (org.activiti.engine.impl.variable.JPAEntityVariableType)1 JodaDateTimeType (org.activiti.engine.impl.variable.JodaDateTimeType)1 JodaDateType (org.activiti.engine.impl.variable.JodaDateType)1 JsonType (org.activiti.engine.impl.variable.JsonType)1 JsonTypeConverter (org.activiti.engine.impl.variable.JsonTypeConverter)1 LongJsonType (org.activiti.engine.impl.variable.LongJsonType)1 LongStringType (org.activiti.engine.impl.variable.LongStringType)1 LongType (org.activiti.engine.impl.variable.LongType)1 NullType (org.activiti.engine.impl.variable.NullType)1