Start process using REST API with file attached

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-15-2021 04:09 AM
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...
- Labels:
-
Alfresco Process Services
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-16-2021 02:00 PM
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-
Abbas
