use of org.wso2.carbon.bpmn.core.types.datatypes.xml.XmlType 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);
}
Aggregations