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 Details

  • Constructor Details

  • Method Details

    • setVariableValue

      public void setVariableValue(VariableInstance variableInstance, Object value, String tenantId)
      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 interface VariableInstanceValueModifier
      Parameters:
      variableInstance - the variable instance to be modified
      value - the new value to be set for the variable instance.
      tenantId - the ID of the tenant the variable instance belongs to
    • updateVariableValue

      public void updateVariableValue(VariableInstance variableInstance, Object value, String tenantId)
      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 interface VariableInstanceValueModifier
      Parameters:
      variableInstance - the variable instance to be modified
      value - 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

      protected VariableType determineVariableType(Object value)
    • setVariableType

      protected void setVariableType(VariableInstanceEntity variableInstance, VariableType type)
      Sets the type of the variable instance.
      Parameters:
      variableInstance - the variable instance to be modified
      type - the type to be set for the variable instance