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

How to Capture the current action name when a action is being executed while saving an workitem


How do i capture the current action when it is moving to the new state while saving the work item?

0 votes

Comments

Hi,

I don't understand what you are trying to achieve/do. Please add more context to the question to help the community to be able to answer.



One answer

Permanent link
Hi Yazhini,
I think you're asking how to find the action programmatically while saving the work item.  What you can do is save the work item.  Then you can call List<IStateTransition> transitions = workItem.getStateTransitions().getAll();.  The last item in the list will be the latest transition, so you could get the action by calling System.out.println("The last action: " + transitions.get(transitions.size()-1).getActionId());.

1 vote

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
× 12,019

Question asked: Sep 30 '12, 3:01 a.m.

Question was seen: 5,274 times

Last updated: Oct 01 '12, 7:26 a.m.

Confirmation Cancel Confirm