Jazz Forum Welcome to the Jazz Community Forum Connect and collaborate with IBM Engineering experts and users

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.

0 votes

Comments

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

thanks
-Ishrat.



3 answers

Permanent link
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

0 votes


Permanent link
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

0 votes


Permanent link

 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

0 votes

Your answer

Register or log in 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.

Search context
Follow this question

By Email: 

Once you sign in you will be able to subscribe for any updates here.

By RSS:

Answers
Answers and Comments
Question details
× 10,938

Question asked: Oct 03 '11, 5:13 a.m.

Question was seen: 6,928 times

Last updated: Mar 30 '20, 6:18 p.m.

Confirmation Cancel Confirm