- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎05-10-2016 03:00 AM
- Labels:
-
Archive
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎10-24-2016 05:05 PM
Then do the following.
http://localhost:8080/activiti-app/api/enterprise/content/raw [this will upload the content to activiti]
Now start the process instance http://localhost:8080/activiti-app/api/enterprise/process-instances and pass the id value returned by the previous REST call in the request.
For example assume that you get "id": 1001 in response while uploading the content. If your attachment field id in the form is "attach-field", you will need to start the process instance by passing in {"values":{"attach-field":"1001"} in the request.
Hope this helps.
Cheers,
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎05-10-2016 03:22 AM
{
"message": "Validation of form failed: Illegal related content id: <filePath>",
"messageKey": "GENERAL.ERROR.BAD-REQUEST"
}
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎05-10-2016 06:40 AM
POST /enterprise/tasks/{taskId}/raw-content
you get back the id of the content after upload, and need to use that in the form submission.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎10-03-2016 08:45 AM

Any luck on consuming that file as a process variable?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎10-24-2016 01:17 AM
Cheers,
Ciju
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎10-24-2016 01:26 AM
Thanks for your time. So now use case is I want that document(coming from outside) to be displayed as a part of form and after submission of form that document should be a part of process just like Activiti's normal attachment field. Please suggest any workaround if you have.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎10-24-2016 01:34 AM
Ciju
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎10-24-2016 10:49 AM
Consider a simple workflow with single user task… But Initiation of workflow will be via REST APIs… User task will have simple form with only display value fields… All display value fields will display the value of process variables which are passed during initiation of workflow… Now I want to display a document as a form field too… That document also needs to be passed by REST APIs or something else…
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎10-24-2016 05:05 PM
Then do the following.
http://localhost:8080/activiti-app/api/enterprise/content/raw [this will upload the content to activiti]
Now start the process instance http://localhost:8080/activiti-app/api/enterprise/process-instances and pass the id value returned by the previous REST call in the request.
For example assume that you get "id": 1001 in response while uploading the content. If your attachment field id in the form is "attach-field", you will need to start the process instance by passing in {"values":{"attach-field":"1001"} in the request.
Hope this helps.
Cheers,
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎07-04-2017 01:52 PM
Hi,
what you have suggested works for me.
The official documentation does not mention that topic and there is nothing around about how to pass multiple values of the same field (that means multiple attachments).
If you have two or more files previously uploaded, you need to pass a comma separated list of IDs. For example if you have two files with id 1001 and 1002, the Json body in the request should be look like this:
{
"processDefinitionId":"MyProcessDefinition:2:20140",
"values":{"attach-id":"1001,1002"}
}
Thanks.
