Class DefaultVariableInstanceValueModifier
java.lang.Object
org.flowable.variable.service.impl.DefaultVariableInstanceValueModifier
- All Implemented Interfaces:
VariableInstanceValueModifier
public class DefaultVariableInstanceValueModifier
extends Object
implements VariableInstanceValueModifier
The default implementation of the
VariableInstanceValueModifier interface for the Flowable Variable Service.
It implements the default lookup logic for variable types, setting and updating of values for variable instances.
-
Field Summary
Fields -
Constructor Summary
ConstructorsConstructorDescriptionDefaultVariableInstanceValueModifier(VariableServiceConfiguration serviceConfiguration) -
Method Summary
Modifier and TypeMethodDescriptionprotected VariableTypedetermineVariableType(Object value) protected voidsetVariableType(VariableInstanceEntity variableInstance, VariableType type) Sets the type of the variable instance.voidsetVariableValue(VariableInstance variableInstance, Object value, String tenantId) Sets the value of a new persistent or transient variable instance.protected voidupdateVariableType(VariableInstanceEntity variableInstance, VariableType variableType) voidupdateVariableValue(VariableInstance variableInstance, Object value, String tenantId) Updates the value of a variable instance.
-
Field Details
-
serviceConfiguration
-
-
Constructor Details
-
DefaultVariableInstanceValueModifier
-
-
Method Details
-
setVariableValue
Description copied from interface:VariableInstanceValueModifierSets the value of a new persistent or transient variable instance. This is invoked when a variable instance is created.- Specified by:
setVariableValuein interfaceVariableInstanceValueModifier- Parameters:
variableInstance- the variable instance to be modifiedvalue- the new value to be set for the variable instance.tenantId- the ID of the tenant the variable instance belongs to
-
updateVariableValue
Description copied from interface:VariableInstanceValueModifierUpdates the value of a variable instance. This is invoked when a variable instance already exists and its value is being updated.- Specified by:
updateVariableValuein interfaceVariableInstanceValueModifier- Parameters:
variableInstance- the variable instance to be modifiedvalue- the value to be set for the updated variable instance.tenantId- the ID of the tenant the variable instance belongs to
-
updateVariableType
protected void updateVariableType(VariableInstanceEntity variableInstance, VariableType variableType) -
determineVariableType
-
setVariableType
Sets the type of the variable instance.- Parameters:
variableInstance- the variable instance to be modifiedtype- the type to be set for the variable instance
-