Upload Content - REST API
Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-03-2016 03:14 PM
Hi,
Using Activiti REST API to upload content to process instance, I get the response back with id, name, created, creted by etc…
But when I view the task I not seeing the this uploaded document attachment but its displayed in the process instance screen.
How I can relate this uploaded content to my form display value variable so that this document will be displayed to the users in the following tasks in the process?
Tried both REST service Process-instance
http://localhost:8080/activiti-app/api/enterprise/process-instances/182651/raw-content
And the tasks
http://localhost:8080/activiti-app/api/enterprise/tasks/182609/raw-content
Am I missing any parameter? Please let me know.
Thanks in advance!
Using Activiti REST API to upload content to process instance, I get the response back with id, name, created, creted by etc…
But when I view the task I not seeing the this uploaded document attachment but its displayed in the process instance screen.
How I can relate this uploaded content to my form display value variable so that this document will be displayed to the users in the following tasks in the process?
Tried both REST service Process-instance
http://localhost:8080/activiti-app/api/enterprise/process-instances/182651/raw-content
And the tasks
http://localhost:8080/activiti-app/api/enterprise/tasks/182609/raw-content
Am I missing any parameter? Please let me know.
Thanks in advance!
Labels:
- Labels:
-
Archive
4 REPLIES 4
Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-04-2016 02:45 AM
Hi,
Not sure it will help or not… just append ?isRelatedContent=true in your url and that document will show as a related content for particular task. by default it sets to false.
Not sure it will help or not… just append ?isRelatedContent=true in your url and that document will show as a related content for particular task. by default it sets to false.
Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-04-2016 09:02 AM
Thank you!
Tried that option with "/api/enterprise/tasks/" but it shows only in that particular task not in the following tasks that's in the flow.
I get the ID back in the response object when checked in the database table "RELATED_CONTENT" for that ID see the record with "field" value as null but for the one that I attach as part of the form from UI I see the value as the field name that I defined in the form.
Tried that option with "/api/enterprise/tasks/" but it shows only in that particular task not in the following tasks that's in the flow.
I get the ID back in the response object when checked in the database table "RELATED_CONTENT" for that ID see the record with "field" value as null but for the one that I attach as part of the form from UI I see the value as the field name that I defined in the form.
Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-24-2016 12:46 AM
Hi Ramesh,
May I know your use case for this scenario of uploading a document outside of the workflow? Is this a case where you have already started a process and the user might have forgotten to add an attachment. Then you would like to add an attachment from outside your process? If it is such a use case, I don't think any of the existing REST APIs can do this. This is because, the related content is linked to a form field when you submit a form from UI. However there are ways to work around this by using the Java APIs. So, please let me know your use case for me to suggest a solution.
Regards,
Ciju
May I know your use case for this scenario of uploading a document outside of the workflow? Is this a case where you have already started a process and the user might have forgotten to add an attachment. Then you would like to add an attachment from outside your process? If it is such a use case, I don't think any of the existing REST APIs can do this. This is because, the related content is linked to a form field when you submit a form from UI. However there are ways to work around this by using the Java APIs. So, please let me know your use case for me to suggest a solution.
Regards,
Ciju
Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-24-2016 08:33 AM
Hi Ciju,
This is related to the other posted that you responded earlier "Attach Document to the process in Java service" I found the solution for this by caling "relatedContentService.createRelatedContent" and setting the "fileattach" variable to display in the subsequent task.
Thank you for taking time and posting comments…Really Appreciate your help!!
Regards,
Ramesh
This is related to the other posted that you responded earlier "Attach Document to the process in Java service" I found the solution for this by caling "relatedContentService.createRelatedContent" and setting the "fileattach" variable to display in the subsequent task.
Thank you for taking time and posting comments…Really Appreciate your help!!
Regards,
Ramesh
