cancel
Showing results for 
Search instead for 
Did you mean: 

Start process using REST API with file attached

ta
Champ in-the-making
Champ in-the-making

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 1

abbask01
Star Collaborator
Star Collaborator

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