How to upload or download documents from ongoing Workflow?
Hello everyone,
We're trying to achieve a functionality where we need to extract or add documents to an ongoing workflow. Basically download/upload a Node from the Attachments Folder.
We've experimented with draft processes where we managed to get the ID of the Attachments Folder where we accessed some default documents for that process, but after initiating the WF it seemed that the ID of the Attachments Folder changed.
How could we get the Attachments Folder ID of an ongoing Workflow based on the WF ID, and how could we upload/download files from this Node?
Note: We have to use the Content Server REST API 21.4
Thank you all!
Comments
-
Assuming you know the Workid/Subworkid and Step # one can issue a call like this
Workid, Subworkid will always be same unless a subworkflow is generated
GET /otcs/cs.exe/api/v1/forms/processes/tasks/update?process_id=292516&subprocess_id=292516&task_id=1
This would give you JSON
If you add a File by drag and drop the JSON that happens is a ADD ,DELETE and so on.I added a file by DnD
GET /otcs/cs.exe/api/v1/forms/nodes/create?parent_id=292514&type=144 If you Finalize the pay load by clicking the sendon button it does a PUT
PUT /otcs/cs.exe/api/v2/processes/292516/subprocesses/292516/tasks/1
all of the smartui can now be attempted by POSTman or code. I did not get time to try this so i am not sure what the GET command is doing in this process .I had always thought adding files etc. is always by a PUT or a POST.I will try later and see if you can get by the following commands without using the SmartUI.
0 -
@Appu Nair thank you once again for this valuable information you're a life saver.
Using the request you presented we were able to extract the ID of the Attachments folder, from here we managed to upload a document using the Create Node method and also see & get documents from this directory.
☺️
0 -
As @Appu Nair states its currently not in the REST API, a Feature Request to OT should be in order and then share the value so others can support it too.
In terms of how you would do this, you should be able to use a LiveReport / WebReport and provide the WorkID and SubWorkID values and have them return the Node ID of the attachments folder which you can then access using standard REST calls.
0
Categories
- All Categories
- 111 Developer Announcements
- 49 Articles
- 104 General Questions
- 123 IM Services
- 40 OpenText Hackathon
- 31 Developer Tools
- 20.6K Analytics
- 4.1K AppWorks
- 8.9K Extended ECM
- 897 Cloud Fax and Notifications
- 77 Digital Asset Management
- 9.3K Documentum
- 29 eDOCS
- 123 Exstream
- 39.8K TeamSite
- 1.7K Web Experience Management
- 1 XM Fax