Get Process Definition Graphics

API Type

Web Services

Description

Retrieves graphical data for the process model (process definition) in XML format.

Good to Know

Syntax

public virtual string GetProcDefGraphics(string processID)

Parameters

NameDescription

processID

Description:
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

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.