I have an external task that is downloading a PDF File and setting it as a variable inside a process. The code I’m using is the following:
FileValue variableValue = Variables.fileValue(filename).file(byteContent).mimeType(mimeType).create();
Variables.createVariables().putValue("pdf", variableValue);
Instead of using a File
type variable, camunda cockpit shows it as Bytes
and download’s it as a file without a format.