SQL Exception for "large" process variable values

Environment (Required on creation)

CibSeven 2.1.0

Description (Required on creation; please attach any relevant screenshots, stacktraces, log files, etc. to the ticket)

we need to store in a variable a large string and in another value a JSON containing information we need to transfer between actions. Both of these can become large especially when a we have a lot of nested workflows and also actions. each action can add new information to these JSON so actions afterwards can see them and work with.

### Error flushing statements.  Cause: org.apache.ibatis.executor.BatchExecutorException: org.cibseven.bpm.engine.impl.persistence.entity.HistoricDetailEntity.insertHistoricVariableUpdateEvent (batch index #1) failed. 
Cause: org.h2.jdbc.JdbcBatchUpdateException: Value too long for column "TEXT_ CHARACTER VARYING(4000)": "U&'[ {\\000a  ""idPathToAction"" : ""d0131_file_script_fileinputs_variable_length:my... (4020)"; 
SQL statement:
insert into ACT_HI_DETAIL
    (
      ID_,
      TYPE_,
      PROC_DEF_KEY_,
      PROC_DEF_ID_,
      ROOT_PROC_INST_ID_,
      PROC_INST_ID_,
      EXECUTION_ID_,
      ACT_INST_ID_,
      CASE_DEF_KEY_,
      CASE_DEF_ID_,
      CASE_INST_ID_,
      CASE_EXECUTION_ID_,
      TASK_ID_,
      NAME_,
      REV_,
      VAR_INST_ID_,
      VAR_TYPE_,
      TIME_,
      BYTEARRAY_ID_,
      DOUBLE_,
      LONG_,
      TEXT_,
      TEXT2_,
      SEQUENCE_COUNTER_,
      TENANT_ID_,
      OPERATION_ID_,
      REMOVAL_TIME_,
      INITIAL_
    )
    values (
      ?,
      'VariableUpdate',
      ?,
      ?,
      ?,
      ?,
      ?,
      ?,
      ?,
      ?,
      ?,
      ?,
      ?,
      ?,
      ?,
      ?,
      ?,
      ?,
      ?,
      ?,
      ?,
      ?,
      ?,
      ?,
      ?,
      ?,
      ?,
      ?
    ) [22001-232]

Steps to reproduce (Required on creation)

call seVariable with a String larger than 4000 chars

Observed Behavior (Required on creation)

JdbcBatchUpdateException when action is executed

Expected behavior (Required on creation)

no exception and we should have a possibility to store/transfer larger strings between actions

Root Cause (Required on prioritization)

string longer than 4000 chars used in setVariable

Solution Ideas

change field to CLOB

Workarounds

none known

Hints

Links

Breakdown

Pull Requests