It's all about the answers!

Ask a question

How to get list of Workflows/IWorkflowInfo of IProjectArea


Igor Zelmanovich (62) | asked Sep 25 '08, 6:44 a.m.
I found internal API
com.ibm.team.workitem.common.internal.workflow.WorkflowManager

is there some public analog?

3 answers



permanent link
Patrick Streule (4.9k21) | answered Oct 06 '08, 9:42 a.m.
JAZZ DEVELOPER
I need some API to get IWorkflowInfo by workItem type category.

I found it in WorkflowManager, but it is internal:

public String getWorkflowIdForCategory(IProjectAreaHandle projectArea,
String category, boolean shortOp, IProgressMonitor monitor)
and
public IWorkflowInfo getWorkflowInfo(IProjectAreaHandle projectArea,
String workflowId, boolean shortOp, IProgressMonitor monitor)

To avoid the internal API, you could create a work item in memory, set
its type to one one of the type category's types and use the public

findWorkflowInfo(workItem, monitor);

Regards,
Patrick
Jazz Work Item Team

permanent link
Igor Zelmanovich (62) | answered Oct 05 '08, 7:02 a.m.
I found internal API
com.ibm.team.workitem.common.internal.workflow.WorkflowManager

is there some public analog?

There are two methods that may help you:

IWorkItemCommon#findCombinedWorkflowInfos(IProjectAreaHandle
projectArea, IProgressMonitor monitor)

and

IWorkItemCommon#findWorkflowInfo(IWorkItem workItem, IProgressMonitor
monitor)

Regards,
Patrick,
Jazz Work Item Team

I need some API to get IWorkflowInfo by workItem type category.

I found it in WorkflowManager, but it is internal:

public String getWorkflowIdForCategory(IProjectAreaHandle projectArea, String category, boolean shortOp, IProgressMonitor monitor)
and
public IWorkflowInfo getWorkflowInfo(IProjectAreaHandle projectArea, String workflowId, boolean shortOp, IProgressMonitor monitor)

permanent link
Patrick Streule (4.9k21) | answered Sep 25 '08, 10:05 a.m.
JAZZ DEVELOPER
I found internal API
com.ibm.team.workitem.common.internal.workflow.WorkflowManager

is there some public analog?

There are two methods that may help you:

IWorkItemCommon#findCombinedWorkflowInfos(IProjectAreaHandle
projectArea, IProgressMonitor monitor)

and

IWorkItemCommon#findWorkflowInfo(IWorkItem workItem, IProgressMonitor
monitor)

Regards,
Patrick,
Jazz Work Item Team

Your answer


Register or to post your answer.