As we transition to the new Hyland Community, some post links may be temporarily disrupted as we finalize redirects. We apologize for the inconvenience and are working to resolve this as quickly as possible. Details.
Team,
How do I fetch all the docs and attachments related to a completed workflow of a given model?
If that is achievable without any customization, please provide guidance/snippet on that.
its APS 1.10.
What you mean by given model?
Is this for Alfresco content service or alfresco process service?
Here is clarification.
App Designer uses visual steps to create our bpmn model,
When we create app Using App Designer, it includes User Task and many such steps. If we can get attachment via javascript snippet to get.
and I need solution for APS not ACS.
You can use the RelatedContentService using the Java API.
You could create a ServiceTask using the following method:
relatedContentService.getFileContentForProcessInstance(task.getProcessInstanceId(), field, pageSize, page);
field is the process variable id that you have in your form for managing that specific attachment.
For example you could have something like the following:
relatedContentService.getFileContentForProcessInstance(task.getProcessInstanceId(), "contractAttachments", 10, 0);
Hope this helps