Hi, I wonder if anyone might be able to assist with the following issue I am having with file uploads.
Currently our bpmn model have an embedded form which allows file uploading. On the form we make use of the angular camForm.on(‘submit’) method to upload the files like below
After the embedded form we sent the processInstanceId and the variable name to another service which downloads this variable via the camunda REST API
/process-instance/processInstanceId/variables/variableName/data This is working fine until we moved this process to within a CMMN case, what I then realised is that the variable would be located within the case execution REST endpoint at
/case-execution/caseExecutionId/variables/variableName/data after switching to this it work until we remove the human task between the embedded form and the file download service. When the file download service calls this endpoint the REST API returns a 404.
I can confirm that the file has been uploaded but at the point when the file download service is executed it seems either the variable is not persisted at that point or the file upload has not yet completed.
If anyone could perhaps shed some light on this. Does the
camForm.variableManager.createVariable complete and persist the file data before the process model continues or could it still be busy when the next tasks in the BPMN is called? Then would there be another simpler way to send a reference of the file variable to the file download service to be downloaded? I am thinking in rather using the variable instance URL but I am not entirely sure how to retrieve the URL.
Any help would be appreciated.