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

cancel
Showing results for 
Search instead for 
Did you mean: 
Anonymous
Former Member

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

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
sanjaybandhniya
Intermediate

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

What you mean by given model?

Is this for Alfresco content service or alfresco process service?

Anonymous
Former Member

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

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.

appDesigner.JPG

openpj
Moderator
Moderator

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

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