Create Process Definition

API Type

Web Services

Description

Adds a new process definition to the AgilePoint Server.

Syntax

public virtual string CreateProcDef(string xml)

Parameters

Name Description

xml

Definition:
Specifies a 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.

Type
string
Allowed Values:
A string that contains process definition in XML format.

Output

Unique ID of the process definition, which the AgilePoint system generates.

Example

IWFWorkflowService svc = GetWorkflowService();
string xml = …// Process definition XML as string

if( set release date )
	{
    WFProcessDefinition pd = new WFProcessDefinition();
    GraphicImage g = new GraphicImage();
    ProcDefXmlParser parser = new ProcDefXmlParser(new
    WFDefaultActivityInstantiator(), pd, g);
    parser.Parse(xml);
    pd.ReleaseDate = DateTime.Now; //Set release date
    ProcDefXmlWriter w = new ProcDefXmlWriter(pd, g);
    xml = w.WriteTostring();
    string procDefID = svc.CreateProcDef(xml);
	}

else // not to release process template
	{
    string procDefID = svc.CreateProcDef(xml);
	}

Supported Versions

3.2.0.4 and higher