External process "large" variable

Hello

Fairly new to Camunda (and no Java Background…) so please forgive my ignorance…

I have an external Task which has to receive some json data in a variable. When this input variable is > 4k it can not be stored into the DB when saving the history. The only way I’ve found to send the data without this problem is to create an Object with S(my_big_json) and return that in the script that creates the input Parametr. The problem is I then receive a jdk.nashorn.api.scripting.ScriptObjectMirror<java.lang.String,java.lang.Object> in my external Task which has no knowledge on how to deserialize a Java Object (because it is not written in Java).

So my question is, how can I send json-data larger than 4k to an external Task?

regards
Stefan

replying to myself because I seem to have found a solution.

In the camunda Javascript engine, strings have a method getBytes() which generates a base64 encoded bytestream. When returning the json as bytes it can be stored in the history. The external Task can then easily decode and use the json.

The question that remains for me is, where do I find documentation on such APIs?