Get Process Definition XML

API Type

Web Services

Description

Retrieves a process definition in XML format.

Syntax

public virtual string GetProcDefXml(string processTemplateID)

Parameters

Name Description

processTemplateID

Definition:
The process definition ID for a released process definition.
Type
string
Allowed Values:
A valid process definition ID.

Output

string that contains XML format of the process definition.

Example

// This is console application sample
IWFWorkflowService svc = GetWorkflowService();
//process definition ID for a process.
string processTemplateID = ..// for example "42544811EC2D4FC18E6BA15CC9FE28DF";

try
	{
    //Returns process definition in XML format.
    string procDefXML = svc.GetProcDefXml(processTemplateID);
    Console.WriteLine("process definition XML: \n");
    Console.WriteLine(procDefXML);
	}

catch (Exception ex)
	{
    Console.WriteLine( ShUtil.GetSoapMessage(ex));
	}

/*
This example produces the following results:
process definition XML:
<?xml version="1.0" encoding="utf-8"
standalone="no"?>\n<?wfmc-xpdl xmlns="http://www.wfmc.org/2002/XPDL1.0"
xmlns:xpdl="http://www.wfmc.org/2002/XPDL1.0"
xsi:schemaLocation="http://www.wfmc.org/2002/XPDL1.0"?>\n<!--Process
Definition, Copyright 2003-2004 AgilePoint Inc., All
Rights Reserved.-->\n<ProcessDefinition
defName="TextFileWriterProcess" preVersion="" version="1.0"
description="" owner="Bipin.Shah" docRef=""      
..................................\nTEGgS0+D2pKSHjUEWOzmRMPZljdstSBbQshYsxjRfu7
xDREAaV3vGgai7gAEaA3sj3bghhl2dbEN\nDAM5bsCFff6       
yI1uYAAZ8WtowAasIwudCT76Yxw1tYQa9/W1ww8ADCmxp+/SHxwvUm4UYBGq02d2S\nWJwAf+brX/9H
0icBCEbggcpuAAbuvO+YgBV8acwAwNO3PjK+j4EKZzhNwp       
1PZ4dvfBUAoMEjgHGb\nBGNA0rYGa1W+cpazvMA32cOlMo6cgAAAOw==</Image>\n   
</Graphics>\n</ProcessDefinition>
*/

Supported Versions

3.2.0.4 and higher