How to manage file variable in C8?

in C7, we manipulate files with this class:

import org.camunda.bpm.engine.variable.value.FileValue;

What is the corresponding class to manipulate files in C8? The idea is to access it with an external worker.

Hi @Pierre-Yves.Monnet :wave:

In Camunda Platform 8, we support only JSON values. There is no support for file values. Please check the docs: Variables | Camunda Platform 8

If you are working with files in the job worker then it is recommended to store the file externally (i.e. Amazon S3 storage service) and store only the reference to the file (i.e. the link) as a process variable.

Best regards,


The alternative (if storing externally is for whatever reason not an option) is to transform the data to/from JSON. Jackson can also do that for a byte[] for you (see e.g. Sending a byte array in json using jackson - Stack Overflow).
But you have to keep size limits in mind: Variables | Camunda Platform 8


Thank you, this is very helpful!