cancel
Showing results for 
Search instead for 
Did you mean: 

fetch all the docs and attachments related to a completed workflow of a given model

Not applicable

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.

3 REPLIES 3

sanjaybandhniya
Elite Collaborator
Elite Collaborator

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.

image

openpj
Elite Collaborator
Elite Collaborator

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 Smiley Wink