cancel
Showing results for 
Search instead for 
Did you mean: 

Attach Document to the process in Java service

eramesh
Champ on-the-rise
Champ on-the-rise
Hi,

We are using Enterprise Activiti 1.5, in our process we got task to call external system to retrieve document and attach it the to the current process. Created service to make the call but not able to find the right service to add the document as attachment.

Please let me know what service can be used to attach document to the process in java service task.

Thanks!
2 REPLIES 2

cjose
Elite Collaborator
Elite Collaborator
RelatedContentService.createRelatedContent() can be used to do this.

I have posted some code in https://forums.activiti.org/content/pass-attachments-sub-process-call-activity which will show you how to add an attachment to a process instance and how to link it to a form field so that it can be viewed in any display value fields in subsequent tasks. Lemme know if this is of any help.

Cheers,
Ciju

eramesh
Champ on-the-rise
Champ on-the-rise
Hi Ciju,

Yes, I looked into your post earlier and had it working by calling the "relatedContentService.createRelatedContent" and setting the "FileAttach" variable to the content ID returned by the "createRelatedContent" method.

Thanks,
Ramesh
Getting started

Tags


Find what you came for

We want to make your experience in Hyland Connect as valuable as possible, so we put together some helpful links.