Hi All,
I am new to K2 but I'm assigned the task to manually stop worklist items. I followed codes from this forum but I can't seem to understand why the StopProcessInstances method won't change the status of a process instance when checked using debug. Below is the snippet of my code (trial code):
foreach (ProcessInstance proc in procInst)
{
Console.WriteLine("{0} - {1} - {2} - {3}", proc.ID, proc.Folio, proc.ProcSetFullName, proc.Status);
if(proc.ID.Equals(2)){
wms.StopProcessInstances(proc.ID);
Console.WriteLine(proc.Status);
Console.WriteLine("Success...");
wms.StartProcessInstances(proc.ID);
Console.WriteLine(proc.Status);
}
}
Kindly help.
Thanks.