What are the API to access the Process Configuration Template
2 answers
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
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..
Comments
Geoffrey Clemm
FORUM ADMINISTRATOR / FORUM MODERATOR / JAZZ DEVELOPER Nov 09 '12, 6:57 p.m.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).