How to Capture the current action name when a action is being executed while saving an workitem
One answer
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());.
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());.
Comments
Ralph Schoon
FORUM ADMINISTRATOR / FORUM MODERATOR / JAZZ DEVELOPER Oct 01 '12, 5:50 a.m.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.