Attachment should be managed with task attachment or variable?


There is a confusion that attachment should be managed with the variables or the attachment service?
If it should be bind with the task id then how to manage the attachment if it should be visible in the subsequent task?

Please help us to make it clear the difference between this


The attachments are managed through TaskService [1]
It could be bind to a task or process instance

It is not clear to me what are you asking here. It could help if give an example.

If your use case is to use the attachment in different tasks, maybe it is better to setup a variable and not attachment.

[1] camunda-bpm-platform/engine/src/main/java/org/camunda/bpm/engine/ at e7a498386b249516c8a3245fab8147efd8159924 · camunda/camunda-bpm-platform · GitHub

Best regards,

1 Like

Hi Yana,

Thanks for reply.

Lets say that there are 2 tasks in the process. And the scenario is that is user has attached the document in Task1 then it should be visible to Task2 also. If we will manage it with the TaskService then it will not be visible to Task2. right?

through attachment it wont visible to task 2. you have to set up a variable, so that u can access it across all the activities int the process