Updating a draft process with attributes using CS REST API
Hello everyone, we are trying to achieve a Workflow initiation where it has from the beginning attributes filled with data. For example, initiating a WF with the attribute "email" already with a value, to be used in an Email step.
- We've seen the thread where this was also explained here: https://forums.opentext.com/forums/developer/discussion/comment/944049#Comment_944049
But we can't seem to get the draft process to update.
This is what we've done: created a draft process using the Map ID, based on that we took the draftprocess_id, and then we made a PUT request with this body:
{"draftprocess_id" : 159998, "action": "formUpdate", "values": { "WorkflowForm_2": "email@gmail.ro"}}
We make this request in Postman using body/form-data where we put the body as a key and the JSON above as a value.
This returns the error:
{ "error": "Could not retrieve action"}
In this Workflow Map, we have exactly one WF attribute called email, I have a Start Step with Initiate in Smart View and a form that shows the attribute and it's set on editable.
Also, when we do the GET Request with /v1/forms/draftprocesses/update?draftprocess_id=159998
we get the information about this draft, what is weird is that in this section, we don't see an action with update as a key:
"data": { "actions": [ { "key": "Initiate", "label": "Start" } ],
This why we believe we cannot do the update actions on this workflow, why? Do we need to make other configurations/settings in OTCS beforehand?
Thank you!
Comments
-
In case you have WebReports including the WebReport WF extension you may consider starting the WF by calling a WebReport.
0 -
Hello @Hans_Stoop, we are right now limited to use the Content Server REST API 21.4.
Making a draft process and updating the Workflow attributes before initiating is exactly what we would need. But it seems that now the PUT request with either
"action":"Initiate"
or"action":"formUpdate"
does return the"Could not retrieve action"
error.Any chance this is fixable? In the 2020 thread people have managed to achieve this functionality of adding attributes to a Workflow before initiating it.
0 -
You can call the WR with REST.
For any fixes you need to contact support.
0
Categories
- All Categories
- 122 Developer Announcements
- 53 Articles
- 151 General Questions
- 146 Thrust Services
- 56 OpenText Hackathon
- 35 Developer Tools
- 20.6K Analytics
- 4.2K AppWorks
- 9K Extended ECM
- 917 Cloud Fax and Notifications
- 84 Digital Asset Management
- 9.4K Documentum
- 31 eDOCS
- 179 Exstream
- 39.8K TeamSite
- 1.7K Web Experience Management
- 9 XM Fax
- Follow Categories