AnsweredAssumed Answered

File uploads, attachmens, forms, and custom FormTypes

Question asked by rkroll on May 9, 2011
Latest reply on May 9, 2011 by ronald.van.kuijk
We have a business requirement to add multiple file upload fields within a form/process.  In this specific use case, we need to upload a large number of photos as part of our process, and are unsure how to implement this within Activiti.  If I was to create a new custom form type (FileFormType), is the type of data that would be in the object parameter the binary data of the form post?  Once this data is posted, we would want to store it externally to the engine (most likely in S3), my current thought is that this could be handled via a ServiceTask.  Is this the best method to handle this type of use case with an Activiti rendered form?

Another thought I had was to use an external REST endpoint to submit the file uploads, supplying a correlation ID, and to use the TaskService.addAttachment API to associate the uploads to the task.  My thought was that this would keep the potentially large binary data outside of the Activiti engine, while keeping the properties of the data available to the process.  Is this in line with the intentions of the newly added addAttachment API?

Any direction anyone can provide on how to address this type of use case would be greatly appreciated.

Thanks,
Rich

Outcomes