cancel
Showing results for 
Search instead for 
Did you mean: 

Display Files attached in previous Process Instances

gbanks
Confirmed Champ
Confirmed Champ

Given a Process Instance ID OR ContentId, I need to be able to display to the user in a downloadable format all files attached during that workflow. These files are being stored as BLOBs in an Oracle database table. Is there a way I can display these files to the user following a query of that process instance ID? The "link" column of this table is empty.

34 REPLIES 34

cjose
Elite Collaborator
Elite Collaborator

See if you are able to import the attached app. I manually modified to make it compatible with 1.5

gbanks
Confirmed Champ
Confirmed Champ

I am seeing the same error

cjose
Elite Collaborator
Elite Collaborator

Not sure what is happening. Another option is to import the form and process components individually.

gbanks
Confirmed Champ
Confirmed Champ

I was able to import the model individually but the forms give me this error "Error while processing the form file : Could not import form model Display Docs-25037.json"

cjose
Elite Collaborator
Elite Collaborator

The form has just one field where I am using the hyperlink field. The url is /activiti-app/rest/content/${content_id_input}/raw

gbanks
Confirmed Champ
Confirmed Champ

Thank you, this is what I needed. The only issue I'm having now is that if I click on that link, I am not authenticated to go to the URL and receive a tomcat error. Are there any parameters I can pass in the URL to authenticate me?

cjose
Elite Collaborator
Elite Collaborator

That could be a permission issue. You won't be able to see any attachments that are part of process instances you are not involved in. If you want to see everyone's attachments

you either have to involve yourselves in all process instances

OR

you will have to write custom REST APIs using the internal Java APIs to bypass the default security model of the API.

gbanks
Confirmed Champ
Confirmed Champ

I am involved in the process instance in which the file is attached and still see this error. Are there authentication parameters I can pass in the URL that will allow me to see the file?

cjose
Elite Collaborator
Elite Collaborator

Nope. If you are using the API /activiti-app/app/rest/content/${content_id_input}/raw API, the only requirement is that you need to be logged in through the UI. This API is an internal API designed to work with the activiti-app's UI and is secured using a cookie based approach. Noticed that I had the path incorrectly set in my previous post. That could have been the issue!

gbanks
Confirmed Champ
Confirmed Champ

But I'm referring to accessing it through the hyperlink embedded in the form