public void preInit(ProcessEngineConfigurationImpl processEngineConfiguration) {
    List<TypedValueSerializer> customSerializers = new ArrayList<TypedValueSerializer>();
    customSerializers.add(new ProcessInstanceVariableSerializer());
    customSerializers.add(new EnumVariableSerializer());

    processEngineConfiguration.setCustomPreVariableSerializers(customSerializers);
  }