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.