Creating a new attachment on a task by making a "multipart/form-data" request to activiti rest api (runtime/tasks/{taskId}/attachments) on activiti version 5.22.0 but getting an error : "Failed to serialize to a AttachmentRequest instance"

cancel
Showing results for 
Search instead for 
Did you mean: 
Highlighted
Member II

Creating a new attachment on a task by making a "multipart/form-data" request to activiti rest api (runtime/tasks/{taskId}/attachments) on activiti version 5.22.0 but getting an error : "Failed to serialize to a AttachmentRequest instance"

I want to attach a file with a task using activiti rest api call but activiti is returning exception as "Failed to serialize to a AttachmentRequest instance" .

1 Reply
Highlighted
Established Member II

Re: Creating a new attachment on a task by making a "multipart/form-data" request to activiti rest api (runtime/tasks/{taskId}/attachments) on activiti version 5.22.0 but getting an error : "Failed to serialize to a AttachmentRequest instance"

Saurabh,

I've attempted the following multipart/form-data call:
POST /api/runtime/tasks/{taskId}/attachments
File: <specified file> (I used a .jpeg)

Name: <named the file>

Description: <this field is optional>

I receive a 201 CREATED back from Activiti.

Could you lay out the query you're making with a little bit more detail, and verify that you're trying to attach to a running/live task instance? It would also help if you included the stacktrace from the logs when this exception occurs.

Thanks,
-JEarles