Error while starting process instance

{
“type”: “RestException”,
“message”: “Cannot instantiate process definition blockDebitbpmn:4:41610: ENGINE-03004 Exception while executing Database Operation ‘INSERT HistoricVariableInstanceEntity[80717]’ with message ‘\n### Error flushing statements. Cause: org.apache.ibatis.executor.BatchExecutorException: org.camunda.bpm.engine.impl.persistence.entity.HistoricVariableInstanceEntity.insertHistoricVariableInstance (batch index #1) failed. Cause: java.sql.BatchUpdateException: Batch entry 5 insert into public.ACT_HI_VARINST (\n ID_,\n PROC_DEF_KEY_,\n PROC_DEF_ID_,\n ROOT_PROC_INST_ID_,\n PROC_INST_ID_,\n EXECUTION_ID_,\n ACT_INST_ID_,\n TENANT_ID_,\n CASE_DEF_KEY_,\n CASE_DEF_ID_,\n CASE_INST_ID_,\n CASE_EXECUTION_ID_,\n TASK_ID_,\n NAME_,\n REV_,\n VAR_TYPE_,\n CREATE_TIME_,\n REMOVAL_TIME_,\n BYTEARRAY_ID_,\n DOUBLE_,\n LONG_,\n TEXT_,\n TEXT2_,\n STATE_\n ) values (\n ‘80722’,\n ‘blockDebitbpmn’,\n ‘blockDebitbpmn:4:41610’,\n ‘80716’,\n ‘80716’,\n ‘80716’,\n ‘80716’,\n ‘140793’,\n NULL,\n NULL,\n NULL,\n NULL,\n NULL,\n ‘body’,\n 0,\n ‘string’,\n ‘2020-04-21 06:23:26.347+00’,\n NULL,\n NULL,\n NULL,\n NULL,\n ‘{
.
.
.
.
.
.
.
.
.
.’,\n NULL,\n ‘CREATED’\n ) was aborted: ERROR: value too long for type character varying(4000) Call getNextException to see other errors in the batch.’. Flush summary: \n [\n INSERT HistoricVariableInstanceEntity[80717]\n INSERT HistoricVariableInstanceEntity[80718]\n INSERT HistoricVariableInstanceEntity[80719]\n INSERT HistoricVariableInstanceEntity[80720]\n INSERT HistoricVariableInstanceEntity[80721]\n INSERT HistoricVariableInstanceEntity[80722]\n INSERT HistoricVariableInstanceEntity[80723]\n INSERT HistoricVariableInstanceEntity[80724]\n INSERT HistoricVariableInstanceEntity[80725]\n INSERT HistoricVariableInstanceEntity[80726]\n INSERT HistoricVariableInstanceEntity[80727]\n INSERT HistoricVariableInstanceEntity[80728]\n INSERT UserOperationLogEntryEventEntity[80749]\n INSERT HistoricVariableUpdateEventEntity[80731]\n INSERT HistoricVariableUpdateEventEntity[80732]\n INSERT HistoricVariableUpdateEventEntity[80733]\n INSERT HistoricVariableUpdateEventEntity[80734]\n INSERT HistoricVariableUpdateEventEntity[80735]\n INSERT HistoricVariableUpdateEventEntity[80736]\n INSERT HistoricVariableUpdateEventEntity[80737]\n INSERT HistoricVariableUpdateEventEntity[80738]\n INSERT HistoricVariableUpdateEventEntity[80739]\n INSERT HistoricVariableUpdateEventEntity[80740]\n INSERT HistoricVariableUpdateEventEntity[80741]\n INSERT HistoricVariableUpdateEventEntity[80742]\n INSERT HistoricTaskInstanceEventEntity[80744]\n INSERT HistoricProcessInstanceEventEntity[80716]\n INSERT HistoricIdentityLinkLogEventEntity[80746]\n INSERT HistoricIdentityLinkLogEventEntity[80748]\n INSERT HistoricActivityInstanceEventEntity[Task_1befmeq:80743]\n INSERT HistoricActivityInstanceEventEntity[start:80729]\n INSERT ExecutionEntity[80716]\n INSERT TaskEntity[80744]\n INSERT VariableInstanceEntity[80717]\n INSERT VariableInstanceEntity[80718]\n INSERT VariableInstanceEntity[80719]\n INSERT VariableInstanceEntity[80720]\n INSERT VariableInstanceEntity[80721]\n INSERT VariableInstanceEntity[80722]\n INSERT VariableInstanceEntity[80723]\n INSERT VariableInstanceEntity[80724]\n INSERT VariableInstanceEntity[80725]\n INSERT VariableInstanceEntity[80726]\n INSERT VariableInstanceEntity[80727]\n INSERT VariableInstanceEntity[80728]\n INSERT IdentityLinkEntity[80745]\n INSERT IdentityLinkEntity[80747]\n]”
}

@Sandeep_Yalamarthi you’re storing the payload as json string in the process variable. But the payload size exceeds varchar(4000), so it fails with exception was aborted: ERROR: value too long for type character varying(4000) Call getNextException to see other errors in the batch.

Alternatively, you can store this payload as an object.

1 Like

@aravindhrs i am expecting the payload as one of the variables passed while starting the process instance. Does camunda support object type for the variable.?? I dont see it in the camunda modeler.

@Sandeep_Yalamarthi camunda supports persisting Objects. Process variables are not modeler properties.

Thanks i will go through it