Get Process Definition XML

API Type

Web Services

Description

Retrieves a process model in XML format for the specified process model ID.

Syntax

public virtual string GetProcDefXml(string processTemplateID)

Parameters

Name Description

processTemplateID

Function:
The process definition ID for a released process definition.
Type
string
Accepted 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

Code Examples in the AgilePoint NX Documentation

The AgilePoint NX Product Documentation is intended as a basic reference to help you understand how to complete basic coding tasks, such as make API or JavaScript method calls. Code examples that show specific use cases, the solutions to specific business problems, or detailed implementation scenarios are outside the scope of the AgilePoint NX Product Documentation. For specific and/or advanced types of examples that may better meet your requirements, AgilePoint provides several resources:

  • AgilePoint Community Forums - A free, AgilePoint-moderated, crowd-sourcing user forum where you can ask questions about specific techniques, the solutions to use cases, workarounds, or other topics that may not be covered in the Product Documentation.
  • Professional Services - If you can not find the information you need for your specific business problem, mentoring is available through AgilePoint Professional Services.
  • Personalized Training - AgilePoint can provide personalized training for your organization. To request personalized training, contact AgilePoint Sales.