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

What are the API to access the Process Configuration Template

 I want to access the Process Configuration Template to fetch the Workflow status and WorkItem type . Any suggestions. 

0 votes

Comments

By the "process configuration template", do you mean a process template, or the process configuration of a specific project area?   (A "process template" is an object that is used to initialize the process configuration of a new project area, but once a project area is created, it has no connection to the process template used to initialize it).



2 answers

Permanent link
there are no published apis for manipulating the process config data.
explain a little more what u want to do?

If you are in an extension and want to access the workflow for this workitem, then there are apis (but they don't expose the process config specifically)..

from one of my extensions

                IAuditableCommon iac = ((ISaveParameter) data).getSaveOperationParameter().getAuditableCommon();
                WorkflowManager wfm = new WorkflowManager(iac);
               
                // reference the right object type (cast)
                IWorkItem workItem = (IWorkItem) auditable;
                // get the workflow this workitem is in, so we can get the labels of the states
                IWorkflowInfo x =wfm.getWorkflowInfo(workItem, monitor);
                if(x.getStateName(workItem.getState2()).equalsIgnoreCase(ResolvedState)||
                        x.getStateName(workItem.getState2()).equalsIgnoreCase(DoneState))
                {
                }

0 votes

Comments

Sam , I want to fetch the "Workitem id" eg Task or Story and "Workflow states" eg In Progress or Closed .

Now iam passing those (Workitem id and Workiflow state" from a constant field, instead i want to fetch them progrmatically from process configuration template, . How to fetch it from process configuration ?

Code now :

a) Workitem id

sourceworkItem.getWorkItemType().equalsIgnoreCase(PluginConstant.TASK_WORKITEM_ID)

b) In progress State and Closed state

(workflowInfo.getStateName(oldWorkItemStateId).equalsIgnoreCase(PluginConstant.

INPROGRESS_STATE_NAME) && workflowInfo.getStateName(newWorkItemStateId).equalsIgnoreCase(PluginConstant.

CLOSED_STATE_NAME))

sorry, still unclear

fetch - from a Plain Java client, or a server side extension or??

The IWorkflowInfo object has methods to get all the state and action names and values to use.

the IProcessArea and IProcessAreaContainer classes will get you to the workitem types supported by this project definition..

the workitem will get you its project, and then its process area and then its container
based on what I see in the Javadoc..


Permanent link
There is a method to get project config data, you can look into com.ibm.team.process.service#getProjectConfigurationData(). But this is a low level method and is not recommended to use if you don't have a strong reason. If you have to use this method, you must know the format(schema) of the config data. If you want to get any config information about workitem, it's better to use a higher level method from workitem's level.

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
× 6,130

Question asked: Nov 09 '12, 4:43 p.m.

Question was seen: 4,486 times

Last updated: May 01 '13, 12:52 a.m.

Confirmation Cancel Confirm