Get Custom Attribute

API Type

Web Services

Description

Retrieves a single custom attribute.

Syntax

public virtual object GetCustomAttr(string customID, string attrName);

Parameters

Name Description

customID

Definition:
A work object ID specified within a process instance.
Type
string
Allowed Values:
One valid work object ID.

attrName

Definition:
The name of an item, such as a property or attribute in a name/value pair.
Type
string
Allowed Values:
A valid name.

Output

Custom attribute value (can be string, integer, float, double, bool, and/or DateTime).

Example

IWFWorkflowService svc = GetWorkflowService();
string customID = …// for example, "013933F128C3415F81D6F545594D4CB6";
string attrName = …// for example,"/pd:myFields/pd:Name" or "Approval"

try
	{
    Object obj = svc.GetCustomAttr(customID,attrName);
	}

catch (Exception ex)
	{
    Console.WriteLine("Failed! " + ShUtil.GetSoapMessage(ex));
	}

Supported Versions

3.2.0.4 and higher