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 VariableType
determineVariableType
(Object value) protected void
setVariableType
(VariableInstanceEntity variableInstance, VariableType type) Sets the type of the variable instance.void
setVariableValue
(VariableInstance variableInstance, Object value, String tenantId) Sets the value of a new persistent or transient variable instance.protected void
updateVariableType
(VariableInstanceEntity variableInstance, VariableType variableType) void
updateVariableValue
(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:VariableInstanceValueModifier
Sets the value of a new persistent or transient variable instance. This is invoked when a variable instance is created.- Specified by:
setVariableValue
in 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:VariableInstanceValueModifier
Updates the value of a variable instance. This is invoked when a variable instance already exists and its value is being updated.- Specified by:
updateVariableValue
in 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
-