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

How can I get state of a wortItem?

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!

1

0 votes



2 answers

Permanent link
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

0 votes


Permanent link
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.

0 votes

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
× 10,941

Question asked: Nov 19 '10, 5:13 a.m.

Question was seen: 5,425 times

Last updated: Nov 19 '10, 5:13 a.m.

Confirmation Cancel Confirm