Start process using REST API with file attached

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

Start process using REST API with file attached

Hi,

I know it's possible to start a business process with a file attached to form field using graphical user interface. Is it possible to do the same programmatically using Alfresco Process Services REST API? 

It seems that POST /enterprise/process-instances (Start a process instance) only contains variables and values fields: https://activiti.alfresco.com/activiti-app/api-explorer.html#!/process-instances/startNewProcessInst...

1 Reply
abbask01
Senior Member

Re: Start process using REST API with file attached

There's no direct API to initiate process instance with Attachments.

What you can do is first create the attachment in aps using content-api

Get the Content ID from the response and send the same in the start-process api with the fieldID same as your form's field id.

You can also attach field directly thttps://activiti.alfresco.com/activiti-app/api-explorer.html#!/content/createRelatedContentOnProcessInstanceUsingPOST_1o the process instance using-

Regards,
Abbas