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 -
Hi, @Appu Nair in put method, What data should I place in the body of the request in the action and authentication_info field?
0 -
I replied to your other post here It seems like you are not a developer and just transferring info to someone else. For what it is worth observing in classic UI what parameters are required for you to upload a document? I have written it so that a new developer of sorts having some bearing on how things work in the programming world can understand.
- A name is optional or it will take the file name.
- A place the form showing Dtree. dataid of a container also called NodeID,ll Objid.
- optional categories.
- A File Picker Control
- None of the above controls are OT CS/Livelink specific they are rudimentary FORM controls of HTML Standard(RFC) and totally doable without the Livelink application. If you don't believe me ask ChatGpt to spin up in Java or javascript, not they have no connection to each other other than Java in the name of an HTML form that can upload a File to a webserver. If you use Fiddler you will see in its code multipart-form data which is exactly what it sounds like it is a Form and then data comes in as multiple times separated by a boundary. The boundary is ephemeral(random).
- So once the File is posted to the livelink webserver by the CGI program(livelink.exe, cs.exe, cs) the File is again processed by Livelink oscript code, and links created in its internal tables(Dtrre.DataID becomes Deversdta. Docid Finally puts the file information in ProviderData)
- This is what the OT Implementation Notes in a nuts heel is trying to tell you if you post a File I need it in multipart.
the JAVA REST API EXPERIMENTS.docx is a version I made for our product so that it can upload documents from a Leading application(like SAP, Maximo ) and so on.
OpenText deliberately puts terse documentation so in that example they say the same thing as I do but it doesn't show you how the File is taken from a computer and put :)
I will also now not reply to any more of your handle posts as I don't know if you are really a developer or a bot :)
0
Categories
- All Categories
- 123 Developer Announcements
- 54 Articles
- 150 General Questions
- 148 Thrust Services
- 57 OpenText Hackathon
- 37 Developer Tools
- 20.6K Analytics
- 4.2K AppWorks
- 9K Extended ECM
- 918 Core Messaging
- 84 Digital Asset Management
- 9.4K Documentum
- 32 eDOCS
- 186 Exstream
- 39.8K TeamSite
- 1.7K Web Experience Management
- 8 XM Fax
- Follow Categories