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-06-2017 08:47 AM
Hi Marco,
RelatedContentService relatedContentService & RelatedContentRepository relatedContentRepository beans might be what you are looking for here. Check if this post is of any help - Pass attachments to sub process (call activity)
If you have a valid license, you should be able to request access to the Enterprise Repository Nexus Repository Manager which contains the java docs of all the enterprise libraries.
Hope this helps!
Regards,
Ciju
04-06-2017 09:20 AM
Hi Ciju.
.. Thanks so far!
As I am from the business side having just the Activiti APP but no access to the underlying Activiti ENGINE my possibilities are limited to what is achievable using the Activiti App.
Therefore I'd appreciate very much an example on how to adress an attachement using the Activiti App. I suppose it's not that difficult once I know how to address complex data types (like attachement).
Best regards
Marco
04-06-2017 09:36 AM
Understand. Can you please describe your use case of using a TaskListener /Execution Listener?
04-06-2017 12:50 PM
Hi Ciju.
.. you're right: I should explain the use case.
The process got a couple of user steps in a row (sequentially), each on assigned to a different assignee (group). Each assignee might attach files and see all files that have been attached in the steps before but must not delete attachments that have been added in a previous step.
Therefore I can't just use one "Attach File" form field since it allows deleting files. So I provide a separate "Attach File" form field for each step plus as many "Display value" form fields as steps have been before. The downside of this is that the "Display value" form field would always being displayed even if no attachment had been added in a previous step. In this case [empty] would be displayed. To hide "empty attachments" I'd like to check each "Display value" of the steps before. That is why I need to know how to adress an attachment/file object in the Execution/Task Listener.
This use case might sound not that thrilling but knowing how to adress the attachment properties would open possibilities for a couple of other use cases.
Best regards
Marco
04-06-2017 04:44 PM
04-10-2017 08:41 AM
Hello Ciju.
Your Javascript-based solution seems to address the use case perfectly. But I suppose
viewfield.isVisible=false;
doesn't have the effect we expected.
.. see screenshot
Best Regards
Marco
04-10-2017 09:13 AM
Hello Marco,
Not sure what is happening here, it is working for me. Did you make any modifications to the app which I uploaded? Please attach your app so that I can check the java scripts and forms.
Ciju
04-11-2017 03:40 AM
04-11-2017 08:36 AM
Explore our Alfresco products with the links below. Use labels to filter content by product module.