It's all about the answers!

Ask a question

How can I get state of a wortItem?


0
1
wang lu (5664) | asked Nov 19 '10, 5:13 a.m.
Hi All
We have got state by used below code:
Identifier<IState> state= workItem.getState2();
but it return number not string,how can I get string ?
Thanks for your help!

2 answers



permanent link
Patrick Streule (4.9k21) | answered Nov 19 '10, 5:38 a.m.
JAZZ DEVELOPER
On 11/19/10 11:23 AM, liumawang wrote:
Hi All
We have got state by used below code:
Identifier<IState> state= workItem.getState2();
but it return number not string,how can I get string ?
Thanks for your help!



To get the state name, you have to use:
IWorkflowInfo info= workItemClient.findWorkflowInfo(workitem, monitor);
String name= info.getStateName(workitem.getState2());

--
Regards,
Patrick
RTC Work Item Component Lead

permanent link
wang lu (5664) | answered Nov 21 '10, 9:21 p.m.
On 11/19/10 11:23 AM, liumawang wrote:
Hi All
We have got state by used below code:
Identifier<IState> state= workItem.getState2();
but it return number not string,how can I get string ?
Thanks for your help!



To get the state name, you have to use:
IWorkflowInfo info= workItemClient.findWorkflowInfo(workitem, monitor);
String name= info.getStateName(workitem.getState2());

--
Regards,
Patrick
RTC Work Item Component Lead
Thank you for your repaly,It's very helpful for us.

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.