It's all about the answers!

Ask a question

List of permitted actions through REST call


Michele Pegoraro (1.8k14118103) | asked Oct 03 '11, 5:13 a.m.
Hi,
I'd like to find automatically actions permitted from a specific workflow state using a REST call. If I search information on a workflow state using this url:

https://rtchost:9443/jazz/oslc/workflows/workflowUUID/states/WorkflowID/StateID.json

this does not return any list of actions. At the same time, if I search workflow info using

https://rtchost:9443/jazz/oslc/workflows/workflowUUID/actions/WorkflowID.json

I get only a list of action with the target workflow state.

Which url can I call in order to get this information?

Thanks,
Michele.

Comments
Ishrat Mohammed commented Aug 25 '13, 6:28 p.m.

I am also looking for the similar functionality. Is this possible through REST..?

thanks
-Ishrat.

3 answers



permanent link
Erik Jägervall (73710) | answered May 28 '12, 5:31 a.m.
I am also interested in how this can be achieved. What we want to achieve is to give the user a list of possible state-actions that can be performed from the current state.

We can easily with REST get the current state of the work item. From there we want to get the list of possible actions, ie more or less the same information that you get by looking into the process defintion:

<state group="inprogress" icon="processattachment:/workflow/inprogress.gif" id="s2" name="%scrum_spec_168" showResolution="false">
<action id="com.ibm.team.workitem.taskWorkflow.action.stopWorking"/>
<action id="com.ibm.team.workitem.taskWorkflow.action.resolve"/>
<action id="com.ibm.team.workitem.taskWorkflow.action.a2"/>
</state>

Then, of course, from the action id we want to be able to get a "user friendly" name, but then maybe localization is involved?

br erik

permanent link
Eric Lemes (123) | answered Apr 03 '14, 9:47 a.m.
edited Apr 03 '14, 10:03 a.m.
I was struggling with the same issue. Should be straightforward, unfortunately is cumbersume and bad documented :-(

https://<host>/ccm/oslc/workflows/<projectAreaID>/actions/<workItemType>
https://<host>/ccm/oslc/workflows/<projectAreaID>/states/<workItemType>

It won't give the possible states, but the whole list.

<host>: RTC host name
<projectAreaID>: The strange identifier, like _PujqoPa5EeGdSp953DQjzw
<workItemType>: The discovered type in the services list, ex.: com.<company>.team.workitem.workItemID.<workitemtype>

The correct identifiers from your environment can be discovered with: https://rtcprd.itau/ccm/oslc/contexts/_PujqoPa5EeGdSp953DQjzw/workitems/services.xml

permanent link
Dave Evans (14812646) | answered Mar 30 '20, 6:18 p.m.

 To get this, you will need to retrieve the Process Configuration. One method to get this via https/REST is documented here: https://jazz.net/forum/questions/170876/is-there-any-way-to-discover-the-valid-actions-for-a-state-via-the-rest-api

Your answer


Register or to post your answer.


Dashboards and work items are no longer publicly available, so some links may be invalid. We now provide similar information through other means. Learn more here.