How to get action id of workitem state using server side java api?
Accepted answer
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();
}
One other answer
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.