Methods / Methods for Process Instances |
Updates attributes of a workflow process instance. The attributes that can be updated are listed in the attribute table.
// 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[] processInstanceAttributes = new NameValue[] { new NameValue("ProcInstName", newProccessInstanceName), new NameValue("DueDate", newDueDate)), }; // update process instance svc.UpdateProcInst(processInstanceID, processInstanceAttributes); // 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)); }