Set Custom Attribute

API Type

Web Services

Description

Sets the name and value for a custom attribute for a specified custom ID.

Syntax

public virtual SetCustomAttr(String customID, String attributeName, object val)

Parameters

Name Description

customID

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

attributeName

Definition:
The name of the process instance attribute you want.
Type
string
Allowed Values:
A valid process instance attribute.

val

Definition:
The value of the custom attribute.
Type
object
Allowed Values:
A valid Types object.

Output

None.

Example

IWFWorkflowService svc = GetWorkflowService();
string customID = ..// for example,
"InfoPath:011eaf6c46ac4723b25b4db5772d9912"
string attributeName = ...// for example,
"//pd:purchaseOrder/pd:secondApproval"
bool val = true;

try
	{
    svc.SetCustomAttr(customID, attributeName, val);
	}

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

Supported Versions

3.2.0.4 and higher