It's all about the answers!

Ask a question

What are the API to access the Process Configuration Template


ANIL ABRAHAM (2322024) | asked Nov 09 '12, 4:43 p.m.
 I want to access the Process Configuration Template to fetch the Workflow status and WorkItem type . Any suggestions. 

Comments
Geoffrey Clemm commented Nov 09 '12, 6:57 p.m.
FORUM ADMINISTRATOR / FORUM MODERATOR / JAZZ DEVELOPER

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
Qiong Feng Huang (76911610) | answered Nov 13 '12, 5:18 a.m.
JAZZ DEVELOPER
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.

permanent link
sam detweiler (12.5k6189201) | answered Nov 10 '12, 10:54 a.m.
edited Nov 10 '12, 10:55 a.m.
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))
                {
                }

Comments
ANIL ABRAHAM commented Nov 11 '12, 9:12 p.m. | edited May 01 '13, 12:52 a.m.

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))


sam detweiler commented Nov 11 '12, 11:17 p.m. | edited May 01 '13, 12:52 a.m.

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

Your answer


Register or to post your answer.