List of permitted actions through REST call
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.
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.
3 answers
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
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
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
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
Comments
Ishrat Mohammed
Aug 25 '13, 6:28 p.m.I am also looking for the similar functionality. Is this possible through REST..?
thanks
-Ishrat.