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

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

 Hi all,


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

0 votes


Accepted answer

Permanent link

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

0 votes


One other answer

Permanent link

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.

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
× 1,700

Question asked: Jan 07 '20, 12:46 a.m.

Question was seen: 1,549 times

Last updated: Jan 07 '20, 4:57 a.m.

Confirmation Cancel Confirm