Methods / Methods for Process Instances |
Web Services
Updates attributes of a workflow process instance. The attributes that can be updated are listed in the attribute table.
public void UpdateProcInst(string processInstanceID, NameValue[] attributes)
Name | Description |
---|---|
processInstanceID |
|
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. |
None.
// 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)); }
3.2.0.4 and higher