Update Process Instance

API Type

Web Services

Description

Updates attributes of a workflow process instance. The attributes that can be updated are listed in the attribute table.

Syntax

public void UpdateProcInst(string processInstanceID, NameValue[] attributes)

Parameters

Name Description

processInstanceID

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

attributes

Definition:
Name-value pairs associated with a custom ID.
Type
NameValue
Allowed Values:
A valid custom ID with an associated name.

Attributes

Name Description
ProcInstName The name of the process instance.
DueDate The date that the process instance is expected to be complete
workObjectID The ID of the work object.

Output

None.

Example

// This is console application sample to update process instance name
IWFWorkflowService svc = GetWorkflowService();
string processInstanceID = … // process instance ID
string newProccessInstanceName = "[new process instance name]";
DateTime newDueDate = DateTime.Now.AddDays(7.0);

try
	{
    WFBaseProcessInstance inst = svc.GetProcInst(processInstanceID);
    NameValue[] attributes = new NameValue[]
        {
       new NameValue("ProcInstName", newProccessInstanceName),
       new NameValue("DueDate", newDueDate)),
        };
  
    // update process instance
    svc.UpdateProcInst(processInstanceID, attributes);

    // check if it has been updated.
    string processInstanceName =
    svc.GetProcInst(processInstanceID).ProcInstName;
    Console.WriteLine("New Process Instance Name= '{0}",
    processInstanceName);
	}

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

Supported Versions

3.2.0.4 and higher