It's all about the answers!

Ask a question

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


Andrew Ciaz (473) | asked Jan 07, 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 (942277103) | answered Jan 07, 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 (56.6k23642) | answered Jan 07, 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.