Class ObjectJsonVariableTransformer

java.lang.Object
io.camunda.migrator.impl.interceptor.ObjectJsonVariableTransformer
All Implemented Interfaces:
VariableInterceptor

@Order(10) @Component public class ObjectJsonVariableTransformer extends Object implements VariableInterceptor
Transformer for JSON Object variables during migration from Camunda 7 to Camunda 8.

Converts JSON Object variables to C8 compatible Map format.

  • Field Details

    • objectMapper

      @Autowired protected com.fasterxml.jackson.databind.ObjectMapper objectMapper
  • Constructor Details

    • ObjectJsonVariableTransformer

      public ObjectJsonVariableTransformer()
  • Method Details

    • getTypes

      public Set<Class<?>> getTypes()
      Description copied from interface: VariableInterceptor
      Returns the set of variable value types that this interceptor can handle.

      Use Camunda's existing type interfaces like: - PrimitiveValue.class for primitive variables - DateValue.class for date variables - ObjectValue.class for object variables (JSON, XML, Java serialized) - FileValue.class for file variables - SpinValue.class for Spin variables

      If the returned set is empty, this interceptor will be called for all variable types.

      Default implementation returns an empty set (handle all types) for backward compatibility.

      Specified by:
      getTypes in interface VariableInterceptor
      Returns:
      set of supported variable value types, or empty set to handle all types
    • execute

      public void execute(VariableInvocation invocation)
      Description copied from interface: VariableInterceptor
      Executes the interceptor logic for a variable invocation. This method will only be called if the variable type matches one of the supported types.
      Specified by:
      execute in interface VariableInterceptor
      Parameters:
      invocation - the variable invocation containing C7 variable data and methods to modify it
    • setJsonVariable

      protected void setJsonVariable(VariableInvocation invocation, String jsonString)