Process Variable character storage issue

Hello everyone,

I am struggling with process variable length for Postgres db , right now Camunda is supporting only upto 4000 characters to be stored.

Is there any way to store more than 4000 characters to Camunda process variable?

Any suggestion would be really appreciated!

Put it into a list and store the list. Objects can have an unlimited size.

1 Like

Hello @GAURAV_MISHRA !
Welcome again!

Strings actually have a VARCHAR of 4000 in the database…

however, if you transform it into a JSON object and send this JSON to Camunda as a process variable, it will accept any size… because in the database the JSON is stored as a bytearray.

If you are using Java Delegates, you can send it to Camunda as JSON, using the SPIN library.

Example:

 PersonDataDto personData= new PersonDataDto(name, age);
 execution.setVariable("personData", Spin.JSON(personData));

Or as our friend mentioned above, a list works too!
I hope this helps.

William Robert Alves

2 Likes

Thanks @WilliamR.Alves & @fml2 I will do a POC and get back for any further clarification if needed!