It's all about the answers!

Ask a question

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


Yazhini Churchill (2135) | asked Sep 30 '12, 3:01 a.m.

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

Comments
Ralph Schoon commented Oct 01 '12, 5:50 a.m. | edited Oct 01 '12, 5:50 a.m.
FORUM ADMINISTRATOR / FORUM MODERATOR / JAZZ DEVELOPER

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
Lauren Hayward Schaefer (3.3k11727) | answered Oct 01 '12, 7:26 a.m.
JAZZ DEVELOPER
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());.

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.