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

List of States for a work item

Hello,

How can i get a list of states for a work item?

Thank you!

0 votes



7 answers

Permanent link
How can i get a list of states for a work item?

You would get the workflow information for a work item first:
IWorkflowInfo workflow= workItemCommon.findWorkflowInfo(workItem, monitor)

Then you can read the workflow's states, resolutions and actions, e.g.
workflow.getAllStateIds()

--
Regards,
Patrick
Jazz Work Item Team

0 votes


Permanent link
Hi Patrick,

It seems that when we try IWorkflowInfo workflow= workItemCommon.findWorkflowInfo(workItem, monitor), we get an IllegalArgumentException, any idea what might cause this?

Thanks!

How can i get a list of states for a work item?

You would get the workflow information for a work item first:
IWorkflowInfo workflow= workItemCommon.findWorkflowInfo(workItem, monitor)

Then you can read the workflow's states, resolutions and actions, e.g.
workflow.getAllStateIds()

--
Regards,
Patrick
Jazz Work Item Team

0 votes


Permanent link
Hey Patrick,

Would you have a different way to get the states?

Thanks again!

Hi Patrick,

It seems that when we try IWorkflowInfo workflow= workItemCommon.findWorkflowInfo(workItem, monitor), we get an IllegalArgumentException, any idea what might cause this?

Thanks!

How can i get a list of states for a work item?

You would get the workflow information for a work item first:
IWorkflowInfo workflow= workItemCommon.findWorkflowInfo(workItem, monitor)

Then you can read the workflow's states, resolutions and actions, e.g.
workflow.getAllStateIds()

--
Regards,
Patrick
Jazz Work Item Team

0 votes


Permanent link
Hey Patrick,

Would you have a different way to get the states?

Thanks again!

Hi Patrick,

It seems that when we try IWorkflowInfo workflow= workItemCommon.findWorkflowInfo(workItem, monitor), we get an IllegalArgumentException, any idea what might cause this?

Thanks!

How can i get a list of states for a work item?

You would get the workflow information for a work item first:
IWorkflowInfo workflow= workItemCommon.findWorkflowInfo(workItem, monitor)

Then you can read the workflow's states, resolutions and actions, e.g.
workflow.getAllStateIds()

--
Regards,
Patrick
Jazz Work Item Team

0 votes


Permanent link
Hey Patrick,

Would you have a different way to get the states?

Thanks again!

Hi Patrick,

It seems that when we try IWorkflowInfo workflow= workItemCommon.findWorkflowInfo(workItem, monitor), we get an IllegalArgumentException, any idea what might cause this?

Thanks!

How can i get a list of states for a work item?

You would get the workflow information for a work item first:
IWorkflowInfo workflow= workItemCommon.findWorkflowInfo(workItem, monitor)

Then you can read the workflow's states, resolutions and actions, e.g.
workflow.getAllStateIds()

--
Regards,
Patrick
Jazz Work Item Team

0 votes


Permanent link
It seems that when we try IWorkflowInfo workflow=
workItemCommon.findWorkflowInfo(workItem, monitor), we get an
IllegalArgumentException, any idea what might cause this?

Could you paste your code snippet and the stack trace? That would tell me
where the IllegalArgumentException comes from and what its cause could be.

--
Regards,
Patrick
Jazz Work Item Team

0 votes


Permanent link
How can i get a list of states for a work item?

You would get the workflow information for a work item first:
IWorkflowInfo workflow= workItemCommon.findWorkflowInfo(workItem, monitor)

Then you can read the workflow's states, resolutions and actions, e.g.
workflow.getAllStateIds()

--
Regards,
Patrick
Jazz Work Item Team

Another way to do this might be ....

IWorkItemClient workItemClient = (IWorkItemClient) teamRepository.getClientLibrary(IWorkItemClient.class);

IWorkflowInfo wfInfo = workItemClient.findWorkflowInfo(workItem, monitor);


instead of using WorkItemCommon which is internal.

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,938

Question asked: Feb 12 '09, 4:49 p.m.

Question was seen: 8,226 times

Last updated: Feb 12 '09, 4:49 p.m.

Confirmation Cancel Confirm