use of org.camunda.bpm.engine.variable.impl.value.UntypedValueImpl in project camunda-bpm-platform by camunda.
the class SingleQueryVariableValueCondition method initializeValue.
public void initializeValue(VariableSerializers serializers, TypedValue typedValue) {
TypedValueSerializer serializer = determineSerializer(serializers, typedValue);
if (typedValue instanceof UntypedValueImpl) {
// type has been detected
typedValue = serializer.convertToTypedValue((UntypedValueImpl) typedValue);
}
serializer.writeValue(typedValue, this);
this.type = serializer.getName();
}
use of org.camunda.bpm.engine.variable.impl.value.UntypedValueImpl in project camunda-bpm-platform by camunda.
the class AbstractSerializableValueSerializer method canWriteValue.
protected boolean canWriteValue(TypedValue typedValue) {
if (!(typedValue instanceof SerializableValue) && !(typedValue instanceof UntypedValueImpl)) {
return false;
}
if (typedValue instanceof SerializableValue) {
SerializableValue serializableValue = (SerializableValue) typedValue;
String requestedDataFormat = serializableValue.getSerializationDataFormat();
if (!serializableValue.isDeserialized()) {
// serialized object => dataformat must match
return serializationDataFormat.equals(requestedDataFormat);
} else {
final boolean canSerialize = typedValue.getValue() == null || canSerializeValue(typedValue.getValue());
return canSerialize && (requestedDataFormat == null || serializationDataFormat.equals(requestedDataFormat));
}
} else {
return typedValue.getValue() == null || canSerializeValue(typedValue.getValue());
}
}
Aggregations