Embeeded form loading forever on Tasklist (cam-file-download directive creates an error)

Hello all,

I will try to explain my issue as detailed as possible in the following lines and I would appreciate it if you could give me some advice on how I can overcome it.

Basically I have the same business logic that was presented some months ago in a live demo by Benjamin Hoffmann in Camunda’s Process Automation Forum. So the model that was presented is displayed below.

What I need to know is how I can configure the “Decide on application” embeeded form, so when new documents are received by the customer, these documents are getting displayed in the form and the user who is assigned to this task can download these documents.

As the business logic indicates on the model above, whenever a new document is received by the customer, then this document must be displayed on the user task form.

In my case what I understand that I need to do is the following:
Behind the scenes every time that a new document is received a new process variable (type File) is created on the engine. Let’s say that the customer provides a pdf file that denotes his/her identity, so a new process variable identity.pdf is created in the background. Then I need to fetch this variable in the embeeded form and create a link for downloading the file. Inside my form I use some code like the following:

**<div class="form-group">**
**    <label class="control-label col-md-2">Document</label>**
**    <div class="form-control-static col-md-10">**
**      <a cam-file-download="identity.pdf"></a>**
**    </div>**
**  </div>**

However, if I use the code above and the process variable identity.pdf has not already been created, then the form is loading forever as shown below.

And I see this error:

I guess the issue (or bug) is occured, whenever the form is displayed on Tasklist but the process variable that is used on cam-file-download directive has not been created yet.

How can I overcome it?

Thank you in advance and wish you all a happy new year :slight_smile:

Can someone please help me on that?
Thank you in advance.