Get Events By Process Instance ID

API Type

Web Services

Description

Retrieves all the events that have occurred for a specified process instance.

Syntax

public virtual WFEvent[] GetEventsByProcInstID(string processInstanceID)

Parameters

Name Description

processInstanceID

Definition:
Specifies the unique ID of a process instance.
Type
string
Allowed Values:
A valid process instance ID

Output

An array of WFEvent objects.

Example

IWFWorkflowService svc = GetWorkflowService();           
string processInstanceID = … // process instance ID

try
	{
    WFEvent[] events = svc.GetEventsByProcInstID(processInstanceID);
    for (int i = 0; i < events.Length; i++)
        {
        Console.WriteLine("Event ID: '" + events[i].EventID + "' ");
        Console.WriteLine("Event Name: '" + events[i].EventName + "'");
        }
	}

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

Supported Versions

3.2.0.4 and higher