How to handle response of more than 4000 characters using camunda external task

When using external task feature provided by camunda I am facing issue if response is more that 4k characters. I am using this module to implement external task feature

Exception:-

   NULL,
      3,
      NULL,
      NULL
    ) was aborted.  Call getNextException to see the cause.
org.postgresql.util.PSQLException: **ERROR: value too long for type character varying(4000)**
'. Flush summary:
 [
  INSERT HistoricVariableInstanceEntity[dd43fad7-904e-11ea-bb50-0242ac1f030a]
  INSERT HistoricJobLogEventEntity[dd4421ea-904e-11ea-bb50-0242ac1f030a]
  INSERT HistoricVariableUpdateEventEntity[dd3be481-904e-11ea-bb50-0242ac1f030a]
  INSERT HistoricVariableUpdateEventEntity[dd3c32a4-904e-11ea-bb50-0242ac1f030a]
  INSERT HistoricVariableUpdateEventEntity[dd43fad8-904e-11ea-bb50-0242ac1f030a]
  INSERT HistoricExternalTaskLogEntity[dd3ccee6-904e-11ea-bb50-0242ac1f030a]
  INSERT ByteArrayEntity[dd3c32a2-904e-11ea-bb50-0242ac1f030a]
  INSERT ByteArrayEntity[dd3c32a3-904e-11ea-bb50-0242ac1f030a]
  INSERT ByteArrayEntity[dd3ca7d5-904e-11ea-bb50-0242ac1f030a]
  INSERT VariableInstanceEntity[dd43fad7-904e-11ea-bb50-0242ac1f030a]
  INSERT MessageEntity[dd4421e9-904e-11ea-bb50-0242ac1f030a]
  DELETE ExternalTaskEntity[cadab10c-904e-11ea-bb50-0242ac1f030a]
  UPDATE VariableInstanceEntity[c82b4842-904e-11ea-bb50-0242ac1f030a]
  UPDATE VariableInstanceEntity[c82b4845-904e-11ea-bb50-0242ac1f030a]
  DELETE VariableInstanceEntity[cad273a0-904e-11ea-bb50-0242ac1f030a]
  DELETE VariableInstanceEntity[cad273a2-904e-11ea-bb50-0242ac1f030a]
  DELETE VariableInstanceEntity[cad273a4-904e-11ea-bb50-0242ac1f030a]

@Ankur_Rathi You need to pass that variable as Object.

You can JSON stringify that object and pass the type json to the process.

{
    "variables": {
        "aVariablename": {
            "value": "<Serialized Json variable value>",
            "type": "Json"
        }
    }
}

And when retrieving that variable use deserializeValues=false to get the json object value

Refer this post: