04-06-2017 06:51 AM
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
04-11-2017 08:36 AM
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
04-12-2017 09:00 AM
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
04-12-2017 09:42 AM
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
Explore our Alfresco products with the links below. Use labels to filter content by product module.