Made a process to upload a file.
Also added a execution listener to the process.
I want to know how to retrieve the uploaded file by execution listener
Below is my code for execution listener
I want to know how to get that file from database.
I want to know about java libraries to access file from database
Thank you in advance
If you have an attachment ID (from when you uploaded the attachment), then you can use the taskService
taskService.getAttachment(attachmentId);
If this returns not null, then you can get the attachment content using:
InputStream attachmentStream = taskService.getAttachmentContent(attachmentId);
Hope this is what you were looking for,
Greg
Hi,
Thank you
I may need more help regarding this as I am new to this.
Can you please please provide the full implementation of this.
I am doing something like this
Also how do you get the attachment id provide you know the form id
TaskService taskService = processEngine.getTaskService();
if(taskService.getAttachment("uploadurl")!=null){
InputStream attachmentStream = taskService.getAttachmentContent(attachmentId);
}
Here uploadurl is the form id for file upload
I think I am not doing it right
Please help
Ask for and offer help to other Alfresco Process Services and Activiti Users and members of the Alfresco team.
By using this site, you are agreeing to allow us to collect and use cookies as outlined in Alfresco’s Cookie Statement and Terms of Use (and you have a legitimate interest in Alfresco and our products, authorizing us to contact you in such methods). If you are not ok with these terms, please do not use this website.