-
Bug Report
-
Resolution: Fixed
-
L3 - Default
-
external-task-client-js-2.1.0
-
None
Environment (Required on creation):
- 7.16
- External Task Client JS 2.1
Description (Required on creation; please attach any relevant screenshots, stacktraces, log files, etc. to the ticket):
Loading variables of type file is broken.
Steps to reproduce (Required on creation):
- Have a process with an External Task deployed
- Start a process instance and add a variable of type file with name foo and value bar
- Try to load the file in the XTaC JS:
client.subscribe("data", async function ({task}) { const { textAttachment } = task.variables.getAll(); console.log((await textAttachment.load()).content.toString("utf-8")); });
Observed Behavior (Required on creation):
Nothing is shown as output.
Expected behavior (Required on creation):
Nothing bar is shown as output.
Root Cause (Required on prioritization):
The client assumes to retrieve base64 string wrapped in a JSON object when loading files. However, the endpoint GET /execution/{id}/localVariables/{varName}/data is used which returns application/octet-stream.