Storing large text value into application variable store

Hi All,

New to Camunda, hence asking a naive question here.

I am playing with large HTTP response values , for which I am using HttpConnector and storing the value in the response “variable” collection store of application.

When the process completes and wants to write the history, get the below error. I know the response string is too long.

So what is the best place to keep large test above 4000 char, that is available for other tasks in application flow?

Cannot instantiate process definition rest_process:30:3e84573f-984f-11ea-a117-ee9a1711693b: ENGINE-03004 Exception while executing Database Operation ‘INSERT HistoricVariableInstanceEntity[5bf5dfc0-984f-11ea-a117-ee9a1711693b]’ with message ’ ### Error flushing statements. Cause: org.apache.ibatis.executor.BatchExecutorException: org.camunda.bpm.engine.impl.persistence.entity.HistoricVariableInstanceEntity.insertHistoricVariableInstance (batch index #1) failed. Cause: org.h2.jdbc.JdbcBatchUpdateException: Value too long for column “TEXT_ VARCHAR(4000)”:

@AmeyaShetti you should store the process variables as Objects

You should try to use the Typed Variable API .

ObjectValue typedObjectValue = Variables.objectValue(responseObject).create();
runtimeService.setVariable(execution.getId(), "response", typedObjectValue);

Hi, we also faced the same issue… and we have solved by storing as objects (serialized), instead of string value.