| Methods / Process Definition Methods |
Checks in the process definition to the AgilePoint Server and returns the process definition identifier. This method accepts a string with the updated process definition in XML format.
| Name | Type | Description |
|---|---|---|
| xml | string | A string that contains process definition in XML format. To generate the process definition file in XML format, in AgilePoint Envision, click File > Export & Import > Save As Deploying File(xml). You can also download the process definition XML from AgilePoint Enterprise Manager. |
IWFWorkflowService svc = GetWorkflowService();
string xml = …// Process definition XML as string
WFProcessDefinition pd = new WFProcessDefinition();
GraphicImage g = new GraphicImage();
ProcDefXmlParser parser = new ProcDefXmlParser(new
WFDefaultActivityInstantiator(), pd, g);
parser.Parse(xml);
if (release process definition immediately)
{
pd.ReleaseDate = DateTime.Now;
pd.Version = .. // new version
string procDefID = svc.CheckinProcDef( xml );
svc.ReleaseProcDef(processDefinitionID);
}
else if(release process definition at specific date in the future)
{
pd.ReleaseDate = …// a specific date in the future
pd.Version = .. // new version
string processDefinitionID = svc.CheckinProcDef( xml );
svc.ReleaseProcDef(processDefinitionID);
}
else // not release process definition
{
pd.ReleaseDate = Constants.NullDate;
string processDefinitionID = svc.CheckinProcDef( xml );
}