Search in sources :

Example 1 with VariableSerializers

use of org.camunda.bpm.engine.impl.variable.serializer.VariableSerializers in project camunda-bpm-platform by camunda.

the class SpinProcessEnginePlugin method registerSerializers.

protected void registerSerializers(ProcessEngineConfigurationImpl processEngineConfiguration) {
    List<TypedValueSerializer<?>> spinDataFormatSerializers = lookupSpinSerializers();
    VariableSerializers variableSerializers = processEngineConfiguration.getVariableSerializers();
    int javaObjectSerializerIdx = variableSerializers.getSerializerIndexByName(JavaObjectSerializer.NAME);
    for (TypedValueSerializer<?> spinSerializer : spinDataFormatSerializers) {
        // add before java object serializer
        variableSerializers.addSerializer(spinSerializer, javaObjectSerializerIdx);
    }
}
Also used : VariableSerializers(org.camunda.bpm.engine.impl.variable.serializer.VariableSerializers) TypedValueSerializer(org.camunda.bpm.engine.impl.variable.serializer.TypedValueSerializer)

Example 2 with VariableSerializers

use of org.camunda.bpm.engine.impl.variable.serializer.VariableSerializers in project camunda-bpm-platform by camunda.

the class SpinBpmPlatformPlugin method initializeVariableSerializers.

protected void initializeVariableSerializers(AbstractProcessApplication abstractProcessApplication) {
    VariableSerializers paVariableSerializers = abstractProcessApplication.getVariableSerializers();
    if (paVariableSerializers == null) {
        paVariableSerializers = new DefaultVariableSerializers();
        abstractProcessApplication.setVariableSerializers(paVariableSerializers);
    }
    for (TypedValueSerializer<?> serializer : lookupSpinSerializers(abstractProcessApplication.getProcessApplicationClassloader())) {
        paVariableSerializers.addSerializer(serializer);
    }
}
Also used : DefaultVariableSerializers(org.camunda.bpm.engine.impl.variable.serializer.DefaultVariableSerializers) VariableSerializers(org.camunda.bpm.engine.impl.variable.serializer.VariableSerializers) DefaultVariableSerializers(org.camunda.bpm.engine.impl.variable.serializer.DefaultVariableSerializers)

Example 3 with VariableSerializers

use of org.camunda.bpm.engine.impl.variable.serializer.VariableSerializers in project camunda-bpm-platform by camunda.

the class HistoricVariableInstanceQueryImpl method ensureVariablesInitialized.

protected void ensureVariablesInitialized() {
    if (this.queryVariableValue != null) {
        VariableSerializers variableSerializers = Context.getProcessEngineConfiguration().getVariableSerializers();
        queryVariableValue.initialize(variableSerializers);
    }
}
Also used : VariableSerializers(org.camunda.bpm.engine.impl.variable.serializer.VariableSerializers)

Example 4 with VariableSerializers

use of org.camunda.bpm.engine.impl.variable.serializer.VariableSerializers in project camunda-bpm-platform by camunda.

the class TypedValueField method getSerializers.

public static VariableSerializers getSerializers() {
    if (Context.getCommandContext() != null) {
        VariableSerializers variableSerializers = Context.getProcessEngineConfiguration().getVariableSerializers();
        VariableSerializers paSerializers = getCurrentPaSerializers();
        if (paSerializers != null) {
            return variableSerializers.join(paSerializers);
        } else {
            return variableSerializers;
        }
    } else {
        throw LOG.serializerOutOfContextException();
    }
}
Also used : VariableSerializers(org.camunda.bpm.engine.impl.variable.serializer.VariableSerializers)

Aggregations

VariableSerializers (org.camunda.bpm.engine.impl.variable.serializer.VariableSerializers)4 DefaultVariableSerializers (org.camunda.bpm.engine.impl.variable.serializer.DefaultVariableSerializers)1 TypedValueSerializer (org.camunda.bpm.engine.impl.variable.serializer.TypedValueSerializer)1