Search in sources :

Example 1 with ExtendedJsonType

use of org.wso2.carbon.bpmn.core.types.datatypes.json.ExtendedJsonType in project carbon-business-process by wso2.

the class ActivitiEngineBuilder method setSupportedVariableTypes.

/**
 * Function to set supported variable types
 * @param processEngineConfiguration
 */
private void setSupportedVariableTypes(ProcessEngineConfigurationImpl processEngineConfiguration) {
    VariableTypes variableTypes = new DefaultVariableTypes();
    List<VariableType> customPreVariableTypes = processEngineConfiguration.getCustomPreVariableTypes();
    if (customPreVariableTypes != null) {
        for (VariableType customVariableType : customPreVariableTypes) {
            variableTypes.addType(customVariableType);
        }
    }
    // Default types in Activiti
    variableTypes.addType(new NullType());
    variableTypes.addType(new StringType(ProcessEngineConfigurationImpl.DEFAULT_ORACLE_MAX_LENGTH_STRING));
    variableTypes.addType(new LongStringType(ProcessEngineConfigurationImpl.DEFAULT_ORACLE_MAX_LENGTH_STRING + 1));
    variableTypes.addType(new BooleanType());
    variableTypes.addType(new ShortType());
    variableTypes.addType(new IntegerType());
    variableTypes.addType(new LongType());
    variableTypes.addType(new DateType());
    variableTypes.addType(new DoubleType());
    variableTypes.addType(new UUIDType());
    ;
    variableTypes.addType(new JsonType(ProcessEngineConfigurationImpl.DEFAULT_ORACLE_MAX_LENGTH_STRING, objectMapper));
    variableTypes.addType(new LongJsonType(ProcessEngineConfigurationImpl.DEFAULT_ORACLE_MAX_LENGTH_STRING + 1, objectMapper));
    variableTypes.addType(new ByteArrayType());
    variableTypes.addType(new SerializableType());
    variableTypes.addType(new CustomObjectType("item", ItemInstance.class));
    variableTypes.addType(new CustomObjectType("message", MessageInstance.class));
    // types added for WSO2 BPS
    variableTypes.addType(new ExtendedJsonType(ProcessEngineConfigurationImpl.DEFAULT_ORACLE_MAX_LENGTH_STRING, objectMapper));
    variableTypes.addType(new XmlType());
    List<VariableType> customPostVariableTypes = processEngineConfiguration.getCustomPostVariableTypes();
    if (customPostVariableTypes != null) {
        for (VariableType customVariableType : customPostVariableTypes) {
            variableTypes.addType(customVariableType);
        }
    }
    processEngineConfiguration.setVariableTypes(variableTypes);
}
Also used : ExtendedJsonType(org.wso2.carbon.bpmn.core.types.datatypes.json.ExtendedJsonType) LongJsonType(org.activiti.engine.impl.variable.LongJsonType) JsonType(org.activiti.engine.impl.variable.JsonType) VariableTypes(org.activiti.engine.impl.variable.VariableTypes) DefaultVariableTypes(org.activiti.engine.impl.variable.DefaultVariableTypes) LongType(org.activiti.engine.impl.variable.LongType) VariableType(org.activiti.engine.impl.variable.VariableType) ExtendedJsonType(org.wso2.carbon.bpmn.core.types.datatypes.json.ExtendedJsonType) StringType(org.activiti.engine.impl.variable.StringType) LongStringType(org.activiti.engine.impl.variable.LongStringType) 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) CustomObjectType(org.activiti.engine.impl.variable.CustomObjectType) XmlType(org.wso2.carbon.bpmn.core.types.datatypes.xml.XmlType) 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) NullType(org.activiti.engine.impl.variable.NullType) DateType(org.activiti.engine.impl.variable.DateType) LongJsonType(org.activiti.engine.impl.variable.LongJsonType) ItemInstance(org.activiti.engine.impl.bpmn.data.ItemInstance)

Aggregations

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 JsonType (org.activiti.engine.impl.variable.JsonType)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 SerializableType (org.activiti.engine.impl.variable.SerializableType)1 ShortType (org.activiti.engine.impl.variable.ShortType)1 StringType (org.activiti.engine.impl.variable.StringType)1 UUIDType (org.activiti.engine.impl.variable.UUIDType)1 VariableType (org.activiti.engine.impl.variable.VariableType)1 VariableTypes (org.activiti.engine.impl.variable.VariableTypes)1