It's all about the answers!

Ask a question

How to get action id of workitem state using server side java api?


Andrew Ciaz (59264) | asked Jan 07 '20, 12:46 a.m.

 Hi all,


I want to fetch action id of the state using server side api, please share the API if you have

Accepted answer


permanent link
Luca Martinucci (1.0k397112) | answered Jan 07 '20, 2:38 a.m.

A state has not an action ID, it has a state ID; in addition, a state has a certain number of associated actions users can perform from that state.

That said, in a server side plugin attached to a workitem Save operation, you can get the id of the action you are performing this way:

public void run(AdvisableOperation operation,
....)
throws TeamRepositoryException {
Object data = operation.getOperationData();
if (data instanceof ISaveParameter) {
saveParameter = (ISaveParameter) data;
}
String workItemActionIDString = saveParameter.getWorkflowAction();
}

Andrew Ciaz selected this answer as the correct answer

One other answer



permanent link
Ralph Schoon (63.5k33646) | answered Jan 07 '20, 4:57 a.m.
FORUM ADMINISTRATOR / FORUM MODERATOR / JAZZ DEVELOPER

https://rsjazz.wordpress.com/2012/11/27/resolve-parent-if-all-children-are-resolved-participant/ shows a tool that can calculate the path to a state if available.

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.