Get Process Definition Graphics

API Type

Web Services

Description

Retrieves graphical data for the process definition in XML format. The graphical representation of the process is XML-serialized by the class Graphic Image. The graphical data is used to display the process visually.

Syntax

public virtual string GetProcDefGraphics(string processID)

Parameters

Name Description

processID

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

Output

Graphics object in XML format.

Example

// This is console application sample
IWFWorkflowService svc = GetWorkflowService();
//process definition ID or process instance ID
string processID = … // for example,
"42544811EC2D4FC18E6BA15CC9FE28DF";

try
	{
    //returns an image of a process definition as string.
    string procDefGraphicsXML = svc.GetProcDefGraphics(processID);
    GraphicImage g = new GraphicImage();
    g.FromXml(procDefGraphicsXML);
    byte[] images = g.Image // process image
    NamedRectangle[] shapes = g.Shapes;
	}

catch (Exception ex)
	{
    Console.WriteLine(ShUtil.GetSoapMessage(ex));
	}
/* This example produces the following results:
process definition Graphics:
<?xml version="1.0" encoding="utf-8"?><Graphics
left="3.33333333333333" right="5.76002857553708"
top="10.3848753378378" bottom="7"><Shapes><Shape
left="3.33333333333333" right="3.83333333333333"
top="10.3854166666667" bottom="9.88541666666667" name="Start"
/><Shape left="5.26041666666667"
right="5.76041666666667" top="7.5" bottom="7" name="Stop"
/><Shape left="4.30208333333333"
right="5.30208333333333" top="9.16666666666667"
bottom="8.66666666666667" name="Text File Writer.3"     
/></Shapes><Image>@64R0lGODlh6QBFAXAAACwAAAAA6QB
FAYcAAAAMDAwkJCQsLCydAAClAACqAACuAACyAAC2AAC6AAC+\nAADCAADGAADK
AAA8PDzOAADSAA     
.................\nTEGgS0+D2pKSHjUEWOzmRMPZljdstSBbQshYsxjRfu7xD
REAaV3vGgai7gAEaA3sj3bghhl2dbEN\nDAM5bsCFff6yI1uYAAZ8WtowAasI       
wudCT76Yxw1tYQa9/W1ww8ADCmxp+/SHxwvUm4UYBGq02d2S\nWJwAf+brX/9H0ic
BCEbggcpuAAbuvO+YgBV8acwAwNO3PjK+j4EKZzhNwp1PZ4dvfBUAoMEjgHG       
b\nBGNA0rYGa1W+cpazvMA32cOlMo6cgAAAOw==</Image></Graphics>
*/

Supported Versions

3.2.0.4 and higher