AnsweredAssumed Answered

Activiti 5.11 - unable to create a process attachment

Question asked by gunnar1 on Dec 7, 2012
Latest reply on Dec 7, 2012 by ronald.van.kuijk
Up to Activiti 5.10 it has been possible to add an attachment to a process instance using:


  /** Add a new attachment to a task and/or a process instance and use an input stream to provide the content */
  Attachment createAttachment(String attachmentType, String taskId, String processInstanceId, String attachmentName, String attachmentDescription, InputStream content);

In case you wanted the content attached to the process instance only you have been able to set the taskId to null. Hence there has been an attachment assiociated with the process without requiring a task. That's what javadoc said as well: "Add a new attachment to a task and/or a process instance".

In Activiti 5.11 you'll get an Exception saying "taskId is null".  :(

How do  I add an attachment to a process now?

Outcomes