It's all about the answers!

Ask a question

RTC - How to resolve the STATE enumeration?


Vinícius Rabelo (825) | asked Jul 28 '14, 3:37 p.m.
edited Jul 28 '14, 3:55 p.m.
 Hi,

When I am loading the STATE attribute from workitem, I am getting something like "com.ibm.team.workitem.defectWorkflow.state.s13", then to get the STATE name I do: <code>WorkflowUtilities.findWorkflowInfo(workItem, monitor).getStateName(workItem.getState2());</code>
But when I need to get other attributes value, from Enumeration, I do: <code>(List<ConfigurationItem>) workItemClient.resolveEnumeration(iAttribute, monitor).getEnumerationLiterals();</code>, then I can get the display name making <code>configurationItem.getDisplayName()</code>

It's possible to make something like this to STATE property?

Accepted answer


permanent link
Ralph Schoon (63.5k33646) | answered Jul 29 '14, 3:00 a.m.
FORUM ADMINISTRATOR / FORUM MODERATOR / JAZZ DEVELOPER
The state attribute is no enumeration. I think you should provide more information on what you want to achieve. I blogged about working with workflow states here: http://rsjazz.wordpress.com/2012/11/26/manipulating-work-item-states/

If you want the (display) name of a state, I think you need to use workflowInfo.getStateName(stateId)
Vinícius Rabelo selected this answer as the correct answer

Comments
Vinícius Rabelo commented Jul 29 '14, 2:14 p.m.

Ok Ralph, I understood... Thanks a lot...

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.