AnsweredAssumed Answered

[REST API] Add attachment external resource

Question asked by richardwilly98 on Nov 22, 2013
Latest reply on Dec 5, 2013 by frederikheremans1
Hi,

I am using Activiti 5.14 (also tested with 5.13).
I try to add a new attachment which is a link to an external resource using [1].
curl –user kermit:kermit -XPOST http://localhost:18080/activiti-rest/service/runtime/tasks/{taskId}/attachments -H "Content-Type: application/json" -d
'{
  "name":"Simple attachment",
  "description":"Simple attachment description",
  "type":"simpleType",
  "externalUrl":"http://activiti.org"
}'

The response code is 201 but I cannot find the new attachment in "Related content" section from Activiti Explorer instead it appears in "Events" section.

I compare entries created from activiti explorer and REST api in act_hi_attachment table and it looks like the difference is proc_inst_id_ being null when created from REST api.

I am pretty new with Activiti. I am missing something obvious?

[1] - http://activiti.org/userguide/index.html#N14BCF

Thanks,
   Richard.

Outcomes