cancel
Showing results for 
Search instead for 
Did you mean: 

Attachment - how to access properties

mrahn
Confirmed Champ
Confirmed Champ

Dear community.

Using the Activiti App I wonder how I could access properties of attachments. Attachments seem to be of a complex datatype.

I would like to use a attachments name in a execution listener or task listener - writing it to variable (execution.setVariable ..).

Since I have no access to the Code (using the app only) and since documentation is VERY limited I need you help with this.

Marco

1 ACCEPTED ANSWER

cjose
Elite Collaborator
Elite Collaborator

Hi Marco,

I think I figured out the issue. The isVisible is getting overwritten by the visibility condition evaluation. So I decided to control this by adding a visibility condition which returns false. Please find attached a sample app with the updated scripts.

Ciju

View answer in original post

11 REPLIES 11

mrahn
Confirmed Champ
Confirmed Champ

Thank you Ciju!

Your solution works and does exactly what my use case requires!

Best regards

Marco

.. I'm still interested to learn how to address the file object type, e.g. to get all file names attached

cjose
Elite Collaborator
Elite Collaborator

Hi Marco,

Good to know that it helped!

To get other attributes of the file object on the UI side, you can inspect the field value by logging the field value to console (console.log(<your-field.value>)) and access it using java script.

However if you want to extract the file attributes on the server side, use the relatedContentService bean in your custom java code or script.

Ciju