REST Api - Workflow Attributes
I see that the Rest API documentation for Processes has been updated with some new endpoints. However, it's hard to tell from the documentation if it's possible now to update Workflow Attributes from the Rest Api. Is this something that can be done yet? And if so are there any examples?
Best Answers
-
The
Manage processes / workflows
endpoints that are currently available in the REST API do not show any signs of this possibility. Based on thePUT
actions, you're only able to either change the state of the workflow or push a workflow by its disposition.5 -
To update WF attribute using REST API:
URI - /api/v2/processes/{process_id}/subprocesses/{subprocess_id}/tasks/{task_id}
Method - PUT
HTTP Body (Form Data) example:
body: {"action":"formUpdate","values":{"WorkflowForm_2":"Company1"}}5
Answers
-
The
Manage processes / workflows
endpoints that are currently available in the REST API do not show any signs of this possibility. Based on thePUT
actions, you're only able to either change the state of the workflow or push a workflow by its disposition.5 -
That's disappointing, I had thought that was something that was going to be added in soon. I hope it's on the roadmap still for Workflow APIs.
0 -
To update WF attribute using REST API:
URI - /api/v2/processes/{process_id}/subprocesses/{subprocess_id}/tasks/{task_id}
Method - PUT
HTTP Body (Form Data) example:
body: {"action":"formUpdate","values":{"WorkflowForm_2":"Company1"}}5 -
Thanks Ivan, do you happen to know if there is documentation anywhere for what is acceptable for the different "actions" for this?
The API documentation is really lacking in this area. Very rarely does it show what actually are acceptable values it can accept in cases like this.
0 -
I am not aware of the existence of such documentation.
0 -
How were you able to figure it out without documentation then if you don't mind me asking? Just wondering if I'm missing a way I could discover some of this for myself in the future.
0 -
Hi All, can you please provide an API to fetch the attribute values from the workflow using workflow id, i am able to retrieve the Attribute name via api/v2/workflows/status/processes/{workflowid} but not able to retrieve the values
0 -
As a typical reply to questions like this, I usually answer this
- OT created SmartUI so they can use REST API as the way to offer functionality so if the SMARTUI shows WF Attribute data you can look at the payload using developer tools/fiddler and craft your calls. We all do this as REST API has almost no examples other than a few(including stuff I put out)
- For all Content Server activities(the one they renamed from Livelink) the toolkit called Web Reports(WR) has almost everything/anything conceivable with that. So if you know your workid/subworkid then getting WF Attribute data is like a 2 min job. Add on top of it that any WR can be made to work as a REST API endpoint you have a considerable anvil with which you can please your boss/as well as tide over any crisis:).Well, this is not the REST API OT put out but a different way if one needed a solution.
- As always an Oscript developer can get this or add any new REST api's.
0 -
What have you done now as a starting work can the forum users see it? Are you saying you are a developer who doesn't know how to use Browser Tools or Fiddler?. Can you do F12 when the smartui page of CS opens up and try to identify requests/responses….I sometimes find Fiddler to be easier.
BTW in my blog, I have worked out a fairly decent workflow example with screencaps etc.It was done a few years back so if the API has changed I wouldn't know
0
Categories
- All Categories
- 109 Developer Announcements
- 49 Articles
- 100 General Questions
- 122 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
- 121 Exstream
- 39.8K TeamSite
- 1.7K Web Experience Management